コード例 #1
0
ファイル: MacCursors.cs プロジェクト: jroweboy/FamiStudio
 public static void Initialize()
 {
     Default    = MacUtils.GetCursorByName("arrowCursor");
     SizeWE     = MacUtils.GetCursorByName("resizeLeftRightCursor");
     SizeNS     = MacUtils.GetCursorByName("resizeUpDownCursor");
     DragCursor = MacUtils.GetCursorByName("closedHandCursor");
     CopyCursor = MacUtils.GetCursorByName("dragCopyCursor");
     Eyedrop    = Default; // CreateCursorFromResource("EyedropCursor", 7, 24); Disabling for now, cant get hotspot to work.
 }
コード例 #2
0
        private static unsafe Gdk.Cursor CreateMacOSNamedCursor(string name)
        {
            var nsCursor  = MacUtils.GetCursorByName(name);
            var gdkCursor = new Gdk.Cursor(Gdk.CursorType.Cross);

            // HACK : Patch the Gdk internal struct with our NSCursor.
            // struct is :
            //   - 4 byte type
            //   - 4 byte ref count
            //   - 8 bytes NSCursor pointer.
            IntPtr *p = (IntPtr *)gdkCursor.Handle.ToPointer();

            p[1] = nsCursor;

            return(gdkCursor);
        }