diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-12-18 13:55:41 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-12-18 13:55:41 -0500 |
commit | 3f81bb15b32cfa9db2a1a3cbcf0eb976b7751368 (patch) | |
tree | d534594be435e7cc1a5ca5c14b8b146ed47bb2e2 /indra/llwindow/llwindowmacosx-objc.h | |
parent | 99f4b27020c101591de5c1cbe53185c610e48caa (diff) | |
parent | 7b993d15b70d419dc0a7c8d92286d34a2635537d (diff) |
merge
Diffstat (limited to 'indra/llwindow/llwindowmacosx-objc.h')
-rwxr-xr-x | indra/llwindow/llwindowmacosx-objc.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index e6e8f27f53..dc184b91fb 100755 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -46,6 +46,26 @@ typedef void *CursorRef; typedef void *NSWindowRef; typedef void *GLViewRef; + +struct NativeKeyEventData { + enum EventType { + KEYUNKNOWN, + KEYUP, + KEYDOWN, + KEYCHAR + }; + + EventType mKeyEvent; + uint32_t mEventType; + uint32_t mEventModifiers; + uint32_t mEventKeyCode; + uint32_t mEventChars; + uint32_t mEventUnmodChars; + bool mEventRepeat; +}; + +typedef const NativeKeyEventData * NSKeyEventRef; + // These are defined in llappviewermacosx.cpp. bool initViewer(); void handleQuit(); @@ -102,8 +122,8 @@ void setupInputWindow(NSWindowRef window, GLViewRef view); // These are all implemented in llwindowmacosx.cpp. // This is largely for easier interop between Obj-C and C++ (at least in the viewer's case due to the BOOL vs. BOOL conflict) -bool callKeyUp(unsigned short key, unsigned int mask); -bool callKeyDown(unsigned short key, unsigned int mask); +bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask); +bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask); void callResetKeys(); bool callUnicodeCallback(wchar_t character, unsigned int mask); void callRightMouseDown(float *pos, unsigned int mask); |