summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/appkit/NSAnimation.inc
blob: 316444b0dfc349b04a4d6828242688bb6ae5e890 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{ Parsed from Appkit.framework NSAnimation.h }
{ Version FrameworkParser: 1.3. PasCocoa 0.3, Objective-P 0.2 - Tue Sep 8 15:31:02 ICT 2009 }

{$ifdef HEADER}
{$ifndef NSANIMATION_PAS_H}
{$define NSANIMATION_PAS_H}
type
  NSAnimationPointer = Pointer;
  NSViewAnimationPointer = Pointer;

{$endif}
{$endif}

{$ifdef TYPES}
{$ifndef NSANIMATION_PAS_T}
{$define NSANIMATION_PAS_T}

{ Constants }

const
  NSAnimationEaseIn = 0;
  NSAnimationEaseOut = 1;
  NSAnimationLinear = 2;

const
  NSAnimationBlocking = 0;
  NSAnimationNonblocking = 1;
  NSAnimationNonblockingThreaded = 2;

{ Types }
type
  NSAnimationCurve = culong;
  NSAnimationBlockingMode = culong;
  NSAnimationProgress = single;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSANIMATION_PAS_R}
{$define NSANIMATION_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSANIMATION_PAS_F}
{$define NSANIMATION_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSANIMATION_PAS_T}
{$define NSANIMATION_PAS_T}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSAnimatablePropertyContainerProtocol = objcprotocol;
  NSAnimation = objcclass;
  NSViewAnimation = objcclass;

{$endif}

{$ifdef CLASSES}
{$ifndef NSANIMATION_PAS_C}
{$define NSANIMATION_PAS_C}

{ NSAnimation }
  NSAnimation = objcclass(NSObject, NSCopyingProtocol, NSCodingProtocol)
  private
    __duration: NSTimeInterval;
    __currentProgress: NSAnimationProgress;
    __framesPerSecond: single;
    __delegate: id;
    __timer: NSTimer;
    __startTime: NSTimeInterval;
    __progressMarks: NSMutableArray;
    __startAnimation: NSAnimation;
    __stopAnimation: NSAnimation;
    __nextProgressMark: cint;
    __aFlags: bitpacked record
        delegateAnimationShouldStart: 0..1;
        delegateAnimationDidStop: 0..1;
        delegateAnimationDidEnd: 0..1;
        delegateAnimationValueForProgress: 0..1;
        delegateAnimationDidReachProgressMark: 0..1;
        animating: 0..1;
        blocking: 0..1;
        reserved: 0..((1 shl 25)-1);
      end;
    __aSettings: bitpacked record
        animationCurve: 0..((1 shl 8)-1);
        animationBlockingMode: 0..((1 shl 2)-1);
        reserved: 0..((1 shl 22)-1);
      end;
    __reserved1: clong;
    __reserved2: clong;
    __reserved3: clong;
    __reserved4: clong;
    
  public
    class function alloc: NSAnimation; message 'alloc';

    function initWithDuration_animationCurve(duration_: NSTimeInterval; animationCurve_: NSAnimationCurve): id; message 'initWithDuration:animationCurve:';
    procedure startAnimation; message 'startAnimation';
    procedure stopAnimation; message 'stopAnimation';
    function isAnimating: Boolean; message 'isAnimating';
    function currentProgress: NSAnimationProgress; message 'currentProgress';
    procedure setCurrentProgress(progress: NSAnimationProgress); message 'setCurrentProgress:';
    procedure setDuration(duration_: NSTimeInterval); message 'setDuration:';
    function duration: NSTimeInterval; message 'duration';
    function animationBlockingMode: NSAnimationBlockingMode; message 'animationBlockingMode';
    procedure setAnimationBlockingMode(animationBlockingMode_: NSAnimationBlockingMode); message 'setAnimationBlockingMode:';
    procedure setFrameRate(framesPerSecond: single); message 'setFrameRate:';
    function frameRate: single; message 'frameRate';
    procedure setAnimationCurve(curve: NSAnimationCurve); message 'setAnimationCurve:';
    function animationCurve: NSAnimationCurve; message 'animationCurve';
    function currentValue: single; message 'currentValue';
    procedure setDelegate(delegate_: id); message 'setDelegate:';
    function delegate: id; message 'delegate';
    function progressMarks: NSArray; message 'progressMarks';
    procedure setProgressMarks(progressMarks_: NSArray); message 'setProgressMarks:';
    procedure addProgressMark(progressMark: NSAnimationProgress); message 'addProgressMark:';
    procedure removeProgressMark(progressMark: NSAnimationProgress); message 'removeProgressMark:';
    procedure startWhenAnimation_reachesProgress(animation: NSAnimation; startProgress: NSAnimationProgress); message 'startWhenAnimation:reachesProgress:';
    procedure stopWhenAnimation_reachesProgress(animation: NSAnimation; stopProgress: NSAnimationProgress); message 'stopWhenAnimation:reachesProgress:';
    procedure clearStartAnimation; message 'clearStartAnimation';
    procedure clearStopAnimation; message 'clearStopAnimation';
    function runLoopModesForAnimating: NSArray; message 'runLoopModesForAnimating';
  end; external;

{ NSViewAnimation }
  NSViewAnimation = objcclass(NSAnimation)
  private
    __viewAnimations: NSArray;
    __viewAnimationInfo: CFMutableDictionaryRef;
    __windowAnimationInfo: CFMutableDictionaryRef;
    __reserved4a: culong;
    __reserved4b: culong;
    __reserved4c: culong;
    __vaFlags: bitpacked record
        reserved: 0..((1 shl 32)-1);
      end;
    __reserved5: culong;
    __reserved6: culong;
    __reserved7: culong;
    __reserved8: culong;
    
  public
    class function alloc: NSViewAnimation; message 'alloc';

    function initWithViewAnimations(viewAnimations_: NSArray): id; message 'initWithViewAnimations:';
    function viewAnimations: NSArray; message 'viewAnimations';
    procedure setViewAnimations(viewAnimations_: NSArray); message 'setViewAnimations:';
  end; external;

{$endif}
{$endif}
{$ifdef PROTOCOLS}
{$ifndef NSANIMATION_PAS_P}
{$define NSANIMATION_PAS_P}
  
{ NSAnimatablePropertyContainer Protocol }
  NSAnimatablePropertyContainerProtocol = objcprotocol
    function animator: id; message 'animator';
    function animations: NSDictionary; message 'animations';
    procedure setAnimations(dict: NSDictionary); message 'setAnimations:';
    function animationForKey(key: NSString): id; message 'animationForKey:';
  end; external name 'NSAnimatablePropertyContainer';
{$endif}
{$endif}