Example #1
0
 internal void StartListening(IntPtr window)
 {
     GLFW.SetKeyCallback(window, TrackDelegate <GLFW.KeyFunc>(window, OnKeyCallback));
     GLFW.SetCharCallback(window, TrackDelegate <GLFW.CharFunc>(window, OnCharCallback));
     GLFW.SetMouseButtonCallback(window, TrackDelegate <GLFW.MouseButtonFunc>(window, OnMouseCallback));
     GLFW.SetScrollCallback(window, TrackDelegate <GLFW.ScrollFunc>(window, OnScrollCallback));
 }
Example #2
0
 internal void StopListening(IntPtr window)
 {
     GLFW.SetKeyCallback(window, null);
     GLFW.SetCharCallback(window, null);
     GLFW.SetMouseButtonCallback(window, null);
     delegateTracker.Remove(window);
 }
Example #3
0
        internal void StartListening(IntPtr window)
        {
            windows.Add(window);

            ignoreMouseUp[0] = Mouse.LeftDown;
            ignoreMouseUp[1] = Mouse.MiddleDown;
            ignoreMouseUp[2] = Mouse.RightDown;

            GLFW.SetKeyCallback(window, TrackDelegate <GLFW.KeyFunc>(window, OnKeyCallback));
            GLFW.SetCharCallback(window, TrackDelegate <GLFW.CharFunc>(window, OnCharCallback));
            GLFW.SetMouseButtonCallback(window, TrackDelegate <GLFW.MouseButtonFunc>(window, OnMouseCallback));
            GLFW.SetScrollCallback(window, TrackDelegate <GLFW.ScrollFunc>(window, OnScrollCallback));
        }