summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llkeyboardmacosx.cpp4
-rw-r--r--indra/llwindow/llwindowmacosx-objc.h8
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm9
-rw-r--r--indra/llwindow/llwindowmacosx.cpp25
-rw-r--r--indra/llwindow/llwindowmacosx.h1
-rw-r--r--indra/newview/SecondLife.nibbin7403 -> 7403 bytes
-rw-r--r--indra/newview/SecondLife.xib14
7 files changed, 51 insertions, 10 deletions
diff --git a/indra/llwindow/llkeyboardmacosx.cpp b/indra/llwindow/llkeyboardmacosx.cpp
index d4c8214461..274e92c225 100644
--- a/indra/llwindow/llkeyboardmacosx.cpp
+++ b/indra/llwindow/llkeyboardmacosx.cpp
@@ -213,7 +213,7 @@ MASK LLKeyboardMacOSX::updateModifiers(const U32 mask)
out_mask |= MASK_SHIFT;
}
- if(mask & MAC_CTRL_KEY || mask & MAC_CMD_KEY)
+ if(mask & (MAC_CTRL_KEY | MAC_CMD_KEY))
{
out_mask |= MASK_CONTROL;
}
@@ -267,7 +267,7 @@ MASK LLKeyboardMacOSX::currentMask(BOOL for_mouse_event)
if (mask & MAC_SHIFT_KEY) result |= MASK_SHIFT;
if (mask & MAC_CTRL_KEY) result |= MASK_CONTROL;
- if (mask & MAC_ALT_KEY) result |= MASK_ALT;
+ if (mask & MAC_ALT_KEY) result |= MASK_ALT;
// For keyboard events, consider Command equivalent to Control
if (!for_mouse_event)
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h
index 6793666927..62c5b8298f 100644
--- a/indra/llwindow/llwindowmacosx-objc.h
+++ b/indra/llwindow/llwindowmacosx-objc.h
@@ -78,6 +78,7 @@ void removeGLView(GLViewRef view);
// 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)
void callKeyUp(unsigned short key, unsigned int mask);
void callKeyDown(unsigned short key, unsigned int mask);
+void callResetKeys();
void callUnicodeCallback(wchar_t character, unsigned int mask);
void callRightMouseDown(float *pos, unsigned int mask);
void callRightMouseUp(float *pos, unsigned int mask);
@@ -104,6 +105,13 @@ void callHandleDragExited(std::string url);
void callHandleDragUpdated(std::string url);
void callHandleDragDropped(std::string url);
+// LLPreeditor C bindings.
+std::basic_string<wchar_t> getPreeditString();
+void getPreeditSelectionRange(int *position, int *length);
+void getPreeditMarkedRange(int *position, int *length);
+void handleUnicodeCharacter(wchar_t c);
+void updatePreeditor(unsigned short *str);
+
NSWindowRef getMainAppWindow();
GLViewRef getGLView();
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index b288671219..e4e12f4b5c 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -332,7 +332,14 @@ NSWindowRef getMainAppWindow()
return winRef;
}
-unsigned int getModifiers()
+/*
+GLViewRef getGLView()
{
+ return [(LLAppDelegate*)[[NSApplication sharedApplication] delegate] glview];
+}
+*/
+
+unsigned int getModifiers()
+{
return [NSEvent modifierFlags];
}
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 24f73c5631..2f6c2101ef 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -211,6 +211,11 @@ void callKeyDown(unsigned short key, unsigned int mask)
gKeyboard->handleKeyDown(key, mask);
}
+void callResetKeys()
+{
+ gKeyboard->resetKeys();
+}
+
void callUnicodeCallback(wchar_t character, unsigned int mask)
{
gWindowImplementation->getCallbacks()->handleUnicodeChar(character, mask);
@@ -370,6 +375,26 @@ void callQuitHandler()
}
}
+std::basic_string<wchar_t> getPreeditString()
+{
+ return gWindowImplementation->getPreeditor()->getPreeditString();
+}
+
+void getPreeditSelectionRange(int *position, int *length)
+{
+ gWindowImplementation->getPreeditor()->getSelectionRange(position, length);
+}
+
+void getPreeditMarkedRange(int *position, int *length)
+{
+ gWindowImplementation->getPreeditor()->getPreeditRange(position, length);
+}
+
+void handleUnicodeCharacter(wchar_t c)
+{
+ gWindowImplementation->getPreeditor()->handleUnicodeCharHere(c);
+}
+
void LLWindowMacOSX::updateMouseDeltas(float* deltas)
{
if (mCursorDecoupled)
diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h
index 14d6e70fb3..de0340cf74 100644
--- a/indra/llwindow/llwindowmacosx.h
+++ b/indra/llwindow/llwindowmacosx.h
@@ -120,6 +120,7 @@ public:
void* getWindow() { return mWindow; }
LLWindowCallbacks* getCallbacks() { return mCallbacks; }
+ LLPreeditor* getPreeditor() { return mPreeditor; }
void updateMouseDeltas(float* deltas);
void getMouseDeltas(float* delta);
diff --git a/indra/newview/SecondLife.nib b/indra/newview/SecondLife.nib
index 09173cd26f..ff218a21c8 100644
--- a/indra/newview/SecondLife.nib
+++ b/indra/newview/SecondLife.nib
Binary files differ
diff --git a/indra/newview/SecondLife.xib b/indra/newview/SecondLife.xib
index cb91eeaea2..86e8d81ebc 100644
--- a/indra/newview/SecondLife.xib
+++ b/indra/newview/SecondLife.xib
@@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1060</int>
- <string key="IBDocument.SystemVersion">12C60</string>
+ <string key="IBDocument.SystemVersion">12D76</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
- <string key="IBDocument.AppKitVersion">1187.34</string>
- <string key="IBDocument.HIToolboxVersion">625.00</string>
+ <string key="IBDocument.AppKitVersion">1187.37</string>
+ <string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">3084</string>
@@ -318,7 +318,7 @@
<object class="NSWindowTemplate" id="110292814">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{196, 240}, {1024, 768}}</string>
+ <string key="NSWindowRect">{{196, 240}, {1024, 600}}</string>
<int key="NSWTFlags">74974208</int>
<string key="NSWindowTitle">Second Life</string>
<string key="NSWindowClass">LLNSWindow</string>
@@ -328,13 +328,13 @@
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews"/>
- <string key="NSFrameSize">{1024, 768}</string>
+ <string key="NSFrameSize">{1024, 600}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:20</string>
</object>
- <string key="NSScreenRect">{{0, 0}, {1920, 1200}}</string>
+ <string key="NSScreenRect">{{0, 0}, {2560, 1440}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<string key="NSFrameAutosaveName">Second Life</string>
<int key="NSWindowCollectionBehavior">128</int>
@@ -775,7 +775,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">864</int>
+ <int key="maxID">888</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">