public WinGLNative(int x, int y, int width, int height, string title, GameWindowFlags options, DisplayDevice device) { // This is the main window procedure callback. We need the callback in order to create the window, so // don't move it below the CreateWindow calls. WindowProcedureDelegate = WindowProcedure; // This timer callback is called periodically when the window enters a sizing / moving modal loop. ModalLoopCallback = delegate(IntPtr handle, WindowMessage msg, UIntPtr eventId, int time) { // Todo: find a way to notify the frontend that it should process queued up UpdateFrame/RenderFrame events. if (Move != null) { Move(this, EventArgs.Empty); } }; // To avoid issues with Ati drivers on Windows 6+ with compositing enabled, the context will not be // bound to the top-level window, but rather to a child window docked in the parent. window = new WinWindowInfo( CreateWindow(x, y, width, height, title, options, device, IntPtr.Zero), null); child_window = new WinWindowInfo( CreateWindow(0, 0, ClientSize.Width, ClientSize.Height, title, options, device, window.WindowHandle), window); exists = true; keyboard.Description = "Standard Windows keyboard"; keyboard.NumberOfFunctionKeys = 12; keyboard.NumberOfKeys = 101; keyboard.NumberOfLeds = 3; mouse.Description = "Standard Windows mouse"; mouse.NumberOfButtons = 3; mouse.NumberOfWheels = 1; keyboards.Add(keyboard); mice.Add(mouse); }
public WinGLNative(int x, int y, int width, int height, string title, GameWindowFlags options, DisplayDevice device) { lock (SyncRoot) { ++window_count; ClassName = Marshal.StringToHGlobalAuto(typeof(WinGLNative).Name + window_count.ToString()); ModalLoopTimerId = new UIntPtr((uint)window_count); } // This is the main window procedure callback. We need the callback in order to create the window, so // don't move it below the CreateWindow calls. WindowProcedureDelegate = WindowProcedure; // This timer callback is called periodically when the window enters a sizing / moving modal loop. ModalLoopCallback = delegate(IntPtr handle, WindowMessage msg, UIntPtr eventId, int time) { // Todo: find a way to notify the frontend that it should process queued up UpdateFrame/RenderFrame events. if (Move != null) Move(this, EventArgs.Empty); }; // To avoid issues with Ati drivers on Windows 6+ with compositing enabled, the context will not be // bound to the top-level window, but rather to a child window docked in the parent. window = new WinWindowInfo( CreateWindow(x, y, width, height, title, options, device, IntPtr.Zero), null); child_window = new WinWindowInfo( CreateWindow(0, 0, ClientSize.Width, ClientSize.Height, title, options, device, window.WindowHandle), window); exists = true; keyboard.Description = "Standard Windows keyboard"; keyboard.NumberOfFunctionKeys = 12; keyboard.NumberOfKeys = 101; keyboard.NumberOfLeds = 3; mouse.Description = "Standard Windows mouse"; mouse.NumberOfButtons = 3; mouse.NumberOfWheels = 1; keyboards.Add(keyboard); mice.Add(mouse); EnableMouseLeaveNotifications(); }
public static UIntPtr SetTimer(IntPtr hWnd, UIntPtr nIDEvent, uint uElapse, Functions.TimerProc lpTimerFunc);