Exemplo n.º 1
0
 public void Set(StandardCursor cursor)
 {
     if (!NativeMethods.SetSystemCursor(handle, cursor))
     {
         Helper.CheckLastWin32Error();
     }
 }
Exemplo n.º 2
0
        public static CursorHandle CreateCursor(StandardCursor standardCursor)
        {
            var cursor = glfwCreateStandardCursor(standardCursor);

            CheckError(nameof(CreateCursor));
            return(cursor);
        }
Exemplo n.º 3
0
 public bool Hide(StandardCursor cursor)
 {
     if (hiddenCursors.ContainsKey(cursor))
     {
         return(false);
     }
     hiddenCursors.Add(cursor, new SystemCursor(SystemCursor.GetCurrentCursor(cursor)));
     new SystemCursor(empty, new Point(0, 0)).Set(cursor);
     return(true);
 }
Exemplo n.º 4
0
        public bool Show(StandardCursor cursor)
        {
            if (!hiddenCursors.ContainsKey(cursor))
            {
                return(false);
            }
            var systemCursor = hiddenCursors[cursor];

            systemCursor.Set(cursor);
            hiddenCursors.Remove(cursor);
            systemCursor.Dispose();
            return(true);
        }
Exemplo n.º 5
0
 internal static extern bool SetSystemCursor(IntPtr hcur, StandardCursor id);
Exemplo n.º 6
0
 internal static extern IntPtr LoadCursor(IntPtr hInstance, StandardCursor lpCursorName);
Exemplo n.º 7
0
 public static SystemCursor GetCurrentCursor(StandardCursor cursor)
 {
     return(new SystemCursor(NativeMethods.LoadCursor(IntPtr.Zero, cursor)));
 }
Exemplo n.º 8
0
 private static extern CursorHandle glfwCreateStandardCursor(StandardCursor cursorType);