From 95270c877df70fb5b5a6519534f98d7951382092 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Mon, 23 Dec 2013 21:42:16 +0100 Subject: [PATCH] Added Compositing and FrameworkScaled flags --- .../MacOS/CarbonBindings/CarbonAPI.cs | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs b/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs index 407563f4..530ea688 100644 --- a/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs +++ b/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs @@ -241,6 +241,7 @@ namespace OpenTK.Platform.MacOS.Carbon WindowClickProxyIconRgn = 38, WindowClose = 72, WindowClosed = 73, + WindowPaint = 1013, } internal enum MouseEventKind : int { @@ -388,7 +389,35 @@ namespace OpenTK.Platform.MacOS.Carbon SideTitlebar = (1u << 5), /* window wants a titlebar on the side (floating window class only)*/ NoUpdates = (1u << 16), /* this window receives no update events*/ NoActivates = (1u << 17), /* this window receives no activate events*/ - NoBuffering = (1u << 20), /* this window is not buffered (Mac OS X only)*/ + + /// + /// This window uses composited drawing. This means that the entire + /// window is comprised of HIViews, and can be treated thusly. This + /// attribute must be specified at window creation, and cannot be + /// changed later with ChangeWindows. In 64-bit mode, all windows must + /// be compositing, and you must always specify this attribute when + /// creating a window from code or designing a window in Interface + /// Builder. Available on Mac OS X 10.2 and later. + /// + Compositing = (1u << 19), + + /// + /// This window's context should be scaled to match the display scale + /// factor. This attribute can only be used when + /// kHIWindowBitCompositing is also enabled. When this attribute is + /// enabled, you may not draw with QuickDraw in the window. If this + /// attribute is enabled and if the scale factor is something other + /// than 1.0, the window's scale mode will be + /// kHIWindowScaleModeFrameworkScaled. You may only specify this + /// attribute at window creation time. Available for all windows in + /// Mac OS X 10.4 and later. + /// + FrameworkScaled = (1u << 20), + + /// + /// This window has the standard Carbon window event handler + /// installed. Available for all windows. + /// StandardHandler = (1u << 25), InWindowMenu = (1u << 27), LiveResize = (1u << 28), @@ -1014,6 +1043,12 @@ namespace OpenTK.Platform.MacOS.Carbon return retval; } + + //[DllImport(carbon)] + //static extern OSStatus HIWindowCreate(WindowClass class, int[] attributes, + // ref WindowDefSpec defSpec, HICoordinateSpace space, ref HIRect bounds, + // out IntPtr window); + #region --- SetWindowTitle --- [DllImport(carbon)]