summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx-objc.h
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2015-12-22 17:59:01 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2015-12-22 17:59:01 +0200
commitb095e2c985680660d61a99e8dbac78d9113b9870 (patch)
tree171d31162fcb58f05c440de7ae383c7a88819a43 /indra/llwindow/llwindowmacosx-objc.h
parent49fa9b5515e708083c85aaa2b1b522bc266944c4 (diff)
parent60dfd55edaa5df0cb864dc5086037bc5625bc0be (diff)
Merge
Diffstat (limited to 'indra/llwindow/llwindowmacosx-objc.h')
-rwxr-xr-xindra/llwindow/llwindowmacosx-objc.h24
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);