diff options
Diffstat (limited to 'src/libui_sdl/libui/windows')
-rw-r--r-- | src/libui_sdl/libui/windows/areaevents.cpp | 14 | ||||
-rw-r--r-- | src/libui_sdl/libui/windows/box.cpp | 1 | ||||
-rw-r--r-- | src/libui_sdl/libui/windows/form.cpp | 1 | ||||
-rw-r--r-- | src/libui_sdl/libui/windows/grid.cpp | 1 | ||||
-rw-r--r-- | src/libui_sdl/libui/windows/group.cpp | 1 | ||||
-rw-r--r-- | src/libui_sdl/libui/windows/tab.cpp | 1 | ||||
-rw-r--r-- | src/libui_sdl/libui/windows/window.cpp | 1 |
7 files changed, 20 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/windows/areaevents.cpp b/src/libui_sdl/libui/windows/areaevents.cpp index 7d391b8..842f2d7 100644 --- a/src/libui_sdl/libui/windows/areaevents.cpp +++ b/src/libui_sdl/libui/windows/areaevents.cpp @@ -262,8 +262,14 @@ static int areaKeyEvent(uiArea *a, int up, WPARAM wParam, LPARAM lParam) ke.Modifiers = getModifiers(); + ke.Scancode = (lParam >> 16) & 0x1FF; + ke.Up = up; + ke.Repeat = (lParam & 0x40000000) ? 1:0; + // StapleButter note: I don't actually need all this key decoding + // raw scancodes are all I need for this +#if 0 // the numeric keypad keys when Num Lock is off are considered left-hand keys as the separate navigation buttons were added later // the numeric keypad Enter, however, is a right-hand key because it has the same virtual-key code as the typewriter Enter righthand = (lParam & 0x01000000) != 0; @@ -306,9 +312,17 @@ static int areaKeyEvent(uiArea *a, int up, WPARAM wParam, LPARAM lParam) return 0; keyFound: +#endif return (*(a->ah->KeyEvent))(a->ah, a, &ke); } +char* uiKeyName(int scancode) +{ + WCHAR tmp[64]; + GetKeyNameText(scancode<<16, tmp, 64); + return toUTF8(tmp); +} + // We don't handle the standard Windows keyboard messages directly, to avoid both the dialog manager and TranslateMessage(). // Instead, we set up a message filter and do things there. // That stuff is later in this file. diff --git a/src/libui_sdl/libui/windows/box.cpp b/src/libui_sdl/libui/windows/box.cpp index 9567954..c306989 100644 --- a/src/libui_sdl/libui/windows/box.cpp +++ b/src/libui_sdl/libui/windows/box.cpp @@ -143,6 +143,7 @@ uiWindowsControlDefaultHide(uiBox) uiWindowsControlDefaultEnabled(uiBox) uiWindowsControlDefaultEnable(uiBox) uiWindowsControlDefaultDisable(uiBox) +uiWindowsControlDefaultSetFocus(uiBox) static void uiBoxSyncEnableState(uiWindowsControl *c, int enabled) { diff --git a/src/libui_sdl/libui/windows/form.cpp b/src/libui_sdl/libui/windows/form.cpp index febcc69..83ed587 100644 --- a/src/libui_sdl/libui/windows/form.cpp +++ b/src/libui_sdl/libui/windows/form.cpp @@ -147,6 +147,7 @@ uiWindowsControlDefaultHide(uiForm) uiWindowsControlDefaultEnabled(uiForm) uiWindowsControlDefaultEnable(uiForm) uiWindowsControlDefaultDisable(uiForm) +uiWindowsControlDefaultSetFocus(uiForm) static void uiFormSyncEnableState(uiWindowsControl *c, int enabled) { diff --git a/src/libui_sdl/libui/windows/grid.cpp b/src/libui_sdl/libui/windows/grid.cpp index c63cd1e..78719ac 100644 --- a/src/libui_sdl/libui/windows/grid.cpp +++ b/src/libui_sdl/libui/windows/grid.cpp @@ -436,6 +436,7 @@ uiWindowsControlDefaultHide(uiGrid) uiWindowsControlDefaultEnabled(uiGrid) uiWindowsControlDefaultEnable(uiGrid) uiWindowsControlDefaultDisable(uiGrid) +uiWindowsControlDefaultSetFocus(uiGrid) static void uiGridSyncEnableState(uiWindowsControl *c, int enabled) { diff --git a/src/libui_sdl/libui/windows/group.cpp b/src/libui_sdl/libui/windows/group.cpp index 8824c5a..f78e7de 100644 --- a/src/libui_sdl/libui/windows/group.cpp +++ b/src/libui_sdl/libui/windows/group.cpp @@ -75,6 +75,7 @@ uiWindowsControlDefaultHide(uiGroup) uiWindowsControlDefaultEnabled(uiGroup) uiWindowsControlDefaultEnable(uiGroup) uiWindowsControlDefaultDisable(uiGroup) +uiWindowsControlDefaultSetFocus(uiGroup) static void uiGroupSyncEnableState(uiWindowsControl *c, int enabled) { diff --git a/src/libui_sdl/libui/windows/tab.cpp b/src/libui_sdl/libui/windows/tab.cpp index 365f5a1..ea6209b 100644 --- a/src/libui_sdl/libui/windows/tab.cpp +++ b/src/libui_sdl/libui/windows/tab.cpp @@ -112,6 +112,7 @@ uiWindowsControlDefaultHide(uiTab) uiWindowsControlDefaultEnabled(uiTab) uiWindowsControlDefaultEnable(uiTab) uiWindowsControlDefaultDisable(uiTab) +uiWindowsControlDefaultSetFocus(uiTab) static void uiTabSyncEnableState(uiWindowsControl *c, int enabled) { diff --git a/src/libui_sdl/libui/windows/window.cpp b/src/libui_sdl/libui/windows/window.cpp index 9cf13a2..c04410d 100644 --- a/src/libui_sdl/libui/windows/window.cpp +++ b/src/libui_sdl/libui/windows/window.cpp @@ -229,6 +229,7 @@ static void uiWindowHide(uiControl *c) uiWindowsControlDefaultEnabled(uiWindow) uiWindowsControlDefaultEnable(uiWindow) uiWindowsControlDefaultDisable(uiWindow) +uiWindowsControlDefaultSetFocus(uiWindow) // TODO we need to do something about undocumented fields in the OS control types uiWindowsControlDefaultSyncEnableState(uiWindow) // TODO |