NSAnimation.inc 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. { Parsed from AppKit.framework NSAnimation.h }
  2. {$ifdef TYPES}
  3. type
  4. NSAnimationPtr = ^NSAnimation;
  5. NSViewAnimationPtr = ^NSViewAnimation;
  6. NSAnimationDelegateProtocolPtr = ^NSAnimationDelegateProtocol;
  7. NSAnimatablePropertyContainerProtocolPtr = ^NSAnimatablePropertyContainerProtocol;
  8. {$endif}
  9. {$ifdef TYPES}
  10. type
  11. NSAnimationCurve = NSUInteger;
  12. NSAnimationCurvePtr = ^NSAnimationCurve;
  13. const
  14. NSAnimationEaseInOut = 0;
  15. NSAnimationEaseIn = 1;
  16. NSAnimationEaseOut = 2;
  17. NSAnimationLinear = 3;
  18. type
  19. NSAnimationBlockingMode = NSUInteger;
  20. NSAnimationBlockingModePtr = ^NSAnimationBlockingMode;
  21. const
  22. NSAnimationBlocking = 0;
  23. NSAnimationNonblocking = 1;
  24. NSAnimationNonblockingThreaded = 2;
  25. type
  26. NSAnimationProgress = single;
  27. NSAnimationProgressPtr = ^NSAnimationProgress;
  28. {$endif}
  29. {$ifdef EXTERNAL_SYMBOLS}
  30. var
  31. NSAnimationProgressMarkNotification: NSString; cvar; external;
  32. NSAnimationProgressMark: NSString; cvar; external;
  33. {$endif}
  34. {$ifdef CLASSES}
  35. type
  36. NSAnimation = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
  37. private
  38. _duration: NSTimeInterval;
  39. _currentProgress: NSAnimationProgress;
  40. _framesPerSecond: single;
  41. _delegate: id;
  42. _displayLink: NSDisplayLink;
  43. _startTime: NSTimeInterval;
  44. _progressMarks: NSMutableArray;
  45. _startAnimation: NSAnimation;
  46. _stopAnimation: NSAnimation;
  47. _nextProgressMark: cint;
  48. _aFlags: bitpacked record
  49. case byte of
  50. 0: (_anonBitField__aFlags0: cuint);
  51. 1: (
  52. delegateAnimationShouldStart: 0..1;
  53. delegateAnimationDidStop: 0..1;
  54. delegateAnimationDidEnd: 0..1;
  55. delegateAnimationValueForProgress: 0..1;
  56. delegateAnimationDidReachProgressMark: 0..1;
  57. animating: 0..1;
  58. blocking: 0..1;
  59. reserved: 0..((1 shl 25)-1);
  60. );
  61. end;
  62. _aSettings: bitpacked record
  63. case byte of
  64. 0: (_anonBitField__aSettings0: cuint);
  65. 1: (
  66. animationCurve: 0..((1 shl 8)-1);
  67. animationBlockingMode: 0..((1 shl 2)-1);
  68. reserved: 0..((1 shl 22)-1);
  69. );
  70. end;
  71. _scheduledRunLoop: NSRunLoop;
  72. _reserved2: NSInteger;
  73. _reserved3: NSInteger;
  74. _reserved4: NSInteger;
  75. public
  76. function initWithDuration_animationCurve (duration: NSTimeInterval; animationCurve: NSAnimationCurve): instancetype; message 'initWithDuration:animationCurve:';
  77. procedure startAnimation; message 'startAnimation';
  78. procedure stopAnimation; message 'stopAnimation';
  79. function isAnimating: ObjCBOOL; message 'isAnimating';
  80. procedure setCurrentProgress(newValue: NSAnimationProgress); message 'setCurrentProgress:';
  81. function currentProgress: NSAnimationProgress; message 'currentProgress';
  82. procedure setDuration(newValue: NSTimeInterval); message 'setDuration:';
  83. function duration: NSTimeInterval; message 'duration';
  84. procedure setAnimationBlockingMode(newValue: NSAnimationBlockingMode); message 'setAnimationBlockingMode:';
  85. function animationBlockingMode: NSAnimationBlockingMode; message 'animationBlockingMode';
  86. procedure setFrameRate(newValue: single); message 'setFrameRate:';
  87. function frameRate: single; message 'frameRate';
  88. procedure setAnimationCurve(newValue: NSAnimationCurve); message 'setAnimationCurve:';
  89. function animationCurve: NSAnimationCurve; message 'animationCurve';
  90. function currentValue: single; message 'currentValue';
  91. procedure setDelegate(newValue: NSAnimationDelegateProtocol); message 'setDelegate:';
  92. function delegate: NSAnimationDelegateProtocol; message 'delegate';
  93. procedure setProgressMarks(newValue: NSArray); message 'setProgressMarks:';
  94. function progressMarks: NSArray; message 'progressMarks';
  95. procedure addProgressMark (progressMark: NSAnimationProgress); message 'addProgressMark:';
  96. procedure removeProgressMark (progressMark: NSAnimationProgress); message 'removeProgressMark:';
  97. procedure startWhenAnimation_reachesProgress (animation: NSAnimation; startProgress: NSAnimationProgress); message 'startWhenAnimation:reachesProgress:';
  98. procedure stopWhenAnimation_reachesProgress (animation: NSAnimation; stopProgress: NSAnimationProgress); message 'stopWhenAnimation:reachesProgress:';
  99. procedure clearStartAnimation; message 'clearStartAnimation';
  100. procedure clearStopAnimation; message 'clearStopAnimation';
  101. function runLoopModesForAnimating: NSArray; message 'runLoopModesForAnimating';
  102. { Adopted protocols }
  103. function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:';
  104. procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:';
  105. function initWithCoder (aDecoder: NSCoder): id; message 'initWithCoder:';
  106. end;
  107. {$endif}
  108. {$ifdef PROTOCOLS}
  109. type
  110. NSAnimationDelegateProtocol = objcprotocol external name 'NSAnimationDelegate' (NSObjectProtocol)
  111. optional
  112. function animationShouldStart (animation: NSAnimation): ObjCBOOL; message 'animationShouldStart:';
  113. procedure animationDidStop (animation: NSAnimation); message 'animationDidStop:';
  114. procedure animationDidEnd (animation: NSAnimation); message 'animationDidEnd:';
  115. function animation_valueForProgress (animation: NSAnimation; progress: NSAnimationProgress): single; message 'animation:valueForProgress:';
  116. procedure animation_didReachProgressMark (animation: NSAnimation; progress: NSAnimationProgress); message 'animation:didReachProgressMark:';
  117. end;
  118. {$endif}
  119. {$ifdef EXTERNAL_SYMBOLS}
  120. var
  121. NSViewAnimationTargetKey: NSString; cvar; external;
  122. NSViewAnimationStartFrameKey: NSString; cvar; external;
  123. NSViewAnimationEndFrameKey: NSString; cvar; external;
  124. NSViewAnimationEffectKey: NSString; cvar; external;
  125. NSViewAnimationFadeInEffect: NSString; cvar; external;
  126. NSViewAnimationFadeOutEffect: NSString; cvar; external;
  127. {$endif}
  128. {$ifdef CLASSES}
  129. type
  130. NSViewAnimation = objcclass external (NSAnimation)
  131. private
  132. _viewAnimations: NSArray;
  133. _viewAnimationInfo: id;
  134. _windowAnimationInfo: id;
  135. _reserved4a: NSUInteger;
  136. _reserved4b: NSUInteger;
  137. _reserved4c: NSUInteger;
  138. _vaFlags: bitpacked record
  139. case byte of
  140. 0: (_anonBitField__vaFlags0: cuint);
  141. 1: (
  142. reserved: 0..((1 shl 32)-1);
  143. );
  144. end;
  145. _reserved5: NSUInteger;
  146. _reserved6: NSUInteger;
  147. _reserved7: NSUInteger;
  148. _reserved8: NSUInteger;
  149. public
  150. function initWithViewAnimations (viewAnimations: NSArray): instancetype; message 'initWithViewAnimations:';
  151. procedure setViewAnimations(newValue: NSArray); message 'setViewAnimations:';
  152. function viewAnimations: NSArray; message 'viewAnimations';
  153. end;
  154. {$endif}
  155. {$ifdef PROTOCOLS}
  156. type
  157. NSAnimatablePropertyContainerProtocol = objcprotocol external name 'NSAnimatablePropertyContainer'
  158. function animator: instancetype; message 'animator'; { available in 10_5 }
  159. function animations: NSDictionary; message 'animations'; { available in 10_5 }
  160. procedure setAnimations (animations_: NSDictionary); message 'setAnimations:'; { available in 10_5 }
  161. function animationForKey (key: NSString): id; message 'animationForKey:'; { available in 10_5 }
  162. class function defaultAnimationForKey (key: NSString): id; message 'defaultAnimationForKey:'; { available in 10_5 }
  163. end;
  164. {$endif}
  165. {$ifdef EXTERNAL_SYMBOLS}
  166. var
  167. NSAnimationTriggerOrderIn: NSString { available in 10_5 }; cvar; external;
  168. NSAnimationTriggerOrderOut: NSString { available in 10_5 }; cvar; external;
  169. {$endif}