示例#1
0
文件: API.cs 项目: jpbruyere/opentk
 internal static extern LRESULT DispatchMessage(ref MSG msg);
示例#2
0
文件: API.cs 项目: jpbruyere/opentk
 internal static extern BOOL TranslateMessage(ref MSG lpMsg);
示例#3
0
文件: API.cs 项目: jpbruyere/opentk
 internal static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, PeekMessageFlags flags);
示例#4
0
文件: API.cs 项目: jpbruyere/opentk
 //[return: MarshalAs(UnmanagedType.Bool)]
 internal static extern INT GetMessage(ref MSG msg,
     IntPtr windowHandle, int messageFilterMin, int messageFilterMax);
        void ProcessEvents()
        {
            Native = ConstructMessageWindow();
            CreateDrivers();

            // Subclass the window to retrieve the events we are interested in.
            OldWndProc = Functions.SetWindowLong(Parent.Handle, WndProc);
            Debug.Print("Input window attached to {0}", Parent);

            InputReady.Set();

            MSG msg = new MSG();
            while (Native.Exists)
            {
                int ret = Functions.GetMessage(ref msg, Parent.Handle, 0, 0);
                if (ret == -1)
                {
                    throw new PlatformException(String.Format(
                        "An error happened while processing the message queue. Windows error: {0}",
                        Marshal.GetLastWin32Error()));
                }

                Functions.TranslateMessage(ref msg);
                Functions.DispatchMessage(ref msg);
            }
        }
示例#6
0
 private void ProcessEvents()
 {
     this.Native = this.ConstructMessageWindow();
       this.CreateDrivers();
       this.OldWndProc = Functions.SetWindowLong(this.Parent.WindowHandle, this.WndProc);
       this.InputReady.Set();
       MSG msg = new MSG();
       while (this.Native.Exists)
       {
     if (Functions.GetMessage(ref msg, this.Parent.WindowHandle, 0, 0) == -1)
       throw new PlatformException(string.Format("An error happened while processing the message queue. Windows error: {0}", (object) Marshal.GetLastWin32Error()));
     Functions.TranslateMessage(ref msg);
     Functions.DispatchMessage(ref msg);
       }
 }
示例#7
0
 internal static bool TranslateMessage(ref MSG lpMsg);
示例#8
0
 internal static IntPtr DispatchMessage(ref MSG msg);
示例#9
0
 internal static extern bool TranslateMessage(ref MSG lpMsg);
示例#10
0
 internal static extern IntPtr DispatchMessage(ref MSG msg);
示例#11
0
 internal static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, int flags);