aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native/macosx/NativeWindowProtocols.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-02-22 04:01:44 +0100
committerSven Gothel <[email protected]>2013-02-22 04:01:44 +0100
commitcbd8e33f1e19cf0c061c371af6930aba7c36b84f (patch)
tree1d544d245a80622c6a5c258c1ad9cb4ee3cdb95c /src/nativewindow/native/macosx/NativeWindowProtocols.h
parent405bc071d5d13e00d0561a485d31e3a7d61bf167 (diff)
Fix CALayer pos/size and animation.b01
- Fix CALayer animation: - All CALayer animations are set to nil via overriding 'actionForKey' - Fix CALayer pos/size bug: - Fix root and sub CALayer position to 0/0 and size on the main-thread w/o blocking. - If the sub CALayer implements the Objective-C NativeWindow protocol NWDedicatedSize (e.g. JOGL's MyNSOpenGLLayer), the dedicated size is passed to the layer, which propagates it appropriately. - On OSX/Java7 our root CALayer's frame position and size gets corrupted by its NSView, hence we have created the NWDedicatedSize protocol.
Diffstat (limited to 'src/nativewindow/native/macosx/NativeWindowProtocols.h')
-rw-r--r--src/nativewindow/native/macosx/NativeWindowProtocols.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/nativewindow/native/macosx/NativeWindowProtocols.h b/src/nativewindow/native/macosx/NativeWindowProtocols.h
new file mode 100644
index 000000000..b91a50dfd
--- /dev/null
+++ b/src/nativewindow/native/macosx/NativeWindowProtocols.h
@@ -0,0 +1,34 @@
+/**
+ * Copyright 2013 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+#import <Foundation/NSGeometry.h>
+
+@protocol NWDedicatedSize
+- (void)setDedicatedSize:(CGSize)size;
+@end
+