Commit fa021c56a585f231cf0618715f534a3e53f9f254
Merge branch 'cef3' of git.net-core.org:darkgod/t-engine4 into cef3
Showing
3 changed files
with
549 additions
and
15 deletions

1.55 KB
... | ... | @@ -64,15 +64,21 @@ function _M:generate() |
64 | 64 | local Dialog = require "engine.ui.Dialog" |
65 | 65 | Dialog:webPopup(url, w, h) |
66 | 66 | end end, |
67 | + on_loading = function(view, url, status) | |
68 | + print("===loading", url, status) | |
69 | + self.loading = status | |
70 | + end, | |
67 | 71 | } |
68 | 72 | if self.allow_downloads then self:onDownload(handlers) end |
69 | 73 | self.view = core.webview.new(self.w, self.h, self.url, handlers) |
70 | - self.oldloading = true | |
74 | + self.loading = 0 | |
75 | + self.loading_rotation = 0 | |
71 | 76 | self.scroll_inertia = 0 |
72 | 77 | |
73 | 78 | if self.has_frame then |
74 | 79 | self.frame = Base:makeFrame("ui/tooltip/", self.w + 8, self.h + 8) |
75 | 80 | end |
81 | + self.loading_icon = self:getUITexture("ui/waiter/loading.png") | |
76 | 82 | |
77 | 83 | self.mouse:registerZone(0, 0, self.w, self.h, function(button, x, y, xrel, yrel, bx, by, event) |
78 | 84 | if not self.view then return end |
... | ... | @@ -95,12 +101,23 @@ function _M:generate() |
95 | 101 | end |
96 | 102 | end) |
97 | 103 | |
98 | - function self.key.receiveKey(_, sym, ctrl, shift, alt, meta, unicode, isup, key, ismouse, keysym) | |
99 | - if not self.view then return end | |
100 | - if unicode then | |
101 | - keysym = unicode:sub(1):byte() | |
104 | + if core.webview.kind == "awesomium" then | |
105 | + function self.key.receiveKey(_, sym, ctrl, shift, alt, meta, unicode, isup, key, ismouse, keysym) | |
106 | + if not self.view then return end | |
107 | + local symb = self.key.sym_to_name[sym] | |
108 | + if not symb then return end | |
109 | + local asymb = self.awesomiumMapKey[symb] | |
110 | + if not asymb then return end | |
111 | + self.view:injectKey(isup, symb, asymb, unicode) | |
112 | + end | |
113 | + elseif core.webview.kind == "cef3" then | |
114 | + function self.key.receiveKey(_, sym, ctrl, shift, alt, meta, unicode, isup, key, ismouse, keysym) | |
115 | + if not self.view then return end | |
116 | + if unicode then | |
117 | + keysym = unicode:sub(1):byte() | |
118 | + end | |
119 | + self.view:injectKey(isup, keysym) | |
102 | 120 | end |
103 | - self.view:injectKey(isup, keysym) | |
104 | 121 | end |
105 | 122 | end |
106 | 123 | |
... | ... | @@ -176,15 +193,17 @@ function _M:onDownload(handlers) |
176 | 193 | handlers.on_download_update = function(view, downid, cur_size, total_size, percent, speed) |
177 | 194 | if not self.download_dialog then return end |
178 | 195 | self.download_dialog:updateFill(cur_size, total_size, ("%d%% - %d KB/s"):format(cur_size * 100 / total_size, speed / 1024)) |
179 | - if cur_size == total_size then | |
180 | - game:unregisterDialog(self.download_dialog) | |
181 | - if self.download_dialog.install_kind == "Addon" then | |
182 | - Dialog:simplePopup("Addon installed!", "Addon installation successful. New addons are only active for new characters.") | |
183 | - elseif self.download_dialog.install_kind == "Game Module" then | |
184 | - Dialog:simplePopup("Game installed!", "Game installation successful. Have fun!") | |
185 | - end | |
186 | - self.download_dialog = nil | |
196 | + end | |
197 | + | |
198 | + handlers.on_download_finish = function(view, downid) | |
199 | + if not self.download_dialog then return end | |
200 | + game:unregisterDialog(self.download_dialog) | |
201 | + if self.download_dialog.install_kind == "Addon" then | |
202 | + Dialog:simplePopup("Addon installed!", "Addon installation successful. New addons are only active for new characters.") | |
203 | + elseif self.download_dialog.install_kind == "Game Module" then | |
204 | + Dialog:simplePopup("Game installed!", "Game installation successful. Have fun!") | |
187 | 205 | end |
206 | + self.download_dialog = nil | |
188 | 207 | end |
189 | 208 | end |
190 | 209 | |
... | ... | @@ -202,4 +221,517 @@ function _M:display(x, y, nb_keyframes, screen_x, screen_y, offset_x, offset_y, |
202 | 221 | if self.scroll_inertia ~= 0 then self.view:injectMouseWheel(0, self.scroll_inertia) end |
203 | 222 | self.view:toScreen(x, y) |
204 | 223 | end |
224 | + | |
225 | + if self.loading < 1 then | |
226 | + self.loading_rotation = self.loading_rotation + nb_keyframes * 8 | |
227 | + core.display.glMatrix(true) | |
228 | + core.display.glTranslate(x + self.loading_icon.w / 2, y + self.loading_icon.h / 2, 0) | |
229 | + core.display.glRotate(self.loading_rotation, 0, 0, 1) | |
230 | + self.loading_icon.t:toScreenFull(-self.loading_icon.w / 2, -self.loading_icon.h / 2, self.loading_icon.w, self.loading_icon.h, self.loading_icon.tw, self.loading_icon.th) | |
231 | + core.display.glMatrix(false) | |
232 | + end | |
205 | 233 | end |
234 | + | |
235 | + | |
236 | +_M.awesomiumMapKey = { | |
237 | + -- _BACK (08) BACKSPACE key | |
238 | + _BACKSPACE = 0x08, | |
239 | + | |
240 | + -- _TAB (09) TAB key | |
241 | + _TAB = 0x09, | |
242 | + | |
243 | + -- _CLEAR (0C) CLEAR key | |
244 | + _CLEAR = 0x0C, | |
245 | + | |
246 | + -- _RETURN (0D) | |
247 | + _RETURN = 0x0D, | |
248 | + | |
249 | + -- _SHIFT (10) SHIFT key | |
250 | + _SHIFT = 0x10, | |
251 | + | |
252 | + -- _CONTROL (11) CTRL key | |
253 | + _CONTROL = 0x11, | |
254 | + | |
255 | + -- _MENU (12) ALT key | |
256 | + _MENU = 0x12, | |
257 | + | |
258 | + -- _PAUSE (13) PAUSE key | |
259 | + _PAUSE = 0x13, | |
260 | + | |
261 | + -- _CAPITAL (14) CAPS LOCK key | |
262 | + _CAPITAL = 0x14, | |
263 | + | |
264 | + -- _KANA (15) Input Method Editor (IME) Kana mode | |
265 | + _KANA = 0x15, | |
266 | + | |
267 | + -- _HANGUEL (15) IME Hanguel mode (maintained for compatibility; use _HANGUL) | |
268 | + -- _HANGUL (15) IME Hangul mode | |
269 | + _HANGUL = 0x15, | |
270 | + | |
271 | + -- _JUNJA (17) IME Junja mode | |
272 | + _JUNJA = 0x17, | |
273 | + | |
274 | + -- _FINAL (18) IME final mode | |
275 | + _FINAL = 0x18, | |
276 | + | |
277 | + -- _HANJA (19) IME Hanja mode | |
278 | + _HANJA = 0x19, | |
279 | + | |
280 | + -- _KANJI (19) IME Kanji mode | |
281 | + _KANJI = 0x19, | |
282 | + | |
283 | + -- _ESCAPE (1B) ESC key | |
284 | + _ESCAPE = 0x1B, | |
285 | + | |
286 | + -- _CONVERT (1C) IME convert | |
287 | + _CONVERT = 0x1C, | |
288 | + | |
289 | + -- _NONCONVERT (1D) IME nonconvert | |
290 | + _NONCONVERT = 0x1D, | |
291 | + | |
292 | + -- _ACCEPT (1E) IME accept | |
293 | + _ACCEPT = 0x1E, | |
294 | + | |
295 | + -- _MODECHANGE (1F) IME mode change request | |
296 | + _MODECHANGE = 0x1F, | |
297 | + | |
298 | + -- _SPACE (20) SPACEBAR | |
299 | + _SPACE = 0x20, | |
300 | + | |
301 | + -- _PRIOR (21) PAGE UP key | |
302 | + _PRIOR = 0x21, | |
303 | + | |
304 | + -- _NEXT (22) PAGE DOWN key | |
305 | + _NEXT = 0x22, | |
306 | + | |
307 | + -- _END (23) END key | |
308 | + _END = 0x23, | |
309 | + | |
310 | + -- _HOME (24) HOME key | |
311 | + _HOME = 0x24, | |
312 | + | |
313 | + -- _LEFT (25) LEFT ARROW key | |
314 | + _LEFT = 0x25, | |
315 | + | |
316 | + -- _UP (26) UP ARROW key | |
317 | + _UP = 0x26, | |
318 | + | |
319 | + -- _RIGHT (27) RIGHT ARROW key | |
320 | + _RIGHT = 0x27, | |
321 | + | |
322 | + -- _DOWN (28) DOWN ARROW key | |
323 | + _DOWN = 0x28, | |
324 | + | |
325 | + -- _SELECT (29) SELECT key | |
326 | + _SELECT = 0x29, | |
327 | + | |
328 | + -- _PRINT (2A) PRINT key | |
329 | + _PRINT = 0x2A, | |
330 | + | |
331 | + -- _EXECUTE (2B) EXECUTE key | |
332 | + _EXECUTE = 0x2B, | |
333 | + | |
334 | + -- _SNAPSHOT (2C) PRINT SCREEN key | |
335 | + _SNAPSHOT = 0x2C, | |
336 | + | |
337 | + -- _INSERT (2D) INS key | |
338 | + _INSERT = 0x2D, | |
339 | + | |
340 | + -- _DELETE (2E) DEL key | |
341 | + _DELETE = 0x2E, | |
342 | + | |
343 | + -- _HELP (2F) HELP key | |
344 | + _HELP = 0x2F, | |
345 | + | |
346 | + -- (30) 0 key | |
347 | + _0 = 0x30, | |
348 | + | |
349 | + -- (31) 1 key | |
350 | + _1 = 0x31, | |
351 | + | |
352 | + -- (32) 2 key | |
353 | + _2 = 0x32, | |
354 | + | |
355 | + -- (33) 3 key | |
356 | + _3 = 0x33, | |
357 | + | |
358 | + -- (34) 4 key | |
359 | + _4 = 0x34, | |
360 | + | |
361 | + -- (35) 5 key; | |
362 | + _5 = 0x35, | |
363 | + | |
364 | + -- (36) 6 key | |
365 | + _6 = 0x36, | |
366 | + | |
367 | + -- (37) 7 key | |
368 | + _7 = 0x37, | |
369 | + | |
370 | + -- (38) 8 key | |
371 | + _8 = 0x38, | |
372 | + | |
373 | + -- (39) 9 key | |
374 | + _9 = 0x39, | |
375 | + | |
376 | + -- (41) A key | |
377 | + _a = 0x41, | |
378 | + | |
379 | + -- (42) b key | |
380 | + _b = 0x42, | |
381 | + | |
382 | + -- (43) c key | |
383 | + _c = 0x43, | |
384 | + | |
385 | + -- (44) d key | |
386 | + _d = 0x44, | |
387 | + | |
388 | + -- (45) e key | |
389 | + _e = 0x45, | |
390 | + | |
391 | + -- (46) f key | |
392 | + _f = 0x46, | |
393 | + | |
394 | + -- (47) g key | |
395 | + _g = 0x47, | |
396 | + | |
397 | + -- (48) h key | |
398 | + _h = 0x48, | |
399 | + | |
400 | + -- (49) i key | |
401 | + _i = 0x49, | |
402 | + | |
403 | + -- (4a) j key | |
404 | + _j = 0x4a, | |
405 | + | |
406 | + -- (4b) k key | |
407 | + _k = 0x4b, | |
408 | + | |
409 | + -- (4c) l key | |
410 | + _l = 0x4c, | |
411 | + | |
412 | + -- (4d) m key | |
413 | + _m = 0x4d, | |
414 | + | |
415 | + -- (4e) n key | |
416 | + _n = 0x4e, | |
417 | + | |
418 | + -- (4f) o key | |
419 | + _o = 0x4f, | |
420 | + | |
421 | + -- (50) p key | |
422 | + _p = 0x50, | |
423 | + | |
424 | + -- (51) q key | |
425 | + _q = 0x51, | |
426 | + | |
427 | + -- (52) r key | |
428 | + _r = 0x52, | |
429 | + | |
430 | + -- (53) s key | |
431 | + _s = 0x53, | |
432 | + | |
433 | + -- (54) t key | |
434 | + _t = 0x54, | |
435 | + | |
436 | + -- (55) u key | |
437 | + _u = 0x55, | |
438 | + | |
439 | + -- (56) v key | |
440 | + _v = 0x56, | |
441 | + | |
442 | + -- (57) w key | |
443 | + _w = 0x57, | |
444 | + | |
445 | + -- (58) x key | |
446 | + _x = 0x58, | |
447 | + | |
448 | + -- (59) y key | |
449 | + _y = 0x59, | |
450 | + | |
451 | + -- (5a) z key | |
452 | + _z = 0x5a, | |
453 | + | |
454 | + -- _LWIN (5B) Left Windows key (Microsoft Natural keyboard) | |
455 | + _LWIN = 0x5B, | |
456 | + | |
457 | + -- _RWIN (5C) Right Windows key (Natural keyboard) | |
458 | + _RWIN = 0x5C, | |
459 | + | |
460 | + -- _APPS (5D) Applications key (Natural keyboard) | |
461 | + _APPS = 0x5D, | |
462 | + | |
463 | + -- _SLEEP (5F) Computer Sleep key | |
464 | + _SLEEP = 0x5F, | |
465 | + | |
466 | + -- _NUMPAD0 (60) Numeric keypad 0 key | |
467 | + _NUMPAD0 = 0x60, | |
468 | + | |
469 | + -- _NUMPAD1 (61) Numeric keypad 1 key | |
470 | + _NUMPAD1 = 0x61, | |
471 | + | |
472 | + -- _NUMPAD2 (62) Numeric keypad 2 key | |
473 | + _NUMPAD2 = 0x62, | |
474 | + | |
475 | + -- _NUMPAD3 (63) Numeric keypad 3 key | |
476 | + _NUMPAD3 = 0x63, | |
477 | + | |
478 | + -- _NUMPAD4 (64) Numeric keypad 4 key | |
479 | + _NUMPAD4 = 0x64, | |
480 | + | |
481 | + -- _NUMPAD5 (65) Numeric keypad 5 key | |
482 | + _NUMPAD5 = 0x65, | |
483 | + | |
484 | + -- _NUMPAD6 (66) Numeric keypad 6 key | |
485 | + _NUMPAD6 = 0x66, | |
486 | + | |
487 | + -- _NUMPAD7 (67) Numeric keypad 7 key | |
488 | + _NUMPAD7 = 0x67, | |
489 | + | |
490 | + -- _NUMPAD8 (68) Numeric keypad 8 key | |
491 | + _NUMPAD8 = 0x68, | |
492 | + | |
493 | + -- _NUMPAD9 (69) Numeric keypad 9 key | |
494 | + _NUMPAD9 = 0x69, | |
495 | + | |
496 | + -- _MULTIPLY (6A) Multiply key | |
497 | + _MULTIPLY = 0x6A, | |
498 | + | |
499 | + -- _ADD (6B) Add key | |
500 | + _ADD = 0x6B, | |
501 | + | |
502 | + -- _SEPARATOR (6C) Separator key | |
503 | + _SEPARATOR = 0x6C, | |
504 | + | |
505 | + -- _SUBTRACT (6D) Subtract key | |
506 | + _SUBTRACT = 0x6D, | |
507 | + | |
508 | + -- _DECIMAL (6E) Decimal key | |
509 | + _DECIMAL = 0x6E, | |
510 | + | |
511 | + -- _DIVIDE (6F) Divide key | |
512 | + _DIVIDE = 0x6F, | |
513 | + | |
514 | + -- _F1 (70) F1 key | |
515 | + _F1 = 0x70, | |
516 | + | |
517 | + -- _F2 (71) F2 key | |
518 | + _F2 = 0x71, | |
519 | + | |
520 | + -- _F3 (72) F3 key | |
521 | + _F3 = 0x72, | |
522 | + | |
523 | + -- _F4 (73) F4 key | |
524 | + _F4 = 0x73, | |
525 | + | |
526 | + -- _F5 (74) F5 key | |
527 | + _F5 = 0x74, | |
528 | + | |
529 | + -- _F6 (75) F6 key | |
530 | + _F6 = 0x75, | |
531 | + | |
532 | + -- _F7 (76) F7 key | |
533 | + _F7 = 0x76, | |
534 | + | |
535 | + -- _F8 (77) F8 key | |
536 | + _F8 = 0x77, | |
537 | + | |
538 | + -- _F9 (78) F9 key | |
539 | + _F9 = 0x78, | |
540 | + | |
541 | + -- _F10 (79) F10 key | |
542 | + _F10 = 0x79, | |
543 | + | |
544 | + -- _F11 (7A) F11 key | |
545 | + _F11 = 0x7A, | |
546 | + | |
547 | + -- _F12 (7B) F12 key | |
548 | + _F12 = 0x7B, | |
549 | + | |
550 | + -- _F13 (7C) F13 key | |
551 | + _F13 = 0x7C, | |
552 | + | |
553 | + -- _F14 (7D) F14 key | |
554 | + _F14 = 0x7D, | |
555 | + | |
556 | + -- _F15 (7E) F15 key | |
557 | + _F15 = 0x7E, | |
558 | + | |
559 | + -- _F16 (7F) F16 key | |
560 | + _F16 = 0x7F, | |
561 | + | |
562 | + -- _F17 (80H) F17 key | |
563 | + _F17 = 0x80, | |
564 | + | |
565 | + -- _F18 (81H) F18 key | |
566 | + _F18 = 0x81, | |
567 | + | |
568 | + -- _F19 (82H) F19 key | |
569 | + _F19 = 0x82, | |
570 | + | |
571 | + -- _F20 (83H) F20 key | |
572 | + _F20 = 0x83, | |
573 | + | |
574 | + -- _F21 (84H) F21 key | |
575 | + _F21 = 0x84, | |
576 | + | |
577 | + -- _F22 (85H) F22 key | |
578 | + _F22 = 0x85, | |
579 | + | |
580 | + -- _F23 (86H) F23 key | |
581 | + _F23 = 0x86, | |
582 | + | |
583 | + -- _F24 (87H) F24 key | |
584 | + _F24 = 0x87, | |
585 | + | |
586 | + -- _NUMLOCK (90) NUM LOCK key | |
587 | + _NUMLOCK = 0x90, | |
588 | + | |
589 | + -- _SCROLL (91) SCROLL LOCK key | |
590 | + _SCROLL = 0x91, | |
591 | + | |
592 | + -- _LSHIFT (A0) Left SHIFT key | |
593 | + _LSHIFT = 0xA0, | |
594 | + | |
595 | + -- _RSHIFT (A1) Right SHIFT key | |
596 | + _RSHIFT = 0xA1, | |
597 | + | |
598 | + -- _LCONTROL (A2) Left CONTROL key | |
599 | + _LCONTROL = 0xA2, | |
600 | + | |
601 | + -- _RCONTROL (A3) Right CONTROL key | |
602 | + _RCONTROL = 0xA3, | |
603 | + | |
604 | + -- _LMENU (A4) Left MENU key | |
605 | + _LMENU = 0xA4, | |
606 | + | |
607 | + -- _RMENU (A5) Right MENU key | |
608 | + _RMENU = 0xA5, | |
609 | + | |
610 | + -- _BROWSER_BACK (A6) Windows 2000/XP: Browser Back key | |
611 | + _BROWSER_BACK = 0xA6, | |
612 | + | |
613 | + -- _BROWSER_FORWARD (A7) Windows 2000/XP: Browser Forward key | |
614 | + _BROWSER_FORWARD = 0xA7, | |
615 | + | |
616 | + -- _BROWSER_REFRESH (A8) Windows 2000/XP: Browser Refresh key | |
617 | + _BROWSER_REFRESH = 0xA8, | |
618 | + | |
619 | + -- _BROWSER_STOP (A9) Windows 2000/XP: Browser Stop key | |
620 | + _BROWSER_STOP = 0xA9, | |
621 | + | |
622 | + -- _BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key | |
623 | + _BROWSER_SEARCH = 0xAA, | |
624 | + | |
625 | + -- _BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key | |
626 | + _BROWSER_FAVORITES = 0xAB, | |
627 | + | |
628 | + -- _BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key | |
629 | + _BROWSER_HOME = 0xAC, | |
630 | + | |
631 | + -- _VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key | |
632 | + _VOLUME_MUTE = 0xAD, | |
633 | + | |
634 | + -- _VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key | |
635 | + _VOLUME_DOWN = 0xAE, | |
636 | + | |
637 | + -- _VOLUME_UP (AF) Windows 2000/XP: Volume Up key | |
638 | + _VOLUME_UP = 0xAF, | |
639 | + | |
640 | + -- _MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key | |
641 | + _MEDIA_NEXT_TRACK = 0xB0, | |
642 | + | |
643 | + -- _MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key | |
644 | + _MEDIA_PREV_TRACK = 0xB1, | |
645 | + | |
646 | + -- _MEDIA_STOP (B2) Windows 2000/XP: Stop Media key | |
647 | + _MEDIA_STOP = 0xB2, | |
648 | + | |
649 | + -- _MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key | |
650 | + _MEDIA_PLAY_PAUSE = 0xB3, | |
651 | + | |
652 | + -- _LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key | |
653 | + _MEDIA_LAUNCH_MAIL = 0xB4, | |
654 | + | |
655 | + -- _LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key | |
656 | + _MEDIA_LAUNCH_MEDIA_SELECT = 0xB5, | |
657 | + | |
658 | + -- _LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key | |
659 | + _MEDIA_LAUNCH_APP1 = 0xB6, | |
660 | + | |
661 | + -- _LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key | |
662 | + _MEDIA_LAUNCH_APP2 = 0xB7, | |
663 | + | |
664 | + -- _OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key | |
665 | + _OEM_1 = 0xBA, | |
666 | + | |
667 | + -- _OEM_PLUS (BB) Windows 2000/XP: For any country/region, the '+' key | |
668 | + _OEM_PLUS = 0xBB, | |
669 | + | |
670 | + -- _OEM_COMMA (BC) Windows 2000/XP: For any country/region, the ',' key | |
671 | + _OEM_COMMA = 0xBC, | |
672 | + | |
673 | + -- _OEM_MINUS (BD) Windows 2000/XP: For any country/region, the '-' key | |
674 | + _OEM_MINUS = 0xBD, | |
675 | + | |
676 | + -- _OEM_PERIOD (BE) Windows 2000/XP: For any country/region, the '.' key | |
677 | + _OEM_PERIOD = 0xBE, | |
678 | + | |
679 | + -- _OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key | |
680 | + _OEM_2 = 0xBF, | |
681 | + | |
682 | + -- _OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key | |
683 | + _OEM_3 = 0xC0, | |
684 | + | |
685 | + -- _OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key | |
686 | + _OEM_4 = 0xDB, | |
687 | + | |
688 | + -- _OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key | |
689 | + _OEM_5 = 0xDC, | |
690 | + | |
691 | + -- _OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key | |
692 | + _OEM_6 = 0xDD, | |
693 | + | |
694 | + -- _OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key | |
695 | + _OEM_7 = 0xDE, | |
696 | + | |
697 | + -- _OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard. | |
698 | + _OEM_8 = 0xDF, | |
699 | + | |
700 | + -- _OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard | |
701 | + _OEM_102 = 0xE2, | |
702 | + | |
703 | + -- _PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key | |
704 | + _PROCESSKEY = 0xE5, | |
705 | + | |
706 | + -- _PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The _PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP | |
707 | + _PACKET = 0xE7, | |
708 | + | |
709 | + -- _ATTN (F6) Attn key | |
710 | + _ATTN = 0xF6, | |
711 | + | |
712 | + -- _CRSEL (F7) CrSel key | |
713 | + _CRSEL = 0xF7, | |
714 | + | |
715 | + -- _EXSEL (F8) ExSel key | |
716 | + _EXSEL = 0xF8, | |
717 | + | |
718 | + -- _EREOF (F9) Erase EOF key | |
719 | + _EREOF = 0xF9, | |
720 | + | |
721 | + -- _PLAY (FA) Play key | |
722 | + _PLAY = 0xFA, | |
723 | + | |
724 | + -- _ZOOM (FB) Zoom key | |
725 | + _ZOOM = 0xFB, | |
726 | + | |
727 | + -- _NONAME (FC) Reserved for future use | |
728 | + _NONAME = 0xFC, | |
729 | + | |
730 | + -- _PA1 (FD) PA1 key | |
731 | + _PA1 = 0xFD, | |
732 | + | |
733 | + -- _OEM_CLEAR (FE) Clear key | |
734 | + _OEM_CLEAR = 0xFE, | |
735 | + | |
736 | + _UNKNOWN = 0, | |
737 | +} | |
\ No newline at end of file | ... | ... |
... | ... | @@ -273,8 +273,10 @@ void te4_web_init(lua_State *L) { |
273 | 273 | te4_web_initialize(); |
274 | 274 | |
275 | 275 | auxiliar_newclass(L, "web{view}", view_reg); |
276 | -// auxiliar_newclass(L, "web{downloader}", downloader_reg); | |
277 | 276 | luaL_openlib(L, "core.webview", weblib, 0); |
277 | + lua_pushstring(L, "kind"); | |
278 | + lua_pushstring(L, "cef3"); | |
279 | + lua_settable(L, -3); | |
278 | 280 | lua_settop(L, 0); |
279 | 281 | } |
280 | 282 | ... | ... |
-
Please register or login to post a comment