summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llkeyboardmacosx.cpp4
-rw-r--r--indra/llwindow/llopenglview-objc.mm7
-rw-r--r--indra/llwindow/llwindowmacosx-objc.h9
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm9
-rw-r--r--indra/llwindow/llwindowmacosx.cpp33
-rw-r--r--indra/llwindow/llwindowmacosx.h1
-rw-r--r--indra/newview/SecondLife.nibbin8146 -> 7403 bytes
-rw-r--r--indra/newview/SecondLife.xib119
8 files changed, 65 insertions, 117 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/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 735ef77cce..6ea523ea05 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -484,16 +484,19 @@
- (BOOL) becomeFirstResponder
{
- NSLog(@"Window gained focus!");
callFocus();
return true;
}
- (BOOL) resignFirstResponder
{
- NSLog(@"Window lost focus!");
callFocus();
return true;
}
+- (void) close
+{
+ callQuitHandler();
+}
+
@end
diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h
index 1724b85724..f3d6d2b1f1 100644
--- a/indra/llwindow/llwindowmacosx-objc.h
+++ b/indra/llwindow/llwindowmacosx-objc.h
@@ -79,6 +79,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);
@@ -97,6 +98,7 @@ void callMiddleMouseUp(float *pos, unsigned int mask);
void callFocus();
void callFocusLost();
void callModifier(unsigned int mask);
+void callQuitHandler();
#include <string>
void callHandleDragEntered(std::string url);
@@ -104,6 +106,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 9b57cd27cd..b859f236d4 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -337,7 +337,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 2faebe5dd9..34cc371526 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);
@@ -362,6 +367,34 @@ void callHandleDragDropped(std::string url)
gWindowImplementation->handleDragNDrop(url, LLWindowCallbacks::DNDA_DROPPED);
}
+void callQuitHandler()
+{
+ if(gWindowImplementation->getCallbacks()->handleCloseRequest(gWindowImplementation))
+ {
+ gWindowImplementation->getCallbacks()->handleQuit(gWindowImplementation);
+ }
+}
+
+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 0cffdb97dd..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 6ca49b81ef..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>
@@ -164,57 +164,6 @@
<string key="NSName">_NSAppleMenu</string>
</object>
</object>
- <object class="NSMenuItem" id="379814623">
- <reference key="NSMenu" ref="649796088"/>
- <string key="NSTitle">File</string>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="353210768"/>
- <reference key="NSMixedImage" ref="549394948"/>
- <string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="720053764">
- <string key="NSTitle">File</string>
- <array class="NSMutableArray" key="NSMenuItems">
- <object class="NSMenuItem" id="705341025">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">New</string>
- <string key="NSKeyEquiv">n</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="353210768"/>
- <reference key="NSMixedImage" ref="549394948"/>
- </object>
- <object class="NSMenuItem" id="722745758">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Open…</string>
- <string key="NSKeyEquiv">o</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="353210768"/>
- <reference key="NSMixedImage" ref="549394948"/>
- </object>
- <object class="NSMenuItem" id="425164168">
- <reference key="NSMenu" ref="720053764"/>
- <bool key="NSIsDisabled">YES</bool>
- <bool key="NSIsSeparator">YES</bool>
- <string key="NSTitle"/>
- <string key="NSKeyEquiv"/>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="353210768"/>
- <reference key="NSMixedImage" ref="549394948"/>
- </object>
- <object class="NSMenuItem" id="776162233">
- <reference key="NSMenu" ref="720053764"/>
- <string key="NSTitle">Close</string>
- <string key="NSKeyEquiv">w</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="353210768"/>
- <reference key="NSMixedImage" ref="549394948"/>
- </object>
- </array>
- </object>
- </object>
<object class="NSMenuItem" id="725688984">
<reference key="NSMenu" ref="649796088"/>
<string key="NSTitle">Edit</string>
@@ -369,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>
@@ -379,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, 1178}}</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>
@@ -436,14 +385,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">performClose:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="776162233"/>
- </object>
- <int key="connectionID">193</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
<string key="label">performZoom:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="575023229"/>
@@ -564,7 +505,6 @@
<reference ref="713487014"/>
<reference ref="694149608"/>
<reference ref="391199113"/>
- <reference ref="379814623"/>
<reference ref="725688984"/>
</array>
<reference key="parent" ref="0"/>
@@ -593,30 +533,6 @@
<reference key="parent" ref="649796088"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">83</int>
- <reference key="object" ref="379814623"/>
- <array class="NSMutableArray" key="children">
- <reference ref="720053764"/>
- </array>
- <reference key="parent" ref="649796088"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">81</int>
- <reference key="object" ref="720053764"/>
- <array class="NSMutableArray" key="children">
- <reference ref="722745758"/>
- <reference ref="705341025"/>
- <reference ref="776162233"/>
- <reference ref="425164168"/>
- </array>
- <reference key="parent" ref="379814623"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">73</int>
- <reference key="object" ref="776162233"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">57</int>
<reference key="object" ref="110575045"/>
<array class="NSMutableArray" key="children">
@@ -810,21 +726,6 @@
<reference key="object" ref="383018193"/>
<reference key="parent" ref="701759256"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">82</int>
- <reference key="object" ref="705341025"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">79</int>
- <reference key="object" ref="425164168"/>
- <reference key="parent" ref="720053764"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">72</int>
- <reference key="object" ref="722745758"/>
- <reference key="parent" ref="720053764"/>
- </object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -860,19 +761,13 @@
<string key="716.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="717.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="718.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="72.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="721.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="73.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="79.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="824.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="828.IBNSWindowAutoPositionCentersHorizontal"/>
<boolean value="YES" key="828.IBNSWindowAutoPositionCentersVertical"/>
<string key="828.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="828.NSWindowTemplate.visibleAtLaunch"/>
<string key="829.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="841.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="92.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
@@ -880,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">