HIMovieView.pas 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. {
  2. File: QuickTime/HIMovieView.h
  3. Contains: HIView-based movie playback
  4. Version: QuickTime 7.1.2
  5. Copyright: © 2004-2006 by Apple Computer, Inc., all rights reserved.
  6. }
  7. { Pascal Translation: Gale R Paeper, <[email protected]>, 2006 }
  8. {
  9. Modified for use with Free Pascal
  10. Version 200
  11. Please report any bugs to <[email protected]>
  12. }
  13. {$mode macpas}
  14. {$packenum 1}
  15. {$macro on}
  16. {$inline on}
  17. {$CALLING MWPASCAL}
  18. unit HIMovieView;
  19. interface
  20. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  21. {$setc GAP_INTERFACES_VERSION := $0200}
  22. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  23. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  24. {$endc}
  25. {$ifc defined CPUPOWERPC and defined CPUI386}
  26. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  27. {$endc}
  28. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  29. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  30. {$endc}
  31. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  32. {$setc __ppc__ := 1}
  33. {$elsec}
  34. {$setc __ppc__ := 0}
  35. {$endc}
  36. {$ifc not defined __i386__ and defined CPUI386}
  37. {$setc __i386__ := 1}
  38. {$elsec}
  39. {$setc __i386__ := 0}
  40. {$endc}
  41. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  42. {$error Conflicting definitions for __ppc__ and __i386__}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__}
  45. {$setc TARGET_CPU_PPC := TRUE}
  46. {$setc TARGET_CPU_X86 := FALSE}
  47. {$elifc defined __i386__ and __i386__}
  48. {$setc TARGET_CPU_PPC := FALSE}
  49. {$setc TARGET_CPU_X86 := TRUE}
  50. {$elsec}
  51. {$error Neither __ppc__ nor __i386__ is defined.}
  52. {$endc}
  53. {$setc TARGET_CPU_PPC_64 := FALSE}
  54. {$ifc defined FPC_BIG_ENDIAN}
  55. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  56. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  57. {$elifc defined FPC_LITTLE_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  60. {$elsec}
  61. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  62. {$endc}
  63. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  64. {$setc CALL_NOT_IN_CARBON := FALSE}
  65. {$setc OLDROUTINENAMES := FALSE}
  66. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  67. {$setc OPAQUE_UPP_TYPES := TRUE}
  68. {$setc OTCARBONAPPLICATION := TRUE}
  69. {$setc OTKERNEL := FALSE}
  70. {$setc PM_USE_SESSION_APIS := TRUE}
  71. {$setc TARGET_API_MAC_CARBON := TRUE}
  72. {$setc TARGET_API_MAC_OS8 := FALSE}
  73. {$setc TARGET_API_MAC_OSX := TRUE}
  74. {$setc TARGET_CARBON := TRUE}
  75. {$setc TARGET_CPU_68K := FALSE}
  76. {$setc TARGET_CPU_MIPS := FALSE}
  77. {$setc TARGET_CPU_SPARC := FALSE}
  78. {$setc TARGET_OS_MAC := TRUE}
  79. {$setc TARGET_OS_UNIX := FALSE}
  80. {$setc TARGET_OS_WIN32 := FALSE}
  81. {$setc TARGET_RT_MAC_68881 := FALSE}
  82. {$setc TARGET_RT_MAC_CFM := FALSE}
  83. {$setc TARGET_RT_MAC_MACHO := TRUE}
  84. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  85. {$setc TYPE_BOOL := FALSE}
  86. {$setc TYPE_EXTENDED := FALSE}
  87. {$setc TYPE_LONGLONG := TRUE}
  88. uses MacTypes, HIGeometry, HIView, Movies;
  89. {$ALIGN POWER}
  90. {
  91. * kHIMovieViewClassID
  92. *
  93. * Summary:
  94. * Class ID for HIMovieView
  95. }
  96. {$ifc USE_CFSTR_CONSTANT_MACROS}
  97. {$definec kHIMovieViewClassID CFSTRP('com.apple.quicktime.HIMovieView')}
  98. {$endc}
  99. {
  100. * Summary:
  101. * HIMovieView Event class
  102. }
  103. const
  104. {
  105. * Events related to movie views.
  106. }
  107. kEventClassMovieView = $6D6F6F76 (* 'moov' *);
  108. {
  109. * kEventClassMovieView / kEventMovieViewOptimalBoundsChanged
  110. *
  111. * Summary:
  112. * Sent when the movie size changes.
  113. *
  114. * Parameters:
  115. *
  116. * --> kEventParamDirectObject (in, typeControlRef)
  117. * The movie view whose size is changing.
  118. *
  119. * --> kEventParamControlOptimalBounds (in, typeHIRect)
  120. * The new optimal bounds.
  121. *
  122. * Availability:
  123. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  124. * CarbonLib: not available
  125. }
  126. const
  127. kEventMovieViewOptimalBoundsChanged = 1;
  128. {
  129. * Summary:
  130. * HIMovieView attributes
  131. }
  132. const
  133. {
  134. * No attributes
  135. }
  136. kHIMovieViewNoAttributes = 0;
  137. {
  138. * Movie controller bar is visible below visual content
  139. }
  140. kHIMovieViewControllerVisibleAttribute = 1 shl 0;
  141. {
  142. * Automatically call MCIdle() at appropriate times
  143. }
  144. kHIMovieViewAutoIdlingAttribute = 1 shl 1;
  145. {
  146. * Accepts keyboard focus
  147. }
  148. kHIMovieViewAcceptsFocusAttribute = 1 shl 2;
  149. {
  150. * Movie editing enabled
  151. }
  152. kHIMovieViewEditableAttribute = 1 shl 3;
  153. {
  154. * Handles editing HI commands such as cut, copy and paste
  155. }
  156. kHIMovieViewHandleEditingHIAttribute = 1 shl 4;
  157. {
  158. * Combination of kHIMovieViewControllerVisibleAttribute,
  159. * kHIMovieViewAutoIdlingAttribute, and
  160. * kHIMovieViewAcceptsFocusAttribute
  161. }
  162. kHIMovieViewStandardAttributes = kHIMovieViewControllerVisibleAttribute or kHIMovieViewAutoIdlingAttribute or kHIMovieViewAcceptsFocusAttribute;
  163. {
  164. * HIMovieViewCreate()
  165. *
  166. * Summary:
  167. * Creates an HIMovieView object
  168. *
  169. * Discussion:
  170. * If successful, the created view will have a single retain count.
  171. *
  172. * Parameters:
  173. *
  174. * inMovie:
  175. * [in] Initial movie to view, may be NULL
  176. *
  177. * inAttributes:
  178. * [in] Initial HIMovieView attributes
  179. *
  180. * outMovieView:
  181. * [out] Points to variable to receive new HIMovieView
  182. *
  183. * Availability:
  184. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  185. * CarbonLib: not available
  186. * Non-Carbon CFM: not available
  187. }
  188. function HIMovieViewCreate( inMovie: Movie; inAttributes: OptionBits; var outMovieView: HIViewRef ): OSStatus; external name '_HIMovieViewCreate';
  189. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  190. {
  191. * HIMovieViewGetMovie()
  192. *
  193. * Summary:
  194. * Returns the view's current movie.
  195. *
  196. * Parameters:
  197. *
  198. * inView:
  199. * [in] The HIMovieView
  200. *
  201. * Availability:
  202. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  203. * CarbonLib: not available
  204. * Non-Carbon CFM: not available
  205. }
  206. function HIMovieViewGetMovie( inView: HIViewRef ): Movie; external name '_HIMovieViewGetMovie';
  207. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  208. {
  209. * HIMovieViewSetMovie()
  210. *
  211. * Summary:
  212. * Sets the view's current movie.
  213. *
  214. * Parameters:
  215. *
  216. * inView:
  217. * [in] The HIMovieView
  218. *
  219. * inMovie:
  220. * [in] The new movie to display
  221. *
  222. * Availability:
  223. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  224. * CarbonLib: not available
  225. * Non-Carbon CFM: not available
  226. }
  227. function HIMovieViewSetMovie( inView: HIViewRef; inMovie: Movie ): OSStatus; external name '_HIMovieViewSetMovie';
  228. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  229. {
  230. * HIMovieViewGetAttributes()
  231. *
  232. * Summary:
  233. * Returns the view's current attributes.
  234. *
  235. * Parameters:
  236. *
  237. * inView:
  238. * [in] The HIMovieView
  239. *
  240. * Availability:
  241. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  242. * CarbonLib: not available
  243. * Non-Carbon CFM: not available
  244. }
  245. function HIMovieViewGetAttributes( inView: HIViewRef ): OptionBits; external name '_HIMovieViewGetAttributes';
  246. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  247. {
  248. * HIMovieViewChangeAttributes()
  249. *
  250. * Summary:
  251. * Changes the views attributes.
  252. *
  253. * Discussion:
  254. * Setting an attribute takes precedence over clearing the attribute.
  255. *
  256. * Parameters:
  257. *
  258. * inView:
  259. * [in] The HIMovieView
  260. *
  261. * inAttributesToSet:
  262. * [in] Attributes to set
  263. *
  264. * inAttributesToClear:
  265. * [in] Attributes to clear
  266. *
  267. * Availability:
  268. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  269. * CarbonLib: not available
  270. * Non-Carbon CFM: not available
  271. }
  272. function HIMovieViewChangeAttributes( inView: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HIMovieViewChangeAttributes';
  273. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  274. {
  275. * HIMovieViewGetMovieController()
  276. *
  277. * Summary:
  278. * Returns the view's current movie controller.
  279. *
  280. * Parameters:
  281. *
  282. * inView:
  283. * [in] The HIMovieView
  284. *
  285. * Availability:
  286. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  287. * CarbonLib: not available
  288. * Non-Carbon CFM: not available
  289. }
  290. function HIMovieViewGetMovieController( inView: HIViewRef ): MovieController; external name '_HIMovieViewGetMovieController';
  291. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  292. {
  293. * HIMovieViewGetControllerBarSize()
  294. *
  295. * Summary:
  296. * Returns the size of the visible movie controller bar.
  297. *
  298. * Parameters:
  299. *
  300. * inView:
  301. * [in] The HIMovieView
  302. *
  303. * Availability:
  304. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  305. * CarbonLib: not available
  306. * Non-Carbon CFM: not available
  307. }
  308. function HIMovieViewGetControllerBarSize( inView: HIViewRef ): HISize; external name '_HIMovieViewGetControllerBarSize';
  309. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  310. {
  311. * HIMovieViewPlay()
  312. *
  313. * Summary:
  314. * Convenience routine to play the view's current movie.
  315. *
  316. * Discussion:
  317. * If the movie is already playing, this function does nothing.
  318. *
  319. * Parameters:
  320. *
  321. * movieView:
  322. * [in] The movie view.
  323. *
  324. * Availability:
  325. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  326. * CarbonLib: not available
  327. * Non-Carbon CFM: not available
  328. }
  329. function HIMovieViewPlay( movieView: HIViewRef ): OSStatus; external name '_HIMovieViewPlay';
  330. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  331. {
  332. * HIMovieViewPause()
  333. *
  334. * Summary:
  335. * Convenience routine to pause the view's current movie.
  336. *
  337. * Discussion:
  338. * If the movie is already paused, this function does nothing.
  339. *
  340. * Parameters:
  341. *
  342. * movieView:
  343. * [in] The movie view.
  344. *
  345. * Availability:
  346. * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
  347. * CarbonLib: not available
  348. * Non-Carbon CFM: not available
  349. }
  350. function HIMovieViewPause( movieView: HIViewRef ): OSStatus; external name '_HIMovieViewPause';
  351. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  352. end.