summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/appkit/NSCursor.inc
blob: da2cee14b98939d59bb9ddab55d133630f62a964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{ Parsed from Appkit.framework NSCursor.h }
{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }


{$ifdef TYPES}
{$ifndef NSCURSOR_PAS_T}
{$define NSCURSOR_PAS_T}

{ Defines }
const
  NSAppKitVersionNumberWithCursorSizeSupport = 682.0;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSCURSOR_PAS_R}
{$define NSCURSOR_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSCURSOR_PAS_F}
{$define NSCURSOR_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSCURSOR_PAS_S}
{$define NSCURSOR_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSCursor = objcclass;
  NSCursorPointer = ^NSCursor;
  NSCursorPtr = NSCursorPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSCURSOR_PAS_C}
{$define NSCURSOR_PAS_C}

{ NSCursor }
  NSCursor = objcclass external (NSObject, NSCodingProtocol)
  private
    _hotSpot: NSPoint;
    __flags: bitpacked record
      case byte of
       0: (_anonbitfield_NSCursor1: cuint);
       1: (
        onMouseExited: 0..1;
        onMouseEntered: 0..1;
        cursorType: 0..((1 shl 8)-1);
        _anonbitfield_NSCursor0: 0..((1 shl 22)-1);
      );
      end;
    _image: id;
    
  public
    class function currentCursor: NSCursor; message 'currentCursor';
    class function currentSystemCursor: NSCursor; message 'currentSystemCursor';
    class function arrowCursor: NSCursor; message 'arrowCursor';
    class function IBeamCursor: NSCursor; message 'IBeamCursor';
    class function pointingHandCursor: NSCursor; message 'pointingHandCursor';
    class function closedHandCursor: NSCursor; message 'closedHandCursor';
    class function openHandCursor: NSCursor; message 'openHandCursor';
    class function resizeLeftCursor: NSCursor; message 'resizeLeftCursor';
    class function resizeRightCursor: NSCursor; message 'resizeRightCursor';
    class function resizeLeftRightCursor: NSCursor; message 'resizeLeftRightCursor';
    class function resizeUpCursor: NSCursor; message 'resizeUpCursor';
    class function resizeDownCursor: NSCursor; message 'resizeDownCursor';
    class function resizeUpDownCursor: NSCursor; message 'resizeUpDownCursor';
    class function crosshairCursor: NSCursor; message 'crosshairCursor';
    class function disappearingItemCursor: NSCursor; message 'disappearingItemCursor';
    class function operationNotAllowedCursor: NSCursor; message 'operationNotAllowedCursor';
    class function dragLinkCursor: NSCursor; message 'dragLinkCursor';
    class function dragCopyCursor: NSCursor; message 'dragCopyCursor';
    class function contextualMenuCursor: NSCursor; message 'contextualMenuCursor';
    function initWithImage_hotSpot(newImage: NSImage; aPoint: NSPoint): id; message 'initWithImage:hotSpot:';
    function initWithImage_foregroundColorHint_backgroundColorHint_hotSpot(newImage: NSImage; fg: NSColor; bg: NSColor; hotSpot_: NSPoint): id; message 'initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:';
    class procedure hide; message 'hide';
    class procedure unhide; message 'unhide';
    class procedure setHiddenUntilMouseMoves(flag: Boolean); message 'setHiddenUntilMouseMoves:';
    class procedure pop; message 'pop';
    function image: NSImage; message 'image';
    function hotSpot: NSPoint; message 'hotSpot';
    procedure push; message 'push';
    procedure set_; message 'set';
    procedure setOnMouseExited(flag: Boolean); message 'setOnMouseExited:';
    procedure setOnMouseEntered(flag: Boolean); message 'setOnMouseEntered:';
    function isSetOnMouseExited: Boolean; message 'isSetOnMouseExited';
    function isSetOnMouseEntered: Boolean; message 'isSetOnMouseEntered';
    procedure mouseEntered(theEvent: NSEvent); message 'mouseEntered:';
    procedure mouseExited(theEvent: NSEvent); message 'mouseExited:';

    { Adopted Protocols }
    procedure encodeWithCoder(aCoder: NSCoder);
    function initWithCoder(aDecoder: NSCoder): id;
  end;

{$endif}
{$endif}