Explorar o código

Merge pull request #211 from RobertBorghese/master

Add resizability configuration and screen centering for DirectX and SDL windows
Nicolas Cannasse %!s(int64=6) %!d(string=hai) anos
pai
achega
d40b879001
Modificáronse 4 ficheiros con 148 adicións e 11 borrados
  1. 18 2
      libs/directx/dx/Window.hx
  2. 53 4
      libs/directx/window.c
  3. 18 3
      libs/sdl/sdl.c
  4. 59 2
      libs/sdl/sdl/Window.hx

+ 18 - 2
libs/directx/dx/Window.hx

@@ -18,6 +18,11 @@ class Window {
 
 
 	static var windows : Array<Window> = [];
 	static var windows : Array<Window> = [];
 
 
+	public static inline var CW_USEDEFAULT = 0x80000000;
+
+	public static inline var HIDDEN    = 0x000001;
+	public static inline var RESIZABLE = 0x000002;
+
 	var win : WinPtr;
 	var win : WinPtr;
 	var savedSize : { x : Int, y : Int, width : Int, height : Int };
 	var savedSize : { x : Int, y : Int, width : Int, height : Int };
 	public var title(default, set) : String;
 	public var title(default, set) : String;
@@ -29,8 +34,8 @@ class Window {
 	public var visible(default, set) : Bool = true;
 	public var visible(default, set) : Bool = true;
 	public var vsync : Bool;
 	public var vsync : Bool;
 
 
-	public function new( title : String, width : Int, height : Int ) {
-		win = winCreate(width, height);
+	public function new( title : String, width : Int, height : Int, x : Int = CW_USEDEFAULT, y : Int = CW_USEDEFAULT, windowFlags : Int = RESIZABLE ) {
+		win = winCreateEx(x, y, width, height, windowFlags);
 		this.title = title;
 		this.title = title;
 		windows.push(this);
 		windows.push(this);
 		vsync = true;
 		vsync = true;
@@ -78,6 +83,10 @@ class Window {
 		winSetPosition(win, x, y);
 		winSetPosition(win, x, y);
 	}
 	}
 
 
+	public function center( centerPrimary : Bool = true ) {
+		winCenter(win, centerPrimary);
+	}
+
 	function get_width() {
 	function get_width() {
 		var w = 0;
 		var w = 0;
 		winGetSize(win, w, null);
 		winGetSize(win, w, null);
@@ -128,6 +137,10 @@ class Window {
 		winClipCursor(enable ? win : null);
 		winClipCursor(enable ? win : null);
 	}
 	}
 
 
+	static function winCreateEx( x : Int, y : Int, width : Int, height : Int, windowFlags : Int ) : WinPtr {
+		return null;
+	}
+
 	static function winCreate( width : Int, height : Int ) : WinPtr {
 	static function winCreate( width : Int, height : Int ) : WinPtr {
 		return null;
 		return null;
 	}
 	}
@@ -144,6 +157,9 @@ class Window {
 	static function winSetPosition( win : WinPtr, x : Int, y : Int ) {
 	static function winSetPosition( win : WinPtr, x : Int, y : Int ) {
 	}
 	}
 
 
+	static function winCenter( win : WinPtr, centerPrimary : Bool ) {
+	}
+
 	static function winResize( win : WinPtr, mode : Int ) {
 	static function winResize( win : WinPtr, mode : Int ) {
 	}
 	}
 
 

+ 53 - 4
libs/directx/window.c

@@ -32,6 +32,11 @@ typedef enum {
 	Close 	= 12
 	Close 	= 12
 } WindowStateChange;
 } WindowStateChange;
 
 
+typedef enum {
+	Hidden    = 0x000001,
+	Resizable = 0x000002
+} WindowFlags;
+
 typedef struct {
 typedef struct {
 	hl_type *t;
 	hl_type *t;
 	EventType type;
 	EventType type;
@@ -48,6 +53,7 @@ typedef struct {
 
 
 typedef struct {
 typedef struct {
 	dx_event events[MAX_EVENTS];
 	dx_event events[MAX_EVENTS];
+	DWORD normal_style;
 	int event_count;
 	int event_count;
 	int next_event;
 	int next_event;
 	bool is_over;
 	bool is_over;
@@ -215,7 +221,7 @@ static LRESULT CALLBACK WndProc( HWND wnd, UINT umsg, WPARAM wparam, LPARAM lpar
 	return DefWindowProc(wnd, umsg, wparam, lparam);
 	return DefWindowProc(wnd, umsg, wparam, lparam);
 }
 }
 
 
-HL_PRIM dx_window *HL_NAME(win_create)( int width, int height ) {
+HL_PRIM dx_window *HL_NAME(win_create_ex)( int x, int y, int width, int height, WindowFlags windowFlags ) {
 	static bool wnd_class_reg = false;
 	static bool wnd_class_reg = false;
 	HINSTANCE hinst = GetModuleHandle(NULL);
 	HINSTANCE hinst = GetModuleHandle(NULL);
 	if( !wnd_class_reg ) {
 	if( !wnd_class_reg ) {
@@ -239,21 +245,31 @@ HL_PRIM dx_window *HL_NAME(win_create)( int width, int height ) {
 
 
 	RECT r;
 	RECT r;
 	DWORD style = WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
 	DWORD style = WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
+	if( !(windowFlags & Resizable) ) {
+		style &= ~( WS_MAXIMIZEBOX | WS_THICKFRAME );
+	}
 	r.left = r.top = 0;
 	r.left = r.top = 0;
 	r.right = width;
 	r.right = width;
 	r.bottom = height;
 	r.bottom = height;
 	AdjustWindowRect(&r,style,false);
 	AdjustWindowRect(&r,style,false);
 	dx_events *event_buffer = (dx_events*)malloc(sizeof(dx_events));
 	dx_events *event_buffer = (dx_events*)malloc(sizeof(dx_events));
 	memset(event_buffer,0, sizeof(dx_events));
 	memset(event_buffer,0, sizeof(dx_events));
-	dx_window *win = CreateWindowEx(WS_EX_APPWINDOW, USTR("HL_WIN"), USTR(""), style, CW_USEDEFAULT, CW_USEDEFAULT, r.right - r.left, r.bottom - r.top, NULL, NULL, hinst, event_buffer);
+	dx_window *win = CreateWindowEx(WS_EX_APPWINDOW, USTR("HL_WIN"), USTR(""), style, x, y, r.right - r.left, r.bottom - r.top, NULL, NULL, hinst, event_buffer);
+	event_buffer->normal_style = style;
 	SetTimer(win,0,10,NULL);
 	SetTimer(win,0,10,NULL);
-	ShowWindow(win, SW_SHOW);
+	if( !(windowFlags & Hidden) ) {
+		ShowWindow(win, SW_SHOW);
+	}
 	SetCursor(LoadCursor(NULL, IDC_ARROW));
 	SetCursor(LoadCursor(NULL, IDC_ARROW));
 	SetForegroundWindow(win);
 	SetForegroundWindow(win);
 	SetFocus(win);
 	SetFocus(win);
 	return win;
 	return win;
 }
 }
 
 
+HL_PRIM dx_window *HL_NAME(win_create)( int width, int height ) {
+	return HL_NAME(win_create_ex)(CW_USEDEFAULT, CW_USEDEFAULT, width, height, Resizable);
+}
+
 HL_PRIM void HL_NAME(win_set_title)(dx_window *win, vbyte *title) {
 HL_PRIM void HL_NAME(win_set_title)(dx_window *win, vbyte *title) {
 	SetWindowText(win,(LPCWSTR)title);
 	SetWindowText(win,(LPCWSTR)title);
 }
 }
@@ -286,6 +302,36 @@ HL_PRIM void HL_NAME(win_set_position)(dx_window *win, int x, int y) {
 	SetWindowPos(win,NULL,x,y,0,0,SWP_NOSIZE|SWP_NOZORDER);
 	SetWindowPos(win,NULL,x,y,0,0,SWP_NOSIZE|SWP_NOZORDER);
 }
 }
 
 
+// initially written with the intent to center on closest monitor; however, SDL centers to primary, so both options are provided
+HL_PRIM void HL_NAME(win_center)(dx_window *win, bool centerPrimary) {
+	int scnX = 0;
+	int scnY = 0;
+	int scnWidth = -1;
+	int scnHeight = -1;
+	if( centerPrimary ) {
+		scnWidth = GetSystemMetrics(SM_CXSCREEN);
+		scnHeight = GetSystemMetrics(SM_CYSCREEN);
+	} else {
+		HMONITOR m = MonitorFromWindow(win, MONITOR_DEFAULTTONEAREST);
+		if( m != NULL ) {
+			MONITORINFO info;
+			info.cbSize = sizeof(MONITORINFO);
+			GetMonitorInfo(m, &info);
+			RECT screen = info.rcMonitor; // "rcMonitor" to match SM_CXSCREEN/SM_CYSCREEN measurements
+			scnX = screen.left;
+			scnY = screen.top;
+			scnWidth = (screen.right - scnX);
+			scnHeight = (screen.bottom - scnY);
+		}
+	}
+	if( scnWidth >= 0 && scnHeight >= 0 ) {
+		int winWidth = 0;
+		int winHeight = 0;
+		HL_NAME(win_get_size)(win, &winWidth, &winHeight);
+		HL_NAME(win_set_position)(win, scnX + ((scnWidth - winWidth) / 2), scnY + ((scnHeight - winHeight) / 2));
+	}
+}
+
 HL_PRIM void HL_NAME(win_resize)(dx_window *win, int mode) {
 HL_PRIM void HL_NAME(win_resize)(dx_window *win, int mode) {
 	switch( mode ) {
 	switch( mode ) {
 	case 0:
 	case 0:
@@ -315,7 +361,8 @@ HL_PRIM void HL_NAME(win_set_fullscreen)(dx_window *win, bool fs) {
 		SetWindowLong(win,GWL_STYLE,WS_POPUP | WS_VISIBLE);
 		SetWindowLong(win,GWL_STYLE,WS_POPUP | WS_VISIBLE);
 		SetWindowPos(win,NULL,mi.rcMonitor.left,mi.rcMonitor.top,mi.rcMonitor.right - mi.rcMonitor.left,mi.rcMonitor.bottom - mi.rcMonitor.top,SWP_NOOWNERZORDER|SWP_FRAMECHANGED|SWP_SHOWWINDOW);
 		SetWindowPos(win,NULL,mi.rcMonitor.left,mi.rcMonitor.top,mi.rcMonitor.right - mi.rcMonitor.left,mi.rcMonitor.bottom - mi.rcMonitor.top,SWP_NOOWNERZORDER|SWP_FRAMECHANGED|SWP_SHOWWINDOW);
 	} else {
 	} else {
-		SetWindowLong(win,GWL_STYLE,WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
+		dx_events *buf = get_events(win);
+		SetWindowLong(win,GWL_STYLE,buf->normal_style);
 		SetWindowPos(win,NULL,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOOWNERZORDER|SWP_FRAMECHANGED|SWP_SHOWWINDOW);
 		SetWindowPos(win,NULL,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOOWNERZORDER|SWP_FRAMECHANGED|SWP_SHOWWINDOW);
 	}
 	}
 }
 }
@@ -366,12 +413,14 @@ HL_PRIM int HL_NAME(get_screen_height)() {
 }
 }
 
 
 #define TWIN _ABSTRACT(dx_window)
 #define TWIN _ABSTRACT(dx_window)
+DEFINE_PRIM(TWIN, win_create_ex, _I32 _I32 _I32 _I32 _I32);
 DEFINE_PRIM(TWIN, win_create, _I32 _I32);
 DEFINE_PRIM(TWIN, win_create, _I32 _I32);
 DEFINE_PRIM(_VOID, win_set_fullscreen, TWIN _BOOL);
 DEFINE_PRIM(_VOID, win_set_fullscreen, TWIN _BOOL);
 DEFINE_PRIM(_VOID, win_resize, TWIN _I32);
 DEFINE_PRIM(_VOID, win_resize, TWIN _I32);
 DEFINE_PRIM(_VOID, win_set_title, TWIN _BYTES);
 DEFINE_PRIM(_VOID, win_set_title, TWIN _BYTES);
 DEFINE_PRIM(_VOID, win_set_size, TWIN _I32 _I32);
 DEFINE_PRIM(_VOID, win_set_size, TWIN _I32 _I32);
 DEFINE_PRIM(_VOID, win_set_position, TWIN _I32 _I32);
 DEFINE_PRIM(_VOID, win_set_position, TWIN _I32 _I32);
+DEFINE_PRIM(_VOID, win_center, TWIN _BOOL);
 DEFINE_PRIM(_VOID, win_get_size, TWIN _REF(_I32) _REF(_I32));
 DEFINE_PRIM(_VOID, win_get_size, TWIN _REF(_I32) _REF(_I32));
 DEFINE_PRIM(_VOID, win_get_position, TWIN _REF(_I32) _REF(_I32));
 DEFINE_PRIM(_VOID, win_get_position, TWIN _REF(_I32) _REF(_I32));
 DEFINE_PRIM(_VOID, win_destroy, TWIN);
 DEFINE_PRIM(_VOID, win_destroy, TWIN);

+ 18 - 3
libs/sdl/sdl.c

@@ -366,15 +366,15 @@ DEFINE_PRIM(_BYTES, detect_keyboard_layout, _NO_ARG);
 
 
 // Window
 // Window
 
 
-HL_PRIM SDL_Window *HL_NAME(win_create)(int width, int height) {
+HL_PRIM SDL_Window *HL_NAME(win_create_ex)(int x, int y, int width, int height, int sdlFlags) {
 	SDL_Window *w;
 	SDL_Window *w;
 	// force window to match device resolution on mobile
 	// force window to match device resolution on mobile
 #ifdef	HL_MOBILE
 #ifdef	HL_MOBILE
 	SDL_DisplayMode displayMode;
 	SDL_DisplayMode displayMode;
 	SDL_GetDesktopDisplayMode(0, &displayMode);
 	SDL_GetDesktopDisplayMode(0, &displayMode);
-	w = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS);
+	w = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | sdlFlags);
 #else
 #else
-	w = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
+	w = SDL_CreateWindow("", x, y, width, height, SDL_WINDOW_OPENGL | sdlFlags);
 #endif
 #endif
 #	ifdef HL_WIN
 #	ifdef HL_WIN
 	// force window to show even if the debugger force process windows to be hidden
 	// force window to show even if the debugger force process windows to be hidden
@@ -386,6 +386,10 @@ HL_PRIM SDL_Window *HL_NAME(win_create)(int width, int height) {
 	return w;
 	return w;
 }
 }
 
 
+HL_PRIM SDL_Window *HL_NAME(win_create)(int width, int height) {
+	return HL_NAME(win_create_ex)(SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, 0);
+}
+
 HL_PRIM SDL_GLContext HL_NAME(win_get_glcontext)(SDL_Window *win) {
 HL_PRIM SDL_GLContext HL_NAME(win_get_glcontext)(SDL_Window *win) {
 	return SDL_GL_CreateContext(win);
 	return SDL_GL_CreateContext(win);
 }
 }
@@ -445,6 +449,14 @@ HL_PRIM void HL_NAME(win_set_title)(SDL_Window *win, vbyte *title) {
 	SDL_SetWindowTitle(win, (char*)title);
 	SDL_SetWindowTitle(win, (char*)title);
 }
 }
 
 
+HL_PRIM void HL_NAME(win_set_position)(SDL_Window *win, int x, int y) {
+	SDL_SetWindowPosition(win, x, y);
+}
+
+HL_PRIM void HL_NAME(win_get_position)(SDL_Window *win, int *x, int *y) {
+	SDL_GetWindowPosition(win, x, y);
+}
+
 HL_PRIM void HL_NAME(win_set_size)(SDL_Window *win, int width, int height) {
 HL_PRIM void HL_NAME(win_set_size)(SDL_Window *win, int width, int height) {
 	SDL_SetWindowSize(win, width, height);
 	SDL_SetWindowSize(win, width, height);
 }
 }
@@ -499,11 +511,14 @@ HL_PRIM void HL_NAME(win_destroy)(SDL_Window *win, SDL_GLContext gl) {
 
 
 #define TWIN _ABSTRACT(sdl_window)
 #define TWIN _ABSTRACT(sdl_window)
 #define TGL _ABSTRACT(sdl_gl)
 #define TGL _ABSTRACT(sdl_gl)
+DEFINE_PRIM(TWIN, win_create_ex, _I32 _I32 _I32 _I32 _I32);
 DEFINE_PRIM(TWIN, win_create, _I32 _I32);
 DEFINE_PRIM(TWIN, win_create, _I32 _I32);
 DEFINE_PRIM(TGL, win_get_glcontext, TWIN);
 DEFINE_PRIM(TGL, win_get_glcontext, TWIN);
 DEFINE_PRIM(_BOOL, win_set_fullscreen, TWIN _I32);
 DEFINE_PRIM(_BOOL, win_set_fullscreen, TWIN _I32);
 DEFINE_PRIM(_VOID, win_resize, TWIN _I32);
 DEFINE_PRIM(_VOID, win_resize, TWIN _I32);
 DEFINE_PRIM(_VOID, win_set_title, TWIN _BYTES);
 DEFINE_PRIM(_VOID, win_set_title, TWIN _BYTES);
+DEFINE_PRIM(_VOID, win_set_position, TWIN _I32 _I32);
+DEFINE_PRIM(_VOID, win_get_position, TWIN _REF(_I32) _REF(_I32));
 DEFINE_PRIM(_VOID, win_set_size, TWIN _I32 _I32);
 DEFINE_PRIM(_VOID, win_set_size, TWIN _I32 _I32);
 DEFINE_PRIM(_VOID, win_get_size, TWIN _REF(_I32) _REF(_I32));
 DEFINE_PRIM(_VOID, win_get_size, TWIN _REF(_I32) _REF(_I32));
 DEFINE_PRIM(_VOID, win_swap_window, TWIN);
 DEFINE_PRIM(_VOID, win_swap_window, TWIN);

+ 59 - 2
libs/sdl/sdl/Window.hx

@@ -18,6 +18,31 @@ class Window {
 
 
 	static var windows : Array<Window> = [];
 	static var windows : Array<Window> = [];
 
 
+	public static inline var SDL_WINDOWPOS_UNDEFINED = 0x1FFF0000;
+	public static inline var SDL_WINDOWPOS_CENTERED  = 0x2FFF0000;
+
+	public static inline var SDL_WINDOW_FULLSCREEN         = 0x00000001;
+	public static inline var SDL_WINDOW_OPENGL             = 0x00000002;
+	public static inline var SDL_WINDOW_SHOWN              = 0x00000004;
+	public static inline var SDL_WINDOW_HIDDEN             = 0x00000008;
+	public static inline var SDL_WINDOW_BORDERLESS         = 0x00000010;
+	public static inline var SDL_WINDOW_RESIZABLE          = 0x00000020;
+	public static inline var SDL_WINDOW_MINIMIZED          = 0x00000040;
+	public static inline var SDL_WINDOW_MAXIMIZED          = 0x00000080;
+	public static inline var SDL_WINDOW_INPUT_GRABBED      = 0x00000100;
+	public static inline var SDL_WINDOW_INPUT_FOCUS        = 0x00000200;
+	public static inline var SDL_WINDOW_MOUSE_FOCUS        = 0x00000400;
+	public static inline var SDL_WINDOW_FULLSCREEN_DESKTOP = 0x00001001;
+	public static inline var SDL_WINDOW_FOREIGN            = 0x00000800;
+	public static inline var SDL_WINDOW_ALLOW_HIGHDPI      = 0x00002000;
+	public static inline var SDL_WINDOW_MOUSE_CAPTURE      = 0x00004000;
+	public static inline var SDL_WINDOW_ALWAYS_ON_TOP      = 0x00008000;
+	public static inline var SDL_WINDOW_SKIP_TASKBAR       = 0x00010000;
+	public static inline var SDL_WINDOW_UTILITY            = 0x00020000;
+	public static inline var SDL_WINDOW_TOOLTIP            = 0x00040000;
+	public static inline var SDL_WINDOW_POPUP_MENU         = 0x00080000;
+	public static inline var SDL_WINDOW_VULKAN             = 0x10000000;
+
 	var win : WinPtr;
 	var win : WinPtr;
 	var glctx : GLContext;
 	var glctx : GLContext;
 	var lastFrame : Float;
 	var lastFrame : Float;
@@ -25,12 +50,14 @@ class Window {
 	public var vsync(default, set) : Bool;
 	public var vsync(default, set) : Bool;
 	public var width(get, never) : Int;
 	public var width(get, never) : Int;
 	public var height(get, never) : Int;
 	public var height(get, never) : Int;
+	public var x(get, never) : Int;
+	public var y(get, never) : Int;
 	public var displayMode(default, set) : DisplayMode;
 	public var displayMode(default, set) : DisplayMode;
 	public var visible(default, set) : Bool = true;
 	public var visible(default, set) : Bool = true;
 
 
-	public function new( title : String, width : Int, height : Int ) {
+	public function new( title : String, width : Int, height : Int, x : Int = SDL_WINDOWPOS_CENTERED, y : Int = SDL_WINDOWPOS_CENTERED, sdlFlags : Int = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE ) {
 		while( true ) {
 		while( true ) {
-			win = winCreate(width, height);
+			win = winCreateEx(x, y, width, height, sdlFlags);
 			if( win == null ) throw "Failed to create window";
 			if( win == null ) throw "Failed to create window";
 			glctx = winGetGLContext(win);
 			glctx = winGetGLContext(win);
 			if( glctx == null || !GL.init() || !testGL() ) {
 			if( glctx == null || !GL.init() || !testGL() ) {
@@ -122,6 +149,14 @@ class Window {
 		winSetSize(win, width, height);
 		winSetSize(win, width, height);
 	}
 	}
 
 
+	public function setPosition( x : Int, y : Int ) {
+		winSetPosition(win, x, y);
+	}
+
+	public function center() {
+		setPosition(SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
+	}
+
 	function get_width() {
 	function get_width() {
 		var w = 0;
 		var w = 0;
 		winGetSize(win, w, null);
 		winGetSize(win, w, null);
@@ -134,6 +169,18 @@ class Window {
 		return h;
 		return h;
 	}
 	}
 
 
+	function get_x() {
+		var x = 0;
+		winGetPosition(win, x, null);
+		return x;
+	}
+
+	function get_y() {
+		var y = 0;
+		winGetPosition(win, null, y);
+		return y;
+	}
+
 	function set_vsync(v) {
 	function set_vsync(v) {
 		setVsync(v);
 		setVsync(v);
 		return vsync = v;
 		return vsync = v;
@@ -176,6 +223,10 @@ class Window {
 		winResize(win, 2);
 		winResize(win, 2);
 	}
 	}
 
 
+	static function winCreateEx( x : Int, y : Int, width : Int, height : Int, sdlFlags : Int ) : WinPtr {
+		return null;
+	}
+
 	static function winCreate( width : Int, height : Int ) : WinPtr {
 	static function winCreate( width : Int, height : Int ) : WinPtr {
 		return null;
 		return null;
 	}
 	}
@@ -183,6 +234,12 @@ class Window {
 	static function winSetTitle( win : WinPtr, title : hl.Bytes ) {
 	static function winSetTitle( win : WinPtr, title : hl.Bytes ) {
 	}
 	}
 
 
+	static function winSetPosition( win : WinPtr, width : Int, height : Int ) {
+	}
+
+	static function winGetPosition( win : WinPtr, width : hl.Ref<Int>, height : hl.Ref<Int> ) {
+	}
+
 	static function winGetGLContext( win : WinPtr ) : GLContext {
 	static function winGetGLContext( win : WinPtr ) : GLContext {
 		return null;
 		return null;
 	}
 	}