From c8aa1fb7c8ed44886599ea4e04eed403392e2e34 Mon Sep 17 00:00:00 2001 From: Geenz Date: Mon, 17 Dec 2012 18:00:30 -0500 Subject: LLWindow: Move to using Cocoa for window and view creation along with setting up callbacks for event handling as such. --- indra/llwindow/llopenglview-objc.h | 72 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 indra/llwindow/llopenglview-objc.h (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h new file mode 100644 index 0000000000..8abe81ce9e --- /dev/null +++ b/indra/llwindow/llopenglview-objc.h @@ -0,0 +1,72 @@ +// +// LLOpenGLView.h +// SecondLife +// +// Created by Geenz on 10/2/12. +// +// + +#import +#include "llwindowmacosx-objc.h" + +// Some nasty shovelling of LLOpenGLView from LLNativeBindings to prevent any C++ <-> Obj-C interop oddities. +// Redraw callback handling removed (for now) due to being unneeded in the patch that preceeds this addition. + +@interface LLOpenGLView : NSOpenGLView +{ + NSPoint mousePos; + ResizeCallback mResizeCallback; +} + +- (id) initWithFrame:(NSRect)frame withSamples:(NSUInteger)samples andVsync:(BOOL)vsync; + +// rebuildContext +// Destroys and recreates a context with the view's internal format set via setPixelFormat; +// Use this in event of needing to rebuild a context for whatever reason, without needing to assign a new pixel format. +- (BOOL) rebuildContext; + +// rebuildContextWithFormat +// Destroys and recreates a context with the specified pixel format. +- (BOOL) rebuildContextWithFormat:(NSOpenGLPixelFormat *)format; + +// These are mostly just for C++ <-> Obj-C interop. We can manipulate the CGLContext from C++ without reprecussions. +- (CGLContextObj) getCGLContextObj; +- (CGLPixelFormatObj*)getCGLPixelFormatObj; + +- (void) registerResizeCallback:(ResizeCallback)callback; +@end + +@interface LLNSWindow : NSWindow { + float mMousePos[2]; + unsigned int mModifiers; + + KeyCallback mKeyDownCallback; + KeyCallback mKeyUpCallback; + UnicodeCallback mUnicodeCallback; + ModifierCallback mModifierCallback; + MouseCallback mMouseDownCallback; + MouseCallback mMouseUpCallback; + MouseCallback mMouseDoubleClickCallback; + MouseCallback mRightMouseDownCallback; + MouseCallback mRightMouseUpCallback; + MouseCallback mMouseMovedCallback; + ScrollWheelCallback mScrollWhellCallback; + VoidCallback mMouseExitCallback; + MouseCallback mDeltaUpdateCallback; +} + +- (void) registerKeyDownCallback:(KeyCallback)callback; +- (void) registerKeyUpCallback:(KeyCallback)callback; +- (void) registerUnicodeCallback:(UnicodeCallback)callback; +- (void) registerModifierCallback:(ModifierCallback)callback; +- (void) registerMouseDownCallback:(MouseCallback)callback; +- (void) registerMouseUpCallback:(MouseCallback)callback; +- (void) registerRightMouseDownCallback:(MouseCallback)callback; +- (void) registerRightMouseUpCallback:(MouseCallback)callback; +- (void) registerDoubleClickCallback:(MouseCallback)callback; +- (void) registerMouseMovedCallback:(MouseCallback)callback; +- (void) registerScrollCallback:(ScrollWheelCallback)callback; +- (void) registerMouseExitCallback:(VoidCallback)callback; +- (void) registerDeltaUpdateCallback:(MouseCallback)callback; + +@end \ No newline at end of file -- cgit v1.2.3 From bd152c1fb75c4a8d4b9271896c44243ca8759e58 Mon Sep 17 00:00:00 2001 From: Geenz Date: Sat, 29 Dec 2012 06:59:43 -0500 Subject: Huge amount of refactoring to use Cocoa here: - Updated to .xib format. To produce a new nib (which is required after changing the xib file), use "ibtool SecondLife.xib --compile SecondLife.nib" within the newview directory. - xib file now defines the viewer's window. VIews are still being pragmatically added to the main window. This may change in the future. - LLAppViewer's main loop has been slightly refactored to be executed on a timer for OS X. This probably needs a bit more work. - Event handling still needs more work to work within a timer based event loop. It works fairly sporadically at the moment, as if events are being dropped between timer executions, at least for the mouse. - Carbon has been purged from the viewer's startup, and from LLWindow entirely. There's likely still a few odds and ends fragmented throughout the viewer and its dependencies. Need to track these down. - LLAppViewerMacOSX now uses NSApplicationMain, and also implements the NSApplicationDelegate protocol in LLAppDelegate. - Fullscreen support has been implemented for OS X 10.7+ This is still a work in progress, however at this stage everything needed for a functional viewer is (mostly) complete. From here, it's mostly just bug hunting and fixing. --- indra/llwindow/llopenglview-objc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 8abe81ce9e..6b055bc665 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -69,4 +69,9 @@ - (void) registerMouseExitCallback:(VoidCallback)callback; - (void) registerDeltaUpdateCallback:(MouseCallback)callback; -@end \ No newline at end of file +@end + +void setLLNSWindowRef(LLNSWindow* window); +void setLLOpenGLViewRef(LLOpenGLView* view); +LLNSWindow* winRef; +LLOpenGLView* glviewRef; -- cgit v1.2.3 From ddb48d51d996b18063b111faa3b7e709160074d9 Mon Sep 17 00:00:00 2001 From: Geenz Date: Tue, 1 Jan 2013 11:32:53 -0500 Subject: More things in this commit: - Removed the callback system in favor of simply defining functions in a header to later be implemented in whichever file is most convenient for what we want to do (i.e., calling LLWindow callbacks within LLWindowMacOSX, setting cursors in llwindowmacosx-objc.mm, etc.) - Viewer shutdown now works appropriately - Added a bit of debugging code to test if a key has been handled by the UI or not (useful for tracking down the mystery of the enter key not being handled) - Setup a cocoa quit handler within the application delegate that intercepts any termination requests --- indra/llwindow/llopenglview-objc.h | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 6b055bc665..20589e321d 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -15,7 +15,6 @@ @interface LLOpenGLView : NSOpenGLView { NSPoint mousePos; - ResizeCallback mResizeCallback; } - (id) initWithFrame:(NSRect)frame withSamples:(NSUInteger)samples andVsync:(BOOL)vsync; @@ -33,42 +32,13 @@ - (CGLContextObj) getCGLContextObj; - (CGLPixelFormatObj*)getCGLPixelFormatObj; -- (void) registerResizeCallback:(ResizeCallback)callback; @end @interface LLNSWindow : NSWindow { float mMousePos[2]; unsigned int mModifiers; - - KeyCallback mKeyDownCallback; - KeyCallback mKeyUpCallback; - UnicodeCallback mUnicodeCallback; - ModifierCallback mModifierCallback; - MouseCallback mMouseDownCallback; - MouseCallback mMouseUpCallback; - MouseCallback mMouseDoubleClickCallback; - MouseCallback mRightMouseDownCallback; - MouseCallback mRightMouseUpCallback; - MouseCallback mMouseMovedCallback; - ScrollWheelCallback mScrollWhellCallback; - VoidCallback mMouseExitCallback; - MouseCallback mDeltaUpdateCallback; } -- (void) registerKeyDownCallback:(KeyCallback)callback; -- (void) registerKeyUpCallback:(KeyCallback)callback; -- (void) registerUnicodeCallback:(UnicodeCallback)callback; -- (void) registerModifierCallback:(ModifierCallback)callback; -- (void) registerMouseDownCallback:(MouseCallback)callback; -- (void) registerMouseUpCallback:(MouseCallback)callback; -- (void) registerRightMouseDownCallback:(MouseCallback)callback; -- (void) registerRightMouseUpCallback:(MouseCallback)callback; -- (void) registerDoubleClickCallback:(MouseCallback)callback; -- (void) registerMouseMovedCallback:(MouseCallback)callback; -- (void) registerScrollCallback:(ScrollWheelCallback)callback; -- (void) registerMouseExitCallback:(VoidCallback)callback; -- (void) registerDeltaUpdateCallback:(MouseCallback)callback; - @end void setLLNSWindowRef(LLNSWindow* window); -- cgit v1.2.3 From 09b07e3619a71f142c1a3af41244d756e1230142 Mon Sep 17 00:00:00 2001 From: Geenz Date: Tue, 8 Jan 2013 16:22:54 -0500 Subject: Big change set: - LLAppDelegate header relocated to LLWindow. Definition is still present in secondlife-bin (for compatibility reasons when loading a nib). - Return key handling fixed. - Command key now acts the same as the control key by issuing control character codes when the command key is pressed. - We now retrieve the window pointer directly from the app delegate in LLWindow. --- indra/llwindow/llopenglview-objc.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 20589e321d..8412621392 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -40,8 +40,3 @@ } @end - -void setLLNSWindowRef(LLNSWindow* window); -void setLLOpenGLViewRef(LLOpenGLView* view); -LLNSWindow* winRef; -LLOpenGLView* glviewRef; -- cgit v1.2.3 From 29e747c4f17818816c502a3aa653b828e689be4a Mon Sep 17 00:00:00 2001 From: Geenz Date: Tue, 22 Jan 2013 15:37:01 -0500 Subject: And thus, the demonic mouse position conversions from view space to screen space were tamed. --- indra/llwindow/llopenglview-objc.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 8412621392..dd2f35aafc 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -39,4 +39,26 @@ unsigned int mModifiers; } +- (NSPoint)convertToScreenFromLocalPoint:(NSPoint)point relativeToView:(NSView *)view; +- (NSPoint)flipPoint:(NSPoint)aPoint; + +@end + +@interface NSScreen (PointConversion) + +/* + Returns the screen where the mouse resides + */ ++ (NSScreen *)currentScreenForMouseLocation; + +/* + Allows you to convert a point from global coordinates to the current screen coordinates. + */ +- (NSPoint)convertPointToScreenCoordinates:(NSPoint)aPoint; + +/* + Allows to flip the point coordinates, so y is 0 at the top instead of the bottom. x remains the same + */ +- (NSPoint)flipPoint:(NSPoint)aPoint; + @end -- cgit v1.2.3 From 461ab912a58b67579fffdf70ec7e38d682927185 Mon Sep 17 00:00:00 2001 From: Geenz Date: Tue, 22 Jan 2013 19:59:49 -0500 Subject: Initial Cocoa drag and drop support. --- indra/llwindow/llopenglview-objc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index dd2f35aafc..1592e6e01d 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -15,6 +15,7 @@ @interface LLOpenGLView : NSOpenGLView { NSPoint mousePos; + std::string mLastDraggedUrl; } - (id) initWithFrame:(NSRect)frame withSamples:(NSUInteger)samples andVsync:(BOOL)vsync; -- cgit v1.2.3 From c52e6f9c597c67637045134d808a9039f85efc5c Mon Sep 17 00:00:00 2001 From: Geenz Date: Wed, 23 Jan 2013 09:29:32 -0500 Subject: Refactor the key input handling to make it easier to filter out keys we don't need unicode characters for (such as the arrow keys). --- indra/llwindow/llopenglview-objc.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 1592e6e01d..cc1618b3bc 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -14,7 +14,6 @@ @interface LLOpenGLView : NSOpenGLView { - NSPoint mousePos; std::string mLastDraggedUrl; } -- cgit v1.2.3 From e19db5668853b7d3be2ed6af289a3c35bd213bca Mon Sep 17 00:00:00 2001 From: Geenz Date: Mon, 25 Feb 2013 15:35:21 -0500 Subject: Fix for antialiasing and VSync not being enabled properly. --- indra/llwindow/llopenglview-objc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index cc1618b3bc..b344bed2ef 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -16,7 +16,8 @@ { std::string mLastDraggedUrl; } - +- (id) initWithSamples:(NSUInteger)samples; +- (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync; - (id) initWithFrame:(NSRect)frame withSamples:(NSUInteger)samples andVsync:(BOOL)vsync; // rebuildContext -- cgit v1.2.3 From f5516e0fc0e6c22b25f9dca2b9b24ebd7618332a Mon Sep 17 00:00:00 2001 From: "Graham Madarasz (Graham Linden)" Date: Wed, 27 Feb 2013 06:46:53 -0800 Subject: For MAINT-2404 Fixes detection of VRAM on OSX removed along with other AGL code. Code Review: callum --- indra/llwindow/llopenglview-objc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index b344bed2ef..c3ae34ea50 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -7,6 +7,9 @@ // #import +#import +#import +#import #include "llwindowmacosx-objc.h" // Some nasty shovelling of LLOpenGLView from LLNativeBindings to prevent any C++ <-> Obj-C interop oddities. @@ -33,6 +36,8 @@ - (CGLContextObj) getCGLContextObj; - (CGLPixelFormatObj*)getCGLPixelFormatObj; +- (unsigned long) getVramSize; + @end @interface LLNSWindow : NSWindow { -- cgit v1.2.3 From ad26f3c39002b6043e5fc4e00f9793e0f0e4941c Mon Sep 17 00:00:00 2001 From: Geenz Date: Tue, 19 Mar 2013 05:50:50 -0400 Subject: IME support (and revamped text input support) semi-working. --- indra/llwindow/llopenglview-objc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index c3ae34ea50..c144831da4 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -15,9 +15,10 @@ // Some nasty shovelling of LLOpenGLView from LLNativeBindings to prevent any C++ <-> Obj-C interop oddities. // Redraw callback handling removed (for now) due to being unneeded in the patch that preceeds this addition. -@interface LLOpenGLView : NSOpenGLView +@interface LLOpenGLView : NSOpenGLView { std::string mLastDraggedUrl; + unsigned int mModifiers; } - (id) initWithSamples:(NSUInteger)samples; - (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync; -- cgit v1.2.3 From ebe320e7c3579241e2e034a424ade9f087523b75 Mon Sep 17 00:00:00 2001 From: Geenz Date: Tue, 19 Mar 2013 06:32:56 -0400 Subject: Refactored LLNSWindow and LLOpenGLView significantly. All input goes through LLOpenGLView now. --- indra/llwindow/llopenglview-objc.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index c144831da4..5134063193 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -19,6 +19,7 @@ { std::string mLastDraggedUrl; unsigned int mModifiers; + float mMousePos[2]; } - (id) initWithSamples:(NSUInteger)samples; - (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync; @@ -41,10 +42,7 @@ @end -@interface LLNSWindow : NSWindow { - float mMousePos[2]; - unsigned int mModifiers; -} +@interface LLNSWindow : NSWindow - (NSPoint)convertToScreenFromLocalPoint:(NSPoint)point relativeToView:(NSView *)view; - (NSPoint)flipPoint:(NSPoint)aPoint; -- cgit v1.2.3 From 258b77b64777a5ce5fef0ef066aa52b34b43ba65 Mon Sep 17 00:00:00 2001 From: Geenz Date: Mon, 25 Mar 2013 05:26:55 -0400 Subject: Additional IME support. LLPreeditor is largely good to go at this point, but there's still some work to do in getSegments. --- indra/llwindow/llopenglview-objc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 5134063193..8140421e44 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -20,6 +20,8 @@ std::string mLastDraggedUrl; unsigned int mModifiers; float mMousePos[2]; + bool mHasMarkedText; + unsigned int mMarkedTextLength; } - (id) initWithSamples:(NSUInteger)samples; - (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync; @@ -40,6 +42,8 @@ - (unsigned long) getVramSize; +- (segment_t) getSegments:(NSAttributedString*)str; + @end @interface LLNSWindow : NSWindow -- cgit v1.2.3 From 80a79e5d7b4f37f862b312e848b1d1e7f85b0fa9 Mon Sep 17 00:00:00 2001 From: Geenz Date: Wed, 27 Mar 2013 08:49:45 -0400 Subject: IME support is pretty much finished at this point. --- indra/llwindow/llopenglview-objc.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 8140421e44..5f972b1a98 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -10,7 +10,7 @@ #import #import #import -#include "llwindowmacosx-objc.h" +#include // Some nasty shovelling of LLOpenGLView from LLNativeBindings to prevent any C++ <-> Obj-C interop oddities. // Redraw callback handling removed (for now) due to being unneeded in the patch that preceeds this addition. @@ -42,8 +42,6 @@ - (unsigned long) getVramSize; -- (segment_t) getSegments:(NSAttributedString*)str; - @end @interface LLNSWindow : NSWindow -- cgit v1.2.3 From 2656b1f405dcf3b67d644bf47b02a64886ef2ca4 Mon Sep 17 00:00:00 2001 From: Geenz Date: Mon, 1 Apr 2013 08:15:12 -0400 Subject: First pass at adding a viable replacement for TSM's old UseInputWindow method (which is now deprecated with seemingly no Cocoa replacement). --- indra/llwindow/llopenglview-objc.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 5f972b1a98..6b21148bb6 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -12,9 +12,6 @@ #import #include -// Some nasty shovelling of LLOpenGLView from LLNativeBindings to prevent any C++ <-> Obj-C interop oddities. -// Redraw callback handling removed (for now) due to being unneeded in the patch that preceeds this addition. - @interface LLOpenGLView : NSOpenGLView { std::string mLastDraggedUrl; @@ -44,6 +41,15 @@ @end +@interface LLNonInlineTextView : NSTextView +{ + LLOpenGLView *glview; +} + +- (void) setGLView:(LLOpenGLView*)view; + +@end + @interface LLNSWindow : NSWindow - (NSPoint)convertToScreenFromLocalPoint:(NSPoint)point relativeToView:(NSView *)view; -- cgit v1.2.3 From aa0cb35db561004c205c7aac2570407ae88ad472 Mon Sep 17 00:00:00 2001 From: Geenz Date: Sun, 7 Apr 2013 11:33:39 -0400 Subject: Support the committing of the current pre edit string when language input is interrupted per the viewer's original pre edit functionality. --- indra/llwindow/llopenglview-objc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 6b21148bb6..6d0f138950 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -19,11 +19,14 @@ float mMousePos[2]; bool mHasMarkedText; unsigned int mMarkedTextLength; + NSAttributedString *mMarkedText; } - (id) initWithSamples:(NSUInteger)samples; - (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync; - (id) initWithFrame:(NSRect)frame withSamples:(NSUInteger)samples andVsync:(BOOL)vsync; +- (void)commitCurrentPreedit; + // rebuildContext // Destroys and recreates a context with the view's internal format set via setPixelFormat; // Use this in event of needing to rebuild a context for whatever reason, without needing to assign a new pixel format. -- cgit v1.2.3 From cda10266ae91e28f2ac60b8472d6b8592f877d65 Mon Sep 17 00:00:00 2001 From: Geenz Date: Thu, 23 May 2013 08:50:05 -0400 Subject: Only show the input window when we attempt to add marked text, *and* we can't submit marked text directly to the viewer. --- indra/llwindow/llopenglview-objc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 6d0f138950..e20ea533fb 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -20,6 +20,7 @@ bool mHasMarkedText; unsigned int mMarkedTextLength; NSAttributedString *mMarkedText; + bool mMarkedTextAllowed; } - (id) initWithSamples:(NSUInteger)samples; - (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync; @@ -42,6 +43,8 @@ - (unsigned long) getVramSize; +- (void) allowMarkedTextInput:(bool)allowed; + @end @interface LLNonInlineTextView : NSTextView -- cgit v1.2.3 From 7decac40e6453b2d8822d2677b9b59300bc260cf Mon Sep 17 00:00:00 2001 From: Geenz Date: Thu, 23 May 2013 09:39:49 -0400 Subject: Override NSPanel's close method to hide the window instead of actually removing the window. --- indra/llwindow/llopenglview-objc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index e20ea533fb..5309dea664 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -47,6 +47,10 @@ @end +@interface LLUserInputWindow : NSPanel + +@end + @interface LLNonInlineTextView : NSTextView { LLOpenGLView *glview; -- cgit v1.2.3 From 440a1ee3bae4ea9553fa57d806f942a472923190 Mon Sep 17 00:00:00 2001 From: Geenz Date: Mon, 17 Jun 2013 09:26:11 -0400 Subject: Move logic involving the input window to keyDown. Pass input events to the input window from there. --- indra/llwindow/llopenglview-objc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 5309dea664..d4207d598a 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -6,6 +6,9 @@ // // +#ifndef LLOpenGLView_H +#define LLOpenGLView_H + #import #import #import @@ -85,3 +88,5 @@ - (NSPoint)flipPoint:(NSPoint)aPoint; @end + +#endif \ No newline at end of file -- cgit v1.2.3 From 2837ca7a474f92bb363a2a31d184431b636d2809 Mon Sep 17 00:00:00 2001 From: Geenz Date: Mon, 17 Jun 2013 17:08:48 -0400 Subject: This seems to be on par with viewer-release at this point. --- indra/llwindow/llopenglview-objc.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index d4207d598a..b783c41c0b 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -22,7 +22,6 @@ float mMousePos[2]; bool mHasMarkedText; unsigned int mMarkedTextLength; - NSAttributedString *mMarkedText; bool mMarkedTextAllowed; } - (id) initWithSamples:(NSUInteger)samples; -- cgit v1.2.3 From 623077e6a4eef516d445975eaa71d5f67e6767c5 Mon Sep 17 00:00:00 2001 From: Geenz Date: Thu, 27 Jun 2013 15:06:03 -0400 Subject: Added license headers. --- indra/llwindow/llopenglview-objc.h | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index b783c41c0b..f895aae577 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -1,10 +1,28 @@ -// -// LLOpenGLView.h -// SecondLife -// -// Created by Geenz on 10/2/12. -// -// +/** + * @file llopenglview-objc.h + * @brief Class interfaces for most of the Mac facing window functionality. + * + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ #ifndef LLOpenGLView_H #define LLOpenGLView_H -- cgit v1.2.3 From 72bb473c9ed106cce6baf22ac74a13443d4630e8 Mon Sep 17 00:00:00 2001 From: Geenz Date: Thu, 11 Jul 2013 18:59:28 -0400 Subject: Ensure that the correct method is called when we're simulating a right click. --- indra/llwindow/llopenglview-objc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index f895aae577..71149f8561 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -41,6 +41,7 @@ bool mHasMarkedText; unsigned int mMarkedTextLength; bool mMarkedTextAllowed; + bool mSimulatedRightClick; } - (id) initWithSamples:(NSUInteger)samples; - (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync; -- cgit v1.2.3 From efba897e45b5065619bbe0e1451a40b6391e503c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 5 Aug 2013 15:38:43 -0400 Subject: correct coding standards problems --- indra/llwindow/llopenglview-objc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.h') diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h index 71149f8561..41837b1eb4 100644 --- a/indra/llwindow/llopenglview-objc.h +++ b/indra/llwindow/llopenglview-objc.h @@ -107,4 +107,4 @@ @end -#endif \ No newline at end of file +#endif -- cgit v1.2.3