Permalink
Browse files

Added Compositing and FrameworkScaled flags

  • Loading branch information...
1 parent 1189b33 commit 95270c877df70fb5b5a6519534f98d7951382092 @thefiddler thefiddler committed Dec 23, 2013
Showing with 36 additions and 1 deletion.
  1. +36 −1 Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs
@@ -241,6 +241,7 @@ internal enum WindowEventKind : int
WindowClickProxyIconRgn = 38,
WindowClose = 72,
WindowClosed = 73,
+ WindowPaint = 1013,
}
internal enum MouseEventKind : int
{
@@ -388,7 +389,35 @@ internal enum WindowAttributes : uint
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)*/
+
+ /// <summary>
+ /// 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.
+ /// </summary>
+ Compositing = (1u << 19),
+
+ /// <summary>
+ /// 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.
+ /// </summary>
+ FrameworkScaled = (1u << 20),
+
+ /// <summary>
+ /// This window has the standard Carbon window event handler
+ /// installed. Available for all windows.
+ /// </summary>
StandardHandler = (1u << 25),
InWindowMenu = (1u << 27),
LiveResize = (1u << 28),
@@ -1014,6 +1043,12 @@ internal static HIRect HIViewGetFrame(IntPtr inView)
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)]

0 comments on commit 95270c8

Please sign in to comment.