PageRenderTime 120ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 1ms

/Mac/Modules/qt/_Qtmodule.c

http://unladen-swallow.googlecode.com/
C | 17503 lines | 16541 code | 929 blank | 33 comment | 1152 complexity | 22bb6d839073acbab8d527a7d47c5c11 MD5 | raw file
Possible License(s): 0BSD, BSD-3-Clause
  1. /* =========================== Module _Qt =========================== */
  2. #include "Python.h"
  3. #ifndef __LP64__
  4. #include "pymactoolbox.h"
  5. /* Macro to test whether a weak-loaded CFM function exists */
  6. #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
  7. PyErr_SetString(PyExc_NotImplementedError, \
  8. "Not available in this shared library/OS version"); \
  9. return NULL; \
  10. }} while(0)
  11. #include <QuickTime/QuickTime.h>
  12. #ifdef USE_TOOLBOX_OBJECT_GLUE
  13. extern PyObject *_TrackObj_New(Track);
  14. extern int _TrackObj_Convert(PyObject *, Track *);
  15. extern PyObject *_MovieObj_New(Movie);
  16. extern int _MovieObj_Convert(PyObject *, Movie *);
  17. extern PyObject *_MovieCtlObj_New(MovieController);
  18. extern int _MovieCtlObj_Convert(PyObject *, MovieController *);
  19. extern PyObject *_TimeBaseObj_New(TimeBase);
  20. extern int _TimeBaseObj_Convert(PyObject *, TimeBase *);
  21. extern PyObject *_UserDataObj_New(UserData);
  22. extern int _UserDataObj_Convert(PyObject *, UserData *);
  23. extern PyObject *_MediaObj_New(Media);
  24. extern int _MediaObj_Convert(PyObject *, Media *);
  25. #define TrackObj_New _TrackObj_New
  26. #define TrackObj_Convert _TrackObj_Convert
  27. #define MovieObj_New _MovieObj_New
  28. #define MovieObj_Convert _MovieObj_Convert
  29. #define MovieCtlObj_New _MovieCtlObj_New
  30. #define MovieCtlObj_Convert _MovieCtlObj_Convert
  31. #define TimeBaseObj_New _TimeBaseObj_New
  32. #define TimeBaseObj_Convert _TimeBaseObj_Convert
  33. #define UserDataObj_New _UserDataObj_New
  34. #define UserDataObj_Convert _UserDataObj_Convert
  35. #define MediaObj_New _MediaObj_New
  36. #define MediaObj_Convert _MediaObj_Convert
  37. #endif
  38. /* Macro to allow us to GetNextInterestingTime without duration */
  39. #define GetMediaNextInterestingTimeOnly(media, flags, time, rate, rv) GetMediaNextInterestingTime(media, flags, time, rate, rv, NULL)
  40. /*
  41. ** Parse/generate time records
  42. */
  43. static PyObject *
  44. QtTimeRecord_New(TimeRecord *itself)
  45. {
  46. if (itself->base)
  47. return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale,
  48. TimeBaseObj_New, itself->base);
  49. else
  50. return Py_BuildValue("O&lO", PyMac_Buildwide, &itself->value, itself->scale,
  51. Py_None);
  52. }
  53. static int
  54. QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself)
  55. {
  56. PyObject *base = NULL;
  57. if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale,
  58. &base) )
  59. return 0;
  60. if ( base == NULL || base == Py_None )
  61. p_itself->base = NULL;
  62. else
  63. if ( !TimeBaseObj_Convert(base, &p_itself->base) )
  64. return 0;
  65. return 1;
  66. }
  67. static int
  68. QtMusicMIDIPacket_Convert(PyObject *v, MusicMIDIPacket *p_itself)
  69. {
  70. int dummy;
  71. if( !PyArg_ParseTuple(v, "hls#", &p_itself->length, &p_itself->reserved, p_itself->data, dummy) )
  72. return 0;
  73. return 1;
  74. }
  75. static PyObject *Qt_Error;
  76. /* -------------------- Object type IdleManager --------------------- */
  77. PyTypeObject IdleManager_Type;
  78. #define IdleManagerObj_Check(x) ((x)->ob_type == &IdleManager_Type || PyObject_TypeCheck((x), &IdleManager_Type))
  79. typedef struct IdleManagerObject {
  80. PyObject_HEAD
  81. IdleManager ob_itself;
  82. } IdleManagerObject;
  83. PyObject *IdleManagerObj_New(IdleManager itself)
  84. {
  85. IdleManagerObject *it;
  86. if (itself == NULL) {
  87. PyErr_SetString(Qt_Error,"Cannot create IdleManager from NULL pointer");
  88. return NULL;
  89. }
  90. it = PyObject_NEW(IdleManagerObject, &IdleManager_Type);
  91. if (it == NULL) return NULL;
  92. it->ob_itself = itself;
  93. return (PyObject *)it;
  94. }
  95. int IdleManagerObj_Convert(PyObject *v, IdleManager *p_itself)
  96. {
  97. if (v == Py_None)
  98. {
  99. *p_itself = NULL;
  100. return 1;
  101. }
  102. if (!IdleManagerObj_Check(v))
  103. {
  104. PyErr_SetString(PyExc_TypeError, "IdleManager required");
  105. return 0;
  106. }
  107. *p_itself = ((IdleManagerObject *)v)->ob_itself;
  108. return 1;
  109. }
  110. static void IdleManagerObj_dealloc(IdleManagerObject *self)
  111. {
  112. /* Cleanup of self->ob_itself goes here */
  113. self->ob_type->tp_free((PyObject *)self);
  114. }
  115. static PyMethodDef IdleManagerObj_methods[] = {
  116. {NULL, NULL, 0}
  117. };
  118. #define IdleManagerObj_getsetlist NULL
  119. #define IdleManagerObj_compare NULL
  120. #define IdleManagerObj_repr NULL
  121. #define IdleManagerObj_hash NULL
  122. #define IdleManagerObj_tp_init 0
  123. #define IdleManagerObj_tp_alloc PyType_GenericAlloc
  124. static PyObject *IdleManagerObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  125. {
  126. PyObject *_self;
  127. IdleManager itself;
  128. char *kw[] = {"itself", 0};
  129. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IdleManagerObj_Convert, &itself)) return NULL;
  130. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  131. ((IdleManagerObject *)_self)->ob_itself = itself;
  132. return _self;
  133. }
  134. #define IdleManagerObj_tp_free PyObject_Del
  135. PyTypeObject IdleManager_Type = {
  136. PyObject_HEAD_INIT(NULL)
  137. 0, /*ob_size*/
  138. "_Qt.IdleManager", /*tp_name*/
  139. sizeof(IdleManagerObject), /*tp_basicsize*/
  140. 0, /*tp_itemsize*/
  141. /* methods */
  142. (destructor) IdleManagerObj_dealloc, /*tp_dealloc*/
  143. 0, /*tp_print*/
  144. (getattrfunc)0, /*tp_getattr*/
  145. (setattrfunc)0, /*tp_setattr*/
  146. (cmpfunc) IdleManagerObj_compare, /*tp_compare*/
  147. (reprfunc) IdleManagerObj_repr, /*tp_repr*/
  148. (PyNumberMethods *)0, /* tp_as_number */
  149. (PySequenceMethods *)0, /* tp_as_sequence */
  150. (PyMappingMethods *)0, /* tp_as_mapping */
  151. (hashfunc) IdleManagerObj_hash, /*tp_hash*/
  152. 0, /*tp_call*/
  153. 0, /*tp_str*/
  154. PyObject_GenericGetAttr, /*tp_getattro*/
  155. PyObject_GenericSetAttr, /*tp_setattro */
  156. 0, /*tp_as_buffer*/
  157. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  158. 0, /*tp_doc*/
  159. 0, /*tp_traverse*/
  160. 0, /*tp_clear*/
  161. 0, /*tp_richcompare*/
  162. 0, /*tp_weaklistoffset*/
  163. 0, /*tp_iter*/
  164. 0, /*tp_iternext*/
  165. IdleManagerObj_methods, /* tp_methods */
  166. 0, /*tp_members*/
  167. IdleManagerObj_getsetlist, /*tp_getset*/
  168. 0, /*tp_base*/
  169. 0, /*tp_dict*/
  170. 0, /*tp_descr_get*/
  171. 0, /*tp_descr_set*/
  172. 0, /*tp_dictoffset*/
  173. IdleManagerObj_tp_init, /* tp_init */
  174. IdleManagerObj_tp_alloc, /* tp_alloc */
  175. IdleManagerObj_tp_new, /* tp_new */
  176. IdleManagerObj_tp_free, /* tp_free */
  177. };
  178. /* ------------------ End object type IdleManager ------------------- */
  179. /* ------------------ Object type MovieController ------------------- */
  180. PyTypeObject MovieController_Type;
  181. #define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type || PyObject_TypeCheck((x), &MovieController_Type))
  182. typedef struct MovieControllerObject {
  183. PyObject_HEAD
  184. MovieController ob_itself;
  185. } MovieControllerObject;
  186. PyObject *MovieCtlObj_New(MovieController itself)
  187. {
  188. MovieControllerObject *it;
  189. if (itself == NULL) {
  190. PyErr_SetString(Qt_Error,"Cannot create MovieController from NULL pointer");
  191. return NULL;
  192. }
  193. it = PyObject_NEW(MovieControllerObject, &MovieController_Type);
  194. if (it == NULL) return NULL;
  195. it->ob_itself = itself;
  196. return (PyObject *)it;
  197. }
  198. int MovieCtlObj_Convert(PyObject *v, MovieController *p_itself)
  199. {
  200. if (v == Py_None)
  201. {
  202. *p_itself = NULL;
  203. return 1;
  204. }
  205. if (!MovieCtlObj_Check(v))
  206. {
  207. PyErr_SetString(PyExc_TypeError, "MovieController required");
  208. return 0;
  209. }
  210. *p_itself = ((MovieControllerObject *)v)->ob_itself;
  211. return 1;
  212. }
  213. static void MovieCtlObj_dealloc(MovieControllerObject *self)
  214. {
  215. if (self->ob_itself) DisposeMovieController(self->ob_itself);
  216. self->ob_type->tp_free((PyObject *)self);
  217. }
  218. static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args)
  219. {
  220. PyObject *_res = NULL;
  221. ComponentResult _rv;
  222. Movie theMovie;
  223. WindowPtr movieWindow;
  224. Point where;
  225. #ifndef MCSetMovie
  226. PyMac_PRECHECK(MCSetMovie);
  227. #endif
  228. if (!PyArg_ParseTuple(_args, "O&O&O&",
  229. MovieObj_Convert, &theMovie,
  230. WinObj_Convert, &movieWindow,
  231. PyMac_GetPoint, &where))
  232. return NULL;
  233. _rv = MCSetMovie(_self->ob_itself,
  234. theMovie,
  235. movieWindow,
  236. where);
  237. _res = Py_BuildValue("l",
  238. _rv);
  239. return _res;
  240. }
  241. static PyObject *MovieCtlObj_MCGetIndMovie(MovieControllerObject *_self, PyObject *_args)
  242. {
  243. PyObject *_res = NULL;
  244. Movie _rv;
  245. short index;
  246. #ifndef MCGetIndMovie
  247. PyMac_PRECHECK(MCGetIndMovie);
  248. #endif
  249. if (!PyArg_ParseTuple(_args, "h",
  250. &index))
  251. return NULL;
  252. _rv = MCGetIndMovie(_self->ob_itself,
  253. index);
  254. _res = Py_BuildValue("O&",
  255. MovieObj_New, _rv);
  256. return _res;
  257. }
  258. static PyObject *MovieCtlObj_MCRemoveAllMovies(MovieControllerObject *_self, PyObject *_args)
  259. {
  260. PyObject *_res = NULL;
  261. ComponentResult _rv;
  262. #ifndef MCRemoveAllMovies
  263. PyMac_PRECHECK(MCRemoveAllMovies);
  264. #endif
  265. if (!PyArg_ParseTuple(_args, ""))
  266. return NULL;
  267. _rv = MCRemoveAllMovies(_self->ob_itself);
  268. _res = Py_BuildValue("l",
  269. _rv);
  270. return _res;
  271. }
  272. static PyObject *MovieCtlObj_MCRemoveAMovie(MovieControllerObject *_self, PyObject *_args)
  273. {
  274. PyObject *_res = NULL;
  275. ComponentResult _rv;
  276. Movie m;
  277. #ifndef MCRemoveAMovie
  278. PyMac_PRECHECK(MCRemoveAMovie);
  279. #endif
  280. if (!PyArg_ParseTuple(_args, "O&",
  281. MovieObj_Convert, &m))
  282. return NULL;
  283. _rv = MCRemoveAMovie(_self->ob_itself,
  284. m);
  285. _res = Py_BuildValue("l",
  286. _rv);
  287. return _res;
  288. }
  289. static PyObject *MovieCtlObj_MCRemoveMovie(MovieControllerObject *_self, PyObject *_args)
  290. {
  291. PyObject *_res = NULL;
  292. ComponentResult _rv;
  293. #ifndef MCRemoveMovie
  294. PyMac_PRECHECK(MCRemoveMovie);
  295. #endif
  296. if (!PyArg_ParseTuple(_args, ""))
  297. return NULL;
  298. _rv = MCRemoveMovie(_self->ob_itself);
  299. _res = Py_BuildValue("l",
  300. _rv);
  301. return _res;
  302. }
  303. static PyObject *MovieCtlObj_MCIsPlayerEvent(MovieControllerObject *_self, PyObject *_args)
  304. {
  305. PyObject *_res = NULL;
  306. ComponentResult _rv;
  307. EventRecord e;
  308. #ifndef MCIsPlayerEvent
  309. PyMac_PRECHECK(MCIsPlayerEvent);
  310. #endif
  311. if (!PyArg_ParseTuple(_args, "O&",
  312. PyMac_GetEventRecord, &e))
  313. return NULL;
  314. _rv = MCIsPlayerEvent(_self->ob_itself,
  315. &e);
  316. _res = Py_BuildValue("l",
  317. _rv);
  318. return _res;
  319. }
  320. static PyObject *MovieCtlObj_MCDoAction(MovieControllerObject *_self, PyObject *_args)
  321. {
  322. PyObject *_res = NULL;
  323. ComponentResult _rv;
  324. short action;
  325. void * params;
  326. #ifndef MCDoAction
  327. PyMac_PRECHECK(MCDoAction);
  328. #endif
  329. if (!PyArg_ParseTuple(_args, "hs",
  330. &action,
  331. &params))
  332. return NULL;
  333. _rv = MCDoAction(_self->ob_itself,
  334. action,
  335. params);
  336. _res = Py_BuildValue("l",
  337. _rv);
  338. return _res;
  339. }
  340. static PyObject *MovieCtlObj_MCSetControllerAttached(MovieControllerObject *_self, PyObject *_args)
  341. {
  342. PyObject *_res = NULL;
  343. ComponentResult _rv;
  344. Boolean attach;
  345. #ifndef MCSetControllerAttached
  346. PyMac_PRECHECK(MCSetControllerAttached);
  347. #endif
  348. if (!PyArg_ParseTuple(_args, "b",
  349. &attach))
  350. return NULL;
  351. _rv = MCSetControllerAttached(_self->ob_itself,
  352. attach);
  353. _res = Py_BuildValue("l",
  354. _rv);
  355. return _res;
  356. }
  357. static PyObject *MovieCtlObj_MCIsControllerAttached(MovieControllerObject *_self, PyObject *_args)
  358. {
  359. PyObject *_res = NULL;
  360. ComponentResult _rv;
  361. #ifndef MCIsControllerAttached
  362. PyMac_PRECHECK(MCIsControllerAttached);
  363. #endif
  364. if (!PyArg_ParseTuple(_args, ""))
  365. return NULL;
  366. _rv = MCIsControllerAttached(_self->ob_itself);
  367. _res = Py_BuildValue("l",
  368. _rv);
  369. return _res;
  370. }
  371. static PyObject *MovieCtlObj_MCSetControllerPort(MovieControllerObject *_self, PyObject *_args)
  372. {
  373. PyObject *_res = NULL;
  374. ComponentResult _rv;
  375. CGrafPtr gp;
  376. #ifndef MCSetControllerPort
  377. PyMac_PRECHECK(MCSetControllerPort);
  378. #endif
  379. if (!PyArg_ParseTuple(_args, "O&",
  380. GrafObj_Convert, &gp))
  381. return NULL;
  382. _rv = MCSetControllerPort(_self->ob_itself,
  383. gp);
  384. _res = Py_BuildValue("l",
  385. _rv);
  386. return _res;
  387. }
  388. static PyObject *MovieCtlObj_MCGetControllerPort(MovieControllerObject *_self, PyObject *_args)
  389. {
  390. PyObject *_res = NULL;
  391. CGrafPtr _rv;
  392. #ifndef MCGetControllerPort
  393. PyMac_PRECHECK(MCGetControllerPort);
  394. #endif
  395. if (!PyArg_ParseTuple(_args, ""))
  396. return NULL;
  397. _rv = MCGetControllerPort(_self->ob_itself);
  398. _res = Py_BuildValue("O&",
  399. GrafObj_New, _rv);
  400. return _res;
  401. }
  402. static PyObject *MovieCtlObj_MCSetVisible(MovieControllerObject *_self, PyObject *_args)
  403. {
  404. PyObject *_res = NULL;
  405. ComponentResult _rv;
  406. Boolean visible;
  407. #ifndef MCSetVisible
  408. PyMac_PRECHECK(MCSetVisible);
  409. #endif
  410. if (!PyArg_ParseTuple(_args, "b",
  411. &visible))
  412. return NULL;
  413. _rv = MCSetVisible(_self->ob_itself,
  414. visible);
  415. _res = Py_BuildValue("l",
  416. _rv);
  417. return _res;
  418. }
  419. static PyObject *MovieCtlObj_MCGetVisible(MovieControllerObject *_self, PyObject *_args)
  420. {
  421. PyObject *_res = NULL;
  422. ComponentResult _rv;
  423. #ifndef MCGetVisible
  424. PyMac_PRECHECK(MCGetVisible);
  425. #endif
  426. if (!PyArg_ParseTuple(_args, ""))
  427. return NULL;
  428. _rv = MCGetVisible(_self->ob_itself);
  429. _res = Py_BuildValue("l",
  430. _rv);
  431. return _res;
  432. }
  433. static PyObject *MovieCtlObj_MCGetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
  434. {
  435. PyObject *_res = NULL;
  436. ComponentResult _rv;
  437. Rect bounds;
  438. #ifndef MCGetControllerBoundsRect
  439. PyMac_PRECHECK(MCGetControllerBoundsRect);
  440. #endif
  441. if (!PyArg_ParseTuple(_args, ""))
  442. return NULL;
  443. _rv = MCGetControllerBoundsRect(_self->ob_itself,
  444. &bounds);
  445. _res = Py_BuildValue("lO&",
  446. _rv,
  447. PyMac_BuildRect, &bounds);
  448. return _res;
  449. }
  450. static PyObject *MovieCtlObj_MCSetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
  451. {
  452. PyObject *_res = NULL;
  453. ComponentResult _rv;
  454. Rect bounds;
  455. #ifndef MCSetControllerBoundsRect
  456. PyMac_PRECHECK(MCSetControllerBoundsRect);
  457. #endif
  458. if (!PyArg_ParseTuple(_args, "O&",
  459. PyMac_GetRect, &bounds))
  460. return NULL;
  461. _rv = MCSetControllerBoundsRect(_self->ob_itself,
  462. &bounds);
  463. _res = Py_BuildValue("l",
  464. _rv);
  465. return _res;
  466. }
  467. static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(MovieControllerObject *_self, PyObject *_args)
  468. {
  469. PyObject *_res = NULL;
  470. RgnHandle _rv;
  471. #ifndef MCGetControllerBoundsRgn
  472. PyMac_PRECHECK(MCGetControllerBoundsRgn);
  473. #endif
  474. if (!PyArg_ParseTuple(_args, ""))
  475. return NULL;
  476. _rv = MCGetControllerBoundsRgn(_self->ob_itself);
  477. _res = Py_BuildValue("O&",
  478. ResObj_New, _rv);
  479. return _res;
  480. }
  481. static PyObject *MovieCtlObj_MCGetWindowRgn(MovieControllerObject *_self, PyObject *_args)
  482. {
  483. PyObject *_res = NULL;
  484. RgnHandle _rv;
  485. WindowPtr w;
  486. #ifndef MCGetWindowRgn
  487. PyMac_PRECHECK(MCGetWindowRgn);
  488. #endif
  489. if (!PyArg_ParseTuple(_args, "O&",
  490. WinObj_Convert, &w))
  491. return NULL;
  492. _rv = MCGetWindowRgn(_self->ob_itself,
  493. w);
  494. _res = Py_BuildValue("O&",
  495. ResObj_New, _rv);
  496. return _res;
  497. }
  498. static PyObject *MovieCtlObj_MCMovieChanged(MovieControllerObject *_self, PyObject *_args)
  499. {
  500. PyObject *_res = NULL;
  501. ComponentResult _rv;
  502. Movie m;
  503. #ifndef MCMovieChanged
  504. PyMac_PRECHECK(MCMovieChanged);
  505. #endif
  506. if (!PyArg_ParseTuple(_args, "O&",
  507. MovieObj_Convert, &m))
  508. return NULL;
  509. _rv = MCMovieChanged(_self->ob_itself,
  510. m);
  511. _res = Py_BuildValue("l",
  512. _rv);
  513. return _res;
  514. }
  515. static PyObject *MovieCtlObj_MCSetDuration(MovieControllerObject *_self, PyObject *_args)
  516. {
  517. PyObject *_res = NULL;
  518. ComponentResult _rv;
  519. TimeValue duration;
  520. #ifndef MCSetDuration
  521. PyMac_PRECHECK(MCSetDuration);
  522. #endif
  523. if (!PyArg_ParseTuple(_args, "l",
  524. &duration))
  525. return NULL;
  526. _rv = MCSetDuration(_self->ob_itself,
  527. duration);
  528. _res = Py_BuildValue("l",
  529. _rv);
  530. return _res;
  531. }
  532. static PyObject *MovieCtlObj_MCGetCurrentTime(MovieControllerObject *_self, PyObject *_args)
  533. {
  534. PyObject *_res = NULL;
  535. TimeValue _rv;
  536. TimeScale scale;
  537. #ifndef MCGetCurrentTime
  538. PyMac_PRECHECK(MCGetCurrentTime);
  539. #endif
  540. if (!PyArg_ParseTuple(_args, ""))
  541. return NULL;
  542. _rv = MCGetCurrentTime(_self->ob_itself,
  543. &scale);
  544. _res = Py_BuildValue("ll",
  545. _rv,
  546. scale);
  547. return _res;
  548. }
  549. static PyObject *MovieCtlObj_MCNewAttachedController(MovieControllerObject *_self, PyObject *_args)
  550. {
  551. PyObject *_res = NULL;
  552. ComponentResult _rv;
  553. Movie theMovie;
  554. WindowPtr w;
  555. Point where;
  556. #ifndef MCNewAttachedController
  557. PyMac_PRECHECK(MCNewAttachedController);
  558. #endif
  559. if (!PyArg_ParseTuple(_args, "O&O&O&",
  560. MovieObj_Convert, &theMovie,
  561. WinObj_Convert, &w,
  562. PyMac_GetPoint, &where))
  563. return NULL;
  564. _rv = MCNewAttachedController(_self->ob_itself,
  565. theMovie,
  566. w,
  567. where);
  568. _res = Py_BuildValue("l",
  569. _rv);
  570. return _res;
  571. }
  572. static PyObject *MovieCtlObj_MCDraw(MovieControllerObject *_self, PyObject *_args)
  573. {
  574. PyObject *_res = NULL;
  575. ComponentResult _rv;
  576. WindowPtr w;
  577. #ifndef MCDraw
  578. PyMac_PRECHECK(MCDraw);
  579. #endif
  580. if (!PyArg_ParseTuple(_args, "O&",
  581. WinObj_Convert, &w))
  582. return NULL;
  583. _rv = MCDraw(_self->ob_itself,
  584. w);
  585. _res = Py_BuildValue("l",
  586. _rv);
  587. return _res;
  588. }
  589. static PyObject *MovieCtlObj_MCActivate(MovieControllerObject *_self, PyObject *_args)
  590. {
  591. PyObject *_res = NULL;
  592. ComponentResult _rv;
  593. WindowPtr w;
  594. Boolean activate;
  595. #ifndef MCActivate
  596. PyMac_PRECHECK(MCActivate);
  597. #endif
  598. if (!PyArg_ParseTuple(_args, "O&b",
  599. WinObj_Convert, &w,
  600. &activate))
  601. return NULL;
  602. _rv = MCActivate(_self->ob_itself,
  603. w,
  604. activate);
  605. _res = Py_BuildValue("l",
  606. _rv);
  607. return _res;
  608. }
  609. static PyObject *MovieCtlObj_MCIdle(MovieControllerObject *_self, PyObject *_args)
  610. {
  611. PyObject *_res = NULL;
  612. ComponentResult _rv;
  613. #ifndef MCIdle
  614. PyMac_PRECHECK(MCIdle);
  615. #endif
  616. if (!PyArg_ParseTuple(_args, ""))
  617. return NULL;
  618. _rv = MCIdle(_self->ob_itself);
  619. _res = Py_BuildValue("l",
  620. _rv);
  621. return _res;
  622. }
  623. static PyObject *MovieCtlObj_MCKey(MovieControllerObject *_self, PyObject *_args)
  624. {
  625. PyObject *_res = NULL;
  626. ComponentResult _rv;
  627. SInt8 key;
  628. long modifiers;
  629. #ifndef MCKey
  630. PyMac_PRECHECK(MCKey);
  631. #endif
  632. if (!PyArg_ParseTuple(_args, "bl",
  633. &key,
  634. &modifiers))
  635. return NULL;
  636. _rv = MCKey(_self->ob_itself,
  637. key,
  638. modifiers);
  639. _res = Py_BuildValue("l",
  640. _rv);
  641. return _res;
  642. }
  643. static PyObject *MovieCtlObj_MCClick(MovieControllerObject *_self, PyObject *_args)
  644. {
  645. PyObject *_res = NULL;
  646. ComponentResult _rv;
  647. WindowPtr w;
  648. Point where;
  649. long when;
  650. long modifiers;
  651. #ifndef MCClick
  652. PyMac_PRECHECK(MCClick);
  653. #endif
  654. if (!PyArg_ParseTuple(_args, "O&O&ll",
  655. WinObj_Convert, &w,
  656. PyMac_GetPoint, &where,
  657. &when,
  658. &modifiers))
  659. return NULL;
  660. _rv = MCClick(_self->ob_itself,
  661. w,
  662. where,
  663. when,
  664. modifiers);
  665. _res = Py_BuildValue("l",
  666. _rv);
  667. return _res;
  668. }
  669. static PyObject *MovieCtlObj_MCEnableEditing(MovieControllerObject *_self, PyObject *_args)
  670. {
  671. PyObject *_res = NULL;
  672. ComponentResult _rv;
  673. Boolean enabled;
  674. #ifndef MCEnableEditing
  675. PyMac_PRECHECK(MCEnableEditing);
  676. #endif
  677. if (!PyArg_ParseTuple(_args, "b",
  678. &enabled))
  679. return NULL;
  680. _rv = MCEnableEditing(_self->ob_itself,
  681. enabled);
  682. _res = Py_BuildValue("l",
  683. _rv);
  684. return _res;
  685. }
  686. static PyObject *MovieCtlObj_MCIsEditingEnabled(MovieControllerObject *_self, PyObject *_args)
  687. {
  688. PyObject *_res = NULL;
  689. long _rv;
  690. #ifndef MCIsEditingEnabled
  691. PyMac_PRECHECK(MCIsEditingEnabled);
  692. #endif
  693. if (!PyArg_ParseTuple(_args, ""))
  694. return NULL;
  695. _rv = MCIsEditingEnabled(_self->ob_itself);
  696. _res = Py_BuildValue("l",
  697. _rv);
  698. return _res;
  699. }
  700. static PyObject *MovieCtlObj_MCCopy(MovieControllerObject *_self, PyObject *_args)
  701. {
  702. PyObject *_res = NULL;
  703. Movie _rv;
  704. #ifndef MCCopy
  705. PyMac_PRECHECK(MCCopy);
  706. #endif
  707. if (!PyArg_ParseTuple(_args, ""))
  708. return NULL;
  709. _rv = MCCopy(_self->ob_itself);
  710. _res = Py_BuildValue("O&",
  711. MovieObj_New, _rv);
  712. return _res;
  713. }
  714. static PyObject *MovieCtlObj_MCCut(MovieControllerObject *_self, PyObject *_args)
  715. {
  716. PyObject *_res = NULL;
  717. Movie _rv;
  718. #ifndef MCCut
  719. PyMac_PRECHECK(MCCut);
  720. #endif
  721. if (!PyArg_ParseTuple(_args, ""))
  722. return NULL;
  723. _rv = MCCut(_self->ob_itself);
  724. _res = Py_BuildValue("O&",
  725. MovieObj_New, _rv);
  726. return _res;
  727. }
  728. static PyObject *MovieCtlObj_MCPaste(MovieControllerObject *_self, PyObject *_args)
  729. {
  730. PyObject *_res = NULL;
  731. ComponentResult _rv;
  732. Movie srcMovie;
  733. #ifndef MCPaste
  734. PyMac_PRECHECK(MCPaste);
  735. #endif
  736. if (!PyArg_ParseTuple(_args, "O&",
  737. MovieObj_Convert, &srcMovie))
  738. return NULL;
  739. _rv = MCPaste(_self->ob_itself,
  740. srcMovie);
  741. _res = Py_BuildValue("l",
  742. _rv);
  743. return _res;
  744. }
  745. static PyObject *MovieCtlObj_MCClear(MovieControllerObject *_self, PyObject *_args)
  746. {
  747. PyObject *_res = NULL;
  748. ComponentResult _rv;
  749. #ifndef MCClear
  750. PyMac_PRECHECK(MCClear);
  751. #endif
  752. if (!PyArg_ParseTuple(_args, ""))
  753. return NULL;
  754. _rv = MCClear(_self->ob_itself);
  755. _res = Py_BuildValue("l",
  756. _rv);
  757. return _res;
  758. }
  759. static PyObject *MovieCtlObj_MCUndo(MovieControllerObject *_self, PyObject *_args)
  760. {
  761. PyObject *_res = NULL;
  762. ComponentResult _rv;
  763. #ifndef MCUndo
  764. PyMac_PRECHECK(MCUndo);
  765. #endif
  766. if (!PyArg_ParseTuple(_args, ""))
  767. return NULL;
  768. _rv = MCUndo(_self->ob_itself);
  769. _res = Py_BuildValue("l",
  770. _rv);
  771. return _res;
  772. }
  773. static PyObject *MovieCtlObj_MCPositionController(MovieControllerObject *_self, PyObject *_args)
  774. {
  775. PyObject *_res = NULL;
  776. ComponentResult _rv;
  777. Rect movieRect;
  778. Rect controllerRect;
  779. long someFlags;
  780. #ifndef MCPositionController
  781. PyMac_PRECHECK(MCPositionController);
  782. #endif
  783. if (!PyArg_ParseTuple(_args, "O&O&l",
  784. PyMac_GetRect, &movieRect,
  785. PyMac_GetRect, &controllerRect,
  786. &someFlags))
  787. return NULL;
  788. _rv = MCPositionController(_self->ob_itself,
  789. &movieRect,
  790. &controllerRect,
  791. someFlags);
  792. _res = Py_BuildValue("l",
  793. _rv);
  794. return _res;
  795. }
  796. static PyObject *MovieCtlObj_MCGetControllerInfo(MovieControllerObject *_self, PyObject *_args)
  797. {
  798. PyObject *_res = NULL;
  799. ComponentResult _rv;
  800. long someFlags;
  801. #ifndef MCGetControllerInfo
  802. PyMac_PRECHECK(MCGetControllerInfo);
  803. #endif
  804. if (!PyArg_ParseTuple(_args, ""))
  805. return NULL;
  806. _rv = MCGetControllerInfo(_self->ob_itself,
  807. &someFlags);
  808. _res = Py_BuildValue("ll",
  809. _rv,
  810. someFlags);
  811. return _res;
  812. }
  813. static PyObject *MovieCtlObj_MCSetClip(MovieControllerObject *_self, PyObject *_args)
  814. {
  815. PyObject *_res = NULL;
  816. ComponentResult _rv;
  817. RgnHandle theClip;
  818. RgnHandle movieClip;
  819. #ifndef MCSetClip
  820. PyMac_PRECHECK(MCSetClip);
  821. #endif
  822. if (!PyArg_ParseTuple(_args, "O&O&",
  823. ResObj_Convert, &theClip,
  824. ResObj_Convert, &movieClip))
  825. return NULL;
  826. _rv = MCSetClip(_self->ob_itself,
  827. theClip,
  828. movieClip);
  829. _res = Py_BuildValue("l",
  830. _rv);
  831. return _res;
  832. }
  833. static PyObject *MovieCtlObj_MCGetClip(MovieControllerObject *_self, PyObject *_args)
  834. {
  835. PyObject *_res = NULL;
  836. ComponentResult _rv;
  837. RgnHandle theClip;
  838. RgnHandle movieClip;
  839. #ifndef MCGetClip
  840. PyMac_PRECHECK(MCGetClip);
  841. #endif
  842. if (!PyArg_ParseTuple(_args, ""))
  843. return NULL;
  844. _rv = MCGetClip(_self->ob_itself,
  845. &theClip,
  846. &movieClip);
  847. _res = Py_BuildValue("lO&O&",
  848. _rv,
  849. ResObj_New, theClip,
  850. ResObj_New, movieClip);
  851. return _res;
  852. }
  853. static PyObject *MovieCtlObj_MCDrawBadge(MovieControllerObject *_self, PyObject *_args)
  854. {
  855. PyObject *_res = NULL;
  856. ComponentResult _rv;
  857. RgnHandle movieRgn;
  858. RgnHandle badgeRgn;
  859. #ifndef MCDrawBadge
  860. PyMac_PRECHECK(MCDrawBadge);
  861. #endif
  862. if (!PyArg_ParseTuple(_args, "O&",
  863. ResObj_Convert, &movieRgn))
  864. return NULL;
  865. _rv = MCDrawBadge(_self->ob_itself,
  866. movieRgn,
  867. &badgeRgn);
  868. _res = Py_BuildValue("lO&",
  869. _rv,
  870. ResObj_New, badgeRgn);
  871. return _res;
  872. }
  873. static PyObject *MovieCtlObj_MCSetUpEditMenu(MovieControllerObject *_self, PyObject *_args)
  874. {
  875. PyObject *_res = NULL;
  876. ComponentResult _rv;
  877. long modifiers;
  878. MenuHandle mh;
  879. #ifndef MCSetUpEditMenu
  880. PyMac_PRECHECK(MCSetUpEditMenu);
  881. #endif
  882. if (!PyArg_ParseTuple(_args, "lO&",
  883. &modifiers,
  884. MenuObj_Convert, &mh))
  885. return NULL;
  886. _rv = MCSetUpEditMenu(_self->ob_itself,
  887. modifiers,
  888. mh);
  889. _res = Py_BuildValue("l",
  890. _rv);
  891. return _res;
  892. }
  893. static PyObject *MovieCtlObj_MCGetMenuString(MovieControllerObject *_self, PyObject *_args)
  894. {
  895. PyObject *_res = NULL;
  896. ComponentResult _rv;
  897. long modifiers;
  898. short item;
  899. Str255 aString;
  900. #ifndef MCGetMenuString
  901. PyMac_PRECHECK(MCGetMenuString);
  902. #endif
  903. if (!PyArg_ParseTuple(_args, "lhO&",
  904. &modifiers,
  905. &item,
  906. PyMac_GetStr255, aString))
  907. return NULL;
  908. _rv = MCGetMenuString(_self->ob_itself,
  909. modifiers,
  910. item,
  911. aString);
  912. _res = Py_BuildValue("l",
  913. _rv);
  914. return _res;
  915. }
  916. static PyObject *MovieCtlObj_MCPtInController(MovieControllerObject *_self, PyObject *_args)
  917. {
  918. PyObject *_res = NULL;
  919. ComponentResult _rv;
  920. Point thePt;
  921. Boolean inController;
  922. #ifndef MCPtInController
  923. PyMac_PRECHECK(MCPtInController);
  924. #endif
  925. if (!PyArg_ParseTuple(_args, "O&",
  926. PyMac_GetPoint, &thePt))
  927. return NULL;
  928. _rv = MCPtInController(_self->ob_itself,
  929. thePt,
  930. &inController);
  931. _res = Py_BuildValue("lb",
  932. _rv,
  933. inController);
  934. return _res;
  935. }
  936. static PyObject *MovieCtlObj_MCInvalidate(MovieControllerObject *_self, PyObject *_args)
  937. {
  938. PyObject *_res = NULL;
  939. ComponentResult _rv;
  940. WindowPtr w;
  941. RgnHandle invalidRgn;
  942. #ifndef MCInvalidate
  943. PyMac_PRECHECK(MCInvalidate);
  944. #endif
  945. if (!PyArg_ParseTuple(_args, "O&O&",
  946. WinObj_Convert, &w,
  947. ResObj_Convert, &invalidRgn))
  948. return NULL;
  949. _rv = MCInvalidate(_self->ob_itself,
  950. w,
  951. invalidRgn);
  952. _res = Py_BuildValue("l",
  953. _rv);
  954. return _res;
  955. }
  956. static PyObject *MovieCtlObj_MCAdjustCursor(MovieControllerObject *_self, PyObject *_args)
  957. {
  958. PyObject *_res = NULL;
  959. ComponentResult _rv;
  960. WindowPtr w;
  961. Point where;
  962. long modifiers;
  963. #ifndef MCAdjustCursor
  964. PyMac_PRECHECK(MCAdjustCursor);
  965. #endif
  966. if (!PyArg_ParseTuple(_args, "O&O&l",
  967. WinObj_Convert, &w,
  968. PyMac_GetPoint, &where,
  969. &modifiers))
  970. return NULL;
  971. _rv = MCAdjustCursor(_self->ob_itself,
  972. w,
  973. where,
  974. modifiers);
  975. _res = Py_BuildValue("l",
  976. _rv);
  977. return _res;
  978. }
  979. static PyObject *MovieCtlObj_MCGetInterfaceElement(MovieControllerObject *_self, PyObject *_args)
  980. {
  981. PyObject *_res = NULL;
  982. ComponentResult _rv;
  983. MCInterfaceElement whichElement;
  984. void * element;
  985. #ifndef MCGetInterfaceElement
  986. PyMac_PRECHECK(MCGetInterfaceElement);
  987. #endif
  988. if (!PyArg_ParseTuple(_args, "ls",
  989. &whichElement,
  990. &element))
  991. return NULL;
  992. _rv = MCGetInterfaceElement(_self->ob_itself,
  993. whichElement,
  994. element);
  995. _res = Py_BuildValue("l",
  996. _rv);
  997. return _res;
  998. }
  999. static PyObject *MovieCtlObj_MCAddMovieSegment(MovieControllerObject *_self, PyObject *_args)
  1000. {
  1001. PyObject *_res = NULL;
  1002. ComponentResult _rv;
  1003. Movie srcMovie;
  1004. Boolean scaled;
  1005. #ifndef MCAddMovieSegment
  1006. PyMac_PRECHECK(MCAddMovieSegment);
  1007. #endif
  1008. if (!PyArg_ParseTuple(_args, "O&b",
  1009. MovieObj_Convert, &srcMovie,
  1010. &scaled))
  1011. return NULL;
  1012. _rv = MCAddMovieSegment(_self->ob_itself,
  1013. srcMovie,
  1014. scaled);
  1015. _res = Py_BuildValue("l",
  1016. _rv);
  1017. return _res;
  1018. }
  1019. static PyObject *MovieCtlObj_MCTrimMovieSegment(MovieControllerObject *_self, PyObject *_args)
  1020. {
  1021. PyObject *_res = NULL;
  1022. ComponentResult _rv;
  1023. #ifndef MCTrimMovieSegment
  1024. PyMac_PRECHECK(MCTrimMovieSegment);
  1025. #endif
  1026. if (!PyArg_ParseTuple(_args, ""))
  1027. return NULL;
  1028. _rv = MCTrimMovieSegment(_self->ob_itself);
  1029. _res = Py_BuildValue("l",
  1030. _rv);
  1031. return _res;
  1032. }
  1033. static PyObject *MovieCtlObj_MCSetIdleManager(MovieControllerObject *_self, PyObject *_args)
  1034. {
  1035. PyObject *_res = NULL;
  1036. ComponentResult _rv;
  1037. IdleManager im;
  1038. #ifndef MCSetIdleManager
  1039. PyMac_PRECHECK(MCSetIdleManager);
  1040. #endif
  1041. if (!PyArg_ParseTuple(_args, "O&",
  1042. IdleManagerObj_Convert, &im))
  1043. return NULL;
  1044. _rv = MCSetIdleManager(_self->ob_itself,
  1045. im);
  1046. _res = Py_BuildValue("l",
  1047. _rv);
  1048. return _res;
  1049. }
  1050. static PyObject *MovieCtlObj_MCSetControllerCapabilities(MovieControllerObject *_self, PyObject *_args)
  1051. {
  1052. PyObject *_res = NULL;
  1053. ComponentResult _rv;
  1054. long flags;
  1055. long flagsMask;
  1056. #ifndef MCSetControllerCapabilities
  1057. PyMac_PRECHECK(MCSetControllerCapabilities);
  1058. #endif
  1059. if (!PyArg_ParseTuple(_args, "ll",
  1060. &flags,
  1061. &flagsMask))
  1062. return NULL;
  1063. _rv = MCSetControllerCapabilities(_self->ob_itself,
  1064. flags,
  1065. flagsMask);
  1066. _res = Py_BuildValue("l",
  1067. _rv);
  1068. return _res;
  1069. }
  1070. static PyMethodDef MovieCtlObj_methods[] = {
  1071. {"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
  1072. PyDoc_STR("(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)")},
  1073. {"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1,
  1074. PyDoc_STR("(short index) -> (Movie _rv)")},
  1075. {"MCRemoveAllMovies", (PyCFunction)MovieCtlObj_MCRemoveAllMovies, 1,
  1076. PyDoc_STR("() -> (ComponentResult _rv)")},
  1077. {"MCRemoveAMovie", (PyCFunction)MovieCtlObj_MCRemoveAMovie, 1,
  1078. PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
  1079. {"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1,
  1080. PyDoc_STR("() -> (ComponentResult _rv)")},
  1081. {"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1,
  1082. PyDoc_STR("(EventRecord e) -> (ComponentResult _rv)")},
  1083. {"MCDoAction", (PyCFunction)MovieCtlObj_MCDoAction, 1,
  1084. PyDoc_STR("(short action, void * params) -> (ComponentResult _rv)")},
  1085. {"MCSetControllerAttached", (PyCFunction)MovieCtlObj_MCSetControllerAttached, 1,
  1086. PyDoc_STR("(Boolean attach) -> (ComponentResult _rv)")},
  1087. {"MCIsControllerAttached", (PyCFunction)MovieCtlObj_MCIsControllerAttached, 1,
  1088. PyDoc_STR("() -> (ComponentResult _rv)")},
  1089. {"MCSetControllerPort", (PyCFunction)MovieCtlObj_MCSetControllerPort, 1,
  1090. PyDoc_STR("(CGrafPtr gp) -> (ComponentResult _rv)")},
  1091. {"MCGetControllerPort", (PyCFunction)MovieCtlObj_MCGetControllerPort, 1,
  1092. PyDoc_STR("() -> (CGrafPtr _rv)")},
  1093. {"MCSetVisible", (PyCFunction)MovieCtlObj_MCSetVisible, 1,
  1094. PyDoc_STR("(Boolean visible) -> (ComponentResult _rv)")},
  1095. {"MCGetVisible", (PyCFunction)MovieCtlObj_MCGetVisible, 1,
  1096. PyDoc_STR("() -> (ComponentResult _rv)")},
  1097. {"MCGetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRect, 1,
  1098. PyDoc_STR("() -> (ComponentResult _rv, Rect bounds)")},
  1099. {"MCSetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCSetControllerBoundsRect, 1,
  1100. PyDoc_STR("(Rect bounds) -> (ComponentResult _rv)")},
  1101. {"MCGetControllerBoundsRgn", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRgn, 1,
  1102. PyDoc_STR("() -> (RgnHandle _rv)")},
  1103. {"MCGetWindowRgn", (PyCFunction)MovieCtlObj_MCGetWindowRgn, 1,
  1104. PyDoc_STR("(WindowPtr w) -> (RgnHandle _rv)")},
  1105. {"MCMovieChanged", (PyCFunction)MovieCtlObj_MCMovieChanged, 1,
  1106. PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
  1107. {"MCSetDuration", (PyCFunction)MovieCtlObj_MCSetDuration, 1,
  1108. PyDoc_STR("(TimeValue duration) -> (ComponentResult _rv)")},
  1109. {"MCGetCurrentTime", (PyCFunction)MovieCtlObj_MCGetCurrentTime, 1,
  1110. PyDoc_STR("() -> (TimeValue _rv, TimeScale scale)")},
  1111. {"MCNewAttachedController", (PyCFunction)MovieCtlObj_MCNewAttachedController, 1,
  1112. PyDoc_STR("(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)")},
  1113. {"MCDraw", (PyCFunction)MovieCtlObj_MCDraw, 1,
  1114. PyDoc_STR("(WindowPtr w) -> (ComponentResult _rv)")},
  1115. {"MCActivate", (PyCFunction)MovieCtlObj_MCActivate, 1,
  1116. PyDoc_STR("(WindowPtr w, Boolean activate) -> (ComponentResult _rv)")},
  1117. {"MCIdle", (PyCFunction)MovieCtlObj_MCIdle, 1,
  1118. PyDoc_STR("() -> (ComponentResult _rv)")},
  1119. {"MCKey", (PyCFunction)MovieCtlObj_MCKey, 1,
  1120. PyDoc_STR("(SInt8 key, long modifiers) -> (ComponentResult _rv)")},
  1121. {"MCClick", (PyCFunction)MovieCtlObj_MCClick, 1,
  1122. PyDoc_STR("(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)")},
  1123. {"MCEnableEditing", (PyCFunction)MovieCtlObj_MCEnableEditing, 1,
  1124. PyDoc_STR("(Boolean enabled) -> (ComponentResult _rv)")},
  1125. {"MCIsEditingEnabled", (PyCFunction)MovieCtlObj_MCIsEditingEnabled, 1,
  1126. PyDoc_STR("() -> (long _rv)")},
  1127. {"MCCopy", (PyCFunction)MovieCtlObj_MCCopy, 1,
  1128. PyDoc_STR("() -> (Movie _rv)")},
  1129. {"MCCut", (PyCFunction)MovieCtlObj_MCCut, 1,
  1130. PyDoc_STR("() -> (Movie _rv)")},
  1131. {"MCPaste", (PyCFunction)MovieCtlObj_MCPaste, 1,
  1132. PyDoc_STR("(Movie srcMovie) -> (ComponentResult _rv)")},
  1133. {"MCClear", (PyCFunction)MovieCtlObj_MCClear, 1,
  1134. PyDoc_STR("() -> (ComponentResult _rv)")},
  1135. {"MCUndo", (PyCFunction)MovieCtlObj_MCUndo, 1,
  1136. PyDoc_STR("() -> (ComponentResult _rv)")},
  1137. {"MCPositionController", (PyCFunction)MovieCtlObj_MCPositionController, 1,
  1138. PyDoc_STR("(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)")},
  1139. {"MCGetControllerInfo", (PyCFunction)MovieCtlObj_MCGetControllerInfo, 1,
  1140. PyDoc_STR("() -> (ComponentResult _rv, long someFlags)")},
  1141. {"MCSetClip", (PyCFunction)MovieCtlObj_MCSetClip, 1,
  1142. PyDoc_STR("(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)")},
  1143. {"MCGetClip", (PyCFunction)MovieCtlObj_MCGetClip, 1,
  1144. PyDoc_STR("() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)")},
  1145. {"MCDrawBadge", (PyCFunction)MovieCtlObj_MCDrawBadge, 1,
  1146. PyDoc_STR("(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)")},
  1147. {"MCSetUpEditMenu", (PyCFunction)MovieCtlObj_MCSetUpEditMenu, 1,
  1148. PyDoc_STR("(long modifiers, MenuHandle mh) -> (ComponentResult _rv)")},
  1149. {"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1,
  1150. PyDoc_STR("(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)")},
  1151. {"MCPtInController", (PyCFunction)MovieCtlObj_MCPtInController, 1,
  1152. PyDoc_STR("(Point thePt) -> (ComponentResult _rv, Boolean inController)")},
  1153. {"MCInvalidate", (PyCFunction)MovieCtlObj_MCInvalidate, 1,
  1154. PyDoc_STR("(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)")},
  1155. {"MCAdjustCursor", (PyCFunction)MovieCtlObj_MCAdjustCursor, 1,
  1156. PyDoc_STR("(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)")},
  1157. {"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
  1158. PyDoc_STR("(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)")},
  1159. {"MCAddMovieSegment", (PyCFunction)MovieCtlObj_MCAddMovieSegment, 1,
  1160. PyDoc_STR("(Movie srcMovie, Boolean scaled) -> (ComponentResult _rv)")},
  1161. {"MCTrimMovieSegment", (PyCFunction)MovieCtlObj_MCTrimMovieSegment, 1,
  1162. PyDoc_STR("() -> (ComponentResult _rv)")},
  1163. {"MCSetIdleManager", (PyCFunction)MovieCtlObj_MCSetIdleManager, 1,
  1164. PyDoc_STR("(IdleManager im) -> (ComponentResult _rv)")},
  1165. {"MCSetControllerCapabilities", (PyCFunction)MovieCtlObj_MCSetControllerCapabilities, 1,
  1166. PyDoc_STR("(long flags, long flagsMask) -> (ComponentResult _rv)")},
  1167. {NULL, NULL, 0}
  1168. };
  1169. #define MovieCtlObj_getsetlist NULL
  1170. #define MovieCtlObj_compare NULL
  1171. #define MovieCtlObj_repr NULL
  1172. #define MovieCtlObj_hash NULL
  1173. #define MovieCtlObj_tp_init 0
  1174. #define MovieCtlObj_tp_alloc PyType_GenericAlloc
  1175. static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  1176. {
  1177. PyObject *_self;
  1178. MovieController itself;
  1179. char *kw[] = {"itself", 0};
  1180. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MovieCtlObj_Convert, &itself)) return NULL;
  1181. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  1182. ((MovieControllerObject *)_self)->ob_itself = itself;
  1183. return _self;
  1184. }
  1185. #define MovieCtlObj_tp_free PyObject_Del
  1186. PyTypeObject MovieController_Type = {
  1187. PyObject_HEAD_INIT(NULL)
  1188. 0, /*ob_size*/
  1189. "_Qt.MovieController", /*tp_name*/
  1190. sizeof(MovieControllerObject), /*tp_basicsize*/
  1191. 0, /*tp_itemsize*/
  1192. /* methods */
  1193. (destructor) MovieCtlObj_dealloc, /*tp_dealloc*/
  1194. 0, /*tp_print*/
  1195. (getattrfunc)0, /*tp_getattr*/
  1196. (setattrfunc)0, /*tp_setattr*/
  1197. (cmpfunc) MovieCtlObj_compare, /*tp_compare*/
  1198. (reprfunc) MovieCtlObj_repr, /*tp_repr*/
  1199. (PyNumberMethods *)0, /* tp_as_number */
  1200. (PySequenceMethods *)0, /* tp_as_sequence */
  1201. (PyMappingMethods *)0, /* tp_as_mapping */
  1202. (hashfunc) MovieCtlObj_hash, /*tp_hash*/
  1203. 0, /*tp_call*/
  1204. 0, /*tp_str*/
  1205. PyObject_GenericGetAttr, /*tp_getattro*/
  1206. PyObject_GenericSetAttr, /*tp_setattro */
  1207. 0, /*tp_as_buffer*/
  1208. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  1209. 0, /*tp_doc*/
  1210. 0, /*tp_traverse*/
  1211. 0, /*tp_clear*/
  1212. 0, /*tp_richcompare*/
  1213. 0, /*tp_weaklistoffset*/
  1214. 0, /*tp_iter*/
  1215. 0, /*tp_iternext*/
  1216. MovieCtlObj_methods, /* tp_methods */
  1217. 0, /*tp_members*/
  1218. MovieCtlObj_getsetlist, /*tp_getset*/
  1219. 0, /*tp_base*/
  1220. 0, /*tp_dict*/
  1221. 0, /*tp_descr_get*/
  1222. 0, /*tp_descr_set*/
  1223. 0, /*tp_dictoffset*/
  1224. MovieCtlObj_tp_init, /* tp_init */
  1225. MovieCtlObj_tp_alloc, /* tp_alloc */
  1226. MovieCtlObj_tp_new, /* tp_new */
  1227. MovieCtlObj_tp_free, /* tp_free */
  1228. };
  1229. /* ---------------- End object type MovieController ----------------- */
  1230. /* ---------------------- Object type TimeBase ---------------------- */
  1231. PyTypeObject TimeBase_Type;
  1232. #define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type || PyObject_TypeCheck((x), &TimeBase_Type))
  1233. typedef struct TimeBaseObject {
  1234. PyObject_HEAD
  1235. TimeBase ob_itself;
  1236. } TimeBaseObject;
  1237. PyObject *TimeBaseObj_New(TimeBase itself)
  1238. {
  1239. TimeBaseObject *it;
  1240. if (itself == NULL) {
  1241. PyErr_SetString(Qt_Error,"Cannot create TimeBase from NULL pointer");
  1242. return NULL;
  1243. }
  1244. it = PyObject_NEW(TimeBaseObject, &TimeBase_Type);
  1245. if (it == NULL) return NULL;
  1246. it->ob_itself = itself;
  1247. return (PyObject *)it;
  1248. }
  1249. int TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself)
  1250. {
  1251. if (v == Py_None)
  1252. {
  1253. *p_itself = NULL;
  1254. return 1;
  1255. }
  1256. if (!TimeBaseObj_Check(v))
  1257. {
  1258. PyErr_SetString(PyExc_TypeError, "TimeBase required");
  1259. return 0;
  1260. }
  1261. *p_itself = ((TimeBaseObject *)v)->ob_itself;
  1262. return 1;
  1263. }
  1264. static void TimeBaseObj_dealloc(TimeBaseObject *self)
  1265. {
  1266. /* Cleanup of self->ob_itself goes here */
  1267. self->ob_type->tp_free((PyObject *)self);
  1268. }
  1269. static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args)
  1270. {
  1271. PyObject *_res = NULL;
  1272. #ifndef DisposeTimeBase
  1273. PyMac_PRECHECK(DisposeTimeBase);
  1274. #endif
  1275. if (!PyArg_ParseTuple(_args, ""))
  1276. return NULL;
  1277. DisposeTimeBase(_self->ob_itself);
  1278. Py_INCREF(Py_None);
  1279. _res = Py_None;
  1280. return _res;
  1281. }
  1282. static PyObject *TimeBaseObj_GetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
  1283. {
  1284. PyObject *_res = NULL;
  1285. TimeValue _rv;
  1286. TimeScale s;
  1287. TimeRecord tr;
  1288. #ifndef GetTimeBaseTime
  1289. PyMac_PRECHECK(GetTimeBaseTime);
  1290. #endif
  1291. if (!PyArg_ParseTuple(_args, "l",
  1292. &s))
  1293. return NULL;
  1294. _rv = GetTimeBaseTime(_self->ob_itself,
  1295. s,
  1296. &tr);
  1297. _res = Py_BuildValue("lO&",
  1298. _rv,
  1299. QtTimeRecord_New, &tr);
  1300. return _res;
  1301. }
  1302. static PyObject *TimeBaseObj_SetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
  1303. {
  1304. PyObject *_res = NULL;
  1305. TimeRecord tr;
  1306. #ifndef SetTimeBaseTime
  1307. PyMac_PRECHECK(SetTimeBaseTime);
  1308. #endif
  1309. if (!PyArg_ParseTuple(_args, "O&",
  1310. QtTimeRecord_Convert, &tr))
  1311. return NULL;
  1312. SetTimeBaseTime(_self->ob_itself,
  1313. &tr);
  1314. Py_INCREF(Py_None);
  1315. _res = Py_None;
  1316. return _res;
  1317. }
  1318. static PyObject *TimeBaseObj_SetTimeBaseValue(TimeBaseObject *_self, PyObject *_args)
  1319. {
  1320. PyObject *_res = NULL;
  1321. TimeValue t;
  1322. TimeScale s;
  1323. #ifndef SetTimeBaseValue
  1324. PyMac_PRECHECK(SetTimeBaseValue);
  1325. #endif
  1326. if (!PyArg_ParseTuple(_args, "ll",
  1327. &t,
  1328. &s))
  1329. return NULL;
  1330. SetTimeBaseValue(_self->ob_itself,
  1331. t,
  1332. s);
  1333. Py_INCREF(Py_None);
  1334. _res = Py_None;
  1335. return _res;
  1336. }
  1337. static PyObject *TimeBaseObj_GetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
  1338. {
  1339. PyObject *_res = NULL;
  1340. Fixed _rv;
  1341. #ifndef GetTimeBaseRate
  1342. PyMac_PRECHECK(GetTimeBaseRate);
  1343. #endif
  1344. if (!PyArg_ParseTuple(_args, ""))
  1345. return NULL;
  1346. _rv = GetTimeBaseRate(_self->ob_itself);
  1347. _res = Py_BuildValue("O&",
  1348. PyMac_BuildFixed, _rv);
  1349. return _res;
  1350. }
  1351. static PyObject *TimeBaseObj_SetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
  1352. {
  1353. PyObject *_res = NULL;
  1354. Fixed r;
  1355. #ifndef SetTimeBaseRate
  1356. PyMac_PRECHECK(SetTimeBaseRate);
  1357. #endif
  1358. if (!PyArg_ParseTuple(_args, "O&",
  1359. PyMac_GetFixed, &r))
  1360. return NULL;
  1361. SetTimeBaseRate(_self->ob_itself,
  1362. r);
  1363. Py_INCREF(Py_None);
  1364. _res = Py_None;
  1365. return _res;
  1366. }
  1367. static PyObject *TimeBaseObj_GetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
  1368. {
  1369. PyObject *_res = NULL;
  1370. TimeValue _rv;
  1371. TimeScale s;
  1372. TimeRecord tr;
  1373. #ifndef GetTimeBaseStartTime
  1374. PyMac_PRECHECK(GetTimeBaseStartTime);
  1375. #endif
  1376. if (!PyArg_ParseTuple(_args, "l",
  1377. &s))
  1378. return NULL;
  1379. _rv = GetTimeBaseStartTime(_self->ob_itself,
  1380. s,
  1381. &tr);
  1382. _res = Py_BuildValue("lO&",
  1383. _rv,
  1384. QtTimeRecord_New, &tr);
  1385. return _res;
  1386. }
  1387. static PyObject *TimeBaseObj_SetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
  1388. {
  1389. PyObject *_res = NULL;
  1390. TimeRecord tr;
  1391. #ifndef SetTimeBaseStartTime
  1392. PyMac_PRECHECK(SetTimeBaseStartTime);
  1393. #endif
  1394. if (!PyArg_ParseTuple(_args, "O&",
  1395. QtTimeRecord_Convert, &tr))
  1396. return NULL;
  1397. SetTimeBaseStartTime(_self->ob_itself,
  1398. &tr);
  1399. Py_INCREF(Py_None);
  1400. _res = Py_None;
  1401. return _res;
  1402. }
  1403. static PyObject *TimeBaseObj_GetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
  1404. {
  1405. PyObject *_res = NULL;
  1406. TimeValue _rv;
  1407. TimeScale s;
  1408. TimeRecord tr;
  1409. #ifndef GetTimeBaseStopTime
  1410. PyMac_PRECHECK(GetTimeBaseStopTime);
  1411. #endif
  1412. if (!PyArg_ParseTuple(_args, "l",
  1413. &s))
  1414. return NULL;
  1415. _rv = GetTimeBaseStopTime(_self->ob_itself,
  1416. s,
  1417. &tr);
  1418. _res = Py_BuildValue("lO&",
  1419. _rv,
  1420. QtTimeRecord_New, &tr);
  1421. return _res;
  1422. }
  1423. static PyObject *TimeBaseObj_SetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
  1424. {
  1425. PyObject *_res = NULL;
  1426. TimeRecord tr;
  1427. #ifndef SetTimeBaseStopTime
  1428. PyMac_PRECHECK(SetTimeBaseStopTime);
  1429. #endif
  1430. if (!PyArg_ParseTuple(_args, "O&",
  1431. QtTimeRecord_Convert, &tr))
  1432. return NULL;
  1433. SetTimeBaseStopTime(_self->ob_itself,
  1434. &tr);
  1435. Py_INCREF(Py_None);
  1436. _res = Py_None;
  1437. return _res;
  1438. }
  1439. static PyObject *TimeBaseObj_GetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
  1440. {
  1441. PyObject *_res = NULL;
  1442. long _rv;
  1443. #ifndef GetTimeBaseFlags
  1444. PyMac_PRECHECK(GetTimeBaseFlags);
  1445. #endif
  1446. if (!PyArg_ParseTuple(_args, ""))
  1447. return NULL;
  1448. _rv = GetTimeBaseFlags(_self->ob_itself);
  1449. _res = Py_BuildValue("l",
  1450. _rv);
  1451. return _res;
  1452. }
  1453. static PyObject *TimeBaseObj_SetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
  1454. {
  1455. PyObject *_res = NULL;
  1456. long timeBaseFlags;
  1457. #ifndef SetTimeBaseFlags
  1458. PyMac_PRECHECK(SetTimeBaseFlags);
  1459. #endif
  1460. if (!PyArg_ParseTuple(_args, "l",
  1461. &timeBaseFlags))
  1462. return NULL;
  1463. SetTimeBaseFlags(_self->ob_itself,
  1464. timeBaseFlags);
  1465. Py_INCREF(Py_None);
  1466. _res = Py_None;
  1467. return _res;
  1468. }
  1469. static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
  1470. {
  1471. PyObject *_res = NULL;
  1472. TimeBase master;
  1473. TimeRecord slaveZero;
  1474. #ifndef SetTimeBaseMasterTimeBase
  1475. PyMac_PRECHECK(SetTimeBaseMasterTimeBase);
  1476. #endif
  1477. if (!PyArg_ParseTuple(_args, "O&O&",
  1478. TimeBaseObj_Convert, &master,
  1479. QtTimeRecord_Convert, &slaveZero))
  1480. return NULL;
  1481. SetTimeBaseMasterTimeBase(_self->ob_itself,
  1482. master,
  1483. &slaveZero);
  1484. Py_INCREF(Py_None);
  1485. _res = Py_None;
  1486. return _res;
  1487. }
  1488. static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
  1489. {
  1490. PyObject *_res = NULL;
  1491. TimeBase _rv;
  1492. #ifndef GetTimeBaseMasterTimeBase
  1493. PyMac_PRECHECK(GetTimeBaseMasterTimeBase);
  1494. #endif
  1495. if (!PyArg_ParseTuple(_args, ""))
  1496. return NULL;
  1497. _rv = GetTimeBaseMasterTimeBase(_self->ob_itself);
  1498. _res = Py_BuildValue("O&",
  1499. TimeBaseObj_New, _rv);
  1500. return _res;
  1501. }
  1502. static PyObject *TimeBaseObj_SetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
  1503. {
  1504. PyObject *_res = NULL;
  1505. Component clockMeister;
  1506. TimeRecord slaveZero;
  1507. #ifndef SetTimeBaseMasterClock
  1508. PyMac_PRECHECK(SetTimeBaseMasterClock);
  1509. #endif
  1510. if (!PyArg_ParseTuple(_args, "O&O&",
  1511. CmpObj_Convert, &clockMeister,
  1512. QtTimeRecord_Convert, &slaveZero))
  1513. return NULL;
  1514. SetTimeBaseMasterClock(_self->ob_itself,
  1515. clockMeister,
  1516. &slaveZero);
  1517. Py_INCREF(Py_None);
  1518. _res = Py_None;
  1519. return _res;
  1520. }
  1521. static PyObject *TimeBaseObj_GetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
  1522. {
  1523. PyObject *_res = NULL;
  1524. ComponentInstance _rv;
  1525. #ifndef GetTimeBaseMasterClock
  1526. PyMac_PRECHECK(GetTimeBaseMasterClock);
  1527. #endif
  1528. if (!PyArg_ParseTuple(_args, ""))
  1529. return NULL;
  1530. _rv = GetTimeBaseMasterClock(_self->ob_itself);
  1531. _res = Py_BuildValue("O&",
  1532. CmpInstObj_New, _rv);
  1533. return _res;
  1534. }
  1535. static PyObject *TimeBaseObj_GetTimeBaseStatus(TimeBaseObject *_self, PyObject *_args)
  1536. {
  1537. PyObject *_res = NULL;
  1538. long _rv;
  1539. TimeRecord unpinnedTime;
  1540. #ifndef GetTimeBaseStatus
  1541. PyMac_PRECHECK(GetTimeBaseStatus);
  1542. #endif
  1543. if (!PyArg_ParseTuple(_args, ""))
  1544. return NULL;
  1545. _rv = GetTimeBaseStatus(_self->ob_itself,
  1546. &unpinnedTime);
  1547. _res = Py_BuildValue("lO&",
  1548. _rv,
  1549. QtTimeRecord_New, &unpinnedTime);
  1550. return _res;
  1551. }
  1552. static PyObject *TimeBaseObj_SetTimeBaseZero(TimeBaseObject *_self, PyObject *_args)
  1553. {
  1554. PyObject *_res = NULL;
  1555. TimeRecord zero;
  1556. #ifndef SetTimeBaseZero
  1557. PyMac_PRECHECK(SetTimeBaseZero);
  1558. #endif
  1559. if (!PyArg_ParseTuple(_args, "O&",
  1560. QtTimeRecord_Convert, &zero))
  1561. return NULL;
  1562. SetTimeBaseZero(_self->ob_itself,
  1563. &zero);
  1564. Py_INCREF(Py_None);
  1565. _res = Py_None;
  1566. return _res;
  1567. }
  1568. static PyObject *TimeBaseObj_GetTimeBaseEffectiveRate(TimeBaseObject *_self, PyObject *_args)
  1569. {
  1570. PyObject *_res = NULL;
  1571. Fixed _rv;
  1572. #ifndef GetTimeBaseEffectiveRate
  1573. PyMac_PRECHECK(GetTimeBaseEffectiveRate);
  1574. #endif
  1575. if (!PyArg_ParseTuple(_args, ""))
  1576. return NULL;
  1577. _rv = GetTimeBaseEffectiveRate(_self->ob_itself);
  1578. _res = Py_BuildValue("O&",
  1579. PyMac_BuildFixed, _rv);
  1580. return _res;
  1581. }
  1582. static PyMethodDef TimeBaseObj_methods[] = {
  1583. {"DisposeTimeBase", (PyCFunction)TimeBaseObj_DisposeTimeBase, 1,
  1584. PyDoc_STR("() -> None")},
  1585. {"GetTimeBaseTime", (PyCFunction)TimeBaseObj_GetTimeBaseTime, 1,
  1586. PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
  1587. {"SetTimeBaseTime", (PyCFunction)TimeBaseObj_SetTimeBaseTime, 1,
  1588. PyDoc_STR("(TimeRecord tr) -> None")},
  1589. {"SetTimeBaseValue", (PyCFunction)TimeBaseObj_SetTimeBaseValue, 1,
  1590. PyDoc_STR("(TimeValue t, TimeScale s) -> None")},
  1591. {"GetTimeBaseRate", (PyCFunction)TimeBaseObj_GetTimeBaseRate, 1,
  1592. PyDoc_STR("() -> (Fixed _rv)")},
  1593. {"SetTimeBaseRate", (PyCFunction)TimeBaseObj_SetTimeBaseRate, 1,
  1594. PyDoc_STR("(Fixed r) -> None")},
  1595. {"GetTimeBaseStartTime", (PyCFunction)TimeBaseObj_GetTimeBaseStartTime, 1,
  1596. PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
  1597. {"SetTimeBaseStartTime", (PyCFunction)TimeBaseObj_SetTimeBaseStartTime, 1,
  1598. PyDoc_STR("(TimeRecord tr) -> None")},
  1599. {"GetTimeBaseStopTime", (PyCFunction)TimeBaseObj_GetTimeBaseStopTime, 1,
  1600. PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
  1601. {"SetTimeBaseStopTime", (PyCFunction)TimeBaseObj_SetTimeBaseStopTime, 1,
  1602. PyDoc_STR("(TimeRecord tr) -> None")},
  1603. {"GetTimeBaseFlags", (PyCFunction)TimeBaseObj_GetTimeBaseFlags, 1,
  1604. PyDoc_STR("() -> (long _rv)")},
  1605. {"SetTimeBaseFlags", (PyCFunction)TimeBaseObj_SetTimeBaseFlags, 1,
  1606. PyDoc_STR("(long timeBaseFlags) -> None")},
  1607. {"SetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_SetTimeBaseMasterTimeBase, 1,
  1608. PyDoc_STR("(TimeBase master, TimeRecord slaveZero) -> None")},
  1609. {"GetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_GetTimeBaseMasterTimeBase, 1,
  1610. PyDoc_STR("() -> (TimeBase _rv)")},
  1611. {"SetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_SetTimeBaseMasterClock, 1,
  1612. PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
  1613. {"GetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_GetTimeBaseMasterClock, 1,
  1614. PyDoc_STR("() -> (ComponentInstance _rv)")},
  1615. {"GetTimeBaseStatus", (PyCFunction)TimeBaseObj_GetTimeBaseStatus, 1,
  1616. PyDoc_STR("() -> (long _rv, TimeRecord unpinnedTime)")},
  1617. {"SetTimeBaseZero", (PyCFunction)TimeBaseObj_SetTimeBaseZero, 1,
  1618. PyDoc_STR("(TimeRecord zero) -> None")},
  1619. {"GetTimeBaseEffectiveRate", (PyCFunction)TimeBaseObj_GetTimeBaseEffectiveRate, 1,
  1620. PyDoc_STR("() -> (Fixed _rv)")},
  1621. {NULL, NULL, 0}
  1622. };
  1623. #define TimeBaseObj_getsetlist NULL
  1624. #define TimeBaseObj_compare NULL
  1625. #define TimeBaseObj_repr NULL
  1626. #define TimeBaseObj_hash NULL
  1627. #define TimeBaseObj_tp_init 0
  1628. #define TimeBaseObj_tp_alloc PyType_GenericAlloc
  1629. static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  1630. {
  1631. PyObject *_self;
  1632. TimeBase itself;
  1633. char *kw[] = {"itself", 0};
  1634. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TimeBaseObj_Convert, &itself)) return NULL;
  1635. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  1636. ((TimeBaseObject *)_self)->ob_itself = itself;
  1637. return _self;
  1638. }
  1639. #define TimeBaseObj_tp_free PyObject_Del
  1640. PyTypeObject TimeBase_Type = {
  1641. PyObject_HEAD_INIT(NULL)
  1642. 0, /*ob_size*/
  1643. "_Qt.TimeBase", /*tp_name*/
  1644. sizeof(TimeBaseObject), /*tp_basicsize*/
  1645. 0, /*tp_itemsize*/
  1646. /* methods */
  1647. (destructor) TimeBaseObj_dealloc, /*tp_dealloc*/
  1648. 0, /*tp_print*/
  1649. (getattrfunc)0, /*tp_getattr*/
  1650. (setattrfunc)0, /*tp_setattr*/
  1651. (cmpfunc) TimeBaseObj_compare, /*tp_compare*/
  1652. (reprfunc) TimeBaseObj_repr, /*tp_repr*/
  1653. (PyNumberMethods *)0, /* tp_as_number */
  1654. (PySequenceMethods *)0, /* tp_as_sequence */
  1655. (PyMappingMethods *)0, /* tp_as_mapping */
  1656. (hashfunc) TimeBaseObj_hash, /*tp_hash*/
  1657. 0, /*tp_call*/
  1658. 0, /*tp_str*/
  1659. PyObject_GenericGetAttr, /*tp_getattro*/
  1660. PyObject_GenericSetAttr, /*tp_setattro */
  1661. 0, /*tp_as_buffer*/
  1662. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  1663. 0, /*tp_doc*/
  1664. 0, /*tp_traverse*/
  1665. 0, /*tp_clear*/
  1666. 0, /*tp_richcompare*/
  1667. 0, /*tp_weaklistoffset*/
  1668. 0, /*tp_iter*/
  1669. 0, /*tp_iternext*/
  1670. TimeBaseObj_methods, /* tp_methods */
  1671. 0, /*tp_members*/
  1672. TimeBaseObj_getsetlist, /*tp_getset*/
  1673. 0, /*tp_base*/
  1674. 0, /*tp_dict*/
  1675. 0, /*tp_descr_get*/
  1676. 0, /*tp_descr_set*/
  1677. 0, /*tp_dictoffset*/
  1678. TimeBaseObj_tp_init, /* tp_init */
  1679. TimeBaseObj_tp_alloc, /* tp_alloc */
  1680. TimeBaseObj_tp_new, /* tp_new */
  1681. TimeBaseObj_tp_free, /* tp_free */
  1682. };
  1683. /* -------------------- End object type TimeBase -------------------- */
  1684. /* ---------------------- Object type UserData ---------------------- */
  1685. PyTypeObject UserData_Type;
  1686. #define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type || PyObject_TypeCheck((x), &UserData_Type))
  1687. typedef struct UserDataObject {
  1688. PyObject_HEAD
  1689. UserData ob_itself;
  1690. } UserDataObject;
  1691. PyObject *UserDataObj_New(UserData itself)
  1692. {
  1693. UserDataObject *it;
  1694. if (itself == NULL) {
  1695. PyErr_SetString(Qt_Error,"Cannot create UserData from NULL pointer");
  1696. return NULL;
  1697. }
  1698. it = PyObject_NEW(UserDataObject, &UserData_Type);
  1699. if (it == NULL) return NULL;
  1700. it->ob_itself = itself;
  1701. return (PyObject *)it;
  1702. }
  1703. int UserDataObj_Convert(PyObject *v, UserData *p_itself)
  1704. {
  1705. if (v == Py_None)
  1706. {
  1707. *p_itself = NULL;
  1708. return 1;
  1709. }
  1710. if (!UserDataObj_Check(v))
  1711. {
  1712. PyErr_SetString(PyExc_TypeError, "UserData required");
  1713. return 0;
  1714. }
  1715. *p_itself = ((UserDataObject *)v)->ob_itself;
  1716. return 1;
  1717. }
  1718. static void UserDataObj_dealloc(UserDataObject *self)
  1719. {
  1720. if (self->ob_itself) DisposeUserData(self->ob_itself);
  1721. self->ob_type->tp_free((PyObject *)self);
  1722. }
  1723. static PyObject *UserDataObj_GetUserData(UserDataObject *_self, PyObject *_args)
  1724. {
  1725. PyObject *_res = NULL;
  1726. OSErr _err;
  1727. Handle data;
  1728. OSType udType;
  1729. long index;
  1730. #ifndef GetUserData
  1731. PyMac_PRECHECK(GetUserData);
  1732. #endif
  1733. if (!PyArg_ParseTuple(_args, "O&O&l",
  1734. ResObj_Convert, &data,
  1735. PyMac_GetOSType, &udType,
  1736. &index))
  1737. return NULL;
  1738. _err = GetUserData(_self->ob_itself,
  1739. data,
  1740. udType,
  1741. index);
  1742. if (_err != noErr) return PyMac_Error(_err);
  1743. Py_INCREF(Py_None);
  1744. _res = Py_None;
  1745. return _res;
  1746. }
  1747. static PyObject *UserDataObj_AddUserData(UserDataObject *_self, PyObject *_args)
  1748. {
  1749. PyObject *_res = NULL;
  1750. OSErr _err;
  1751. Handle data;
  1752. OSType udType;
  1753. #ifndef AddUserData
  1754. PyMac_PRECHECK(AddUserData);
  1755. #endif
  1756. if (!PyArg_ParseTuple(_args, "O&O&",
  1757. ResObj_Convert, &data,
  1758. PyMac_GetOSType, &udType))
  1759. return NULL;
  1760. _err = AddUserData(_self->ob_itself,
  1761. data,
  1762. udType);
  1763. if (_err != noErr) return PyMac_Error(_err);
  1764. Py_INCREF(Py_None);
  1765. _res = Py_None;
  1766. return _res;
  1767. }
  1768. static PyObject *UserDataObj_RemoveUserData(UserDataObject *_self, PyObject *_args)
  1769. {
  1770. PyObject *_res = NULL;
  1771. OSErr _err;
  1772. OSType udType;
  1773. long index;
  1774. #ifndef RemoveUserData
  1775. PyMac_PRECHECK(RemoveUserData);
  1776. #endif
  1777. if (!PyArg_ParseTuple(_args, "O&l",
  1778. PyMac_GetOSType, &udType,
  1779. &index))
  1780. return NULL;
  1781. _err = RemoveUserData(_self->ob_itself,
  1782. udType,
  1783. index);
  1784. if (_err != noErr) return PyMac_Error(_err);
  1785. Py_INCREF(Py_None);
  1786. _res = Py_None;
  1787. return _res;
  1788. }
  1789. static PyObject *UserDataObj_CountUserDataType(UserDataObject *_self, PyObject *_args)
  1790. {
  1791. PyObject *_res = NULL;
  1792. short _rv;
  1793. OSType udType;
  1794. #ifndef CountUserDataType
  1795. PyMac_PRECHECK(CountUserDataType);
  1796. #endif
  1797. if (!PyArg_ParseTuple(_args, "O&",
  1798. PyMac_GetOSType, &udType))
  1799. return NULL;
  1800. _rv = CountUserDataType(_self->ob_itself,
  1801. udType);
  1802. _res = Py_BuildValue("h",
  1803. _rv);
  1804. return _res;
  1805. }
  1806. static PyObject *UserDataObj_GetNextUserDataType(UserDataObject *_self, PyObject *_args)
  1807. {
  1808. PyObject *_res = NULL;
  1809. long _rv;
  1810. OSType udType;
  1811. #ifndef GetNextUserDataType
  1812. PyMac_PRECHECK(GetNextUserDataType);
  1813. #endif
  1814. if (!PyArg_ParseTuple(_args, "O&",
  1815. PyMac_GetOSType, &udType))
  1816. return NULL;
  1817. _rv = GetNextUserDataType(_self->ob_itself,
  1818. udType);
  1819. _res = Py_BuildValue("l",
  1820. _rv);
  1821. return _res;
  1822. }
  1823. static PyObject *UserDataObj_AddUserDataText(UserDataObject *_self, PyObject *_args)
  1824. {
  1825. PyObject *_res = NULL;
  1826. OSErr _err;
  1827. Handle data;
  1828. OSType udType;
  1829. long index;
  1830. short itlRegionTag;
  1831. #ifndef AddUserDataText
  1832. PyMac_PRECHECK(AddUserDataText);
  1833. #endif
  1834. if (!PyArg_ParseTuple(_args, "O&O&lh",
  1835. ResObj_Convert, &data,
  1836. PyMac_GetOSType, &udType,
  1837. &index,
  1838. &itlRegionTag))
  1839. return NULL;
  1840. _err = AddUserDataText(_self->ob_itself,
  1841. data,
  1842. udType,
  1843. index,
  1844. itlRegionTag);
  1845. if (_err != noErr) return PyMac_Error(_err);
  1846. Py_INCREF(Py_None);
  1847. _res = Py_None;
  1848. return _res;
  1849. }
  1850. static PyObject *UserDataObj_GetUserDataText(UserDataObject *_self, PyObject *_args)
  1851. {
  1852. PyObject *_res = NULL;
  1853. OSErr _err;
  1854. Handle data;
  1855. OSType udType;
  1856. long index;
  1857. short itlRegionTag;
  1858. #ifndef GetUserDataText
  1859. PyMac_PRECHECK(GetUserDataText);
  1860. #endif
  1861. if (!PyArg_ParseTuple(_args, "O&O&lh",
  1862. ResObj_Convert, &data,
  1863. PyMac_GetOSType, &udType,
  1864. &index,
  1865. &itlRegionTag))
  1866. return NULL;
  1867. _err = GetUserDataText(_self->ob_itself,
  1868. data,
  1869. udType,
  1870. index,
  1871. itlRegionTag);
  1872. if (_err != noErr) return PyMac_Error(_err);
  1873. Py_INCREF(Py_None);
  1874. _res = Py_None;
  1875. return _res;
  1876. }
  1877. static PyObject *UserDataObj_RemoveUserDataText(UserDataObject *_self, PyObject *_args)
  1878. {
  1879. PyObject *_res = NULL;
  1880. OSErr _err;
  1881. OSType udType;
  1882. long index;
  1883. short itlRegionTag;
  1884. #ifndef RemoveUserDataText
  1885. PyMac_PRECHECK(RemoveUserDataText);
  1886. #endif
  1887. if (!PyArg_ParseTuple(_args, "O&lh",
  1888. PyMac_GetOSType, &udType,
  1889. &index,
  1890. &itlRegionTag))
  1891. return NULL;
  1892. _err = RemoveUserDataText(_self->ob_itself,
  1893. udType,
  1894. index,
  1895. itlRegionTag);
  1896. if (_err != noErr) return PyMac_Error(_err);
  1897. Py_INCREF(Py_None);
  1898. _res = Py_None;
  1899. return _res;
  1900. }
  1901. static PyObject *UserDataObj_PutUserDataIntoHandle(UserDataObject *_self, PyObject *_args)
  1902. {
  1903. PyObject *_res = NULL;
  1904. OSErr _err;
  1905. Handle h;
  1906. #ifndef PutUserDataIntoHandle
  1907. PyMac_PRECHECK(PutUserDataIntoHandle);
  1908. #endif
  1909. if (!PyArg_ParseTuple(_args, "O&",
  1910. ResObj_Convert, &h))
  1911. return NULL;
  1912. _err = PutUserDataIntoHandle(_self->ob_itself,
  1913. h);
  1914. if (_err != noErr) return PyMac_Error(_err);
  1915. Py_INCREF(Py_None);
  1916. _res = Py_None;
  1917. return _res;
  1918. }
  1919. static PyObject *UserDataObj_CopyUserData(UserDataObject *_self, PyObject *_args)
  1920. {
  1921. PyObject *_res = NULL;
  1922. OSErr _err;
  1923. UserData dstUserData;
  1924. OSType copyRule;
  1925. #ifndef CopyUserData
  1926. PyMac_PRECHECK(CopyUserData);
  1927. #endif
  1928. if (!PyArg_ParseTuple(_args, "O&O&",
  1929. UserDataObj_Convert, &dstUserData,
  1930. PyMac_GetOSType, &copyRule))
  1931. return NULL;
  1932. _err = CopyUserData(_self->ob_itself,
  1933. dstUserData,
  1934. copyRule);
  1935. if (_err != noErr) return PyMac_Error(_err);
  1936. Py_INCREF(Py_None);
  1937. _res = Py_None;
  1938. return _res;
  1939. }
  1940. static PyMethodDef UserDataObj_methods[] = {
  1941. {"GetUserData", (PyCFunction)UserDataObj_GetUserData, 1,
  1942. PyDoc_STR("(Handle data, OSType udType, long index) -> None")},
  1943. {"AddUserData", (PyCFunction)UserDataObj_AddUserData, 1,
  1944. PyDoc_STR("(Handle data, OSType udType) -> None")},
  1945. {"RemoveUserData", (PyCFunction)UserDataObj_RemoveUserData, 1,
  1946. PyDoc_STR("(OSType udType, long index) -> None")},
  1947. {"CountUserDataType", (PyCFunction)UserDataObj_CountUserDataType, 1,
  1948. PyDoc_STR("(OSType udType) -> (short _rv)")},
  1949. {"GetNextUserDataType", (PyCFunction)UserDataObj_GetNextUserDataType, 1,
  1950. PyDoc_STR("(OSType udType) -> (long _rv)")},
  1951. {"AddUserDataText", (PyCFunction)UserDataObj_AddUserDataText, 1,
  1952. PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
  1953. {"GetUserDataText", (PyCFunction)UserDataObj_GetUserDataText, 1,
  1954. PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
  1955. {"RemoveUserDataText", (PyCFunction)UserDataObj_RemoveUserDataText, 1,
  1956. PyDoc_STR("(OSType udType, long index, short itlRegionTag) -> None")},
  1957. {"PutUserDataIntoHandle", (PyCFunction)UserDataObj_PutUserDataIntoHandle, 1,
  1958. PyDoc_STR("(Handle h) -> None")},
  1959. {"CopyUserData", (PyCFunction)UserDataObj_CopyUserData, 1,
  1960. PyDoc_STR("(UserData dstUserData, OSType copyRule) -> None")},
  1961. {NULL, NULL, 0}
  1962. };
  1963. #define UserDataObj_getsetlist NULL
  1964. #define UserDataObj_compare NULL
  1965. #define UserDataObj_repr NULL
  1966. #define UserDataObj_hash NULL
  1967. #define UserDataObj_tp_init 0
  1968. #define UserDataObj_tp_alloc PyType_GenericAlloc
  1969. static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  1970. {
  1971. PyObject *_self;
  1972. UserData itself;
  1973. char *kw[] = {"itself", 0};
  1974. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, UserDataObj_Convert, &itself)) return NULL;
  1975. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  1976. ((UserDataObject *)_self)->ob_itself = itself;
  1977. return _self;
  1978. }
  1979. #define UserDataObj_tp_free PyObject_Del
  1980. PyTypeObject UserData_Type = {
  1981. PyObject_HEAD_INIT(NULL)
  1982. 0, /*ob_size*/
  1983. "_Qt.UserData", /*tp_name*/
  1984. sizeof(UserDataObject), /*tp_basicsize*/
  1985. 0, /*tp_itemsize*/
  1986. /* methods */
  1987. (destructor) UserDataObj_dealloc, /*tp_dealloc*/
  1988. 0, /*tp_print*/
  1989. (getattrfunc)0, /*tp_getattr*/
  1990. (setattrfunc)0, /*tp_setattr*/
  1991. (cmpfunc) UserDataObj_compare, /*tp_compare*/
  1992. (reprfunc) UserDataObj_repr, /*tp_repr*/
  1993. (PyNumberMethods *)0, /* tp_as_number */
  1994. (PySequenceMethods *)0, /* tp_as_sequence */
  1995. (PyMappingMethods *)0, /* tp_as_mapping */
  1996. (hashfunc) UserDataObj_hash, /*tp_hash*/
  1997. 0, /*tp_call*/
  1998. 0, /*tp_str*/
  1999. PyObject_GenericGetAttr, /*tp_getattro*/
  2000. PyObject_GenericSetAttr, /*tp_setattro */
  2001. 0, /*tp_as_buffer*/
  2002. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  2003. 0, /*tp_doc*/
  2004. 0, /*tp_traverse*/
  2005. 0, /*tp_clear*/
  2006. 0, /*tp_richcompare*/
  2007. 0, /*tp_weaklistoffset*/
  2008. 0, /*tp_iter*/
  2009. 0, /*tp_iternext*/
  2010. UserDataObj_methods, /* tp_methods */
  2011. 0, /*tp_members*/
  2012. UserDataObj_getsetlist, /*tp_getset*/
  2013. 0, /*tp_base*/
  2014. 0, /*tp_dict*/
  2015. 0, /*tp_descr_get*/
  2016. 0, /*tp_descr_set*/
  2017. 0, /*tp_dictoffset*/
  2018. UserDataObj_tp_init, /* tp_init */
  2019. UserDataObj_tp_alloc, /* tp_alloc */
  2020. UserDataObj_tp_new, /* tp_new */
  2021. UserDataObj_tp_free, /* tp_free */
  2022. };
  2023. /* -------------------- End object type UserData -------------------- */
  2024. /* ----------------------- Object type Media ------------------------ */
  2025. PyTypeObject Media_Type;
  2026. #define MediaObj_Check(x) ((x)->ob_type == &Media_Type || PyObject_TypeCheck((x), &Media_Type))
  2027. typedef struct MediaObject {
  2028. PyObject_HEAD
  2029. Media ob_itself;
  2030. } MediaObject;
  2031. PyObject *MediaObj_New(Media itself)
  2032. {
  2033. MediaObject *it;
  2034. if (itself == NULL) {
  2035. PyErr_SetString(Qt_Error,"Cannot create Media from NULL pointer");
  2036. return NULL;
  2037. }
  2038. it = PyObject_NEW(MediaObject, &Media_Type);
  2039. if (it == NULL) return NULL;
  2040. it->ob_itself = itself;
  2041. return (PyObject *)it;
  2042. }
  2043. int MediaObj_Convert(PyObject *v, Media *p_itself)
  2044. {
  2045. if (v == Py_None)
  2046. {
  2047. *p_itself = NULL;
  2048. return 1;
  2049. }
  2050. if (!MediaObj_Check(v))
  2051. {
  2052. PyErr_SetString(PyExc_TypeError, "Media required");
  2053. return 0;
  2054. }
  2055. *p_itself = ((MediaObject *)v)->ob_itself;
  2056. return 1;
  2057. }
  2058. static void MediaObj_dealloc(MediaObject *self)
  2059. {
  2060. if (self->ob_itself) DisposeTrackMedia(self->ob_itself);
  2061. self->ob_type->tp_free((PyObject *)self);
  2062. }
  2063. static PyObject *MediaObj_LoadMediaIntoRam(MediaObject *_self, PyObject *_args)
  2064. {
  2065. PyObject *_res = NULL;
  2066. OSErr _err;
  2067. TimeValue time;
  2068. TimeValue duration;
  2069. long flags;
  2070. #ifndef LoadMediaIntoRam
  2071. PyMac_PRECHECK(LoadMediaIntoRam);
  2072. #endif
  2073. if (!PyArg_ParseTuple(_args, "lll",
  2074. &time,
  2075. &duration,
  2076. &flags))
  2077. return NULL;
  2078. _err = LoadMediaIntoRam(_self->ob_itself,
  2079. time,
  2080. duration,
  2081. flags);
  2082. if (_err != noErr) return PyMac_Error(_err);
  2083. Py_INCREF(Py_None);
  2084. _res = Py_None;
  2085. return _res;
  2086. }
  2087. static PyObject *MediaObj_GetMediaTrack(MediaObject *_self, PyObject *_args)
  2088. {
  2089. PyObject *_res = NULL;
  2090. Track _rv;
  2091. #ifndef GetMediaTrack
  2092. PyMac_PRECHECK(GetMediaTrack);
  2093. #endif
  2094. if (!PyArg_ParseTuple(_args, ""))
  2095. return NULL;
  2096. _rv = GetMediaTrack(_self->ob_itself);
  2097. _res = Py_BuildValue("O&",
  2098. TrackObj_New, _rv);
  2099. return _res;
  2100. }
  2101. static PyObject *MediaObj_GetMediaCreationTime(MediaObject *_self, PyObject *_args)
  2102. {
  2103. PyObject *_res = NULL;
  2104. unsigned long _rv;
  2105. #ifndef GetMediaCreationTime
  2106. PyMac_PRECHECK(GetMediaCreationTime);
  2107. #endif
  2108. if (!PyArg_ParseTuple(_args, ""))
  2109. return NULL;
  2110. _rv = GetMediaCreationTime(_self->ob_itself);
  2111. _res = Py_BuildValue("l",
  2112. _rv);
  2113. return _res;
  2114. }
  2115. static PyObject *MediaObj_GetMediaModificationTime(MediaObject *_self, PyObject *_args)
  2116. {
  2117. PyObject *_res = NULL;
  2118. unsigned long _rv;
  2119. #ifndef GetMediaModificationTime
  2120. PyMac_PRECHECK(GetMediaModificationTime);
  2121. #endif
  2122. if (!PyArg_ParseTuple(_args, ""))
  2123. return NULL;
  2124. _rv = GetMediaModificationTime(_self->ob_itself);
  2125. _res = Py_BuildValue("l",
  2126. _rv);
  2127. return _res;
  2128. }
  2129. static PyObject *MediaObj_GetMediaTimeScale(MediaObject *_self, PyObject *_args)
  2130. {
  2131. PyObject *_res = NULL;
  2132. TimeScale _rv;
  2133. #ifndef GetMediaTimeScale
  2134. PyMac_PRECHECK(GetMediaTimeScale);
  2135. #endif
  2136. if (!PyArg_ParseTuple(_args, ""))
  2137. return NULL;
  2138. _rv = GetMediaTimeScale(_self->ob_itself);
  2139. _res = Py_BuildValue("l",
  2140. _rv);
  2141. return _res;
  2142. }
  2143. static PyObject *MediaObj_SetMediaTimeScale(MediaObject *_self, PyObject *_args)
  2144. {
  2145. PyObject *_res = NULL;
  2146. TimeScale timeScale;
  2147. #ifndef SetMediaTimeScale
  2148. PyMac_PRECHECK(SetMediaTimeScale);
  2149. #endif
  2150. if (!PyArg_ParseTuple(_args, "l",
  2151. &timeScale))
  2152. return NULL;
  2153. SetMediaTimeScale(_self->ob_itself,
  2154. timeScale);
  2155. Py_INCREF(Py_None);
  2156. _res = Py_None;
  2157. return _res;
  2158. }
  2159. static PyObject *MediaObj_GetMediaDuration(MediaObject *_self, PyObject *_args)
  2160. {
  2161. PyObject *_res = NULL;
  2162. TimeValue _rv;
  2163. #ifndef GetMediaDuration
  2164. PyMac_PRECHECK(GetMediaDuration);
  2165. #endif
  2166. if (!PyArg_ParseTuple(_args, ""))
  2167. return NULL;
  2168. _rv = GetMediaDuration(_self->ob_itself);
  2169. _res = Py_BuildValue("l",
  2170. _rv);
  2171. return _res;
  2172. }
  2173. static PyObject *MediaObj_GetMediaLanguage(MediaObject *_self, PyObject *_args)
  2174. {
  2175. PyObject *_res = NULL;
  2176. short _rv;
  2177. #ifndef GetMediaLanguage
  2178. PyMac_PRECHECK(GetMediaLanguage);
  2179. #endif
  2180. if (!PyArg_ParseTuple(_args, ""))
  2181. return NULL;
  2182. _rv = GetMediaLanguage(_self->ob_itself);
  2183. _res = Py_BuildValue("h",
  2184. _rv);
  2185. return _res;
  2186. }
  2187. static PyObject *MediaObj_SetMediaLanguage(MediaObject *_self, PyObject *_args)
  2188. {
  2189. PyObject *_res = NULL;
  2190. short language;
  2191. #ifndef SetMediaLanguage
  2192. PyMac_PRECHECK(SetMediaLanguage);
  2193. #endif
  2194. if (!PyArg_ParseTuple(_args, "h",
  2195. &language))
  2196. return NULL;
  2197. SetMediaLanguage(_self->ob_itself,
  2198. language);
  2199. Py_INCREF(Py_None);
  2200. _res = Py_None;
  2201. return _res;
  2202. }
  2203. static PyObject *MediaObj_GetMediaQuality(MediaObject *_self, PyObject *_args)
  2204. {
  2205. PyObject *_res = NULL;
  2206. short _rv;
  2207. #ifndef GetMediaQuality
  2208. PyMac_PRECHECK(GetMediaQuality);
  2209. #endif
  2210. if (!PyArg_ParseTuple(_args, ""))
  2211. return NULL;
  2212. _rv = GetMediaQuality(_self->ob_itself);
  2213. _res = Py_BuildValue("h",
  2214. _rv);
  2215. return _res;
  2216. }
  2217. static PyObject *MediaObj_SetMediaQuality(MediaObject *_self, PyObject *_args)
  2218. {
  2219. PyObject *_res = NULL;
  2220. short quality;
  2221. #ifndef SetMediaQuality
  2222. PyMac_PRECHECK(SetMediaQuality);
  2223. #endif
  2224. if (!PyArg_ParseTuple(_args, "h",
  2225. &quality))
  2226. return NULL;
  2227. SetMediaQuality(_self->ob_itself,
  2228. quality);
  2229. Py_INCREF(Py_None);
  2230. _res = Py_None;
  2231. return _res;
  2232. }
  2233. static PyObject *MediaObj_GetMediaHandlerDescription(MediaObject *_self, PyObject *_args)
  2234. {
  2235. PyObject *_res = NULL;
  2236. OSType mediaType;
  2237. Str255 creatorName;
  2238. OSType creatorManufacturer;
  2239. #ifndef GetMediaHandlerDescription
  2240. PyMac_PRECHECK(GetMediaHandlerDescription);
  2241. #endif
  2242. if (!PyArg_ParseTuple(_args, "O&",
  2243. PyMac_GetStr255, creatorName))
  2244. return NULL;
  2245. GetMediaHandlerDescription(_self->ob_itself,
  2246. &mediaType,
  2247. creatorName,
  2248. &creatorManufacturer);
  2249. _res = Py_BuildValue("O&O&",
  2250. PyMac_BuildOSType, mediaType,
  2251. PyMac_BuildOSType, creatorManufacturer);
  2252. return _res;
  2253. }
  2254. static PyObject *MediaObj_GetMediaUserData(MediaObject *_self, PyObject *_args)
  2255. {
  2256. PyObject *_res = NULL;
  2257. UserData _rv;
  2258. #ifndef GetMediaUserData
  2259. PyMac_PRECHECK(GetMediaUserData);
  2260. #endif
  2261. if (!PyArg_ParseTuple(_args, ""))
  2262. return NULL;
  2263. _rv = GetMediaUserData(_self->ob_itself);
  2264. _res = Py_BuildValue("O&",
  2265. UserDataObj_New, _rv);
  2266. return _res;
  2267. }
  2268. static PyObject *MediaObj_GetMediaHandler(MediaObject *_self, PyObject *_args)
  2269. {
  2270. PyObject *_res = NULL;
  2271. MediaHandler _rv;
  2272. #ifndef GetMediaHandler
  2273. PyMac_PRECHECK(GetMediaHandler);
  2274. #endif
  2275. if (!PyArg_ParseTuple(_args, ""))
  2276. return NULL;
  2277. _rv = GetMediaHandler(_self->ob_itself);
  2278. _res = Py_BuildValue("O&",
  2279. CmpInstObj_New, _rv);
  2280. return _res;
  2281. }
  2282. static PyObject *MediaObj_SetMediaHandler(MediaObject *_self, PyObject *_args)
  2283. {
  2284. PyObject *_res = NULL;
  2285. OSErr _err;
  2286. MediaHandlerComponent mH;
  2287. #ifndef SetMediaHandler
  2288. PyMac_PRECHECK(SetMediaHandler);
  2289. #endif
  2290. if (!PyArg_ParseTuple(_args, "O&",
  2291. CmpObj_Convert, &mH))
  2292. return NULL;
  2293. _err = SetMediaHandler(_self->ob_itself,
  2294. mH);
  2295. if (_err != noErr) return PyMac_Error(_err);
  2296. Py_INCREF(Py_None);
  2297. _res = Py_None;
  2298. return _res;
  2299. }
  2300. static PyObject *MediaObj_BeginMediaEdits(MediaObject *_self, PyObject *_args)
  2301. {
  2302. PyObject *_res = NULL;
  2303. OSErr _err;
  2304. #ifndef BeginMediaEdits
  2305. PyMac_PRECHECK(BeginMediaEdits);
  2306. #endif
  2307. if (!PyArg_ParseTuple(_args, ""))
  2308. return NULL;
  2309. _err = BeginMediaEdits(_self->ob_itself);
  2310. if (_err != noErr) return PyMac_Error(_err);
  2311. Py_INCREF(Py_None);
  2312. _res = Py_None;
  2313. return _res;
  2314. }
  2315. static PyObject *MediaObj_EndMediaEdits(MediaObject *_self, PyObject *_args)
  2316. {
  2317. PyObject *_res = NULL;
  2318. OSErr _err;
  2319. #ifndef EndMediaEdits
  2320. PyMac_PRECHECK(EndMediaEdits);
  2321. #endif
  2322. if (!PyArg_ParseTuple(_args, ""))
  2323. return NULL;
  2324. _err = EndMediaEdits(_self->ob_itself);
  2325. if (_err != noErr) return PyMac_Error(_err);
  2326. Py_INCREF(Py_None);
  2327. _res = Py_None;
  2328. return _res;
  2329. }
  2330. static PyObject *MediaObj_SetMediaDefaultDataRefIndex(MediaObject *_self, PyObject *_args)
  2331. {
  2332. PyObject *_res = NULL;
  2333. OSErr _err;
  2334. short index;
  2335. #ifndef SetMediaDefaultDataRefIndex
  2336. PyMac_PRECHECK(SetMediaDefaultDataRefIndex);
  2337. #endif
  2338. if (!PyArg_ParseTuple(_args, "h",
  2339. &index))
  2340. return NULL;
  2341. _err = SetMediaDefaultDataRefIndex(_self->ob_itself,
  2342. index);
  2343. if (_err != noErr) return PyMac_Error(_err);
  2344. Py_INCREF(Py_None);
  2345. _res = Py_None;
  2346. return _res;
  2347. }
  2348. static PyObject *MediaObj_GetMediaDataHandlerDescription(MediaObject *_self, PyObject *_args)
  2349. {
  2350. PyObject *_res = NULL;
  2351. short index;
  2352. OSType dhType;
  2353. Str255 creatorName;
  2354. OSType creatorManufacturer;
  2355. #ifndef GetMediaDataHandlerDescription
  2356. PyMac_PRECHECK(GetMediaDataHandlerDescription);
  2357. #endif
  2358. if (!PyArg_ParseTuple(_args, "hO&",
  2359. &index,
  2360. PyMac_GetStr255, creatorName))
  2361. return NULL;
  2362. GetMediaDataHandlerDescription(_self->ob_itself,
  2363. index,
  2364. &dhType,
  2365. creatorName,
  2366. &creatorManufacturer);
  2367. _res = Py_BuildValue("O&O&",
  2368. PyMac_BuildOSType, dhType,
  2369. PyMac_BuildOSType, creatorManufacturer);
  2370. return _res;
  2371. }
  2372. static PyObject *MediaObj_GetMediaDataHandler(MediaObject *_self, PyObject *_args)
  2373. {
  2374. PyObject *_res = NULL;
  2375. DataHandler _rv;
  2376. short index;
  2377. #ifndef GetMediaDataHandler
  2378. PyMac_PRECHECK(GetMediaDataHandler);
  2379. #endif
  2380. if (!PyArg_ParseTuple(_args, "h",
  2381. &index))
  2382. return NULL;
  2383. _rv = GetMediaDataHandler(_self->ob_itself,
  2384. index);
  2385. _res = Py_BuildValue("O&",
  2386. CmpInstObj_New, _rv);
  2387. return _res;
  2388. }
  2389. static PyObject *MediaObj_SetMediaDataHandler(MediaObject *_self, PyObject *_args)
  2390. {
  2391. PyObject *_res = NULL;
  2392. OSErr _err;
  2393. short index;
  2394. DataHandlerComponent dataHandler;
  2395. #ifndef SetMediaDataHandler
  2396. PyMac_PRECHECK(SetMediaDataHandler);
  2397. #endif
  2398. if (!PyArg_ParseTuple(_args, "hO&",
  2399. &index,
  2400. CmpObj_Convert, &dataHandler))
  2401. return NULL;
  2402. _err = SetMediaDataHandler(_self->ob_itself,
  2403. index,
  2404. dataHandler);
  2405. if (_err != noErr) return PyMac_Error(_err);
  2406. Py_INCREF(Py_None);
  2407. _res = Py_None;
  2408. return _res;
  2409. }
  2410. static PyObject *MediaObj_GetMediaSampleDescriptionCount(MediaObject *_self, PyObject *_args)
  2411. {
  2412. PyObject *_res = NULL;
  2413. long _rv;
  2414. #ifndef GetMediaSampleDescriptionCount
  2415. PyMac_PRECHECK(GetMediaSampleDescriptionCount);
  2416. #endif
  2417. if (!PyArg_ParseTuple(_args, ""))
  2418. return NULL;
  2419. _rv = GetMediaSampleDescriptionCount(_self->ob_itself);
  2420. _res = Py_BuildValue("l",
  2421. _rv);
  2422. return _res;
  2423. }
  2424. static PyObject *MediaObj_GetMediaSampleDescription(MediaObject *_self, PyObject *_args)
  2425. {
  2426. PyObject *_res = NULL;
  2427. long index;
  2428. SampleDescriptionHandle descH;
  2429. #ifndef GetMediaSampleDescription
  2430. PyMac_PRECHECK(GetMediaSampleDescription);
  2431. #endif
  2432. if (!PyArg_ParseTuple(_args, "lO&",
  2433. &index,
  2434. ResObj_Convert, &descH))
  2435. return NULL;
  2436. GetMediaSampleDescription(_self->ob_itself,
  2437. index,
  2438. descH);
  2439. Py_INCREF(Py_None);
  2440. _res = Py_None;
  2441. return _res;
  2442. }
  2443. static PyObject *MediaObj_SetMediaSampleDescription(MediaObject *_self, PyObject *_args)
  2444. {
  2445. PyObject *_res = NULL;
  2446. OSErr _err;
  2447. long index;
  2448. SampleDescriptionHandle descH;
  2449. #ifndef SetMediaSampleDescription
  2450. PyMac_PRECHECK(SetMediaSampleDescription);
  2451. #endif
  2452. if (!PyArg_ParseTuple(_args, "lO&",
  2453. &index,
  2454. ResObj_Convert, &descH))
  2455. return NULL;
  2456. _err = SetMediaSampleDescription(_self->ob_itself,
  2457. index,
  2458. descH);
  2459. if (_err != noErr) return PyMac_Error(_err);
  2460. Py_INCREF(Py_None);
  2461. _res = Py_None;
  2462. return _res;
  2463. }
  2464. static PyObject *MediaObj_GetMediaSampleCount(MediaObject *_self, PyObject *_args)
  2465. {
  2466. PyObject *_res = NULL;
  2467. long _rv;
  2468. #ifndef GetMediaSampleCount
  2469. PyMac_PRECHECK(GetMediaSampleCount);
  2470. #endif
  2471. if (!PyArg_ParseTuple(_args, ""))
  2472. return NULL;
  2473. _rv = GetMediaSampleCount(_self->ob_itself);
  2474. _res = Py_BuildValue("l",
  2475. _rv);
  2476. return _res;
  2477. }
  2478. static PyObject *MediaObj_GetMediaSyncSampleCount(MediaObject *_self, PyObject *_args)
  2479. {
  2480. PyObject *_res = NULL;
  2481. long _rv;
  2482. #ifndef GetMediaSyncSampleCount
  2483. PyMac_PRECHECK(GetMediaSyncSampleCount);
  2484. #endif
  2485. if (!PyArg_ParseTuple(_args, ""))
  2486. return NULL;
  2487. _rv = GetMediaSyncSampleCount(_self->ob_itself);
  2488. _res = Py_BuildValue("l",
  2489. _rv);
  2490. return _res;
  2491. }
  2492. static PyObject *MediaObj_SampleNumToMediaTime(MediaObject *_self, PyObject *_args)
  2493. {
  2494. PyObject *_res = NULL;
  2495. long logicalSampleNum;
  2496. TimeValue sampleTime;
  2497. TimeValue sampleDuration;
  2498. #ifndef SampleNumToMediaTime
  2499. PyMac_PRECHECK(SampleNumToMediaTime);
  2500. #endif
  2501. if (!PyArg_ParseTuple(_args, "l",
  2502. &logicalSampleNum))
  2503. return NULL;
  2504. SampleNumToMediaTime(_self->ob_itself,
  2505. logicalSampleNum,
  2506. &sampleTime,
  2507. &sampleDuration);
  2508. _res = Py_BuildValue("ll",
  2509. sampleTime,
  2510. sampleDuration);
  2511. return _res;
  2512. }
  2513. static PyObject *MediaObj_MediaTimeToSampleNum(MediaObject *_self, PyObject *_args)
  2514. {
  2515. PyObject *_res = NULL;
  2516. TimeValue time;
  2517. long sampleNum;
  2518. TimeValue sampleTime;
  2519. TimeValue sampleDuration;
  2520. #ifndef MediaTimeToSampleNum
  2521. PyMac_PRECHECK(MediaTimeToSampleNum);
  2522. #endif
  2523. if (!PyArg_ParseTuple(_args, "l",
  2524. &time))
  2525. return NULL;
  2526. MediaTimeToSampleNum(_self->ob_itself,
  2527. time,
  2528. &sampleNum,
  2529. &sampleTime,
  2530. &sampleDuration);
  2531. _res = Py_BuildValue("lll",
  2532. sampleNum,
  2533. sampleTime,
  2534. sampleDuration);
  2535. return _res;
  2536. }
  2537. static PyObject *MediaObj_AddMediaSample(MediaObject *_self, PyObject *_args)
  2538. {
  2539. PyObject *_res = NULL;
  2540. OSErr _err;
  2541. Handle dataIn;
  2542. long inOffset;
  2543. unsigned long size;
  2544. TimeValue durationPerSample;
  2545. SampleDescriptionHandle sampleDescriptionH;
  2546. long numberOfSamples;
  2547. short sampleFlags;
  2548. TimeValue sampleTime;
  2549. #ifndef AddMediaSample
  2550. PyMac_PRECHECK(AddMediaSample);
  2551. #endif
  2552. if (!PyArg_ParseTuple(_args, "O&lllO&lh",
  2553. ResObj_Convert, &dataIn,
  2554. &inOffset,
  2555. &size,
  2556. &durationPerSample,
  2557. ResObj_Convert, &sampleDescriptionH,
  2558. &numberOfSamples,
  2559. &sampleFlags))
  2560. return NULL;
  2561. _err = AddMediaSample(_self->ob_itself,
  2562. dataIn,
  2563. inOffset,
  2564. size,
  2565. durationPerSample,
  2566. sampleDescriptionH,
  2567. numberOfSamples,
  2568. sampleFlags,
  2569. &sampleTime);
  2570. if (_err != noErr) return PyMac_Error(_err);
  2571. _res = Py_BuildValue("l",
  2572. sampleTime);
  2573. return _res;
  2574. }
  2575. static PyObject *MediaObj_AddMediaSampleReference(MediaObject *_self, PyObject *_args)
  2576. {
  2577. PyObject *_res = NULL;
  2578. OSErr _err;
  2579. long dataOffset;
  2580. unsigned long size;
  2581. TimeValue durationPerSample;
  2582. SampleDescriptionHandle sampleDescriptionH;
  2583. long numberOfSamples;
  2584. short sampleFlags;
  2585. TimeValue sampleTime;
  2586. #ifndef AddMediaSampleReference
  2587. PyMac_PRECHECK(AddMediaSampleReference);
  2588. #endif
  2589. if (!PyArg_ParseTuple(_args, "lllO&lh",
  2590. &dataOffset,
  2591. &size,
  2592. &durationPerSample,
  2593. ResObj_Convert, &sampleDescriptionH,
  2594. &numberOfSamples,
  2595. &sampleFlags))
  2596. return NULL;
  2597. _err = AddMediaSampleReference(_self->ob_itself,
  2598. dataOffset,
  2599. size,
  2600. durationPerSample,
  2601. sampleDescriptionH,
  2602. numberOfSamples,
  2603. sampleFlags,
  2604. &sampleTime);
  2605. if (_err != noErr) return PyMac_Error(_err);
  2606. _res = Py_BuildValue("l",
  2607. sampleTime);
  2608. return _res;
  2609. }
  2610. static PyObject *MediaObj_GetMediaSample(MediaObject *_self, PyObject *_args)
  2611. {
  2612. PyObject *_res = NULL;
  2613. OSErr _err;
  2614. Handle dataOut;
  2615. long maxSizeToGrow;
  2616. long size;
  2617. TimeValue time;
  2618. TimeValue sampleTime;
  2619. TimeValue durationPerSample;
  2620. SampleDescriptionHandle sampleDescriptionH;
  2621. long sampleDescriptionIndex;
  2622. long maxNumberOfSamples;
  2623. long numberOfSamples;
  2624. short sampleFlags;
  2625. #ifndef GetMediaSample
  2626. PyMac_PRECHECK(GetMediaSample);
  2627. #endif
  2628. if (!PyArg_ParseTuple(_args, "O&llO&l",
  2629. ResObj_Convert, &dataOut,
  2630. &maxSizeToGrow,
  2631. &time,
  2632. ResObj_Convert, &sampleDescriptionH,
  2633. &maxNumberOfSamples))
  2634. return NULL;
  2635. _err = GetMediaSample(_self->ob_itself,
  2636. dataOut,
  2637. maxSizeToGrow,
  2638. &size,
  2639. time,
  2640. &sampleTime,
  2641. &durationPerSample,
  2642. sampleDescriptionH,
  2643. &sampleDescriptionIndex,
  2644. maxNumberOfSamples,
  2645. &numberOfSamples,
  2646. &sampleFlags);
  2647. if (_err != noErr) return PyMac_Error(_err);
  2648. _res = Py_BuildValue("lllllh",
  2649. size,
  2650. sampleTime,
  2651. durationPerSample,
  2652. sampleDescriptionIndex,
  2653. numberOfSamples,
  2654. sampleFlags);
  2655. return _res;
  2656. }
  2657. static PyObject *MediaObj_GetMediaSampleReference(MediaObject *_self, PyObject *_args)
  2658. {
  2659. PyObject *_res = NULL;
  2660. OSErr _err;
  2661. long dataOffset;
  2662. long size;
  2663. TimeValue time;
  2664. TimeValue sampleTime;
  2665. TimeValue durationPerSample;
  2666. SampleDescriptionHandle sampleDescriptionH;
  2667. long sampleDescriptionIndex;
  2668. long maxNumberOfSamples;
  2669. long numberOfSamples;
  2670. short sampleFlags;
  2671. #ifndef GetMediaSampleReference
  2672. PyMac_PRECHECK(GetMediaSampleReference);
  2673. #endif
  2674. if (!PyArg_ParseTuple(_args, "lO&l",
  2675. &time,
  2676. ResObj_Convert, &sampleDescriptionH,
  2677. &maxNumberOfSamples))
  2678. return NULL;
  2679. _err = GetMediaSampleReference(_self->ob_itself,
  2680. &dataOffset,
  2681. &size,
  2682. time,
  2683. &sampleTime,
  2684. &durationPerSample,
  2685. sampleDescriptionH,
  2686. &sampleDescriptionIndex,
  2687. maxNumberOfSamples,
  2688. &numberOfSamples,
  2689. &sampleFlags);
  2690. if (_err != noErr) return PyMac_Error(_err);
  2691. _res = Py_BuildValue("llllllh",
  2692. dataOffset,
  2693. size,
  2694. sampleTime,
  2695. durationPerSample,
  2696. sampleDescriptionIndex,
  2697. numberOfSamples,
  2698. sampleFlags);
  2699. return _res;
  2700. }
  2701. static PyObject *MediaObj_SetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
  2702. {
  2703. PyObject *_res = NULL;
  2704. OSErr _err;
  2705. long maxChunkSize;
  2706. #ifndef SetMediaPreferredChunkSize
  2707. PyMac_PRECHECK(SetMediaPreferredChunkSize);
  2708. #endif
  2709. if (!PyArg_ParseTuple(_args, "l",
  2710. &maxChunkSize))
  2711. return NULL;
  2712. _err = SetMediaPreferredChunkSize(_self->ob_itself,
  2713. maxChunkSize);
  2714. if (_err != noErr) return PyMac_Error(_err);
  2715. Py_INCREF(Py_None);
  2716. _res = Py_None;
  2717. return _res;
  2718. }
  2719. static PyObject *MediaObj_GetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
  2720. {
  2721. PyObject *_res = NULL;
  2722. OSErr _err;
  2723. long maxChunkSize;
  2724. #ifndef GetMediaPreferredChunkSize
  2725. PyMac_PRECHECK(GetMediaPreferredChunkSize);
  2726. #endif
  2727. if (!PyArg_ParseTuple(_args, ""))
  2728. return NULL;
  2729. _err = GetMediaPreferredChunkSize(_self->ob_itself,
  2730. &maxChunkSize);
  2731. if (_err != noErr) return PyMac_Error(_err);
  2732. _res = Py_BuildValue("l",
  2733. maxChunkSize);
  2734. return _res;
  2735. }
  2736. static PyObject *MediaObj_SetMediaShadowSync(MediaObject *_self, PyObject *_args)
  2737. {
  2738. PyObject *_res = NULL;
  2739. OSErr _err;
  2740. long frameDiffSampleNum;
  2741. long syncSampleNum;
  2742. #ifndef SetMediaShadowSync
  2743. PyMac_PRECHECK(SetMediaShadowSync);
  2744. #endif
  2745. if (!PyArg_ParseTuple(_args, "ll",
  2746. &frameDiffSampleNum,
  2747. &syncSampleNum))
  2748. return NULL;
  2749. _err = SetMediaShadowSync(_self->ob_itself,
  2750. frameDiffSampleNum,
  2751. syncSampleNum);
  2752. if (_err != noErr) return PyMac_Error(_err);
  2753. Py_INCREF(Py_None);
  2754. _res = Py_None;
  2755. return _res;
  2756. }
  2757. static PyObject *MediaObj_GetMediaShadowSync(MediaObject *_self, PyObject *_args)
  2758. {
  2759. PyObject *_res = NULL;
  2760. OSErr _err;
  2761. long frameDiffSampleNum;
  2762. long syncSampleNum;
  2763. #ifndef GetMediaShadowSync
  2764. PyMac_PRECHECK(GetMediaShadowSync);
  2765. #endif
  2766. if (!PyArg_ParseTuple(_args, "l",
  2767. &frameDiffSampleNum))
  2768. return NULL;
  2769. _err = GetMediaShadowSync(_self->ob_itself,
  2770. frameDiffSampleNum,
  2771. &syncSampleNum);
  2772. if (_err != noErr) return PyMac_Error(_err);
  2773. _res = Py_BuildValue("l",
  2774. syncSampleNum);
  2775. return _res;
  2776. }
  2777. static PyObject *MediaObj_GetMediaDataSize(MediaObject *_self, PyObject *_args)
  2778. {
  2779. PyObject *_res = NULL;
  2780. long _rv;
  2781. TimeValue startTime;
  2782. TimeValue duration;
  2783. #ifndef GetMediaDataSize
  2784. PyMac_PRECHECK(GetMediaDataSize);
  2785. #endif
  2786. if (!PyArg_ParseTuple(_args, "ll",
  2787. &startTime,
  2788. &duration))
  2789. return NULL;
  2790. _rv = GetMediaDataSize(_self->ob_itself,
  2791. startTime,
  2792. duration);
  2793. _res = Py_BuildValue("l",
  2794. _rv);
  2795. return _res;
  2796. }
  2797. static PyObject *MediaObj_GetMediaDataSize64(MediaObject *_self, PyObject *_args)
  2798. {
  2799. PyObject *_res = NULL;
  2800. OSErr _err;
  2801. TimeValue startTime;
  2802. TimeValue duration;
  2803. wide dataSize;
  2804. #ifndef GetMediaDataSize64
  2805. PyMac_PRECHECK(GetMediaDataSize64);
  2806. #endif
  2807. if (!PyArg_ParseTuple(_args, "ll",
  2808. &startTime,
  2809. &duration))
  2810. return NULL;
  2811. _err = GetMediaDataSize64(_self->ob_itself,
  2812. startTime,
  2813. duration,
  2814. &dataSize);
  2815. if (_err != noErr) return PyMac_Error(_err);
  2816. _res = Py_BuildValue("O&",
  2817. PyMac_Buildwide, dataSize);
  2818. return _res;
  2819. }
  2820. static PyObject *MediaObj_CopyMediaUserData(MediaObject *_self, PyObject *_args)
  2821. {
  2822. PyObject *_res = NULL;
  2823. OSErr _err;
  2824. Media dstMedia;
  2825. OSType copyRule;
  2826. #ifndef CopyMediaUserData
  2827. PyMac_PRECHECK(CopyMediaUserData);
  2828. #endif
  2829. if (!PyArg_ParseTuple(_args, "O&O&",
  2830. MediaObj_Convert, &dstMedia,
  2831. PyMac_GetOSType, &copyRule))
  2832. return NULL;
  2833. _err = CopyMediaUserData(_self->ob_itself,
  2834. dstMedia,
  2835. copyRule);
  2836. if (_err != noErr) return PyMac_Error(_err);
  2837. Py_INCREF(Py_None);
  2838. _res = Py_None;
  2839. return _res;
  2840. }
  2841. static PyObject *MediaObj_GetMediaNextInterestingTime(MediaObject *_self, PyObject *_args)
  2842. {
  2843. PyObject *_res = NULL;
  2844. short interestingTimeFlags;
  2845. TimeValue time;
  2846. Fixed rate;
  2847. TimeValue interestingTime;
  2848. TimeValue interestingDuration;
  2849. #ifndef GetMediaNextInterestingTime
  2850. PyMac_PRECHECK(GetMediaNextInterestingTime);
  2851. #endif
  2852. if (!PyArg_ParseTuple(_args, "hlO&",
  2853. &interestingTimeFlags,
  2854. &time,
  2855. PyMac_GetFixed, &rate))
  2856. return NULL;
  2857. GetMediaNextInterestingTime(_self->ob_itself,
  2858. interestingTimeFlags,
  2859. time,
  2860. rate,
  2861. &interestingTime,
  2862. &interestingDuration);
  2863. _res = Py_BuildValue("ll",
  2864. interestingTime,
  2865. interestingDuration);
  2866. return _res;
  2867. }
  2868. static PyObject *MediaObj_GetMediaDataRef(MediaObject *_self, PyObject *_args)
  2869. {
  2870. PyObject *_res = NULL;
  2871. OSErr _err;
  2872. short index;
  2873. Handle dataRef;
  2874. OSType dataRefType;
  2875. long dataRefAttributes;
  2876. #ifndef GetMediaDataRef
  2877. PyMac_PRECHECK(GetMediaDataRef);
  2878. #endif
  2879. if (!PyArg_ParseTuple(_args, "h",
  2880. &index))
  2881. return NULL;
  2882. _err = GetMediaDataRef(_self->ob_itself,
  2883. index,
  2884. &dataRef,
  2885. &dataRefType,
  2886. &dataRefAttributes);
  2887. if (_err != noErr) return PyMac_Error(_err);
  2888. _res = Py_BuildValue("O&O&l",
  2889. ResObj_New, dataRef,
  2890. PyMac_BuildOSType, dataRefType,
  2891. dataRefAttributes);
  2892. return _res;
  2893. }
  2894. static PyObject *MediaObj_SetMediaDataRef(MediaObject *_self, PyObject *_args)
  2895. {
  2896. PyObject *_res = NULL;
  2897. OSErr _err;
  2898. short index;
  2899. Handle dataRef;
  2900. OSType dataRefType;
  2901. #ifndef SetMediaDataRef
  2902. PyMac_PRECHECK(SetMediaDataRef);
  2903. #endif
  2904. if (!PyArg_ParseTuple(_args, "hO&O&",
  2905. &index,
  2906. ResObj_Convert, &dataRef,
  2907. PyMac_GetOSType, &dataRefType))
  2908. return NULL;
  2909. _err = SetMediaDataRef(_self->ob_itself,
  2910. index,
  2911. dataRef,
  2912. dataRefType);
  2913. if (_err != noErr) return PyMac_Error(_err);
  2914. Py_INCREF(Py_None);
  2915. _res = Py_None;
  2916. return _res;
  2917. }
  2918. static PyObject *MediaObj_SetMediaDataRefAttributes(MediaObject *_self, PyObject *_args)
  2919. {
  2920. PyObject *_res = NULL;
  2921. OSErr _err;
  2922. short index;
  2923. long dataRefAttributes;
  2924. #ifndef SetMediaDataRefAttributes
  2925. PyMac_PRECHECK(SetMediaDataRefAttributes);
  2926. #endif
  2927. if (!PyArg_ParseTuple(_args, "hl",
  2928. &index,
  2929. &dataRefAttributes))
  2930. return NULL;
  2931. _err = SetMediaDataRefAttributes(_self->ob_itself,
  2932. index,
  2933. dataRefAttributes);
  2934. if (_err != noErr) return PyMac_Error(_err);
  2935. Py_INCREF(Py_None);
  2936. _res = Py_None;
  2937. return _res;
  2938. }
  2939. static PyObject *MediaObj_AddMediaDataRef(MediaObject *_self, PyObject *_args)
  2940. {
  2941. PyObject *_res = NULL;
  2942. OSErr _err;
  2943. short index;
  2944. Handle dataRef;
  2945. OSType dataRefType;
  2946. #ifndef AddMediaDataRef
  2947. PyMac_PRECHECK(AddMediaDataRef);
  2948. #endif
  2949. if (!PyArg_ParseTuple(_args, "O&O&",
  2950. ResObj_Convert, &dataRef,
  2951. PyMac_GetOSType, &dataRefType))
  2952. return NULL;
  2953. _err = AddMediaDataRef(_self->ob_itself,
  2954. &index,
  2955. dataRef,
  2956. dataRefType);
  2957. if (_err != noErr) return PyMac_Error(_err);
  2958. _res = Py_BuildValue("h",
  2959. index);
  2960. return _res;
  2961. }
  2962. static PyObject *MediaObj_GetMediaDataRefCount(MediaObject *_self, PyObject *_args)
  2963. {
  2964. PyObject *_res = NULL;
  2965. OSErr _err;
  2966. short count;
  2967. #ifndef GetMediaDataRefCount
  2968. PyMac_PRECHECK(GetMediaDataRefCount);
  2969. #endif
  2970. if (!PyArg_ParseTuple(_args, ""))
  2971. return NULL;
  2972. _err = GetMediaDataRefCount(_self->ob_itself,
  2973. &count);
  2974. if (_err != noErr) return PyMac_Error(_err);
  2975. _res = Py_BuildValue("h",
  2976. count);
  2977. return _res;
  2978. }
  2979. static PyObject *MediaObj_SetMediaPlayHints(MediaObject *_self, PyObject *_args)
  2980. {
  2981. PyObject *_res = NULL;
  2982. long flags;
  2983. long flagsMask;
  2984. #ifndef SetMediaPlayHints
  2985. PyMac_PRECHECK(SetMediaPlayHints);
  2986. #endif
  2987. if (!PyArg_ParseTuple(_args, "ll",
  2988. &flags,
  2989. &flagsMask))
  2990. return NULL;
  2991. SetMediaPlayHints(_self->ob_itself,
  2992. flags,
  2993. flagsMask);
  2994. Py_INCREF(Py_None);
  2995. _res = Py_None;
  2996. return _res;
  2997. }
  2998. static PyObject *MediaObj_GetMediaPlayHints(MediaObject *_self, PyObject *_args)
  2999. {
  3000. PyObject *_res = NULL;
  3001. long flags;
  3002. #ifndef GetMediaPlayHints
  3003. PyMac_PRECHECK(GetMediaPlayHints);
  3004. #endif
  3005. if (!PyArg_ParseTuple(_args, ""))
  3006. return NULL;
  3007. GetMediaPlayHints(_self->ob_itself,
  3008. &flags);
  3009. _res = Py_BuildValue("l",
  3010. flags);
  3011. return _res;
  3012. }
  3013. static PyObject *MediaObj_GetMediaNextInterestingTimeOnly(MediaObject *_self, PyObject *_args)
  3014. {
  3015. PyObject *_res = NULL;
  3016. short interestingTimeFlags;
  3017. TimeValue time;
  3018. Fixed rate;
  3019. TimeValue interestingTime;
  3020. #ifndef GetMediaNextInterestingTimeOnly
  3021. PyMac_PRECHECK(GetMediaNextInterestingTimeOnly);
  3022. #endif
  3023. if (!PyArg_ParseTuple(_args, "hlO&",
  3024. &interestingTimeFlags,
  3025. &time,
  3026. PyMac_GetFixed, &rate))
  3027. return NULL;
  3028. GetMediaNextInterestingTimeOnly(_self->ob_itself,
  3029. interestingTimeFlags,
  3030. time,
  3031. rate,
  3032. &interestingTime);
  3033. _res = Py_BuildValue("l",
  3034. interestingTime);
  3035. return _res;
  3036. }
  3037. static PyMethodDef MediaObj_methods[] = {
  3038. {"LoadMediaIntoRam", (PyCFunction)MediaObj_LoadMediaIntoRam, 1,
  3039. PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
  3040. {"GetMediaTrack", (PyCFunction)MediaObj_GetMediaTrack, 1,
  3041. PyDoc_STR("() -> (Track _rv)")},
  3042. {"GetMediaCreationTime", (PyCFunction)MediaObj_GetMediaCreationTime, 1,
  3043. PyDoc_STR("() -> (unsigned long _rv)")},
  3044. {"GetMediaModificationTime", (PyCFunction)MediaObj_GetMediaModificationTime, 1,
  3045. PyDoc_STR("() -> (unsigned long _rv)")},
  3046. {"GetMediaTimeScale", (PyCFunction)MediaObj_GetMediaTimeScale, 1,
  3047. PyDoc_STR("() -> (TimeScale _rv)")},
  3048. {"SetMediaTimeScale", (PyCFunction)MediaObj_SetMediaTimeScale, 1,
  3049. PyDoc_STR("(TimeScale timeScale) -> None")},
  3050. {"GetMediaDuration", (PyCFunction)MediaObj_GetMediaDuration, 1,
  3051. PyDoc_STR("() -> (TimeValue _rv)")},
  3052. {"GetMediaLanguage", (PyCFunction)MediaObj_GetMediaLanguage, 1,
  3053. PyDoc_STR("() -> (short _rv)")},
  3054. {"SetMediaLanguage", (PyCFunction)MediaObj_SetMediaLanguage, 1,
  3055. PyDoc_STR("(short language) -> None")},
  3056. {"GetMediaQuality", (PyCFunction)MediaObj_GetMediaQuality, 1,
  3057. PyDoc_STR("() -> (short _rv)")},
  3058. {"SetMediaQuality", (PyCFunction)MediaObj_SetMediaQuality, 1,
  3059. PyDoc_STR("(short quality) -> None")},
  3060. {"GetMediaHandlerDescription", (PyCFunction)MediaObj_GetMediaHandlerDescription, 1,
  3061. PyDoc_STR("(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)")},
  3062. {"GetMediaUserData", (PyCFunction)MediaObj_GetMediaUserData, 1,
  3063. PyDoc_STR("() -> (UserData _rv)")},
  3064. {"GetMediaHandler", (PyCFunction)MediaObj_GetMediaHandler, 1,
  3065. PyDoc_STR("() -> (MediaHandler _rv)")},
  3066. {"SetMediaHandler", (PyCFunction)MediaObj_SetMediaHandler, 1,
  3067. PyDoc_STR("(MediaHandlerComponent mH) -> None")},
  3068. {"BeginMediaEdits", (PyCFunction)MediaObj_BeginMediaEdits, 1,
  3069. PyDoc_STR("() -> None")},
  3070. {"EndMediaEdits", (PyCFunction)MediaObj_EndMediaEdits, 1,
  3071. PyDoc_STR("() -> None")},
  3072. {"SetMediaDefaultDataRefIndex", (PyCFunction)MediaObj_SetMediaDefaultDataRefIndex, 1,
  3073. PyDoc_STR("(short index) -> None")},
  3074. {"GetMediaDataHandlerDescription", (PyCFunction)MediaObj_GetMediaDataHandlerDescription, 1,
  3075. PyDoc_STR("(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)")},
  3076. {"GetMediaDataHandler", (PyCFunction)MediaObj_GetMediaDataHandler, 1,
  3077. PyDoc_STR("(short index) -> (DataHandler _rv)")},
  3078. {"SetMediaDataHandler", (PyCFunction)MediaObj_SetMediaDataHandler, 1,
  3079. PyDoc_STR("(short index, DataHandlerComponent dataHandler) -> None")},
  3080. {"GetMediaSampleDescriptionCount", (PyCFunction)MediaObj_GetMediaSampleDescriptionCount, 1,
  3081. PyDoc_STR("() -> (long _rv)")},
  3082. {"GetMediaSampleDescription", (PyCFunction)MediaObj_GetMediaSampleDescription, 1,
  3083. PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
  3084. {"SetMediaSampleDescription", (PyCFunction)MediaObj_SetMediaSampleDescription, 1,
  3085. PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
  3086. {"GetMediaSampleCount", (PyCFunction)MediaObj_GetMediaSampleCount, 1,
  3087. PyDoc_STR("() -> (long _rv)")},
  3088. {"GetMediaSyncSampleCount", (PyCFunction)MediaObj_GetMediaSyncSampleCount, 1,
  3089. PyDoc_STR("() -> (long _rv)")},
  3090. {"SampleNumToMediaTime", (PyCFunction)MediaObj_SampleNumToMediaTime, 1,
  3091. PyDoc_STR("(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)")},
  3092. {"MediaTimeToSampleNum", (PyCFunction)MediaObj_MediaTimeToSampleNum, 1,
  3093. PyDoc_STR("(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)")},
  3094. {"AddMediaSample", (PyCFunction)MediaObj_AddMediaSample, 1,
  3095. PyDoc_STR("(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
  3096. {"AddMediaSampleReference", (PyCFunction)MediaObj_AddMediaSampleReference, 1,
  3097. PyDoc_STR("(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
  3098. {"GetMediaSample", (PyCFunction)MediaObj_GetMediaSample, 1,
  3099. PyDoc_STR("(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
  3100. {"GetMediaSampleReference", (PyCFunction)MediaObj_GetMediaSampleReference, 1,
  3101. PyDoc_STR("(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
  3102. {"SetMediaPreferredChunkSize", (PyCFunction)MediaObj_SetMediaPreferredChunkSize, 1,
  3103. PyDoc_STR("(long maxChunkSize) -> None")},
  3104. {"GetMediaPreferredChunkSize", (PyCFunction)MediaObj_GetMediaPreferredChunkSize, 1,
  3105. PyDoc_STR("() -> (long maxChunkSize)")},
  3106. {"SetMediaShadowSync", (PyCFunction)MediaObj_SetMediaShadowSync, 1,
  3107. PyDoc_STR("(long frameDiffSampleNum, long syncSampleNum) -> None")},
  3108. {"GetMediaShadowSync", (PyCFunction)MediaObj_GetMediaShadowSync, 1,
  3109. PyDoc_STR("(long frameDiffSampleNum) -> (long syncSampleNum)")},
  3110. {"GetMediaDataSize", (PyCFunction)MediaObj_GetMediaDataSize, 1,
  3111. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
  3112. {"GetMediaDataSize64", (PyCFunction)MediaObj_GetMediaDataSize64, 1,
  3113. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
  3114. {"CopyMediaUserData", (PyCFunction)MediaObj_CopyMediaUserData, 1,
  3115. PyDoc_STR("(Media dstMedia, OSType copyRule) -> None")},
  3116. {"GetMediaNextInterestingTime", (PyCFunction)MediaObj_GetMediaNextInterestingTime, 1,
  3117. PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
  3118. {"GetMediaDataRef", (PyCFunction)MediaObj_GetMediaDataRef, 1,
  3119. PyDoc_STR("(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)")},
  3120. {"SetMediaDataRef", (PyCFunction)MediaObj_SetMediaDataRef, 1,
  3121. PyDoc_STR("(short index, Handle dataRef, OSType dataRefType) -> None")},
  3122. {"SetMediaDataRefAttributes", (PyCFunction)MediaObj_SetMediaDataRefAttributes, 1,
  3123. PyDoc_STR("(short index, long dataRefAttributes) -> None")},
  3124. {"AddMediaDataRef", (PyCFunction)MediaObj_AddMediaDataRef, 1,
  3125. PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (short index)")},
  3126. {"GetMediaDataRefCount", (PyCFunction)MediaObj_GetMediaDataRefCount, 1,
  3127. PyDoc_STR("() -> (short count)")},
  3128. {"SetMediaPlayHints", (PyCFunction)MediaObj_SetMediaPlayHints, 1,
  3129. PyDoc_STR("(long flags, long flagsMask) -> None")},
  3130. {"GetMediaPlayHints", (PyCFunction)MediaObj_GetMediaPlayHints, 1,
  3131. PyDoc_STR("() -> (long flags)")},
  3132. {"GetMediaNextInterestingTimeOnly", (PyCFunction)MediaObj_GetMediaNextInterestingTimeOnly, 1,
  3133. PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime)")},
  3134. {NULL, NULL, 0}
  3135. };
  3136. #define MediaObj_getsetlist NULL
  3137. #define MediaObj_compare NULL
  3138. #define MediaObj_repr NULL
  3139. #define MediaObj_hash NULL
  3140. #define MediaObj_tp_init 0
  3141. #define MediaObj_tp_alloc PyType_GenericAlloc
  3142. static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  3143. {
  3144. PyObject *_self;
  3145. Media itself;
  3146. char *kw[] = {"itself", 0};
  3147. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MediaObj_Convert, &itself)) return NULL;
  3148. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  3149. ((MediaObject *)_self)->ob_itself = itself;
  3150. return _self;
  3151. }
  3152. #define MediaObj_tp_free PyObject_Del
  3153. PyTypeObject Media_Type = {
  3154. PyObject_HEAD_INIT(NULL)
  3155. 0, /*ob_size*/
  3156. "_Qt.Media", /*tp_name*/
  3157. sizeof(MediaObject), /*tp_basicsize*/
  3158. 0, /*tp_itemsize*/
  3159. /* methods */
  3160. (destructor) MediaObj_dealloc, /*tp_dealloc*/
  3161. 0, /*tp_print*/
  3162. (getattrfunc)0, /*tp_getattr*/
  3163. (setattrfunc)0, /*tp_setattr*/
  3164. (cmpfunc) MediaObj_compare, /*tp_compare*/
  3165. (reprfunc) MediaObj_repr, /*tp_repr*/
  3166. (PyNumberMethods *)0, /* tp_as_number */
  3167. (PySequenceMethods *)0, /* tp_as_sequence */
  3168. (PyMappingMethods *)0, /* tp_as_mapping */
  3169. (hashfunc) MediaObj_hash, /*tp_hash*/
  3170. 0, /*tp_call*/
  3171. 0, /*tp_str*/
  3172. PyObject_GenericGetAttr, /*tp_getattro*/
  3173. PyObject_GenericSetAttr, /*tp_setattro */
  3174. 0, /*tp_as_buffer*/
  3175. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  3176. 0, /*tp_doc*/
  3177. 0, /*tp_traverse*/
  3178. 0, /*tp_clear*/
  3179. 0, /*tp_richcompare*/
  3180. 0, /*tp_weaklistoffset*/
  3181. 0, /*tp_iter*/
  3182. 0, /*tp_iternext*/
  3183. MediaObj_methods, /* tp_methods */
  3184. 0, /*tp_members*/
  3185. MediaObj_getsetlist, /*tp_getset*/
  3186. 0, /*tp_base*/
  3187. 0, /*tp_dict*/
  3188. 0, /*tp_descr_get*/
  3189. 0, /*tp_descr_set*/
  3190. 0, /*tp_dictoffset*/
  3191. MediaObj_tp_init, /* tp_init */
  3192. MediaObj_tp_alloc, /* tp_alloc */
  3193. MediaObj_tp_new, /* tp_new */
  3194. MediaObj_tp_free, /* tp_free */
  3195. };
  3196. /* --------------------- End object type Media ---------------------- */
  3197. /* ----------------------- Object type Track ------------------------ */
  3198. PyTypeObject Track_Type;
  3199. #define TrackObj_Check(x) ((x)->ob_type == &Track_Type || PyObject_TypeCheck((x), &Track_Type))
  3200. typedef struct TrackObject {
  3201. PyObject_HEAD
  3202. Track ob_itself;
  3203. } TrackObject;
  3204. PyObject *TrackObj_New(Track itself)
  3205. {
  3206. TrackObject *it;
  3207. if (itself == NULL) {
  3208. PyErr_SetString(Qt_Error,"Cannot create Track from NULL pointer");
  3209. return NULL;
  3210. }
  3211. it = PyObject_NEW(TrackObject, &Track_Type);
  3212. if (it == NULL) return NULL;
  3213. it->ob_itself = itself;
  3214. return (PyObject *)it;
  3215. }
  3216. int TrackObj_Convert(PyObject *v, Track *p_itself)
  3217. {
  3218. if (v == Py_None)
  3219. {
  3220. *p_itself = NULL;
  3221. return 1;
  3222. }
  3223. if (!TrackObj_Check(v))
  3224. {
  3225. PyErr_SetString(PyExc_TypeError, "Track required");
  3226. return 0;
  3227. }
  3228. *p_itself = ((TrackObject *)v)->ob_itself;
  3229. return 1;
  3230. }
  3231. static void TrackObj_dealloc(TrackObject *self)
  3232. {
  3233. if (self->ob_itself) DisposeMovieTrack(self->ob_itself);
  3234. self->ob_type->tp_free((PyObject *)self);
  3235. }
  3236. static PyObject *TrackObj_LoadTrackIntoRam(TrackObject *_self, PyObject *_args)
  3237. {
  3238. PyObject *_res = NULL;
  3239. OSErr _err;
  3240. TimeValue time;
  3241. TimeValue duration;
  3242. long flags;
  3243. #ifndef LoadTrackIntoRam
  3244. PyMac_PRECHECK(LoadTrackIntoRam);
  3245. #endif
  3246. if (!PyArg_ParseTuple(_args, "lll",
  3247. &time,
  3248. &duration,
  3249. &flags))
  3250. return NULL;
  3251. _err = LoadTrackIntoRam(_self->ob_itself,
  3252. time,
  3253. duration,
  3254. flags);
  3255. if (_err != noErr) return PyMac_Error(_err);
  3256. Py_INCREF(Py_None);
  3257. _res = Py_None;
  3258. return _res;
  3259. }
  3260. static PyObject *TrackObj_GetTrackPict(TrackObject *_self, PyObject *_args)
  3261. {
  3262. PyObject *_res = NULL;
  3263. PicHandle _rv;
  3264. TimeValue time;
  3265. #ifndef GetTrackPict
  3266. PyMac_PRECHECK(GetTrackPict);
  3267. #endif
  3268. if (!PyArg_ParseTuple(_args, "l",
  3269. &time))
  3270. return NULL;
  3271. _rv = GetTrackPict(_self->ob_itself,
  3272. time);
  3273. _res = Py_BuildValue("O&",
  3274. ResObj_New, _rv);
  3275. return _res;
  3276. }
  3277. static PyObject *TrackObj_GetTrackClipRgn(TrackObject *_self, PyObject *_args)
  3278. {
  3279. PyObject *_res = NULL;
  3280. RgnHandle _rv;
  3281. #ifndef GetTrackClipRgn
  3282. PyMac_PRECHECK(GetTrackClipRgn);
  3283. #endif
  3284. if (!PyArg_ParseTuple(_args, ""))
  3285. return NULL;
  3286. _rv = GetTrackClipRgn(_self->ob_itself);
  3287. _res = Py_BuildValue("O&",
  3288. ResObj_New, _rv);
  3289. return _res;
  3290. }
  3291. static PyObject *TrackObj_SetTrackClipRgn(TrackObject *_self, PyObject *_args)
  3292. {
  3293. PyObject *_res = NULL;
  3294. RgnHandle theClip;
  3295. #ifndef SetTrackClipRgn
  3296. PyMac_PRECHECK(SetTrackClipRgn);
  3297. #endif
  3298. if (!PyArg_ParseTuple(_args, "O&",
  3299. ResObj_Convert, &theClip))
  3300. return NULL;
  3301. SetTrackClipRgn(_self->ob_itself,
  3302. theClip);
  3303. Py_INCREF(Py_None);
  3304. _res = Py_None;
  3305. return _res;
  3306. }
  3307. static PyObject *TrackObj_GetTrackDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
  3308. {
  3309. PyObject *_res = NULL;
  3310. RgnHandle _rv;
  3311. #ifndef GetTrackDisplayBoundsRgn
  3312. PyMac_PRECHECK(GetTrackDisplayBoundsRgn);
  3313. #endif
  3314. if (!PyArg_ParseTuple(_args, ""))
  3315. return NULL;
  3316. _rv = GetTrackDisplayBoundsRgn(_self->ob_itself);
  3317. _res = Py_BuildValue("O&",
  3318. ResObj_New, _rv);
  3319. return _res;
  3320. }
  3321. static PyObject *TrackObj_GetTrackMovieBoundsRgn(TrackObject *_self, PyObject *_args)
  3322. {
  3323. PyObject *_res = NULL;
  3324. RgnHandle _rv;
  3325. #ifndef GetTrackMovieBoundsRgn
  3326. PyMac_PRECHECK(GetTrackMovieBoundsRgn);
  3327. #endif
  3328. if (!PyArg_ParseTuple(_args, ""))
  3329. return NULL;
  3330. _rv = GetTrackMovieBoundsRgn(_self->ob_itself);
  3331. _res = Py_BuildValue("O&",
  3332. ResObj_New, _rv);
  3333. return _res;
  3334. }
  3335. static PyObject *TrackObj_GetTrackBoundsRgn(TrackObject *_self, PyObject *_args)
  3336. {
  3337. PyObject *_res = NULL;
  3338. RgnHandle _rv;
  3339. #ifndef GetTrackBoundsRgn
  3340. PyMac_PRECHECK(GetTrackBoundsRgn);
  3341. #endif
  3342. if (!PyArg_ParseTuple(_args, ""))
  3343. return NULL;
  3344. _rv = GetTrackBoundsRgn(_self->ob_itself);
  3345. _res = Py_BuildValue("O&",
  3346. ResObj_New, _rv);
  3347. return _res;
  3348. }
  3349. static PyObject *TrackObj_GetTrackMatte(TrackObject *_self, PyObject *_args)
  3350. {
  3351. PyObject *_res = NULL;
  3352. PixMapHandle _rv;
  3353. #ifndef GetTrackMatte
  3354. PyMac_PRECHECK(GetTrackMatte);
  3355. #endif
  3356. if (!PyArg_ParseTuple(_args, ""))
  3357. return NULL;
  3358. _rv = GetTrackMatte(_self->ob_itself);
  3359. _res = Py_BuildValue("O&",
  3360. ResObj_New, _rv);
  3361. return _res;
  3362. }
  3363. static PyObject *TrackObj_SetTrackMatte(TrackObject *_self, PyObject *_args)
  3364. {
  3365. PyObject *_res = NULL;
  3366. PixMapHandle theMatte;
  3367. #ifndef SetTrackMatte
  3368. PyMac_PRECHECK(SetTrackMatte);
  3369. #endif
  3370. if (!PyArg_ParseTuple(_args, "O&",
  3371. ResObj_Convert, &theMatte))
  3372. return NULL;
  3373. SetTrackMatte(_self->ob_itself,
  3374. theMatte);
  3375. Py_INCREF(Py_None);
  3376. _res = Py_None;
  3377. return _res;
  3378. }
  3379. static PyObject *TrackObj_GetTrackID(TrackObject *_self, PyObject *_args)
  3380. {
  3381. PyObject *_res = NULL;
  3382. long _rv;
  3383. #ifndef GetTrackID
  3384. PyMac_PRECHECK(GetTrackID);
  3385. #endif
  3386. if (!PyArg_ParseTuple(_args, ""))
  3387. return NULL;
  3388. _rv = GetTrackID(_self->ob_itself);
  3389. _res = Py_BuildValue("l",
  3390. _rv);
  3391. return _res;
  3392. }
  3393. static PyObject *TrackObj_GetTrackMovie(TrackObject *_self, PyObject *_args)
  3394. {
  3395. PyObject *_res = NULL;
  3396. Movie _rv;
  3397. #ifndef GetTrackMovie
  3398. PyMac_PRECHECK(GetTrackMovie);
  3399. #endif
  3400. if (!PyArg_ParseTuple(_args, ""))
  3401. return NULL;
  3402. _rv = GetTrackMovie(_self->ob_itself);
  3403. _res = Py_BuildValue("O&",
  3404. MovieObj_New, _rv);
  3405. return _res;
  3406. }
  3407. static PyObject *TrackObj_GetTrackCreationTime(TrackObject *_self, PyObject *_args)
  3408. {
  3409. PyObject *_res = NULL;
  3410. unsigned long _rv;
  3411. #ifndef GetTrackCreationTime
  3412. PyMac_PRECHECK(GetTrackCreationTime);
  3413. #endif
  3414. if (!PyArg_ParseTuple(_args, ""))
  3415. return NULL;
  3416. _rv = GetTrackCreationTime(_self->ob_itself);
  3417. _res = Py_BuildValue("l",
  3418. _rv);
  3419. return _res;
  3420. }
  3421. static PyObject *TrackObj_GetTrackModificationTime(TrackObject *_self, PyObject *_args)
  3422. {
  3423. PyObject *_res = NULL;
  3424. unsigned long _rv;
  3425. #ifndef GetTrackModificationTime
  3426. PyMac_PRECHECK(GetTrackModificationTime);
  3427. #endif
  3428. if (!PyArg_ParseTuple(_args, ""))
  3429. return NULL;
  3430. _rv = GetTrackModificationTime(_self->ob_itself);
  3431. _res = Py_BuildValue("l",
  3432. _rv);
  3433. return _res;
  3434. }
  3435. static PyObject *TrackObj_GetTrackEnabled(TrackObject *_self, PyObject *_args)
  3436. {
  3437. PyObject *_res = NULL;
  3438. Boolean _rv;
  3439. #ifndef GetTrackEnabled
  3440. PyMac_PRECHECK(GetTrackEnabled);
  3441. #endif
  3442. if (!PyArg_ParseTuple(_args, ""))
  3443. return NULL;
  3444. _rv = GetTrackEnabled(_self->ob_itself);
  3445. _res = Py_BuildValue("b",
  3446. _rv);
  3447. return _res;
  3448. }
  3449. static PyObject *TrackObj_SetTrackEnabled(TrackObject *_self, PyObject *_args)
  3450. {
  3451. PyObject *_res = NULL;
  3452. Boolean isEnabled;
  3453. #ifndef SetTrackEnabled
  3454. PyMac_PRECHECK(SetTrackEnabled);
  3455. #endif
  3456. if (!PyArg_ParseTuple(_args, "b",
  3457. &isEnabled))
  3458. return NULL;
  3459. SetTrackEnabled(_self->ob_itself,
  3460. isEnabled);
  3461. Py_INCREF(Py_None);
  3462. _res = Py_None;
  3463. return _res;
  3464. }
  3465. static PyObject *TrackObj_GetTrackUsage(TrackObject *_self, PyObject *_args)
  3466. {
  3467. PyObject *_res = NULL;
  3468. long _rv;
  3469. #ifndef GetTrackUsage
  3470. PyMac_PRECHECK(GetTrackUsage);
  3471. #endif
  3472. if (!PyArg_ParseTuple(_args, ""))
  3473. return NULL;
  3474. _rv = GetTrackUsage(_self->ob_itself);
  3475. _res = Py_BuildValue("l",
  3476. _rv);
  3477. return _res;
  3478. }
  3479. static PyObject *TrackObj_SetTrackUsage(TrackObject *_self, PyObject *_args)
  3480. {
  3481. PyObject *_res = NULL;
  3482. long usage;
  3483. #ifndef SetTrackUsage
  3484. PyMac_PRECHECK(SetTrackUsage);
  3485. #endif
  3486. if (!PyArg_ParseTuple(_args, "l",
  3487. &usage))
  3488. return NULL;
  3489. SetTrackUsage(_self->ob_itself,
  3490. usage);
  3491. Py_INCREF(Py_None);
  3492. _res = Py_None;
  3493. return _res;
  3494. }
  3495. static PyObject *TrackObj_GetTrackDuration(TrackObject *_self, PyObject *_args)
  3496. {
  3497. PyObject *_res = NULL;
  3498. TimeValue _rv;
  3499. #ifndef GetTrackDuration
  3500. PyMac_PRECHECK(GetTrackDuration);
  3501. #endif
  3502. if (!PyArg_ParseTuple(_args, ""))
  3503. return NULL;
  3504. _rv = GetTrackDuration(_self->ob_itself);
  3505. _res = Py_BuildValue("l",
  3506. _rv);
  3507. return _res;
  3508. }
  3509. static PyObject *TrackObj_GetTrackOffset(TrackObject *_self, PyObject *_args)
  3510. {
  3511. PyObject *_res = NULL;
  3512. TimeValue _rv;
  3513. #ifndef GetTrackOffset
  3514. PyMac_PRECHECK(GetTrackOffset);
  3515. #endif
  3516. if (!PyArg_ParseTuple(_args, ""))
  3517. return NULL;
  3518. _rv = GetTrackOffset(_self->ob_itself);
  3519. _res = Py_BuildValue("l",
  3520. _rv);
  3521. return _res;
  3522. }
  3523. static PyObject *TrackObj_SetTrackOffset(TrackObject *_self, PyObject *_args)
  3524. {
  3525. PyObject *_res = NULL;
  3526. TimeValue movieOffsetTime;
  3527. #ifndef SetTrackOffset
  3528. PyMac_PRECHECK(SetTrackOffset);
  3529. #endif
  3530. if (!PyArg_ParseTuple(_args, "l",
  3531. &movieOffsetTime))
  3532. return NULL;
  3533. SetTrackOffset(_self->ob_itself,
  3534. movieOffsetTime);
  3535. Py_INCREF(Py_None);
  3536. _res = Py_None;
  3537. return _res;
  3538. }
  3539. static PyObject *TrackObj_GetTrackLayer(TrackObject *_self, PyObject *_args)
  3540. {
  3541. PyObject *_res = NULL;
  3542. short _rv;
  3543. #ifndef GetTrackLayer
  3544. PyMac_PRECHECK(GetTrackLayer);
  3545. #endif
  3546. if (!PyArg_ParseTuple(_args, ""))
  3547. return NULL;
  3548. _rv = GetTrackLayer(_self->ob_itself);
  3549. _res = Py_BuildValue("h",
  3550. _rv);
  3551. return _res;
  3552. }
  3553. static PyObject *TrackObj_SetTrackLayer(TrackObject *_self, PyObject *_args)
  3554. {
  3555. PyObject *_res = NULL;
  3556. short layer;
  3557. #ifndef SetTrackLayer
  3558. PyMac_PRECHECK(SetTrackLayer);
  3559. #endif
  3560. if (!PyArg_ParseTuple(_args, "h",
  3561. &layer))
  3562. return NULL;
  3563. SetTrackLayer(_self->ob_itself,
  3564. layer);
  3565. Py_INCREF(Py_None);
  3566. _res = Py_None;
  3567. return _res;
  3568. }
  3569. static PyObject *TrackObj_GetTrackAlternate(TrackObject *_self, PyObject *_args)
  3570. {
  3571. PyObject *_res = NULL;
  3572. Track _rv;
  3573. #ifndef GetTrackAlternate
  3574. PyMac_PRECHECK(GetTrackAlternate);
  3575. #endif
  3576. if (!PyArg_ParseTuple(_args, ""))
  3577. return NULL;
  3578. _rv = GetTrackAlternate(_self->ob_itself);
  3579. _res = Py_BuildValue("O&",
  3580. TrackObj_New, _rv);
  3581. return _res;
  3582. }
  3583. static PyObject *TrackObj_SetTrackAlternate(TrackObject *_self, PyObject *_args)
  3584. {
  3585. PyObject *_res = NULL;
  3586. Track alternateT;
  3587. #ifndef SetTrackAlternate
  3588. PyMac_PRECHECK(SetTrackAlternate);
  3589. #endif
  3590. if (!PyArg_ParseTuple(_args, "O&",
  3591. TrackObj_Convert, &alternateT))
  3592. return NULL;
  3593. SetTrackAlternate(_self->ob_itself,
  3594. alternateT);
  3595. Py_INCREF(Py_None);
  3596. _res = Py_None;
  3597. return _res;
  3598. }
  3599. static PyObject *TrackObj_GetTrackVolume(TrackObject *_self, PyObject *_args)
  3600. {
  3601. PyObject *_res = NULL;
  3602. short _rv;
  3603. #ifndef GetTrackVolume
  3604. PyMac_PRECHECK(GetTrackVolume);
  3605. #endif
  3606. if (!PyArg_ParseTuple(_args, ""))
  3607. return NULL;
  3608. _rv = GetTrackVolume(_self->ob_itself);
  3609. _res = Py_BuildValue("h",
  3610. _rv);
  3611. return _res;
  3612. }
  3613. static PyObject *TrackObj_SetTrackVolume(TrackObject *_self, PyObject *_args)
  3614. {
  3615. PyObject *_res = NULL;
  3616. short volume;
  3617. #ifndef SetTrackVolume
  3618. PyMac_PRECHECK(SetTrackVolume);
  3619. #endif
  3620. if (!PyArg_ParseTuple(_args, "h",
  3621. &volume))
  3622. return NULL;
  3623. SetTrackVolume(_self->ob_itself,
  3624. volume);
  3625. Py_INCREF(Py_None);
  3626. _res = Py_None;
  3627. return _res;
  3628. }
  3629. static PyObject *TrackObj_GetTrackDimensions(TrackObject *_self, PyObject *_args)
  3630. {
  3631. PyObject *_res = NULL;
  3632. Fixed width;
  3633. Fixed height;
  3634. #ifndef GetTrackDimensions
  3635. PyMac_PRECHECK(GetTrackDimensions);
  3636. #endif
  3637. if (!PyArg_ParseTuple(_args, ""))
  3638. return NULL;
  3639. GetTrackDimensions(_self->ob_itself,
  3640. &width,
  3641. &height);
  3642. _res = Py_BuildValue("O&O&",
  3643. PyMac_BuildFixed, width,
  3644. PyMac_BuildFixed, height);
  3645. return _res;
  3646. }
  3647. static PyObject *TrackObj_SetTrackDimensions(TrackObject *_self, PyObject *_args)
  3648. {
  3649. PyObject *_res = NULL;
  3650. Fixed width;
  3651. Fixed height;
  3652. #ifndef SetTrackDimensions
  3653. PyMac_PRECHECK(SetTrackDimensions);
  3654. #endif
  3655. if (!PyArg_ParseTuple(_args, "O&O&",
  3656. PyMac_GetFixed, &width,
  3657. PyMac_GetFixed, &height))
  3658. return NULL;
  3659. SetTrackDimensions(_self->ob_itself,
  3660. width,
  3661. height);
  3662. Py_INCREF(Py_None);
  3663. _res = Py_None;
  3664. return _res;
  3665. }
  3666. static PyObject *TrackObj_GetTrackUserData(TrackObject *_self, PyObject *_args)
  3667. {
  3668. PyObject *_res = NULL;
  3669. UserData _rv;
  3670. #ifndef GetTrackUserData
  3671. PyMac_PRECHECK(GetTrackUserData);
  3672. #endif
  3673. if (!PyArg_ParseTuple(_args, ""))
  3674. return NULL;
  3675. _rv = GetTrackUserData(_self->ob_itself);
  3676. _res = Py_BuildValue("O&",
  3677. UserDataObj_New, _rv);
  3678. return _res;
  3679. }
  3680. static PyObject *TrackObj_GetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
  3681. {
  3682. PyObject *_res = NULL;
  3683. OSErr _err;
  3684. Handle settings;
  3685. #ifndef GetTrackSoundLocalizationSettings
  3686. PyMac_PRECHECK(GetTrackSoundLocalizationSettings);
  3687. #endif
  3688. if (!PyArg_ParseTuple(_args, ""))
  3689. return NULL;
  3690. _err = GetTrackSoundLocalizationSettings(_self->ob_itself,
  3691. &settings);
  3692. if (_err != noErr) return PyMac_Error(_err);
  3693. _res = Py_BuildValue("O&",
  3694. ResObj_New, settings);
  3695. return _res;
  3696. }
  3697. static PyObject *TrackObj_SetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
  3698. {
  3699. PyObject *_res = NULL;
  3700. OSErr _err;
  3701. Handle settings;
  3702. #ifndef SetTrackSoundLocalizationSettings
  3703. PyMac_PRECHECK(SetTrackSoundLocalizationSettings);
  3704. #endif
  3705. if (!PyArg_ParseTuple(_args, "O&",
  3706. ResObj_Convert, &settings))
  3707. return NULL;
  3708. _err = SetTrackSoundLocalizationSettings(_self->ob_itself,
  3709. settings);
  3710. if (_err != noErr) return PyMac_Error(_err);
  3711. Py_INCREF(Py_None);
  3712. _res = Py_None;
  3713. return _res;
  3714. }
  3715. static PyObject *TrackObj_NewTrackMedia(TrackObject *_self, PyObject *_args)
  3716. {
  3717. PyObject *_res = NULL;
  3718. Media _rv;
  3719. OSType mediaType;
  3720. TimeScale timeScale;
  3721. Handle dataRef;
  3722. OSType dataRefType;
  3723. #ifndef NewTrackMedia
  3724. PyMac_PRECHECK(NewTrackMedia);
  3725. #endif
  3726. if (!PyArg_ParseTuple(_args, "O&lO&O&",
  3727. PyMac_GetOSType, &mediaType,
  3728. &timeScale,
  3729. ResObj_Convert, &dataRef,
  3730. PyMac_GetOSType, &dataRefType))
  3731. return NULL;
  3732. _rv = NewTrackMedia(_self->ob_itself,
  3733. mediaType,
  3734. timeScale,
  3735. dataRef,
  3736. dataRefType);
  3737. _res = Py_BuildValue("O&",
  3738. MediaObj_New, _rv);
  3739. return _res;
  3740. }
  3741. static PyObject *TrackObj_GetTrackMedia(TrackObject *_self, PyObject *_args)
  3742. {
  3743. PyObject *_res = NULL;
  3744. Media _rv;
  3745. #ifndef GetTrackMedia
  3746. PyMac_PRECHECK(GetTrackMedia);
  3747. #endif
  3748. if (!PyArg_ParseTuple(_args, ""))
  3749. return NULL;
  3750. _rv = GetTrackMedia(_self->ob_itself);
  3751. _res = Py_BuildValue("O&",
  3752. MediaObj_New, _rv);
  3753. return _res;
  3754. }
  3755. static PyObject *TrackObj_InsertMediaIntoTrack(TrackObject *_self, PyObject *_args)
  3756. {
  3757. PyObject *_res = NULL;
  3758. OSErr _err;
  3759. TimeValue trackStart;
  3760. TimeValue mediaTime;
  3761. TimeValue mediaDuration;
  3762. Fixed mediaRate;
  3763. #ifndef InsertMediaIntoTrack
  3764. PyMac_PRECHECK(InsertMediaIntoTrack);
  3765. #endif
  3766. if (!PyArg_ParseTuple(_args, "lllO&",
  3767. &trackStart,
  3768. &mediaTime,
  3769. &mediaDuration,
  3770. PyMac_GetFixed, &mediaRate))
  3771. return NULL;
  3772. _err = InsertMediaIntoTrack(_self->ob_itself,
  3773. trackStart,
  3774. mediaTime,
  3775. mediaDuration,
  3776. mediaRate);
  3777. if (_err != noErr) return PyMac_Error(_err);
  3778. Py_INCREF(Py_None);
  3779. _res = Py_None;
  3780. return _res;
  3781. }
  3782. static PyObject *TrackObj_InsertTrackSegment(TrackObject *_self, PyObject *_args)
  3783. {
  3784. PyObject *_res = NULL;
  3785. OSErr _err;
  3786. Track dstTrack;
  3787. TimeValue srcIn;
  3788. TimeValue srcDuration;
  3789. TimeValue dstIn;
  3790. #ifndef InsertTrackSegment
  3791. PyMac_PRECHECK(InsertTrackSegment);
  3792. #endif
  3793. if (!PyArg_ParseTuple(_args, "O&lll",
  3794. TrackObj_Convert, &dstTrack,
  3795. &srcIn,
  3796. &srcDuration,
  3797. &dstIn))
  3798. return NULL;
  3799. _err = InsertTrackSegment(_self->ob_itself,
  3800. dstTrack,
  3801. srcIn,
  3802. srcDuration,
  3803. dstIn);
  3804. if (_err != noErr) return PyMac_Error(_err);
  3805. Py_INCREF(Py_None);
  3806. _res = Py_None;
  3807. return _res;
  3808. }
  3809. static PyObject *TrackObj_InsertEmptyTrackSegment(TrackObject *_self, PyObject *_args)
  3810. {
  3811. PyObject *_res = NULL;
  3812. OSErr _err;
  3813. TimeValue dstIn;
  3814. TimeValue dstDuration;
  3815. #ifndef InsertEmptyTrackSegment
  3816. PyMac_PRECHECK(InsertEmptyTrackSegment);
  3817. #endif
  3818. if (!PyArg_ParseTuple(_args, "ll",
  3819. &dstIn,
  3820. &dstDuration))
  3821. return NULL;
  3822. _err = InsertEmptyTrackSegment(_self->ob_itself,
  3823. dstIn,
  3824. dstDuration);
  3825. if (_err != noErr) return PyMac_Error(_err);
  3826. Py_INCREF(Py_None);
  3827. _res = Py_None;
  3828. return _res;
  3829. }
  3830. static PyObject *TrackObj_DeleteTrackSegment(TrackObject *_self, PyObject *_args)
  3831. {
  3832. PyObject *_res = NULL;
  3833. OSErr _err;
  3834. TimeValue startTime;
  3835. TimeValue duration;
  3836. #ifndef DeleteTrackSegment
  3837. PyMac_PRECHECK(DeleteTrackSegment);
  3838. #endif
  3839. if (!PyArg_ParseTuple(_args, "ll",
  3840. &startTime,
  3841. &duration))
  3842. return NULL;
  3843. _err = DeleteTrackSegment(_self->ob_itself,
  3844. startTime,
  3845. duration);
  3846. if (_err != noErr) return PyMac_Error(_err);
  3847. Py_INCREF(Py_None);
  3848. _res = Py_None;
  3849. return _res;
  3850. }
  3851. static PyObject *TrackObj_ScaleTrackSegment(TrackObject *_self, PyObject *_args)
  3852. {
  3853. PyObject *_res = NULL;
  3854. OSErr _err;
  3855. TimeValue startTime;
  3856. TimeValue oldDuration;
  3857. TimeValue newDuration;
  3858. #ifndef ScaleTrackSegment
  3859. PyMac_PRECHECK(ScaleTrackSegment);
  3860. #endif
  3861. if (!PyArg_ParseTuple(_args, "lll",
  3862. &startTime,
  3863. &oldDuration,
  3864. &newDuration))
  3865. return NULL;
  3866. _err = ScaleTrackSegment(_self->ob_itself,
  3867. startTime,
  3868. oldDuration,
  3869. newDuration);
  3870. if (_err != noErr) return PyMac_Error(_err);
  3871. Py_INCREF(Py_None);
  3872. _res = Py_None;
  3873. return _res;
  3874. }
  3875. static PyObject *TrackObj_IsScrapMovie(TrackObject *_self, PyObject *_args)
  3876. {
  3877. PyObject *_res = NULL;
  3878. Component _rv;
  3879. #ifndef IsScrapMovie
  3880. PyMac_PRECHECK(IsScrapMovie);
  3881. #endif
  3882. if (!PyArg_ParseTuple(_args, ""))
  3883. return NULL;
  3884. _rv = IsScrapMovie(_self->ob_itself);
  3885. _res = Py_BuildValue("O&",
  3886. CmpObj_New, _rv);
  3887. return _res;
  3888. }
  3889. static PyObject *TrackObj_CopyTrackSettings(TrackObject *_self, PyObject *_args)
  3890. {
  3891. PyObject *_res = NULL;
  3892. OSErr _err;
  3893. Track dstTrack;
  3894. #ifndef CopyTrackSettings
  3895. PyMac_PRECHECK(CopyTrackSettings);
  3896. #endif
  3897. if (!PyArg_ParseTuple(_args, "O&",
  3898. TrackObj_Convert, &dstTrack))
  3899. return NULL;
  3900. _err = CopyTrackSettings(_self->ob_itself,
  3901. dstTrack);
  3902. if (_err != noErr) return PyMac_Error(_err);
  3903. Py_INCREF(Py_None);
  3904. _res = Py_None;
  3905. return _res;
  3906. }
  3907. static PyObject *TrackObj_AddEmptyTrackToMovie(TrackObject *_self, PyObject *_args)
  3908. {
  3909. PyObject *_res = NULL;
  3910. OSErr _err;
  3911. Movie dstMovie;
  3912. Handle dataRef;
  3913. OSType dataRefType;
  3914. Track dstTrack;
  3915. #ifndef AddEmptyTrackToMovie
  3916. PyMac_PRECHECK(AddEmptyTrackToMovie);
  3917. #endif
  3918. if (!PyArg_ParseTuple(_args, "O&O&O&",
  3919. MovieObj_Convert, &dstMovie,
  3920. ResObj_Convert, &dataRef,
  3921. PyMac_GetOSType, &dataRefType))
  3922. return NULL;
  3923. _err = AddEmptyTrackToMovie(_self->ob_itself,
  3924. dstMovie,
  3925. dataRef,
  3926. dataRefType,
  3927. &dstTrack);
  3928. if (_err != noErr) return PyMac_Error(_err);
  3929. _res = Py_BuildValue("O&",
  3930. TrackObj_New, dstTrack);
  3931. return _res;
  3932. }
  3933. static PyObject *TrackObj_AddClonedTrackToMovie(TrackObject *_self, PyObject *_args)
  3934. {
  3935. PyObject *_res = NULL;
  3936. OSErr _err;
  3937. Movie dstMovie;
  3938. long flags;
  3939. Track dstTrack;
  3940. #ifndef AddClonedTrackToMovie
  3941. PyMac_PRECHECK(AddClonedTrackToMovie);
  3942. #endif
  3943. if (!PyArg_ParseTuple(_args, "O&l",
  3944. MovieObj_Convert, &dstMovie,
  3945. &flags))
  3946. return NULL;
  3947. _err = AddClonedTrackToMovie(_self->ob_itself,
  3948. dstMovie,
  3949. flags,
  3950. &dstTrack);
  3951. if (_err != noErr) return PyMac_Error(_err);
  3952. _res = Py_BuildValue("O&",
  3953. TrackObj_New, dstTrack);
  3954. return _res;
  3955. }
  3956. static PyObject *TrackObj_AddTrackReference(TrackObject *_self, PyObject *_args)
  3957. {
  3958. PyObject *_res = NULL;
  3959. OSErr _err;
  3960. Track refTrack;
  3961. OSType refType;
  3962. long addedIndex;
  3963. #ifndef AddTrackReference
  3964. PyMac_PRECHECK(AddTrackReference);
  3965. #endif
  3966. if (!PyArg_ParseTuple(_args, "O&O&",
  3967. TrackObj_Convert, &refTrack,
  3968. PyMac_GetOSType, &refType))
  3969. return NULL;
  3970. _err = AddTrackReference(_self->ob_itself,
  3971. refTrack,
  3972. refType,
  3973. &addedIndex);
  3974. if (_err != noErr) return PyMac_Error(_err);
  3975. _res = Py_BuildValue("l",
  3976. addedIndex);
  3977. return _res;
  3978. }
  3979. static PyObject *TrackObj_DeleteTrackReference(TrackObject *_self, PyObject *_args)
  3980. {
  3981. PyObject *_res = NULL;
  3982. OSErr _err;
  3983. OSType refType;
  3984. long index;
  3985. #ifndef DeleteTrackReference
  3986. PyMac_PRECHECK(DeleteTrackReference);
  3987. #endif
  3988. if (!PyArg_ParseTuple(_args, "O&l",
  3989. PyMac_GetOSType, &refType,
  3990. &index))
  3991. return NULL;
  3992. _err = DeleteTrackReference(_self->ob_itself,
  3993. refType,
  3994. index);
  3995. if (_err != noErr) return PyMac_Error(_err);
  3996. Py_INCREF(Py_None);
  3997. _res = Py_None;
  3998. return _res;
  3999. }
  4000. static PyObject *TrackObj_SetTrackReference(TrackObject *_self, PyObject *_args)
  4001. {
  4002. PyObject *_res = NULL;
  4003. OSErr _err;
  4004. Track refTrack;
  4005. OSType refType;
  4006. long index;
  4007. #ifndef SetTrackReference
  4008. PyMac_PRECHECK(SetTrackReference);
  4009. #endif
  4010. if (!PyArg_ParseTuple(_args, "O&O&l",
  4011. TrackObj_Convert, &refTrack,
  4012. PyMac_GetOSType, &refType,
  4013. &index))
  4014. return NULL;
  4015. _err = SetTrackReference(_self->ob_itself,
  4016. refTrack,
  4017. refType,
  4018. index);
  4019. if (_err != noErr) return PyMac_Error(_err);
  4020. Py_INCREF(Py_None);
  4021. _res = Py_None;
  4022. return _res;
  4023. }
  4024. static PyObject *TrackObj_GetTrackReference(TrackObject *_self, PyObject *_args)
  4025. {
  4026. PyObject *_res = NULL;
  4027. Track _rv;
  4028. OSType refType;
  4029. long index;
  4030. #ifndef GetTrackReference
  4031. PyMac_PRECHECK(GetTrackReference);
  4032. #endif
  4033. if (!PyArg_ParseTuple(_args, "O&l",
  4034. PyMac_GetOSType, &refType,
  4035. &index))
  4036. return NULL;
  4037. _rv = GetTrackReference(_self->ob_itself,
  4038. refType,
  4039. index);
  4040. _res = Py_BuildValue("O&",
  4041. TrackObj_New, _rv);
  4042. return _res;
  4043. }
  4044. static PyObject *TrackObj_GetNextTrackReferenceType(TrackObject *_self, PyObject *_args)
  4045. {
  4046. PyObject *_res = NULL;
  4047. OSType _rv;
  4048. OSType refType;
  4049. #ifndef GetNextTrackReferenceType
  4050. PyMac_PRECHECK(GetNextTrackReferenceType);
  4051. #endif
  4052. if (!PyArg_ParseTuple(_args, "O&",
  4053. PyMac_GetOSType, &refType))
  4054. return NULL;
  4055. _rv = GetNextTrackReferenceType(_self->ob_itself,
  4056. refType);
  4057. _res = Py_BuildValue("O&",
  4058. PyMac_BuildOSType, _rv);
  4059. return _res;
  4060. }
  4061. static PyObject *TrackObj_GetTrackReferenceCount(TrackObject *_self, PyObject *_args)
  4062. {
  4063. PyObject *_res = NULL;
  4064. long _rv;
  4065. OSType refType;
  4066. #ifndef GetTrackReferenceCount
  4067. PyMac_PRECHECK(GetTrackReferenceCount);
  4068. #endif
  4069. if (!PyArg_ParseTuple(_args, "O&",
  4070. PyMac_GetOSType, &refType))
  4071. return NULL;
  4072. _rv = GetTrackReferenceCount(_self->ob_itself,
  4073. refType);
  4074. _res = Py_BuildValue("l",
  4075. _rv);
  4076. return _res;
  4077. }
  4078. static PyObject *TrackObj_GetTrackEditRate(TrackObject *_self, PyObject *_args)
  4079. {
  4080. PyObject *_res = NULL;
  4081. Fixed _rv;
  4082. TimeValue atTime;
  4083. #ifndef GetTrackEditRate
  4084. PyMac_PRECHECK(GetTrackEditRate);
  4085. #endif
  4086. if (!PyArg_ParseTuple(_args, "l",
  4087. &atTime))
  4088. return NULL;
  4089. _rv = GetTrackEditRate(_self->ob_itself,
  4090. atTime);
  4091. _res = Py_BuildValue("O&",
  4092. PyMac_BuildFixed, _rv);
  4093. return _res;
  4094. }
  4095. static PyObject *TrackObj_GetTrackDataSize(TrackObject *_self, PyObject *_args)
  4096. {
  4097. PyObject *_res = NULL;
  4098. long _rv;
  4099. TimeValue startTime;
  4100. TimeValue duration;
  4101. #ifndef GetTrackDataSize
  4102. PyMac_PRECHECK(GetTrackDataSize);
  4103. #endif
  4104. if (!PyArg_ParseTuple(_args, "ll",
  4105. &startTime,
  4106. &duration))
  4107. return NULL;
  4108. _rv = GetTrackDataSize(_self->ob_itself,
  4109. startTime,
  4110. duration);
  4111. _res = Py_BuildValue("l",
  4112. _rv);
  4113. return _res;
  4114. }
  4115. static PyObject *TrackObj_GetTrackDataSize64(TrackObject *_self, PyObject *_args)
  4116. {
  4117. PyObject *_res = NULL;
  4118. OSErr _err;
  4119. TimeValue startTime;
  4120. TimeValue duration;
  4121. wide dataSize;
  4122. #ifndef GetTrackDataSize64
  4123. PyMac_PRECHECK(GetTrackDataSize64);
  4124. #endif
  4125. if (!PyArg_ParseTuple(_args, "ll",
  4126. &startTime,
  4127. &duration))
  4128. return NULL;
  4129. _err = GetTrackDataSize64(_self->ob_itself,
  4130. startTime,
  4131. duration,
  4132. &dataSize);
  4133. if (_err != noErr) return PyMac_Error(_err);
  4134. _res = Py_BuildValue("O&",
  4135. PyMac_Buildwide, dataSize);
  4136. return _res;
  4137. }
  4138. static PyObject *TrackObj_PtInTrack(TrackObject *_self, PyObject *_args)
  4139. {
  4140. PyObject *_res = NULL;
  4141. Boolean _rv;
  4142. Point pt;
  4143. #ifndef PtInTrack
  4144. PyMac_PRECHECK(PtInTrack);
  4145. #endif
  4146. if (!PyArg_ParseTuple(_args, "O&",
  4147. PyMac_GetPoint, &pt))
  4148. return NULL;
  4149. _rv = PtInTrack(_self->ob_itself,
  4150. pt);
  4151. _res = Py_BuildValue("b",
  4152. _rv);
  4153. return _res;
  4154. }
  4155. static PyObject *TrackObj_CopyTrackUserData(TrackObject *_self, PyObject *_args)
  4156. {
  4157. PyObject *_res = NULL;
  4158. OSErr _err;
  4159. Track dstTrack;
  4160. OSType copyRule;
  4161. #ifndef CopyTrackUserData
  4162. PyMac_PRECHECK(CopyTrackUserData);
  4163. #endif
  4164. if (!PyArg_ParseTuple(_args, "O&O&",
  4165. TrackObj_Convert, &dstTrack,
  4166. PyMac_GetOSType, &copyRule))
  4167. return NULL;
  4168. _err = CopyTrackUserData(_self->ob_itself,
  4169. dstTrack,
  4170. copyRule);
  4171. if (_err != noErr) return PyMac_Error(_err);
  4172. Py_INCREF(Py_None);
  4173. _res = Py_None;
  4174. return _res;
  4175. }
  4176. static PyObject *TrackObj_GetTrackNextInterestingTime(TrackObject *_self, PyObject *_args)
  4177. {
  4178. PyObject *_res = NULL;
  4179. short interestingTimeFlags;
  4180. TimeValue time;
  4181. Fixed rate;
  4182. TimeValue interestingTime;
  4183. TimeValue interestingDuration;
  4184. #ifndef GetTrackNextInterestingTime
  4185. PyMac_PRECHECK(GetTrackNextInterestingTime);
  4186. #endif
  4187. if (!PyArg_ParseTuple(_args, "hlO&",
  4188. &interestingTimeFlags,
  4189. &time,
  4190. PyMac_GetFixed, &rate))
  4191. return NULL;
  4192. GetTrackNextInterestingTime(_self->ob_itself,
  4193. interestingTimeFlags,
  4194. time,
  4195. rate,
  4196. &interestingTime,
  4197. &interestingDuration);
  4198. _res = Py_BuildValue("ll",
  4199. interestingTime,
  4200. interestingDuration);
  4201. return _res;
  4202. }
  4203. static PyObject *TrackObj_GetTrackSegmentDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
  4204. {
  4205. PyObject *_res = NULL;
  4206. RgnHandle _rv;
  4207. TimeValue time;
  4208. TimeValue duration;
  4209. #ifndef GetTrackSegmentDisplayBoundsRgn
  4210. PyMac_PRECHECK(GetTrackSegmentDisplayBoundsRgn);
  4211. #endif
  4212. if (!PyArg_ParseTuple(_args, "ll",
  4213. &time,
  4214. &duration))
  4215. return NULL;
  4216. _rv = GetTrackSegmentDisplayBoundsRgn(_self->ob_itself,
  4217. time,
  4218. duration);
  4219. _res = Py_BuildValue("O&",
  4220. ResObj_New, _rv);
  4221. return _res;
  4222. }
  4223. static PyObject *TrackObj_GetTrackStatus(TrackObject *_self, PyObject *_args)
  4224. {
  4225. PyObject *_res = NULL;
  4226. ComponentResult _rv;
  4227. #ifndef GetTrackStatus
  4228. PyMac_PRECHECK(GetTrackStatus);
  4229. #endif
  4230. if (!PyArg_ParseTuple(_args, ""))
  4231. return NULL;
  4232. _rv = GetTrackStatus(_self->ob_itself);
  4233. _res = Py_BuildValue("l",
  4234. _rv);
  4235. return _res;
  4236. }
  4237. static PyObject *TrackObj_SetTrackLoadSettings(TrackObject *_self, PyObject *_args)
  4238. {
  4239. PyObject *_res = NULL;
  4240. TimeValue preloadTime;
  4241. TimeValue preloadDuration;
  4242. long preloadFlags;
  4243. long defaultHints;
  4244. #ifndef SetTrackLoadSettings
  4245. PyMac_PRECHECK(SetTrackLoadSettings);
  4246. #endif
  4247. if (!PyArg_ParseTuple(_args, "llll",
  4248. &preloadTime,
  4249. &preloadDuration,
  4250. &preloadFlags,
  4251. &defaultHints))
  4252. return NULL;
  4253. SetTrackLoadSettings(_self->ob_itself,
  4254. preloadTime,
  4255. preloadDuration,
  4256. preloadFlags,
  4257. defaultHints);
  4258. Py_INCREF(Py_None);
  4259. _res = Py_None;
  4260. return _res;
  4261. }
  4262. static PyObject *TrackObj_GetTrackLoadSettings(TrackObject *_self, PyObject *_args)
  4263. {
  4264. PyObject *_res = NULL;
  4265. TimeValue preloadTime;
  4266. TimeValue preloadDuration;
  4267. long preloadFlags;
  4268. long defaultHints;
  4269. #ifndef GetTrackLoadSettings
  4270. PyMac_PRECHECK(GetTrackLoadSettings);
  4271. #endif
  4272. if (!PyArg_ParseTuple(_args, ""))
  4273. return NULL;
  4274. GetTrackLoadSettings(_self->ob_itself,
  4275. &preloadTime,
  4276. &preloadDuration,
  4277. &preloadFlags,
  4278. &defaultHints);
  4279. _res = Py_BuildValue("llll",
  4280. preloadTime,
  4281. preloadDuration,
  4282. preloadFlags,
  4283. defaultHints);
  4284. return _res;
  4285. }
  4286. static PyMethodDef TrackObj_methods[] = {
  4287. {"LoadTrackIntoRam", (PyCFunction)TrackObj_LoadTrackIntoRam, 1,
  4288. PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
  4289. {"GetTrackPict", (PyCFunction)TrackObj_GetTrackPict, 1,
  4290. PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
  4291. {"GetTrackClipRgn", (PyCFunction)TrackObj_GetTrackClipRgn, 1,
  4292. PyDoc_STR("() -> (RgnHandle _rv)")},
  4293. {"SetTrackClipRgn", (PyCFunction)TrackObj_SetTrackClipRgn, 1,
  4294. PyDoc_STR("(RgnHandle theClip) -> None")},
  4295. {"GetTrackDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackDisplayBoundsRgn, 1,
  4296. PyDoc_STR("() -> (RgnHandle _rv)")},
  4297. {"GetTrackMovieBoundsRgn", (PyCFunction)TrackObj_GetTrackMovieBoundsRgn, 1,
  4298. PyDoc_STR("() -> (RgnHandle _rv)")},
  4299. {"GetTrackBoundsRgn", (PyCFunction)TrackObj_GetTrackBoundsRgn, 1,
  4300. PyDoc_STR("() -> (RgnHandle _rv)")},
  4301. {"GetTrackMatte", (PyCFunction)TrackObj_GetTrackMatte, 1,
  4302. PyDoc_STR("() -> (PixMapHandle _rv)")},
  4303. {"SetTrackMatte", (PyCFunction)TrackObj_SetTrackMatte, 1,
  4304. PyDoc_STR("(PixMapHandle theMatte) -> None")},
  4305. {"GetTrackID", (PyCFunction)TrackObj_GetTrackID, 1,
  4306. PyDoc_STR("() -> (long _rv)")},
  4307. {"GetTrackMovie", (PyCFunction)TrackObj_GetTrackMovie, 1,
  4308. PyDoc_STR("() -> (Movie _rv)")},
  4309. {"GetTrackCreationTime", (PyCFunction)TrackObj_GetTrackCreationTime, 1,
  4310. PyDoc_STR("() -> (unsigned long _rv)")},
  4311. {"GetTrackModificationTime", (PyCFunction)TrackObj_GetTrackModificationTime, 1,
  4312. PyDoc_STR("() -> (unsigned long _rv)")},
  4313. {"GetTrackEnabled", (PyCFunction)TrackObj_GetTrackEnabled, 1,
  4314. PyDoc_STR("() -> (Boolean _rv)")},
  4315. {"SetTrackEnabled", (PyCFunction)TrackObj_SetTrackEnabled, 1,
  4316. PyDoc_STR("(Boolean isEnabled) -> None")},
  4317. {"GetTrackUsage", (PyCFunction)TrackObj_GetTrackUsage, 1,
  4318. PyDoc_STR("() -> (long _rv)")},
  4319. {"SetTrackUsage", (PyCFunction)TrackObj_SetTrackUsage, 1,
  4320. PyDoc_STR("(long usage) -> None")},
  4321. {"GetTrackDuration", (PyCFunction)TrackObj_GetTrackDuration, 1,
  4322. PyDoc_STR("() -> (TimeValue _rv)")},
  4323. {"GetTrackOffset", (PyCFunction)TrackObj_GetTrackOffset, 1,
  4324. PyDoc_STR("() -> (TimeValue _rv)")},
  4325. {"SetTrackOffset", (PyCFunction)TrackObj_SetTrackOffset, 1,
  4326. PyDoc_STR("(TimeValue movieOffsetTime) -> None")},
  4327. {"GetTrackLayer", (PyCFunction)TrackObj_GetTrackLayer, 1,
  4328. PyDoc_STR("() -> (short _rv)")},
  4329. {"SetTrackLayer", (PyCFunction)TrackObj_SetTrackLayer, 1,
  4330. PyDoc_STR("(short layer) -> None")},
  4331. {"GetTrackAlternate", (PyCFunction)TrackObj_GetTrackAlternate, 1,
  4332. PyDoc_STR("() -> (Track _rv)")},
  4333. {"SetTrackAlternate", (PyCFunction)TrackObj_SetTrackAlternate, 1,
  4334. PyDoc_STR("(Track alternateT) -> None")},
  4335. {"GetTrackVolume", (PyCFunction)TrackObj_GetTrackVolume, 1,
  4336. PyDoc_STR("() -> (short _rv)")},
  4337. {"SetTrackVolume", (PyCFunction)TrackObj_SetTrackVolume, 1,
  4338. PyDoc_STR("(short volume) -> None")},
  4339. {"GetTrackDimensions", (PyCFunction)TrackObj_GetTrackDimensions, 1,
  4340. PyDoc_STR("() -> (Fixed width, Fixed height)")},
  4341. {"SetTrackDimensions", (PyCFunction)TrackObj_SetTrackDimensions, 1,
  4342. PyDoc_STR("(Fixed width, Fixed height) -> None")},
  4343. {"GetTrackUserData", (PyCFunction)TrackObj_GetTrackUserData, 1,
  4344. PyDoc_STR("() -> (UserData _rv)")},
  4345. {"GetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_GetTrackSoundLocalizationSettings, 1,
  4346. PyDoc_STR("() -> (Handle settings)")},
  4347. {"SetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_SetTrackSoundLocalizationSettings, 1,
  4348. PyDoc_STR("(Handle settings) -> None")},
  4349. {"NewTrackMedia", (PyCFunction)TrackObj_NewTrackMedia, 1,
  4350. PyDoc_STR("(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)")},
  4351. {"GetTrackMedia", (PyCFunction)TrackObj_GetTrackMedia, 1,
  4352. PyDoc_STR("() -> (Media _rv)")},
  4353. {"InsertMediaIntoTrack", (PyCFunction)TrackObj_InsertMediaIntoTrack, 1,
  4354. PyDoc_STR("(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None")},
  4355. {"InsertTrackSegment", (PyCFunction)TrackObj_InsertTrackSegment, 1,
  4356. PyDoc_STR("(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
  4357. {"InsertEmptyTrackSegment", (PyCFunction)TrackObj_InsertEmptyTrackSegment, 1,
  4358. PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
  4359. {"DeleteTrackSegment", (PyCFunction)TrackObj_DeleteTrackSegment, 1,
  4360. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
  4361. {"ScaleTrackSegment", (PyCFunction)TrackObj_ScaleTrackSegment, 1,
  4362. PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
  4363. {"IsScrapMovie", (PyCFunction)TrackObj_IsScrapMovie, 1,
  4364. PyDoc_STR("() -> (Component _rv)")},
  4365. {"CopyTrackSettings", (PyCFunction)TrackObj_CopyTrackSettings, 1,
  4366. PyDoc_STR("(Track dstTrack) -> None")},
  4367. {"AddEmptyTrackToMovie", (PyCFunction)TrackObj_AddEmptyTrackToMovie, 1,
  4368. PyDoc_STR("(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)")},
  4369. {"AddClonedTrackToMovie", (PyCFunction)TrackObj_AddClonedTrackToMovie, 1,
  4370. PyDoc_STR("(Movie dstMovie, long flags) -> (Track dstTrack)")},
  4371. {"AddTrackReference", (PyCFunction)TrackObj_AddTrackReference, 1,
  4372. PyDoc_STR("(Track refTrack, OSType refType) -> (long addedIndex)")},
  4373. {"DeleteTrackReference", (PyCFunction)TrackObj_DeleteTrackReference, 1,
  4374. PyDoc_STR("(OSType refType, long index) -> None")},
  4375. {"SetTrackReference", (PyCFunction)TrackObj_SetTrackReference, 1,
  4376. PyDoc_STR("(Track refTrack, OSType refType, long index) -> None")},
  4377. {"GetTrackReference", (PyCFunction)TrackObj_GetTrackReference, 1,
  4378. PyDoc_STR("(OSType refType, long index) -> (Track _rv)")},
  4379. {"GetNextTrackReferenceType", (PyCFunction)TrackObj_GetNextTrackReferenceType, 1,
  4380. PyDoc_STR("(OSType refType) -> (OSType _rv)")},
  4381. {"GetTrackReferenceCount", (PyCFunction)TrackObj_GetTrackReferenceCount, 1,
  4382. PyDoc_STR("(OSType refType) -> (long _rv)")},
  4383. {"GetTrackEditRate", (PyCFunction)TrackObj_GetTrackEditRate, 1,
  4384. PyDoc_STR("(TimeValue atTime) -> (Fixed _rv)")},
  4385. {"GetTrackDataSize", (PyCFunction)TrackObj_GetTrackDataSize, 1,
  4386. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
  4387. {"GetTrackDataSize64", (PyCFunction)TrackObj_GetTrackDataSize64, 1,
  4388. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
  4389. {"PtInTrack", (PyCFunction)TrackObj_PtInTrack, 1,
  4390. PyDoc_STR("(Point pt) -> (Boolean _rv)")},
  4391. {"CopyTrackUserData", (PyCFunction)TrackObj_CopyTrackUserData, 1,
  4392. PyDoc_STR("(Track dstTrack, OSType copyRule) -> None")},
  4393. {"GetTrackNextInterestingTime", (PyCFunction)TrackObj_GetTrackNextInterestingTime, 1,
  4394. PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
  4395. {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackSegmentDisplayBoundsRgn, 1,
  4396. PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
  4397. {"GetTrackStatus", (PyCFunction)TrackObj_GetTrackStatus, 1,
  4398. PyDoc_STR("() -> (ComponentResult _rv)")},
  4399. {"SetTrackLoadSettings", (PyCFunction)TrackObj_SetTrackLoadSettings, 1,
  4400. PyDoc_STR("(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None")},
  4401. {"GetTrackLoadSettings", (PyCFunction)TrackObj_GetTrackLoadSettings, 1,
  4402. PyDoc_STR("() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)")},
  4403. {NULL, NULL, 0}
  4404. };
  4405. #define TrackObj_getsetlist NULL
  4406. #define TrackObj_compare NULL
  4407. #define TrackObj_repr NULL
  4408. #define TrackObj_hash NULL
  4409. #define TrackObj_tp_init 0
  4410. #define TrackObj_tp_alloc PyType_GenericAlloc
  4411. static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  4412. {
  4413. PyObject *_self;
  4414. Track itself;
  4415. char *kw[] = {"itself", 0};
  4416. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, TrackObj_Convert, &itself)) return NULL;
  4417. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  4418. ((TrackObject *)_self)->ob_itself = itself;
  4419. return _self;
  4420. }
  4421. #define TrackObj_tp_free PyObject_Del
  4422. PyTypeObject Track_Type = {
  4423. PyObject_HEAD_INIT(NULL)
  4424. 0, /*ob_size*/
  4425. "_Qt.Track", /*tp_name*/
  4426. sizeof(TrackObject), /*tp_basicsize*/
  4427. 0, /*tp_itemsize*/
  4428. /* methods */
  4429. (destructor) TrackObj_dealloc, /*tp_dealloc*/
  4430. 0, /*tp_print*/
  4431. (getattrfunc)0, /*tp_getattr*/
  4432. (setattrfunc)0, /*tp_setattr*/
  4433. (cmpfunc) TrackObj_compare, /*tp_compare*/
  4434. (reprfunc) TrackObj_repr, /*tp_repr*/
  4435. (PyNumberMethods *)0, /* tp_as_number */
  4436. (PySequenceMethods *)0, /* tp_as_sequence */
  4437. (PyMappingMethods *)0, /* tp_as_mapping */
  4438. (hashfunc) TrackObj_hash, /*tp_hash*/
  4439. 0, /*tp_call*/
  4440. 0, /*tp_str*/
  4441. PyObject_GenericGetAttr, /*tp_getattro*/
  4442. PyObject_GenericSetAttr, /*tp_setattro */
  4443. 0, /*tp_as_buffer*/
  4444. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  4445. 0, /*tp_doc*/
  4446. 0, /*tp_traverse*/
  4447. 0, /*tp_clear*/
  4448. 0, /*tp_richcompare*/
  4449. 0, /*tp_weaklistoffset*/
  4450. 0, /*tp_iter*/
  4451. 0, /*tp_iternext*/
  4452. TrackObj_methods, /* tp_methods */
  4453. 0, /*tp_members*/
  4454. TrackObj_getsetlist, /*tp_getset*/
  4455. 0, /*tp_base*/
  4456. 0, /*tp_dict*/
  4457. 0, /*tp_descr_get*/
  4458. 0, /*tp_descr_set*/
  4459. 0, /*tp_dictoffset*/
  4460. TrackObj_tp_init, /* tp_init */
  4461. TrackObj_tp_alloc, /* tp_alloc */
  4462. TrackObj_tp_new, /* tp_new */
  4463. TrackObj_tp_free, /* tp_free */
  4464. };
  4465. /* --------------------- End object type Track ---------------------- */
  4466. /* ----------------------- Object type Movie ------------------------ */
  4467. PyTypeObject Movie_Type;
  4468. #define MovieObj_Check(x) ((x)->ob_type == &Movie_Type || PyObject_TypeCheck((x), &Movie_Type))
  4469. typedef struct MovieObject {
  4470. PyObject_HEAD
  4471. Movie ob_itself;
  4472. } MovieObject;
  4473. PyObject *MovieObj_New(Movie itself)
  4474. {
  4475. MovieObject *it;
  4476. if (itself == NULL) {
  4477. PyErr_SetString(Qt_Error,"Cannot create Movie from NULL pointer");
  4478. return NULL;
  4479. }
  4480. it = PyObject_NEW(MovieObject, &Movie_Type);
  4481. if (it == NULL) return NULL;
  4482. it->ob_itself = itself;
  4483. return (PyObject *)it;
  4484. }
  4485. int MovieObj_Convert(PyObject *v, Movie *p_itself)
  4486. {
  4487. if (v == Py_None)
  4488. {
  4489. *p_itself = NULL;
  4490. return 1;
  4491. }
  4492. if (!MovieObj_Check(v))
  4493. {
  4494. PyErr_SetString(PyExc_TypeError, "Movie required");
  4495. return 0;
  4496. }
  4497. *p_itself = ((MovieObject *)v)->ob_itself;
  4498. return 1;
  4499. }
  4500. static void MovieObj_dealloc(MovieObject *self)
  4501. {
  4502. if (self->ob_itself) DisposeMovie(self->ob_itself);
  4503. self->ob_type->tp_free((PyObject *)self);
  4504. }
  4505. static PyObject *MovieObj_MoviesTask(MovieObject *_self, PyObject *_args)
  4506. {
  4507. PyObject *_res = NULL;
  4508. long maxMilliSecToUse;
  4509. #ifndef MoviesTask
  4510. PyMac_PRECHECK(MoviesTask);
  4511. #endif
  4512. if (!PyArg_ParseTuple(_args, "l",
  4513. &maxMilliSecToUse))
  4514. return NULL;
  4515. MoviesTask(_self->ob_itself,
  4516. maxMilliSecToUse);
  4517. Py_INCREF(Py_None);
  4518. _res = Py_None;
  4519. return _res;
  4520. }
  4521. static PyObject *MovieObj_PrerollMovie(MovieObject *_self, PyObject *_args)
  4522. {
  4523. PyObject *_res = NULL;
  4524. OSErr _err;
  4525. TimeValue time;
  4526. Fixed Rate;
  4527. #ifndef PrerollMovie
  4528. PyMac_PRECHECK(PrerollMovie);
  4529. #endif
  4530. if (!PyArg_ParseTuple(_args, "lO&",
  4531. &time,
  4532. PyMac_GetFixed, &Rate))
  4533. return NULL;
  4534. _err = PrerollMovie(_self->ob_itself,
  4535. time,
  4536. Rate);
  4537. if (_err != noErr) return PyMac_Error(_err);
  4538. Py_INCREF(Py_None);
  4539. _res = Py_None;
  4540. return _res;
  4541. }
  4542. static PyObject *MovieObj_AbortPrePrerollMovie(MovieObject *_self, PyObject *_args)
  4543. {
  4544. PyObject *_res = NULL;
  4545. OSErr err;
  4546. #ifndef AbortPrePrerollMovie
  4547. PyMac_PRECHECK(AbortPrePrerollMovie);
  4548. #endif
  4549. if (!PyArg_ParseTuple(_args, "h",
  4550. &err))
  4551. return NULL;
  4552. AbortPrePrerollMovie(_self->ob_itself,
  4553. err);
  4554. Py_INCREF(Py_None);
  4555. _res = Py_None;
  4556. return _res;
  4557. }
  4558. static PyObject *MovieObj_LoadMovieIntoRam(MovieObject *_self, PyObject *_args)
  4559. {
  4560. PyObject *_res = NULL;
  4561. OSErr _err;
  4562. TimeValue time;
  4563. TimeValue duration;
  4564. long flags;
  4565. #ifndef LoadMovieIntoRam
  4566. PyMac_PRECHECK(LoadMovieIntoRam);
  4567. #endif
  4568. if (!PyArg_ParseTuple(_args, "lll",
  4569. &time,
  4570. &duration,
  4571. &flags))
  4572. return NULL;
  4573. _err = LoadMovieIntoRam(_self->ob_itself,
  4574. time,
  4575. duration,
  4576. flags);
  4577. if (_err != noErr) return PyMac_Error(_err);
  4578. Py_INCREF(Py_None);
  4579. _res = Py_None;
  4580. return _res;
  4581. }
  4582. static PyObject *MovieObj_SetMovieActive(MovieObject *_self, PyObject *_args)
  4583. {
  4584. PyObject *_res = NULL;
  4585. Boolean active;
  4586. #ifndef SetMovieActive
  4587. PyMac_PRECHECK(SetMovieActive);
  4588. #endif
  4589. if (!PyArg_ParseTuple(_args, "b",
  4590. &active))
  4591. return NULL;
  4592. SetMovieActive(_self->ob_itself,
  4593. active);
  4594. Py_INCREF(Py_None);
  4595. _res = Py_None;
  4596. return _res;
  4597. }
  4598. static PyObject *MovieObj_GetMovieActive(MovieObject *_self, PyObject *_args)
  4599. {
  4600. PyObject *_res = NULL;
  4601. Boolean _rv;
  4602. #ifndef GetMovieActive
  4603. PyMac_PRECHECK(GetMovieActive);
  4604. #endif
  4605. if (!PyArg_ParseTuple(_args, ""))
  4606. return NULL;
  4607. _rv = GetMovieActive(_self->ob_itself);
  4608. _res = Py_BuildValue("b",
  4609. _rv);
  4610. return _res;
  4611. }
  4612. static PyObject *MovieObj_StartMovie(MovieObject *_self, PyObject *_args)
  4613. {
  4614. PyObject *_res = NULL;
  4615. #ifndef StartMovie
  4616. PyMac_PRECHECK(StartMovie);
  4617. #endif
  4618. if (!PyArg_ParseTuple(_args, ""))
  4619. return NULL;
  4620. StartMovie(_self->ob_itself);
  4621. Py_INCREF(Py_None);
  4622. _res = Py_None;
  4623. return _res;
  4624. }
  4625. static PyObject *MovieObj_StopMovie(MovieObject *_self, PyObject *_args)
  4626. {
  4627. PyObject *_res = NULL;
  4628. #ifndef StopMovie
  4629. PyMac_PRECHECK(StopMovie);
  4630. #endif
  4631. if (!PyArg_ParseTuple(_args, ""))
  4632. return NULL;
  4633. StopMovie(_self->ob_itself);
  4634. Py_INCREF(Py_None);
  4635. _res = Py_None;
  4636. return _res;
  4637. }
  4638. static PyObject *MovieObj_GoToBeginningOfMovie(MovieObject *_self, PyObject *_args)
  4639. {
  4640. PyObject *_res = NULL;
  4641. #ifndef GoToBeginningOfMovie
  4642. PyMac_PRECHECK(GoToBeginningOfMovie);
  4643. #endif
  4644. if (!PyArg_ParseTuple(_args, ""))
  4645. return NULL;
  4646. GoToBeginningOfMovie(_self->ob_itself);
  4647. Py_INCREF(Py_None);
  4648. _res = Py_None;
  4649. return _res;
  4650. }
  4651. static PyObject *MovieObj_GoToEndOfMovie(MovieObject *_self, PyObject *_args)
  4652. {
  4653. PyObject *_res = NULL;
  4654. #ifndef GoToEndOfMovie
  4655. PyMac_PRECHECK(GoToEndOfMovie);
  4656. #endif
  4657. if (!PyArg_ParseTuple(_args, ""))
  4658. return NULL;
  4659. GoToEndOfMovie(_self->ob_itself);
  4660. Py_INCREF(Py_None);
  4661. _res = Py_None;
  4662. return _res;
  4663. }
  4664. static PyObject *MovieObj_IsMovieDone(MovieObject *_self, PyObject *_args)
  4665. {
  4666. PyObject *_res = NULL;
  4667. Boolean _rv;
  4668. #ifndef IsMovieDone
  4669. PyMac_PRECHECK(IsMovieDone);
  4670. #endif
  4671. if (!PyArg_ParseTuple(_args, ""))
  4672. return NULL;
  4673. _rv = IsMovieDone(_self->ob_itself);
  4674. _res = Py_BuildValue("b",
  4675. _rv);
  4676. return _res;
  4677. }
  4678. static PyObject *MovieObj_GetMoviePreviewMode(MovieObject *_self, PyObject *_args)
  4679. {
  4680. PyObject *_res = NULL;
  4681. Boolean _rv;
  4682. #ifndef GetMoviePreviewMode
  4683. PyMac_PRECHECK(GetMoviePreviewMode);
  4684. #endif
  4685. if (!PyArg_ParseTuple(_args, ""))
  4686. return NULL;
  4687. _rv = GetMoviePreviewMode(_self->ob_itself);
  4688. _res = Py_BuildValue("b",
  4689. _rv);
  4690. return _res;
  4691. }
  4692. static PyObject *MovieObj_SetMoviePreviewMode(MovieObject *_self, PyObject *_args)
  4693. {
  4694. PyObject *_res = NULL;
  4695. Boolean usePreview;
  4696. #ifndef SetMoviePreviewMode
  4697. PyMac_PRECHECK(SetMoviePreviewMode);
  4698. #endif
  4699. if (!PyArg_ParseTuple(_args, "b",
  4700. &usePreview))
  4701. return NULL;
  4702. SetMoviePreviewMode(_self->ob_itself,
  4703. usePreview);
  4704. Py_INCREF(Py_None);
  4705. _res = Py_None;
  4706. return _res;
  4707. }
  4708. static PyObject *MovieObj_ShowMoviePoster(MovieObject *_self, PyObject *_args)
  4709. {
  4710. PyObject *_res = NULL;
  4711. #ifndef ShowMoviePoster
  4712. PyMac_PRECHECK(ShowMoviePoster);
  4713. #endif
  4714. if (!PyArg_ParseTuple(_args, ""))
  4715. return NULL;
  4716. ShowMoviePoster(_self->ob_itself);
  4717. Py_INCREF(Py_None);
  4718. _res = Py_None;
  4719. return _res;
  4720. }
  4721. static PyObject *MovieObj_GetMovieTimeBase(MovieObject *_self, PyObject *_args)
  4722. {
  4723. PyObject *_res = NULL;
  4724. TimeBase _rv;
  4725. #ifndef GetMovieTimeBase
  4726. PyMac_PRECHECK(GetMovieTimeBase);
  4727. #endif
  4728. if (!PyArg_ParseTuple(_args, ""))
  4729. return NULL;
  4730. _rv = GetMovieTimeBase(_self->ob_itself);
  4731. _res = Py_BuildValue("O&",
  4732. TimeBaseObj_New, _rv);
  4733. return _res;
  4734. }
  4735. static PyObject *MovieObj_SetMovieMasterTimeBase(MovieObject *_self, PyObject *_args)
  4736. {
  4737. PyObject *_res = NULL;
  4738. TimeBase tb;
  4739. TimeRecord slaveZero;
  4740. #ifndef SetMovieMasterTimeBase
  4741. PyMac_PRECHECK(SetMovieMasterTimeBase);
  4742. #endif
  4743. if (!PyArg_ParseTuple(_args, "O&O&",
  4744. TimeBaseObj_Convert, &tb,
  4745. QtTimeRecord_Convert, &slaveZero))
  4746. return NULL;
  4747. SetMovieMasterTimeBase(_self->ob_itself,
  4748. tb,
  4749. &slaveZero);
  4750. Py_INCREF(Py_None);
  4751. _res = Py_None;
  4752. return _res;
  4753. }
  4754. static PyObject *MovieObj_SetMovieMasterClock(MovieObject *_self, PyObject *_args)
  4755. {
  4756. PyObject *_res = NULL;
  4757. Component clockMeister;
  4758. TimeRecord slaveZero;
  4759. #ifndef SetMovieMasterClock
  4760. PyMac_PRECHECK(SetMovieMasterClock);
  4761. #endif
  4762. if (!PyArg_ParseTuple(_args, "O&O&",
  4763. CmpObj_Convert, &clockMeister,
  4764. QtTimeRecord_Convert, &slaveZero))
  4765. return NULL;
  4766. SetMovieMasterClock(_self->ob_itself,
  4767. clockMeister,
  4768. &slaveZero);
  4769. Py_INCREF(Py_None);
  4770. _res = Py_None;
  4771. return _res;
  4772. }
  4773. static PyObject *MovieObj_ChooseMovieClock(MovieObject *_self, PyObject *_args)
  4774. {
  4775. PyObject *_res = NULL;
  4776. long flags;
  4777. #ifndef ChooseMovieClock
  4778. PyMac_PRECHECK(ChooseMovieClock);
  4779. #endif
  4780. if (!PyArg_ParseTuple(_args, "l",
  4781. &flags))
  4782. return NULL;
  4783. ChooseMovieClock(_self->ob_itself,
  4784. flags);
  4785. Py_INCREF(Py_None);
  4786. _res = Py_None;
  4787. return _res;
  4788. }
  4789. static PyObject *MovieObj_GetMovieGWorld(MovieObject *_self, PyObject *_args)
  4790. {
  4791. PyObject *_res = NULL;
  4792. CGrafPtr port;
  4793. GDHandle gdh;
  4794. #ifndef GetMovieGWorld
  4795. PyMac_PRECHECK(GetMovieGWorld);
  4796. #endif
  4797. if (!PyArg_ParseTuple(_args, ""))
  4798. return NULL;
  4799. GetMovieGWorld(_self->ob_itself,
  4800. &port,
  4801. &gdh);
  4802. _res = Py_BuildValue("O&O&",
  4803. GrafObj_New, port,
  4804. OptResObj_New, gdh);
  4805. return _res;
  4806. }
  4807. static PyObject *MovieObj_SetMovieGWorld(MovieObject *_self, PyObject *_args)
  4808. {
  4809. PyObject *_res = NULL;
  4810. CGrafPtr port;
  4811. GDHandle gdh;
  4812. #ifndef SetMovieGWorld
  4813. PyMac_PRECHECK(SetMovieGWorld);
  4814. #endif
  4815. if (!PyArg_ParseTuple(_args, "O&O&",
  4816. GrafObj_Convert, &port,
  4817. OptResObj_Convert, &gdh))
  4818. return NULL;
  4819. SetMovieGWorld(_self->ob_itself,
  4820. port,
  4821. gdh);
  4822. Py_INCREF(Py_None);
  4823. _res = Py_None;
  4824. return _res;
  4825. }
  4826. static PyObject *MovieObj_GetMovieNaturalBoundsRect(MovieObject *_self, PyObject *_args)
  4827. {
  4828. PyObject *_res = NULL;
  4829. Rect naturalBounds;
  4830. #ifndef GetMovieNaturalBoundsRect
  4831. PyMac_PRECHECK(GetMovieNaturalBoundsRect);
  4832. #endif
  4833. if (!PyArg_ParseTuple(_args, ""))
  4834. return NULL;
  4835. GetMovieNaturalBoundsRect(_self->ob_itself,
  4836. &naturalBounds);
  4837. _res = Py_BuildValue("O&",
  4838. PyMac_BuildRect, &naturalBounds);
  4839. return _res;
  4840. }
  4841. static PyObject *MovieObj_GetNextTrackForCompositing(MovieObject *_self, PyObject *_args)
  4842. {
  4843. PyObject *_res = NULL;
  4844. Track _rv;
  4845. Track theTrack;
  4846. #ifndef GetNextTrackForCompositing
  4847. PyMac_PRECHECK(GetNextTrackForCompositing);
  4848. #endif
  4849. if (!PyArg_ParseTuple(_args, "O&",
  4850. TrackObj_Convert, &theTrack))
  4851. return NULL;
  4852. _rv = GetNextTrackForCompositing(_self->ob_itself,
  4853. theTrack);
  4854. _res = Py_BuildValue("O&",
  4855. TrackObj_New, _rv);
  4856. return _res;
  4857. }
  4858. static PyObject *MovieObj_GetPrevTrackForCompositing(MovieObject *_self, PyObject *_args)
  4859. {
  4860. PyObject *_res = NULL;
  4861. Track _rv;
  4862. Track theTrack;
  4863. #ifndef GetPrevTrackForCompositing
  4864. PyMac_PRECHECK(GetPrevTrackForCompositing);
  4865. #endif
  4866. if (!PyArg_ParseTuple(_args, "O&",
  4867. TrackObj_Convert, &theTrack))
  4868. return NULL;
  4869. _rv = GetPrevTrackForCompositing(_self->ob_itself,
  4870. theTrack);
  4871. _res = Py_BuildValue("O&",
  4872. TrackObj_New, _rv);
  4873. return _res;
  4874. }
  4875. static PyObject *MovieObj_GetMoviePict(MovieObject *_self, PyObject *_args)
  4876. {
  4877. PyObject *_res = NULL;
  4878. PicHandle _rv;
  4879. TimeValue time;
  4880. #ifndef GetMoviePict
  4881. PyMac_PRECHECK(GetMoviePict);
  4882. #endif
  4883. if (!PyArg_ParseTuple(_args, "l",
  4884. &time))
  4885. return NULL;
  4886. _rv = GetMoviePict(_self->ob_itself,
  4887. time);
  4888. _res = Py_BuildValue("O&",
  4889. ResObj_New, _rv);
  4890. return _res;
  4891. }
  4892. static PyObject *MovieObj_GetMoviePosterPict(MovieObject *_self, PyObject *_args)
  4893. {
  4894. PyObject *_res = NULL;
  4895. PicHandle _rv;
  4896. #ifndef GetMoviePosterPict
  4897. PyMac_PRECHECK(GetMoviePosterPict);
  4898. #endif
  4899. if (!PyArg_ParseTuple(_args, ""))
  4900. return NULL;
  4901. _rv = GetMoviePosterPict(_self->ob_itself);
  4902. _res = Py_BuildValue("O&",
  4903. ResObj_New, _rv);
  4904. return _res;
  4905. }
  4906. static PyObject *MovieObj_UpdateMovie(MovieObject *_self, PyObject *_args)
  4907. {
  4908. PyObject *_res = NULL;
  4909. OSErr _err;
  4910. #ifndef UpdateMovie
  4911. PyMac_PRECHECK(UpdateMovie);
  4912. #endif
  4913. if (!PyArg_ParseTuple(_args, ""))
  4914. return NULL;
  4915. _err = UpdateMovie(_self->ob_itself);
  4916. if (_err != noErr) return PyMac_Error(_err);
  4917. Py_INCREF(Py_None);
  4918. _res = Py_None;
  4919. return _res;
  4920. }
  4921. static PyObject *MovieObj_InvalidateMovieRegion(MovieObject *_self, PyObject *_args)
  4922. {
  4923. PyObject *_res = NULL;
  4924. OSErr _err;
  4925. RgnHandle invalidRgn;
  4926. #ifndef InvalidateMovieRegion
  4927. PyMac_PRECHECK(InvalidateMovieRegion);
  4928. #endif
  4929. if (!PyArg_ParseTuple(_args, "O&",
  4930. ResObj_Convert, &invalidRgn))
  4931. return NULL;
  4932. _err = InvalidateMovieRegion(_self->ob_itself,
  4933. invalidRgn);
  4934. if (_err != noErr) return PyMac_Error(_err);
  4935. Py_INCREF(Py_None);
  4936. _res = Py_None;
  4937. return _res;
  4938. }
  4939. static PyObject *MovieObj_GetMovieBox(MovieObject *_self, PyObject *_args)
  4940. {
  4941. PyObject *_res = NULL;
  4942. Rect boxRect;
  4943. #ifndef GetMovieBox
  4944. PyMac_PRECHECK(GetMovieBox);
  4945. #endif
  4946. if (!PyArg_ParseTuple(_args, ""))
  4947. return NULL;
  4948. GetMovieBox(_self->ob_itself,
  4949. &boxRect);
  4950. _res = Py_BuildValue("O&",
  4951. PyMac_BuildRect, &boxRect);
  4952. return _res;
  4953. }
  4954. static PyObject *MovieObj_SetMovieBox(MovieObject *_self, PyObject *_args)
  4955. {
  4956. PyObject *_res = NULL;
  4957. Rect boxRect;
  4958. #ifndef SetMovieBox
  4959. PyMac_PRECHECK(SetMovieBox);
  4960. #endif
  4961. if (!PyArg_ParseTuple(_args, "O&",
  4962. PyMac_GetRect, &boxRect))
  4963. return NULL;
  4964. SetMovieBox(_self->ob_itself,
  4965. &boxRect);
  4966. Py_INCREF(Py_None);
  4967. _res = Py_None;
  4968. return _res;
  4969. }
  4970. static PyObject *MovieObj_GetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
  4971. {
  4972. PyObject *_res = NULL;
  4973. RgnHandle _rv;
  4974. #ifndef GetMovieDisplayClipRgn
  4975. PyMac_PRECHECK(GetMovieDisplayClipRgn);
  4976. #endif
  4977. if (!PyArg_ParseTuple(_args, ""))
  4978. return NULL;
  4979. _rv = GetMovieDisplayClipRgn(_self->ob_itself);
  4980. _res = Py_BuildValue("O&",
  4981. ResObj_New, _rv);
  4982. return _res;
  4983. }
  4984. static PyObject *MovieObj_SetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
  4985. {
  4986. PyObject *_res = NULL;
  4987. RgnHandle theClip;
  4988. #ifndef SetMovieDisplayClipRgn
  4989. PyMac_PRECHECK(SetMovieDisplayClipRgn);
  4990. #endif
  4991. if (!PyArg_ParseTuple(_args, "O&",
  4992. ResObj_Convert, &theClip))
  4993. return NULL;
  4994. SetMovieDisplayClipRgn(_self->ob_itself,
  4995. theClip);
  4996. Py_INCREF(Py_None);
  4997. _res = Py_None;
  4998. return _res;
  4999. }
  5000. static PyObject *MovieObj_GetMovieClipRgn(MovieObject *_self, PyObject *_args)
  5001. {
  5002. PyObject *_res = NULL;
  5003. RgnHandle _rv;
  5004. #ifndef GetMovieClipRgn
  5005. PyMac_PRECHECK(GetMovieClipRgn);
  5006. #endif
  5007. if (!PyArg_ParseTuple(_args, ""))
  5008. return NULL;
  5009. _rv = GetMovieClipRgn(_self->ob_itself);
  5010. _res = Py_BuildValue("O&",
  5011. ResObj_New, _rv);
  5012. return _res;
  5013. }
  5014. static PyObject *MovieObj_SetMovieClipRgn(MovieObject *_self, PyObject *_args)
  5015. {
  5016. PyObject *_res = NULL;
  5017. RgnHandle theClip;
  5018. #ifndef SetMovieClipRgn
  5019. PyMac_PRECHECK(SetMovieClipRgn);
  5020. #endif
  5021. if (!PyArg_ParseTuple(_args, "O&",
  5022. ResObj_Convert, &theClip))
  5023. return NULL;
  5024. SetMovieClipRgn(_self->ob_itself,
  5025. theClip);
  5026. Py_INCREF(Py_None);
  5027. _res = Py_None;
  5028. return _res;
  5029. }
  5030. static PyObject *MovieObj_GetMovieDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
  5031. {
  5032. PyObject *_res = NULL;
  5033. RgnHandle _rv;
  5034. #ifndef GetMovieDisplayBoundsRgn
  5035. PyMac_PRECHECK(GetMovieDisplayBoundsRgn);
  5036. #endif
  5037. if (!PyArg_ParseTuple(_args, ""))
  5038. return NULL;
  5039. _rv = GetMovieDisplayBoundsRgn(_self->ob_itself);
  5040. _res = Py_BuildValue("O&",
  5041. ResObj_New, _rv);
  5042. return _res;
  5043. }
  5044. static PyObject *MovieObj_GetMovieBoundsRgn(MovieObject *_self, PyObject *_args)
  5045. {
  5046. PyObject *_res = NULL;
  5047. RgnHandle _rv;
  5048. #ifndef GetMovieBoundsRgn
  5049. PyMac_PRECHECK(GetMovieBoundsRgn);
  5050. #endif
  5051. if (!PyArg_ParseTuple(_args, ""))
  5052. return NULL;
  5053. _rv = GetMovieBoundsRgn(_self->ob_itself);
  5054. _res = Py_BuildValue("O&",
  5055. ResObj_New, _rv);
  5056. return _res;
  5057. }
  5058. static PyObject *MovieObj_SetMovieVideoOutput(MovieObject *_self, PyObject *_args)
  5059. {
  5060. PyObject *_res = NULL;
  5061. ComponentInstance vout;
  5062. #ifndef SetMovieVideoOutput
  5063. PyMac_PRECHECK(SetMovieVideoOutput);
  5064. #endif
  5065. if (!PyArg_ParseTuple(_args, "O&",
  5066. CmpInstObj_Convert, &vout))
  5067. return NULL;
  5068. SetMovieVideoOutput(_self->ob_itself,
  5069. vout);
  5070. Py_INCREF(Py_None);
  5071. _res = Py_None;
  5072. return _res;
  5073. }
  5074. static PyObject *MovieObj_PutMovieIntoHandle(MovieObject *_self, PyObject *_args)
  5075. {
  5076. PyObject *_res = NULL;
  5077. OSErr _err;
  5078. Handle publicMovie;
  5079. #ifndef PutMovieIntoHandle
  5080. PyMac_PRECHECK(PutMovieIntoHandle);
  5081. #endif
  5082. if (!PyArg_ParseTuple(_args, "O&",
  5083. ResObj_Convert, &publicMovie))
  5084. return NULL;
  5085. _err = PutMovieIntoHandle(_self->ob_itself,
  5086. publicMovie);
  5087. if (_err != noErr) return PyMac_Error(_err);
  5088. Py_INCREF(Py_None);
  5089. _res = Py_None;
  5090. return _res;
  5091. }
  5092. static PyObject *MovieObj_PutMovieIntoDataFork(MovieObject *_self, PyObject *_args)
  5093. {
  5094. PyObject *_res = NULL;
  5095. OSErr _err;
  5096. short fRefNum;
  5097. long offset;
  5098. long maxSize;
  5099. #ifndef PutMovieIntoDataFork
  5100. PyMac_PRECHECK(PutMovieIntoDataFork);
  5101. #endif
  5102. if (!PyArg_ParseTuple(_args, "hll",
  5103. &fRefNum,
  5104. &offset,
  5105. &maxSize))
  5106. return NULL;
  5107. _err = PutMovieIntoDataFork(_self->ob_itself,
  5108. fRefNum,
  5109. offset,
  5110. maxSize);
  5111. if (_err != noErr) return PyMac_Error(_err);
  5112. Py_INCREF(Py_None);
  5113. _res = Py_None;
  5114. return _res;
  5115. }
  5116. static PyObject *MovieObj_PutMovieIntoDataFork64(MovieObject *_self, PyObject *_args)
  5117. {
  5118. PyObject *_res = NULL;
  5119. OSErr _err;
  5120. long fRefNum;
  5121. wide offset;
  5122. unsigned long maxSize;
  5123. #ifndef PutMovieIntoDataFork64
  5124. PyMac_PRECHECK(PutMovieIntoDataFork64);
  5125. #endif
  5126. if (!PyArg_ParseTuple(_args, "lO&l",
  5127. &fRefNum,
  5128. PyMac_Getwide, &offset,
  5129. &maxSize))
  5130. return NULL;
  5131. _err = PutMovieIntoDataFork64(_self->ob_itself,
  5132. fRefNum,
  5133. &offset,
  5134. maxSize);
  5135. if (_err != noErr) return PyMac_Error(_err);
  5136. Py_INCREF(Py_None);
  5137. _res = Py_None;
  5138. return _res;
  5139. }
  5140. static PyObject *MovieObj_PutMovieIntoStorage(MovieObject *_self, PyObject *_args)
  5141. {
  5142. PyObject *_res = NULL;
  5143. OSErr _err;
  5144. DataHandler dh;
  5145. wide offset;
  5146. unsigned long maxSize;
  5147. #ifndef PutMovieIntoStorage
  5148. PyMac_PRECHECK(PutMovieIntoStorage);
  5149. #endif
  5150. if (!PyArg_ParseTuple(_args, "O&O&l",
  5151. CmpInstObj_Convert, &dh,
  5152. PyMac_Getwide, &offset,
  5153. &maxSize))
  5154. return NULL;
  5155. _err = PutMovieIntoStorage(_self->ob_itself,
  5156. dh,
  5157. &offset,
  5158. maxSize);
  5159. if (_err != noErr) return PyMac_Error(_err);
  5160. Py_INCREF(Py_None);
  5161. _res = Py_None;
  5162. return _res;
  5163. }
  5164. static PyObject *MovieObj_PutMovieForDataRefIntoHandle(MovieObject *_self, PyObject *_args)
  5165. {
  5166. PyObject *_res = NULL;
  5167. OSErr _err;
  5168. Handle dataRef;
  5169. OSType dataRefType;
  5170. Handle publicMovie;
  5171. #ifndef PutMovieForDataRefIntoHandle
  5172. PyMac_PRECHECK(PutMovieForDataRefIntoHandle);
  5173. #endif
  5174. if (!PyArg_ParseTuple(_args, "O&O&O&",
  5175. ResObj_Convert, &dataRef,
  5176. PyMac_GetOSType, &dataRefType,
  5177. ResObj_Convert, &publicMovie))
  5178. return NULL;
  5179. _err = PutMovieForDataRefIntoHandle(_self->ob_itself,
  5180. dataRef,
  5181. dataRefType,
  5182. publicMovie);
  5183. if (_err != noErr) return PyMac_Error(_err);
  5184. Py_INCREF(Py_None);
  5185. _res = Py_None;
  5186. return _res;
  5187. }
  5188. static PyObject *MovieObj_GetMovieCreationTime(MovieObject *_self, PyObject *_args)
  5189. {
  5190. PyObject *_res = NULL;
  5191. unsigned long _rv;
  5192. #ifndef GetMovieCreationTime
  5193. PyMac_PRECHECK(GetMovieCreationTime);
  5194. #endif
  5195. if (!PyArg_ParseTuple(_args, ""))
  5196. return NULL;
  5197. _rv = GetMovieCreationTime(_self->ob_itself);
  5198. _res = Py_BuildValue("l",
  5199. _rv);
  5200. return _res;
  5201. }
  5202. static PyObject *MovieObj_GetMovieModificationTime(MovieObject *_self, PyObject *_args)
  5203. {
  5204. PyObject *_res = NULL;
  5205. unsigned long _rv;
  5206. #ifndef GetMovieModificationTime
  5207. PyMac_PRECHECK(GetMovieModificationTime);
  5208. #endif
  5209. if (!PyArg_ParseTuple(_args, ""))
  5210. return NULL;
  5211. _rv = GetMovieModificationTime(_self->ob_itself);
  5212. _res = Py_BuildValue("l",
  5213. _rv);
  5214. return _res;
  5215. }
  5216. static PyObject *MovieObj_GetMovieTimeScale(MovieObject *_self, PyObject *_args)
  5217. {
  5218. PyObject *_res = NULL;
  5219. TimeScale _rv;
  5220. #ifndef GetMovieTimeScale
  5221. PyMac_PRECHECK(GetMovieTimeScale);
  5222. #endif
  5223. if (!PyArg_ParseTuple(_args, ""))
  5224. return NULL;
  5225. _rv = GetMovieTimeScale(_self->ob_itself);
  5226. _res = Py_BuildValue("l",
  5227. _rv);
  5228. return _res;
  5229. }
  5230. static PyObject *MovieObj_SetMovieTimeScale(MovieObject *_self, PyObject *_args)
  5231. {
  5232. PyObject *_res = NULL;
  5233. TimeScale timeScale;
  5234. #ifndef SetMovieTimeScale
  5235. PyMac_PRECHECK(SetMovieTimeScale);
  5236. #endif
  5237. if (!PyArg_ParseTuple(_args, "l",
  5238. &timeScale))
  5239. return NULL;
  5240. SetMovieTimeScale(_self->ob_itself,
  5241. timeScale);
  5242. Py_INCREF(Py_None);
  5243. _res = Py_None;
  5244. return _res;
  5245. }
  5246. static PyObject *MovieObj_GetMovieDuration(MovieObject *_self, PyObject *_args)
  5247. {
  5248. PyObject *_res = NULL;
  5249. TimeValue _rv;
  5250. #ifndef GetMovieDuration
  5251. PyMac_PRECHECK(GetMovieDuration);
  5252. #endif
  5253. if (!PyArg_ParseTuple(_args, ""))
  5254. return NULL;
  5255. _rv = GetMovieDuration(_self->ob_itself);
  5256. _res = Py_BuildValue("l",
  5257. _rv);
  5258. return _res;
  5259. }
  5260. static PyObject *MovieObj_GetMovieRate(MovieObject *_self, PyObject *_args)
  5261. {
  5262. PyObject *_res = NULL;
  5263. Fixed _rv;
  5264. #ifndef GetMovieRate
  5265. PyMac_PRECHECK(GetMovieRate);
  5266. #endif
  5267. if (!PyArg_ParseTuple(_args, ""))
  5268. return NULL;
  5269. _rv = GetMovieRate(_self->ob_itself);
  5270. _res = Py_BuildValue("O&",
  5271. PyMac_BuildFixed, _rv);
  5272. return _res;
  5273. }
  5274. static PyObject *MovieObj_SetMovieRate(MovieObject *_self, PyObject *_args)
  5275. {
  5276. PyObject *_res = NULL;
  5277. Fixed rate;
  5278. #ifndef SetMovieRate
  5279. PyMac_PRECHECK(SetMovieRate);
  5280. #endif
  5281. if (!PyArg_ParseTuple(_args, "O&",
  5282. PyMac_GetFixed, &rate))
  5283. return NULL;
  5284. SetMovieRate(_self->ob_itself,
  5285. rate);
  5286. Py_INCREF(Py_None);
  5287. _res = Py_None;
  5288. return _res;
  5289. }
  5290. static PyObject *MovieObj_GetMoviePreferredRate(MovieObject *_self, PyObject *_args)
  5291. {
  5292. PyObject *_res = NULL;
  5293. Fixed _rv;
  5294. #ifndef GetMoviePreferredRate
  5295. PyMac_PRECHECK(GetMoviePreferredRate);
  5296. #endif
  5297. if (!PyArg_ParseTuple(_args, ""))
  5298. return NULL;
  5299. _rv = GetMoviePreferredRate(_self->ob_itself);
  5300. _res = Py_BuildValue("O&",
  5301. PyMac_BuildFixed, _rv);
  5302. return _res;
  5303. }
  5304. static PyObject *MovieObj_SetMoviePreferredRate(MovieObject *_self, PyObject *_args)
  5305. {
  5306. PyObject *_res = NULL;
  5307. Fixed rate;
  5308. #ifndef SetMoviePreferredRate
  5309. PyMac_PRECHECK(SetMoviePreferredRate);
  5310. #endif
  5311. if (!PyArg_ParseTuple(_args, "O&",
  5312. PyMac_GetFixed, &rate))
  5313. return NULL;
  5314. SetMoviePreferredRate(_self->ob_itself,
  5315. rate);
  5316. Py_INCREF(Py_None);
  5317. _res = Py_None;
  5318. return _res;
  5319. }
  5320. static PyObject *MovieObj_GetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
  5321. {
  5322. PyObject *_res = NULL;
  5323. short _rv;
  5324. #ifndef GetMoviePreferredVolume
  5325. PyMac_PRECHECK(GetMoviePreferredVolume);
  5326. #endif
  5327. if (!PyArg_ParseTuple(_args, ""))
  5328. return NULL;
  5329. _rv = GetMoviePreferredVolume(_self->ob_itself);
  5330. _res = Py_BuildValue("h",
  5331. _rv);
  5332. return _res;
  5333. }
  5334. static PyObject *MovieObj_SetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
  5335. {
  5336. PyObject *_res = NULL;
  5337. short volume;
  5338. #ifndef SetMoviePreferredVolume
  5339. PyMac_PRECHECK(SetMoviePreferredVolume);
  5340. #endif
  5341. if (!PyArg_ParseTuple(_args, "h",
  5342. &volume))
  5343. return NULL;
  5344. SetMoviePreferredVolume(_self->ob_itself,
  5345. volume);
  5346. Py_INCREF(Py_None);
  5347. _res = Py_None;
  5348. return _res;
  5349. }
  5350. static PyObject *MovieObj_GetMovieVolume(MovieObject *_self, PyObject *_args)
  5351. {
  5352. PyObject *_res = NULL;
  5353. short _rv;
  5354. #ifndef GetMovieVolume
  5355. PyMac_PRECHECK(GetMovieVolume);
  5356. #endif
  5357. if (!PyArg_ParseTuple(_args, ""))
  5358. return NULL;
  5359. _rv = GetMovieVolume(_self->ob_itself);
  5360. _res = Py_BuildValue("h",
  5361. _rv);
  5362. return _res;
  5363. }
  5364. static PyObject *MovieObj_SetMovieVolume(MovieObject *_self, PyObject *_args)
  5365. {
  5366. PyObject *_res = NULL;
  5367. short volume;
  5368. #ifndef SetMovieVolume
  5369. PyMac_PRECHECK(SetMovieVolume);
  5370. #endif
  5371. if (!PyArg_ParseTuple(_args, "h",
  5372. &volume))
  5373. return NULL;
  5374. SetMovieVolume(_self->ob_itself,
  5375. volume);
  5376. Py_INCREF(Py_None);
  5377. _res = Py_None;
  5378. return _res;
  5379. }
  5380. static PyObject *MovieObj_GetMoviePreviewTime(MovieObject *_self, PyObject *_args)
  5381. {
  5382. PyObject *_res = NULL;
  5383. TimeValue previewTime;
  5384. TimeValue previewDuration;
  5385. #ifndef GetMoviePreviewTime
  5386. PyMac_PRECHECK(GetMoviePreviewTime);
  5387. #endif
  5388. if (!PyArg_ParseTuple(_args, ""))
  5389. return NULL;
  5390. GetMoviePreviewTime(_self->ob_itself,
  5391. &previewTime,
  5392. &previewDuration);
  5393. _res = Py_BuildValue("ll",
  5394. previewTime,
  5395. previewDuration);
  5396. return _res;
  5397. }
  5398. static PyObject *MovieObj_SetMoviePreviewTime(MovieObject *_self, PyObject *_args)
  5399. {
  5400. PyObject *_res = NULL;
  5401. TimeValue previewTime;
  5402. TimeValue previewDuration;
  5403. #ifndef SetMoviePreviewTime
  5404. PyMac_PRECHECK(SetMoviePreviewTime);
  5405. #endif
  5406. if (!PyArg_ParseTuple(_args, "ll",
  5407. &previewTime,
  5408. &previewDuration))
  5409. return NULL;
  5410. SetMoviePreviewTime(_self->ob_itself,
  5411. previewTime,
  5412. previewDuration);
  5413. Py_INCREF(Py_None);
  5414. _res = Py_None;
  5415. return _res;
  5416. }
  5417. static PyObject *MovieObj_GetMoviePosterTime(MovieObject *_self, PyObject *_args)
  5418. {
  5419. PyObject *_res = NULL;
  5420. TimeValue _rv;
  5421. #ifndef GetMoviePosterTime
  5422. PyMac_PRECHECK(GetMoviePosterTime);
  5423. #endif
  5424. if (!PyArg_ParseTuple(_args, ""))
  5425. return NULL;
  5426. _rv = GetMoviePosterTime(_self->ob_itself);
  5427. _res = Py_BuildValue("l",
  5428. _rv);
  5429. return _res;
  5430. }
  5431. static PyObject *MovieObj_SetMoviePosterTime(MovieObject *_self, PyObject *_args)
  5432. {
  5433. PyObject *_res = NULL;
  5434. TimeValue posterTime;
  5435. #ifndef SetMoviePosterTime
  5436. PyMac_PRECHECK(SetMoviePosterTime);
  5437. #endif
  5438. if (!PyArg_ParseTuple(_args, "l",
  5439. &posterTime))
  5440. return NULL;
  5441. SetMoviePosterTime(_self->ob_itself,
  5442. posterTime);
  5443. Py_INCREF(Py_None);
  5444. _res = Py_None;
  5445. return _res;
  5446. }
  5447. static PyObject *MovieObj_GetMovieSelection(MovieObject *_self, PyObject *_args)
  5448. {
  5449. PyObject *_res = NULL;
  5450. TimeValue selectionTime;
  5451. TimeValue selectionDuration;
  5452. #ifndef GetMovieSelection
  5453. PyMac_PRECHECK(GetMovieSelection);
  5454. #endif
  5455. if (!PyArg_ParseTuple(_args, ""))
  5456. return NULL;
  5457. GetMovieSelection(_self->ob_itself,
  5458. &selectionTime,
  5459. &selectionDuration);
  5460. _res = Py_BuildValue("ll",
  5461. selectionTime,
  5462. selectionDuration);
  5463. return _res;
  5464. }
  5465. static PyObject *MovieObj_SetMovieSelection(MovieObject *_self, PyObject *_args)
  5466. {
  5467. PyObject *_res = NULL;
  5468. TimeValue selectionTime;
  5469. TimeValue selectionDuration;
  5470. #ifndef SetMovieSelection
  5471. PyMac_PRECHECK(SetMovieSelection);
  5472. #endif
  5473. if (!PyArg_ParseTuple(_args, "ll",
  5474. &selectionTime,
  5475. &selectionDuration))
  5476. return NULL;
  5477. SetMovieSelection(_self->ob_itself,
  5478. selectionTime,
  5479. selectionDuration);
  5480. Py_INCREF(Py_None);
  5481. _res = Py_None;
  5482. return _res;
  5483. }
  5484. static PyObject *MovieObj_SetMovieActiveSegment(MovieObject *_self, PyObject *_args)
  5485. {
  5486. PyObject *_res = NULL;
  5487. TimeValue startTime;
  5488. TimeValue duration;
  5489. #ifndef SetMovieActiveSegment
  5490. PyMac_PRECHECK(SetMovieActiveSegment);
  5491. #endif
  5492. if (!PyArg_ParseTuple(_args, "ll",
  5493. &startTime,
  5494. &duration))
  5495. return NULL;
  5496. SetMovieActiveSegment(_self->ob_itself,
  5497. startTime,
  5498. duration);
  5499. Py_INCREF(Py_None);
  5500. _res = Py_None;
  5501. return _res;
  5502. }
  5503. static PyObject *MovieObj_GetMovieActiveSegment(MovieObject *_self, PyObject *_args)
  5504. {
  5505. PyObject *_res = NULL;
  5506. TimeValue startTime;
  5507. TimeValue duration;
  5508. #ifndef GetMovieActiveSegment
  5509. PyMac_PRECHECK(GetMovieActiveSegment);
  5510. #endif
  5511. if (!PyArg_ParseTuple(_args, ""))
  5512. return NULL;
  5513. GetMovieActiveSegment(_self->ob_itself,
  5514. &startTime,
  5515. &duration);
  5516. _res = Py_BuildValue("ll",
  5517. startTime,
  5518. duration);
  5519. return _res;
  5520. }
  5521. static PyObject *MovieObj_GetMovieTime(MovieObject *_self, PyObject *_args)
  5522. {
  5523. PyObject *_res = NULL;
  5524. TimeValue _rv;
  5525. TimeRecord currentTime;
  5526. #ifndef GetMovieTime
  5527. PyMac_PRECHECK(GetMovieTime);
  5528. #endif
  5529. if (!PyArg_ParseTuple(_args, ""))
  5530. return NULL;
  5531. _rv = GetMovieTime(_self->ob_itself,
  5532. &currentTime);
  5533. _res = Py_BuildValue("lO&",
  5534. _rv,
  5535. QtTimeRecord_New, &currentTime);
  5536. return _res;
  5537. }
  5538. static PyObject *MovieObj_SetMovieTime(MovieObject *_self, PyObject *_args)
  5539. {
  5540. PyObject *_res = NULL;
  5541. TimeRecord newtime;
  5542. #ifndef SetMovieTime
  5543. PyMac_PRECHECK(SetMovieTime);
  5544. #endif
  5545. if (!PyArg_ParseTuple(_args, "O&",
  5546. QtTimeRecord_Convert, &newtime))
  5547. return NULL;
  5548. SetMovieTime(_self->ob_itself,
  5549. &newtime);
  5550. Py_INCREF(Py_None);
  5551. _res = Py_None;
  5552. return _res;
  5553. }
  5554. static PyObject *MovieObj_SetMovieTimeValue(MovieObject *_self, PyObject *_args)
  5555. {
  5556. PyObject *_res = NULL;
  5557. TimeValue newtime;
  5558. #ifndef SetMovieTimeValue
  5559. PyMac_PRECHECK(SetMovieTimeValue);
  5560. #endif
  5561. if (!PyArg_ParseTuple(_args, "l",
  5562. &newtime))
  5563. return NULL;
  5564. SetMovieTimeValue(_self->ob_itself,
  5565. newtime);
  5566. Py_INCREF(Py_None);
  5567. _res = Py_None;
  5568. return _res;
  5569. }
  5570. static PyObject *MovieObj_GetMovieUserData(MovieObject *_self, PyObject *_args)
  5571. {
  5572. PyObject *_res = NULL;
  5573. UserData _rv;
  5574. #ifndef GetMovieUserData
  5575. PyMac_PRECHECK(GetMovieUserData);
  5576. #endif
  5577. if (!PyArg_ParseTuple(_args, ""))
  5578. return NULL;
  5579. _rv = GetMovieUserData(_self->ob_itself);
  5580. _res = Py_BuildValue("O&",
  5581. UserDataObj_New, _rv);
  5582. return _res;
  5583. }
  5584. static PyObject *MovieObj_GetMovieTrackCount(MovieObject *_self, PyObject *_args)
  5585. {
  5586. PyObject *_res = NULL;
  5587. long _rv;
  5588. #ifndef GetMovieTrackCount
  5589. PyMac_PRECHECK(GetMovieTrackCount);
  5590. #endif
  5591. if (!PyArg_ParseTuple(_args, ""))
  5592. return NULL;
  5593. _rv = GetMovieTrackCount(_self->ob_itself);
  5594. _res = Py_BuildValue("l",
  5595. _rv);
  5596. return _res;
  5597. }
  5598. static PyObject *MovieObj_GetMovieTrack(MovieObject *_self, PyObject *_args)
  5599. {
  5600. PyObject *_res = NULL;
  5601. Track _rv;
  5602. long trackID;
  5603. #ifndef GetMovieTrack
  5604. PyMac_PRECHECK(GetMovieTrack);
  5605. #endif
  5606. if (!PyArg_ParseTuple(_args, "l",
  5607. &trackID))
  5608. return NULL;
  5609. _rv = GetMovieTrack(_self->ob_itself,
  5610. trackID);
  5611. _res = Py_BuildValue("O&",
  5612. TrackObj_New, _rv);
  5613. return _res;
  5614. }
  5615. static PyObject *MovieObj_GetMovieIndTrack(MovieObject *_self, PyObject *_args)
  5616. {
  5617. PyObject *_res = NULL;
  5618. Track _rv;
  5619. long index;
  5620. #ifndef GetMovieIndTrack
  5621. PyMac_PRECHECK(GetMovieIndTrack);
  5622. #endif
  5623. if (!PyArg_ParseTuple(_args, "l",
  5624. &index))
  5625. return NULL;
  5626. _rv = GetMovieIndTrack(_self->ob_itself,
  5627. index);
  5628. _res = Py_BuildValue("O&",
  5629. TrackObj_New, _rv);
  5630. return _res;
  5631. }
  5632. static PyObject *MovieObj_GetMovieIndTrackType(MovieObject *_self, PyObject *_args)
  5633. {
  5634. PyObject *_res = NULL;
  5635. Track _rv;
  5636. long index;
  5637. OSType trackType;
  5638. long flags;
  5639. #ifndef GetMovieIndTrackType
  5640. PyMac_PRECHECK(GetMovieIndTrackType);
  5641. #endif
  5642. if (!PyArg_ParseTuple(_args, "lO&l",
  5643. &index,
  5644. PyMac_GetOSType, &trackType,
  5645. &flags))
  5646. return NULL;
  5647. _rv = GetMovieIndTrackType(_self->ob_itself,
  5648. index,
  5649. trackType,
  5650. flags);
  5651. _res = Py_BuildValue("O&",
  5652. TrackObj_New, _rv);
  5653. return _res;
  5654. }
  5655. static PyObject *MovieObj_NewMovieTrack(MovieObject *_self, PyObject *_args)
  5656. {
  5657. PyObject *_res = NULL;
  5658. Track _rv;
  5659. Fixed width;
  5660. Fixed height;
  5661. short trackVolume;
  5662. #ifndef NewMovieTrack
  5663. PyMac_PRECHECK(NewMovieTrack);
  5664. #endif
  5665. if (!PyArg_ParseTuple(_args, "O&O&h",
  5666. PyMac_GetFixed, &width,
  5667. PyMac_GetFixed, &height,
  5668. &trackVolume))
  5669. return NULL;
  5670. _rv = NewMovieTrack(_self->ob_itself,
  5671. width,
  5672. height,
  5673. trackVolume);
  5674. _res = Py_BuildValue("O&",
  5675. TrackObj_New, _rv);
  5676. return _res;
  5677. }
  5678. static PyObject *MovieObj_SetAutoTrackAlternatesEnabled(MovieObject *_self, PyObject *_args)
  5679. {
  5680. PyObject *_res = NULL;
  5681. Boolean enable;
  5682. #ifndef SetAutoTrackAlternatesEnabled
  5683. PyMac_PRECHECK(SetAutoTrackAlternatesEnabled);
  5684. #endif
  5685. if (!PyArg_ParseTuple(_args, "b",
  5686. &enable))
  5687. return NULL;
  5688. SetAutoTrackAlternatesEnabled(_self->ob_itself,
  5689. enable);
  5690. Py_INCREF(Py_None);
  5691. _res = Py_None;
  5692. return _res;
  5693. }
  5694. static PyObject *MovieObj_SelectMovieAlternates(MovieObject *_self, PyObject *_args)
  5695. {
  5696. PyObject *_res = NULL;
  5697. #ifndef SelectMovieAlternates
  5698. PyMac_PRECHECK(SelectMovieAlternates);
  5699. #endif
  5700. if (!PyArg_ParseTuple(_args, ""))
  5701. return NULL;
  5702. SelectMovieAlternates(_self->ob_itself);
  5703. Py_INCREF(Py_None);
  5704. _res = Py_None;
  5705. return _res;
  5706. }
  5707. static PyObject *MovieObj_InsertMovieSegment(MovieObject *_self, PyObject *_args)
  5708. {
  5709. PyObject *_res = NULL;
  5710. OSErr _err;
  5711. Movie dstMovie;
  5712. TimeValue srcIn;
  5713. TimeValue srcDuration;
  5714. TimeValue dstIn;
  5715. #ifndef InsertMovieSegment
  5716. PyMac_PRECHECK(InsertMovieSegment);
  5717. #endif
  5718. if (!PyArg_ParseTuple(_args, "O&lll",
  5719. MovieObj_Convert, &dstMovie,
  5720. &srcIn,
  5721. &srcDuration,
  5722. &dstIn))
  5723. return NULL;
  5724. _err = InsertMovieSegment(_self->ob_itself,
  5725. dstMovie,
  5726. srcIn,
  5727. srcDuration,
  5728. dstIn);
  5729. if (_err != noErr) return PyMac_Error(_err);
  5730. Py_INCREF(Py_None);
  5731. _res = Py_None;
  5732. return _res;
  5733. }
  5734. static PyObject *MovieObj_InsertEmptyMovieSegment(MovieObject *_self, PyObject *_args)
  5735. {
  5736. PyObject *_res = NULL;
  5737. OSErr _err;
  5738. TimeValue dstIn;
  5739. TimeValue dstDuration;
  5740. #ifndef InsertEmptyMovieSegment
  5741. PyMac_PRECHECK(InsertEmptyMovieSegment);
  5742. #endif
  5743. if (!PyArg_ParseTuple(_args, "ll",
  5744. &dstIn,
  5745. &dstDuration))
  5746. return NULL;
  5747. _err = InsertEmptyMovieSegment(_self->ob_itself,
  5748. dstIn,
  5749. dstDuration);
  5750. if (_err != noErr) return PyMac_Error(_err);
  5751. Py_INCREF(Py_None);
  5752. _res = Py_None;
  5753. return _res;
  5754. }
  5755. static PyObject *MovieObj_DeleteMovieSegment(MovieObject *_self, PyObject *_args)
  5756. {
  5757. PyObject *_res = NULL;
  5758. OSErr _err;
  5759. TimeValue startTime;
  5760. TimeValue duration;
  5761. #ifndef DeleteMovieSegment
  5762. PyMac_PRECHECK(DeleteMovieSegment);
  5763. #endif
  5764. if (!PyArg_ParseTuple(_args, "ll",
  5765. &startTime,
  5766. &duration))
  5767. return NULL;
  5768. _err = DeleteMovieSegment(_self->ob_itself,
  5769. startTime,
  5770. duration);
  5771. if (_err != noErr) return PyMac_Error(_err);
  5772. Py_INCREF(Py_None);
  5773. _res = Py_None;
  5774. return _res;
  5775. }
  5776. static PyObject *MovieObj_ScaleMovieSegment(MovieObject *_self, PyObject *_args)
  5777. {
  5778. PyObject *_res = NULL;
  5779. OSErr _err;
  5780. TimeValue startTime;
  5781. TimeValue oldDuration;
  5782. TimeValue newDuration;
  5783. #ifndef ScaleMovieSegment
  5784. PyMac_PRECHECK(ScaleMovieSegment);
  5785. #endif
  5786. if (!PyArg_ParseTuple(_args, "lll",
  5787. &startTime,
  5788. &oldDuration,
  5789. &newDuration))
  5790. return NULL;
  5791. _err = ScaleMovieSegment(_self->ob_itself,
  5792. startTime,
  5793. oldDuration,
  5794. newDuration);
  5795. if (_err != noErr) return PyMac_Error(_err);
  5796. Py_INCREF(Py_None);
  5797. _res = Py_None;
  5798. return _res;
  5799. }
  5800. static PyObject *MovieObj_CutMovieSelection(MovieObject *_self, PyObject *_args)
  5801. {
  5802. PyObject *_res = NULL;
  5803. Movie _rv;
  5804. #ifndef CutMovieSelection
  5805. PyMac_PRECHECK(CutMovieSelection);
  5806. #endif
  5807. if (!PyArg_ParseTuple(_args, ""))
  5808. return NULL;
  5809. _rv = CutMovieSelection(_self->ob_itself);
  5810. _res = Py_BuildValue("O&",
  5811. MovieObj_New, _rv);
  5812. return _res;
  5813. }
  5814. static PyObject *MovieObj_CopyMovieSelection(MovieObject *_self, PyObject *_args)
  5815. {
  5816. PyObject *_res = NULL;
  5817. Movie _rv;
  5818. #ifndef CopyMovieSelection
  5819. PyMac_PRECHECK(CopyMovieSelection);
  5820. #endif
  5821. if (!PyArg_ParseTuple(_args, ""))
  5822. return NULL;
  5823. _rv = CopyMovieSelection(_self->ob_itself);
  5824. _res = Py_BuildValue("O&",
  5825. MovieObj_New, _rv);
  5826. return _res;
  5827. }
  5828. static PyObject *MovieObj_PasteMovieSelection(MovieObject *_self, PyObject *_args)
  5829. {
  5830. PyObject *_res = NULL;
  5831. Movie src;
  5832. #ifndef PasteMovieSelection
  5833. PyMac_PRECHECK(PasteMovieSelection);
  5834. #endif
  5835. if (!PyArg_ParseTuple(_args, "O&",
  5836. MovieObj_Convert, &src))
  5837. return NULL;
  5838. PasteMovieSelection(_self->ob_itself,
  5839. src);
  5840. Py_INCREF(Py_None);
  5841. _res = Py_None;
  5842. return _res;
  5843. }
  5844. static PyObject *MovieObj_AddMovieSelection(MovieObject *_self, PyObject *_args)
  5845. {
  5846. PyObject *_res = NULL;
  5847. Movie src;
  5848. #ifndef AddMovieSelection
  5849. PyMac_PRECHECK(AddMovieSelection);
  5850. #endif
  5851. if (!PyArg_ParseTuple(_args, "O&",
  5852. MovieObj_Convert, &src))
  5853. return NULL;
  5854. AddMovieSelection(_self->ob_itself,
  5855. src);
  5856. Py_INCREF(Py_None);
  5857. _res = Py_None;
  5858. return _res;
  5859. }
  5860. static PyObject *MovieObj_ClearMovieSelection(MovieObject *_self, PyObject *_args)
  5861. {
  5862. PyObject *_res = NULL;
  5863. #ifndef ClearMovieSelection
  5864. PyMac_PRECHECK(ClearMovieSelection);
  5865. #endif
  5866. if (!PyArg_ParseTuple(_args, ""))
  5867. return NULL;
  5868. ClearMovieSelection(_self->ob_itself);
  5869. Py_INCREF(Py_None);
  5870. _res = Py_None;
  5871. return _res;
  5872. }
  5873. static PyObject *MovieObj_PutMovieIntoTypedHandle(MovieObject *_self, PyObject *_args)
  5874. {
  5875. PyObject *_res = NULL;
  5876. OSErr _err;
  5877. Track targetTrack;
  5878. OSType handleType;
  5879. Handle publicMovie;
  5880. TimeValue start;
  5881. TimeValue dur;
  5882. long flags;
  5883. ComponentInstance userComp;
  5884. #ifndef PutMovieIntoTypedHandle
  5885. PyMac_PRECHECK(PutMovieIntoTypedHandle);
  5886. #endif
  5887. if (!PyArg_ParseTuple(_args, "O&O&O&lllO&",
  5888. TrackObj_Convert, &targetTrack,
  5889. PyMac_GetOSType, &handleType,
  5890. ResObj_Convert, &publicMovie,
  5891. &start,
  5892. &dur,
  5893. &flags,
  5894. CmpInstObj_Convert, &userComp))
  5895. return NULL;
  5896. _err = PutMovieIntoTypedHandle(_self->ob_itself,
  5897. targetTrack,
  5898. handleType,
  5899. publicMovie,
  5900. start,
  5901. dur,
  5902. flags,
  5903. userComp);
  5904. if (_err != noErr) return PyMac_Error(_err);
  5905. Py_INCREF(Py_None);
  5906. _res = Py_None;
  5907. return _res;
  5908. }
  5909. static PyObject *MovieObj_CopyMovieSettings(MovieObject *_self, PyObject *_args)
  5910. {
  5911. PyObject *_res = NULL;
  5912. OSErr _err;
  5913. Movie dstMovie;
  5914. #ifndef CopyMovieSettings
  5915. PyMac_PRECHECK(CopyMovieSettings);
  5916. #endif
  5917. if (!PyArg_ParseTuple(_args, "O&",
  5918. MovieObj_Convert, &dstMovie))
  5919. return NULL;
  5920. _err = CopyMovieSettings(_self->ob_itself,
  5921. dstMovie);
  5922. if (_err != noErr) return PyMac_Error(_err);
  5923. Py_INCREF(Py_None);
  5924. _res = Py_None;
  5925. return _res;
  5926. }
  5927. static PyObject *MovieObj_ConvertMovieToFile(MovieObject *_self, PyObject *_args)
  5928. {
  5929. PyObject *_res = NULL;
  5930. OSErr _err;
  5931. Track onlyTrack;
  5932. FSSpec outputFile;
  5933. OSType fileType;
  5934. OSType creator;
  5935. ScriptCode scriptTag;
  5936. short resID;
  5937. long flags;
  5938. ComponentInstance userComp;
  5939. #ifndef ConvertMovieToFile
  5940. PyMac_PRECHECK(ConvertMovieToFile);
  5941. #endif
  5942. if (!PyArg_ParseTuple(_args, "O&O&O&O&hlO&",
  5943. TrackObj_Convert, &onlyTrack,
  5944. PyMac_GetFSSpec, &outputFile,
  5945. PyMac_GetOSType, &fileType,
  5946. PyMac_GetOSType, &creator,
  5947. &scriptTag,
  5948. &flags,
  5949. CmpInstObj_Convert, &userComp))
  5950. return NULL;
  5951. _err = ConvertMovieToFile(_self->ob_itself,
  5952. onlyTrack,
  5953. &outputFile,
  5954. fileType,
  5955. creator,
  5956. scriptTag,
  5957. &resID,
  5958. flags,
  5959. userComp);
  5960. if (_err != noErr) return PyMac_Error(_err);
  5961. _res = Py_BuildValue("h",
  5962. resID);
  5963. return _res;
  5964. }
  5965. static PyObject *MovieObj_GetMovieDataSize(MovieObject *_self, PyObject *_args)
  5966. {
  5967. PyObject *_res = NULL;
  5968. long _rv;
  5969. TimeValue startTime;
  5970. TimeValue duration;
  5971. #ifndef GetMovieDataSize
  5972. PyMac_PRECHECK(GetMovieDataSize);
  5973. #endif
  5974. if (!PyArg_ParseTuple(_args, "ll",
  5975. &startTime,
  5976. &duration))
  5977. return NULL;
  5978. _rv = GetMovieDataSize(_self->ob_itself,
  5979. startTime,
  5980. duration);
  5981. _res = Py_BuildValue("l",
  5982. _rv);
  5983. return _res;
  5984. }
  5985. static PyObject *MovieObj_GetMovieDataSize64(MovieObject *_self, PyObject *_args)
  5986. {
  5987. PyObject *_res = NULL;
  5988. OSErr _err;
  5989. TimeValue startTime;
  5990. TimeValue duration;
  5991. wide dataSize;
  5992. #ifndef GetMovieDataSize64
  5993. PyMac_PRECHECK(GetMovieDataSize64);
  5994. #endif
  5995. if (!PyArg_ParseTuple(_args, "ll",
  5996. &startTime,
  5997. &duration))
  5998. return NULL;
  5999. _err = GetMovieDataSize64(_self->ob_itself,
  6000. startTime,
  6001. duration,
  6002. &dataSize);
  6003. if (_err != noErr) return PyMac_Error(_err);
  6004. _res = Py_BuildValue("O&",
  6005. PyMac_Buildwide, dataSize);
  6006. return _res;
  6007. }
  6008. static PyObject *MovieObj_PtInMovie(MovieObject *_self, PyObject *_args)
  6009. {
  6010. PyObject *_res = NULL;
  6011. Boolean _rv;
  6012. Point pt;
  6013. #ifndef PtInMovie
  6014. PyMac_PRECHECK(PtInMovie);
  6015. #endif
  6016. if (!PyArg_ParseTuple(_args, "O&",
  6017. PyMac_GetPoint, &pt))
  6018. return NULL;
  6019. _rv = PtInMovie(_self->ob_itself,
  6020. pt);
  6021. _res = Py_BuildValue("b",
  6022. _rv);
  6023. return _res;
  6024. }
  6025. static PyObject *MovieObj_SetMovieLanguage(MovieObject *_self, PyObject *_args)
  6026. {
  6027. PyObject *_res = NULL;
  6028. long language;
  6029. #ifndef SetMovieLanguage
  6030. PyMac_PRECHECK(SetMovieLanguage);
  6031. #endif
  6032. if (!PyArg_ParseTuple(_args, "l",
  6033. &language))
  6034. return NULL;
  6035. SetMovieLanguage(_self->ob_itself,
  6036. language);
  6037. Py_INCREF(Py_None);
  6038. _res = Py_None;
  6039. return _res;
  6040. }
  6041. static PyObject *MovieObj_CopyMovieUserData(MovieObject *_self, PyObject *_args)
  6042. {
  6043. PyObject *_res = NULL;
  6044. OSErr _err;
  6045. Movie dstMovie;
  6046. OSType copyRule;
  6047. #ifndef CopyMovieUserData
  6048. PyMac_PRECHECK(CopyMovieUserData);
  6049. #endif
  6050. if (!PyArg_ParseTuple(_args, "O&O&",
  6051. MovieObj_Convert, &dstMovie,
  6052. PyMac_GetOSType, &copyRule))
  6053. return NULL;
  6054. _err = CopyMovieUserData(_self->ob_itself,
  6055. dstMovie,
  6056. copyRule);
  6057. if (_err != noErr) return PyMac_Error(_err);
  6058. Py_INCREF(Py_None);
  6059. _res = Py_None;
  6060. return _res;
  6061. }
  6062. static PyObject *MovieObj_GetMovieNextInterestingTime(MovieObject *_self, PyObject *_args)
  6063. {
  6064. PyObject *_res = NULL;
  6065. short interestingTimeFlags;
  6066. short numMediaTypes;
  6067. OSType whichMediaTypes;
  6068. TimeValue time;
  6069. Fixed rate;
  6070. TimeValue interestingTime;
  6071. TimeValue interestingDuration;
  6072. #ifndef GetMovieNextInterestingTime
  6073. PyMac_PRECHECK(GetMovieNextInterestingTime);
  6074. #endif
  6075. if (!PyArg_ParseTuple(_args, "hhO&lO&",
  6076. &interestingTimeFlags,
  6077. &numMediaTypes,
  6078. PyMac_GetOSType, &whichMediaTypes,
  6079. &time,
  6080. PyMac_GetFixed, &rate))
  6081. return NULL;
  6082. GetMovieNextInterestingTime(_self->ob_itself,
  6083. interestingTimeFlags,
  6084. numMediaTypes,
  6085. &whichMediaTypes,
  6086. time,
  6087. rate,
  6088. &interestingTime,
  6089. &interestingDuration);
  6090. _res = Py_BuildValue("ll",
  6091. interestingTime,
  6092. interestingDuration);
  6093. return _res;
  6094. }
  6095. static PyObject *MovieObj_AddMovieResource(MovieObject *_self, PyObject *_args)
  6096. {
  6097. PyObject *_res = NULL;
  6098. OSErr _err;
  6099. short resRefNum;
  6100. short resId;
  6101. Str255 resName;
  6102. #ifndef AddMovieResource
  6103. PyMac_PRECHECK(AddMovieResource);
  6104. #endif
  6105. if (!PyArg_ParseTuple(_args, "hO&",
  6106. &resRefNum,
  6107. PyMac_GetStr255, resName))
  6108. return NULL;
  6109. _err = AddMovieResource(_self->ob_itself,
  6110. resRefNum,
  6111. &resId,
  6112. resName);
  6113. if (_err != noErr) return PyMac_Error(_err);
  6114. _res = Py_BuildValue("h",
  6115. resId);
  6116. return _res;
  6117. }
  6118. static PyObject *MovieObj_UpdateMovieResource(MovieObject *_self, PyObject *_args)
  6119. {
  6120. PyObject *_res = NULL;
  6121. OSErr _err;
  6122. short resRefNum;
  6123. short resId;
  6124. Str255 resName;
  6125. #ifndef UpdateMovieResource
  6126. PyMac_PRECHECK(UpdateMovieResource);
  6127. #endif
  6128. if (!PyArg_ParseTuple(_args, "hhO&",
  6129. &resRefNum,
  6130. &resId,
  6131. PyMac_GetStr255, resName))
  6132. return NULL;
  6133. _err = UpdateMovieResource(_self->ob_itself,
  6134. resRefNum,
  6135. resId,
  6136. resName);
  6137. if (_err != noErr) return PyMac_Error(_err);
  6138. Py_INCREF(Py_None);
  6139. _res = Py_None;
  6140. return _res;
  6141. }
  6142. static PyObject *MovieObj_AddMovieToStorage(MovieObject *_self, PyObject *_args)
  6143. {
  6144. PyObject *_res = NULL;
  6145. OSErr _err;
  6146. DataHandler dh;
  6147. #ifndef AddMovieToStorage
  6148. PyMac_PRECHECK(AddMovieToStorage);
  6149. #endif
  6150. if (!PyArg_ParseTuple(_args, "O&",
  6151. CmpInstObj_Convert, &dh))
  6152. return NULL;
  6153. _err = AddMovieToStorage(_self->ob_itself,
  6154. dh);
  6155. if (_err != noErr) return PyMac_Error(_err);
  6156. Py_INCREF(Py_None);
  6157. _res = Py_None;
  6158. return _res;
  6159. }
  6160. static PyObject *MovieObj_UpdateMovieInStorage(MovieObject *_self, PyObject *_args)
  6161. {
  6162. PyObject *_res = NULL;
  6163. OSErr _err;
  6164. DataHandler dh;
  6165. #ifndef UpdateMovieInStorage
  6166. PyMac_PRECHECK(UpdateMovieInStorage);
  6167. #endif
  6168. if (!PyArg_ParseTuple(_args, "O&",
  6169. CmpInstObj_Convert, &dh))
  6170. return NULL;
  6171. _err = UpdateMovieInStorage(_self->ob_itself,
  6172. dh);
  6173. if (_err != noErr) return PyMac_Error(_err);
  6174. Py_INCREF(Py_None);
  6175. _res = Py_None;
  6176. return _res;
  6177. }
  6178. static PyObject *MovieObj_HasMovieChanged(MovieObject *_self, PyObject *_args)
  6179. {
  6180. PyObject *_res = NULL;
  6181. Boolean _rv;
  6182. #ifndef HasMovieChanged
  6183. PyMac_PRECHECK(HasMovieChanged);
  6184. #endif
  6185. if (!PyArg_ParseTuple(_args, ""))
  6186. return NULL;
  6187. _rv = HasMovieChanged(_self->ob_itself);
  6188. _res = Py_BuildValue("b",
  6189. _rv);
  6190. return _res;
  6191. }
  6192. static PyObject *MovieObj_ClearMovieChanged(MovieObject *_self, PyObject *_args)
  6193. {
  6194. PyObject *_res = NULL;
  6195. #ifndef ClearMovieChanged
  6196. PyMac_PRECHECK(ClearMovieChanged);
  6197. #endif
  6198. if (!PyArg_ParseTuple(_args, ""))
  6199. return NULL;
  6200. ClearMovieChanged(_self->ob_itself);
  6201. Py_INCREF(Py_None);
  6202. _res = Py_None;
  6203. return _res;
  6204. }
  6205. static PyObject *MovieObj_SetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
  6206. {
  6207. PyObject *_res = NULL;
  6208. OSErr _err;
  6209. Handle dataRef;
  6210. OSType dataRefType;
  6211. #ifndef SetMovieDefaultDataRef
  6212. PyMac_PRECHECK(SetMovieDefaultDataRef);
  6213. #endif
  6214. if (!PyArg_ParseTuple(_args, "O&O&",
  6215. ResObj_Convert, &dataRef,
  6216. PyMac_GetOSType, &dataRefType))
  6217. return NULL;
  6218. _err = SetMovieDefaultDataRef(_self->ob_itself,
  6219. dataRef,
  6220. dataRefType);
  6221. if (_err != noErr) return PyMac_Error(_err);
  6222. Py_INCREF(Py_None);
  6223. _res = Py_None;
  6224. return _res;
  6225. }
  6226. static PyObject *MovieObj_GetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
  6227. {
  6228. PyObject *_res = NULL;
  6229. OSErr _err;
  6230. Handle dataRef;
  6231. OSType dataRefType;
  6232. #ifndef GetMovieDefaultDataRef
  6233. PyMac_PRECHECK(GetMovieDefaultDataRef);
  6234. #endif
  6235. if (!PyArg_ParseTuple(_args, ""))
  6236. return NULL;
  6237. _err = GetMovieDefaultDataRef(_self->ob_itself,
  6238. &dataRef,
  6239. &dataRefType);
  6240. if (_err != noErr) return PyMac_Error(_err);
  6241. _res = Py_BuildValue("O&O&",
  6242. ResObj_New, dataRef,
  6243. PyMac_BuildOSType, dataRefType);
  6244. return _res;
  6245. }
  6246. static PyObject *MovieObj_SetMovieColorTable(MovieObject *_self, PyObject *_args)
  6247. {
  6248. PyObject *_res = NULL;
  6249. OSErr _err;
  6250. CTabHandle ctab;
  6251. #ifndef SetMovieColorTable
  6252. PyMac_PRECHECK(SetMovieColorTable);
  6253. #endif
  6254. if (!PyArg_ParseTuple(_args, "O&",
  6255. ResObj_Convert, &ctab))
  6256. return NULL;
  6257. _err = SetMovieColorTable(_self->ob_itself,
  6258. ctab);
  6259. if (_err != noErr) return PyMac_Error(_err);
  6260. Py_INCREF(Py_None);
  6261. _res = Py_None;
  6262. return _res;
  6263. }
  6264. static PyObject *MovieObj_GetMovieColorTable(MovieObject *_self, PyObject *_args)
  6265. {
  6266. PyObject *_res = NULL;
  6267. OSErr _err;
  6268. CTabHandle ctab;
  6269. #ifndef GetMovieColorTable
  6270. PyMac_PRECHECK(GetMovieColorTable);
  6271. #endif
  6272. if (!PyArg_ParseTuple(_args, ""))
  6273. return NULL;
  6274. _err = GetMovieColorTable(_self->ob_itself,
  6275. &ctab);
  6276. if (_err != noErr) return PyMac_Error(_err);
  6277. _res = Py_BuildValue("O&",
  6278. ResObj_New, ctab);
  6279. return _res;
  6280. }
  6281. static PyObject *MovieObj_FlattenMovie(MovieObject *_self, PyObject *_args)
  6282. {
  6283. PyObject *_res = NULL;
  6284. long movieFlattenFlags;
  6285. FSSpec theFile;
  6286. OSType creator;
  6287. ScriptCode scriptTag;
  6288. long createMovieFileFlags;
  6289. short resId;
  6290. Str255 resName;
  6291. #ifndef FlattenMovie
  6292. PyMac_PRECHECK(FlattenMovie);
  6293. #endif
  6294. if (!PyArg_ParseTuple(_args, "lO&O&hlO&",
  6295. &movieFlattenFlags,
  6296. PyMac_GetFSSpec, &theFile,
  6297. PyMac_GetOSType, &creator,
  6298. &scriptTag,
  6299. &createMovieFileFlags,
  6300. PyMac_GetStr255, resName))
  6301. return NULL;
  6302. FlattenMovie(_self->ob_itself,
  6303. movieFlattenFlags,
  6304. &theFile,
  6305. creator,
  6306. scriptTag,
  6307. createMovieFileFlags,
  6308. &resId,
  6309. resName);
  6310. _res = Py_BuildValue("h",
  6311. resId);
  6312. return _res;
  6313. }
  6314. static PyObject *MovieObj_FlattenMovieData(MovieObject *_self, PyObject *_args)
  6315. {
  6316. PyObject *_res = NULL;
  6317. Movie _rv;
  6318. long movieFlattenFlags;
  6319. FSSpec theFile;
  6320. OSType creator;
  6321. ScriptCode scriptTag;
  6322. long createMovieFileFlags;
  6323. #ifndef FlattenMovieData
  6324. PyMac_PRECHECK(FlattenMovieData);
  6325. #endif
  6326. if (!PyArg_ParseTuple(_args, "lO&O&hl",
  6327. &movieFlattenFlags,
  6328. PyMac_GetFSSpec, &theFile,
  6329. PyMac_GetOSType, &creator,
  6330. &scriptTag,
  6331. &createMovieFileFlags))
  6332. return NULL;
  6333. _rv = FlattenMovieData(_self->ob_itself,
  6334. movieFlattenFlags,
  6335. &theFile,
  6336. creator,
  6337. scriptTag,
  6338. createMovieFileFlags);
  6339. _res = Py_BuildValue("O&",
  6340. MovieObj_New, _rv);
  6341. return _res;
  6342. }
  6343. static PyObject *MovieObj_FlattenMovieDataToDataRef(MovieObject *_self, PyObject *_args)
  6344. {
  6345. PyObject *_res = NULL;
  6346. Movie _rv;
  6347. long movieFlattenFlags;
  6348. Handle dataRef;
  6349. OSType dataRefType;
  6350. OSType creator;
  6351. ScriptCode scriptTag;
  6352. long createMovieFileFlags;
  6353. #ifndef FlattenMovieDataToDataRef
  6354. PyMac_PRECHECK(FlattenMovieDataToDataRef);
  6355. #endif
  6356. if (!PyArg_ParseTuple(_args, "lO&O&O&hl",
  6357. &movieFlattenFlags,
  6358. ResObj_Convert, &dataRef,
  6359. PyMac_GetOSType, &dataRefType,
  6360. PyMac_GetOSType, &creator,
  6361. &scriptTag,
  6362. &createMovieFileFlags))
  6363. return NULL;
  6364. _rv = FlattenMovieDataToDataRef(_self->ob_itself,
  6365. movieFlattenFlags,
  6366. dataRef,
  6367. dataRefType,
  6368. creator,
  6369. scriptTag,
  6370. createMovieFileFlags);
  6371. _res = Py_BuildValue("O&",
  6372. MovieObj_New, _rv);
  6373. return _res;
  6374. }
  6375. static PyObject *MovieObj_MovieSearchText(MovieObject *_self, PyObject *_args)
  6376. {
  6377. PyObject *_res = NULL;
  6378. OSErr _err;
  6379. Ptr text;
  6380. long size;
  6381. long searchFlags;
  6382. Track searchTrack;
  6383. TimeValue searchTime;
  6384. long searchOffset;
  6385. #ifndef MovieSearchText
  6386. PyMac_PRECHECK(MovieSearchText);
  6387. #endif
  6388. if (!PyArg_ParseTuple(_args, "sll",
  6389. &text,
  6390. &size,
  6391. &searchFlags))
  6392. return NULL;
  6393. _err = MovieSearchText(_self->ob_itself,
  6394. text,
  6395. size,
  6396. searchFlags,
  6397. &searchTrack,
  6398. &searchTime,
  6399. &searchOffset);
  6400. if (_err != noErr) return PyMac_Error(_err);
  6401. _res = Py_BuildValue("O&ll",
  6402. TrackObj_New, searchTrack,
  6403. searchTime,
  6404. searchOffset);
  6405. return _res;
  6406. }
  6407. static PyObject *MovieObj_GetPosterBox(MovieObject *_self, PyObject *_args)
  6408. {
  6409. PyObject *_res = NULL;
  6410. Rect boxRect;
  6411. #ifndef GetPosterBox
  6412. PyMac_PRECHECK(GetPosterBox);
  6413. #endif
  6414. if (!PyArg_ParseTuple(_args, ""))
  6415. return NULL;
  6416. GetPosterBox(_self->ob_itself,
  6417. &boxRect);
  6418. _res = Py_BuildValue("O&",
  6419. PyMac_BuildRect, &boxRect);
  6420. return _res;
  6421. }
  6422. static PyObject *MovieObj_SetPosterBox(MovieObject *_self, PyObject *_args)
  6423. {
  6424. PyObject *_res = NULL;
  6425. Rect boxRect;
  6426. #ifndef SetPosterBox
  6427. PyMac_PRECHECK(SetPosterBox);
  6428. #endif
  6429. if (!PyArg_ParseTuple(_args, "O&",
  6430. PyMac_GetRect, &boxRect))
  6431. return NULL;
  6432. SetPosterBox(_self->ob_itself,
  6433. &boxRect);
  6434. Py_INCREF(Py_None);
  6435. _res = Py_None;
  6436. return _res;
  6437. }
  6438. static PyObject *MovieObj_GetMovieSegmentDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
  6439. {
  6440. PyObject *_res = NULL;
  6441. RgnHandle _rv;
  6442. TimeValue time;
  6443. TimeValue duration;
  6444. #ifndef GetMovieSegmentDisplayBoundsRgn
  6445. PyMac_PRECHECK(GetMovieSegmentDisplayBoundsRgn);
  6446. #endif
  6447. if (!PyArg_ParseTuple(_args, "ll",
  6448. &time,
  6449. &duration))
  6450. return NULL;
  6451. _rv = GetMovieSegmentDisplayBoundsRgn(_self->ob_itself,
  6452. time,
  6453. duration);
  6454. _res = Py_BuildValue("O&",
  6455. ResObj_New, _rv);
  6456. return _res;
  6457. }
  6458. static PyObject *MovieObj_GetMovieStatus(MovieObject *_self, PyObject *_args)
  6459. {
  6460. PyObject *_res = NULL;
  6461. ComponentResult _rv;
  6462. Track firstProblemTrack;
  6463. #ifndef GetMovieStatus
  6464. PyMac_PRECHECK(GetMovieStatus);
  6465. #endif
  6466. if (!PyArg_ParseTuple(_args, ""))
  6467. return NULL;
  6468. _rv = GetMovieStatus(_self->ob_itself,
  6469. &firstProblemTrack);
  6470. _res = Py_BuildValue("lO&",
  6471. _rv,
  6472. TrackObj_New, firstProblemTrack);
  6473. return _res;
  6474. }
  6475. static PyObject *MovieObj_NewMovieController(MovieObject *_self, PyObject *_args)
  6476. {
  6477. PyObject *_res = NULL;
  6478. MovieController _rv;
  6479. Rect movieRect;
  6480. long someFlags;
  6481. #ifndef NewMovieController
  6482. PyMac_PRECHECK(NewMovieController);
  6483. #endif
  6484. if (!PyArg_ParseTuple(_args, "O&l",
  6485. PyMac_GetRect, &movieRect,
  6486. &someFlags))
  6487. return NULL;
  6488. _rv = NewMovieController(_self->ob_itself,
  6489. &movieRect,
  6490. someFlags);
  6491. _res = Py_BuildValue("O&",
  6492. MovieCtlObj_New, _rv);
  6493. return _res;
  6494. }
  6495. static PyObject *MovieObj_PutMovieOnScrap(MovieObject *_self, PyObject *_args)
  6496. {
  6497. PyObject *_res = NULL;
  6498. OSErr _err;
  6499. long movieScrapFlags;
  6500. #ifndef PutMovieOnScrap
  6501. PyMac_PRECHECK(PutMovieOnScrap);
  6502. #endif
  6503. if (!PyArg_ParseTuple(_args, "l",
  6504. &movieScrapFlags))
  6505. return NULL;
  6506. _err = PutMovieOnScrap(_self->ob_itself,
  6507. movieScrapFlags);
  6508. if (_err != noErr) return PyMac_Error(_err);
  6509. Py_INCREF(Py_None);
  6510. _res = Py_None;
  6511. return _res;
  6512. }
  6513. static PyObject *MovieObj_SetMoviePlayHints(MovieObject *_self, PyObject *_args)
  6514. {
  6515. PyObject *_res = NULL;
  6516. long flags;
  6517. long flagsMask;
  6518. #ifndef SetMoviePlayHints
  6519. PyMac_PRECHECK(SetMoviePlayHints);
  6520. #endif
  6521. if (!PyArg_ParseTuple(_args, "ll",
  6522. &flags,
  6523. &flagsMask))
  6524. return NULL;
  6525. SetMoviePlayHints(_self->ob_itself,
  6526. flags,
  6527. flagsMask);
  6528. Py_INCREF(Py_None);
  6529. _res = Py_None;
  6530. return _res;
  6531. }
  6532. static PyObject *MovieObj_GetMaxLoadedTimeInMovie(MovieObject *_self, PyObject *_args)
  6533. {
  6534. PyObject *_res = NULL;
  6535. OSErr _err;
  6536. TimeValue time;
  6537. #ifndef GetMaxLoadedTimeInMovie
  6538. PyMac_PRECHECK(GetMaxLoadedTimeInMovie);
  6539. #endif
  6540. if (!PyArg_ParseTuple(_args, ""))
  6541. return NULL;
  6542. _err = GetMaxLoadedTimeInMovie(_self->ob_itself,
  6543. &time);
  6544. if (_err != noErr) return PyMac_Error(_err);
  6545. _res = Py_BuildValue("l",
  6546. time);
  6547. return _res;
  6548. }
  6549. static PyObject *MovieObj_QTMovieNeedsTimeTable(MovieObject *_self, PyObject *_args)
  6550. {
  6551. PyObject *_res = NULL;
  6552. OSErr _err;
  6553. Boolean needsTimeTable;
  6554. #ifndef QTMovieNeedsTimeTable
  6555. PyMac_PRECHECK(QTMovieNeedsTimeTable);
  6556. #endif
  6557. if (!PyArg_ParseTuple(_args, ""))
  6558. return NULL;
  6559. _err = QTMovieNeedsTimeTable(_self->ob_itself,
  6560. &needsTimeTable);
  6561. if (_err != noErr) return PyMac_Error(_err);
  6562. _res = Py_BuildValue("b",
  6563. needsTimeTable);
  6564. return _res;
  6565. }
  6566. static PyObject *MovieObj_QTGetDataRefMaxFileOffset(MovieObject *_self, PyObject *_args)
  6567. {
  6568. PyObject *_res = NULL;
  6569. OSErr _err;
  6570. OSType dataRefType;
  6571. Handle dataRef;
  6572. long offset;
  6573. #ifndef QTGetDataRefMaxFileOffset
  6574. PyMac_PRECHECK(QTGetDataRefMaxFileOffset);
  6575. #endif
  6576. if (!PyArg_ParseTuple(_args, "O&O&",
  6577. PyMac_GetOSType, &dataRefType,
  6578. ResObj_Convert, &dataRef))
  6579. return NULL;
  6580. _err = QTGetDataRefMaxFileOffset(_self->ob_itself,
  6581. dataRefType,
  6582. dataRef,
  6583. &offset);
  6584. if (_err != noErr) return PyMac_Error(_err);
  6585. _res = Py_BuildValue("l",
  6586. offset);
  6587. return _res;
  6588. }
  6589. static PyMethodDef MovieObj_methods[] = {
  6590. {"MoviesTask", (PyCFunction)MovieObj_MoviesTask, 1,
  6591. PyDoc_STR("(long maxMilliSecToUse) -> None")},
  6592. {"PrerollMovie", (PyCFunction)MovieObj_PrerollMovie, 1,
  6593. PyDoc_STR("(TimeValue time, Fixed Rate) -> None")},
  6594. {"AbortPrePrerollMovie", (PyCFunction)MovieObj_AbortPrePrerollMovie, 1,
  6595. PyDoc_STR("(OSErr err) -> None")},
  6596. {"LoadMovieIntoRam", (PyCFunction)MovieObj_LoadMovieIntoRam, 1,
  6597. PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
  6598. {"SetMovieActive", (PyCFunction)MovieObj_SetMovieActive, 1,
  6599. PyDoc_STR("(Boolean active) -> None")},
  6600. {"GetMovieActive", (PyCFunction)MovieObj_GetMovieActive, 1,
  6601. PyDoc_STR("() -> (Boolean _rv)")},
  6602. {"StartMovie", (PyCFunction)MovieObj_StartMovie, 1,
  6603. PyDoc_STR("() -> None")},
  6604. {"StopMovie", (PyCFunction)MovieObj_StopMovie, 1,
  6605. PyDoc_STR("() -> None")},
  6606. {"GoToBeginningOfMovie", (PyCFunction)MovieObj_GoToBeginningOfMovie, 1,
  6607. PyDoc_STR("() -> None")},
  6608. {"GoToEndOfMovie", (PyCFunction)MovieObj_GoToEndOfMovie, 1,
  6609. PyDoc_STR("() -> None")},
  6610. {"IsMovieDone", (PyCFunction)MovieObj_IsMovieDone, 1,
  6611. PyDoc_STR("() -> (Boolean _rv)")},
  6612. {"GetMoviePreviewMode", (PyCFunction)MovieObj_GetMoviePreviewMode, 1,
  6613. PyDoc_STR("() -> (Boolean _rv)")},
  6614. {"SetMoviePreviewMode", (PyCFunction)MovieObj_SetMoviePreviewMode, 1,
  6615. PyDoc_STR("(Boolean usePreview) -> None")},
  6616. {"ShowMoviePoster", (PyCFunction)MovieObj_ShowMoviePoster, 1,
  6617. PyDoc_STR("() -> None")},
  6618. {"GetMovieTimeBase", (PyCFunction)MovieObj_GetMovieTimeBase, 1,
  6619. PyDoc_STR("() -> (TimeBase _rv)")},
  6620. {"SetMovieMasterTimeBase", (PyCFunction)MovieObj_SetMovieMasterTimeBase, 1,
  6621. PyDoc_STR("(TimeBase tb, TimeRecord slaveZero) -> None")},
  6622. {"SetMovieMasterClock", (PyCFunction)MovieObj_SetMovieMasterClock, 1,
  6623. PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
  6624. {"ChooseMovieClock", (PyCFunction)MovieObj_ChooseMovieClock, 1,
  6625. PyDoc_STR("(long flags) -> None")},
  6626. {"GetMovieGWorld", (PyCFunction)MovieObj_GetMovieGWorld, 1,
  6627. PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
  6628. {"SetMovieGWorld", (PyCFunction)MovieObj_SetMovieGWorld, 1,
  6629. PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
  6630. {"GetMovieNaturalBoundsRect", (PyCFunction)MovieObj_GetMovieNaturalBoundsRect, 1,
  6631. PyDoc_STR("() -> (Rect naturalBounds)")},
  6632. {"GetNextTrackForCompositing", (PyCFunction)MovieObj_GetNextTrackForCompositing, 1,
  6633. PyDoc_STR("(Track theTrack) -> (Track _rv)")},
  6634. {"GetPrevTrackForCompositing", (PyCFunction)MovieObj_GetPrevTrackForCompositing, 1,
  6635. PyDoc_STR("(Track theTrack) -> (Track _rv)")},
  6636. {"GetMoviePict", (PyCFunction)MovieObj_GetMoviePict, 1,
  6637. PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
  6638. {"GetMoviePosterPict", (PyCFunction)MovieObj_GetMoviePosterPict, 1,
  6639. PyDoc_STR("() -> (PicHandle _rv)")},
  6640. {"UpdateMovie", (PyCFunction)MovieObj_UpdateMovie, 1,
  6641. PyDoc_STR("() -> None")},
  6642. {"InvalidateMovieRegion", (PyCFunction)MovieObj_InvalidateMovieRegion, 1,
  6643. PyDoc_STR("(RgnHandle invalidRgn) -> None")},
  6644. {"GetMovieBox", (PyCFunction)MovieObj_GetMovieBox, 1,
  6645. PyDoc_STR("() -> (Rect boxRect)")},
  6646. {"SetMovieBox", (PyCFunction)MovieObj_SetMovieBox, 1,
  6647. PyDoc_STR("(Rect boxRect) -> None")},
  6648. {"GetMovieDisplayClipRgn", (PyCFunction)MovieObj_GetMovieDisplayClipRgn, 1,
  6649. PyDoc_STR("() -> (RgnHandle _rv)")},
  6650. {"SetMovieDisplayClipRgn", (PyCFunction)MovieObj_SetMovieDisplayClipRgn, 1,
  6651. PyDoc_STR("(RgnHandle theClip) -> None")},
  6652. {"GetMovieClipRgn", (PyCFunction)MovieObj_GetMovieClipRgn, 1,
  6653. PyDoc_STR("() -> (RgnHandle _rv)")},
  6654. {"SetMovieClipRgn", (PyCFunction)MovieObj_SetMovieClipRgn, 1,
  6655. PyDoc_STR("(RgnHandle theClip) -> None")},
  6656. {"GetMovieDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieDisplayBoundsRgn, 1,
  6657. PyDoc_STR("() -> (RgnHandle _rv)")},
  6658. {"GetMovieBoundsRgn", (PyCFunction)MovieObj_GetMovieBoundsRgn, 1,
  6659. PyDoc_STR("() -> (RgnHandle _rv)")},
  6660. {"SetMovieVideoOutput", (PyCFunction)MovieObj_SetMovieVideoOutput, 1,
  6661. PyDoc_STR("(ComponentInstance vout) -> None")},
  6662. {"PutMovieIntoHandle", (PyCFunction)MovieObj_PutMovieIntoHandle, 1,
  6663. PyDoc_STR("(Handle publicMovie) -> None")},
  6664. {"PutMovieIntoDataFork", (PyCFunction)MovieObj_PutMovieIntoDataFork, 1,
  6665. PyDoc_STR("(short fRefNum, long offset, long maxSize) -> None")},
  6666. {"PutMovieIntoDataFork64", (PyCFunction)MovieObj_PutMovieIntoDataFork64, 1,
  6667. PyDoc_STR("(long fRefNum, wide offset, unsigned long maxSize) -> None")},
  6668. {"PutMovieIntoStorage", (PyCFunction)MovieObj_PutMovieIntoStorage, 1,
  6669. PyDoc_STR("(DataHandler dh, wide offset, unsigned long maxSize) -> None")},
  6670. {"PutMovieForDataRefIntoHandle", (PyCFunction)MovieObj_PutMovieForDataRefIntoHandle, 1,
  6671. PyDoc_STR("(Handle dataRef, OSType dataRefType, Handle publicMovie) -> None")},
  6672. {"GetMovieCreationTime", (PyCFunction)MovieObj_GetMovieCreationTime, 1,
  6673. PyDoc_STR("() -> (unsigned long _rv)")},
  6674. {"GetMovieModificationTime", (PyCFunction)MovieObj_GetMovieModificationTime, 1,
  6675. PyDoc_STR("() -> (unsigned long _rv)")},
  6676. {"GetMovieTimeScale", (PyCFunction)MovieObj_GetMovieTimeScale, 1,
  6677. PyDoc_STR("() -> (TimeScale _rv)")},
  6678. {"SetMovieTimeScale", (PyCFunction)MovieObj_SetMovieTimeScale, 1,
  6679. PyDoc_STR("(TimeScale timeScale) -> None")},
  6680. {"GetMovieDuration", (PyCFunction)MovieObj_GetMovieDuration, 1,
  6681. PyDoc_STR("() -> (TimeValue _rv)")},
  6682. {"GetMovieRate", (PyCFunction)MovieObj_GetMovieRate, 1,
  6683. PyDoc_STR("() -> (Fixed _rv)")},
  6684. {"SetMovieRate", (PyCFunction)MovieObj_SetMovieRate, 1,
  6685. PyDoc_STR("(Fixed rate) -> None")},
  6686. {"GetMoviePreferredRate", (PyCFunction)MovieObj_GetMoviePreferredRate, 1,
  6687. PyDoc_STR("() -> (Fixed _rv)")},
  6688. {"SetMoviePreferredRate", (PyCFunction)MovieObj_SetMoviePreferredRate, 1,
  6689. PyDoc_STR("(Fixed rate) -> None")},
  6690. {"GetMoviePreferredVolume", (PyCFunction)MovieObj_GetMoviePreferredVolume, 1,
  6691. PyDoc_STR("() -> (short _rv)")},
  6692. {"SetMoviePreferredVolume", (PyCFunction)MovieObj_SetMoviePreferredVolume, 1,
  6693. PyDoc_STR("(short volume) -> None")},
  6694. {"GetMovieVolume", (PyCFunction)MovieObj_GetMovieVolume, 1,
  6695. PyDoc_STR("() -> (short _rv)")},
  6696. {"SetMovieVolume", (PyCFunction)MovieObj_SetMovieVolume, 1,
  6697. PyDoc_STR("(short volume) -> None")},
  6698. {"GetMoviePreviewTime", (PyCFunction)MovieObj_GetMoviePreviewTime, 1,
  6699. PyDoc_STR("() -> (TimeValue previewTime, TimeValue previewDuration)")},
  6700. {"SetMoviePreviewTime", (PyCFunction)MovieObj_SetMoviePreviewTime, 1,
  6701. PyDoc_STR("(TimeValue previewTime, TimeValue previewDuration) -> None")},
  6702. {"GetMoviePosterTime", (PyCFunction)MovieObj_GetMoviePosterTime, 1,
  6703. PyDoc_STR("() -> (TimeValue _rv)")},
  6704. {"SetMoviePosterTime", (PyCFunction)MovieObj_SetMoviePosterTime, 1,
  6705. PyDoc_STR("(TimeValue posterTime) -> None")},
  6706. {"GetMovieSelection", (PyCFunction)MovieObj_GetMovieSelection, 1,
  6707. PyDoc_STR("() -> (TimeValue selectionTime, TimeValue selectionDuration)")},
  6708. {"SetMovieSelection", (PyCFunction)MovieObj_SetMovieSelection, 1,
  6709. PyDoc_STR("(TimeValue selectionTime, TimeValue selectionDuration) -> None")},
  6710. {"SetMovieActiveSegment", (PyCFunction)MovieObj_SetMovieActiveSegment, 1,
  6711. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
  6712. {"GetMovieActiveSegment", (PyCFunction)MovieObj_GetMovieActiveSegment, 1,
  6713. PyDoc_STR("() -> (TimeValue startTime, TimeValue duration)")},
  6714. {"GetMovieTime", (PyCFunction)MovieObj_GetMovieTime, 1,
  6715. PyDoc_STR("() -> (TimeValue _rv, TimeRecord currentTime)")},
  6716. {"SetMovieTime", (PyCFunction)MovieObj_SetMovieTime, 1,
  6717. PyDoc_STR("(TimeRecord newtime) -> None")},
  6718. {"SetMovieTimeValue", (PyCFunction)MovieObj_SetMovieTimeValue, 1,
  6719. PyDoc_STR("(TimeValue newtime) -> None")},
  6720. {"GetMovieUserData", (PyCFunction)MovieObj_GetMovieUserData, 1,
  6721. PyDoc_STR("() -> (UserData _rv)")},
  6722. {"GetMovieTrackCount", (PyCFunction)MovieObj_GetMovieTrackCount, 1,
  6723. PyDoc_STR("() -> (long _rv)")},
  6724. {"GetMovieTrack", (PyCFunction)MovieObj_GetMovieTrack, 1,
  6725. PyDoc_STR("(long trackID) -> (Track _rv)")},
  6726. {"GetMovieIndTrack", (PyCFunction)MovieObj_GetMovieIndTrack, 1,
  6727. PyDoc_STR("(long index) -> (Track _rv)")},
  6728. {"GetMovieIndTrackType", (PyCFunction)MovieObj_GetMovieIndTrackType, 1,
  6729. PyDoc_STR("(long index, OSType trackType, long flags) -> (Track _rv)")},
  6730. {"NewMovieTrack", (PyCFunction)MovieObj_NewMovieTrack, 1,
  6731. PyDoc_STR("(Fixed width, Fixed height, short trackVolume) -> (Track _rv)")},
  6732. {"SetAutoTrackAlternatesEnabled", (PyCFunction)MovieObj_SetAutoTrackAlternatesEnabled, 1,
  6733. PyDoc_STR("(Boolean enable) -> None")},
  6734. {"SelectMovieAlternates", (PyCFunction)MovieObj_SelectMovieAlternates, 1,
  6735. PyDoc_STR("() -> None")},
  6736. {"InsertMovieSegment", (PyCFunction)MovieObj_InsertMovieSegment, 1,
  6737. PyDoc_STR("(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
  6738. {"InsertEmptyMovieSegment", (PyCFunction)MovieObj_InsertEmptyMovieSegment, 1,
  6739. PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
  6740. {"DeleteMovieSegment", (PyCFunction)MovieObj_DeleteMovieSegment, 1,
  6741. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
  6742. {"ScaleMovieSegment", (PyCFunction)MovieObj_ScaleMovieSegment, 1,
  6743. PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
  6744. {"CutMovieSelection", (PyCFunction)MovieObj_CutMovieSelection, 1,
  6745. PyDoc_STR("() -> (Movie _rv)")},
  6746. {"CopyMovieSelection", (PyCFunction)MovieObj_CopyMovieSelection, 1,
  6747. PyDoc_STR("() -> (Movie _rv)")},
  6748. {"PasteMovieSelection", (PyCFunction)MovieObj_PasteMovieSelection, 1,
  6749. PyDoc_STR("(Movie src) -> None")},
  6750. {"AddMovieSelection", (PyCFunction)MovieObj_AddMovieSelection, 1,
  6751. PyDoc_STR("(Movie src) -> None")},
  6752. {"ClearMovieSelection", (PyCFunction)MovieObj_ClearMovieSelection, 1,
  6753. PyDoc_STR("() -> None")},
  6754. {"PutMovieIntoTypedHandle", (PyCFunction)MovieObj_PutMovieIntoTypedHandle, 1,
  6755. PyDoc_STR("(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None")},
  6756. {"CopyMovieSettings", (PyCFunction)MovieObj_CopyMovieSettings, 1,
  6757. PyDoc_STR("(Movie dstMovie) -> None")},
  6758. {"ConvertMovieToFile", (PyCFunction)MovieObj_ConvertMovieToFile, 1,
  6759. PyDoc_STR("(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)")},
  6760. {"GetMovieDataSize", (PyCFunction)MovieObj_GetMovieDataSize, 1,
  6761. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
  6762. {"GetMovieDataSize64", (PyCFunction)MovieObj_GetMovieDataSize64, 1,
  6763. PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
  6764. {"PtInMovie", (PyCFunction)MovieObj_PtInMovie, 1,
  6765. PyDoc_STR("(Point pt) -> (Boolean _rv)")},
  6766. {"SetMovieLanguage", (PyCFunction)MovieObj_SetMovieLanguage, 1,
  6767. PyDoc_STR("(long language) -> None")},
  6768. {"CopyMovieUserData", (PyCFunction)MovieObj_CopyMovieUserData, 1,
  6769. PyDoc_STR("(Movie dstMovie, OSType copyRule) -> None")},
  6770. {"GetMovieNextInterestingTime", (PyCFunction)MovieObj_GetMovieNextInterestingTime, 1,
  6771. PyDoc_STR("(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
  6772. {"AddMovieResource", (PyCFunction)MovieObj_AddMovieResource, 1,
  6773. PyDoc_STR("(short resRefNum, Str255 resName) -> (short resId)")},
  6774. {"UpdateMovieResource", (PyCFunction)MovieObj_UpdateMovieResource, 1,
  6775. PyDoc_STR("(short resRefNum, short resId, Str255 resName) -> None")},
  6776. {"AddMovieToStorage", (PyCFunction)MovieObj_AddMovieToStorage, 1,
  6777. PyDoc_STR("(DataHandler dh) -> None")},
  6778. {"UpdateMovieInStorage", (PyCFunction)MovieObj_UpdateMovieInStorage, 1,
  6779. PyDoc_STR("(DataHandler dh) -> None")},
  6780. {"HasMovieChanged", (PyCFunction)MovieObj_HasMovieChanged, 1,
  6781. PyDoc_STR("() -> (Boolean _rv)")},
  6782. {"ClearMovieChanged", (PyCFunction)MovieObj_ClearMovieChanged, 1,
  6783. PyDoc_STR("() -> None")},
  6784. {"SetMovieDefaultDataRef", (PyCFunction)MovieObj_SetMovieDefaultDataRef, 1,
  6785. PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
  6786. {"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
  6787. PyDoc_STR("() -> (Handle dataRef, OSType dataRefType)")},
  6788. {"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
  6789. PyDoc_STR("(CTabHandle ctab) -> None")},
  6790. {"GetMovieColorTable", (PyCFunction)MovieObj_GetMovieColorTable, 1,
  6791. PyDoc_STR("() -> (CTabHandle ctab)")},
  6792. {"FlattenMovie", (PyCFunction)MovieObj_FlattenMovie, 1,
  6793. PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)")},
  6794. {"FlattenMovieData", (PyCFunction)MovieObj_FlattenMovieData, 1,
  6795. PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
  6796. {"FlattenMovieDataToDataRef", (PyCFunction)MovieObj_FlattenMovieDataToDataRef, 1,
  6797. PyDoc_STR("(long movieFlattenFlags, Handle dataRef, OSType dataRefType, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
  6798. {"MovieSearchText", (PyCFunction)MovieObj_MovieSearchText, 1,
  6799. PyDoc_STR("(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)")},
  6800. {"GetPosterBox", (PyCFunction)MovieObj_GetPosterBox, 1,
  6801. PyDoc_STR("() -> (Rect boxRect)")},
  6802. {"SetPosterBox", (PyCFunction)MovieObj_SetPosterBox, 1,
  6803. PyDoc_STR("(Rect boxRect) -> None")},
  6804. {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieSegmentDisplayBoundsRgn, 1,
  6805. PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
  6806. {"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
  6807. PyDoc_STR("() -> (ComponentResult _rv, Track firstProblemTrack)")},
  6808. {"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
  6809. PyDoc_STR("(Rect movieRect, long someFlags) -> (MovieController _rv)")},
  6810. {"PutMovieOnScrap", (PyCFunction)MovieObj_PutMovieOnScrap, 1,
  6811. PyDoc_STR("(long movieScrapFlags) -> None")},
  6812. {"SetMoviePlayHints", (PyCFunction)MovieObj_SetMoviePlayHints, 1,
  6813. PyDoc_STR("(long flags, long flagsMask) -> None")},
  6814. {"GetMaxLoadedTimeInMovie", (PyCFunction)MovieObj_GetMaxLoadedTimeInMovie, 1,
  6815. PyDoc_STR("() -> (TimeValue time)")},
  6816. {"QTMovieNeedsTimeTable", (PyCFunction)MovieObj_QTMovieNeedsTimeTable, 1,
  6817. PyDoc_STR("() -> (Boolean needsTimeTable)")},
  6818. {"QTGetDataRefMaxFileOffset", (PyCFunction)MovieObj_QTGetDataRefMaxFileOffset, 1,
  6819. PyDoc_STR("(OSType dataRefType, Handle dataRef) -> (long offset)")},
  6820. {NULL, NULL, 0}
  6821. };
  6822. #define MovieObj_getsetlist NULL
  6823. #define MovieObj_compare NULL
  6824. #define MovieObj_repr NULL
  6825. #define MovieObj_hash NULL
  6826. #define MovieObj_tp_init 0
  6827. #define MovieObj_tp_alloc PyType_GenericAlloc
  6828. static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  6829. {
  6830. PyObject *_self;
  6831. Movie itself;
  6832. char *kw[] = {"itself", 0};
  6833. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MovieObj_Convert, &itself)) return NULL;
  6834. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  6835. ((MovieObject *)_self)->ob_itself = itself;
  6836. return _self;
  6837. }
  6838. #define MovieObj_tp_free PyObject_Del
  6839. PyTypeObject Movie_Type = {
  6840. PyObject_HEAD_INIT(NULL)
  6841. 0, /*ob_size*/
  6842. "_Qt.Movie", /*tp_name*/
  6843. sizeof(MovieObject), /*tp_basicsize*/
  6844. 0, /*tp_itemsize*/
  6845. /* methods */
  6846. (destructor) MovieObj_dealloc, /*tp_dealloc*/
  6847. 0, /*tp_print*/
  6848. (getattrfunc)0, /*tp_getattr*/
  6849. (setattrfunc)0, /*tp_setattr*/
  6850. (cmpfunc) MovieObj_compare, /*tp_compare*/
  6851. (reprfunc) MovieObj_repr, /*tp_repr*/
  6852. (PyNumberMethods *)0, /* tp_as_number */
  6853. (PySequenceMethods *)0, /* tp_as_sequence */
  6854. (PyMappingMethods *)0, /* tp_as_mapping */
  6855. (hashfunc) MovieObj_hash, /*tp_hash*/
  6856. 0, /*tp_call*/
  6857. 0, /*tp_str*/
  6858. PyObject_GenericGetAttr, /*tp_getattro*/
  6859. PyObject_GenericSetAttr, /*tp_setattro */
  6860. 0, /*tp_as_buffer*/
  6861. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  6862. 0, /*tp_doc*/
  6863. 0, /*tp_traverse*/
  6864. 0, /*tp_clear*/
  6865. 0, /*tp_richcompare*/
  6866. 0, /*tp_weaklistoffset*/
  6867. 0, /*tp_iter*/
  6868. 0, /*tp_iternext*/
  6869. MovieObj_methods, /* tp_methods */
  6870. 0, /*tp_members*/
  6871. MovieObj_getsetlist, /*tp_getset*/
  6872. 0, /*tp_base*/
  6873. 0, /*tp_dict*/
  6874. 0, /*tp_descr_get*/
  6875. 0, /*tp_descr_set*/
  6876. 0, /*tp_dictoffset*/
  6877. MovieObj_tp_init, /* tp_init */
  6878. MovieObj_tp_alloc, /* tp_alloc */
  6879. MovieObj_tp_new, /* tp_new */
  6880. MovieObj_tp_free, /* tp_free */
  6881. };
  6882. /* --------------------- End object type Movie ---------------------- */
  6883. /* ---------------------- Object type SGOutput ---------------------- */
  6884. PyTypeObject SGOutput_Type;
  6885. #define SGOutputObj_Check(x) ((x)->ob_type == &SGOutput_Type || PyObject_TypeCheck((x), &SGOutput_Type))
  6886. typedef struct SGOutputObject {
  6887. PyObject_HEAD
  6888. SGOutput ob_itself;
  6889. } SGOutputObject;
  6890. PyObject *SGOutputObj_New(SGOutput itself)
  6891. {
  6892. SGOutputObject *it;
  6893. if (itself == NULL) {
  6894. PyErr_SetString(Qt_Error,"Cannot create SGOutput from NULL pointer");
  6895. return NULL;
  6896. }
  6897. it = PyObject_NEW(SGOutputObject, &SGOutput_Type);
  6898. if (it == NULL) return NULL;
  6899. it->ob_itself = itself;
  6900. return (PyObject *)it;
  6901. }
  6902. int SGOutputObj_Convert(PyObject *v, SGOutput *p_itself)
  6903. {
  6904. if (v == Py_None)
  6905. {
  6906. *p_itself = NULL;
  6907. return 1;
  6908. }
  6909. if (!SGOutputObj_Check(v))
  6910. {
  6911. PyErr_SetString(PyExc_TypeError, "SGOutput required");
  6912. return 0;
  6913. }
  6914. *p_itself = ((SGOutputObject *)v)->ob_itself;
  6915. return 1;
  6916. }
  6917. static void SGOutputObj_dealloc(SGOutputObject *self)
  6918. {
  6919. /* Cleanup of self->ob_itself goes here */
  6920. self->ob_type->tp_free((PyObject *)self);
  6921. }
  6922. static PyMethodDef SGOutputObj_methods[] = {
  6923. {NULL, NULL, 0}
  6924. };
  6925. #define SGOutputObj_getsetlist NULL
  6926. #define SGOutputObj_compare NULL
  6927. #define SGOutputObj_repr NULL
  6928. #define SGOutputObj_hash NULL
  6929. #define SGOutputObj_tp_init 0
  6930. #define SGOutputObj_tp_alloc PyType_GenericAlloc
  6931. static PyObject *SGOutputObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
  6932. {
  6933. PyObject *_self;
  6934. SGOutput itself;
  6935. char *kw[] = {"itself", 0};
  6936. if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, SGOutputObj_Convert, &itself)) return NULL;
  6937. if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
  6938. ((SGOutputObject *)_self)->ob_itself = itself;
  6939. return _self;
  6940. }
  6941. #define SGOutputObj_tp_free PyObject_Del
  6942. PyTypeObject SGOutput_Type = {
  6943. PyObject_HEAD_INIT(NULL)
  6944. 0, /*ob_size*/
  6945. "_Qt.SGOutput", /*tp_name*/
  6946. sizeof(SGOutputObject), /*tp_basicsize*/
  6947. 0, /*tp_itemsize*/
  6948. /* methods */
  6949. (destructor) SGOutputObj_dealloc, /*tp_dealloc*/
  6950. 0, /*tp_print*/
  6951. (getattrfunc)0, /*tp_getattr*/
  6952. (setattrfunc)0, /*tp_setattr*/
  6953. (cmpfunc) SGOutputObj_compare, /*tp_compare*/
  6954. (reprfunc) SGOutputObj_repr, /*tp_repr*/
  6955. (PyNumberMethods *)0, /* tp_as_number */
  6956. (PySequenceMethods *)0, /* tp_as_sequence */
  6957. (PyMappingMethods *)0, /* tp_as_mapping */
  6958. (hashfunc) SGOutputObj_hash, /*tp_hash*/
  6959. 0, /*tp_call*/
  6960. 0, /*tp_str*/
  6961. PyObject_GenericGetAttr, /*tp_getattro*/
  6962. PyObject_GenericSetAttr, /*tp_setattro */
  6963. 0, /*tp_as_buffer*/
  6964. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
  6965. 0, /*tp_doc*/
  6966. 0, /*tp_traverse*/
  6967. 0, /*tp_clear*/
  6968. 0, /*tp_richcompare*/
  6969. 0, /*tp_weaklistoffset*/
  6970. 0, /*tp_iter*/
  6971. 0, /*tp_iternext*/
  6972. SGOutputObj_methods, /* tp_methods */
  6973. 0, /*tp_members*/
  6974. SGOutputObj_getsetlist, /*tp_getset*/
  6975. 0, /*tp_base*/
  6976. 0, /*tp_dict*/
  6977. 0, /*tp_descr_get*/
  6978. 0, /*tp_descr_set*/
  6979. 0, /*tp_dictoffset*/
  6980. SGOutputObj_tp_init, /* tp_init */
  6981. SGOutputObj_tp_alloc, /* tp_alloc */
  6982. SGOutputObj_tp_new, /* tp_new */
  6983. SGOutputObj_tp_free, /* tp_free */
  6984. };
  6985. /* -------------------- End object type SGOutput -------------------- */
  6986. static PyObject *Qt_EnterMovies(PyObject *_self, PyObject *_args)
  6987. {
  6988. PyObject *_res = NULL;
  6989. OSErr _err;
  6990. #ifndef EnterMovies
  6991. PyMac_PRECHECK(EnterMovies);
  6992. #endif
  6993. if (!PyArg_ParseTuple(_args, ""))
  6994. return NULL;
  6995. _err = EnterMovies();
  6996. if (_err != noErr) return PyMac_Error(_err);
  6997. Py_INCREF(Py_None);
  6998. _res = Py_None;
  6999. return _res;
  7000. }
  7001. static PyObject *Qt_ExitMovies(PyObject *_self, PyObject *_args)
  7002. {
  7003. PyObject *_res = NULL;
  7004. #ifndef ExitMovies
  7005. PyMac_PRECHECK(ExitMovies);
  7006. #endif
  7007. if (!PyArg_ParseTuple(_args, ""))
  7008. return NULL;
  7009. ExitMovies();
  7010. Py_INCREF(Py_None);
  7011. _res = Py_None;
  7012. return _res;
  7013. }
  7014. static PyObject *Qt_GetMoviesError(PyObject *_self, PyObject *_args)
  7015. {
  7016. PyObject *_res = NULL;
  7017. OSErr _err;
  7018. #ifndef GetMoviesError
  7019. PyMac_PRECHECK(GetMoviesError);
  7020. #endif
  7021. if (!PyArg_ParseTuple(_args, ""))
  7022. return NULL;
  7023. _err = GetMoviesError();
  7024. if (_err != noErr) return PyMac_Error(_err);
  7025. Py_INCREF(Py_None);
  7026. _res = Py_None;
  7027. return _res;
  7028. }
  7029. static PyObject *Qt_ClearMoviesStickyError(PyObject *_self, PyObject *_args)
  7030. {
  7031. PyObject *_res = NULL;
  7032. #ifndef ClearMoviesStickyError
  7033. PyMac_PRECHECK(ClearMoviesStickyError);
  7034. #endif
  7035. if (!PyArg_ParseTuple(_args, ""))
  7036. return NULL;
  7037. ClearMoviesStickyError();
  7038. Py_INCREF(Py_None);
  7039. _res = Py_None;
  7040. return _res;
  7041. }
  7042. static PyObject *Qt_GetMoviesStickyError(PyObject *_self, PyObject *_args)
  7043. {
  7044. PyObject *_res = NULL;
  7045. OSErr _err;
  7046. #ifndef GetMoviesStickyError
  7047. PyMac_PRECHECK(GetMoviesStickyError);
  7048. #endif
  7049. if (!PyArg_ParseTuple(_args, ""))
  7050. return NULL;
  7051. _err = GetMoviesStickyError();
  7052. if (_err != noErr) return PyMac_Error(_err);
  7053. Py_INCREF(Py_None);
  7054. _res = Py_None;
  7055. return _res;
  7056. }
  7057. static PyObject *Qt_QTGetWallClockTimeBase(PyObject *_self, PyObject *_args)
  7058. {
  7059. PyObject *_res = NULL;
  7060. OSErr _err;
  7061. TimeBase wallClockTimeBase;
  7062. #ifndef QTGetWallClockTimeBase
  7063. PyMac_PRECHECK(QTGetWallClockTimeBase);
  7064. #endif
  7065. if (!PyArg_ParseTuple(_args, ""))
  7066. return NULL;
  7067. _err = QTGetWallClockTimeBase(&wallClockTimeBase);
  7068. if (_err != noErr) return PyMac_Error(_err);
  7069. _res = Py_BuildValue("O&",
  7070. TimeBaseObj_New, wallClockTimeBase);
  7071. return _res;
  7072. }
  7073. static PyObject *Qt_QTIdleManagerOpen(PyObject *_self, PyObject *_args)
  7074. {
  7075. PyObject *_res = NULL;
  7076. IdleManager _rv;
  7077. #ifndef QTIdleManagerOpen
  7078. PyMac_PRECHECK(QTIdleManagerOpen);
  7079. #endif
  7080. if (!PyArg_ParseTuple(_args, ""))
  7081. return NULL;
  7082. _rv = QTIdleManagerOpen();
  7083. _res = Py_BuildValue("O&",
  7084. IdleManagerObj_New, _rv);
  7085. return _res;
  7086. }
  7087. static PyObject *Qt_CreateMovieControl(PyObject *_self, PyObject *_args)
  7088. {
  7089. PyObject *_res = NULL;
  7090. OSErr _err;
  7091. WindowPtr theWindow;
  7092. Rect localRect;
  7093. Movie theMovie;
  7094. UInt32 options;
  7095. ControlHandle returnedControl;
  7096. #ifndef CreateMovieControl
  7097. PyMac_PRECHECK(CreateMovieControl);
  7098. #endif
  7099. if (!PyArg_ParseTuple(_args, "O&O&l",
  7100. WinObj_Convert, &theWindow,
  7101. MovieObj_Convert, &theMovie,
  7102. &options))
  7103. return NULL;
  7104. _err = CreateMovieControl(theWindow,
  7105. &localRect,
  7106. theMovie,
  7107. options,
  7108. &returnedControl);
  7109. if (_err != noErr) return PyMac_Error(_err);
  7110. _res = Py_BuildValue("O&O&",
  7111. PyMac_BuildRect, &localRect,
  7112. CtlObj_New, returnedControl);
  7113. return _res;
  7114. }
  7115. static PyObject *Qt_DisposeMatte(PyObject *_self, PyObject *_args)
  7116. {
  7117. PyObject *_res = NULL;
  7118. PixMapHandle theMatte;
  7119. #ifndef DisposeMatte
  7120. PyMac_PRECHECK(DisposeMatte);
  7121. #endif
  7122. if (!PyArg_ParseTuple(_args, "O&",
  7123. ResObj_Convert, &theMatte))
  7124. return NULL;
  7125. DisposeMatte(theMatte);
  7126. Py_INCREF(Py_None);
  7127. _res = Py_None;
  7128. return _res;
  7129. }
  7130. static PyObject *Qt_NewMovie(PyObject *_self, PyObject *_args)
  7131. {
  7132. PyObject *_res = NULL;
  7133. Movie _rv;
  7134. long flags;
  7135. #ifndef NewMovie
  7136. PyMac_PRECHECK(NewMovie);
  7137. #endif
  7138. if (!PyArg_ParseTuple(_args, "l",
  7139. &flags))
  7140. return NULL;
  7141. _rv = NewMovie(flags);
  7142. _res = Py_BuildValue("O&",
  7143. MovieObj_New, _rv);
  7144. return _res;
  7145. }
  7146. static PyObject *Qt_QTGetTimeUntilNextTask(PyObject *_self, PyObject *_args)
  7147. {
  7148. PyObject *_res = NULL;
  7149. OSErr _err;
  7150. long duration;
  7151. long scale;
  7152. #ifndef QTGetTimeUntilNextTask
  7153. PyMac_PRECHECK(QTGetTimeUntilNextTask);
  7154. #endif
  7155. if (!PyArg_ParseTuple(_args, "l",
  7156. &scale))
  7157. return NULL;
  7158. _err = QTGetTimeUntilNextTask(&duration,
  7159. scale);
  7160. if (_err != noErr) return PyMac_Error(_err);
  7161. _res = Py_BuildValue("l",
  7162. duration);
  7163. return _res;
  7164. }
  7165. static PyObject *Qt_GetDataHandler(PyObject *_self, PyObject *_args)
  7166. {
  7167. PyObject *_res = NULL;
  7168. Component _rv;
  7169. Handle dataRef;
  7170. OSType dataHandlerSubType;
  7171. long flags;
  7172. #ifndef GetDataHandler
  7173. PyMac_PRECHECK(GetDataHandler);
  7174. #endif
  7175. if (!PyArg_ParseTuple(_args, "O&O&l",
  7176. ResObj_Convert, &dataRef,
  7177. PyMac_GetOSType, &dataHandlerSubType,
  7178. &flags))
  7179. return NULL;
  7180. _rv = GetDataHandler(dataRef,
  7181. dataHandlerSubType,
  7182. flags);
  7183. _res = Py_BuildValue("O&",
  7184. CmpObj_New, _rv);
  7185. return _res;
  7186. }
  7187. static PyObject *Qt_PasteHandleIntoMovie(PyObject *_self, PyObject *_args)
  7188. {
  7189. PyObject *_res = NULL;
  7190. OSErr _err;
  7191. Handle h;
  7192. OSType handleType;
  7193. Movie theMovie;
  7194. long flags;
  7195. ComponentInstance userComp;
  7196. #ifndef PasteHandleIntoMovie
  7197. PyMac_PRECHECK(PasteHandleIntoMovie);
  7198. #endif
  7199. if (!PyArg_ParseTuple(_args, "O&O&O&lO&",
  7200. ResObj_Convert, &h,
  7201. PyMac_GetOSType, &handleType,
  7202. MovieObj_Convert, &theMovie,
  7203. &flags,
  7204. CmpInstObj_Convert, &userComp))
  7205. return NULL;
  7206. _err = PasteHandleIntoMovie(h,
  7207. handleType,
  7208. theMovie,
  7209. flags,
  7210. userComp);
  7211. if (_err != noErr) return PyMac_Error(_err);
  7212. Py_INCREF(Py_None);
  7213. _res = Py_None;
  7214. return _res;
  7215. }
  7216. static PyObject *Qt_GetMovieImporterForDataRef(PyObject *_self, PyObject *_args)
  7217. {
  7218. PyObject *_res = NULL;
  7219. OSErr _err;
  7220. OSType dataRefType;
  7221. Handle dataRef;
  7222. long flags;
  7223. Component importer;
  7224. #ifndef GetMovieImporterForDataRef
  7225. PyMac_PRECHECK(GetMovieImporterForDataRef);
  7226. #endif
  7227. if (!PyArg_ParseTuple(_args, "O&O&l",
  7228. PyMac_GetOSType, &dataRefType,
  7229. ResObj_Convert, &dataRef,
  7230. &flags))
  7231. return NULL;
  7232. _err = GetMovieImporterForDataRef(dataRefType,
  7233. dataRef,
  7234. flags,
  7235. &importer);
  7236. if (_err != noErr) return PyMac_Error(_err);
  7237. _res = Py_BuildValue("O&",
  7238. CmpObj_New, importer);
  7239. return _res;
  7240. }
  7241. static PyObject *Qt_QTGetMIMETypeInfo(PyObject *_self, PyObject *_args)
  7242. {
  7243. PyObject *_res = NULL;
  7244. OSErr _err;
  7245. char* mimeStringStart;
  7246. short mimeStringLength;
  7247. OSType infoSelector;
  7248. void * infoDataPtr;
  7249. long infoDataSize;
  7250. #ifndef QTGetMIMETypeInfo
  7251. PyMac_PRECHECK(QTGetMIMETypeInfo);
  7252. #endif
  7253. if (!PyArg_ParseTuple(_args, "shO&s",
  7254. &mimeStringStart,
  7255. &mimeStringLength,
  7256. PyMac_GetOSType, &infoSelector,
  7257. &infoDataPtr))
  7258. return NULL;
  7259. _err = QTGetMIMETypeInfo(mimeStringStart,
  7260. mimeStringLength,
  7261. infoSelector,
  7262. infoDataPtr,
  7263. &infoDataSize);
  7264. if (_err != noErr) return PyMac_Error(_err);
  7265. _res = Py_BuildValue("l",
  7266. infoDataSize);
  7267. return _res;
  7268. }
  7269. static PyObject *Qt_TrackTimeToMediaTime(PyObject *_self, PyObject *_args)
  7270. {
  7271. PyObject *_res = NULL;
  7272. TimeValue _rv;
  7273. TimeValue value;
  7274. Track theTrack;
  7275. #ifndef TrackTimeToMediaTime
  7276. PyMac_PRECHECK(TrackTimeToMediaTime);
  7277. #endif
  7278. if (!PyArg_ParseTuple(_args, "lO&",
  7279. &value,
  7280. TrackObj_Convert, &theTrack))
  7281. return NULL;
  7282. _rv = TrackTimeToMediaTime(value,
  7283. theTrack);
  7284. _res = Py_BuildValue("l",
  7285. _rv);
  7286. return _res;
  7287. }
  7288. static PyObject *Qt_NewUserData(PyObject *_self, PyObject *_args)
  7289. {
  7290. PyObject *_res = NULL;
  7291. OSErr _err;
  7292. UserData theUserData;
  7293. #ifndef NewUserData
  7294. PyMac_PRECHECK(NewUserData);
  7295. #endif
  7296. if (!PyArg_ParseTuple(_args, ""))
  7297. return NULL;
  7298. _err = NewUserData(&theUserData);
  7299. if (_err != noErr) return PyMac_Error(_err);
  7300. _res = Py_BuildValue("O&",
  7301. UserDataObj_New, theUserData);
  7302. return _res;
  7303. }
  7304. static PyObject *Qt_NewUserDataFromHandle(PyObject *_self, PyObject *_args)
  7305. {
  7306. PyObject *_res = NULL;
  7307. OSErr _err;
  7308. Handle h;
  7309. UserData theUserData;
  7310. #ifndef NewUserDataFromHandle
  7311. PyMac_PRECHECK(NewUserDataFromHandle);
  7312. #endif
  7313. if (!PyArg_ParseTuple(_args, "O&",
  7314. ResObj_Convert, &h))
  7315. return NULL;
  7316. _err = NewUserDataFromHandle(h,
  7317. &theUserData);
  7318. if (_err != noErr) return PyMac_Error(_err);
  7319. _res = Py_BuildValue("O&",
  7320. UserDataObj_New, theUserData);
  7321. return _res;
  7322. }
  7323. static PyObject *Qt_CreateMovieFile(PyObject *_self, PyObject *_args)
  7324. {
  7325. PyObject *_res = NULL;
  7326. OSErr _err;
  7327. FSSpec fileSpec;
  7328. OSType creator;
  7329. ScriptCode scriptTag;
  7330. long createMovieFileFlags;
  7331. short resRefNum;
  7332. Movie newmovie;
  7333. #ifndef CreateMovieFile
  7334. PyMac_PRECHECK(CreateMovieFile);
  7335. #endif
  7336. if (!PyArg_ParseTuple(_args, "O&O&hl",
  7337. PyMac_GetFSSpec, &fileSpec,
  7338. PyMac_GetOSType, &creator,
  7339. &scriptTag,
  7340. &createMovieFileFlags))
  7341. return NULL;
  7342. _err = CreateMovieFile(&fileSpec,
  7343. creator,
  7344. scriptTag,
  7345. createMovieFileFlags,
  7346. &resRefNum,
  7347. &newmovie);
  7348. if (_err != noErr) return PyMac_Error(_err);
  7349. _res = Py_BuildValue("hO&",
  7350. resRefNum,
  7351. MovieObj_New, newmovie);
  7352. return _res;
  7353. }
  7354. static PyObject *Qt_OpenMovieFile(PyObject *_self, PyObject *_args)
  7355. {
  7356. PyObject *_res = NULL;
  7357. OSErr _err;
  7358. FSSpec fileSpec;
  7359. short resRefNum;
  7360. SInt8 permission;
  7361. #ifndef OpenMovieFile
  7362. PyMac_PRECHECK(OpenMovieFile);
  7363. #endif
  7364. if (!PyArg_ParseTuple(_args, "O&b",
  7365. PyMac_GetFSSpec, &fileSpec,
  7366. &permission))
  7367. return NULL;
  7368. _err = OpenMovieFile(&fileSpec,
  7369. &resRefNum,
  7370. permission);
  7371. if (_err != noErr) return PyMac_Error(_err);
  7372. _res = Py_BuildValue("h",
  7373. resRefNum);
  7374. return _res;
  7375. }
  7376. static PyObject *Qt_CloseMovieFile(PyObject *_self, PyObject *_args)
  7377. {
  7378. PyObject *_res = NULL;
  7379. OSErr _err;
  7380. short resRefNum;
  7381. #ifndef CloseMovieFile
  7382. PyMac_PRECHECK(CloseMovieFile);
  7383. #endif
  7384. if (!PyArg_ParseTuple(_args, "h",
  7385. &resRefNum))
  7386. return NULL;
  7387. _err = CloseMovieFile(resRefNum);
  7388. if (_err != noErr) return PyMac_Error(_err);
  7389. Py_INCREF(Py_None);
  7390. _res = Py_None;
  7391. return _res;
  7392. }
  7393. static PyObject *Qt_DeleteMovieFile(PyObject *_self, PyObject *_args)
  7394. {
  7395. PyObject *_res = NULL;
  7396. OSErr _err;
  7397. FSSpec fileSpec;
  7398. #ifndef DeleteMovieFile
  7399. PyMac_PRECHECK(DeleteMovieFile);
  7400. #endif
  7401. if (!PyArg_ParseTuple(_args, "O&",
  7402. PyMac_GetFSSpec, &fileSpec))
  7403. return NULL;
  7404. _err = DeleteMovieFile(&fileSpec);
  7405. if (_err != noErr) return PyMac_Error(_err);
  7406. Py_INCREF(Py_None);
  7407. _res = Py_None;
  7408. return _res;
  7409. }
  7410. static PyObject *Qt_NewMovieFromFile(PyObject *_self, PyObject *_args)
  7411. {
  7412. PyObject *_res = NULL;
  7413. OSErr _err;
  7414. Movie theMovie;
  7415. short resRefNum;
  7416. short resId;
  7417. short newMovieFlags;
  7418. Boolean dataRefWasChanged;
  7419. #ifndef NewMovieFromFile
  7420. PyMac_PRECHECK(NewMovieFromFile);
  7421. #endif
  7422. if (!PyArg_ParseTuple(_args, "hhh",
  7423. &resRefNum,
  7424. &resId,
  7425. &newMovieFlags))
  7426. return NULL;
  7427. _err = NewMovieFromFile(&theMovie,
  7428. resRefNum,
  7429. &resId,
  7430. (StringPtr)0,
  7431. newMovieFlags,
  7432. &dataRefWasChanged);
  7433. if (_err != noErr) return PyMac_Error(_err);
  7434. _res = Py_BuildValue("O&hb",
  7435. MovieObj_New, theMovie,
  7436. resId,
  7437. dataRefWasChanged);
  7438. return _res;
  7439. }
  7440. static PyObject *Qt_NewMovieFromHandle(PyObject *_self, PyObject *_args)
  7441. {
  7442. PyObject *_res = NULL;
  7443. OSErr _err;
  7444. Movie theMovie;
  7445. Handle h;
  7446. short newMovieFlags;
  7447. Boolean dataRefWasChanged;
  7448. #ifndef NewMovieFromHandle
  7449. PyMac_PRECHECK(NewMovieFromHandle);
  7450. #endif
  7451. if (!PyArg_ParseTuple(_args, "O&h",
  7452. ResObj_Convert, &h,
  7453. &newMovieFlags))
  7454. return NULL;
  7455. _err = NewMovieFromHandle(&theMovie,
  7456. h,
  7457. newMovieFlags,
  7458. &dataRefWasChanged);
  7459. if (_err != noErr) return PyMac_Error(_err);
  7460. _res = Py_BuildValue("O&b",
  7461. MovieObj_New, theMovie,
  7462. dataRefWasChanged);
  7463. return _res;
  7464. }
  7465. static PyObject *Qt_NewMovieFromDataFork(PyObject *_self, PyObject *_args)
  7466. {
  7467. PyObject *_res = NULL;
  7468. OSErr _err;
  7469. Movie theMovie;
  7470. short fRefNum;
  7471. long fileOffset;
  7472. short newMovieFlags;
  7473. Boolean dataRefWasChanged;
  7474. #ifndef NewMovieFromDataFork
  7475. PyMac_PRECHECK(NewMovieFromDataFork);
  7476. #endif
  7477. if (!PyArg_ParseTuple(_args, "hlh",
  7478. &fRefNum,
  7479. &fileOffset,
  7480. &newMovieFlags))
  7481. return NULL;
  7482. _err = NewMovieFromDataFork(&theMovie,
  7483. fRefNum,
  7484. fileOffset,
  7485. newMovieFlags,
  7486. &dataRefWasChanged);
  7487. if (_err != noErr) return PyMac_Error(_err);
  7488. _res = Py_BuildValue("O&b",
  7489. MovieObj_New, theMovie,
  7490. dataRefWasChanged);
  7491. return _res;
  7492. }
  7493. static PyObject *Qt_NewMovieFromDataFork64(PyObject *_self, PyObject *_args)
  7494. {
  7495. PyObject *_res = NULL;
  7496. OSErr _err;
  7497. Movie theMovie;
  7498. long fRefNum;
  7499. wide fileOffset;
  7500. short newMovieFlags;
  7501. Boolean dataRefWasChanged;
  7502. #ifndef NewMovieFromDataFork64
  7503. PyMac_PRECHECK(NewMovieFromDataFork64);
  7504. #endif
  7505. if (!PyArg_ParseTuple(_args, "lO&h",
  7506. &fRefNum,
  7507. PyMac_Getwide, &fileOffset,
  7508. &newMovieFlags))
  7509. return NULL;
  7510. _err = NewMovieFromDataFork64(&theMovie,
  7511. fRefNum,
  7512. &fileOffset,
  7513. newMovieFlags,
  7514. &dataRefWasChanged);
  7515. if (_err != noErr) return PyMac_Error(_err);
  7516. _res = Py_BuildValue("O&b",
  7517. MovieObj_New, theMovie,
  7518. dataRefWasChanged);
  7519. return _res;
  7520. }
  7521. static PyObject *Qt_NewMovieFromDataRef(PyObject *_self, PyObject *_args)
  7522. {
  7523. PyObject *_res = NULL;
  7524. OSErr _err;
  7525. Movie m;
  7526. short flags;
  7527. short id;
  7528. Handle dataRef;
  7529. OSType dtaRefType;
  7530. #ifndef NewMovieFromDataRef
  7531. PyMac_PRECHECK(NewMovieFromDataRef);
  7532. #endif
  7533. if (!PyArg_ParseTuple(_args, "hO&O&",
  7534. &flags,
  7535. ResObj_Convert, &dataRef,
  7536. PyMac_GetOSType, &dtaRefType))
  7537. return NULL;
  7538. _err = NewMovieFromDataRef(&m,
  7539. flags,
  7540. &id,
  7541. dataRef,
  7542. dtaRefType);
  7543. if (_err != noErr) return PyMac_Error(_err);
  7544. _res = Py_BuildValue("O&h",
  7545. MovieObj_New, m,
  7546. id);
  7547. return _res;
  7548. }
  7549. static PyObject *Qt_NewMovieFromStorageOffset(PyObject *_self, PyObject *_args)
  7550. {
  7551. PyObject *_res = NULL;
  7552. OSErr _err;
  7553. Movie theMovie;
  7554. DataHandler dh;
  7555. wide fileOffset;
  7556. short newMovieFlags;
  7557. Boolean dataRefWasCataRefType;
  7558. #ifndef NewMovieFromStorageOffset
  7559. PyMac_PRECHECK(NewMovieFromStorageOffset);
  7560. #endif
  7561. if (!PyArg_ParseTuple(_args, "O&O&h",
  7562. CmpInstObj_Convert, &dh,
  7563. PyMac_Getwide, &fileOffset,
  7564. &newMovieFlags))
  7565. return NULL;
  7566. _err = NewMovieFromStorageOffset(&theMovie,
  7567. dh,
  7568. &fileOffset,
  7569. newMovieFlags,
  7570. &dataRefWasCataRefType);
  7571. if (_err != noErr) return PyMac_Error(_err);
  7572. _res = Py_BuildValue("O&b",
  7573. MovieObj_New, theMovie,
  7574. dataRefWasCataRefType);
  7575. return _res;
  7576. }
  7577. static PyObject *Qt_NewMovieForDataRefFromHandle(PyObject *_self, PyObject *_args)
  7578. {
  7579. PyObject *_res = NULL;
  7580. OSErr _err;
  7581. Movie theMovie;
  7582. Handle h;
  7583. short newMovieFlags;
  7584. Boolean dataRefWasChanged;
  7585. Handle dataRef;
  7586. OSType dataRefType;
  7587. #ifndef NewMovieForDataRefFromHandle
  7588. PyMac_PRECHECK(NewMovieForDataRefFromHandle);
  7589. #endif
  7590. if (!PyArg_ParseTuple(_args, "O&hO&O&",
  7591. ResObj_Convert, &h,
  7592. &newMovieFlags,
  7593. ResObj_Convert, &dataRef,
  7594. PyMac_GetOSType, &dataRefType))
  7595. return NULL;
  7596. _err = NewMovieForDataRefFromHandle(&theMovie,
  7597. h,
  7598. newMovieFlags,
  7599. &dataRefWasChanged,
  7600. dataRef,
  7601. dataRefType);
  7602. if (_err != noErr) return PyMac_Error(_err);
  7603. _res = Py_BuildValue("O&b",
  7604. MovieObj_New, theMovie,
  7605. dataRefWasChanged);
  7606. return _res;
  7607. }
  7608. static PyObject *Qt_RemoveMovieResource(PyObject *_self, PyObject *_args)
  7609. {
  7610. PyObject *_res = NULL;
  7611. OSErr _err;
  7612. short resRefNum;
  7613. short resId;
  7614. #ifndef RemoveMovieResource
  7615. PyMac_PRECHECK(RemoveMovieResource);
  7616. #endif
  7617. if (!PyArg_ParseTuple(_args, "hh",
  7618. &resRefNum,
  7619. &resId))
  7620. return NULL;
  7621. _err = RemoveMovieResource(resRefNum,
  7622. resId);
  7623. if (_err != noErr) return PyMac_Error(_err);
  7624. Py_INCREF(Py_None);
  7625. _res = Py_None;
  7626. return _res;
  7627. }
  7628. static PyObject *Qt_CreateMovieStorage(PyObject *_self, PyObject *_args)
  7629. {
  7630. PyObject *_res = NULL;
  7631. OSErr _err;
  7632. Handle dataRef;
  7633. OSType dataRefType;
  7634. OSType creator;
  7635. ScriptCode scriptTag;
  7636. long createMovieFileFlags;
  7637. DataHandler outDataHandler;
  7638. Movie newmovie;
  7639. #ifndef CreateMovieStorage
  7640. PyMac_PRECHECK(CreateMovieStorage);
  7641. #endif
  7642. if (!PyArg_ParseTuple(_args, "O&O&O&hl",
  7643. ResObj_Convert, &dataRef,
  7644. PyMac_GetOSType, &dataRefType,
  7645. PyMac_GetOSType, &creator,
  7646. &scriptTag,
  7647. &createMovieFileFlags))
  7648. return NULL;
  7649. _err = CreateMovieStorage(dataRef,
  7650. dataRefType,
  7651. creator,
  7652. scriptTag,
  7653. createMovieFileFlags,
  7654. &outDataHandler,
  7655. &newmovie);
  7656. if (_err != noErr) return PyMac_Error(_err);
  7657. _res = Py_BuildValue("O&O&",
  7658. CmpInstObj_New, outDataHandler,
  7659. MovieObj_New, newmovie);
  7660. return _res;
  7661. }
  7662. static PyObject *Qt_OpenMovieStorage(PyObject *_self, PyObject *_args)
  7663. {
  7664. PyObject *_res = NULL;
  7665. OSErr _err;
  7666. Handle dataRef;
  7667. OSType dataRefType;
  7668. long flags;
  7669. DataHandler outDataHandler;
  7670. #ifndef OpenMovieStorage
  7671. PyMac_PRECHECK(OpenMovieStorage);
  7672. #endif
  7673. if (!PyArg_ParseTuple(_args, "O&O&l",
  7674. ResObj_Convert, &dataRef,
  7675. PyMac_GetOSType, &dataRefType,
  7676. &flags))
  7677. return NULL;
  7678. _err = OpenMovieStorage(dataRef,
  7679. dataRefType,
  7680. flags,
  7681. &outDataHandler);
  7682. if (_err != noErr) return PyMac_Error(_err);
  7683. _res = Py_BuildValue("O&",
  7684. CmpInstObj_New, outDataHandler);
  7685. return _res;
  7686. }
  7687. static PyObject *Qt_CloseMovieStorage(PyObject *_self, PyObject *_args)
  7688. {
  7689. PyObject *_res = NULL;
  7690. OSErr _err;
  7691. DataHandler dh;
  7692. #ifndef CloseMovieStorage
  7693. PyMac_PRECHECK(CloseMovieStorage);
  7694. #endif
  7695. if (!PyArg_ParseTuple(_args, "O&",
  7696. CmpInstObj_Convert, &dh))
  7697. return NULL;
  7698. _err = CloseMovieStorage(dh);
  7699. if (_err != noErr) return PyMac_Error(_err);
  7700. Py_INCREF(Py_None);
  7701. _res = Py_None;
  7702. return _res;
  7703. }
  7704. static PyObject *Qt_DeleteMovieStorage(PyObject *_self, PyObject *_args)
  7705. {
  7706. PyObject *_res = NULL;
  7707. OSErr _err;
  7708. Handle dataRef;
  7709. OSType dataRefType;
  7710. #ifndef DeleteMovieStorage
  7711. PyMac_PRECHECK(DeleteMovieStorage);
  7712. #endif
  7713. if (!PyArg_ParseTuple(_args, "O&O&",
  7714. ResObj_Convert, &dataRef,
  7715. PyMac_GetOSType, &dataRefType))
  7716. return NULL;
  7717. _err = DeleteMovieStorage(dataRef,
  7718. dataRefType);
  7719. if (_err != noErr) return PyMac_Error(_err);
  7720. Py_INCREF(Py_None);
  7721. _res = Py_None;
  7722. return _res;
  7723. }
  7724. static PyObject *Qt_CreateShortcutMovieFile(PyObject *_self, PyObject *_args)
  7725. {
  7726. PyObject *_res = NULL;
  7727. OSErr _err;
  7728. FSSpec fileSpec;
  7729. OSType creator;
  7730. ScriptCode scriptTag;
  7731. long createMovieFileFlags;
  7732. Handle targetDataRef;
  7733. OSType targetDataRefType;
  7734. #ifndef CreateShortcutMovieFile
  7735. PyMac_PRECHECK(CreateShortcutMovieFile);
  7736. #endif
  7737. if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
  7738. PyMac_GetFSSpec, &fileSpec,
  7739. PyMac_GetOSType, &creator,
  7740. &scriptTag,
  7741. &createMovieFileFlags,
  7742. ResObj_Convert, &targetDataRef,
  7743. PyMac_GetOSType, &targetDataRefType))
  7744. return NULL;
  7745. _err = CreateShortcutMovieFile(&fileSpec,
  7746. creator,
  7747. scriptTag,
  7748. createMovieFileFlags,
  7749. targetDataRef,
  7750. targetDataRefType);
  7751. if (_err != noErr) return PyMac_Error(_err);
  7752. Py_INCREF(Py_None);
  7753. _res = Py_None;
  7754. return _res;
  7755. }
  7756. static PyObject *Qt_CanQuickTimeOpenFile(PyObject *_self, PyObject *_args)
  7757. {
  7758. PyObject *_res = NULL;
  7759. OSErr _err;
  7760. FSSpec fileSpec;
  7761. OSType fileType;
  7762. OSType fileNameExtension;
  7763. Boolean outCanOpenWithGraphicsImporter;
  7764. Boolean outCanOpenAsMovie;
  7765. Boolean outPreferGraphicsImporter;
  7766. UInt32 inFlags;
  7767. #ifndef CanQuickTimeOpenFile
  7768. PyMac_PRECHECK(CanQuickTimeOpenFile);
  7769. #endif
  7770. if (!PyArg_ParseTuple(_args, "O&O&O&l",
  7771. PyMac_GetFSSpec, &fileSpec,
  7772. PyMac_GetOSType, &fileType,
  7773. PyMac_GetOSType, &fileNameExtension,
  7774. &inFlags))
  7775. return NULL;
  7776. _err = CanQuickTimeOpenFile(&fileSpec,
  7777. fileType,
  7778. fileNameExtension,
  7779. &outCanOpenWithGraphicsImporter,
  7780. &outCanOpenAsMovie,
  7781. &outPreferGraphicsImporter,
  7782. inFlags);
  7783. if (_err != noErr) return PyMac_Error(_err);
  7784. _res = Py_BuildValue("bbb",
  7785. outCanOpenWithGraphicsImporter,
  7786. outCanOpenAsMovie,
  7787. outPreferGraphicsImporter);
  7788. return _res;
  7789. }
  7790. static PyObject *Qt_CanQuickTimeOpenDataRef(PyObject *_self, PyObject *_args)
  7791. {
  7792. PyObject *_res = NULL;
  7793. OSErr _err;
  7794. Handle dataRef;
  7795. OSType dataRefType;
  7796. Boolean outCanOpenWithGraphicsImporter;
  7797. Boolean outCanOpenAsMovie;
  7798. Boolean outPreferGraphicsImporter;
  7799. UInt32 inFlags;
  7800. #ifndef CanQuickTimeOpenDataRef
  7801. PyMac_PRECHECK(CanQuickTimeOpenDataRef);
  7802. #endif
  7803. if (!PyArg_ParseTuple(_args, "O&O&l",
  7804. ResObj_Convert, &dataRef,
  7805. PyMac_GetOSType, &dataRefType,
  7806. &inFlags))
  7807. return NULL;
  7808. _err = CanQuickTimeOpenDataRef(dataRef,
  7809. dataRefType,
  7810. &outCanOpenWithGraphicsImporter,
  7811. &outCanOpenAsMovie,
  7812. &outPreferGraphicsImporter,
  7813. inFlags);
  7814. if (_err != noErr) return PyMac_Error(_err);
  7815. _res = Py_BuildValue("bbb",
  7816. outCanOpenWithGraphicsImporter,
  7817. outCanOpenAsMovie,
  7818. outPreferGraphicsImporter);
  7819. return _res;
  7820. }
  7821. static PyObject *Qt_NewMovieFromScrap(PyObject *_self, PyObject *_args)
  7822. {
  7823. PyObject *_res = NULL;
  7824. Movie _rv;
  7825. long newMovieFlags;
  7826. #ifndef NewMovieFromScrap
  7827. PyMac_PRECHECK(NewMovieFromScrap);
  7828. #endif
  7829. if (!PyArg_ParseTuple(_args, "l",
  7830. &newMovieFlags))
  7831. return NULL;
  7832. _rv = NewMovieFromScrap(newMovieFlags);
  7833. _res = Py_BuildValue("O&",
  7834. MovieObj_New, _rv);
  7835. return _res;
  7836. }
  7837. static PyObject *Qt_QTNewAlias(PyObject *_self, PyObject *_args)
  7838. {
  7839. PyObject *_res = NULL;
  7840. OSErr _err;
  7841. FSSpec fss;
  7842. AliasHandle alias;
  7843. Boolean minimal;
  7844. #ifndef QTNewAlias
  7845. PyMac_PRECHECK(QTNewAlias);
  7846. #endif
  7847. if (!PyArg_ParseTuple(_args, "O&b",
  7848. PyMac_GetFSSpec, &fss,
  7849. &minimal))
  7850. return NULL;
  7851. _err = QTNewAlias(&fss,
  7852. &alias,
  7853. minimal);
  7854. if (_err != noErr) return PyMac_Error(_err);
  7855. _res = Py_BuildValue("O&",
  7856. ResObj_New, alias);
  7857. return _res;
  7858. }
  7859. static PyObject *Qt_EndFullScreen(PyObject *_self, PyObject *_args)
  7860. {
  7861. PyObject *_res = NULL;
  7862. OSErr _err;
  7863. Ptr fullState;
  7864. long flags;
  7865. #ifndef EndFullScreen
  7866. PyMac_PRECHECK(EndFullScreen);
  7867. #endif
  7868. if (!PyArg_ParseTuple(_args, "sl",
  7869. &fullState,
  7870. &flags))
  7871. return NULL;
  7872. _err = EndFullScreen(fullState,
  7873. flags);
  7874. if (_err != noErr) return PyMac_Error(_err);
  7875. Py_INCREF(Py_None);
  7876. _res = Py_None;
  7877. return _res;
  7878. }
  7879. static PyObject *Qt_AddSoundDescriptionExtension(PyObject *_self, PyObject *_args)
  7880. {
  7881. PyObject *_res = NULL;
  7882. OSErr _err;
  7883. SoundDescriptionHandle desc;
  7884. Handle extension;
  7885. OSType idType;
  7886. #ifndef AddSoundDescriptionExtension
  7887. PyMac_PRECHECK(AddSoundDescriptionExtension);
  7888. #endif
  7889. if (!PyArg_ParseTuple(_args, "O&O&O&",
  7890. ResObj_Convert, &desc,
  7891. ResObj_Convert, &extension,
  7892. PyMac_GetOSType, &idType))
  7893. return NULL;
  7894. _err = AddSoundDescriptionExtension(desc,
  7895. extension,
  7896. idType);
  7897. if (_err != noErr) return PyMac_Error(_err);
  7898. Py_INCREF(Py_None);
  7899. _res = Py_None;
  7900. return _res;
  7901. }
  7902. static PyObject *Qt_GetSoundDescriptionExtension(PyObject *_self, PyObject *_args)
  7903. {
  7904. PyObject *_res = NULL;
  7905. OSErr _err;
  7906. SoundDescriptionHandle desc;
  7907. Handle extension;
  7908. OSType idType;
  7909. #ifndef GetSoundDescriptionExtension
  7910. PyMac_PRECHECK(GetSoundDescriptionExtension);
  7911. #endif
  7912. if (!PyArg_ParseTuple(_args, "O&O&",
  7913. ResObj_Convert, &desc,
  7914. PyMac_GetOSType, &idType))
  7915. return NULL;
  7916. _err = GetSoundDescriptionExtension(desc,
  7917. &extension,
  7918. idType);
  7919. if (_err != noErr) return PyMac_Error(_err);
  7920. _res = Py_BuildValue("O&",
  7921. ResObj_New, extension);
  7922. return _res;
  7923. }
  7924. static PyObject *Qt_RemoveSoundDescriptionExtension(PyObject *_self, PyObject *_args)
  7925. {
  7926. PyObject *_res = NULL;
  7927. OSErr _err;
  7928. SoundDescriptionHandle desc;
  7929. OSType idType;
  7930. #ifndef RemoveSoundDescriptionExtension
  7931. PyMac_PRECHECK(RemoveSoundDescriptionExtension);
  7932. #endif
  7933. if (!PyArg_ParseTuple(_args, "O&O&",
  7934. ResObj_Convert, &desc,
  7935. PyMac_GetOSType, &idType))
  7936. return NULL;
  7937. _err = RemoveSoundDescriptionExtension(desc,
  7938. idType);
  7939. if (_err != noErr) return PyMac_Error(_err);
  7940. Py_INCREF(Py_None);
  7941. _res = Py_None;
  7942. return _res;
  7943. }
  7944. static PyObject *Qt_QTIsStandardParameterDialogEvent(PyObject *_self, PyObject *_args)
  7945. {
  7946. PyObject *_res = NULL;
  7947. OSErr _err;
  7948. EventRecord pEvent;
  7949. QTParameterDialog createdDialog;
  7950. #ifndef QTIsStandardParameterDialogEvent
  7951. PyMac_PRECHECK(QTIsStandardParameterDialogEvent);
  7952. #endif
  7953. if (!PyArg_ParseTuple(_args, "l",
  7954. &createdDialog))
  7955. return NULL;
  7956. _err = QTIsStandardParameterDialogEvent(&pEvent,
  7957. createdDialog);
  7958. if (_err != noErr) return PyMac_Error(_err);
  7959. _res = Py_BuildValue("O&",
  7960. PyMac_BuildEventRecord, &pEvent);
  7961. return _res;
  7962. }
  7963. static PyObject *Qt_QTDismissStandardParameterDialog(PyObject *_self, PyObject *_args)
  7964. {
  7965. PyObject *_res = NULL;
  7966. OSErr _err;
  7967. QTParameterDialog createdDialog;
  7968. #ifndef QTDismissStandardParameterDialog
  7969. PyMac_PRECHECK(QTDismissStandardParameterDialog);
  7970. #endif
  7971. if (!PyArg_ParseTuple(_args, "l",
  7972. &createdDialog))
  7973. return NULL;
  7974. _err = QTDismissStandardParameterDialog(createdDialog);
  7975. if (_err != noErr) return PyMac_Error(_err);
  7976. Py_INCREF(Py_None);
  7977. _res = Py_None;
  7978. return _res;
  7979. }
  7980. static PyObject *Qt_QTStandardParameterDialogDoAction(PyObject *_self, PyObject *_args)
  7981. {
  7982. PyObject *_res = NULL;
  7983. OSErr _err;
  7984. QTParameterDialog createdDialog;
  7985. long action;
  7986. void * params;
  7987. #ifndef QTStandardParameterDialogDoAction
  7988. PyMac_PRECHECK(QTStandardParameterDialogDoAction);
  7989. #endif
  7990. if (!PyArg_ParseTuple(_args, "lls",
  7991. &createdDialog,
  7992. &action,
  7993. &params))
  7994. return NULL;
  7995. _err = QTStandardParameterDialogDoAction(createdDialog,
  7996. action,
  7997. params);
  7998. if (_err != noErr) return PyMac_Error(_err);
  7999. Py_INCREF(Py_None);
  8000. _res = Py_None;
  8001. return _res;
  8002. }
  8003. static PyObject *Qt_QTRegisterAccessKey(PyObject *_self, PyObject *_args)
  8004. {
  8005. PyObject *_res = NULL;
  8006. OSErr _err;
  8007. Str255 accessKeyType;
  8008. long flags;
  8009. Handle accessKey;
  8010. #ifndef QTRegisterAccessKey
  8011. PyMac_PRECHECK(QTRegisterAccessKey);
  8012. #endif
  8013. if (!PyArg_ParseTuple(_args, "O&lO&",
  8014. PyMac_GetStr255, accessKeyType,
  8015. &flags,
  8016. ResObj_Convert, &accessKey))
  8017. return NULL;
  8018. _err = QTRegisterAccessKey(accessKeyType,
  8019. flags,
  8020. accessKey);
  8021. if (_err != noErr) return PyMac_Error(_err);
  8022. Py_INCREF(Py_None);
  8023. _res = Py_None;
  8024. return _res;
  8025. }
  8026. static PyObject *Qt_QTUnregisterAccessKey(PyObject *_self, PyObject *_args)
  8027. {
  8028. PyObject *_res = NULL;
  8029. OSErr _err;
  8030. Str255 accessKeyType;
  8031. long flags;
  8032. Handle accessKey;
  8033. #ifndef QTUnregisterAccessKey
  8034. PyMac_PRECHECK(QTUnregisterAccessKey);
  8035. #endif
  8036. if (!PyArg_ParseTuple(_args, "O&lO&",
  8037. PyMac_GetStr255, accessKeyType,
  8038. &flags,
  8039. ResObj_Convert, &accessKey))
  8040. return NULL;
  8041. _err = QTUnregisterAccessKey(accessKeyType,
  8042. flags,
  8043. accessKey);
  8044. if (_err != noErr) return PyMac_Error(_err);
  8045. Py_INCREF(Py_None);
  8046. _res = Py_None;
  8047. return _res;
  8048. }
  8049. static PyObject *Qt_QTGetSupportedRestrictions(PyObject *_self, PyObject *_args)
  8050. {
  8051. PyObject *_res = NULL;
  8052. OSErr _err;
  8053. OSType inRestrictionClass;
  8054. UInt32 outRestrictionIDs;
  8055. #ifndef QTGetSupportedRestrictions
  8056. PyMac_PRECHECK(QTGetSupportedRestrictions);
  8057. #endif
  8058. if (!PyArg_ParseTuple(_args, "O&",
  8059. PyMac_GetOSType, &inRestrictionClass))
  8060. return NULL;
  8061. _err = QTGetSupportedRestrictions(inRestrictionClass,
  8062. &outRestrictionIDs);
  8063. if (_err != noErr) return PyMac_Error(_err);
  8064. _res = Py_BuildValue("l",
  8065. outRestrictionIDs);
  8066. return _res;
  8067. }
  8068. static PyObject *Qt_QTTextToNativeText(PyObject *_self, PyObject *_args)
  8069. {
  8070. PyObject *_res = NULL;
  8071. OSErr _err;
  8072. Handle theText;
  8073. long encoding;
  8074. long flags;
  8075. #ifndef QTTextToNativeText
  8076. PyMac_PRECHECK(QTTextToNativeText);
  8077. #endif
  8078. if (!PyArg_ParseTuple(_args, "O&ll",
  8079. ResObj_Convert, &theText,
  8080. &encoding,
  8081. &flags))
  8082. return NULL;
  8083. _err = QTTextToNativeText(theText,
  8084. encoding,
  8085. flags);
  8086. if (_err != noErr) return PyMac_Error(_err);
  8087. Py_INCREF(Py_None);
  8088. _res = Py_None;
  8089. return _res;
  8090. }
  8091. static PyObject *Qt_VideoMediaResetStatistics(PyObject *_self, PyObject *_args)
  8092. {
  8093. PyObject *_res = NULL;
  8094. ComponentResult _rv;
  8095. MediaHandler mh;
  8096. #ifndef VideoMediaResetStatistics
  8097. PyMac_PRECHECK(VideoMediaResetStatistics);
  8098. #endif
  8099. if (!PyArg_ParseTuple(_args, "O&",
  8100. CmpInstObj_Convert, &mh))
  8101. return NULL;
  8102. _rv = VideoMediaResetStatistics(mh);
  8103. _res = Py_BuildValue("l",
  8104. _rv);
  8105. return _res;
  8106. }
  8107. static PyObject *Qt_VideoMediaGetStatistics(PyObject *_self, PyObject *_args)
  8108. {
  8109. PyObject *_res = NULL;
  8110. ComponentResult _rv;
  8111. MediaHandler mh;
  8112. #ifndef VideoMediaGetStatistics
  8113. PyMac_PRECHECK(VideoMediaGetStatistics);
  8114. #endif
  8115. if (!PyArg_ParseTuple(_args, "O&",
  8116. CmpInstObj_Convert, &mh))
  8117. return NULL;
  8118. _rv = VideoMediaGetStatistics(mh);
  8119. _res = Py_BuildValue("l",
  8120. _rv);
  8121. return _res;
  8122. }
  8123. static PyObject *Qt_VideoMediaGetStallCount(PyObject *_self, PyObject *_args)
  8124. {
  8125. PyObject *_res = NULL;
  8126. ComponentResult _rv;
  8127. MediaHandler mh;
  8128. unsigned long stalls;
  8129. #ifndef VideoMediaGetStallCount
  8130. PyMac_PRECHECK(VideoMediaGetStallCount);
  8131. #endif
  8132. if (!PyArg_ParseTuple(_args, "O&",
  8133. CmpInstObj_Convert, &mh))
  8134. return NULL;
  8135. _rv = VideoMediaGetStallCount(mh,
  8136. &stalls);
  8137. _res = Py_BuildValue("ll",
  8138. _rv,
  8139. stalls);
  8140. return _res;
  8141. }
  8142. static PyObject *Qt_VideoMediaSetCodecParameter(PyObject *_self, PyObject *_args)
  8143. {
  8144. PyObject *_res = NULL;
  8145. ComponentResult _rv;
  8146. MediaHandler mh;
  8147. CodecType cType;
  8148. OSType parameterID;
  8149. long parameterChangeSeed;
  8150. void * dataPtr;
  8151. long dataSize;
  8152. #ifndef VideoMediaSetCodecParameter
  8153. PyMac_PRECHECK(VideoMediaSetCodecParameter);
  8154. #endif
  8155. if (!PyArg_ParseTuple(_args, "O&O&O&lsl",
  8156. CmpInstObj_Convert, &mh,
  8157. PyMac_GetOSType, &cType,
  8158. PyMac_GetOSType, &parameterID,
  8159. &parameterChangeSeed,
  8160. &dataPtr,
  8161. &dataSize))
  8162. return NULL;
  8163. _rv = VideoMediaSetCodecParameter(mh,
  8164. cType,
  8165. parameterID,
  8166. parameterChangeSeed,
  8167. dataPtr,
  8168. dataSize);
  8169. _res = Py_BuildValue("l",
  8170. _rv);
  8171. return _res;
  8172. }
  8173. static PyObject *Qt_VideoMediaGetCodecParameter(PyObject *_self, PyObject *_args)
  8174. {
  8175. PyObject *_res = NULL;
  8176. ComponentResult _rv;
  8177. MediaHandler mh;
  8178. CodecType cType;
  8179. OSType parameterID;
  8180. Handle outParameterData;
  8181. #ifndef VideoMediaGetCodecParameter
  8182. PyMac_PRECHECK(VideoMediaGetCodecParameter);
  8183. #endif
  8184. if (!PyArg_ParseTuple(_args, "O&O&O&O&",
  8185. CmpInstObj_Convert, &mh,
  8186. PyMac_GetOSType, &cType,
  8187. PyMac_GetOSType, &parameterID,
  8188. ResObj_Convert, &outParameterData))
  8189. return NULL;
  8190. _rv = VideoMediaGetCodecParameter(mh,
  8191. cType,
  8192. parameterID,
  8193. outParameterData);
  8194. _res = Py_BuildValue("l",
  8195. _rv);
  8196. return _res;
  8197. }
  8198. static PyObject *Qt_TextMediaAddTextSample(PyObject *_self, PyObject *_args)
  8199. {
  8200. PyObject *_res = NULL;
  8201. ComponentResult _rv;
  8202. MediaHandler mh;
  8203. Ptr text;
  8204. unsigned long size;
  8205. short fontNumber;
  8206. short fontSize;
  8207. Style textFace;
  8208. RGBColor textColor;
  8209. RGBColor backColor;
  8210. short textJustification;
  8211. Rect textBox;
  8212. long displayFlags;
  8213. TimeValue scrollDelay;
  8214. short hiliteStart;
  8215. short hiliteEnd;
  8216. RGBColor rgbHiliteColor;
  8217. TimeValue duration;
  8218. TimeValue sampleTime;
  8219. #ifndef TextMediaAddTextSample
  8220. PyMac_PRECHECK(TextMediaAddTextSample);
  8221. #endif
  8222. if (!PyArg_ParseTuple(_args, "O&slhhbhllhhl",
  8223. CmpInstObj_Convert, &mh,
  8224. &text,
  8225. &size,
  8226. &fontNumber,
  8227. &fontSize,
  8228. &textFace,
  8229. &textJustification,
  8230. &displayFlags,
  8231. &scrollDelay,
  8232. &hiliteStart,
  8233. &hiliteEnd,
  8234. &duration))
  8235. return NULL;
  8236. _rv = TextMediaAddTextSample(mh,
  8237. text,
  8238. size,
  8239. fontNumber,
  8240. fontSize,
  8241. textFace,
  8242. &textColor,
  8243. &backColor,
  8244. textJustification,
  8245. &textBox,
  8246. displayFlags,
  8247. scrollDelay,
  8248. hiliteStart,
  8249. hiliteEnd,
  8250. &rgbHiliteColor,
  8251. duration,
  8252. &sampleTime);
  8253. _res = Py_BuildValue("lO&O&O&O&l",
  8254. _rv,
  8255. QdRGB_New, &textColor,
  8256. QdRGB_New, &backColor,
  8257. PyMac_BuildRect, &textBox,
  8258. QdRGB_New, &rgbHiliteColor,
  8259. sampleTime);
  8260. return _res;
  8261. }
  8262. static PyObject *Qt_TextMediaAddTESample(PyObject *_self, PyObject *_args)
  8263. {
  8264. PyObject *_res = NULL;
  8265. ComponentResult _rv;
  8266. MediaHandler mh;
  8267. TEHandle hTE;
  8268. RGBColor backColor;
  8269. short textJustification;
  8270. Rect textBox;
  8271. long displayFlags;
  8272. TimeValue scrollDelay;
  8273. short hiliteStart;
  8274. short hiliteEnd;
  8275. RGBColor rgbHiliteColor;
  8276. TimeValue duration;
  8277. TimeValue sampleTime;
  8278. #ifndef TextMediaAddTESample
  8279. PyMac_PRECHECK(TextMediaAddTESample);
  8280. #endif
  8281. if (!PyArg_ParseTuple(_args, "O&O&hllhhl",
  8282. CmpInstObj_Convert, &mh,
  8283. ResObj_Convert, &hTE,
  8284. &textJustification,
  8285. &displayFlags,
  8286. &scrollDelay,
  8287. &hiliteStart,
  8288. &hiliteEnd,
  8289. &duration))
  8290. return NULL;
  8291. _rv = TextMediaAddTESample(mh,
  8292. hTE,
  8293. &backColor,
  8294. textJustification,
  8295. &textBox,
  8296. displayFlags,
  8297. scrollDelay,
  8298. hiliteStart,
  8299. hiliteEnd,
  8300. &rgbHiliteColor,
  8301. duration,
  8302. &sampleTime);
  8303. _res = Py_BuildValue("lO&O&O&l",
  8304. _rv,
  8305. QdRGB_New, &backColor,
  8306. PyMac_BuildRect, &textBox,
  8307. QdRGB_New, &rgbHiliteColor,
  8308. sampleTime);
  8309. return _res;
  8310. }
  8311. static PyObject *Qt_TextMediaAddHiliteSample(PyObject *_self, PyObject *_args)
  8312. {
  8313. PyObject *_res = NULL;
  8314. ComponentResult _rv;
  8315. MediaHandler mh;
  8316. short hiliteStart;
  8317. short hiliteEnd;
  8318. RGBColor rgbHiliteColor;
  8319. TimeValue duration;
  8320. TimeValue sampleTime;
  8321. #ifndef TextMediaAddHiliteSample
  8322. PyMac_PRECHECK(TextMediaAddHiliteSample);
  8323. #endif
  8324. if (!PyArg_ParseTuple(_args, "O&hhl",
  8325. CmpInstObj_Convert, &mh,
  8326. &hiliteStart,
  8327. &hiliteEnd,
  8328. &duration))
  8329. return NULL;
  8330. _rv = TextMediaAddHiliteSample(mh,
  8331. hiliteStart,
  8332. hiliteEnd,
  8333. &rgbHiliteColor,
  8334. duration,
  8335. &sampleTime);
  8336. _res = Py_BuildValue("lO&l",
  8337. _rv,
  8338. QdRGB_New, &rgbHiliteColor,
  8339. sampleTime);
  8340. return _res;
  8341. }
  8342. static PyObject *Qt_TextMediaDrawRaw(PyObject *_self, PyObject *_args)
  8343. {
  8344. PyObject *_res = NULL;
  8345. ComponentResult _rv;
  8346. MediaHandler mh;
  8347. GWorldPtr gw;
  8348. GDHandle gd;
  8349. void * data;
  8350. long dataSize;
  8351. TextDescriptionHandle tdh;
  8352. #ifndef TextMediaDrawRaw
  8353. PyMac_PRECHECK(TextMediaDrawRaw);
  8354. #endif
  8355. if (!PyArg_ParseTuple(_args, "O&O&O&slO&",
  8356. CmpInstObj_Convert, &mh,
  8357. GWorldObj_Convert, &gw,
  8358. OptResObj_Convert, &gd,
  8359. &data,
  8360. &dataSize,
  8361. ResObj_Convert, &tdh))
  8362. return NULL;
  8363. _rv = TextMediaDrawRaw(mh,
  8364. gw,
  8365. gd,
  8366. data,
  8367. dataSize,
  8368. tdh);
  8369. _res = Py_BuildValue("l",
  8370. _rv);
  8371. return _res;
  8372. }
  8373. static PyObject *Qt_TextMediaSetTextProperty(PyObject *_self, PyObject *_args)
  8374. {
  8375. PyObject *_res = NULL;
  8376. ComponentResult _rv;
  8377. MediaHandler mh;
  8378. TimeValue atMediaTime;
  8379. long propertyType;
  8380. void * data;
  8381. long dataSize;
  8382. #ifndef TextMediaSetTextProperty
  8383. PyMac_PRECHECK(TextMediaSetTextProperty);
  8384. #endif
  8385. if (!PyArg_ParseTuple(_args, "O&llsl",
  8386. CmpInstObj_Convert, &mh,
  8387. &atMediaTime,
  8388. &propertyType,
  8389. &data,
  8390. &dataSize))
  8391. return NULL;
  8392. _rv = TextMediaSetTextProperty(mh,
  8393. atMediaTime,
  8394. propertyType,
  8395. data,
  8396. dataSize);
  8397. _res = Py_BuildValue("l",
  8398. _rv);
  8399. return _res;
  8400. }
  8401. static PyObject *Qt_TextMediaRawSetup(PyObject *_self, PyObject *_args)
  8402. {
  8403. PyObject *_res = NULL;
  8404. ComponentResult _rv;
  8405. MediaHandler mh;
  8406. GWorldPtr gw;
  8407. GDHandle gd;
  8408. void * data;
  8409. long dataSize;
  8410. TextDescriptionHandle tdh;
  8411. TimeValue sampleDuration;
  8412. #ifndef TextMediaRawSetup
  8413. PyMac_PRECHECK(TextMediaRawSetup);
  8414. #endif
  8415. if (!PyArg_ParseTuple(_args, "O&O&O&slO&l",
  8416. CmpInstObj_Convert, &mh,
  8417. GWorldObj_Convert, &gw,
  8418. OptResObj_Convert, &gd,
  8419. &data,
  8420. &dataSize,
  8421. ResObj_Convert, &tdh,
  8422. &sampleDuration))
  8423. return NULL;
  8424. _rv = TextMediaRawSetup(mh,
  8425. gw,
  8426. gd,
  8427. data,
  8428. dataSize,
  8429. tdh,
  8430. sampleDuration);
  8431. _res = Py_BuildValue("l",
  8432. _rv);
  8433. return _res;
  8434. }
  8435. static PyObject *Qt_TextMediaRawIdle(PyObject *_self, PyObject *_args)
  8436. {
  8437. PyObject *_res = NULL;
  8438. ComponentResult _rv;
  8439. MediaHandler mh;
  8440. GWorldPtr gw;
  8441. GDHandle gd;
  8442. TimeValue sampleTime;
  8443. long flagsIn;
  8444. long flagsOut;
  8445. #ifndef TextMediaRawIdle
  8446. PyMac_PRECHECK(TextMediaRawIdle);
  8447. #endif
  8448. if (!PyArg_ParseTuple(_args, "O&O&O&ll",
  8449. CmpInstObj_Convert, &mh,
  8450. GWorldObj_Convert, &gw,
  8451. OptResObj_Convert, &gd,
  8452. &sampleTime,
  8453. &flagsIn))
  8454. return NULL;
  8455. _rv = TextMediaRawIdle(mh,
  8456. gw,
  8457. gd,
  8458. sampleTime,
  8459. flagsIn,
  8460. &flagsOut);
  8461. _res = Py_BuildValue("ll",
  8462. _rv,
  8463. flagsOut);
  8464. return _res;
  8465. }
  8466. static PyObject *Qt_TextMediaGetTextProperty(PyObject *_self, PyObject *_args)
  8467. {
  8468. PyObject *_res = NULL;
  8469. ComponentResult _rv;
  8470. MediaHandler mh;
  8471. TimeValue atMediaTime;
  8472. long propertyType;
  8473. void * data;
  8474. long dataSize;
  8475. #ifndef TextMediaGetTextProperty
  8476. PyMac_PRECHECK(TextMediaGetTextProperty);
  8477. #endif
  8478. if (!PyArg_ParseTuple(_args, "O&llsl",
  8479. CmpInstObj_Convert, &mh,
  8480. &atMediaTime,
  8481. &propertyType,
  8482. &data,
  8483. &dataSize))
  8484. return NULL;
  8485. _rv = TextMediaGetTextProperty(mh,
  8486. atMediaTime,
  8487. propertyType,
  8488. data,
  8489. dataSize);
  8490. _res = Py_BuildValue("l",
  8491. _rv);
  8492. return _res;
  8493. }
  8494. static PyObject *Qt_TextMediaFindNextText(PyObject *_self, PyObject *_args)
  8495. {
  8496. PyObject *_res = NULL;
  8497. ComponentResult _rv;
  8498. MediaHandler mh;
  8499. Ptr text;
  8500. long size;
  8501. short findFlags;
  8502. TimeValue startTime;
  8503. TimeValue foundTime;
  8504. TimeValue foundDuration;
  8505. long offset;
  8506. #ifndef TextMediaFindNextText
  8507. PyMac_PRECHECK(TextMediaFindNextText);
  8508. #endif
  8509. if (!PyArg_ParseTuple(_args, "O&slhl",
  8510. CmpInstObj_Convert, &mh,
  8511. &text,
  8512. &size,
  8513. &findFlags,
  8514. &startTime))
  8515. return NULL;
  8516. _rv = TextMediaFindNextText(mh,
  8517. text,
  8518. size,
  8519. findFlags,
  8520. startTime,
  8521. &foundTime,
  8522. &foundDuration,
  8523. &offset);
  8524. _res = Py_BuildValue("llll",
  8525. _rv,
  8526. foundTime,
  8527. foundDuration,
  8528. offset);
  8529. return _res;
  8530. }
  8531. static PyObject *Qt_TextMediaHiliteTextSample(PyObject *_self, PyObject *_args)
  8532. {
  8533. PyObject *_res = NULL;
  8534. ComponentResult _rv;
  8535. MediaHandler mh;
  8536. TimeValue sampleTime;
  8537. short hiliteStart;
  8538. short hiliteEnd;
  8539. RGBColor rgbHiliteColor;
  8540. #ifndef TextMediaHiliteTextSample
  8541. PyMac_PRECHECK(TextMediaHiliteTextSample);
  8542. #endif
  8543. if (!PyArg_ParseTuple(_args, "O&lhh",
  8544. CmpInstObj_Convert, &mh,
  8545. &sampleTime,
  8546. &hiliteStart,
  8547. &hiliteEnd))
  8548. return NULL;
  8549. _rv = TextMediaHiliteTextSample(mh,
  8550. sampleTime,
  8551. hiliteStart,
  8552. hiliteEnd,
  8553. &rgbHiliteColor);
  8554. _res = Py_BuildValue("lO&",
  8555. _rv,
  8556. QdRGB_New, &rgbHiliteColor);
  8557. return _res;
  8558. }
  8559. static PyObject *Qt_TextMediaSetTextSampleData(PyObject *_self, PyObject *_args)
  8560. {
  8561. PyObject *_res = NULL;
  8562. ComponentResult _rv;
  8563. MediaHandler mh;
  8564. void * data;
  8565. OSType dataType;
  8566. #ifndef TextMediaSetTextSampleData
  8567. PyMac_PRECHECK(TextMediaSetTextSampleData);
  8568. #endif
  8569. if (!PyArg_ParseTuple(_args, "O&sO&",
  8570. CmpInstObj_Convert, &mh,
  8571. &data,
  8572. PyMac_GetOSType, &dataType))
  8573. return NULL;
  8574. _rv = TextMediaSetTextSampleData(mh,
  8575. data,
  8576. dataType);
  8577. _res = Py_BuildValue("l",
  8578. _rv);
  8579. return _res;
  8580. }
  8581. static PyObject *Qt_SpriteMediaSetProperty(PyObject *_self, PyObject *_args)
  8582. {
  8583. PyObject *_res = NULL;
  8584. ComponentResult _rv;
  8585. MediaHandler mh;
  8586. short spriteIndex;
  8587. long propertyType;
  8588. void * propertyValue;
  8589. #ifndef SpriteMediaSetProperty
  8590. PyMac_PRECHECK(SpriteMediaSetProperty);
  8591. #endif
  8592. if (!PyArg_ParseTuple(_args, "O&hls",
  8593. CmpInstObj_Convert, &mh,
  8594. &spriteIndex,
  8595. &propertyType,
  8596. &propertyValue))
  8597. return NULL;
  8598. _rv = SpriteMediaSetProperty(mh,
  8599. spriteIndex,
  8600. propertyType,
  8601. propertyValue);
  8602. _res = Py_BuildValue("l",
  8603. _rv);
  8604. return _res;
  8605. }
  8606. static PyObject *Qt_SpriteMediaGetProperty(PyObject *_self, PyObject *_args)
  8607. {
  8608. PyObject *_res = NULL;
  8609. ComponentResult _rv;
  8610. MediaHandler mh;
  8611. short spriteIndex;
  8612. long propertyType;
  8613. void * propertyValue;
  8614. #ifndef SpriteMediaGetProperty
  8615. PyMac_PRECHECK(SpriteMediaGetProperty);
  8616. #endif
  8617. if (!PyArg_ParseTuple(_args, "O&hls",
  8618. CmpInstObj_Convert, &mh,
  8619. &spriteIndex,
  8620. &propertyType,
  8621. &propertyValue))
  8622. return NULL;
  8623. _rv = SpriteMediaGetProperty(mh,
  8624. spriteIndex,
  8625. propertyType,
  8626. propertyValue);
  8627. _res = Py_BuildValue("l",
  8628. _rv);
  8629. return _res;
  8630. }
  8631. static PyObject *Qt_SpriteMediaHitTestSprites(PyObject *_self, PyObject *_args)
  8632. {
  8633. PyObject *_res = NULL;
  8634. ComponentResult _rv;
  8635. MediaHandler mh;
  8636. long flags;
  8637. Point loc;
  8638. short spriteHitIndex;
  8639. #ifndef SpriteMediaHitTestSprites
  8640. PyMac_PRECHECK(SpriteMediaHitTestSprites);
  8641. #endif
  8642. if (!PyArg_ParseTuple(_args, "O&lO&",
  8643. CmpInstObj_Convert, &mh,
  8644. &flags,
  8645. PyMac_GetPoint, &loc))
  8646. return NULL;
  8647. _rv = SpriteMediaHitTestSprites(mh,
  8648. flags,
  8649. loc,
  8650. &spriteHitIndex);
  8651. _res = Py_BuildValue("lh",
  8652. _rv,
  8653. spriteHitIndex);
  8654. return _res;
  8655. }
  8656. static PyObject *Qt_SpriteMediaCountSprites(PyObject *_self, PyObject *_args)
  8657. {
  8658. PyObject *_res = NULL;
  8659. ComponentResult _rv;
  8660. MediaHandler mh;
  8661. short numSprites;
  8662. #ifndef SpriteMediaCountSprites
  8663. PyMac_PRECHECK(SpriteMediaCountSprites);
  8664. #endif
  8665. if (!PyArg_ParseTuple(_args, "O&",
  8666. CmpInstObj_Convert, &mh))
  8667. return NULL;
  8668. _rv = SpriteMediaCountSprites(mh,
  8669. &numSprites);
  8670. _res = Py_BuildValue("lh",
  8671. _rv,
  8672. numSprites);
  8673. return _res;
  8674. }
  8675. static PyObject *Qt_SpriteMediaCountImages(PyObject *_self, PyObject *_args)
  8676. {
  8677. PyObject *_res = NULL;
  8678. ComponentResult _rv;
  8679. MediaHandler mh;
  8680. short numImages;
  8681. #ifndef SpriteMediaCountImages
  8682. PyMac_PRECHECK(SpriteMediaCountImages);
  8683. #endif
  8684. if (!PyArg_ParseTuple(_args, "O&",
  8685. CmpInstObj_Convert, &mh))
  8686. return NULL;
  8687. _rv = SpriteMediaCountImages(mh,
  8688. &numImages);
  8689. _res = Py_BuildValue("lh",
  8690. _rv,
  8691. numImages);
  8692. return _res;
  8693. }
  8694. static PyObject *Qt_SpriteMediaGetIndImageDescription(PyObject *_self, PyObject *_args)
  8695. {
  8696. PyObject *_res = NULL;
  8697. ComponentResult _rv;
  8698. MediaHandler mh;
  8699. short imageIndex;
  8700. ImageDescriptionHandle imageDescription;
  8701. #ifndef SpriteMediaGetIndImageDescription
  8702. PyMac_PRECHECK(SpriteMediaGetIndImageDescription);
  8703. #endif
  8704. if (!PyArg_ParseTuple(_args, "O&hO&",
  8705. CmpInstObj_Convert, &mh,
  8706. &imageIndex,
  8707. ResObj_Convert, &imageDescription))
  8708. return NULL;
  8709. _rv = SpriteMediaGetIndImageDescription(mh,
  8710. imageIndex,
  8711. imageDescription);
  8712. _res = Py_BuildValue("l",
  8713. _rv);
  8714. return _res;
  8715. }
  8716. static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(PyObject *_self, PyObject *_args)
  8717. {
  8718. PyObject *_res = NULL;
  8719. ComponentResult _rv;
  8720. MediaHandler mh;
  8721. long sampleNum;
  8722. #ifndef SpriteMediaGetDisplayedSampleNumber
  8723. PyMac_PRECHECK(SpriteMediaGetDisplayedSampleNumber);
  8724. #endif
  8725. if (!PyArg_ParseTuple(_args, "O&",
  8726. CmpInstObj_Convert, &mh))
  8727. return NULL;
  8728. _rv = SpriteMediaGetDisplayedSampleNumber(mh,
  8729. &sampleNum);
  8730. _res = Py_BuildValue("ll",
  8731. _rv,
  8732. sampleNum);
  8733. return _res;
  8734. }
  8735. static PyObject *Qt_SpriteMediaGetSpriteName(PyObject *_self, PyObject *_args)
  8736. {
  8737. PyObject *_res = NULL;
  8738. ComponentResult _rv;
  8739. MediaHandler mh;
  8740. QTAtomID spriteID;
  8741. Str255 spriteName;
  8742. #ifndef SpriteMediaGetSpriteName
  8743. PyMac_PRECHECK(SpriteMediaGetSpriteName);
  8744. #endif
  8745. if (!PyArg_ParseTuple(_args, "O&lO&",
  8746. CmpInstObj_Convert, &mh,
  8747. &spriteID,
  8748. PyMac_GetStr255, spriteName))
  8749. return NULL;
  8750. _rv = SpriteMediaGetSpriteName(mh,
  8751. spriteID,
  8752. spriteName);
  8753. _res = Py_BuildValue("l",
  8754. _rv);
  8755. return _res;
  8756. }
  8757. static PyObject *Qt_SpriteMediaGetImageName(PyObject *_self, PyObject *_args)
  8758. {
  8759. PyObject *_res = NULL;
  8760. ComponentResult _rv;
  8761. MediaHandler mh;
  8762. short imageIndex;
  8763. Str255 imageName;
  8764. #ifndef SpriteMediaGetImageName
  8765. PyMac_PRECHECK(SpriteMediaGetImageName);
  8766. #endif
  8767. if (!PyArg_ParseTuple(_args, "O&hO&",
  8768. CmpInstObj_Convert, &mh,
  8769. &imageIndex,
  8770. PyMac_GetStr255, imageName))
  8771. return NULL;
  8772. _rv = SpriteMediaGetImageName(mh,
  8773. imageIndex,
  8774. imageName);
  8775. _res = Py_BuildValue("l",
  8776. _rv);
  8777. return _res;
  8778. }
  8779. static PyObject *Qt_SpriteMediaSetSpriteProperty(PyObject *_self, PyObject *_args)
  8780. {
  8781. PyObject *_res = NULL;
  8782. ComponentResult _rv;
  8783. MediaHandler mh;
  8784. QTAtomID spriteID;
  8785. long propertyType;
  8786. void * propertyValue;
  8787. #ifndef SpriteMediaSetSpriteProperty
  8788. PyMac_PRECHECK(SpriteMediaSetSpriteProperty);
  8789. #endif
  8790. if (!PyArg_ParseTuple(_args, "O&lls",
  8791. CmpInstObj_Convert, &mh,
  8792. &spriteID,
  8793. &propertyType,
  8794. &propertyValue))
  8795. return NULL;
  8796. _rv = SpriteMediaSetSpriteProperty(mh,
  8797. spriteID,
  8798. propertyType,
  8799. propertyValue);
  8800. _res = Py_BuildValue("l",
  8801. _rv);
  8802. return _res;
  8803. }
  8804. static PyObject *Qt_SpriteMediaGetSpriteProperty(PyObject *_self, PyObject *_args)
  8805. {
  8806. PyObject *_res = NULL;
  8807. ComponentResult _rv;
  8808. MediaHandler mh;
  8809. QTAtomID spriteID;
  8810. long propertyType;
  8811. void * propertyValue;
  8812. #ifndef SpriteMediaGetSpriteProperty
  8813. PyMac_PRECHECK(SpriteMediaGetSpriteProperty);
  8814. #endif
  8815. if (!PyArg_ParseTuple(_args, "O&lls",
  8816. CmpInstObj_Convert, &mh,
  8817. &spriteID,
  8818. &propertyType,
  8819. &propertyValue))
  8820. return NULL;
  8821. _rv = SpriteMediaGetSpriteProperty(mh,
  8822. spriteID,
  8823. propertyType,
  8824. propertyValue);
  8825. _res = Py_BuildValue("l",
  8826. _rv);
  8827. return _res;
  8828. }
  8829. static PyObject *Qt_SpriteMediaHitTestAllSprites(PyObject *_self, PyObject *_args)
  8830. {
  8831. PyObject *_res = NULL;
  8832. ComponentResult _rv;
  8833. MediaHandler mh;
  8834. long flags;
  8835. Point loc;
  8836. QTAtomID spriteHitID;
  8837. #ifndef SpriteMediaHitTestAllSprites
  8838. PyMac_PRECHECK(SpriteMediaHitTestAllSprites);
  8839. #endif
  8840. if (!PyArg_ParseTuple(_args, "O&lO&",
  8841. CmpInstObj_Convert, &mh,
  8842. &flags,
  8843. PyMac_GetPoint, &loc))
  8844. return NULL;
  8845. _rv = SpriteMediaHitTestAllSprites(mh,
  8846. flags,
  8847. loc,
  8848. &spriteHitID);
  8849. _res = Py_BuildValue("ll",
  8850. _rv,
  8851. spriteHitID);
  8852. return _res;
  8853. }
  8854. static PyObject *Qt_SpriteMediaHitTestOneSprite(PyObject *_self, PyObject *_args)
  8855. {
  8856. PyObject *_res = NULL;
  8857. ComponentResult _rv;
  8858. MediaHandler mh;
  8859. QTAtomID spriteID;
  8860. long flags;
  8861. Point loc;
  8862. Boolean wasHit;
  8863. #ifndef SpriteMediaHitTestOneSprite
  8864. PyMac_PRECHECK(SpriteMediaHitTestOneSprite);
  8865. #endif
  8866. if (!PyArg_ParseTuple(_args, "O&llO&",
  8867. CmpInstObj_Convert, &mh,
  8868. &spriteID,
  8869. &flags,
  8870. PyMac_GetPoint, &loc))
  8871. return NULL;
  8872. _rv = SpriteMediaHitTestOneSprite(mh,
  8873. spriteID,
  8874. flags,
  8875. loc,
  8876. &wasHit);
  8877. _res = Py_BuildValue("lb",
  8878. _rv,
  8879. wasHit);
  8880. return _res;
  8881. }
  8882. static PyObject *Qt_SpriteMediaSpriteIndexToID(PyObject *_self, PyObject *_args)
  8883. {
  8884. PyObject *_res = NULL;
  8885. ComponentResult _rv;
  8886. MediaHandler mh;
  8887. short spriteIndex;
  8888. QTAtomID spriteID;
  8889. #ifndef SpriteMediaSpriteIndexToID
  8890. PyMac_PRECHECK(SpriteMediaSpriteIndexToID);
  8891. #endif
  8892. if (!PyArg_ParseTuple(_args, "O&h",
  8893. CmpInstObj_Convert, &mh,
  8894. &spriteIndex))
  8895. return NULL;
  8896. _rv = SpriteMediaSpriteIndexToID(mh,
  8897. spriteIndex,
  8898. &spriteID);
  8899. _res = Py_BuildValue("ll",
  8900. _rv,
  8901. spriteID);
  8902. return _res;
  8903. }
  8904. static PyObject *Qt_SpriteMediaSpriteIDToIndex(PyObject *_self, PyObject *_args)
  8905. {
  8906. PyObject *_res = NULL;
  8907. ComponentResult _rv;
  8908. MediaHandler mh;
  8909. QTAtomID spriteID;
  8910. short spriteIndex;
  8911. #ifndef SpriteMediaSpriteIDToIndex
  8912. PyMac_PRECHECK(SpriteMediaSpriteIDToIndex);
  8913. #endif
  8914. if (!PyArg_ParseTuple(_args, "O&l",
  8915. CmpInstObj_Convert, &mh,
  8916. &spriteID))
  8917. return NULL;
  8918. _rv = SpriteMediaSpriteIDToIndex(mh,
  8919. spriteID,
  8920. &spriteIndex);
  8921. _res = Py_BuildValue("lh",
  8922. _rv,
  8923. spriteIndex);
  8924. return _res;
  8925. }
  8926. static PyObject *Qt_SpriteMediaSetActionVariable(PyObject *_self, PyObject *_args)
  8927. {
  8928. PyObject *_res = NULL;
  8929. ComponentResult _rv;
  8930. MediaHandler mh;
  8931. QTAtomID variableID;
  8932. float value;
  8933. #ifndef SpriteMediaSetActionVariable
  8934. PyMac_PRECHECK(SpriteMediaSetActionVariable);
  8935. #endif
  8936. if (!PyArg_ParseTuple(_args, "O&lf",
  8937. CmpInstObj_Convert, &mh,
  8938. &variableID,
  8939. &value))
  8940. return NULL;
  8941. _rv = SpriteMediaSetActionVariable(mh,
  8942. variableID,
  8943. &value);
  8944. _res = Py_BuildValue("l",
  8945. _rv);
  8946. return _res;
  8947. }
  8948. static PyObject *Qt_SpriteMediaGetActionVariable(PyObject *_self, PyObject *_args)
  8949. {
  8950. PyObject *_res = NULL;
  8951. ComponentResult _rv;
  8952. MediaHandler mh;
  8953. QTAtomID variableID;
  8954. float value;
  8955. #ifndef SpriteMediaGetActionVariable
  8956. PyMac_PRECHECK(SpriteMediaGetActionVariable);
  8957. #endif
  8958. if (!PyArg_ParseTuple(_args, "O&l",
  8959. CmpInstObj_Convert, &mh,
  8960. &variableID))
  8961. return NULL;
  8962. _rv = SpriteMediaGetActionVariable(mh,
  8963. variableID,
  8964. &value);
  8965. _res = Py_BuildValue("lf",
  8966. _rv,
  8967. value);
  8968. return _res;
  8969. }
  8970. static PyObject *Qt_SpriteMediaDisposeSprite(PyObject *_self, PyObject *_args)
  8971. {
  8972. PyObject *_res = NULL;
  8973. ComponentResult _rv;
  8974. MediaHandler mh;
  8975. QTAtomID spriteID;
  8976. #ifndef SpriteMediaDisposeSprite
  8977. PyMac_PRECHECK(SpriteMediaDisposeSprite);
  8978. #endif
  8979. if (!PyArg_ParseTuple(_args, "O&l",
  8980. CmpInstObj_Convert, &mh,
  8981. &spriteID))
  8982. return NULL;
  8983. _rv = SpriteMediaDisposeSprite(mh,
  8984. spriteID);
  8985. _res = Py_BuildValue("l",
  8986. _rv);
  8987. return _res;
  8988. }
  8989. static PyObject *Qt_SpriteMediaSetActionVariableToString(PyObject *_self, PyObject *_args)
  8990. {
  8991. PyObject *_res = NULL;
  8992. ComponentResult _rv;
  8993. MediaHandler mh;
  8994. QTAtomID variableID;
  8995. Ptr theCString;
  8996. #ifndef SpriteMediaSetActionVariableToString
  8997. PyMac_PRECHECK(SpriteMediaSetActionVariableToString);
  8998. #endif
  8999. if (!PyArg_ParseTuple(_args, "O&ls",
  9000. CmpInstObj_Convert, &mh,
  9001. &variableID,
  9002. &theCString))
  9003. return NULL;
  9004. _rv = SpriteMediaSetActionVariableToString(mh,
  9005. variableID,
  9006. theCString);
  9007. _res = Py_BuildValue("l",
  9008. _rv);
  9009. return _res;
  9010. }
  9011. static PyObject *Qt_SpriteMediaGetActionVariableAsString(PyObject *_self, PyObject *_args)
  9012. {
  9013. PyObject *_res = NULL;
  9014. ComponentResult _rv;
  9015. MediaHandler mh;
  9016. QTAtomID variableID;
  9017. Handle theCString;
  9018. #ifndef SpriteMediaGetActionVariableAsString
  9019. PyMac_PRECHECK(SpriteMediaGetActionVariableAsString);
  9020. #endif
  9021. if (!PyArg_ParseTuple(_args, "O&l",
  9022. CmpInstObj_Convert, &mh,
  9023. &variableID))
  9024. return NULL;
  9025. _rv = SpriteMediaGetActionVariableAsString(mh,
  9026. variableID,
  9027. &theCString);
  9028. _res = Py_BuildValue("lO&",
  9029. _rv,
  9030. ResObj_New, theCString);
  9031. return _res;
  9032. }
  9033. static PyObject *Qt_SpriteMediaNewImage(PyObject *_self, PyObject *_args)
  9034. {
  9035. PyObject *_res = NULL;
  9036. ComponentResult _rv;
  9037. MediaHandler mh;
  9038. Handle dataRef;
  9039. OSType dataRefType;
  9040. QTAtomID desiredID;
  9041. #ifndef SpriteMediaNewImage
  9042. PyMac_PRECHECK(SpriteMediaNewImage);
  9043. #endif
  9044. if (!PyArg_ParseTuple(_args, "O&O&O&l",
  9045. CmpInstObj_Convert, &mh,
  9046. ResObj_Convert, &dataRef,
  9047. PyMac_GetOSType, &dataRefType,
  9048. &desiredID))
  9049. return NULL;
  9050. _rv = SpriteMediaNewImage(mh,
  9051. dataRef,
  9052. dataRefType,
  9053. desiredID);
  9054. _res = Py_BuildValue("l",
  9055. _rv);
  9056. return _res;
  9057. }
  9058. static PyObject *Qt_SpriteMediaDisposeImage(PyObject *_self, PyObject *_args)
  9059. {
  9060. PyObject *_res = NULL;
  9061. ComponentResult _rv;
  9062. MediaHandler mh;
  9063. short imageIndex;
  9064. #ifndef SpriteMediaDisposeImage
  9065. PyMac_PRECHECK(SpriteMediaDisposeImage);
  9066. #endif
  9067. if (!PyArg_ParseTuple(_args, "O&h",
  9068. CmpInstObj_Convert, &mh,
  9069. &imageIndex))
  9070. return NULL;
  9071. _rv = SpriteMediaDisposeImage(mh,
  9072. imageIndex);
  9073. _res = Py_BuildValue("l",
  9074. _rv);
  9075. return _res;
  9076. }
  9077. static PyObject *Qt_SpriteMediaImageIndexToID(PyObject *_self, PyObject *_args)
  9078. {
  9079. PyObject *_res = NULL;
  9080. ComponentResult _rv;
  9081. MediaHandler mh;
  9082. short imageIndex;
  9083. QTAtomID imageID;
  9084. #ifndef SpriteMediaImageIndexToID
  9085. PyMac_PRECHECK(SpriteMediaImageIndexToID);
  9086. #endif
  9087. if (!PyArg_ParseTuple(_args, "O&h",
  9088. CmpInstObj_Convert, &mh,
  9089. &imageIndex))
  9090. return NULL;
  9091. _rv = SpriteMediaImageIndexToID(mh,
  9092. imageIndex,
  9093. &imageID);
  9094. _res = Py_BuildValue("ll",
  9095. _rv,
  9096. imageID);
  9097. return _res;
  9098. }
  9099. static PyObject *Qt_SpriteMediaImageIDToIndex(PyObject *_self, PyObject *_args)
  9100. {
  9101. PyObject *_res = NULL;
  9102. ComponentResult _rv;
  9103. MediaHandler mh;
  9104. QTAtomID imageID;
  9105. short imageIndex;
  9106. #ifndef SpriteMediaImageIDToIndex
  9107. PyMac_PRECHECK(SpriteMediaImageIDToIndex);
  9108. #endif
  9109. if (!PyArg_ParseTuple(_args, "O&l",
  9110. CmpInstObj_Convert, &mh,
  9111. &imageID))
  9112. return NULL;
  9113. _rv = SpriteMediaImageIDToIndex(mh,
  9114. imageID,
  9115. &imageIndex);
  9116. _res = Py_BuildValue("lh",
  9117. _rv,
  9118. imageIndex);
  9119. return _res;
  9120. }
  9121. static PyObject *Qt_FlashMediaSetPan(PyObject *_self, PyObject *_args)
  9122. {
  9123. PyObject *_res = NULL;
  9124. ComponentResult _rv;
  9125. MediaHandler mh;
  9126. short xPercent;
  9127. short yPercent;
  9128. #ifndef FlashMediaSetPan
  9129. PyMac_PRECHECK(FlashMediaSetPan);
  9130. #endif
  9131. if (!PyArg_ParseTuple(_args, "O&hh",
  9132. CmpInstObj_Convert, &mh,
  9133. &xPercent,
  9134. &yPercent))
  9135. return NULL;
  9136. _rv = FlashMediaSetPan(mh,
  9137. xPercent,
  9138. yPercent);
  9139. _res = Py_BuildValue("l",
  9140. _rv);
  9141. return _res;
  9142. }
  9143. static PyObject *Qt_FlashMediaSetZoom(PyObject *_self, PyObject *_args)
  9144. {
  9145. PyObject *_res = NULL;
  9146. ComponentResult _rv;
  9147. MediaHandler mh;
  9148. short factor;
  9149. #ifndef FlashMediaSetZoom
  9150. PyMac_PRECHECK(FlashMediaSetZoom);
  9151. #endif
  9152. if (!PyArg_ParseTuple(_args, "O&h",
  9153. CmpInstObj_Convert, &mh,
  9154. &factor))
  9155. return NULL;
  9156. _rv = FlashMediaSetZoom(mh,
  9157. factor);
  9158. _res = Py_BuildValue("l",
  9159. _rv);
  9160. return _res;
  9161. }
  9162. static PyObject *Qt_FlashMediaSetZoomRect(PyObject *_self, PyObject *_args)
  9163. {
  9164. PyObject *_res = NULL;
  9165. ComponentResult _rv;
  9166. MediaHandler mh;
  9167. long left;
  9168. long top;
  9169. long right;
  9170. long bottom;
  9171. #ifndef FlashMediaSetZoomRect
  9172. PyMac_PRECHECK(FlashMediaSetZoomRect);
  9173. #endif
  9174. if (!PyArg_ParseTuple(_args, "O&llll",
  9175. CmpInstObj_Convert, &mh,
  9176. &left,
  9177. &top,
  9178. &right,
  9179. &bottom))
  9180. return NULL;
  9181. _rv = FlashMediaSetZoomRect(mh,
  9182. left,
  9183. top,
  9184. right,
  9185. bottom);
  9186. _res = Py_BuildValue("l",
  9187. _rv);
  9188. return _res;
  9189. }
  9190. static PyObject *Qt_FlashMediaGetRefConBounds(PyObject *_self, PyObject *_args)
  9191. {
  9192. PyObject *_res = NULL;
  9193. ComponentResult _rv;
  9194. MediaHandler mh;
  9195. long refCon;
  9196. long left;
  9197. long top;
  9198. long right;
  9199. long bottom;
  9200. #ifndef FlashMediaGetRefConBounds
  9201. PyMac_PRECHECK(FlashMediaGetRefConBounds);
  9202. #endif
  9203. if (!PyArg_ParseTuple(_args, "O&l",
  9204. CmpInstObj_Convert, &mh,
  9205. &refCon))
  9206. return NULL;
  9207. _rv = FlashMediaGetRefConBounds(mh,
  9208. refCon,
  9209. &left,
  9210. &top,
  9211. &right,
  9212. &bottom);
  9213. _res = Py_BuildValue("lllll",
  9214. _rv,
  9215. left,
  9216. top,
  9217. right,
  9218. bottom);
  9219. return _res;
  9220. }
  9221. static PyObject *Qt_FlashMediaGetRefConID(PyObject *_self, PyObject *_args)
  9222. {
  9223. PyObject *_res = NULL;
  9224. ComponentResult _rv;
  9225. MediaHandler mh;
  9226. long refCon;
  9227. long refConID;
  9228. #ifndef FlashMediaGetRefConID
  9229. PyMac_PRECHECK(FlashMediaGetRefConID);
  9230. #endif
  9231. if (!PyArg_ParseTuple(_args, "O&l",
  9232. CmpInstObj_Convert, &mh,
  9233. &refCon))
  9234. return NULL;
  9235. _rv = FlashMediaGetRefConID(mh,
  9236. refCon,
  9237. &refConID);
  9238. _res = Py_BuildValue("ll",
  9239. _rv,
  9240. refConID);
  9241. return _res;
  9242. }
  9243. static PyObject *Qt_FlashMediaIDToRefCon(PyObject *_self, PyObject *_args)
  9244. {
  9245. PyObject *_res = NULL;
  9246. ComponentResult _rv;
  9247. MediaHandler mh;
  9248. long refConID;
  9249. long refCon;
  9250. #ifndef FlashMediaIDToRefCon
  9251. PyMac_PRECHECK(FlashMediaIDToRefCon);
  9252. #endif
  9253. if (!PyArg_ParseTuple(_args, "O&l",
  9254. CmpInstObj_Convert, &mh,
  9255. &refConID))
  9256. return NULL;
  9257. _rv = FlashMediaIDToRefCon(mh,
  9258. refConID,
  9259. &refCon);
  9260. _res = Py_BuildValue("ll",
  9261. _rv,
  9262. refCon);
  9263. return _res;
  9264. }
  9265. static PyObject *Qt_FlashMediaGetDisplayedFrameNumber(PyObject *_self, PyObject *_args)
  9266. {
  9267. PyObject *_res = NULL;
  9268. ComponentResult _rv;
  9269. MediaHandler mh;
  9270. long flashFrameNumber;
  9271. #ifndef FlashMediaGetDisplayedFrameNumber
  9272. PyMac_PRECHECK(FlashMediaGetDisplayedFrameNumber);
  9273. #endif
  9274. if (!PyArg_ParseTuple(_args, "O&",
  9275. CmpInstObj_Convert, &mh))
  9276. return NULL;
  9277. _rv = FlashMediaGetDisplayedFrameNumber(mh,
  9278. &flashFrameNumber);
  9279. _res = Py_BuildValue("ll",
  9280. _rv,
  9281. flashFrameNumber);
  9282. return _res;
  9283. }
  9284. static PyObject *Qt_FlashMediaFrameNumberToMovieTime(PyObject *_self, PyObject *_args)
  9285. {
  9286. PyObject *_res = NULL;
  9287. ComponentResult _rv;
  9288. MediaHandler mh;
  9289. long flashFrameNumber;
  9290. TimeValue movieTime;
  9291. #ifndef FlashMediaFrameNumberToMovieTime
  9292. PyMac_PRECHECK(FlashMediaFrameNumberToMovieTime);
  9293. #endif
  9294. if (!PyArg_ParseTuple(_args, "O&l",
  9295. CmpInstObj_Convert, &mh,
  9296. &flashFrameNumber))
  9297. return NULL;
  9298. _rv = FlashMediaFrameNumberToMovieTime(mh,
  9299. flashFrameNumber,
  9300. &movieTime);
  9301. _res = Py_BuildValue("ll",
  9302. _rv,
  9303. movieTime);
  9304. return _res;
  9305. }
  9306. static PyObject *Qt_FlashMediaFrameLabelToMovieTime(PyObject *_self, PyObject *_args)
  9307. {
  9308. PyObject *_res = NULL;
  9309. ComponentResult _rv;
  9310. MediaHandler mh;
  9311. Ptr theLabel;
  9312. TimeValue movieTime;
  9313. #ifndef FlashMediaFrameLabelToMovieTime
  9314. PyMac_PRECHECK(FlashMediaFrameLabelToMovieTime);
  9315. #endif
  9316. if (!PyArg_ParseTuple(_args, "O&s",
  9317. CmpInstObj_Convert, &mh,
  9318. &theLabel))
  9319. return NULL;
  9320. _rv = FlashMediaFrameLabelToMovieTime(mh,
  9321. theLabel,
  9322. &movieTime);
  9323. _res = Py_BuildValue("ll",
  9324. _rv,
  9325. movieTime);
  9326. return _res;
  9327. }
  9328. static PyObject *Qt_FlashMediaGetFlashVariable(PyObject *_self, PyObject *_args)
  9329. {
  9330. PyObject *_res = NULL;
  9331. ComponentResult _rv;
  9332. MediaHandler mh;
  9333. char path;
  9334. char name;
  9335. Handle theVariableCStringOut;
  9336. #ifndef FlashMediaGetFlashVariable
  9337. PyMac_PRECHECK(FlashMediaGetFlashVariable);
  9338. #endif
  9339. if (!PyArg_ParseTuple(_args, "O&",
  9340. CmpInstObj_Convert, &mh))
  9341. return NULL;
  9342. _rv = FlashMediaGetFlashVariable(mh,
  9343. &path,
  9344. &name,
  9345. &theVariableCStringOut);
  9346. _res = Py_BuildValue("lccO&",
  9347. _rv,
  9348. path,
  9349. name,
  9350. ResObj_New, theVariableCStringOut);
  9351. return _res;
  9352. }
  9353. static PyObject *Qt_FlashMediaSetFlashVariable(PyObject *_self, PyObject *_args)
  9354. {
  9355. PyObject *_res = NULL;
  9356. ComponentResult _rv;
  9357. MediaHandler mh;
  9358. char path;
  9359. char name;
  9360. char value;
  9361. Boolean updateFocus;
  9362. #ifndef FlashMediaSetFlashVariable
  9363. PyMac_PRECHECK(FlashMediaSetFlashVariable);
  9364. #endif
  9365. if (!PyArg_ParseTuple(_args, "O&b",
  9366. CmpInstObj_Convert, &mh,
  9367. &updateFocus))
  9368. return NULL;
  9369. _rv = FlashMediaSetFlashVariable(mh,
  9370. &path,
  9371. &name,
  9372. &value,
  9373. updateFocus);
  9374. _res = Py_BuildValue("lccc",
  9375. _rv,
  9376. path,
  9377. name,
  9378. value);
  9379. return _res;
  9380. }
  9381. static PyObject *Qt_FlashMediaDoButtonActions(PyObject *_self, PyObject *_args)
  9382. {
  9383. PyObject *_res = NULL;
  9384. ComponentResult _rv;
  9385. MediaHandler mh;
  9386. char path;
  9387. long buttonID;
  9388. long transition;
  9389. #ifndef FlashMediaDoButtonActions
  9390. PyMac_PRECHECK(FlashMediaDoButtonActions);
  9391. #endif
  9392. if (!PyArg_ParseTuple(_args, "O&ll",
  9393. CmpInstObj_Convert, &mh,
  9394. &buttonID,
  9395. &transition))
  9396. return NULL;
  9397. _rv = FlashMediaDoButtonActions(mh,
  9398. &path,
  9399. buttonID,
  9400. transition);
  9401. _res = Py_BuildValue("lc",
  9402. _rv,
  9403. path);
  9404. return _res;
  9405. }
  9406. static PyObject *Qt_FlashMediaGetSupportedSwfVersion(PyObject *_self, PyObject *_args)
  9407. {
  9408. PyObject *_res = NULL;
  9409. ComponentResult _rv;
  9410. MediaHandler mh;
  9411. UInt8 swfVersion;
  9412. #ifndef FlashMediaGetSupportedSwfVersion
  9413. PyMac_PRECHECK(FlashMediaGetSupportedSwfVersion);
  9414. #endif
  9415. if (!PyArg_ParseTuple(_args, "O&",
  9416. CmpInstObj_Convert, &mh))
  9417. return NULL;
  9418. _rv = FlashMediaGetSupportedSwfVersion(mh,
  9419. &swfVersion);
  9420. _res = Py_BuildValue("lb",
  9421. _rv,
  9422. swfVersion);
  9423. return _res;
  9424. }
  9425. static PyObject *Qt_Media3DGetCurrentGroup(PyObject *_self, PyObject *_args)
  9426. {
  9427. PyObject *_res = NULL;
  9428. ComponentResult _rv;
  9429. MediaHandler mh;
  9430. void * group;
  9431. #ifndef Media3DGetCurrentGroup
  9432. PyMac_PRECHECK(Media3DGetCurrentGroup);
  9433. #endif
  9434. if (!PyArg_ParseTuple(_args, "O&s",
  9435. CmpInstObj_Convert, &mh,
  9436. &group))
  9437. return NULL;
  9438. _rv = Media3DGetCurrentGroup(mh,
  9439. group);
  9440. _res = Py_BuildValue("l",
  9441. _rv);
  9442. return _res;
  9443. }
  9444. static PyObject *Qt_Media3DTranslateNamedObjectTo(PyObject *_self, PyObject *_args)
  9445. {
  9446. PyObject *_res = NULL;
  9447. ComponentResult _rv;
  9448. MediaHandler mh;
  9449. char objectName;
  9450. Fixed x;
  9451. Fixed y;
  9452. Fixed z;
  9453. #ifndef Media3DTranslateNamedObjectTo
  9454. PyMac_PRECHECK(Media3DTranslateNamedObjectTo);
  9455. #endif
  9456. if (!PyArg_ParseTuple(_args, "O&O&O&O&",
  9457. CmpInstObj_Convert, &mh,
  9458. PyMac_GetFixed, &x,
  9459. PyMac_GetFixed, &y,
  9460. PyMac_GetFixed, &z))
  9461. return NULL;
  9462. _rv = Media3DTranslateNamedObjectTo(mh,
  9463. &objectName,
  9464. x,
  9465. y,
  9466. z);
  9467. _res = Py_BuildValue("lc",
  9468. _rv,
  9469. objectName);
  9470. return _res;
  9471. }
  9472. static PyObject *Qt_Media3DScaleNamedObjectTo(PyObject *_self, PyObject *_args)
  9473. {
  9474. PyObject *_res = NULL;
  9475. ComponentResult _rv;
  9476. MediaHandler mh;
  9477. char objectName;
  9478. Fixed xScale;
  9479. Fixed yScale;
  9480. Fixed zScale;
  9481. #ifndef Media3DScaleNamedObjectTo
  9482. PyMac_PRECHECK(Media3DScaleNamedObjectTo);
  9483. #endif
  9484. if (!PyArg_ParseTuple(_args, "O&O&O&O&",
  9485. CmpInstObj_Convert, &mh,
  9486. PyMac_GetFixed, &xScale,
  9487. PyMac_GetFixed, &yScale,
  9488. PyMac_GetFixed, &zScale))
  9489. return NULL;
  9490. _rv = Media3DScaleNamedObjectTo(mh,
  9491. &objectName,
  9492. xScale,
  9493. yScale,
  9494. zScale);
  9495. _res = Py_BuildValue("lc",
  9496. _rv,
  9497. objectName);
  9498. return _res;
  9499. }
  9500. static PyObject *Qt_Media3DRotateNamedObjectTo(PyObject *_self, PyObject *_args)
  9501. {
  9502. PyObject *_res = NULL;
  9503. ComponentResult _rv;
  9504. MediaHandler mh;
  9505. char objectName;
  9506. Fixed xDegrees;
  9507. Fixed yDegrees;
  9508. Fixed zDegrees;
  9509. #ifndef Media3DRotateNamedObjectTo
  9510. PyMac_PRECHECK(Media3DRotateNamedObjectTo);
  9511. #endif
  9512. if (!PyArg_ParseTuple(_args, "O&O&O&O&",
  9513. CmpInstObj_Convert, &mh,
  9514. PyMac_GetFixed, &xDegrees,
  9515. PyMac_GetFixed, &yDegrees,
  9516. PyMac_GetFixed, &zDegrees))
  9517. return NULL;
  9518. _rv = Media3DRotateNamedObjectTo(mh,
  9519. &objectName,
  9520. xDegrees,
  9521. yDegrees,
  9522. zDegrees);
  9523. _res = Py_BuildValue("lc",
  9524. _rv,
  9525. objectName);
  9526. return _res;
  9527. }
  9528. static PyObject *Qt_Media3DSetCameraData(PyObject *_self, PyObject *_args)
  9529. {
  9530. PyObject *_res = NULL;
  9531. ComponentResult _rv;
  9532. MediaHandler mh;
  9533. void * cameraData;
  9534. #ifndef Media3DSetCameraData
  9535. PyMac_PRECHECK(Media3DSetCameraData);
  9536. #endif
  9537. if (!PyArg_ParseTuple(_args, "O&s",
  9538. CmpInstObj_Convert, &mh,
  9539. &cameraData))
  9540. return NULL;
  9541. _rv = Media3DSetCameraData(mh,
  9542. cameraData);
  9543. _res = Py_BuildValue("l",
  9544. _rv);
  9545. return _res;
  9546. }
  9547. static PyObject *Qt_Media3DGetCameraData(PyObject *_self, PyObject *_args)
  9548. {
  9549. PyObject *_res = NULL;
  9550. ComponentResult _rv;
  9551. MediaHandler mh;
  9552. void * cameraData;
  9553. #ifndef Media3DGetCameraData
  9554. PyMac_PRECHECK(Media3DGetCameraData);
  9555. #endif
  9556. if (!PyArg_ParseTuple(_args, "O&s",
  9557. CmpInstObj_Convert, &mh,
  9558. &cameraData))
  9559. return NULL;
  9560. _rv = Media3DGetCameraData(mh,
  9561. cameraData);
  9562. _res = Py_BuildValue("l",
  9563. _rv);
  9564. return _res;
  9565. }
  9566. static PyObject *Qt_Media3DSetCameraAngleAspect(PyObject *_self, PyObject *_args)
  9567. {
  9568. PyObject *_res = NULL;
  9569. ComponentResult _rv;
  9570. MediaHandler mh;
  9571. QTFloatSingle fov;
  9572. QTFloatSingle aspectRatioXToY;
  9573. #ifndef Media3DSetCameraAngleAspect
  9574. PyMac_PRECHECK(Media3DSetCameraAngleAspect);
  9575. #endif
  9576. if (!PyArg_ParseTuple(_args, "O&ff",
  9577. CmpInstObj_Convert, &mh,
  9578. &fov,
  9579. &aspectRatioXToY))
  9580. return NULL;
  9581. _rv = Media3DSetCameraAngleAspect(mh,
  9582. fov,
  9583. aspectRatioXToY);
  9584. _res = Py_BuildValue("l",
  9585. _rv);
  9586. return _res;
  9587. }
  9588. static PyObject *Qt_Media3DGetCameraAngleAspect(PyObject *_self, PyObject *_args)
  9589. {
  9590. PyObject *_res = NULL;
  9591. ComponentResult _rv;
  9592. MediaHandler mh;
  9593. QTFloatSingle fov;
  9594. QTFloatSingle aspectRatioXToY;
  9595. #ifndef Media3DGetCameraAngleAspect
  9596. PyMac_PRECHECK(Media3DGetCameraAngleAspect);
  9597. #endif
  9598. if (!PyArg_ParseTuple(_args, "O&",
  9599. CmpInstObj_Convert, &mh))
  9600. return NULL;
  9601. _rv = Media3DGetCameraAngleAspect(mh,
  9602. &fov,
  9603. &aspectRatioXToY);
  9604. _res = Py_BuildValue("lff",
  9605. _rv,
  9606. fov,
  9607. aspectRatioXToY);
  9608. return _res;
  9609. }
  9610. static PyObject *Qt_Media3DSetCameraRange(PyObject *_self, PyObject *_args)
  9611. {
  9612. PyObject *_res = NULL;
  9613. ComponentResult _rv;
  9614. MediaHandler mh;
  9615. void * tQ3CameraRange;
  9616. #ifndef Media3DSetCameraRange
  9617. PyMac_PRECHECK(Media3DSetCameraRange);
  9618. #endif
  9619. if (!PyArg_ParseTuple(_args, "O&s",
  9620. CmpInstObj_Convert, &mh,
  9621. &tQ3CameraRange))
  9622. return NULL;
  9623. _rv = Media3DSetCameraRange(mh,
  9624. tQ3CameraRange);
  9625. _res = Py_BuildValue("l",
  9626. _rv);
  9627. return _res;
  9628. }
  9629. static PyObject *Qt_Media3DGetCameraRange(PyObject *_self, PyObject *_args)
  9630. {
  9631. PyObject *_res = NULL;
  9632. ComponentResult _rv;
  9633. MediaHandler mh;
  9634. void * tQ3CameraRange;
  9635. #ifndef Media3DGetCameraRange
  9636. PyMac_PRECHECK(Media3DGetCameraRange);
  9637. #endif
  9638. if (!PyArg_ParseTuple(_args, "O&s",
  9639. CmpInstObj_Convert, &mh,
  9640. &tQ3CameraRange))
  9641. return NULL;
  9642. _rv = Media3DGetCameraRange(mh,
  9643. tQ3CameraRange);
  9644. _res = Py_BuildValue("l",
  9645. _rv);
  9646. return _res;
  9647. }
  9648. static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args)
  9649. {
  9650. PyObject *_res = NULL;
  9651. TimeBase _rv;
  9652. #ifndef NewTimeBase
  9653. PyMac_PRECHECK(NewTimeBase);
  9654. #endif
  9655. if (!PyArg_ParseTuple(_args, ""))
  9656. return NULL;
  9657. _rv = NewTimeBase();
  9658. _res = Py_BuildValue("O&",
  9659. TimeBaseObj_New, _rv);
  9660. return _res;
  9661. }
  9662. static PyObject *Qt_ConvertTime(PyObject *_self, PyObject *_args)
  9663. {
  9664. PyObject *_res = NULL;
  9665. TimeRecord theTime;
  9666. TimeBase newBase;
  9667. #ifndef ConvertTime
  9668. PyMac_PRECHECK(ConvertTime);
  9669. #endif
  9670. if (!PyArg_ParseTuple(_args, "O&O&",
  9671. QtTimeRecord_Convert, &theTime,
  9672. TimeBaseObj_Convert, &newBase))
  9673. return NULL;
  9674. ConvertTime(&theTime,
  9675. newBase);
  9676. _res = Py_BuildValue("O&",
  9677. QtTimeRecord_New, &theTime);
  9678. return _res;
  9679. }
  9680. static PyObject *Qt_ConvertTimeScale(PyObject *_self, PyObject *_args)
  9681. {
  9682. PyObject *_res = NULL;
  9683. TimeRecord theTime;
  9684. TimeScale newScale;
  9685. #ifndef ConvertTimeScale
  9686. PyMac_PRECHECK(ConvertTimeScale);
  9687. #endif
  9688. if (!PyArg_ParseTuple(_args, "O&l",
  9689. QtTimeRecord_Convert, &theTime,
  9690. &newScale))
  9691. return NULL;
  9692. ConvertTimeScale(&theTime,
  9693. newScale);
  9694. _res = Py_BuildValue("O&",
  9695. QtTimeRecord_New, &theTime);
  9696. return _res;
  9697. }
  9698. static PyObject *Qt_AddTime(PyObject *_self, PyObject *_args)
  9699. {
  9700. PyObject *_res = NULL;
  9701. TimeRecord dst;
  9702. TimeRecord src;
  9703. #ifndef AddTime
  9704. PyMac_PRECHECK(AddTime);
  9705. #endif
  9706. if (!PyArg_ParseTuple(_args, "O&O&",
  9707. QtTimeRecord_Convert, &dst,
  9708. QtTimeRecord_Convert, &src))
  9709. return NULL;
  9710. AddTime(&dst,
  9711. &src);
  9712. _res = Py_BuildValue("O&",
  9713. QtTimeRecord_New, &dst);
  9714. return _res;
  9715. }
  9716. static PyObject *Qt_SubtractTime(PyObject *_self, PyObject *_args)
  9717. {
  9718. PyObject *_res = NULL;
  9719. TimeRecord dst;
  9720. TimeRecord src;
  9721. #ifndef SubtractTime
  9722. PyMac_PRECHECK(SubtractTime);
  9723. #endif
  9724. if (!PyArg_ParseTuple(_args, "O&O&",
  9725. QtTimeRecord_Convert, &dst,
  9726. QtTimeRecord_Convert, &src))
  9727. return NULL;
  9728. SubtractTime(&dst,
  9729. &src);
  9730. _res = Py_BuildValue("O&",
  9731. QtTimeRecord_New, &dst);
  9732. return _res;
  9733. }
  9734. static PyObject *Qt_MusicMediaGetIndexedTunePlayer(PyObject *_self, PyObject *_args)
  9735. {
  9736. PyObject *_res = NULL;
  9737. ComponentResult _rv;
  9738. ComponentInstance ti;
  9739. long sampleDescIndex;
  9740. ComponentInstance tp;
  9741. #ifndef MusicMediaGetIndexedTunePlayer
  9742. PyMac_PRECHECK(MusicMediaGetIndexedTunePlayer);
  9743. #endif
  9744. if (!PyArg_ParseTuple(_args, "O&l",
  9745. CmpInstObj_Convert, &ti,
  9746. &sampleDescIndex))
  9747. return NULL;
  9748. _rv = MusicMediaGetIndexedTunePlayer(ti,
  9749. sampleDescIndex,
  9750. &tp);
  9751. _res = Py_BuildValue("lO&",
  9752. _rv,
  9753. CmpInstObj_New, tp);
  9754. return _res;
  9755. }
  9756. static PyObject *Qt_CodecManagerVersion(PyObject *_self, PyObject *_args)
  9757. {
  9758. PyObject *_res = NULL;
  9759. OSErr _err;
  9760. long version;
  9761. #ifndef CodecManagerVersion
  9762. PyMac_PRECHECK(CodecManagerVersion);
  9763. #endif
  9764. if (!PyArg_ParseTuple(_args, ""))
  9765. return NULL;
  9766. _err = CodecManagerVersion(&version);
  9767. if (_err != noErr) return PyMac_Error(_err);
  9768. _res = Py_BuildValue("l",
  9769. version);
  9770. return _res;
  9771. }
  9772. static PyObject *Qt_GetMaxCompressionSize(PyObject *_self, PyObject *_args)
  9773. {
  9774. PyObject *_res = NULL;
  9775. OSErr _err;
  9776. PixMapHandle src;
  9777. Rect srcRect;
  9778. short colorDepth;
  9779. CodecQ quality;
  9780. CodecType cType;
  9781. CompressorComponent codec;
  9782. long size;
  9783. #ifndef GetMaxCompressionSize
  9784. PyMac_PRECHECK(GetMaxCompressionSize);
  9785. #endif
  9786. if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
  9787. ResObj_Convert, &src,
  9788. PyMac_GetRect, &srcRect,
  9789. &colorDepth,
  9790. &quality,
  9791. PyMac_GetOSType, &cType,
  9792. CmpObj_Convert, &codec))
  9793. return NULL;
  9794. _err = GetMaxCompressionSize(src,
  9795. &srcRect,
  9796. colorDepth,
  9797. quality,
  9798. cType,
  9799. codec,
  9800. &size);
  9801. if (_err != noErr) return PyMac_Error(_err);
  9802. _res = Py_BuildValue("l",
  9803. size);
  9804. return _res;
  9805. }
  9806. static PyObject *Qt_GetCompressionTime(PyObject *_self, PyObject *_args)
  9807. {
  9808. PyObject *_res = NULL;
  9809. OSErr _err;
  9810. PixMapHandle src;
  9811. Rect srcRect;
  9812. short colorDepth;
  9813. CodecType cType;
  9814. CompressorComponent codec;
  9815. CodecQ spatialQuality;
  9816. CodecQ temporalQuality;
  9817. unsigned long compressTime;
  9818. #ifndef GetCompressionTime
  9819. PyMac_PRECHECK(GetCompressionTime);
  9820. #endif
  9821. if (!PyArg_ParseTuple(_args, "O&O&hO&O&",
  9822. ResObj_Convert, &src,
  9823. PyMac_GetRect, &srcRect,
  9824. &colorDepth,
  9825. PyMac_GetOSType, &cType,
  9826. CmpObj_Convert, &codec))
  9827. return NULL;
  9828. _err = GetCompressionTime(src,
  9829. &srcRect,
  9830. colorDepth,
  9831. cType,
  9832. codec,
  9833. &spatialQuality,
  9834. &temporalQuality,
  9835. &compressTime);
  9836. if (_err != noErr) return PyMac_Error(_err);
  9837. _res = Py_BuildValue("lll",
  9838. spatialQuality,
  9839. temporalQuality,
  9840. compressTime);
  9841. return _res;
  9842. }
  9843. static PyObject *Qt_CompressImage(PyObject *_self, PyObject *_args)
  9844. {
  9845. PyObject *_res = NULL;
  9846. OSErr _err;
  9847. PixMapHandle src;
  9848. Rect srcRect;
  9849. CodecQ quality;
  9850. CodecType cType;
  9851. ImageDescriptionHandle desc;
  9852. Ptr data;
  9853. #ifndef CompressImage
  9854. PyMac_PRECHECK(CompressImage);
  9855. #endif
  9856. if (!PyArg_ParseTuple(_args, "O&O&lO&O&s",
  9857. ResObj_Convert, &src,
  9858. PyMac_GetRect, &srcRect,
  9859. &quality,
  9860. PyMac_GetOSType, &cType,
  9861. ResObj_Convert, &desc,
  9862. &data))
  9863. return NULL;
  9864. _err = CompressImage(src,
  9865. &srcRect,
  9866. quality,
  9867. cType,
  9868. desc,
  9869. data);
  9870. if (_err != noErr) return PyMac_Error(_err);
  9871. Py_INCREF(Py_None);
  9872. _res = Py_None;
  9873. return _res;
  9874. }
  9875. static PyObject *Qt_DecompressImage(PyObject *_self, PyObject *_args)
  9876. {
  9877. PyObject *_res = NULL;
  9878. OSErr _err;
  9879. Ptr data;
  9880. ImageDescriptionHandle desc;
  9881. PixMapHandle dst;
  9882. Rect srcRect;
  9883. Rect dstRect;
  9884. short mode;
  9885. RgnHandle mask;
  9886. #ifndef DecompressImage
  9887. PyMac_PRECHECK(DecompressImage);
  9888. #endif
  9889. if (!PyArg_ParseTuple(_args, "sO&O&O&O&hO&",
  9890. &data,
  9891. ResObj_Convert, &desc,
  9892. ResObj_Convert, &dst,
  9893. PyMac_GetRect, &srcRect,
  9894. PyMac_GetRect, &dstRect,
  9895. &mode,
  9896. ResObj_Convert, &mask))
  9897. return NULL;
  9898. _err = DecompressImage(data,
  9899. desc,
  9900. dst,
  9901. &srcRect,
  9902. &dstRect,
  9903. mode,
  9904. mask);
  9905. if (_err != noErr) return PyMac_Error(_err);
  9906. Py_INCREF(Py_None);
  9907. _res = Py_None;
  9908. return _res;
  9909. }
  9910. static PyObject *Qt_GetSimilarity(PyObject *_self, PyObject *_args)
  9911. {
  9912. PyObject *_res = NULL;
  9913. OSErr _err;
  9914. PixMapHandle src;
  9915. Rect srcRect;
  9916. ImageDescriptionHandle desc;
  9917. Ptr data;
  9918. Fixed similarity;
  9919. #ifndef GetSimilarity
  9920. PyMac_PRECHECK(GetSimilarity);
  9921. #endif
  9922. if (!PyArg_ParseTuple(_args, "O&O&O&s",
  9923. ResObj_Convert, &src,
  9924. PyMac_GetRect, &srcRect,
  9925. ResObj_Convert, &desc,
  9926. &data))
  9927. return NULL;
  9928. _err = GetSimilarity(src,
  9929. &srcRect,
  9930. desc,
  9931. data,
  9932. &similarity);
  9933. if (_err != noErr) return PyMac_Error(_err);
  9934. _res = Py_BuildValue("O&",
  9935. PyMac_BuildFixed, similarity);
  9936. return _res;
  9937. }
  9938. static PyObject *Qt_GetImageDescriptionCTable(PyObject *_self, PyObject *_args)
  9939. {
  9940. PyObject *_res = NULL;
  9941. OSErr _err;
  9942. ImageDescriptionHandle desc;
  9943. CTabHandle ctable;
  9944. #ifndef GetImageDescriptionCTable
  9945. PyMac_PRECHECK(GetImageDescriptionCTable);
  9946. #endif
  9947. if (!PyArg_ParseTuple(_args, "O&",
  9948. ResObj_Convert, &desc))
  9949. return NULL;
  9950. _err = GetImageDescriptionCTable(desc,
  9951. &ctable);
  9952. if (_err != noErr) return PyMac_Error(_err);
  9953. _res = Py_BuildValue("O&",
  9954. ResObj_New, ctable);
  9955. return _res;
  9956. }
  9957. static PyObject *Qt_SetImageDescriptionCTable(PyObject *_self, PyObject *_args)
  9958. {
  9959. PyObject *_res = NULL;
  9960. OSErr _err;
  9961. ImageDescriptionHandle desc;
  9962. CTabHandle ctable;
  9963. #ifndef SetImageDescriptionCTable
  9964. PyMac_PRECHECK(SetImageDescriptionCTable);
  9965. #endif
  9966. if (!PyArg_ParseTuple(_args, "O&O&",
  9967. ResObj_Convert, &desc,
  9968. ResObj_Convert, &ctable))
  9969. return NULL;
  9970. _err = SetImageDescriptionCTable(desc,
  9971. ctable);
  9972. if (_err != noErr) return PyMac_Error(_err);
  9973. Py_INCREF(Py_None);
  9974. _res = Py_None;
  9975. return _res;
  9976. }
  9977. static PyObject *Qt_GetImageDescriptionExtension(PyObject *_self, PyObject *_args)
  9978. {
  9979. PyObject *_res = NULL;
  9980. OSErr _err;
  9981. ImageDescriptionHandle desc;
  9982. Handle extension;
  9983. long idType;
  9984. long index;
  9985. #ifndef GetImageDescriptionExtension
  9986. PyMac_PRECHECK(GetImageDescriptionExtension);
  9987. #endif
  9988. if (!PyArg_ParseTuple(_args, "O&ll",
  9989. ResObj_Convert, &desc,
  9990. &idType,
  9991. &index))
  9992. return NULL;
  9993. _err = GetImageDescriptionExtension(desc,
  9994. &extension,
  9995. idType,
  9996. index);
  9997. if (_err != noErr) return PyMac_Error(_err);
  9998. _res = Py_BuildValue("O&",
  9999. ResObj_New, extension);
  10000. return _res;
  10001. }
  10002. static PyObject *Qt_AddImageDescriptionExtension(PyObject *_self, PyObject *_args)
  10003. {
  10004. PyObject *_res = NULL;
  10005. OSErr _err;
  10006. ImageDescriptionHandle desc;
  10007. Handle extension;
  10008. long idType;
  10009. #ifndef AddImageDescriptionExtension
  10010. PyMac_PRECHECK(AddImageDescriptionExtension);
  10011. #endif
  10012. if (!PyArg_ParseTuple(_args, "O&O&l",
  10013. ResObj_Convert, &desc,
  10014. ResObj_Convert, &extension,
  10015. &idType))
  10016. return NULL;
  10017. _err = AddImageDescriptionExtension(desc,
  10018. extension,
  10019. idType);
  10020. if (_err != noErr) return PyMac_Error(_err);
  10021. Py_INCREF(Py_None);
  10022. _res = Py_None;
  10023. return _res;
  10024. }
  10025. static PyObject *Qt_RemoveImageDescriptionExtension(PyObject *_self, PyObject *_args)
  10026. {
  10027. PyObject *_res = NULL;
  10028. OSErr _err;
  10029. ImageDescriptionHandle desc;
  10030. long idType;
  10031. long index;
  10032. #ifndef RemoveImageDescriptionExtension
  10033. PyMac_PRECHECK(RemoveImageDescriptionExtension);
  10034. #endif
  10035. if (!PyArg_ParseTuple(_args, "O&ll",
  10036. ResObj_Convert, &desc,
  10037. &idType,
  10038. &index))
  10039. return NULL;
  10040. _err = RemoveImageDescriptionExtension(desc,
  10041. idType,
  10042. index);
  10043. if (_err != noErr) return PyMac_Error(_err);
  10044. Py_INCREF(Py_None);
  10045. _res = Py_None;
  10046. return _res;
  10047. }
  10048. static PyObject *Qt_CountImageDescriptionExtensionType(PyObject *_self, PyObject *_args)
  10049. {
  10050. PyObject *_res = NULL;
  10051. OSErr _err;
  10052. ImageDescriptionHandle desc;
  10053. long idType;
  10054. long count;
  10055. #ifndef CountImageDescriptionExtensionType
  10056. PyMac_PRECHECK(CountImageDescriptionExtensionType);
  10057. #endif
  10058. if (!PyArg_ParseTuple(_args, "O&l",
  10059. ResObj_Convert, &desc,
  10060. &idType))
  10061. return NULL;
  10062. _err = CountImageDescriptionExtensionType(desc,
  10063. idType,
  10064. &count);
  10065. if (_err != noErr) return PyMac_Error(_err);
  10066. _res = Py_BuildValue("l",
  10067. count);
  10068. return _res;
  10069. }
  10070. static PyObject *Qt_GetNextImageDescriptionExtensionType(PyObject *_self, PyObject *_args)
  10071. {
  10072. PyObject *_res = NULL;
  10073. OSErr _err;
  10074. ImageDescriptionHandle desc;
  10075. long idType;
  10076. #ifndef GetNextImageDescriptionExtensionType
  10077. PyMac_PRECHECK(GetNextImageDescriptionExtensionType);
  10078. #endif
  10079. if (!PyArg_ParseTuple(_args, "O&",
  10080. ResObj_Convert, &desc))
  10081. return NULL;
  10082. _err = GetNextImageDescriptionExtensionType(desc,
  10083. &idType);
  10084. if (_err != noErr) return PyMac_Error(_err);
  10085. _res = Py_BuildValue("l",
  10086. idType);
  10087. return _res;
  10088. }
  10089. static PyObject *Qt_FindCodec(PyObject *_self, PyObject *_args)
  10090. {
  10091. PyObject *_res = NULL;
  10092. OSErr _err;
  10093. CodecType cType;
  10094. CodecComponent specCodec;
  10095. CompressorComponent compressor;
  10096. DecompressorComponent decompressor;
  10097. #ifndef FindCodec
  10098. PyMac_PRECHECK(FindCodec);
  10099. #endif
  10100. if (!PyArg_ParseTuple(_args, "O&O&",
  10101. PyMac_GetOSType, &cType,
  10102. CmpObj_Convert, &specCodec))
  10103. return NULL;
  10104. _err = FindCodec(cType,
  10105. specCodec,
  10106. &compressor,
  10107. &decompressor);
  10108. if (_err != noErr) return PyMac_Error(_err);
  10109. _res = Py_BuildValue("O&O&",
  10110. CmpObj_New, compressor,
  10111. CmpObj_New, decompressor);
  10112. return _res;
  10113. }
  10114. static PyObject *Qt_CompressPicture(PyObject *_self, PyObject *_args)
  10115. {
  10116. PyObject *_res = NULL;
  10117. OSErr _err;
  10118. PicHandle srcPicture;
  10119. PicHandle dstPicture;
  10120. CodecQ quality;
  10121. CodecType cType;
  10122. #ifndef CompressPicture
  10123. PyMac_PRECHECK(CompressPicture);
  10124. #endif
  10125. if (!PyArg_ParseTuple(_args, "O&O&lO&",
  10126. ResObj_Convert, &srcPicture,
  10127. ResObj_Convert, &dstPicture,
  10128. &quality,
  10129. PyMac_GetOSType, &cType))
  10130. return NULL;
  10131. _err = CompressPicture(srcPicture,
  10132. dstPicture,
  10133. quality,
  10134. cType);
  10135. if (_err != noErr) return PyMac_Error(_err);
  10136. Py_INCREF(Py_None);
  10137. _res = Py_None;
  10138. return _res;
  10139. }
  10140. static PyObject *Qt_CompressPictureFile(PyObject *_self, PyObject *_args)
  10141. {
  10142. PyObject *_res = NULL;
  10143. OSErr _err;
  10144. short srcRefNum;
  10145. short dstRefNum;
  10146. CodecQ quality;
  10147. CodecType cType;
  10148. #ifndef CompressPictureFile
  10149. PyMac_PRECHECK(CompressPictureFile);
  10150. #endif
  10151. if (!PyArg_ParseTuple(_args, "hhlO&",
  10152. &srcRefNum,
  10153. &dstRefNum,
  10154. &quality,
  10155. PyMac_GetOSType, &cType))
  10156. return NULL;
  10157. _err = CompressPictureFile(srcRefNum,
  10158. dstRefNum,
  10159. quality,
  10160. cType);
  10161. if (_err != noErr) return PyMac_Error(_err);
  10162. Py_INCREF(Py_None);
  10163. _res = Py_None;
  10164. return _res;
  10165. }
  10166. static PyObject *Qt_ConvertImage(PyObject *_self, PyObject *_args)
  10167. {
  10168. PyObject *_res = NULL;
  10169. OSErr _err;
  10170. ImageDescriptionHandle srcDD;
  10171. Ptr srcData;
  10172. short colorDepth;
  10173. CTabHandle ctable;
  10174. CodecQ accuracy;
  10175. CodecQ quality;
  10176. CodecType cType;
  10177. CodecComponent codec;
  10178. ImageDescriptionHandle dstDD;
  10179. Ptr dstData;
  10180. #ifndef ConvertImage
  10181. PyMac_PRECHECK(ConvertImage);
  10182. #endif
  10183. if (!PyArg_ParseTuple(_args, "O&shO&llO&O&O&s",
  10184. ResObj_Convert, &srcDD,
  10185. &srcData,
  10186. &colorDepth,
  10187. ResObj_Convert, &ctable,
  10188. &accuracy,
  10189. &quality,
  10190. PyMac_GetOSType, &cType,
  10191. CmpObj_Convert, &codec,
  10192. ResObj_Convert, &dstDD,
  10193. &dstData))
  10194. return NULL;
  10195. _err = ConvertImage(srcDD,
  10196. srcData,
  10197. colorDepth,
  10198. ctable,
  10199. accuracy,
  10200. quality,
  10201. cType,
  10202. codec,
  10203. dstDD,
  10204. dstData);
  10205. if (_err != noErr) return PyMac_Error(_err);
  10206. Py_INCREF(Py_None);
  10207. _res = Py_None;
  10208. return _res;
  10209. }
  10210. static PyObject *Qt_AddFilePreview(PyObject *_self, PyObject *_args)
  10211. {
  10212. PyObject *_res = NULL;
  10213. OSErr _err;
  10214. short resRefNum;
  10215. OSType previewType;
  10216. Handle previewData;
  10217. #ifndef AddFilePreview
  10218. PyMac_PRECHECK(AddFilePreview);
  10219. #endif
  10220. if (!PyArg_ParseTuple(_args, "hO&O&",
  10221. &resRefNum,
  10222. PyMac_GetOSType, &previewType,
  10223. ResObj_Convert, &previewData))
  10224. return NULL;
  10225. _err = AddFilePreview(resRefNum,
  10226. previewType,
  10227. previewData);
  10228. if (_err != noErr) return PyMac_Error(_err);
  10229. Py_INCREF(Py_None);
  10230. _res = Py_None;
  10231. return _res;
  10232. }
  10233. static PyObject *Qt_GetBestDeviceRect(PyObject *_self, PyObject *_args)
  10234. {
  10235. PyObject *_res = NULL;
  10236. OSErr _err;
  10237. GDHandle gdh;
  10238. Rect rp;
  10239. #ifndef GetBestDeviceRect
  10240. PyMac_PRECHECK(GetBestDeviceRect);
  10241. #endif
  10242. if (!PyArg_ParseTuple(_args, ""))
  10243. return NULL;
  10244. _err = GetBestDeviceRect(&gdh,
  10245. &rp);
  10246. if (_err != noErr) return PyMac_Error(_err);
  10247. _res = Py_BuildValue("O&O&",
  10248. OptResObj_New, gdh,
  10249. PyMac_BuildRect, &rp);
  10250. return _res;
  10251. }
  10252. static PyObject *Qt_GDHasScale(PyObject *_self, PyObject *_args)
  10253. {
  10254. PyObject *_res = NULL;
  10255. OSErr _err;
  10256. GDHandle gdh;
  10257. short depth;
  10258. Fixed scale;
  10259. #ifndef GDHasScale
  10260. PyMac_PRECHECK(GDHasScale);
  10261. #endif
  10262. if (!PyArg_ParseTuple(_args, "O&h",
  10263. OptResObj_Convert, &gdh,
  10264. &depth))
  10265. return NULL;
  10266. _err = GDHasScale(gdh,
  10267. depth,
  10268. &scale);
  10269. if (_err != noErr) return PyMac_Error(_err);
  10270. _res = Py_BuildValue("O&",
  10271. PyMac_BuildFixed, scale);
  10272. return _res;
  10273. }
  10274. static PyObject *Qt_GDGetScale(PyObject *_self, PyObject *_args)
  10275. {
  10276. PyObject *_res = NULL;
  10277. OSErr _err;
  10278. GDHandle gdh;
  10279. Fixed scale;
  10280. short flags;
  10281. #ifndef GDGetScale
  10282. PyMac_PRECHECK(GDGetScale);
  10283. #endif
  10284. if (!PyArg_ParseTuple(_args, "O&",
  10285. OptResObj_Convert, &gdh))
  10286. return NULL;
  10287. _err = GDGetScale(gdh,
  10288. &scale,
  10289. &flags);
  10290. if (_err != noErr) return PyMac_Error(_err);
  10291. _res = Py_BuildValue("O&h",
  10292. PyMac_BuildFixed, scale,
  10293. flags);
  10294. return _res;
  10295. }
  10296. static PyObject *Qt_GDSetScale(PyObject *_self, PyObject *_args)
  10297. {
  10298. PyObject *_res = NULL;
  10299. OSErr _err;
  10300. GDHandle gdh;
  10301. Fixed scale;
  10302. short flags;
  10303. #ifndef GDSetScale
  10304. PyMac_PRECHECK(GDSetScale);
  10305. #endif
  10306. if (!PyArg_ParseTuple(_args, "O&O&h",
  10307. OptResObj_Convert, &gdh,
  10308. PyMac_GetFixed, &scale,
  10309. &flags))
  10310. return NULL;
  10311. _err = GDSetScale(gdh,
  10312. scale,
  10313. flags);
  10314. if (_err != noErr) return PyMac_Error(_err);
  10315. Py_INCREF(Py_None);
  10316. _res = Py_None;
  10317. return _res;
  10318. }
  10319. static PyObject *Qt_GetGraphicsImporterForFile(PyObject *_self, PyObject *_args)
  10320. {
  10321. PyObject *_res = NULL;
  10322. OSErr _err;
  10323. FSSpec theFile;
  10324. ComponentInstance gi;
  10325. #ifndef GetGraphicsImporterForFile
  10326. PyMac_PRECHECK(GetGraphicsImporterForFile);
  10327. #endif
  10328. if (!PyArg_ParseTuple(_args, "O&",
  10329. PyMac_GetFSSpec, &theFile))
  10330. return NULL;
  10331. _err = GetGraphicsImporterForFile(&theFile,
  10332. &gi);
  10333. if (_err != noErr) return PyMac_Error(_err);
  10334. _res = Py_BuildValue("O&",
  10335. CmpInstObj_New, gi);
  10336. return _res;
  10337. }
  10338. static PyObject *Qt_GetGraphicsImporterForDataRef(PyObject *_self, PyObject *_args)
  10339. {
  10340. PyObject *_res = NULL;
  10341. OSErr _err;
  10342. Handle dataRef;
  10343. OSType dataRefType;
  10344. ComponentInstance gi;
  10345. #ifndef GetGraphicsImporterForDataRef
  10346. PyMac_PRECHECK(GetGraphicsImporterForDataRef);
  10347. #endif
  10348. if (!PyArg_ParseTuple(_args, "O&O&",
  10349. ResObj_Convert, &dataRef,
  10350. PyMac_GetOSType, &dataRefType))
  10351. return NULL;
  10352. _err = GetGraphicsImporterForDataRef(dataRef,
  10353. dataRefType,
  10354. &gi);
  10355. if (_err != noErr) return PyMac_Error(_err);
  10356. _res = Py_BuildValue("O&",
  10357. CmpInstObj_New, gi);
  10358. return _res;
  10359. }
  10360. static PyObject *Qt_GetGraphicsImporterForFileWithFlags(PyObject *_self, PyObject *_args)
  10361. {
  10362. PyObject *_res = NULL;
  10363. OSErr _err;
  10364. FSSpec theFile;
  10365. ComponentInstance gi;
  10366. long flags;
  10367. #ifndef GetGraphicsImporterForFileWithFlags
  10368. PyMac_PRECHECK(GetGraphicsImporterForFileWithFlags);
  10369. #endif
  10370. if (!PyArg_ParseTuple(_args, "O&l",
  10371. PyMac_GetFSSpec, &theFile,
  10372. &flags))
  10373. return NULL;
  10374. _err = GetGraphicsImporterForFileWithFlags(&theFile,
  10375. &gi,
  10376. flags);
  10377. if (_err != noErr) return PyMac_Error(_err);
  10378. _res = Py_BuildValue("O&",
  10379. CmpInstObj_New, gi);
  10380. return _res;
  10381. }
  10382. static PyObject *Qt_GetGraphicsImporterForDataRefWithFlags(PyObject *_self, PyObject *_args)
  10383. {
  10384. PyObject *_res = NULL;
  10385. OSErr _err;
  10386. Handle dataRef;
  10387. OSType dataRefType;
  10388. ComponentInstance gi;
  10389. long flags;
  10390. #ifndef GetGraphicsImporterForDataRefWithFlags
  10391. PyMac_PRECHECK(GetGraphicsImporterForDataRefWithFlags);
  10392. #endif
  10393. if (!PyArg_ParseTuple(_args, "O&O&l",
  10394. ResObj_Convert, &dataRef,
  10395. PyMac_GetOSType, &dataRefType,
  10396. &flags))
  10397. return NULL;
  10398. _err = GetGraphicsImporterForDataRefWithFlags(dataRef,
  10399. dataRefType,
  10400. &gi,
  10401. flags);
  10402. if (_err != noErr) return PyMac_Error(_err);
  10403. _res = Py_BuildValue("O&",
  10404. CmpInstObj_New, gi);
  10405. return _res;
  10406. }
  10407. static PyObject *Qt_MakeImageDescriptionForPixMap(PyObject *_self, PyObject *_args)
  10408. {
  10409. PyObject *_res = NULL;
  10410. OSErr _err;
  10411. PixMapHandle pixmap;
  10412. ImageDescriptionHandle idh;
  10413. #ifndef MakeImageDescriptionForPixMap
  10414. PyMac_PRECHECK(MakeImageDescriptionForPixMap);
  10415. #endif
  10416. if (!PyArg_ParseTuple(_args, "O&",
  10417. ResObj_Convert, &pixmap))
  10418. return NULL;
  10419. _err = MakeImageDescriptionForPixMap(pixmap,
  10420. &idh);
  10421. if (_err != noErr) return PyMac_Error(_err);
  10422. _res = Py_BuildValue("O&",
  10423. ResObj_New, idh);
  10424. return _res;
  10425. }
  10426. static PyObject *Qt_MakeImageDescriptionForEffect(PyObject *_self, PyObject *_args)
  10427. {
  10428. PyObject *_res = NULL;
  10429. OSErr _err;
  10430. OSType effectType;
  10431. ImageDescriptionHandle idh;
  10432. #ifndef MakeImageDescriptionForEffect
  10433. PyMac_PRECHECK(MakeImageDescriptionForEffect);
  10434. #endif
  10435. if (!PyArg_ParseTuple(_args, "O&",
  10436. PyMac_GetOSType, &effectType))
  10437. return NULL;
  10438. _err = MakeImageDescriptionForEffect(effectType,
  10439. &idh);
  10440. if (_err != noErr) return PyMac_Error(_err);
  10441. _res = Py_BuildValue("O&",
  10442. ResObj_New, idh);
  10443. return _res;
  10444. }
  10445. static PyObject *Qt_QTGetPixelSize(PyObject *_self, PyObject *_args)
  10446. {
  10447. PyObject *_res = NULL;
  10448. short _rv;
  10449. OSType PixelFormat;
  10450. #ifndef QTGetPixelSize
  10451. PyMac_PRECHECK(QTGetPixelSize);
  10452. #endif
  10453. if (!PyArg_ParseTuple(_args, "O&",
  10454. PyMac_GetOSType, &PixelFormat))
  10455. return NULL;
  10456. _rv = QTGetPixelSize(PixelFormat);
  10457. _res = Py_BuildValue("h",
  10458. _rv);
  10459. return _res;
  10460. }
  10461. static PyObject *Qt_QTGetPixelFormatDepthForImageDescription(PyObject *_self, PyObject *_args)
  10462. {
  10463. PyObject *_res = NULL;
  10464. short _rv;
  10465. OSType PixelFormat;
  10466. #ifndef QTGetPixelFormatDepthForImageDescription
  10467. PyMac_PRECHECK(QTGetPixelFormatDepthForImageDescription);
  10468. #endif
  10469. if (!PyArg_ParseTuple(_args, "O&",
  10470. PyMac_GetOSType, &PixelFormat))
  10471. return NULL;
  10472. _rv = QTGetPixelFormatDepthForImageDescription(PixelFormat);
  10473. _res = Py_BuildValue("h",
  10474. _rv);
  10475. return _res;
  10476. }
  10477. static PyObject *Qt_QTGetPixMapHandleRowBytes(PyObject *_self, PyObject *_args)
  10478. {
  10479. PyObject *_res = NULL;
  10480. long _rv;
  10481. PixMapHandle pm;
  10482. #ifndef QTGetPixMapHandleRowBytes
  10483. PyMac_PRECHECK(QTGetPixMapHandleRowBytes);
  10484. #endif
  10485. if (!PyArg_ParseTuple(_args, "O&",
  10486. ResObj_Convert, &pm))
  10487. return NULL;
  10488. _rv = QTGetPixMapHandleRowBytes(pm);
  10489. _res = Py_BuildValue("l",
  10490. _rv);
  10491. return _res;
  10492. }
  10493. static PyObject *Qt_QTSetPixMapHandleRowBytes(PyObject *_self, PyObject *_args)
  10494. {
  10495. PyObject *_res = NULL;
  10496. OSErr _err;
  10497. PixMapHandle pm;
  10498. long rowBytes;
  10499. #ifndef QTSetPixMapHandleRowBytes
  10500. PyMac_PRECHECK(QTSetPixMapHandleRowBytes);
  10501. #endif
  10502. if (!PyArg_ParseTuple(_args, "O&l",
  10503. ResObj_Convert, &pm,
  10504. &rowBytes))
  10505. return NULL;
  10506. _err = QTSetPixMapHandleRowBytes(pm,
  10507. rowBytes);
  10508. if (_err != noErr) return PyMac_Error(_err);
  10509. Py_INCREF(Py_None);
  10510. _res = Py_None;
  10511. return _res;
  10512. }
  10513. static PyObject *Qt_QTGetPixMapHandleGammaLevel(PyObject *_self, PyObject *_args)
  10514. {
  10515. PyObject *_res = NULL;
  10516. Fixed _rv;
  10517. PixMapHandle pm;
  10518. #ifndef QTGetPixMapHandleGammaLevel
  10519. PyMac_PRECHECK(QTGetPixMapHandleGammaLevel);
  10520. #endif
  10521. if (!PyArg_ParseTuple(_args, "O&",
  10522. ResObj_Convert, &pm))
  10523. return NULL;
  10524. _rv = QTGetPixMapHandleGammaLevel(pm);
  10525. _res = Py_BuildValue("O&",
  10526. PyMac_BuildFixed, _rv);
  10527. return _res;
  10528. }
  10529. static PyObject *Qt_QTSetPixMapHandleGammaLevel(PyObject *_self, PyObject *_args)
  10530. {
  10531. PyObject *_res = NULL;
  10532. OSErr _err;
  10533. PixMapHandle pm;
  10534. Fixed gammaLevel;
  10535. #ifndef QTSetPixMapHandleGammaLevel
  10536. PyMac_PRECHECK(QTSetPixMapHandleGammaLevel);
  10537. #endif
  10538. if (!PyArg_ParseTuple(_args, "O&O&",
  10539. ResObj_Convert, &pm,
  10540. PyMac_GetFixed, &gammaLevel))
  10541. return NULL;
  10542. _err = QTSetPixMapHandleGammaLevel(pm,
  10543. gammaLevel);
  10544. if (_err != noErr) return PyMac_Error(_err);
  10545. Py_INCREF(Py_None);
  10546. _res = Py_None;
  10547. return _res;
  10548. }
  10549. static PyObject *Qt_QTGetPixMapHandleRequestedGammaLevel(PyObject *_self, PyObject *_args)
  10550. {
  10551. PyObject *_res = NULL;
  10552. Fixed _rv;
  10553. PixMapHandle pm;
  10554. #ifndef QTGetPixMapHandleRequestedGammaLevel
  10555. PyMac_PRECHECK(QTGetPixMapHandleRequestedGammaLevel);
  10556. #endif
  10557. if (!PyArg_ParseTuple(_args, "O&",
  10558. ResObj_Convert, &pm))
  10559. return NULL;
  10560. _rv = QTGetPixMapHandleRequestedGammaLevel(pm);
  10561. _res = Py_BuildValue("O&",
  10562. PyMac_BuildFixed, _rv);
  10563. return _res;
  10564. }
  10565. static PyObject *Qt_QTSetPixMapHandleRequestedGammaLevel(PyObject *_self, PyObject *_args)
  10566. {
  10567. PyObject *_res = NULL;
  10568. OSErr _err;
  10569. PixMapHandle pm;
  10570. Fixed requestedGammaLevel;
  10571. #ifndef QTSetPixMapHandleRequestedGammaLevel
  10572. PyMac_PRECHECK(QTSetPixMapHandleRequestedGammaLevel);
  10573. #endif
  10574. if (!PyArg_ParseTuple(_args, "O&O&",
  10575. ResObj_Convert, &pm,
  10576. PyMac_GetFixed, &requestedGammaLevel))
  10577. return NULL;
  10578. _err = QTSetPixMapHandleRequestedGammaLevel(pm,
  10579. requestedGammaLevel);
  10580. if (_err != noErr) return PyMac_Error(_err);
  10581. Py_INCREF(Py_None);
  10582. _res = Py_None;
  10583. return _res;
  10584. }
  10585. static PyObject *Qt_CompAdd(PyObject *_self, PyObject *_args)
  10586. {
  10587. PyObject *_res = NULL;
  10588. wide src;
  10589. wide dst;
  10590. #ifndef CompAdd
  10591. PyMac_PRECHECK(CompAdd);
  10592. #endif
  10593. if (!PyArg_ParseTuple(_args, ""))
  10594. return NULL;
  10595. CompAdd(&src,
  10596. &dst);
  10597. _res = Py_BuildValue("O&O&",
  10598. PyMac_Buildwide, src,
  10599. PyMac_Buildwide, dst);
  10600. return _res;
  10601. }
  10602. static PyObject *Qt_CompSub(PyObject *_self, PyObject *_args)
  10603. {
  10604. PyObject *_res = NULL;
  10605. wide src;
  10606. wide dst;
  10607. #ifndef CompSub
  10608. PyMac_PRECHECK(CompSub);
  10609. #endif
  10610. if (!PyArg_ParseTuple(_args, ""))
  10611. return NULL;
  10612. CompSub(&src,
  10613. &dst);
  10614. _res = Py_BuildValue("O&O&",
  10615. PyMac_Buildwide, src,
  10616. PyMac_Buildwide, dst);
  10617. return _res;
  10618. }
  10619. static PyObject *Qt_CompNeg(PyObject *_self, PyObject *_args)
  10620. {
  10621. PyObject *_res = NULL;
  10622. wide dst;
  10623. #ifndef CompNeg
  10624. PyMac_PRECHECK(CompNeg);
  10625. #endif
  10626. if (!PyArg_ParseTuple(_args, ""))
  10627. return NULL;
  10628. CompNeg(&dst);
  10629. _res = Py_BuildValue("O&",
  10630. PyMac_Buildwide, dst);
  10631. return _res;
  10632. }
  10633. static PyObject *Qt_CompShift(PyObject *_self, PyObject *_args)
  10634. {
  10635. PyObject *_res = NULL;
  10636. wide src;
  10637. short shift;
  10638. #ifndef CompShift
  10639. PyMac_PRECHECK(CompShift);
  10640. #endif
  10641. if (!PyArg_ParseTuple(_args, "h",
  10642. &shift))
  10643. return NULL;
  10644. CompShift(&src,
  10645. shift);
  10646. _res = Py_BuildValue("O&",
  10647. PyMac_Buildwide, src);
  10648. return _res;
  10649. }
  10650. static PyObject *Qt_CompMul(PyObject *_self, PyObject *_args)
  10651. {
  10652. PyObject *_res = NULL;
  10653. long src1;
  10654. long src2;
  10655. wide dst;
  10656. #ifndef CompMul
  10657. PyMac_PRECHECK(CompMul);
  10658. #endif
  10659. if (!PyArg_ParseTuple(_args, "ll",
  10660. &src1,
  10661. &src2))
  10662. return NULL;
  10663. CompMul(src1,
  10664. src2,
  10665. &dst);
  10666. _res = Py_BuildValue("O&",
  10667. PyMac_Buildwide, dst);
  10668. return _res;
  10669. }
  10670. static PyObject *Qt_CompDiv(PyObject *_self, PyObject *_args)
  10671. {
  10672. PyObject *_res = NULL;
  10673. long _rv;
  10674. wide numerator;
  10675. long denominator;
  10676. long remainder;
  10677. #ifndef CompDiv
  10678. PyMac_PRECHECK(CompDiv);
  10679. #endif
  10680. if (!PyArg_ParseTuple(_args, "l",
  10681. &denominator))
  10682. return NULL;
  10683. _rv = CompDiv(&numerator,
  10684. denominator,
  10685. &remainder);
  10686. _res = Py_BuildValue("lO&l",
  10687. _rv,
  10688. PyMac_Buildwide, numerator,
  10689. remainder);
  10690. return _res;
  10691. }
  10692. static PyObject *Qt_CompFixMul(PyObject *_self, PyObject *_args)
  10693. {
  10694. PyObject *_res = NULL;
  10695. wide compSrc;
  10696. Fixed fixSrc;
  10697. wide compDst;
  10698. #ifndef CompFixMul
  10699. PyMac_PRECHECK(CompFixMul);
  10700. #endif
  10701. if (!PyArg_ParseTuple(_args, "O&",
  10702. PyMac_GetFixed, &fixSrc))
  10703. return NULL;
  10704. CompFixMul(&compSrc,
  10705. fixSrc,
  10706. &compDst);
  10707. _res = Py_BuildValue("O&O&",
  10708. PyMac_Buildwide, compSrc,
  10709. PyMac_Buildwide, compDst);
  10710. return _res;
  10711. }
  10712. static PyObject *Qt_CompMulDiv(PyObject *_self, PyObject *_args)
  10713. {
  10714. PyObject *_res = NULL;
  10715. wide co;
  10716. long mul;
  10717. long divisor;
  10718. #ifndef CompMulDiv
  10719. PyMac_PRECHECK(CompMulDiv);
  10720. #endif
  10721. if (!PyArg_ParseTuple(_args, "ll",
  10722. &mul,
  10723. &divisor))
  10724. return NULL;
  10725. CompMulDiv(&co,
  10726. mul,
  10727. divisor);
  10728. _res = Py_BuildValue("O&",
  10729. PyMac_Buildwide, co);
  10730. return _res;
  10731. }
  10732. static PyObject *Qt_CompMulDivTrunc(PyObject *_self, PyObject *_args)
  10733. {
  10734. PyObject *_res = NULL;
  10735. wide co;
  10736. long mul;
  10737. long divisor;
  10738. long remainder;
  10739. #ifndef CompMulDivTrunc
  10740. PyMac_PRECHECK(CompMulDivTrunc);
  10741. #endif
  10742. if (!PyArg_ParseTuple(_args, "ll",
  10743. &mul,
  10744. &divisor))
  10745. return NULL;
  10746. CompMulDivTrunc(&co,
  10747. mul,
  10748. divisor,
  10749. &remainder);
  10750. _res = Py_BuildValue("O&l",
  10751. PyMac_Buildwide, co,
  10752. remainder);
  10753. return _res;
  10754. }
  10755. static PyObject *Qt_CompCompare(PyObject *_self, PyObject *_args)
  10756. {
  10757. PyObject *_res = NULL;
  10758. long _rv;
  10759. wide a;
  10760. wide minusb;
  10761. #ifndef CompCompare
  10762. PyMac_PRECHECK(CompCompare);
  10763. #endif
  10764. if (!PyArg_ParseTuple(_args, "O&O&",
  10765. PyMac_Getwide, &a,
  10766. PyMac_Getwide, &minusb))
  10767. return NULL;
  10768. _rv = CompCompare(&a,
  10769. &minusb);
  10770. _res = Py_BuildValue("l",
  10771. _rv);
  10772. return _res;
  10773. }
  10774. static PyObject *Qt_CompSquareRoot(PyObject *_self, PyObject *_args)
  10775. {
  10776. PyObject *_res = NULL;
  10777. unsigned long _rv;
  10778. wide src;
  10779. #ifndef CompSquareRoot
  10780. PyMac_PRECHECK(CompSquareRoot);
  10781. #endif
  10782. if (!PyArg_ParseTuple(_args, "O&",
  10783. PyMac_Getwide, &src))
  10784. return NULL;
  10785. _rv = CompSquareRoot(&src);
  10786. _res = Py_BuildValue("l",
  10787. _rv);
  10788. return _res;
  10789. }
  10790. static PyObject *Qt_FixMulDiv(PyObject *_self, PyObject *_args)
  10791. {
  10792. PyObject *_res = NULL;
  10793. Fixed _rv;
  10794. Fixed src;
  10795. Fixed mul;
  10796. Fixed divisor;
  10797. #ifndef FixMulDiv
  10798. PyMac_PRECHECK(FixMulDiv);
  10799. #endif
  10800. if (!PyArg_ParseTuple(_args, "O&O&O&",
  10801. PyMac_GetFixed, &src,
  10802. PyMac_GetFixed, &mul,
  10803. PyMac_GetFixed, &divisor))
  10804. return NULL;
  10805. _rv = FixMulDiv(src,
  10806. mul,
  10807. divisor);
  10808. _res = Py_BuildValue("O&",
  10809. PyMac_BuildFixed, _rv);
  10810. return _res;
  10811. }
  10812. static PyObject *Qt_UnsignedFixMulDiv(PyObject *_self, PyObject *_args)
  10813. {
  10814. PyObject *_res = NULL;
  10815. Fixed _rv;
  10816. Fixed src;
  10817. Fixed mul;
  10818. Fixed divisor;
  10819. #ifndef UnsignedFixMulDiv
  10820. PyMac_PRECHECK(UnsignedFixMulDiv);
  10821. #endif
  10822. if (!PyArg_ParseTuple(_args, "O&O&O&",
  10823. PyMac_GetFixed, &src,
  10824. PyMac_GetFixed, &mul,
  10825. PyMac_GetFixed, &divisor))
  10826. return NULL;
  10827. _rv = UnsignedFixMulDiv(src,
  10828. mul,
  10829. divisor);
  10830. _res = Py_BuildValue("O&",
  10831. PyMac_BuildFixed, _rv);
  10832. return _res;
  10833. }
  10834. static PyObject *Qt_FixExp2(PyObject *_self, PyObject *_args)
  10835. {
  10836. PyObject *_res = NULL;
  10837. Fixed _rv;
  10838. Fixed src;
  10839. #ifndef FixExp2
  10840. PyMac_PRECHECK(FixExp2);
  10841. #endif
  10842. if (!PyArg_ParseTuple(_args, "O&",
  10843. PyMac_GetFixed, &src))
  10844. return NULL;
  10845. _rv = FixExp2(src);
  10846. _res = Py_BuildValue("O&",
  10847. PyMac_BuildFixed, _rv);
  10848. return _res;
  10849. }
  10850. static PyObject *Qt_FixLog2(PyObject *_self, PyObject *_args)
  10851. {
  10852. PyObject *_res = NULL;
  10853. Fixed _rv;
  10854. Fixed src;
  10855. #ifndef FixLog2
  10856. PyMac_PRECHECK(FixLog2);
  10857. #endif
  10858. if (!PyArg_ParseTuple(_args, "O&",
  10859. PyMac_GetFixed, &src))
  10860. return NULL;
  10861. _rv = FixLog2(src);
  10862. _res = Py_BuildValue("O&",
  10863. PyMac_BuildFixed, _rv);
  10864. return _res;
  10865. }
  10866. static PyObject *Qt_FixPow(PyObject *_self, PyObject *_args)
  10867. {
  10868. PyObject *_res = NULL;
  10869. Fixed _rv;
  10870. Fixed base;
  10871. Fixed exp;
  10872. #ifndef FixPow
  10873. PyMac_PRECHECK(FixPow);
  10874. #endif
  10875. if (!PyArg_ParseTuple(_args, "O&O&",
  10876. PyMac_GetFixed, &base,
  10877. PyMac_GetFixed, &exp))
  10878. return NULL;
  10879. _rv = FixPow(base,
  10880. exp);
  10881. _res = Py_BuildValue("O&",
  10882. PyMac_BuildFixed, _rv);
  10883. return _res;
  10884. }
  10885. static PyObject *Qt_GraphicsImportSetDataReference(PyObject *_self, PyObject *_args)
  10886. {
  10887. PyObject *_res = NULL;
  10888. ComponentResult _rv;
  10889. GraphicsImportComponent ci;
  10890. Handle dataRef;
  10891. OSType dataReType;
  10892. #ifndef GraphicsImportSetDataReference
  10893. PyMac_PRECHECK(GraphicsImportSetDataReference);
  10894. #endif
  10895. if (!PyArg_ParseTuple(_args, "O&O&O&",
  10896. CmpInstObj_Convert, &ci,
  10897. ResObj_Convert, &dataRef,
  10898. PyMac_GetOSType, &dataReType))
  10899. return NULL;
  10900. _rv = GraphicsImportSetDataReference(ci,
  10901. dataRef,
  10902. dataReType);
  10903. _res = Py_BuildValue("l",
  10904. _rv);
  10905. return _res;
  10906. }
  10907. static PyObject *Qt_GraphicsImportGetDataReference(PyObject *_self, PyObject *_args)
  10908. {
  10909. PyObject *_res = NULL;
  10910. ComponentResult _rv;
  10911. GraphicsImportComponent ci;
  10912. Handle dataRef;
  10913. OSType dataReType;
  10914. #ifndef GraphicsImportGetDataReference
  10915. PyMac_PRECHECK(GraphicsImportGetDataReference);
  10916. #endif
  10917. if (!PyArg_ParseTuple(_args, "O&",
  10918. CmpInstObj_Convert, &ci))
  10919. return NULL;
  10920. _rv = GraphicsImportGetDataReference(ci,
  10921. &dataRef,
  10922. &dataReType);
  10923. _res = Py_BuildValue("lO&O&",
  10924. _rv,
  10925. ResObj_New, dataRef,
  10926. PyMac_BuildOSType, dataReType);
  10927. return _res;
  10928. }
  10929. static PyObject *Qt_GraphicsImportSetDataFile(PyObject *_self, PyObject *_args)
  10930. {
  10931. PyObject *_res = NULL;
  10932. ComponentResult _rv;
  10933. GraphicsImportComponent ci;
  10934. FSSpec theFile;
  10935. #ifndef GraphicsImportSetDataFile
  10936. PyMac_PRECHECK(GraphicsImportSetDataFile);
  10937. #endif
  10938. if (!PyArg_ParseTuple(_args, "O&O&",
  10939. CmpInstObj_Convert, &ci,
  10940. PyMac_GetFSSpec, &theFile))
  10941. return NULL;
  10942. _rv = GraphicsImportSetDataFile(ci,
  10943. &theFile);
  10944. _res = Py_BuildValue("l",
  10945. _rv);
  10946. return _res;
  10947. }
  10948. static PyObject *Qt_GraphicsImportGetDataFile(PyObject *_self, PyObject *_args)
  10949. {
  10950. PyObject *_res = NULL;
  10951. ComponentResult _rv;
  10952. GraphicsImportComponent ci;
  10953. FSSpec theFile;
  10954. #ifndef GraphicsImportGetDataFile
  10955. PyMac_PRECHECK(GraphicsImportGetDataFile);
  10956. #endif
  10957. if (!PyArg_ParseTuple(_args, "O&O&",
  10958. CmpInstObj_Convert, &ci,
  10959. PyMac_GetFSSpec, &theFile))
  10960. return NULL;
  10961. _rv = GraphicsImportGetDataFile(ci,
  10962. &theFile);
  10963. _res = Py_BuildValue("l",
  10964. _rv);
  10965. return _res;
  10966. }
  10967. static PyObject *Qt_GraphicsImportSetDataHandle(PyObject *_self, PyObject *_args)
  10968. {
  10969. PyObject *_res = NULL;
  10970. ComponentResult _rv;
  10971. GraphicsImportComponent ci;
  10972. Handle h;
  10973. #ifndef GraphicsImportSetDataHandle
  10974. PyMac_PRECHECK(GraphicsImportSetDataHandle);
  10975. #endif
  10976. if (!PyArg_ParseTuple(_args, "O&O&",
  10977. CmpInstObj_Convert, &ci,
  10978. ResObj_Convert, &h))
  10979. return NULL;
  10980. _rv = GraphicsImportSetDataHandle(ci,
  10981. h);
  10982. _res = Py_BuildValue("l",
  10983. _rv);
  10984. return _res;
  10985. }
  10986. static PyObject *Qt_GraphicsImportGetDataHandle(PyObject *_self, PyObject *_args)
  10987. {
  10988. PyObject *_res = NULL;
  10989. ComponentResult _rv;
  10990. GraphicsImportComponent ci;
  10991. Handle h;
  10992. #ifndef GraphicsImportGetDataHandle
  10993. PyMac_PRECHECK(GraphicsImportGetDataHandle);
  10994. #endif
  10995. if (!PyArg_ParseTuple(_args, "O&",
  10996. CmpInstObj_Convert, &ci))
  10997. return NULL;
  10998. _rv = GraphicsImportGetDataHandle(ci,
  10999. &h);
  11000. _res = Py_BuildValue("lO&",
  11001. _rv,
  11002. ResObj_New, h);
  11003. return _res;
  11004. }
  11005. static PyObject *Qt_GraphicsImportGetImageDescription(PyObject *_self, PyObject *_args)
  11006. {
  11007. PyObject *_res = NULL;
  11008. ComponentResult _rv;
  11009. GraphicsImportComponent ci;
  11010. ImageDescriptionHandle desc;
  11011. #ifndef GraphicsImportGetImageDescription
  11012. PyMac_PRECHECK(GraphicsImportGetImageDescription);
  11013. #endif
  11014. if (!PyArg_ParseTuple(_args, "O&",
  11015. CmpInstObj_Convert, &ci))
  11016. return NULL;
  11017. _rv = GraphicsImportGetImageDescription(ci,
  11018. &desc);
  11019. _res = Py_BuildValue("lO&",
  11020. _rv,
  11021. ResObj_New, desc);
  11022. return _res;
  11023. }
  11024. static PyObject *Qt_GraphicsImportGetDataOffsetAndSize(PyObject *_self, PyObject *_args)
  11025. {
  11026. PyObject *_res = NULL;
  11027. ComponentResult _rv;
  11028. GraphicsImportComponent ci;
  11029. unsigned long offset;
  11030. unsigned long size;
  11031. #ifndef GraphicsImportGetDataOffsetAndSize
  11032. PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize);
  11033. #endif
  11034. if (!PyArg_ParseTuple(_args, "O&",
  11035. CmpInstObj_Convert, &ci))
  11036. return NULL;
  11037. _rv = GraphicsImportGetDataOffsetAndSize(ci,
  11038. &offset,
  11039. &size);
  11040. _res = Py_BuildValue("lll",
  11041. _rv,
  11042. offset,
  11043. size);
  11044. return _res;
  11045. }
  11046. static PyObject *Qt_GraphicsImportReadData(PyObject *_self, PyObject *_args)
  11047. {
  11048. PyObject *_res = NULL;
  11049. ComponentResult _rv;
  11050. GraphicsImportComponent ci;
  11051. void * dataPtr;
  11052. unsigned long dataOffset;
  11053. unsigned long dataSize;
  11054. #ifndef GraphicsImportReadData
  11055. PyMac_PRECHECK(GraphicsImportReadData);
  11056. #endif
  11057. if (!PyArg_ParseTuple(_args, "O&sll",
  11058. CmpInstObj_Convert, &ci,
  11059. &dataPtr,
  11060. &dataOffset,
  11061. &dataSize))
  11062. return NULL;
  11063. _rv = GraphicsImportReadData(ci,
  11064. dataPtr,
  11065. dataOffset,
  11066. dataSize);
  11067. _res = Py_BuildValue("l",
  11068. _rv);
  11069. return _res;
  11070. }
  11071. static PyObject *Qt_GraphicsImportSetClip(PyObject *_self, PyObject *_args)
  11072. {
  11073. PyObject *_res = NULL;
  11074. ComponentResult _rv;
  11075. GraphicsImportComponent ci;
  11076. RgnHandle clipRgn;
  11077. #ifndef GraphicsImportSetClip
  11078. PyMac_PRECHECK(GraphicsImportSetClip);
  11079. #endif
  11080. if (!PyArg_ParseTuple(_args, "O&O&",
  11081. CmpInstObj_Convert, &ci,
  11082. ResObj_Convert, &clipRgn))
  11083. return NULL;
  11084. _rv = GraphicsImportSetClip(ci,
  11085. clipRgn);
  11086. _res = Py_BuildValue("l",
  11087. _rv);
  11088. return _res;
  11089. }
  11090. static PyObject *Qt_GraphicsImportGetClip(PyObject *_self, PyObject *_args)
  11091. {
  11092. PyObject *_res = NULL;
  11093. ComponentResult _rv;
  11094. GraphicsImportComponent ci;
  11095. RgnHandle clipRgn;
  11096. #ifndef GraphicsImportGetClip
  11097. PyMac_PRECHECK(GraphicsImportGetClip);
  11098. #endif
  11099. if (!PyArg_ParseTuple(_args, "O&",
  11100. CmpInstObj_Convert, &ci))
  11101. return NULL;
  11102. _rv = GraphicsImportGetClip(ci,
  11103. &clipRgn);
  11104. _res = Py_BuildValue("lO&",
  11105. _rv,
  11106. ResObj_New, clipRgn);
  11107. return _res;
  11108. }
  11109. static PyObject *Qt_GraphicsImportSetSourceRect(PyObject *_self, PyObject *_args)
  11110. {
  11111. PyObject *_res = NULL;
  11112. ComponentResult _rv;
  11113. GraphicsImportComponent ci;
  11114. Rect sourceRect;
  11115. #ifndef GraphicsImportSetSourceRect
  11116. PyMac_PRECHECK(GraphicsImportSetSourceRect);
  11117. #endif
  11118. if (!PyArg_ParseTuple(_args, "O&O&",
  11119. CmpInstObj_Convert, &ci,
  11120. PyMac_GetRect, &sourceRect))
  11121. return NULL;
  11122. _rv = GraphicsImportSetSourceRect(ci,
  11123. &sourceRect);
  11124. _res = Py_BuildValue("l",
  11125. _rv);
  11126. return _res;
  11127. }
  11128. static PyObject *Qt_GraphicsImportGetSourceRect(PyObject *_self, PyObject *_args)
  11129. {
  11130. PyObject *_res = NULL;
  11131. ComponentResult _rv;
  11132. GraphicsImportComponent ci;
  11133. Rect sourceRect;
  11134. #ifndef GraphicsImportGetSourceRect
  11135. PyMac_PRECHECK(GraphicsImportGetSourceRect);
  11136. #endif
  11137. if (!PyArg_ParseTuple(_args, "O&",
  11138. CmpInstObj_Convert, &ci))
  11139. return NULL;
  11140. _rv = GraphicsImportGetSourceRect(ci,
  11141. &sourceRect);
  11142. _res = Py_BuildValue("lO&",
  11143. _rv,
  11144. PyMac_BuildRect, &sourceRect);
  11145. return _res;
  11146. }
  11147. static PyObject *Qt_GraphicsImportGetNaturalBounds(PyObject *_self, PyObject *_args)
  11148. {
  11149. PyObject *_res = NULL;
  11150. ComponentResult _rv;
  11151. GraphicsImportComponent ci;
  11152. Rect naturalBounds;
  11153. #ifndef GraphicsImportGetNaturalBounds
  11154. PyMac_PRECHECK(GraphicsImportGetNaturalBounds);
  11155. #endif
  11156. if (!PyArg_ParseTuple(_args, "O&",
  11157. CmpInstObj_Convert, &ci))
  11158. return NULL;
  11159. _rv = GraphicsImportGetNaturalBounds(ci,
  11160. &naturalBounds);
  11161. _res = Py_BuildValue("lO&",
  11162. _rv,
  11163. PyMac_BuildRect, &naturalBounds);
  11164. return _res;
  11165. }
  11166. static PyObject *Qt_GraphicsImportDraw(PyObject *_self, PyObject *_args)
  11167. {
  11168. PyObject *_res = NULL;
  11169. ComponentResult _rv;
  11170. GraphicsImportComponent ci;
  11171. #ifndef GraphicsImportDraw
  11172. PyMac_PRECHECK(GraphicsImportDraw);
  11173. #endif
  11174. if (!PyArg_ParseTuple(_args, "O&",
  11175. CmpInstObj_Convert, &ci))
  11176. return NULL;
  11177. _rv = GraphicsImportDraw(ci);
  11178. _res = Py_BuildValue("l",
  11179. _rv);
  11180. return _res;
  11181. }
  11182. static PyObject *Qt_GraphicsImportSetGWorld(PyObject *_self, PyObject *_args)
  11183. {
  11184. PyObject *_res = NULL;
  11185. ComponentResult _rv;
  11186. GraphicsImportComponent ci;
  11187. CGrafPtr port;
  11188. GDHandle gd;
  11189. #ifndef GraphicsImportSetGWorld
  11190. PyMac_PRECHECK(GraphicsImportSetGWorld);
  11191. #endif
  11192. if (!PyArg_ParseTuple(_args, "O&O&O&",
  11193. CmpInstObj_Convert, &ci,
  11194. GrafObj_Convert, &port,
  11195. OptResObj_Convert, &gd))
  11196. return NULL;
  11197. _rv = GraphicsImportSetGWorld(ci,
  11198. port,
  11199. gd);
  11200. _res = Py_BuildValue("l",
  11201. _rv);
  11202. return _res;
  11203. }
  11204. static PyObject *Qt_GraphicsImportGetGWorld(PyObject *_self, PyObject *_args)
  11205. {
  11206. PyObject *_res = NULL;
  11207. ComponentResult _rv;
  11208. GraphicsImportComponent ci;
  11209. CGrafPtr port;
  11210. GDHandle gd;
  11211. #ifndef GraphicsImportGetGWorld
  11212. PyMac_PRECHECK(GraphicsImportGetGWorld);
  11213. #endif
  11214. if (!PyArg_ParseTuple(_args, "O&",
  11215. CmpInstObj_Convert, &ci))
  11216. return NULL;
  11217. _rv = GraphicsImportGetGWorld(ci,
  11218. &port,
  11219. &gd);
  11220. _res = Py_BuildValue("lO&O&",
  11221. _rv,
  11222. GrafObj_New, port,
  11223. OptResObj_New, gd);
  11224. return _res;
  11225. }
  11226. static PyObject *Qt_GraphicsImportSetBoundsRect(PyObject *_self, PyObject *_args)
  11227. {
  11228. PyObject *_res = NULL;
  11229. ComponentResult _rv;
  11230. GraphicsImportComponent ci;
  11231. Rect bounds;
  11232. #ifndef GraphicsImportSetBoundsRect
  11233. PyMac_PRECHECK(GraphicsImportSetBoundsRect);
  11234. #endif
  11235. if (!PyArg_ParseTuple(_args, "O&O&",
  11236. CmpInstObj_Convert, &ci,
  11237. PyMac_GetRect, &bounds))
  11238. return NULL;
  11239. _rv = GraphicsImportSetBoundsRect(ci,
  11240. &bounds);
  11241. _res = Py_BuildValue("l",
  11242. _rv);
  11243. return _res;
  11244. }
  11245. static PyObject *Qt_GraphicsImportGetBoundsRect(PyObject *_self, PyObject *_args)
  11246. {
  11247. PyObject *_res = NULL;
  11248. ComponentResult _rv;
  11249. GraphicsImportComponent ci;
  11250. Rect bounds;
  11251. #ifndef GraphicsImportGetBoundsRect
  11252. PyMac_PRECHECK(GraphicsImportGetBoundsRect);
  11253. #endif
  11254. if (!PyArg_ParseTuple(_args, "O&",
  11255. CmpInstObj_Convert, &ci))
  11256. return NULL;
  11257. _rv = GraphicsImportGetBoundsRect(ci,
  11258. &bounds);
  11259. _res = Py_BuildValue("lO&",
  11260. _rv,
  11261. PyMac_BuildRect, &bounds);
  11262. return _res;
  11263. }
  11264. static PyObject *Qt_GraphicsImportSaveAsPicture(PyObject *_self, PyObject *_args)
  11265. {
  11266. PyObject *_res = NULL;
  11267. ComponentResult _rv;
  11268. GraphicsImportComponent ci;
  11269. FSSpec fss;
  11270. ScriptCode scriptTag;
  11271. #ifndef GraphicsImportSaveAsPicture
  11272. PyMac_PRECHECK(GraphicsImportSaveAsPicture);
  11273. #endif
  11274. if (!PyArg_ParseTuple(_args, "O&O&h",
  11275. CmpInstObj_Convert, &ci,
  11276. PyMac_GetFSSpec, &fss,
  11277. &scriptTag))
  11278. return NULL;
  11279. _rv = GraphicsImportSaveAsPicture(ci,
  11280. &fss,
  11281. scriptTag);
  11282. _res = Py_BuildValue("l",
  11283. _rv);
  11284. return _res;
  11285. }
  11286. static PyObject *Qt_GraphicsImportSetGraphicsMode(PyObject *_self, PyObject *_args)
  11287. {
  11288. PyObject *_res = NULL;
  11289. ComponentResult _rv;
  11290. GraphicsImportComponent ci;
  11291. long graphicsMode;
  11292. RGBColor opColor;
  11293. #ifndef GraphicsImportSetGraphicsMode
  11294. PyMac_PRECHECK(GraphicsImportSetGraphicsMode);
  11295. #endif
  11296. if (!PyArg_ParseTuple(_args, "O&lO&",
  11297. CmpInstObj_Convert, &ci,
  11298. &graphicsMode,
  11299. QdRGB_Convert, &opColor))
  11300. return NULL;
  11301. _rv = GraphicsImportSetGraphicsMode(ci,
  11302. graphicsMode,
  11303. &opColor);
  11304. _res = Py_BuildValue("l",
  11305. _rv);
  11306. return _res;
  11307. }
  11308. static PyObject *Qt_GraphicsImportGetGraphicsMode(PyObject *_self, PyObject *_args)
  11309. {
  11310. PyObject *_res = NULL;
  11311. ComponentResult _rv;
  11312. GraphicsImportComponent ci;
  11313. long graphicsMode;
  11314. RGBColor opColor;
  11315. #ifndef GraphicsImportGetGraphicsMode
  11316. PyMac_PRECHECK(GraphicsImportGetGraphicsMode);
  11317. #endif
  11318. if (!PyArg_ParseTuple(_args, "O&",
  11319. CmpInstObj_Convert, &ci))
  11320. return NULL;
  11321. _rv = GraphicsImportGetGraphicsMode(ci,
  11322. &graphicsMode,
  11323. &opColor);
  11324. _res = Py_BuildValue("llO&",
  11325. _rv,
  11326. graphicsMode,
  11327. QdRGB_New, &opColor);
  11328. return _res;
  11329. }
  11330. static PyObject *Qt_GraphicsImportSetQuality(PyObject *_self, PyObject *_args)
  11331. {
  11332. PyObject *_res = NULL;
  11333. ComponentResult _rv;
  11334. GraphicsImportComponent ci;
  11335. CodecQ quality;
  11336. #ifndef GraphicsImportSetQuality
  11337. PyMac_PRECHECK(GraphicsImportSetQuality);
  11338. #endif
  11339. if (!PyArg_ParseTuple(_args, "O&l",
  11340. CmpInstObj_Convert, &ci,
  11341. &quality))
  11342. return NULL;
  11343. _rv = GraphicsImportSetQuality(ci,
  11344. quality);
  11345. _res = Py_BuildValue("l",
  11346. _rv);
  11347. return _res;
  11348. }
  11349. static PyObject *Qt_GraphicsImportGetQuality(PyObject *_self, PyObject *_args)
  11350. {
  11351. PyObject *_res = NULL;
  11352. ComponentResult _rv;
  11353. GraphicsImportComponent ci;
  11354. CodecQ quality;
  11355. #ifndef GraphicsImportGetQuality
  11356. PyMac_PRECHECK(GraphicsImportGetQuality);
  11357. #endif
  11358. if (!PyArg_ParseTuple(_args, "O&",
  11359. CmpInstObj_Convert, &ci))
  11360. return NULL;
  11361. _rv = GraphicsImportGetQuality(ci,
  11362. &quality);
  11363. _res = Py_BuildValue("ll",
  11364. _rv,
  11365. quality);
  11366. return _res;
  11367. }
  11368. static PyObject *Qt_GraphicsImportSaveAsQuickTimeImageFile(PyObject *_self, PyObject *_args)
  11369. {
  11370. PyObject *_res = NULL;
  11371. ComponentResult _rv;
  11372. GraphicsImportComponent ci;
  11373. FSSpec fss;
  11374. ScriptCode scriptTag;
  11375. #ifndef GraphicsImportSaveAsQuickTimeImageFile
  11376. PyMac_PRECHECK(GraphicsImportSaveAsQuickTimeImageFile);
  11377. #endif
  11378. if (!PyArg_ParseTuple(_args, "O&O&h",
  11379. CmpInstObj_Convert, &ci,
  11380. PyMac_GetFSSpec, &fss,
  11381. &scriptTag))
  11382. return NULL;
  11383. _rv = GraphicsImportSaveAsQuickTimeImageFile(ci,
  11384. &fss,
  11385. scriptTag);
  11386. _res = Py_BuildValue("l",
  11387. _rv);
  11388. return _res;
  11389. }
  11390. static PyObject *Qt_GraphicsImportSetDataReferenceOffsetAndLimit(PyObject *_self, PyObject *_args)
  11391. {
  11392. PyObject *_res = NULL;
  11393. ComponentResult _rv;
  11394. GraphicsImportComponent ci;
  11395. unsigned long offset;
  11396. unsigned long limit;
  11397. #ifndef GraphicsImportSetDataReferenceOffsetAndLimit
  11398. PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit);
  11399. #endif
  11400. if (!PyArg_ParseTuple(_args, "O&ll",
  11401. CmpInstObj_Convert, &ci,
  11402. &offset,
  11403. &limit))
  11404. return NULL;
  11405. _rv = GraphicsImportSetDataReferenceOffsetAndLimit(ci,
  11406. offset,
  11407. limit);
  11408. _res = Py_BuildValue("l",
  11409. _rv);
  11410. return _res;
  11411. }
  11412. static PyObject *Qt_GraphicsImportGetDataReferenceOffsetAndLimit(PyObject *_self, PyObject *_args)
  11413. {
  11414. PyObject *_res = NULL;
  11415. ComponentResult _rv;
  11416. GraphicsImportComponent ci;
  11417. unsigned long offset;
  11418. unsigned long limit;
  11419. #ifndef GraphicsImportGetDataReferenceOffsetAndLimit
  11420. PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit);
  11421. #endif
  11422. if (!PyArg_ParseTuple(_args, "O&",
  11423. CmpInstObj_Convert, &ci))
  11424. return NULL;
  11425. _rv = GraphicsImportGetDataReferenceOffsetAndLimit(ci,
  11426. &offset,
  11427. &limit);
  11428. _res = Py_BuildValue("lll",
  11429. _rv,
  11430. offset,
  11431. limit);
  11432. return _res;
  11433. }
  11434. static PyObject *Qt_GraphicsImportGetAliasedDataReference(PyObject *_self, PyObject *_args)
  11435. {
  11436. PyObject *_res = NULL;
  11437. ComponentResult _rv;
  11438. GraphicsImportComponent ci;
  11439. Handle dataRef;
  11440. OSType dataRefType;
  11441. #ifndef GraphicsImportGetAliasedDataReference
  11442. PyMac_PRECHECK(GraphicsImportGetAliasedDataReference);
  11443. #endif
  11444. if (!PyArg_ParseTuple(_args, "O&",
  11445. CmpInstObj_Convert, &ci))
  11446. return NULL;
  11447. _rv = GraphicsImportGetAliasedDataReference(ci,
  11448. &dataRef,
  11449. &dataRefType);
  11450. _res = Py_BuildValue("lO&O&",
  11451. _rv,
  11452. ResObj_New, dataRef,
  11453. PyMac_BuildOSType, dataRefType);
  11454. return _res;
  11455. }
  11456. static PyObject *Qt_GraphicsImportValidate(PyObject *_self, PyObject *_args)
  11457. {
  11458. PyObject *_res = NULL;
  11459. ComponentResult _rv;
  11460. GraphicsImportComponent ci;
  11461. Boolean valid;
  11462. #ifndef GraphicsImportValidate
  11463. PyMac_PRECHECK(GraphicsImportValidate);
  11464. #endif
  11465. if (!PyArg_ParseTuple(_args, "O&",
  11466. CmpInstObj_Convert, &ci))
  11467. return NULL;
  11468. _rv = GraphicsImportValidate(ci,
  11469. &valid);
  11470. _res = Py_BuildValue("lb",
  11471. _rv,
  11472. valid);
  11473. return _res;
  11474. }
  11475. static PyObject *Qt_GraphicsImportGetMetaData(PyObject *_self, PyObject *_args)
  11476. {
  11477. PyObject *_res = NULL;
  11478. ComponentResult _rv;
  11479. GraphicsImportComponent ci;
  11480. void * userData;
  11481. #ifndef GraphicsImportGetMetaData
  11482. PyMac_PRECHECK(GraphicsImportGetMetaData);
  11483. #endif
  11484. if (!PyArg_ParseTuple(_args, "O&s",
  11485. CmpInstObj_Convert, &ci,
  11486. &userData))
  11487. return NULL;
  11488. _rv = GraphicsImportGetMetaData(ci,
  11489. userData);
  11490. _res = Py_BuildValue("l",
  11491. _rv);
  11492. return _res;
  11493. }
  11494. static PyObject *Qt_GraphicsImportGetMIMETypeList(PyObject *_self, PyObject *_args)
  11495. {
  11496. PyObject *_res = NULL;
  11497. ComponentResult _rv;
  11498. GraphicsImportComponent ci;
  11499. void * qtAtomContainerPtr;
  11500. #ifndef GraphicsImportGetMIMETypeList
  11501. PyMac_PRECHECK(GraphicsImportGetMIMETypeList);
  11502. #endif
  11503. if (!PyArg_ParseTuple(_args, "O&s",
  11504. CmpInstObj_Convert, &ci,
  11505. &qtAtomContainerPtr))
  11506. return NULL;
  11507. _rv = GraphicsImportGetMIMETypeList(ci,
  11508. qtAtomContainerPtr);
  11509. _res = Py_BuildValue("l",
  11510. _rv);
  11511. return _res;
  11512. }
  11513. static PyObject *Qt_GraphicsImportDoesDrawAllPixels(PyObject *_self, PyObject *_args)
  11514. {
  11515. PyObject *_res = NULL;
  11516. ComponentResult _rv;
  11517. GraphicsImportComponent ci;
  11518. short drawsAllPixels;
  11519. #ifndef GraphicsImportDoesDrawAllPixels
  11520. PyMac_PRECHECK(GraphicsImportDoesDrawAllPixels);
  11521. #endif
  11522. if (!PyArg_ParseTuple(_args, "O&",
  11523. CmpInstObj_Convert, &ci))
  11524. return NULL;
  11525. _rv = GraphicsImportDoesDrawAllPixels(ci,
  11526. &drawsAllPixels);
  11527. _res = Py_BuildValue("lh",
  11528. _rv,
  11529. drawsAllPixels);
  11530. return _res;
  11531. }
  11532. static PyObject *Qt_GraphicsImportGetAsPicture(PyObject *_self, PyObject *_args)
  11533. {
  11534. PyObject *_res = NULL;
  11535. ComponentResult _rv;
  11536. GraphicsImportComponent ci;
  11537. PicHandle picture;
  11538. #ifndef GraphicsImportGetAsPicture
  11539. PyMac_PRECHECK(GraphicsImportGetAsPicture);
  11540. #endif
  11541. if (!PyArg_ParseTuple(_args, "O&",
  11542. CmpInstObj_Convert, &ci))
  11543. return NULL;
  11544. _rv = GraphicsImportGetAsPicture(ci,
  11545. &picture);
  11546. _res = Py_BuildValue("lO&",
  11547. _rv,
  11548. ResObj_New, picture);
  11549. return _res;
  11550. }
  11551. static PyObject *Qt_GraphicsImportExportImageFile(PyObject *_self, PyObject *_args)
  11552. {
  11553. PyObject *_res = NULL;
  11554. ComponentResult _rv;
  11555. GraphicsImportComponent ci;
  11556. OSType fileType;
  11557. OSType fileCreator;
  11558. FSSpec fss;
  11559. ScriptCode scriptTag;
  11560. #ifndef GraphicsImportExportImageFile
  11561. PyMac_PRECHECK(GraphicsImportExportImageFile);
  11562. #endif
  11563. if (!PyArg_ParseTuple(_args, "O&O&O&O&h",
  11564. CmpInstObj_Convert, &ci,
  11565. PyMac_GetOSType, &fileType,
  11566. PyMac_GetOSType, &fileCreator,
  11567. PyMac_GetFSSpec, &fss,
  11568. &scriptTag))
  11569. return NULL;
  11570. _rv = GraphicsImportExportImageFile(ci,
  11571. fileType,
  11572. fileCreator,
  11573. &fss,
  11574. scriptTag);
  11575. _res = Py_BuildValue("l",
  11576. _rv);
  11577. return _res;
  11578. }
  11579. static PyObject *Qt_GraphicsImportGetExportImageTypeList(PyObject *_self, PyObject *_args)
  11580. {
  11581. PyObject *_res = NULL;
  11582. ComponentResult _rv;
  11583. GraphicsImportComponent ci;
  11584. void * qtAtomContainerPtr;
  11585. #ifndef GraphicsImportGetExportImageTypeList
  11586. PyMac_PRECHECK(GraphicsImportGetExportImageTypeList);
  11587. #endif
  11588. if (!PyArg_ParseTuple(_args, "O&s",
  11589. CmpInstObj_Convert, &ci,
  11590. &qtAtomContainerPtr))
  11591. return NULL;
  11592. _rv = GraphicsImportGetExportImageTypeList(ci,
  11593. qtAtomContainerPtr);
  11594. _res = Py_BuildValue("l",
  11595. _rv);
  11596. return _res;
  11597. }
  11598. static PyObject *Qt_GraphicsImportGetExportSettingsAsAtomContainer(PyObject *_self, PyObject *_args)
  11599. {
  11600. PyObject *_res = NULL;
  11601. ComponentResult _rv;
  11602. GraphicsImportComponent ci;
  11603. void * qtAtomContainerPtr;
  11604. #ifndef GraphicsImportGetExportSettingsAsAtomContainer
  11605. PyMac_PRECHECK(GraphicsImportGetExportSettingsAsAtomContainer);
  11606. #endif
  11607. if (!PyArg_ParseTuple(_args, "O&s",
  11608. CmpInstObj_Convert, &ci,
  11609. &qtAtomContainerPtr))
  11610. return NULL;
  11611. _rv = GraphicsImportGetExportSettingsAsAtomContainer(ci,
  11612. qtAtomContainerPtr);
  11613. _res = Py_BuildValue("l",
  11614. _rv);
  11615. return _res;
  11616. }
  11617. static PyObject *Qt_GraphicsImportSetExportSettingsFromAtomContainer(PyObject *_self, PyObject *_args)
  11618. {
  11619. PyObject *_res = NULL;
  11620. ComponentResult _rv;
  11621. GraphicsImportComponent ci;
  11622. void * qtAtomContainer;
  11623. #ifndef GraphicsImportSetExportSettingsFromAtomContainer
  11624. PyMac_PRECHECK(GraphicsImportSetExportSettingsFromAtomContainer);
  11625. #endif
  11626. if (!PyArg_ParseTuple(_args, "O&s",
  11627. CmpInstObj_Convert, &ci,
  11628. &qtAtomContainer))
  11629. return NULL;
  11630. _rv = GraphicsImportSetExportSettingsFromAtomContainer(ci,
  11631. qtAtomContainer);
  11632. _res = Py_BuildValue("l",
  11633. _rv);
  11634. return _res;
  11635. }
  11636. static PyObject *Qt_GraphicsImportGetImageCount(PyObject *_self, PyObject *_args)
  11637. {
  11638. PyObject *_res = NULL;
  11639. ComponentResult _rv;
  11640. GraphicsImportComponent ci;
  11641. unsigned long imageCount;
  11642. #ifndef GraphicsImportGetImageCount
  11643. PyMac_PRECHECK(GraphicsImportGetImageCount);
  11644. #endif
  11645. if (!PyArg_ParseTuple(_args, "O&",
  11646. CmpInstObj_Convert, &ci))
  11647. return NULL;
  11648. _rv = GraphicsImportGetImageCount(ci,
  11649. &imageCount);
  11650. _res = Py_BuildValue("ll",
  11651. _rv,
  11652. imageCount);
  11653. return _res;
  11654. }
  11655. static PyObject *Qt_GraphicsImportSetImageIndex(PyObject *_self, PyObject *_args)
  11656. {
  11657. PyObject *_res = NULL;
  11658. ComponentResult _rv;
  11659. GraphicsImportComponent ci;
  11660. unsigned long imageIndex;
  11661. #ifndef GraphicsImportSetImageIndex
  11662. PyMac_PRECHECK(GraphicsImportSetImageIndex);
  11663. #endif
  11664. if (!PyArg_ParseTuple(_args, "O&l",
  11665. CmpInstObj_Convert, &ci,
  11666. &imageIndex))
  11667. return NULL;
  11668. _rv = GraphicsImportSetImageIndex(ci,
  11669. imageIndex);
  11670. _res = Py_BuildValue("l",
  11671. _rv);
  11672. return _res;
  11673. }
  11674. static PyObject *Qt_GraphicsImportGetImageIndex(PyObject *_self, PyObject *_args)
  11675. {
  11676. PyObject *_res = NULL;
  11677. ComponentResult _rv;
  11678. GraphicsImportComponent ci;
  11679. unsigned long imageIndex;
  11680. #ifndef GraphicsImportGetImageIndex
  11681. PyMac_PRECHECK(GraphicsImportGetImageIndex);
  11682. #endif
  11683. if (!PyArg_ParseTuple(_args, "O&",
  11684. CmpInstObj_Convert, &ci))
  11685. return NULL;
  11686. _rv = GraphicsImportGetImageIndex(ci,
  11687. &imageIndex);
  11688. _res = Py_BuildValue("ll",
  11689. _rv,
  11690. imageIndex);
  11691. return _res;
  11692. }
  11693. static PyObject *Qt_GraphicsImportGetDataOffsetAndSize64(PyObject *_self, PyObject *_args)
  11694. {
  11695. PyObject *_res = NULL;
  11696. ComponentResult _rv;
  11697. GraphicsImportComponent ci;
  11698. wide offset;
  11699. wide size;
  11700. #ifndef GraphicsImportGetDataOffsetAndSize64
  11701. PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize64);
  11702. #endif
  11703. if (!PyArg_ParseTuple(_args, "O&",
  11704. CmpInstObj_Convert, &ci))
  11705. return NULL;
  11706. _rv = GraphicsImportGetDataOffsetAndSize64(ci,
  11707. &offset,
  11708. &size);
  11709. _res = Py_BuildValue("lO&O&",
  11710. _rv,
  11711. PyMac_Buildwide, offset,
  11712. PyMac_Buildwide, size);
  11713. return _res;
  11714. }
  11715. static PyObject *Qt_GraphicsImportReadData64(PyObject *_self, PyObject *_args)
  11716. {
  11717. PyObject *_res = NULL;
  11718. ComponentResult _rv;
  11719. GraphicsImportComponent ci;
  11720. void * dataPtr;
  11721. wide dataOffset;
  11722. unsigned long dataSize;
  11723. #ifndef GraphicsImportReadData64
  11724. PyMac_PRECHECK(GraphicsImportReadData64);
  11725. #endif
  11726. if (!PyArg_ParseTuple(_args, "O&sO&l",
  11727. CmpInstObj_Convert, &ci,
  11728. &dataPtr,
  11729. PyMac_Getwide, &dataOffset,
  11730. &dataSize))
  11731. return NULL;
  11732. _rv = GraphicsImportReadData64(ci,
  11733. dataPtr,
  11734. &dataOffset,
  11735. dataSize);
  11736. _res = Py_BuildValue("l",
  11737. _rv);
  11738. return _res;
  11739. }
  11740. static PyObject *Qt_GraphicsImportSetDataReferenceOffsetAndLimit64(PyObject *_self, PyObject *_args)
  11741. {
  11742. PyObject *_res = NULL;
  11743. ComponentResult _rv;
  11744. GraphicsImportComponent ci;
  11745. wide offset;
  11746. wide limit;
  11747. #ifndef GraphicsImportSetDataReferenceOffsetAndLimit64
  11748. PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit64);
  11749. #endif
  11750. if (!PyArg_ParseTuple(_args, "O&O&O&",
  11751. CmpInstObj_Convert, &ci,
  11752. PyMac_Getwide, &offset,
  11753. PyMac_Getwide, &limit))
  11754. return NULL;
  11755. _rv = GraphicsImportSetDataReferenceOffsetAndLimit64(ci,
  11756. &offset,
  11757. &limit);
  11758. _res = Py_BuildValue("l",
  11759. _rv);
  11760. return _res;
  11761. }
  11762. static PyObject *Qt_GraphicsImportGetDataReferenceOffsetAndLimit64(PyObject *_self, PyObject *_args)
  11763. {
  11764. PyObject *_res = NULL;
  11765. ComponentResult _rv;
  11766. GraphicsImportComponent ci;
  11767. wide offset;
  11768. wide limit;
  11769. #ifndef GraphicsImportGetDataReferenceOffsetAndLimit64
  11770. PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit64);
  11771. #endif
  11772. if (!PyArg_ParseTuple(_args, "O&",
  11773. CmpInstObj_Convert, &ci))
  11774. return NULL;
  11775. _rv = GraphicsImportGetDataReferenceOffsetAndLimit64(ci,
  11776. &offset,
  11777. &limit);
  11778. _res = Py_BuildValue("lO&O&",
  11779. _rv,
  11780. PyMac_Buildwide, offset,
  11781. PyMac_Buildwide, limit);
  11782. return _res;
  11783. }
  11784. static PyObject *Qt_GraphicsImportGetDefaultClip(PyObject *_self, PyObject *_args)
  11785. {
  11786. PyObject *_res = NULL;
  11787. ComponentResult _rv;
  11788. GraphicsImportComponent ci;
  11789. RgnHandle defaultRgn;
  11790. #ifndef GraphicsImportGetDefaultClip
  11791. PyMac_PRECHECK(GraphicsImportGetDefaultClip);
  11792. #endif
  11793. if (!PyArg_ParseTuple(_args, "O&",
  11794. CmpInstObj_Convert, &ci))
  11795. return NULL;
  11796. _rv = GraphicsImportGetDefaultClip(ci,
  11797. &defaultRgn);
  11798. _res = Py_BuildValue("lO&",
  11799. _rv,
  11800. ResObj_New, defaultRgn);
  11801. return _res;
  11802. }
  11803. static PyObject *Qt_GraphicsImportGetDefaultGraphicsMode(PyObject *_self, PyObject *_args)
  11804. {
  11805. PyObject *_res = NULL;
  11806. ComponentResult _rv;
  11807. GraphicsImportComponent ci;
  11808. long defaultGraphicsMode;
  11809. RGBColor defaultOpColor;
  11810. #ifndef GraphicsImportGetDefaultGraphicsMode
  11811. PyMac_PRECHECK(GraphicsImportGetDefaultGraphicsMode);
  11812. #endif
  11813. if (!PyArg_ParseTuple(_args, "O&",
  11814. CmpInstObj_Convert, &ci))
  11815. return NULL;
  11816. _rv = GraphicsImportGetDefaultGraphicsMode(ci,
  11817. &defaultGraphicsMode,
  11818. &defaultOpColor);
  11819. _res = Py_BuildValue("llO&",
  11820. _rv,
  11821. defaultGraphicsMode,
  11822. QdRGB_New, &defaultOpColor);
  11823. return _res;
  11824. }
  11825. static PyObject *Qt_GraphicsImportGetDefaultSourceRect(PyObject *_self, PyObject *_args)
  11826. {
  11827. PyObject *_res = NULL;
  11828. ComponentResult _rv;
  11829. GraphicsImportComponent ci;
  11830. Rect defaultSourceRect;
  11831. #ifndef GraphicsImportGetDefaultSourceRect
  11832. PyMac_PRECHECK(GraphicsImportGetDefaultSourceRect);
  11833. #endif
  11834. if (!PyArg_ParseTuple(_args, "O&",
  11835. CmpInstObj_Convert, &ci))
  11836. return NULL;
  11837. _rv = GraphicsImportGetDefaultSourceRect(ci,
  11838. &defaultSourceRect);
  11839. _res = Py_BuildValue("lO&",
  11840. _rv,
  11841. PyMac_BuildRect, &defaultSourceRect);
  11842. return _res;
  11843. }
  11844. static PyObject *Qt_GraphicsImportGetColorSyncProfile(PyObject *_self, PyObject *_args)
  11845. {
  11846. PyObject *_res = NULL;
  11847. ComponentResult _rv;
  11848. GraphicsImportComponent ci;
  11849. Handle profile;
  11850. #ifndef GraphicsImportGetColorSyncProfile
  11851. PyMac_PRECHECK(GraphicsImportGetColorSyncProfile);
  11852. #endif
  11853. if (!PyArg_ParseTuple(_args, "O&",
  11854. CmpInstObj_Convert, &ci))
  11855. return NULL;
  11856. _rv = GraphicsImportGetColorSyncProfile(ci,
  11857. &profile);
  11858. _res = Py_BuildValue("lO&",
  11859. _rv,
  11860. ResObj_New, profile);
  11861. return _res;
  11862. }
  11863. static PyObject *Qt_GraphicsImportSetDestRect(PyObject *_self, PyObject *_args)
  11864. {
  11865. PyObject *_res = NULL;
  11866. ComponentResult _rv;
  11867. GraphicsImportComponent ci;
  11868. Rect destRect;
  11869. #ifndef GraphicsImportSetDestRect
  11870. PyMac_PRECHECK(GraphicsImportSetDestRect);
  11871. #endif
  11872. if (!PyArg_ParseTuple(_args, "O&O&",
  11873. CmpInstObj_Convert, &ci,
  11874. PyMac_GetRect, &destRect))
  11875. return NULL;
  11876. _rv = GraphicsImportSetDestRect(ci,
  11877. &destRect);
  11878. _res = Py_BuildValue("l",
  11879. _rv);
  11880. return _res;
  11881. }
  11882. static PyObject *Qt_GraphicsImportGetDestRect(PyObject *_self, PyObject *_args)
  11883. {
  11884. PyObject *_res = NULL;
  11885. ComponentResult _rv;
  11886. GraphicsImportComponent ci;
  11887. Rect destRect;
  11888. #ifndef GraphicsImportGetDestRect
  11889. PyMac_PRECHECK(GraphicsImportGetDestRect);
  11890. #endif
  11891. if (!PyArg_ParseTuple(_args, "O&",
  11892. CmpInstObj_Convert, &ci))
  11893. return NULL;
  11894. _rv = GraphicsImportGetDestRect(ci,
  11895. &destRect);
  11896. _res = Py_BuildValue("lO&",
  11897. _rv,
  11898. PyMac_BuildRect, &destRect);
  11899. return _res;
  11900. }
  11901. static PyObject *Qt_GraphicsImportSetFlags(PyObject *_self, PyObject *_args)
  11902. {
  11903. PyObject *_res = NULL;
  11904. ComponentResult _rv;
  11905. GraphicsImportComponent ci;
  11906. long flags;
  11907. #ifndef GraphicsImportSetFlags
  11908. PyMac_PRECHECK(GraphicsImportSetFlags);
  11909. #endif
  11910. if (!PyArg_ParseTuple(_args, "O&l",
  11911. CmpInstObj_Convert, &ci,
  11912. &flags))
  11913. return NULL;
  11914. _rv = GraphicsImportSetFlags(ci,
  11915. flags);
  11916. _res = Py_BuildValue("l",
  11917. _rv);
  11918. return _res;
  11919. }
  11920. static PyObject *Qt_GraphicsImportGetFlags(PyObject *_self, PyObject *_args)
  11921. {
  11922. PyObject *_res = NULL;
  11923. ComponentResult _rv;
  11924. GraphicsImportComponent ci;
  11925. long flags;
  11926. #ifndef GraphicsImportGetFlags
  11927. PyMac_PRECHECK(GraphicsImportGetFlags);
  11928. #endif
  11929. if (!PyArg_ParseTuple(_args, "O&",
  11930. CmpInstObj_Convert, &ci))
  11931. return NULL;
  11932. _rv = GraphicsImportGetFlags(ci,
  11933. &flags);
  11934. _res = Py_BuildValue("ll",
  11935. _rv,
  11936. flags);
  11937. return _res;
  11938. }
  11939. static PyObject *Qt_GraphicsImportGetBaseDataOffsetAndSize64(PyObject *_self, PyObject *_args)
  11940. {
  11941. PyObject *_res = NULL;
  11942. ComponentResult _rv;
  11943. GraphicsImportComponent ci;
  11944. wide offset;
  11945. wide size;
  11946. #ifndef GraphicsImportGetBaseDataOffsetAndSize64
  11947. PyMac_PRECHECK(GraphicsImportGetBaseDataOffsetAndSize64);
  11948. #endif
  11949. if (!PyArg_ParseTuple(_args, "O&",
  11950. CmpInstObj_Convert, &ci))
  11951. return NULL;
  11952. _rv = GraphicsImportGetBaseDataOffsetAndSize64(ci,
  11953. &offset,
  11954. &size);
  11955. _res = Py_BuildValue("lO&O&",
  11956. _rv,
  11957. PyMac_Buildwide, offset,
  11958. PyMac_Buildwide, size);
  11959. return _res;
  11960. }
  11961. static PyObject *Qt_GraphicsImportSetImageIndexToThumbnail(PyObject *_self, PyObject *_args)
  11962. {
  11963. PyObject *_res = NULL;
  11964. ComponentResult _rv;
  11965. GraphicsImportComponent ci;
  11966. #ifndef GraphicsImportSetImageIndexToThumbnail
  11967. PyMac_PRECHECK(GraphicsImportSetImageIndexToThumbnail);
  11968. #endif
  11969. if (!PyArg_ParseTuple(_args, "O&",
  11970. CmpInstObj_Convert, &ci))
  11971. return NULL;
  11972. _rv = GraphicsImportSetImageIndexToThumbnail(ci);
  11973. _res = Py_BuildValue("l",
  11974. _rv);
  11975. return _res;
  11976. }
  11977. static PyObject *Qt_GraphicsExportDoExport(PyObject *_self, PyObject *_args)
  11978. {
  11979. PyObject *_res = NULL;
  11980. ComponentResult _rv;
  11981. GraphicsExportComponent ci;
  11982. unsigned long actualSizeWritten;
  11983. #ifndef GraphicsExportDoExport
  11984. PyMac_PRECHECK(GraphicsExportDoExport);
  11985. #endif
  11986. if (!PyArg_ParseTuple(_args, "O&",
  11987. CmpInstObj_Convert, &ci))
  11988. return NULL;
  11989. _rv = GraphicsExportDoExport(ci,
  11990. &actualSizeWritten);
  11991. _res = Py_BuildValue("ll",
  11992. _rv,
  11993. actualSizeWritten);
  11994. return _res;
  11995. }
  11996. static PyObject *Qt_GraphicsExportCanTranscode(PyObject *_self, PyObject *_args)
  11997. {
  11998. PyObject *_res = NULL;
  11999. ComponentResult _rv;
  12000. GraphicsExportComponent ci;
  12001. Boolean canTranscode;
  12002. #ifndef GraphicsExportCanTranscode
  12003. PyMac_PRECHECK(GraphicsExportCanTranscode);
  12004. #endif
  12005. if (!PyArg_ParseTuple(_args, "O&",
  12006. CmpInstObj_Convert, &ci))
  12007. return NULL;
  12008. _rv = GraphicsExportCanTranscode(ci,
  12009. &canTranscode);
  12010. _res = Py_BuildValue("lb",
  12011. _rv,
  12012. canTranscode);
  12013. return _res;
  12014. }
  12015. static PyObject *Qt_GraphicsExportDoTranscode(PyObject *_self, PyObject *_args)
  12016. {
  12017. PyObject *_res = NULL;
  12018. ComponentResult _rv;
  12019. GraphicsExportComponent ci;
  12020. #ifndef GraphicsExportDoTranscode
  12021. PyMac_PRECHECK(GraphicsExportDoTranscode);
  12022. #endif
  12023. if (!PyArg_ParseTuple(_args, "O&",
  12024. CmpInstObj_Convert, &ci))
  12025. return NULL;
  12026. _rv = GraphicsExportDoTranscode(ci);
  12027. _res = Py_BuildValue("l",
  12028. _rv);
  12029. return _res;
  12030. }
  12031. static PyObject *Qt_GraphicsExportCanUseCompressor(PyObject *_self, PyObject *_args)
  12032. {
  12033. PyObject *_res = NULL;
  12034. ComponentResult _rv;
  12035. GraphicsExportComponent ci;
  12036. Boolean canUseCompressor;
  12037. void * codecSettingsAtomContainerPtr;
  12038. #ifndef GraphicsExportCanUseCompressor
  12039. PyMac_PRECHECK(GraphicsExportCanUseCompressor);
  12040. #endif
  12041. if (!PyArg_ParseTuple(_args, "O&s",
  12042. CmpInstObj_Convert, &ci,
  12043. &codecSettingsAtomContainerPtr))
  12044. return NULL;
  12045. _rv = GraphicsExportCanUseCompressor(ci,
  12046. &canUseCompressor,
  12047. codecSettingsAtomContainerPtr);
  12048. _res = Py_BuildValue("lb",
  12049. _rv,
  12050. canUseCompressor);
  12051. return _res;
  12052. }
  12053. static PyObject *Qt_GraphicsExportDoUseCompressor(PyObject *_self, PyObject *_args)
  12054. {
  12055. PyObject *_res = NULL;
  12056. ComponentResult _rv;
  12057. GraphicsExportComponent ci;
  12058. void * codecSettingsAtomContainer;
  12059. ImageDescriptionHandle outDesc;
  12060. #ifndef GraphicsExportDoUseCompressor
  12061. PyMac_PRECHECK(GraphicsExportDoUseCompressor);
  12062. #endif
  12063. if (!PyArg_ParseTuple(_args, "O&s",
  12064. CmpInstObj_Convert, &ci,
  12065. &codecSettingsAtomContainer))
  12066. return NULL;
  12067. _rv = GraphicsExportDoUseCompressor(ci,
  12068. codecSettingsAtomContainer,
  12069. &outDesc);
  12070. _res = Py_BuildValue("lO&",
  12071. _rv,
  12072. ResObj_New, outDesc);
  12073. return _res;
  12074. }
  12075. static PyObject *Qt_GraphicsExportDoStandaloneExport(PyObject *_self, PyObject *_args)
  12076. {
  12077. PyObject *_res = NULL;
  12078. ComponentResult _rv;
  12079. GraphicsExportComponent ci;
  12080. #ifndef GraphicsExportDoStandaloneExport
  12081. PyMac_PRECHECK(GraphicsExportDoStandaloneExport);
  12082. #endif
  12083. if (!PyArg_ParseTuple(_args, "O&",
  12084. CmpInstObj_Convert, &ci))
  12085. return NULL;
  12086. _rv = GraphicsExportDoStandaloneExport(ci);
  12087. _res = Py_BuildValue("l",
  12088. _rv);
  12089. return _res;
  12090. }
  12091. static PyObject *Qt_GraphicsExportGetDefaultFileTypeAndCreator(PyObject *_self, PyObject *_args)
  12092. {
  12093. PyObject *_res = NULL;
  12094. ComponentResult _rv;
  12095. GraphicsExportComponent ci;
  12096. OSType fileType;
  12097. OSType fileCreator;
  12098. #ifndef GraphicsExportGetDefaultFileTypeAndCreator
  12099. PyMac_PRECHECK(GraphicsExportGetDefaultFileTypeAndCreator);
  12100. #endif
  12101. if (!PyArg_ParseTuple(_args, "O&",
  12102. CmpInstObj_Convert, &ci))
  12103. return NULL;
  12104. _rv = GraphicsExportGetDefaultFileTypeAndCreator(ci,
  12105. &fileType,
  12106. &fileCreator);
  12107. _res = Py_BuildValue("lO&O&",
  12108. _rv,
  12109. PyMac_BuildOSType, fileType,
  12110. PyMac_BuildOSType, fileCreator);
  12111. return _res;
  12112. }
  12113. static PyObject *Qt_GraphicsExportGetDefaultFileNameExtension(PyObject *_self, PyObject *_args)
  12114. {
  12115. PyObject *_res = NULL;
  12116. ComponentResult _rv;
  12117. GraphicsExportComponent ci;
  12118. OSType fileNameExtension;
  12119. #ifndef GraphicsExportGetDefaultFileNameExtension
  12120. PyMac_PRECHECK(GraphicsExportGetDefaultFileNameExtension);
  12121. #endif
  12122. if (!PyArg_ParseTuple(_args, "O&",
  12123. CmpInstObj_Convert, &ci))
  12124. return NULL;
  12125. _rv = GraphicsExportGetDefaultFileNameExtension(ci,
  12126. &fileNameExtension);
  12127. _res = Py_BuildValue("lO&",
  12128. _rv,
  12129. PyMac_BuildOSType, fileNameExtension);
  12130. return _res;
  12131. }
  12132. static PyObject *Qt_GraphicsExportGetMIMETypeList(PyObject *_self, PyObject *_args)
  12133. {
  12134. PyObject *_res = NULL;
  12135. ComponentResult _rv;
  12136. GraphicsExportComponent ci;
  12137. void * qtAtomContainerPtr;
  12138. #ifndef GraphicsExportGetMIMETypeList
  12139. PyMac_PRECHECK(GraphicsExportGetMIMETypeList);
  12140. #endif
  12141. if (!PyArg_ParseTuple(_args, "O&s",
  12142. CmpInstObj_Convert, &ci,
  12143. &qtAtomContainerPtr))
  12144. return NULL;
  12145. _rv = GraphicsExportGetMIMETypeList(ci,
  12146. qtAtomContainerPtr);
  12147. _res = Py_BuildValue("l",
  12148. _rv);
  12149. return _res;
  12150. }
  12151. static PyObject *Qt_GraphicsExportSetSettingsFromAtomContainer(PyObject *_self, PyObject *_args)
  12152. {
  12153. PyObject *_res = NULL;
  12154. ComponentResult _rv;
  12155. GraphicsExportComponent ci;
  12156. void * qtAtomContainer;
  12157. #ifndef GraphicsExportSetSettingsFromAtomContainer
  12158. PyMac_PRECHECK(GraphicsExportSetSettingsFromAtomContainer);
  12159. #endif
  12160. if (!PyArg_ParseTuple(_args, "O&s",
  12161. CmpInstObj_Convert, &ci,
  12162. &qtAtomContainer))
  12163. return NULL;
  12164. _rv = GraphicsExportSetSettingsFromAtomContainer(ci,
  12165. qtAtomContainer);
  12166. _res = Py_BuildValue("l",
  12167. _rv);
  12168. return _res;
  12169. }
  12170. static PyObject *Qt_GraphicsExportGetSettingsAsAtomContainer(PyObject *_self, PyObject *_args)
  12171. {
  12172. PyObject *_res = NULL;
  12173. ComponentResult _rv;
  12174. GraphicsExportComponent ci;
  12175. void * qtAtomContainerPtr;
  12176. #ifndef GraphicsExportGetSettingsAsAtomContainer
  12177. PyMac_PRECHECK(GraphicsExportGetSettingsAsAtomContainer);
  12178. #endif
  12179. if (!PyArg_ParseTuple(_args, "O&s",
  12180. CmpInstObj_Convert, &ci,
  12181. &qtAtomContainerPtr))
  12182. return NULL;
  12183. _rv = GraphicsExportGetSettingsAsAtomContainer(ci,
  12184. qtAtomContainerPtr);
  12185. _res = Py_BuildValue("l",
  12186. _rv);
  12187. return _res;
  12188. }
  12189. static PyObject *Qt_GraphicsExportGetSettingsAsText(PyObject *_self, PyObject *_args)
  12190. {
  12191. PyObject *_res = NULL;
  12192. ComponentResult _rv;
  12193. GraphicsExportComponent ci;
  12194. Handle theText;
  12195. #ifndef GraphicsExportGetSettingsAsText
  12196. PyMac_PRECHECK(GraphicsExportGetSettingsAsText);
  12197. #endif
  12198. if (!PyArg_ParseTuple(_args, "O&",
  12199. CmpInstObj_Convert, &ci))
  12200. return NULL;
  12201. _rv = GraphicsExportGetSettingsAsText(ci,
  12202. &theText);
  12203. _res = Py_BuildValue("lO&",
  12204. _rv,
  12205. ResObj_New, theText);
  12206. return _res;
  12207. }
  12208. static PyObject *Qt_GraphicsExportSetDontRecompress(PyObject *_self, PyObject *_args)
  12209. {
  12210. PyObject *_res = NULL;
  12211. ComponentResult _rv;
  12212. GraphicsExportComponent ci;
  12213. Boolean dontRecompress;
  12214. #ifndef GraphicsExportSetDontRecompress
  12215. PyMac_PRECHECK(GraphicsExportSetDontRecompress);
  12216. #endif
  12217. if (!PyArg_ParseTuple(_args, "O&b",
  12218. CmpInstObj_Convert, &ci,
  12219. &dontRecompress))
  12220. return NULL;
  12221. _rv = GraphicsExportSetDontRecompress(ci,
  12222. dontRecompress);
  12223. _res = Py_BuildValue("l",
  12224. _rv);
  12225. return _res;
  12226. }
  12227. static PyObject *Qt_GraphicsExportGetDontRecompress(PyObject *_self, PyObject *_args)
  12228. {
  12229. PyObject *_res = NULL;
  12230. ComponentResult _rv;
  12231. GraphicsExportComponent ci;
  12232. Boolean dontRecompress;
  12233. #ifndef GraphicsExportGetDontRecompress
  12234. PyMac_PRECHECK(GraphicsExportGetDontRecompress);
  12235. #endif
  12236. if (!PyArg_ParseTuple(_args, "O&",
  12237. CmpInstObj_Convert, &ci))
  12238. return NULL;
  12239. _rv = GraphicsExportGetDontRecompress(ci,
  12240. &dontRecompress);
  12241. _res = Py_BuildValue("lb",
  12242. _rv,
  12243. dontRecompress);
  12244. return _res;
  12245. }
  12246. static PyObject *Qt_GraphicsExportSetInterlaceStyle(PyObject *_self, PyObject *_args)
  12247. {
  12248. PyObject *_res = NULL;
  12249. ComponentResult _rv;
  12250. GraphicsExportComponent ci;
  12251. unsigned long interlaceStyle;
  12252. #ifndef GraphicsExportSetInterlaceStyle
  12253. PyMac_PRECHECK(GraphicsExportSetInterlaceStyle);
  12254. #endif
  12255. if (!PyArg_ParseTuple(_args, "O&l",
  12256. CmpInstObj_Convert, &ci,
  12257. &interlaceStyle))
  12258. return NULL;
  12259. _rv = GraphicsExportSetInterlaceStyle(ci,
  12260. interlaceStyle);
  12261. _res = Py_BuildValue("l",
  12262. _rv);
  12263. return _res;
  12264. }
  12265. static PyObject *Qt_GraphicsExportGetInterlaceStyle(PyObject *_self, PyObject *_args)
  12266. {
  12267. PyObject *_res = NULL;
  12268. ComponentResult _rv;
  12269. GraphicsExportComponent ci;
  12270. unsigned long interlaceStyle;
  12271. #ifndef GraphicsExportGetInterlaceStyle
  12272. PyMac_PRECHECK(GraphicsExportGetInterlaceStyle);
  12273. #endif
  12274. if (!PyArg_ParseTuple(_args, "O&",
  12275. CmpInstObj_Convert, &ci))
  12276. return NULL;
  12277. _rv = GraphicsExportGetInterlaceStyle(ci,
  12278. &interlaceStyle);
  12279. _res = Py_BuildValue("ll",
  12280. _rv,
  12281. interlaceStyle);
  12282. return _res;
  12283. }
  12284. static PyObject *Qt_GraphicsExportSetMetaData(PyObject *_self, PyObject *_args)
  12285. {
  12286. PyObject *_res = NULL;
  12287. ComponentResult _rv;
  12288. GraphicsExportComponent ci;
  12289. void * userData;
  12290. #ifndef GraphicsExportSetMetaData
  12291. PyMac_PRECHECK(GraphicsExportSetMetaData);
  12292. #endif
  12293. if (!PyArg_ParseTuple(_args, "O&s",
  12294. CmpInstObj_Convert, &ci,
  12295. &userData))
  12296. return NULL;
  12297. _rv = GraphicsExportSetMetaData(ci,
  12298. userData);
  12299. _res = Py_BuildValue("l",
  12300. _rv);
  12301. return _res;
  12302. }
  12303. static PyObject *Qt_GraphicsExportGetMetaData(PyObject *_self, PyObject *_args)
  12304. {
  12305. PyObject *_res = NULL;
  12306. ComponentResult _rv;
  12307. GraphicsExportComponent ci;
  12308. void * userData;
  12309. #ifndef GraphicsExportGetMetaData
  12310. PyMac_PRECHECK(GraphicsExportGetMetaData);
  12311. #endif
  12312. if (!PyArg_ParseTuple(_args, "O&s",
  12313. CmpInstObj_Convert, &ci,
  12314. &userData))
  12315. return NULL;
  12316. _rv = GraphicsExportGetMetaData(ci,
  12317. userData);
  12318. _res = Py_BuildValue("l",
  12319. _rv);
  12320. return _res;
  12321. }
  12322. static PyObject *Qt_GraphicsExportSetTargetDataSize(PyObject *_self, PyObject *_args)
  12323. {
  12324. PyObject *_res = NULL;
  12325. ComponentResult _rv;
  12326. GraphicsExportComponent ci;
  12327. unsigned long targetDataSize;
  12328. #ifndef GraphicsExportSetTargetDataSize
  12329. PyMac_PRECHECK(GraphicsExportSetTargetDataSize);
  12330. #endif
  12331. if (!PyArg_ParseTuple(_args, "O&l",
  12332. CmpInstObj_Convert, &ci,
  12333. &targetDataSize))
  12334. return NULL;
  12335. _rv = GraphicsExportSetTargetDataSize(ci,
  12336. targetDataSize);
  12337. _res = Py_BuildValue("l",
  12338. _rv);
  12339. return _res;
  12340. }
  12341. static PyObject *Qt_GraphicsExportGetTargetDataSize(PyObject *_self, PyObject *_args)
  12342. {
  12343. PyObject *_res = NULL;
  12344. ComponentResult _rv;
  12345. GraphicsExportComponent ci;
  12346. unsigned long targetDataSize;
  12347. #ifndef GraphicsExportGetTargetDataSize
  12348. PyMac_PRECHECK(GraphicsExportGetTargetDataSize);
  12349. #endif
  12350. if (!PyArg_ParseTuple(_args, "O&",
  12351. CmpInstObj_Convert, &ci))
  12352. return NULL;
  12353. _rv = GraphicsExportGetTargetDataSize(ci,
  12354. &targetDataSize);
  12355. _res = Py_BuildValue("ll",
  12356. _rv,
  12357. targetDataSize);
  12358. return _res;
  12359. }
  12360. static PyObject *Qt_GraphicsExportSetCompressionMethod(PyObject *_self, PyObject *_args)
  12361. {
  12362. PyObject *_res = NULL;
  12363. ComponentResult _rv;
  12364. GraphicsExportComponent ci;
  12365. long compressionMethod;
  12366. #ifndef GraphicsExportSetCompressionMethod
  12367. PyMac_PRECHECK(GraphicsExportSetCompressionMethod);
  12368. #endif
  12369. if (!PyArg_ParseTuple(_args, "O&l",
  12370. CmpInstObj_Convert, &ci,
  12371. &compressionMethod))
  12372. return NULL;
  12373. _rv = GraphicsExportSetCompressionMethod(ci,
  12374. compressionMethod);
  12375. _res = Py_BuildValue("l",
  12376. _rv);
  12377. return _res;
  12378. }
  12379. static PyObject *Qt_GraphicsExportGetCompressionMethod(PyObject *_self, PyObject *_args)
  12380. {
  12381. PyObject *_res = NULL;
  12382. ComponentResult _rv;
  12383. GraphicsExportComponent ci;
  12384. long compressionMethod;
  12385. #ifndef GraphicsExportGetCompressionMethod
  12386. PyMac_PRECHECK(GraphicsExportGetCompressionMethod);
  12387. #endif
  12388. if (!PyArg_ParseTuple(_args, "O&",
  12389. CmpInstObj_Convert, &ci))
  12390. return NULL;
  12391. _rv = GraphicsExportGetCompressionMethod(ci,
  12392. &compressionMethod);
  12393. _res = Py_BuildValue("ll",
  12394. _rv,
  12395. compressionMethod);
  12396. return _res;
  12397. }
  12398. static PyObject *Qt_GraphicsExportSetCompressionQuality(PyObject *_self, PyObject *_args)
  12399. {
  12400. PyObject *_res = NULL;
  12401. ComponentResult _rv;
  12402. GraphicsExportComponent ci;
  12403. CodecQ spatialQuality;
  12404. #ifndef GraphicsExportSetCompressionQuality
  12405. PyMac_PRECHECK(GraphicsExportSetCompressionQuality);
  12406. #endif
  12407. if (!PyArg_ParseTuple(_args, "O&l",
  12408. CmpInstObj_Convert, &ci,
  12409. &spatialQuality))
  12410. return NULL;
  12411. _rv = GraphicsExportSetCompressionQuality(ci,
  12412. spatialQuality);
  12413. _res = Py_BuildValue("l",
  12414. _rv);
  12415. return _res;
  12416. }
  12417. static PyObject *Qt_GraphicsExportGetCompressionQuality(PyObject *_self, PyObject *_args)
  12418. {
  12419. PyObject *_res = NULL;
  12420. ComponentResult _rv;
  12421. GraphicsExportComponent ci;
  12422. CodecQ spatialQuality;
  12423. #ifndef GraphicsExportGetCompressionQuality
  12424. PyMac_PRECHECK(GraphicsExportGetCompressionQuality);
  12425. #endif
  12426. if (!PyArg_ParseTuple(_args, "O&",
  12427. CmpInstObj_Convert, &ci))
  12428. return NULL;
  12429. _rv = GraphicsExportGetCompressionQuality(ci,
  12430. &spatialQuality);
  12431. _res = Py_BuildValue("ll",
  12432. _rv,
  12433. spatialQuality);
  12434. return _res;
  12435. }
  12436. static PyObject *Qt_GraphicsExportSetResolution(PyObject *_self, PyObject *_args)
  12437. {
  12438. PyObject *_res = NULL;
  12439. ComponentResult _rv;
  12440. GraphicsExportComponent ci;
  12441. Fixed horizontalResolution;
  12442. Fixed verticalResolution;
  12443. #ifndef GraphicsExportSetResolution
  12444. PyMac_PRECHECK(GraphicsExportSetResolution);
  12445. #endif
  12446. if (!PyArg_ParseTuple(_args, "O&O&O&",
  12447. CmpInstObj_Convert, &ci,
  12448. PyMac_GetFixed, &horizontalResolution,
  12449. PyMac_GetFixed, &verticalResolution))
  12450. return NULL;
  12451. _rv = GraphicsExportSetResolution(ci,
  12452. horizontalResolution,
  12453. verticalResolution);
  12454. _res = Py_BuildValue("l",
  12455. _rv);
  12456. return _res;
  12457. }
  12458. static PyObject *Qt_GraphicsExportGetResolution(PyObject *_self, PyObject *_args)
  12459. {
  12460. PyObject *_res = NULL;
  12461. ComponentResult _rv;
  12462. GraphicsExportComponent ci;
  12463. Fixed horizontalResolution;
  12464. Fixed verticalResolution;
  12465. #ifndef GraphicsExportGetResolution
  12466. PyMac_PRECHECK(GraphicsExportGetResolution);
  12467. #endif
  12468. if (!PyArg_ParseTuple(_args, "O&",
  12469. CmpInstObj_Convert, &ci))
  12470. return NULL;
  12471. _rv = GraphicsExportGetResolution(ci,
  12472. &horizontalResolution,
  12473. &verticalResolution);
  12474. _res = Py_BuildValue("lO&O&",
  12475. _rv,
  12476. PyMac_BuildFixed, horizontalResolution,
  12477. PyMac_BuildFixed, verticalResolution);
  12478. return _res;
  12479. }
  12480. static PyObject *Qt_GraphicsExportSetDepth(PyObject *_self, PyObject *_args)
  12481. {
  12482. PyObject *_res = NULL;
  12483. ComponentResult _rv;
  12484. GraphicsExportComponent ci;
  12485. long depth;
  12486. #ifndef GraphicsExportSetDepth
  12487. PyMac_PRECHECK(GraphicsExportSetDepth);
  12488. #endif
  12489. if (!PyArg_ParseTuple(_args, "O&l",
  12490. CmpInstObj_Convert, &ci,
  12491. &depth))
  12492. return NULL;
  12493. _rv = GraphicsExportSetDepth(ci,
  12494. depth);
  12495. _res = Py_BuildValue("l",
  12496. _rv);
  12497. return _res;
  12498. }
  12499. static PyObject *Qt_GraphicsExportGetDepth(PyObject *_self, PyObject *_args)
  12500. {
  12501. PyObject *_res = NULL;
  12502. ComponentResult _rv;
  12503. GraphicsExportComponent ci;
  12504. long depth;
  12505. #ifndef GraphicsExportGetDepth
  12506. PyMac_PRECHECK(GraphicsExportGetDepth);
  12507. #endif
  12508. if (!PyArg_ParseTuple(_args, "O&",
  12509. CmpInstObj_Convert, &ci))
  12510. return NULL;
  12511. _rv = GraphicsExportGetDepth(ci,
  12512. &depth);
  12513. _res = Py_BuildValue("ll",
  12514. _rv,
  12515. depth);
  12516. return _res;
  12517. }
  12518. static PyObject *Qt_GraphicsExportSetColorSyncProfile(PyObject *_self, PyObject *_args)
  12519. {
  12520. PyObject *_res = NULL;
  12521. ComponentResult _rv;
  12522. GraphicsExportComponent ci;
  12523. Handle colorSyncProfile;
  12524. #ifndef GraphicsExportSetColorSyncProfile
  12525. PyMac_PRECHECK(GraphicsExportSetColorSyncProfile);
  12526. #endif
  12527. if (!PyArg_ParseTuple(_args, "O&O&",
  12528. CmpInstObj_Convert, &ci,
  12529. ResObj_Convert, &colorSyncProfile))
  12530. return NULL;
  12531. _rv = GraphicsExportSetColorSyncProfile(ci,
  12532. colorSyncProfile);
  12533. _res = Py_BuildValue("l",
  12534. _rv);
  12535. return _res;
  12536. }
  12537. static PyObject *Qt_GraphicsExportGetColorSyncProfile(PyObject *_self, PyObject *_args)
  12538. {
  12539. PyObject *_res = NULL;
  12540. ComponentResult _rv;
  12541. GraphicsExportComponent ci;
  12542. Handle colorSyncProfile;
  12543. #ifndef GraphicsExportGetColorSyncProfile
  12544. PyMac_PRECHECK(GraphicsExportGetColorSyncProfile);
  12545. #endif
  12546. if (!PyArg_ParseTuple(_args, "O&",
  12547. CmpInstObj_Convert, &ci))
  12548. return NULL;
  12549. _rv = GraphicsExportGetColorSyncProfile(ci,
  12550. &colorSyncProfile);
  12551. _res = Py_BuildValue("lO&",
  12552. _rv,
  12553. ResObj_New, colorSyncProfile);
  12554. return _res;
  12555. }
  12556. static PyObject *Qt_GraphicsExportSetInputDataReference(PyObject *_self, PyObject *_args)
  12557. {
  12558. PyObject *_res = NULL;
  12559. ComponentResult _rv;
  12560. GraphicsExportComponent ci;
  12561. Handle dataRef;
  12562. OSType dataRefType;
  12563. ImageDescriptionHandle desc;
  12564. #ifndef GraphicsExportSetInputDataReference
  12565. PyMac_PRECHECK(GraphicsExportSetInputDataReference);
  12566. #endif
  12567. if (!PyArg_ParseTuple(_args, "O&O&O&O&",
  12568. CmpInstObj_Convert, &ci,
  12569. ResObj_Convert, &dataRef,
  12570. PyMac_GetOSType, &dataRefType,
  12571. ResObj_Convert, &desc))
  12572. return NULL;
  12573. _rv = GraphicsExportSetInputDataReference(ci,
  12574. dataRef,
  12575. dataRefType,
  12576. desc);
  12577. _res = Py_BuildValue("l",
  12578. _rv);
  12579. return _res;
  12580. }
  12581. static PyObject *Qt_GraphicsExportGetInputDataReference(PyObject *_self, PyObject *_args)
  12582. {
  12583. PyObject *_res = NULL;
  12584. ComponentResult _rv;
  12585. GraphicsExportComponent ci;
  12586. Handle dataRef;
  12587. OSType dataRefType;
  12588. #ifndef GraphicsExportGetInputDataReference
  12589. PyMac_PRECHECK(GraphicsExportGetInputDataReference);
  12590. #endif
  12591. if (!PyArg_ParseTuple(_args, "O&",
  12592. CmpInstObj_Convert, &ci))
  12593. return NULL;
  12594. _rv = GraphicsExportGetInputDataReference(ci,
  12595. &dataRef,
  12596. &dataRefType);
  12597. _res = Py_BuildValue("lO&O&",
  12598. _rv,
  12599. ResObj_New, dataRef,
  12600. PyMac_BuildOSType, dataRefType);
  12601. return _res;
  12602. }
  12603. static PyObject *Qt_GraphicsExportSetInputFile(PyObject *_self, PyObject *_args)
  12604. {
  12605. PyObject *_res = NULL;
  12606. ComponentResult _rv;
  12607. GraphicsExportComponent ci;
  12608. FSSpec theFile;
  12609. ImageDescriptionHandle desc;
  12610. #ifndef GraphicsExportSetInputFile
  12611. PyMac_PRECHECK(GraphicsExportSetInputFile);
  12612. #endif
  12613. if (!PyArg_ParseTuple(_args, "O&O&O&",
  12614. CmpInstObj_Convert, &ci,
  12615. PyMac_GetFSSpec, &theFile,
  12616. ResObj_Convert, &desc))
  12617. return NULL;
  12618. _rv = GraphicsExportSetInputFile(ci,
  12619. &theFile,
  12620. desc);
  12621. _res = Py_BuildValue("l",
  12622. _rv);
  12623. return _res;
  12624. }
  12625. static PyObject *Qt_GraphicsExportGetInputFile(PyObject *_self, PyObject *_args)
  12626. {
  12627. PyObject *_res = NULL;
  12628. ComponentResult _rv;
  12629. GraphicsExportComponent ci;
  12630. FSSpec theFile;
  12631. #ifndef GraphicsExportGetInputFile
  12632. PyMac_PRECHECK(GraphicsExportGetInputFile);
  12633. #endif
  12634. if (!PyArg_ParseTuple(_args, "O&O&",
  12635. CmpInstObj_Convert, &ci,
  12636. PyMac_GetFSSpec, &theFile))
  12637. return NULL;
  12638. _rv = GraphicsExportGetInputFile(ci,
  12639. &theFile);
  12640. _res = Py_BuildValue("l",
  12641. _rv);
  12642. return _res;
  12643. }
  12644. static PyObject *Qt_GraphicsExportSetInputHandle(PyObject *_self, PyObject *_args)
  12645. {
  12646. PyObject *_res = NULL;
  12647. ComponentResult _rv;
  12648. GraphicsExportComponent ci;
  12649. Handle h;
  12650. ImageDescriptionHandle desc;
  12651. #ifndef GraphicsExportSetInputHandle
  12652. PyMac_PRECHECK(GraphicsExportSetInputHandle);
  12653. #endif
  12654. if (!PyArg_ParseTuple(_args, "O&O&O&",
  12655. CmpInstObj_Convert, &ci,
  12656. ResObj_Convert, &h,
  12657. ResObj_Convert, &desc))
  12658. return NULL;
  12659. _rv = GraphicsExportSetInputHandle(ci,
  12660. h,
  12661. desc);
  12662. _res = Py_BuildValue("l",
  12663. _rv);
  12664. return _res;
  12665. }
  12666. static PyObject *Qt_GraphicsExportGetInputHandle(PyObject *_self, PyObject *_args)
  12667. {
  12668. PyObject *_res = NULL;
  12669. ComponentResult _rv;
  12670. GraphicsExportComponent ci;
  12671. Handle h;
  12672. #ifndef GraphicsExportGetInputHandle
  12673. PyMac_PRECHECK(GraphicsExportGetInputHandle);
  12674. #endif
  12675. if (!PyArg_ParseTuple(_args, "O&",
  12676. CmpInstObj_Convert, &ci))
  12677. return NULL;
  12678. _rv = GraphicsExportGetInputHandle(ci,
  12679. &h);
  12680. _res = Py_BuildValue("lO&",
  12681. _rv,
  12682. ResObj_New, h);
  12683. return _res;
  12684. }
  12685. static PyObject *Qt_GraphicsExportSetInputPtr(PyObject *_self, PyObject *_args)
  12686. {
  12687. PyObject *_res = NULL;
  12688. ComponentResult _rv;
  12689. GraphicsExportComponent ci;
  12690. Ptr p;
  12691. unsigned long size;
  12692. ImageDescriptionHandle desc;
  12693. #ifndef GraphicsExportSetInputPtr
  12694. PyMac_PRECHECK(GraphicsExportSetInputPtr);
  12695. #endif
  12696. if (!PyArg_ParseTuple(_args, "O&slO&",
  12697. CmpInstObj_Convert, &ci,
  12698. &p,
  12699. &size,
  12700. ResObj_Convert, &desc))
  12701. return NULL;
  12702. _rv = GraphicsExportSetInputPtr(ci,
  12703. p,
  12704. size,
  12705. desc);
  12706. _res = Py_BuildValue("l",
  12707. _rv);
  12708. return _res;
  12709. }
  12710. static PyObject *Qt_GraphicsExportSetInputGraphicsImporter(PyObject *_self, PyObject *_args)
  12711. {
  12712. PyObject *_res = NULL;
  12713. ComponentResult _rv;
  12714. GraphicsExportComponent ci;
  12715. GraphicsImportComponent grip;
  12716. #ifndef GraphicsExportSetInputGraphicsImporter
  12717. PyMac_PRECHECK(GraphicsExportSetInputGraphicsImporter);
  12718. #endif
  12719. if (!PyArg_ParseTuple(_args, "O&O&",
  12720. CmpInstObj_Convert, &ci,
  12721. CmpInstObj_Convert, &grip))
  12722. return NULL;
  12723. _rv = GraphicsExportSetInputGraphicsImporter(ci,
  12724. grip);
  12725. _res = Py_BuildValue("l",
  12726. _rv);
  12727. return _res;
  12728. }
  12729. static PyObject *Qt_GraphicsExportGetInputGraphicsImporter(PyObject *_self, PyObject *_args)
  12730. {
  12731. PyObject *_res = NULL;
  12732. ComponentResult _rv;
  12733. GraphicsExportComponent ci;
  12734. GraphicsImportComponent grip;
  12735. #ifndef GraphicsExportGetInputGraphicsImporter
  12736. PyMac_PRECHECK(GraphicsExportGetInputGraphicsImporter);
  12737. #endif
  12738. if (!PyArg_ParseTuple(_args, "O&",
  12739. CmpInstObj_Convert, &ci))
  12740. return NULL;
  12741. _rv = GraphicsExportGetInputGraphicsImporter(ci,
  12742. &grip);
  12743. _res = Py_BuildValue("lO&",
  12744. _rv,
  12745. CmpInstObj_New, grip);
  12746. return _res;
  12747. }
  12748. static PyObject *Qt_GraphicsExportSetInputPicture(PyObject *_self, PyObject *_args)
  12749. {
  12750. PyObject *_res = NULL;
  12751. ComponentResult _rv;
  12752. GraphicsExportComponent ci;
  12753. PicHandle picture;
  12754. #ifndef GraphicsExportSetInputPicture
  12755. PyMac_PRECHECK(GraphicsExportSetInputPicture);
  12756. #endif
  12757. if (!PyArg_ParseTuple(_args, "O&O&",
  12758. CmpInstObj_Convert, &ci,
  12759. ResObj_Convert, &picture))
  12760. return NULL;
  12761. _rv = GraphicsExportSetInputPicture(ci,
  12762. picture);
  12763. _res = Py_BuildValue("l",
  12764. _rv);
  12765. return _res;
  12766. }
  12767. static PyObject *Qt_GraphicsExportGetInputPicture(PyObject *_self, PyObject *_args)
  12768. {
  12769. PyObject *_res = NULL;
  12770. ComponentResult _rv;
  12771. GraphicsExportComponent ci;
  12772. PicHandle picture;
  12773. #ifndef GraphicsExportGetInputPicture
  12774. PyMac_PRECHECK(GraphicsExportGetInputPicture);
  12775. #endif
  12776. if (!PyArg_ParseTuple(_args, "O&",
  12777. CmpInstObj_Convert, &ci))
  12778. return NULL;
  12779. _rv = GraphicsExportGetInputPicture(ci,
  12780. &picture);
  12781. _res = Py_BuildValue("lO&",
  12782. _rv,
  12783. ResObj_New, picture);
  12784. return _res;
  12785. }
  12786. static PyObject *Qt_GraphicsExportSetInputGWorld(PyObject *_self, PyObject *_args)
  12787. {
  12788. PyObject *_res = NULL;
  12789. ComponentResult _rv;
  12790. GraphicsExportComponent ci;
  12791. GWorldPtr gworld;
  12792. #ifndef GraphicsExportSetInputGWorld
  12793. PyMac_PRECHECK(GraphicsExportSetInputGWorld);
  12794. #endif
  12795. if (!PyArg_ParseTuple(_args, "O&O&",
  12796. CmpInstObj_Convert, &ci,
  12797. GWorldObj_Convert, &gworld))
  12798. return NULL;
  12799. _rv = GraphicsExportSetInputGWorld(ci,
  12800. gworld);
  12801. _res = Py_BuildValue("l",
  12802. _rv);
  12803. return _res;
  12804. }
  12805. static PyObject *Qt_GraphicsExportGetInputGWorld(PyObject *_self, PyObject *_args)
  12806. {
  12807. PyObject *_res = NULL;
  12808. ComponentResult _rv;
  12809. GraphicsExportComponent ci;
  12810. GWorldPtr gworld;
  12811. #ifndef GraphicsExportGetInputGWorld
  12812. PyMac_PRECHECK(GraphicsExportGetInputGWorld);
  12813. #endif
  12814. if (!PyArg_ParseTuple(_args, "O&",
  12815. CmpInstObj_Convert, &ci))
  12816. return NULL;
  12817. _rv = GraphicsExportGetInputGWorld(ci,
  12818. &gworld);
  12819. _res = Py_BuildValue("lO&",
  12820. _rv,
  12821. GWorldObj_New, gworld);
  12822. return _res;
  12823. }
  12824. static PyObject *Qt_GraphicsExportSetInputPixmap(PyObject *_self, PyObject *_args)
  12825. {
  12826. PyObject *_res = NULL;
  12827. ComponentResult _rv;
  12828. GraphicsExportComponent ci;
  12829. PixMapHandle pixmap;
  12830. #ifndef GraphicsExportSetInputPixmap
  12831. PyMac_PRECHECK(GraphicsExportSetInputPixmap);
  12832. #endif
  12833. if (!PyArg_ParseTuple(_args, "O&O&",
  12834. CmpInstObj_Convert, &ci,
  12835. ResObj_Convert, &pixmap))
  12836. return NULL;
  12837. _rv = GraphicsExportSetInputPixmap(ci,
  12838. pixmap);
  12839. _res = Py_BuildValue("l",
  12840. _rv);
  12841. return _res;
  12842. }
  12843. static PyObject *Qt_GraphicsExportGetInputPixmap(PyObject *_self, PyObject *_args)
  12844. {
  12845. PyObject *_res = NULL;
  12846. ComponentResult _rv;
  12847. GraphicsExportComponent ci;
  12848. PixMapHandle pixmap;
  12849. #ifndef GraphicsExportGetInputPixmap
  12850. PyMac_PRECHECK(GraphicsExportGetInputPixmap);
  12851. #endif
  12852. if (!PyArg_ParseTuple(_args, "O&",
  12853. CmpInstObj_Convert, &ci))
  12854. return NULL;
  12855. _rv = GraphicsExportGetInputPixmap(ci,
  12856. &pixmap);
  12857. _res = Py_BuildValue("lO&",
  12858. _rv,
  12859. ResObj_New, pixmap);
  12860. return _res;
  12861. }
  12862. static PyObject *Qt_GraphicsExportSetInputOffsetAndLimit(PyObject *_self, PyObject *_args)
  12863. {
  12864. PyObject *_res = NULL;
  12865. ComponentResult _rv;
  12866. GraphicsExportComponent ci;
  12867. unsigned long offset;
  12868. unsigned long limit;
  12869. #ifndef GraphicsExportSetInputOffsetAndLimit
  12870. PyMac_PRECHECK(GraphicsExportSetInputOffsetAndLimit);
  12871. #endif
  12872. if (!PyArg_ParseTuple(_args, "O&ll",
  12873. CmpInstObj_Convert, &ci,
  12874. &offset,
  12875. &limit))
  12876. return NULL;
  12877. _rv = GraphicsExportSetInputOffsetAndLimit(ci,
  12878. offset,
  12879. limit);
  12880. _res = Py_BuildValue("l",
  12881. _rv);
  12882. return _res;
  12883. }
  12884. static PyObject *Qt_GraphicsExportGetInputOffsetAndLimit(PyObject *_self, PyObject *_args)
  12885. {
  12886. PyObject *_res = NULL;
  12887. ComponentResult _rv;
  12888. GraphicsExportComponent ci;
  12889. unsigned long offset;
  12890. unsigned long limit;
  12891. #ifndef GraphicsExportGetInputOffsetAndLimit
  12892. PyMac_PRECHECK(GraphicsExportGetInputOffsetAndLimit);
  12893. #endif
  12894. if (!PyArg_ParseTuple(_args, "O&",
  12895. CmpInstObj_Convert, &ci))
  12896. return NULL;
  12897. _rv = GraphicsExportGetInputOffsetAndLimit(ci,
  12898. &offset,
  12899. &limit);
  12900. _res = Py_BuildValue("lll",
  12901. _rv,
  12902. offset,
  12903. limit);
  12904. return _res;
  12905. }
  12906. static PyObject *Qt_GraphicsExportMayExporterReadInputData(PyObject *_self, PyObject *_args)
  12907. {
  12908. PyObject *_res = NULL;
  12909. ComponentResult _rv;
  12910. GraphicsExportComponent ci;
  12911. Boolean mayReadInputData;
  12912. #ifndef GraphicsExportMayExporterReadInputData
  12913. PyMac_PRECHECK(GraphicsExportMayExporterReadInputData);
  12914. #endif
  12915. if (!PyArg_ParseTuple(_args, "O&",
  12916. CmpInstObj_Convert, &ci))
  12917. return NULL;
  12918. _rv = GraphicsExportMayExporterReadInputData(ci,
  12919. &mayReadInputData);
  12920. _res = Py_BuildValue("lb",
  12921. _rv,
  12922. mayReadInputData);
  12923. return _res;
  12924. }
  12925. static PyObject *Qt_GraphicsExportGetInputDataSize(PyObject *_self, PyObject *_args)
  12926. {
  12927. PyObject *_res = NULL;
  12928. ComponentResult _rv;
  12929. GraphicsExportComponent ci;
  12930. unsigned long size;
  12931. #ifndef GraphicsExportGetInputDataSize
  12932. PyMac_PRECHECK(GraphicsExportGetInputDataSize);
  12933. #endif
  12934. if (!PyArg_ParseTuple(_args, "O&",
  12935. CmpInstObj_Convert, &ci))
  12936. return NULL;
  12937. _rv = GraphicsExportGetInputDataSize(ci,
  12938. &size);
  12939. _res = Py_BuildValue("ll",
  12940. _rv,
  12941. size);
  12942. return _res;
  12943. }
  12944. static PyObject *Qt_GraphicsExportReadInputData(PyObject *_self, PyObject *_args)
  12945. {
  12946. PyObject *_res = NULL;
  12947. ComponentResult _rv;
  12948. GraphicsExportComponent ci;
  12949. void * dataPtr;
  12950. unsigned long dataOffset;
  12951. unsigned long dataSize;
  12952. #ifndef GraphicsExportReadInputData
  12953. PyMac_PRECHECK(GraphicsExportReadInputData);
  12954. #endif
  12955. if (!PyArg_ParseTuple(_args, "O&sll",
  12956. CmpInstObj_Convert, &ci,
  12957. &dataPtr,
  12958. &dataOffset,
  12959. &dataSize))
  12960. return NULL;
  12961. _rv = GraphicsExportReadInputData(ci,
  12962. dataPtr,
  12963. dataOffset,
  12964. dataSize);
  12965. _res = Py_BuildValue("l",
  12966. _rv);
  12967. return _res;
  12968. }
  12969. static PyObject *Qt_GraphicsExportGetInputImageDescription(PyObject *_self, PyObject *_args)
  12970. {
  12971. PyObject *_res = NULL;
  12972. ComponentResult _rv;
  12973. GraphicsExportComponent ci;
  12974. ImageDescriptionHandle desc;
  12975. #ifndef GraphicsExportGetInputImageDescription
  12976. PyMac_PRECHECK(GraphicsExportGetInputImageDescription);
  12977. #endif
  12978. if (!PyArg_ParseTuple(_args, "O&",
  12979. CmpInstObj_Convert, &ci))
  12980. return NULL;
  12981. _rv = GraphicsExportGetInputImageDescription(ci,
  12982. &desc);
  12983. _res = Py_BuildValue("lO&",
  12984. _rv,
  12985. ResObj_New, desc);
  12986. return _res;
  12987. }
  12988. static PyObject *Qt_GraphicsExportGetInputImageDimensions(PyObject *_self, PyObject *_args)
  12989. {
  12990. PyObject *_res = NULL;
  12991. ComponentResult _rv;
  12992. GraphicsExportComponent ci;
  12993. Rect dimensions;
  12994. #ifndef GraphicsExportGetInputImageDimensions
  12995. PyMac_PRECHECK(GraphicsExportGetInputImageDimensions);
  12996. #endif
  12997. if (!PyArg_ParseTuple(_args, "O&",
  12998. CmpInstObj_Convert, &ci))
  12999. return NULL;
  13000. _rv = GraphicsExportGetInputImageDimensions(ci,
  13001. &dimensions);
  13002. _res = Py_BuildValue("lO&",
  13003. _rv,
  13004. PyMac_BuildRect, &dimensions);
  13005. return _res;
  13006. }
  13007. static PyObject *Qt_GraphicsExportGetInputImageDepth(PyObject *_self, PyObject *_args)
  13008. {
  13009. PyObject *_res = NULL;
  13010. ComponentResult _rv;
  13011. GraphicsExportComponent ci;
  13012. long inputDepth;
  13013. #ifndef GraphicsExportGetInputImageDepth
  13014. PyMac_PRECHECK(GraphicsExportGetInputImageDepth);
  13015. #endif
  13016. if (!PyArg_ParseTuple(_args, "O&",
  13017. CmpInstObj_Convert, &ci))
  13018. return NULL;
  13019. _rv = GraphicsExportGetInputImageDepth(ci,
  13020. &inputDepth);
  13021. _res = Py_BuildValue("ll",
  13022. _rv,
  13023. inputDepth);
  13024. return _res;
  13025. }
  13026. static PyObject *Qt_GraphicsExportDrawInputImage(PyObject *_self, PyObject *_args)
  13027. {
  13028. PyObject *_res = NULL;
  13029. ComponentResult _rv;
  13030. GraphicsExportComponent ci;
  13031. CGrafPtr gw;
  13032. GDHandle gd;
  13033. Rect srcRect;
  13034. Rect dstRect;
  13035. #ifndef GraphicsExportDrawInputImage
  13036. PyMac_PRECHECK(GraphicsExportDrawInputImage);
  13037. #endif
  13038. if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
  13039. CmpInstObj_Convert, &ci,
  13040. GrafObj_Convert, &gw,
  13041. OptResObj_Convert, &gd,
  13042. PyMac_GetRect, &srcRect,
  13043. PyMac_GetRect, &dstRect))
  13044. return NULL;
  13045. _rv = GraphicsExportDrawInputImage(ci,
  13046. gw,
  13047. gd,
  13048. &srcRect,
  13049. &dstRect);
  13050. _res = Py_BuildValue("l",
  13051. _rv);
  13052. return _res;
  13053. }
  13054. static PyObject *Qt_GraphicsExportSetOutputDataReference(PyObject *_self, PyObject *_args)
  13055. {
  13056. PyObject *_res = NULL;
  13057. ComponentResult _rv;
  13058. GraphicsExportComponent ci;
  13059. Handle dataRef;
  13060. OSType dataRefType;
  13061. #ifndef GraphicsExportSetOutputDataReference
  13062. PyMac_PRECHECK(GraphicsExportSetOutputDataReference);
  13063. #endif
  13064. if (!PyArg_ParseTuple(_args, "O&O&O&",
  13065. CmpInstObj_Convert, &ci,
  13066. ResObj_Convert, &dataRef,
  13067. PyMac_GetOSType, &dataRefType))
  13068. return NULL;
  13069. _rv = GraphicsExportSetOutputDataReference(ci,
  13070. dataRef,
  13071. dataRefType);
  13072. _res = Py_BuildValue("l",
  13073. _rv);
  13074. return _res;
  13075. }
  13076. static PyObject *Qt_GraphicsExportGetOutputDataReference(PyObject *_self, PyObject *_args)
  13077. {
  13078. PyObject *_res = NULL;
  13079. ComponentResult _rv;
  13080. GraphicsExportComponent ci;
  13081. Handle dataRef;
  13082. OSType dataRefType;
  13083. #ifndef GraphicsExportGetOutputDataReference
  13084. PyMac_PRECHECK(GraphicsExportGetOutputDataReference);
  13085. #endif
  13086. if (!PyArg_ParseTuple(_args, "O&",
  13087. CmpInstObj_Convert, &ci))
  13088. return NULL;
  13089. _rv = GraphicsExportGetOutputDataReference(ci,
  13090. &dataRef,
  13091. &dataRefType);
  13092. _res = Py_BuildValue("lO&O&",
  13093. _rv,
  13094. ResObj_New, dataRef,
  13095. PyMac_BuildOSType, dataRefType);
  13096. return _res;
  13097. }
  13098. static PyObject *Qt_GraphicsExportSetOutputFile(PyObject *_self, PyObject *_args)
  13099. {
  13100. PyObject *_res = NULL;
  13101. ComponentResult _rv;
  13102. GraphicsExportComponent ci;
  13103. FSSpec theFile;
  13104. #ifndef GraphicsExportSetOutputFile
  13105. PyMac_PRECHECK(GraphicsExportSetOutputFile);
  13106. #endif
  13107. if (!PyArg_ParseTuple(_args, "O&O&",
  13108. CmpInstObj_Convert, &ci,
  13109. PyMac_GetFSSpec, &theFile))
  13110. return NULL;
  13111. _rv = GraphicsExportSetOutputFile(ci,
  13112. &theFile);
  13113. _res = Py_BuildValue("l",
  13114. _rv);
  13115. return _res;
  13116. }
  13117. static PyObject *Qt_GraphicsExportGetOutputFile(PyObject *_self, PyObject *_args)
  13118. {
  13119. PyObject *_res = NULL;
  13120. ComponentResult _rv;
  13121. GraphicsExportComponent ci;
  13122. FSSpec theFile;
  13123. #ifndef GraphicsExportGetOutputFile
  13124. PyMac_PRECHECK(GraphicsExportGetOutputFile);
  13125. #endif
  13126. if (!PyArg_ParseTuple(_args, "O&O&",
  13127. CmpInstObj_Convert, &ci,
  13128. PyMac_GetFSSpec, &theFile))
  13129. return NULL;
  13130. _rv = GraphicsExportGetOutputFile(ci,
  13131. &theFile);
  13132. _res = Py_BuildValue("l",
  13133. _rv);
  13134. return _res;
  13135. }
  13136. static PyObject *Qt_GraphicsExportSetOutputHandle(PyObject *_self, PyObject *_args)
  13137. {
  13138. PyObject *_res = NULL;
  13139. ComponentResult _rv;
  13140. GraphicsExportComponent ci;
  13141. Handle h;
  13142. #ifndef GraphicsExportSetOutputHandle
  13143. PyMac_PRECHECK(GraphicsExportSetOutputHandle);
  13144. #endif
  13145. if (!PyArg_ParseTuple(_args, "O&O&",
  13146. CmpInstObj_Convert, &ci,
  13147. ResObj_Convert, &h))
  13148. return NULL;
  13149. _rv = GraphicsExportSetOutputHandle(ci,
  13150. h);
  13151. _res = Py_BuildValue("l",
  13152. _rv);
  13153. return _res;
  13154. }
  13155. static PyObject *Qt_GraphicsExportGetOutputHandle(PyObject *_self, PyObject *_args)
  13156. {
  13157. PyObject *_res = NULL;
  13158. ComponentResult _rv;
  13159. GraphicsExportComponent ci;
  13160. Handle h;
  13161. #ifndef GraphicsExportGetOutputHandle
  13162. PyMac_PRECHECK(GraphicsExportGetOutputHandle);
  13163. #endif
  13164. if (!PyArg_ParseTuple(_args, "O&",
  13165. CmpInstObj_Convert, &ci))
  13166. return NULL;
  13167. _rv = GraphicsExportGetOutputHandle(ci,
  13168. &h);
  13169. _res = Py_BuildValue("lO&",
  13170. _rv,
  13171. ResObj_New, h);
  13172. return _res;
  13173. }
  13174. static PyObject *Qt_GraphicsExportSetOutputOffsetAndMaxSize(PyObject *_self, PyObject *_args)
  13175. {
  13176. PyObject *_res = NULL;
  13177. ComponentResult _rv;
  13178. GraphicsExportComponent ci;
  13179. unsigned long offset;
  13180. unsigned long maxSize;
  13181. Boolean truncateFile;
  13182. #ifndef GraphicsExportSetOutputOffsetAndMaxSize
  13183. PyMac_PRECHECK(GraphicsExportSetOutputOffsetAndMaxSize);
  13184. #endif
  13185. if (!PyArg_ParseTuple(_args, "O&llb",
  13186. CmpInstObj_Convert, &ci,
  13187. &offset,
  13188. &maxSize,
  13189. &truncateFile))
  13190. return NULL;
  13191. _rv = GraphicsExportSetOutputOffsetAndMaxSize(ci,
  13192. offset,
  13193. maxSize,
  13194. truncateFile);
  13195. _res = Py_BuildValue("l",
  13196. _rv);
  13197. return _res;
  13198. }
  13199. static PyObject *Qt_GraphicsExportGetOutputOffsetAndMaxSize(PyObject *_self, PyObject *_args)
  13200. {
  13201. PyObject *_res = NULL;
  13202. ComponentResult _rv;
  13203. GraphicsExportComponent ci;
  13204. unsigned long offset;
  13205. unsigned long maxSize;
  13206. Boolean truncateFile;
  13207. #ifndef GraphicsExportGetOutputOffsetAndMaxSize
  13208. PyMac_PRECHECK(GraphicsExportGetOutputOffsetAndMaxSize);
  13209. #endif
  13210. if (!PyArg_ParseTuple(_args, "O&",
  13211. CmpInstObj_Convert, &ci))
  13212. return NULL;
  13213. _rv = GraphicsExportGetOutputOffsetAndMaxSize(ci,
  13214. &offset,
  13215. &maxSize,
  13216. &truncateFile);
  13217. _res = Py_BuildValue("lllb",
  13218. _rv,
  13219. offset,
  13220. maxSize,
  13221. truncateFile);
  13222. return _res;
  13223. }
  13224. static PyObject *Qt_GraphicsExportSetOutputFileTypeAndCreator(PyObject *_self, PyObject *_args)
  13225. {
  13226. PyObject *_res = NULL;
  13227. ComponentResult _rv;
  13228. GraphicsExportComponent ci;
  13229. OSType fileType;
  13230. OSType fileCreator;
  13231. #ifndef GraphicsExportSetOutputFileTypeAndCreator
  13232. PyMac_PRECHECK(GraphicsExportSetOutputFileTypeAndCreator);
  13233. #endif
  13234. if (!PyArg_ParseTuple(_args, "O&O&O&",
  13235. CmpInstObj_Convert, &ci,
  13236. PyMac_GetOSType, &fileType,
  13237. PyMac_GetOSType, &fileCreator))
  13238. return NULL;
  13239. _rv = GraphicsExportSetOutputFileTypeAndCreator(ci,
  13240. fileType,
  13241. fileCreator);
  13242. _res = Py_BuildValue("l",
  13243. _rv);
  13244. return _res;
  13245. }
  13246. static PyObject *Qt_GraphicsExportGetOutputFileTypeAndCreator(PyObject *_self, PyObject *_args)
  13247. {
  13248. PyObject *_res = NULL;
  13249. ComponentResult _rv;
  13250. GraphicsExportComponent ci;
  13251. OSType fileType;
  13252. OSType fileCreator;
  13253. #ifndef GraphicsExportGetOutputFileTypeAndCreator
  13254. PyMac_PRECHECK(GraphicsExportGetOutputFileTypeAndCreator);
  13255. #endif
  13256. if (!PyArg_ParseTuple(_args, "O&",
  13257. CmpInstObj_Convert, &ci))
  13258. return NULL;
  13259. _rv = GraphicsExportGetOutputFileTypeAndCreator(ci,
  13260. &fileType,
  13261. &fileCreator);
  13262. _res = Py_BuildValue("lO&O&",
  13263. _rv,
  13264. PyMac_BuildOSType, fileType,
  13265. PyMac_BuildOSType, fileCreator);
  13266. return _res;
  13267. }
  13268. static PyObject *Qt_GraphicsExportSetOutputMark(PyObject *_self, PyObject *_args)
  13269. {
  13270. PyObject *_res = NULL;
  13271. ComponentResult _rv;
  13272. GraphicsExportComponent ci;
  13273. unsigned long mark;
  13274. #ifndef GraphicsExportSetOutputMark
  13275. PyMac_PRECHECK(GraphicsExportSetOutputMark);
  13276. #endif
  13277. if (!PyArg_ParseTuple(_args, "O&l",
  13278. CmpInstObj_Convert, &ci,
  13279. &mark))
  13280. return NULL;
  13281. _rv = GraphicsExportSetOutputMark(ci,
  13282. mark);
  13283. _res = Py_BuildValue("l",
  13284. _rv);
  13285. return _res;
  13286. }
  13287. static PyObject *Qt_GraphicsExportGetOutputMark(PyObject *_self, PyObject *_args)
  13288. {
  13289. PyObject *_res = NULL;
  13290. ComponentResult _rv;
  13291. GraphicsExportComponent ci;
  13292. unsigned long mark;
  13293. #ifndef GraphicsExportGetOutputMark
  13294. PyMac_PRECHECK(GraphicsExportGetOutputMark);
  13295. #endif
  13296. if (!PyArg_ParseTuple(_args, "O&",
  13297. CmpInstObj_Convert, &ci))
  13298. return NULL;
  13299. _rv = GraphicsExportGetOutputMark(ci,
  13300. &mark);
  13301. _res = Py_BuildValue("ll",
  13302. _rv,
  13303. mark);
  13304. return _res;
  13305. }
  13306. static PyObject *Qt_GraphicsExportReadOutputData(PyObject *_self, PyObject *_args)
  13307. {
  13308. PyObject *_res = NULL;
  13309. ComponentResult _rv;
  13310. GraphicsExportComponent ci;
  13311. void * dataPtr;
  13312. unsigned long dataOffset;
  13313. unsigned long dataSize;
  13314. #ifndef GraphicsExportReadOutputData
  13315. PyMac_PRECHECK(GraphicsExportReadOutputData);
  13316. #endif
  13317. if (!PyArg_ParseTuple(_args, "O&sll",
  13318. CmpInstObj_Convert, &ci,
  13319. &dataPtr,
  13320. &dataOffset,
  13321. &dataSize))
  13322. return NULL;
  13323. _rv = GraphicsExportReadOutputData(ci,
  13324. dataPtr,
  13325. dataOffset,
  13326. dataSize);
  13327. _res = Py_BuildValue("l",
  13328. _rv);
  13329. return _res;
  13330. }
  13331. static PyObject *Qt_GraphicsExportSetThumbnailEnabled(PyObject *_self, PyObject *_args)
  13332. {
  13333. PyObject *_res = NULL;
  13334. ComponentResult _rv;
  13335. GraphicsExportComponent ci;
  13336. Boolean enableThumbnail;
  13337. long maxThumbnailWidth;
  13338. long maxThumbnailHeight;
  13339. #ifndef GraphicsExportSetThumbnailEnabled
  13340. PyMac_PRECHECK(GraphicsExportSetThumbnailEnabled);
  13341. #endif
  13342. if (!PyArg_ParseTuple(_args, "O&bll",
  13343. CmpInstObj_Convert, &ci,
  13344. &enableThumbnail,
  13345. &maxThumbnailWidth,
  13346. &maxThumbnailHeight))
  13347. return NULL;
  13348. _rv = GraphicsExportSetThumbnailEnabled(ci,
  13349. enableThumbnail,
  13350. maxThumbnailWidth,
  13351. maxThumbnailHeight);
  13352. _res = Py_BuildValue("l",
  13353. _rv);
  13354. return _res;
  13355. }
  13356. static PyObject *Qt_GraphicsExportGetThumbnailEnabled(PyObject *_self, PyObject *_args)
  13357. {
  13358. PyObject *_res = NULL;
  13359. ComponentResult _rv;
  13360. GraphicsExportComponent ci;
  13361. Boolean thumbnailEnabled;
  13362. long maxThumbnailWidth;
  13363. long maxThumbnailHeight;
  13364. #ifndef GraphicsExportGetThumbnailEnabled
  13365. PyMac_PRECHECK(GraphicsExportGetThumbnailEnabled);
  13366. #endif
  13367. if (!PyArg_ParseTuple(_args, "O&",
  13368. CmpInstObj_Convert, &ci))
  13369. return NULL;
  13370. _rv = GraphicsExportGetThumbnailEnabled(ci,
  13371. &thumbnailEnabled,
  13372. &maxThumbnailWidth,
  13373. &maxThumbnailHeight);
  13374. _res = Py_BuildValue("lbll",
  13375. _rv,
  13376. thumbnailEnabled,
  13377. maxThumbnailWidth,
  13378. maxThumbnailHeight);
  13379. return _res;
  13380. }
  13381. static PyObject *Qt_GraphicsExportSetExifEnabled(PyObject *_self, PyObject *_args)
  13382. {
  13383. PyObject *_res = NULL;
  13384. ComponentResult _rv;
  13385. GraphicsExportComponent ci;
  13386. Boolean enableExif;
  13387. #ifndef GraphicsExportSetExifEnabled
  13388. PyMac_PRECHECK(GraphicsExportSetExifEnabled);
  13389. #endif
  13390. if (!PyArg_ParseTuple(_args, "O&b",
  13391. CmpInstObj_Convert, &ci,
  13392. &enableExif))
  13393. return NULL;
  13394. _rv = GraphicsExportSetExifEnabled(ci,
  13395. enableExif);
  13396. _res = Py_BuildValue("l",
  13397. _rv);
  13398. return _res;
  13399. }
  13400. static PyObject *Qt_GraphicsExportGetExifEnabled(PyObject *_self, PyObject *_args)
  13401. {
  13402. PyObject *_res = NULL;
  13403. ComponentResult _rv;
  13404. GraphicsExportComponent ci;
  13405. Boolean exifEnabled;
  13406. #ifndef GraphicsExportGetExifEnabled
  13407. PyMac_PRECHECK(GraphicsExportGetExifEnabled);
  13408. #endif
  13409. if (!PyArg_ParseTuple(_args, "O&",
  13410. CmpInstObj_Convert, &ci))
  13411. return NULL;
  13412. _rv = GraphicsExportGetExifEnabled(ci,
  13413. &exifEnabled);
  13414. _res = Py_BuildValue("lb",
  13415. _rv,
  13416. exifEnabled);
  13417. return _res;
  13418. }
  13419. static PyObject *Qt_ImageTranscoderBeginSequence(PyObject *_self, PyObject *_args)
  13420. {
  13421. PyObject *_res = NULL;
  13422. ComponentResult _rv;
  13423. ImageTranscoderComponent itc;
  13424. ImageDescriptionHandle srcDesc;
  13425. ImageDescriptionHandle dstDesc;
  13426. void * data;
  13427. long dataSize;
  13428. #ifndef ImageTranscoderBeginSequence
  13429. PyMac_PRECHECK(ImageTranscoderBeginSequence);
  13430. #endif
  13431. if (!PyArg_ParseTuple(_args, "O&O&sl",
  13432. CmpInstObj_Convert, &itc,
  13433. ResObj_Convert, &srcDesc,
  13434. &data,
  13435. &dataSize))
  13436. return NULL;
  13437. _rv = ImageTranscoderBeginSequence(itc,
  13438. srcDesc,
  13439. &dstDesc,
  13440. data,
  13441. dataSize);
  13442. _res = Py_BuildValue("lO&",
  13443. _rv,
  13444. ResObj_New, dstDesc);
  13445. return _res;
  13446. }
  13447. static PyObject *Qt_ImageTranscoderDisposeData(PyObject *_self, PyObject *_args)
  13448. {
  13449. PyObject *_res = NULL;
  13450. ComponentResult _rv;
  13451. ImageTranscoderComponent itc;
  13452. void * dstData;
  13453. #ifndef ImageTranscoderDisposeData
  13454. PyMac_PRECHECK(ImageTranscoderDisposeData);
  13455. #endif
  13456. if (!PyArg_ParseTuple(_args, "O&s",
  13457. CmpInstObj_Convert, &itc,
  13458. &dstData))
  13459. return NULL;
  13460. _rv = ImageTranscoderDisposeData(itc,
  13461. dstData);
  13462. _res = Py_BuildValue("l",
  13463. _rv);
  13464. return _res;
  13465. }
  13466. static PyObject *Qt_ImageTranscoderEndSequence(PyObject *_self, PyObject *_args)
  13467. {
  13468. PyObject *_res = NULL;
  13469. ComponentResult _rv;
  13470. ImageTranscoderComponent itc;
  13471. #ifndef ImageTranscoderEndSequence
  13472. PyMac_PRECHECK(ImageTranscoderEndSequence);
  13473. #endif
  13474. if (!PyArg_ParseTuple(_args, "O&",
  13475. CmpInstObj_Convert, &itc))
  13476. return NULL;
  13477. _rv = ImageTranscoderEndSequence(itc);
  13478. _res = Py_BuildValue("l",
  13479. _rv);
  13480. return _res;
  13481. }
  13482. static PyObject *Qt_ClockGetTime(PyObject *_self, PyObject *_args)
  13483. {
  13484. PyObject *_res = NULL;
  13485. ComponentResult _rv;
  13486. ComponentInstance aClock;
  13487. TimeRecord out;
  13488. #ifndef ClockGetTime
  13489. PyMac_PRECHECK(ClockGetTime);
  13490. #endif
  13491. if (!PyArg_ParseTuple(_args, "O&",
  13492. CmpInstObj_Convert, &aClock))
  13493. return NULL;
  13494. _rv = ClockGetTime(aClock,
  13495. &out);
  13496. _res = Py_BuildValue("lO&",
  13497. _rv,
  13498. QtTimeRecord_New, &out);
  13499. return _res;
  13500. }
  13501. static PyObject *Qt_ClockSetTimeBase(PyObject *_self, PyObject *_args)
  13502. {
  13503. PyObject *_res = NULL;
  13504. ComponentResult _rv;
  13505. ComponentInstance aClock;
  13506. TimeBase tb;
  13507. #ifndef ClockSetTimeBase
  13508. PyMac_PRECHECK(ClockSetTimeBase);
  13509. #endif
  13510. if (!PyArg_ParseTuple(_args, "O&O&",
  13511. CmpInstObj_Convert, &aClock,
  13512. TimeBaseObj_Convert, &tb))
  13513. return NULL;
  13514. _rv = ClockSetTimeBase(aClock,
  13515. tb);
  13516. _res = Py_BuildValue("l",
  13517. _rv);
  13518. return _res;
  13519. }
  13520. static PyObject *Qt_ClockGetRate(PyObject *_self, PyObject *_args)
  13521. {
  13522. PyObject *_res = NULL;
  13523. ComponentResult _rv;
  13524. ComponentInstance aClock;
  13525. Fixed rate;
  13526. #ifndef ClockGetRate
  13527. PyMac_PRECHECK(ClockGetRate);
  13528. #endif
  13529. if (!PyArg_ParseTuple(_args, "O&",
  13530. CmpInstObj_Convert, &aClock))
  13531. return NULL;
  13532. _rv = ClockGetRate(aClock,
  13533. &rate);
  13534. _res = Py_BuildValue("lO&",
  13535. _rv,
  13536. PyMac_BuildFixed, rate);
  13537. return _res;
  13538. }
  13539. static PyObject *Qt_SCPositionRect(PyObject *_self, PyObject *_args)
  13540. {
  13541. PyObject *_res = NULL;
  13542. ComponentResult _rv;
  13543. ComponentInstance ci;
  13544. Rect rp;
  13545. Point where;
  13546. #ifndef SCPositionRect
  13547. PyMac_PRECHECK(SCPositionRect);
  13548. #endif
  13549. if (!PyArg_ParseTuple(_args, "O&",
  13550. CmpInstObj_Convert, &ci))
  13551. return NULL;
  13552. _rv = SCPositionRect(ci,
  13553. &rp,
  13554. &where);
  13555. _res = Py_BuildValue("lO&O&",
  13556. _rv,
  13557. PyMac_BuildRect, &rp,
  13558. PyMac_BuildPoint, where);
  13559. return _res;
  13560. }
  13561. static PyObject *Qt_SCPositionDialog(PyObject *_self, PyObject *_args)
  13562. {
  13563. PyObject *_res = NULL;
  13564. ComponentResult _rv;
  13565. ComponentInstance ci;
  13566. short id;
  13567. Point where;
  13568. #ifndef SCPositionDialog
  13569. PyMac_PRECHECK(SCPositionDialog);
  13570. #endif
  13571. if (!PyArg_ParseTuple(_args, "O&h",
  13572. CmpInstObj_Convert, &ci,
  13573. &id))
  13574. return NULL;
  13575. _rv = SCPositionDialog(ci,
  13576. id,
  13577. &where);
  13578. _res = Py_BuildValue("lO&",
  13579. _rv,
  13580. PyMac_BuildPoint, where);
  13581. return _res;
  13582. }
  13583. static PyObject *Qt_SCSetTestImagePictHandle(PyObject *_self, PyObject *_args)
  13584. {
  13585. PyObject *_res = NULL;
  13586. ComponentResult _rv;
  13587. ComponentInstance ci;
  13588. PicHandle testPict;
  13589. Rect testRect;
  13590. short testFlags;
  13591. #ifndef SCSetTestImagePictHandle
  13592. PyMac_PRECHECK(SCSetTestImagePictHandle);
  13593. #endif
  13594. if (!PyArg_ParseTuple(_args, "O&O&h",
  13595. CmpInstObj_Convert, &ci,
  13596. ResObj_Convert, &testPict,
  13597. &testFlags))
  13598. return NULL;
  13599. _rv = SCSetTestImagePictHandle(ci,
  13600. testPict,
  13601. &testRect,
  13602. testFlags);
  13603. _res = Py_BuildValue("lO&",
  13604. _rv,
  13605. PyMac_BuildRect, &testRect);
  13606. return _res;
  13607. }
  13608. static PyObject *Qt_SCSetTestImagePictFile(PyObject *_self, PyObject *_args)
  13609. {
  13610. PyObject *_res = NULL;
  13611. ComponentResult _rv;
  13612. ComponentInstance ci;
  13613. short testFileRef;
  13614. Rect testRect;
  13615. short testFlags;
  13616. #ifndef SCSetTestImagePictFile
  13617. PyMac_PRECHECK(SCSetTestImagePictFile);
  13618. #endif
  13619. if (!PyArg_ParseTuple(_args, "O&hh",
  13620. CmpInstObj_Convert, &ci,
  13621. &testFileRef,
  13622. &testFlags))
  13623. return NULL;
  13624. _rv = SCSetTestImagePictFile(ci,
  13625. testFileRef,
  13626. &testRect,
  13627. testFlags);
  13628. _res = Py_BuildValue("lO&",
  13629. _rv,
  13630. PyMac_BuildRect, &testRect);
  13631. return _res;
  13632. }
  13633. static PyObject *Qt_SCSetTestImagePixMap(PyObject *_self, PyObject *_args)
  13634. {
  13635. PyObject *_res = NULL;
  13636. ComponentResult _rv;
  13637. ComponentInstance ci;
  13638. PixMapHandle testPixMap;
  13639. Rect testRect;
  13640. short testFlags;
  13641. #ifndef SCSetTestImagePixMap
  13642. PyMac_PRECHECK(SCSetTestImagePixMap);
  13643. #endif
  13644. if (!PyArg_ParseTuple(_args, "O&O&h",
  13645. CmpInstObj_Convert, &ci,
  13646. ResObj_Convert, &testPixMap,
  13647. &testFlags))
  13648. return NULL;
  13649. _rv = SCSetTestImagePixMap(ci,
  13650. testPixMap,
  13651. &testRect,
  13652. testFlags);
  13653. _res = Py_BuildValue("lO&",
  13654. _rv,
  13655. PyMac_BuildRect, &testRect);
  13656. return _res;
  13657. }
  13658. static PyObject *Qt_SCGetBestDeviceRect(PyObject *_self, PyObject *_args)
  13659. {
  13660. PyObject *_res = NULL;
  13661. ComponentResult _rv;
  13662. ComponentInstance ci;
  13663. Rect r;
  13664. #ifndef SCGetBestDeviceRect
  13665. PyMac_PRECHECK(SCGetBestDeviceRect);
  13666. #endif
  13667. if (!PyArg_ParseTuple(_args, "O&",
  13668. CmpInstObj_Convert, &ci))
  13669. return NULL;
  13670. _rv = SCGetBestDeviceRect(ci,
  13671. &r);
  13672. _res = Py_BuildValue("lO&",
  13673. _rv,
  13674. PyMac_BuildRect, &r);
  13675. return _res;
  13676. }
  13677. static PyObject *Qt_SCRequestImageSettings(PyObject *_self, PyObject *_args)
  13678. {
  13679. PyObject *_res = NULL;
  13680. ComponentResult _rv;
  13681. ComponentInstance ci;
  13682. #ifndef SCRequestImageSettings
  13683. PyMac_PRECHECK(SCRequestImageSettings);
  13684. #endif
  13685. if (!PyArg_ParseTuple(_args, "O&",
  13686. CmpInstObj_Convert, &ci))
  13687. return NULL;
  13688. _rv = SCRequestImageSettings(ci);
  13689. _res = Py_BuildValue("l",
  13690. _rv);
  13691. return _res;
  13692. }
  13693. static PyObject *Qt_SCCompressImage(PyObject *_self, PyObject *_args)
  13694. {
  13695. PyObject *_res = NULL;
  13696. ComponentResult _rv;
  13697. ComponentInstance ci;
  13698. PixMapHandle src;
  13699. Rect srcRect;
  13700. ImageDescriptionHandle desc;
  13701. Handle data;
  13702. #ifndef SCCompressImage
  13703. PyMac_PRECHECK(SCCompressImage);
  13704. #endif
  13705. if (!PyArg_ParseTuple(_args, "O&O&O&",
  13706. CmpInstObj_Convert, &ci,
  13707. ResObj_Convert, &src,
  13708. PyMac_GetRect, &srcRect))
  13709. return NULL;
  13710. _rv = SCCompressImage(ci,
  13711. src,
  13712. &srcRect,
  13713. &desc,
  13714. &data);
  13715. _res = Py_BuildValue("lO&O&",
  13716. _rv,
  13717. ResObj_New, desc,
  13718. ResObj_New, data);
  13719. return _res;
  13720. }
  13721. static PyObject *Qt_SCCompressPicture(PyObject *_self, PyObject *_args)
  13722. {
  13723. PyObject *_res = NULL;
  13724. ComponentResult _rv;
  13725. ComponentInstance ci;
  13726. PicHandle srcPicture;
  13727. PicHandle dstPicture;
  13728. #ifndef SCCompressPicture
  13729. PyMac_PRECHECK(SCCompressPicture);
  13730. #endif
  13731. if (!PyArg_ParseTuple(_args, "O&O&O&",
  13732. CmpInstObj_Convert, &ci,
  13733. ResObj_Convert, &srcPicture,
  13734. ResObj_Convert, &dstPicture))
  13735. return NULL;
  13736. _rv = SCCompressPicture(ci,
  13737. srcPicture,
  13738. dstPicture);
  13739. _res = Py_BuildValue("l",
  13740. _rv);
  13741. return _res;
  13742. }
  13743. static PyObject *Qt_SCCompressPictureFile(PyObject *_self, PyObject *_args)
  13744. {
  13745. PyObject *_res = NULL;
  13746. ComponentResult _rv;
  13747. ComponentInstance ci;
  13748. short srcRefNum;
  13749. short dstRefNum;
  13750. #ifndef SCCompressPictureFile
  13751. PyMac_PRECHECK(SCCompressPictureFile);
  13752. #endif
  13753. if (!PyArg_ParseTuple(_args, "O&hh",
  13754. CmpInstObj_Convert, &ci,
  13755. &srcRefNum,
  13756. &dstRefNum))
  13757. return NULL;
  13758. _rv = SCCompressPictureFile(ci,
  13759. srcRefNum,
  13760. dstRefNum);
  13761. _res = Py_BuildValue("l",
  13762. _rv);
  13763. return _res;
  13764. }
  13765. static PyObject *Qt_SCRequestSequenceSettings(PyObject *_self, PyObject *_args)
  13766. {
  13767. PyObject *_res = NULL;
  13768. ComponentResult _rv;
  13769. ComponentInstance ci;
  13770. #ifndef SCRequestSequenceSettings
  13771. PyMac_PRECHECK(SCRequestSequenceSettings);
  13772. #endif
  13773. if (!PyArg_ParseTuple(_args, "O&",
  13774. CmpInstObj_Convert, &ci))
  13775. return NULL;
  13776. _rv = SCRequestSequenceSettings(ci);
  13777. _res = Py_BuildValue("l",
  13778. _rv);
  13779. return _res;
  13780. }
  13781. static PyObject *Qt_SCCompressSequenceBegin(PyObject *_self, PyObject *_args)
  13782. {
  13783. PyObject *_res = NULL;
  13784. ComponentResult _rv;
  13785. ComponentInstance ci;
  13786. PixMapHandle src;
  13787. Rect srcRect;
  13788. ImageDescriptionHandle desc;
  13789. #ifndef SCCompressSequenceBegin
  13790. PyMac_PRECHECK(SCCompressSequenceBegin);
  13791. #endif
  13792. if (!PyArg_ParseTuple(_args, "O&O&O&",
  13793. CmpInstObj_Convert, &ci,
  13794. ResObj_Convert, &src,
  13795. PyMac_GetRect, &srcRect))
  13796. return NULL;
  13797. _rv = SCCompressSequenceBegin(ci,
  13798. src,
  13799. &srcRect,
  13800. &desc);
  13801. _res = Py_BuildValue("lO&",
  13802. _rv,
  13803. ResObj_New, desc);
  13804. return _res;
  13805. }
  13806. static PyObject *Qt_SCCompressSequenceFrame(PyObject *_self, PyObject *_args)
  13807. {
  13808. PyObject *_res = NULL;
  13809. ComponentResult _rv;
  13810. ComponentInstance ci;
  13811. PixMapHandle src;
  13812. Rect srcRect;
  13813. Handle data;
  13814. long dataSize;
  13815. short notSyncFlag;
  13816. #ifndef SCCompressSequenceFrame
  13817. PyMac_PRECHECK(SCCompressSequenceFrame);
  13818. #endif
  13819. if (!PyArg_ParseTuple(_args, "O&O&O&",
  13820. CmpInstObj_Convert, &ci,
  13821. ResObj_Convert, &src,
  13822. PyMac_GetRect, &srcRect))
  13823. return NULL;
  13824. _rv = SCCompressSequenceFrame(ci,
  13825. src,
  13826. &srcRect,
  13827. &data,
  13828. &dataSize,
  13829. &notSyncFlag);
  13830. _res = Py_BuildValue("lO&lh",
  13831. _rv,
  13832. ResObj_New, data,
  13833. dataSize,
  13834. notSyncFlag);
  13835. return _res;
  13836. }
  13837. static PyObject *Qt_SCCompressSequenceEnd(PyObject *_self, PyObject *_args)
  13838. {
  13839. PyObject *_res = NULL;
  13840. ComponentResult _rv;
  13841. ComponentInstance ci;
  13842. #ifndef SCCompressSequenceEnd
  13843. PyMac_PRECHECK(SCCompressSequenceEnd);
  13844. #endif
  13845. if (!PyArg_ParseTuple(_args, "O&",
  13846. CmpInstObj_Convert, &ci))
  13847. return NULL;
  13848. _rv = SCCompressSequenceEnd(ci);
  13849. _res = Py_BuildValue("l",
  13850. _rv);
  13851. return _res;
  13852. }
  13853. static PyObject *Qt_SCDefaultPictHandleSettings(PyObject *_self, PyObject *_args)
  13854. {
  13855. PyObject *_res = NULL;
  13856. ComponentResult _rv;
  13857. ComponentInstance ci;
  13858. PicHandle srcPicture;
  13859. short motion;
  13860. #ifndef SCDefaultPictHandleSettings
  13861. PyMac_PRECHECK(SCDefaultPictHandleSettings);
  13862. #endif
  13863. if (!PyArg_ParseTuple(_args, "O&O&h",
  13864. CmpInstObj_Convert, &ci,
  13865. ResObj_Convert, &srcPicture,
  13866. &motion))
  13867. return NULL;
  13868. _rv = SCDefaultPictHandleSettings(ci,
  13869. srcPicture,
  13870. motion);
  13871. _res = Py_BuildValue("l",
  13872. _rv);
  13873. return _res;
  13874. }
  13875. static PyObject *Qt_SCDefaultPictFileSettings(PyObject *_self, PyObject *_args)
  13876. {
  13877. PyObject *_res = NULL;
  13878. ComponentResult _rv;
  13879. ComponentInstance ci;
  13880. short srcRef;
  13881. short motion;
  13882. #ifndef SCDefaultPictFileSettings
  13883. PyMac_PRECHECK(SCDefaultPictFileSettings);
  13884. #endif
  13885. if (!PyArg_ParseTuple(_args, "O&hh",
  13886. CmpInstObj_Convert, &ci,
  13887. &srcRef,
  13888. &motion))
  13889. return NULL;
  13890. _rv = SCDefaultPictFileSettings(ci,
  13891. srcRef,
  13892. motion);
  13893. _res = Py_BuildValue("l",
  13894. _rv);
  13895. return _res;
  13896. }
  13897. static PyObject *Qt_SCDefaultPixMapSettings(PyObject *_self, PyObject *_args)
  13898. {
  13899. PyObject *_res = NULL;
  13900. ComponentResult _rv;
  13901. ComponentInstance ci;
  13902. PixMapHandle src;
  13903. short motion;
  13904. #ifndef SCDefaultPixMapSettings
  13905. PyMac_PRECHECK(SCDefaultPixMapSettings);
  13906. #endif
  13907. if (!PyArg_ParseTuple(_args, "O&O&h",
  13908. CmpInstObj_Convert, &ci,
  13909. ResObj_Convert, &src,
  13910. &motion))
  13911. return NULL;
  13912. _rv = SCDefaultPixMapSettings(ci,
  13913. src,
  13914. motion);
  13915. _res = Py_BuildValue("l",
  13916. _rv);
  13917. return _res;
  13918. }
  13919. static PyObject *Qt_SCGetInfo(PyObject *_self, PyObject *_args)
  13920. {
  13921. PyObject *_res = NULL;
  13922. ComponentResult _rv;
  13923. ComponentInstance ci;
  13924. OSType infoType;
  13925. void * info;
  13926. #ifndef SCGetInfo
  13927. PyMac_PRECHECK(SCGetInfo);
  13928. #endif
  13929. if (!PyArg_ParseTuple(_args, "O&O&s",
  13930. CmpInstObj_Convert, &ci,
  13931. PyMac_GetOSType, &infoType,
  13932. &info))
  13933. return NULL;
  13934. _rv = SCGetInfo(ci,
  13935. infoType,
  13936. info);
  13937. _res = Py_BuildValue("l",
  13938. _rv);
  13939. return _res;
  13940. }
  13941. static PyObject *Qt_SCSetInfo(PyObject *_self, PyObject *_args)
  13942. {
  13943. PyObject *_res = NULL;
  13944. ComponentResult _rv;
  13945. ComponentInstance ci;
  13946. OSType infoType;
  13947. void * info;
  13948. #ifndef SCSetInfo
  13949. PyMac_PRECHECK(SCSetInfo);
  13950. #endif
  13951. if (!PyArg_ParseTuple(_args, "O&O&s",
  13952. CmpInstObj_Convert, &ci,
  13953. PyMac_GetOSType, &infoType,
  13954. &info))
  13955. return NULL;
  13956. _rv = SCSetInfo(ci,
  13957. infoType,
  13958. info);
  13959. _res = Py_BuildValue("l",
  13960. _rv);
  13961. return _res;
  13962. }
  13963. static PyObject *Qt_SCSetCompressFlags(PyObject *_self, PyObject *_args)
  13964. {
  13965. PyObject *_res = NULL;
  13966. ComponentResult _rv;
  13967. ComponentInstance ci;
  13968. long flags;
  13969. #ifndef SCSetCompressFlags
  13970. PyMac_PRECHECK(SCSetCompressFlags);
  13971. #endif
  13972. if (!PyArg_ParseTuple(_args, "O&l",
  13973. CmpInstObj_Convert, &ci,
  13974. &flags))
  13975. return NULL;
  13976. _rv = SCSetCompressFlags(ci,
  13977. flags);
  13978. _res = Py_BuildValue("l",
  13979. _rv);
  13980. return _res;
  13981. }
  13982. static PyObject *Qt_SCGetCompressFlags(PyObject *_self, PyObject *_args)
  13983. {
  13984. PyObject *_res = NULL;
  13985. ComponentResult _rv;
  13986. ComponentInstance ci;
  13987. long flags;
  13988. #ifndef SCGetCompressFlags
  13989. PyMac_PRECHECK(SCGetCompressFlags);
  13990. #endif
  13991. if (!PyArg_ParseTuple(_args, "O&",
  13992. CmpInstObj_Convert, &ci))
  13993. return NULL;
  13994. _rv = SCGetCompressFlags(ci,
  13995. &flags);
  13996. _res = Py_BuildValue("ll",
  13997. _rv,
  13998. flags);
  13999. return _res;
  14000. }
  14001. static PyObject *Qt_SCGetSettingsAsText(PyObject *_self, PyObject *_args)
  14002. {
  14003. PyObject *_res = NULL;
  14004. ComponentResult _rv;
  14005. ComponentInstance ci;
  14006. Handle text;
  14007. #ifndef SCGetSettingsAsText
  14008. PyMac_PRECHECK(SCGetSettingsAsText);
  14009. #endif
  14010. if (!PyArg_ParseTuple(_args, "O&",
  14011. CmpInstObj_Convert, &ci))
  14012. return NULL;
  14013. _rv = SCGetSettingsAsText(ci,
  14014. &text);
  14015. _res = Py_BuildValue("lO&",
  14016. _rv,
  14017. ResObj_New, text);
  14018. return _res;
  14019. }
  14020. static PyObject *Qt_SCAsyncIdle(PyObject *_self, PyObject *_args)
  14021. {
  14022. PyObject *_res = NULL;
  14023. ComponentResult _rv;
  14024. ComponentInstance ci;
  14025. #ifndef SCAsyncIdle
  14026. PyMac_PRECHECK(SCAsyncIdle);
  14027. #endif
  14028. if (!PyArg_ParseTuple(_args, "O&",
  14029. CmpInstObj_Convert, &ci))
  14030. return NULL;
  14031. _rv = SCAsyncIdle(ci);
  14032. _res = Py_BuildValue("l",
  14033. _rv);
  14034. return _res;
  14035. }
  14036. static PyObject *Qt_TweenerReset(PyObject *_self, PyObject *_args)
  14037. {
  14038. PyObject *_res = NULL;
  14039. ComponentResult _rv;
  14040. TweenerComponent tc;
  14041. #ifndef TweenerReset
  14042. PyMac_PRECHECK(TweenerReset);
  14043. #endif
  14044. if (!PyArg_ParseTuple(_args, "O&",
  14045. CmpInstObj_Convert, &tc))
  14046. return NULL;
  14047. _rv = TweenerReset(tc);
  14048. _res = Py_BuildValue("l",
  14049. _rv);
  14050. return _res;
  14051. }
  14052. static PyObject *Qt_TCGetSourceRef(PyObject *_self, PyObject *_args)
  14053. {
  14054. PyObject *_res = NULL;
  14055. HandlerError _rv;
  14056. MediaHandler mh;
  14057. TimeCodeDescriptionHandle tcdH;
  14058. UserData srefH;
  14059. #ifndef TCGetSourceRef
  14060. PyMac_PRECHECK(TCGetSourceRef);
  14061. #endif
  14062. if (!PyArg_ParseTuple(_args, "O&O&",
  14063. CmpInstObj_Convert, &mh,
  14064. ResObj_Convert, &tcdH))
  14065. return NULL;
  14066. _rv = TCGetSourceRef(mh,
  14067. tcdH,
  14068. &srefH);
  14069. _res = Py_BuildValue("lO&",
  14070. _rv,
  14071. UserDataObj_New, srefH);
  14072. return _res;
  14073. }
  14074. static PyObject *Qt_TCSetSourceRef(PyObject *_self, PyObject *_args)
  14075. {
  14076. PyObject *_res = NULL;
  14077. HandlerError _rv;
  14078. MediaHandler mh;
  14079. TimeCodeDescriptionHandle tcdH;
  14080. UserData srefH;
  14081. #ifndef TCSetSourceRef
  14082. PyMac_PRECHECK(TCSetSourceRef);
  14083. #endif
  14084. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14085. CmpInstObj_Convert, &mh,
  14086. ResObj_Convert, &tcdH,
  14087. UserDataObj_Convert, &srefH))
  14088. return NULL;
  14089. _rv = TCSetSourceRef(mh,
  14090. tcdH,
  14091. srefH);
  14092. _res = Py_BuildValue("l",
  14093. _rv);
  14094. return _res;
  14095. }
  14096. static PyObject *Qt_TCSetTimeCodeFlags(PyObject *_self, PyObject *_args)
  14097. {
  14098. PyObject *_res = NULL;
  14099. HandlerError _rv;
  14100. MediaHandler mh;
  14101. long flags;
  14102. long flagsMask;
  14103. #ifndef TCSetTimeCodeFlags
  14104. PyMac_PRECHECK(TCSetTimeCodeFlags);
  14105. #endif
  14106. if (!PyArg_ParseTuple(_args, "O&ll",
  14107. CmpInstObj_Convert, &mh,
  14108. &flags,
  14109. &flagsMask))
  14110. return NULL;
  14111. _rv = TCSetTimeCodeFlags(mh,
  14112. flags,
  14113. flagsMask);
  14114. _res = Py_BuildValue("l",
  14115. _rv);
  14116. return _res;
  14117. }
  14118. static PyObject *Qt_TCGetTimeCodeFlags(PyObject *_self, PyObject *_args)
  14119. {
  14120. PyObject *_res = NULL;
  14121. HandlerError _rv;
  14122. MediaHandler mh;
  14123. long flags;
  14124. #ifndef TCGetTimeCodeFlags
  14125. PyMac_PRECHECK(TCGetTimeCodeFlags);
  14126. #endif
  14127. if (!PyArg_ParseTuple(_args, "O&",
  14128. CmpInstObj_Convert, &mh))
  14129. return NULL;
  14130. _rv = TCGetTimeCodeFlags(mh,
  14131. &flags);
  14132. _res = Py_BuildValue("ll",
  14133. _rv,
  14134. flags);
  14135. return _res;
  14136. }
  14137. static PyObject *Qt_MovieImportHandle(PyObject *_self, PyObject *_args)
  14138. {
  14139. PyObject *_res = NULL;
  14140. ComponentResult _rv;
  14141. MovieImportComponent ci;
  14142. Handle dataH;
  14143. Movie theMovie;
  14144. Track targetTrack;
  14145. Track usedTrack;
  14146. TimeValue atTime;
  14147. TimeValue addedDuration;
  14148. long inFlags;
  14149. long outFlags;
  14150. #ifndef MovieImportHandle
  14151. PyMac_PRECHECK(MovieImportHandle);
  14152. #endif
  14153. if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
  14154. CmpInstObj_Convert, &ci,
  14155. ResObj_Convert, &dataH,
  14156. MovieObj_Convert, &theMovie,
  14157. TrackObj_Convert, &targetTrack,
  14158. &atTime,
  14159. &inFlags))
  14160. return NULL;
  14161. _rv = MovieImportHandle(ci,
  14162. dataH,
  14163. theMovie,
  14164. targetTrack,
  14165. &usedTrack,
  14166. atTime,
  14167. &addedDuration,
  14168. inFlags,
  14169. &outFlags);
  14170. _res = Py_BuildValue("lO&ll",
  14171. _rv,
  14172. TrackObj_New, usedTrack,
  14173. addedDuration,
  14174. outFlags);
  14175. return _res;
  14176. }
  14177. static PyObject *Qt_MovieImportFile(PyObject *_self, PyObject *_args)
  14178. {
  14179. PyObject *_res = NULL;
  14180. ComponentResult _rv;
  14181. MovieImportComponent ci;
  14182. FSSpec theFile;
  14183. Movie theMovie;
  14184. Track targetTrack;
  14185. Track usedTrack;
  14186. TimeValue atTime;
  14187. TimeValue addedDuration;
  14188. long inFlags;
  14189. long outFlags;
  14190. #ifndef MovieImportFile
  14191. PyMac_PRECHECK(MovieImportFile);
  14192. #endif
  14193. if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
  14194. CmpInstObj_Convert, &ci,
  14195. PyMac_GetFSSpec, &theFile,
  14196. MovieObj_Convert, &theMovie,
  14197. TrackObj_Convert, &targetTrack,
  14198. &atTime,
  14199. &inFlags))
  14200. return NULL;
  14201. _rv = MovieImportFile(ci,
  14202. &theFile,
  14203. theMovie,
  14204. targetTrack,
  14205. &usedTrack,
  14206. atTime,
  14207. &addedDuration,
  14208. inFlags,
  14209. &outFlags);
  14210. _res = Py_BuildValue("lO&ll",
  14211. _rv,
  14212. TrackObj_New, usedTrack,
  14213. addedDuration,
  14214. outFlags);
  14215. return _res;
  14216. }
  14217. static PyObject *Qt_MovieImportSetSampleDuration(PyObject *_self, PyObject *_args)
  14218. {
  14219. PyObject *_res = NULL;
  14220. ComponentResult _rv;
  14221. MovieImportComponent ci;
  14222. TimeValue duration;
  14223. TimeScale scale;
  14224. #ifndef MovieImportSetSampleDuration
  14225. PyMac_PRECHECK(MovieImportSetSampleDuration);
  14226. #endif
  14227. if (!PyArg_ParseTuple(_args, "O&ll",
  14228. CmpInstObj_Convert, &ci,
  14229. &duration,
  14230. &scale))
  14231. return NULL;
  14232. _rv = MovieImportSetSampleDuration(ci,
  14233. duration,
  14234. scale);
  14235. _res = Py_BuildValue("l",
  14236. _rv);
  14237. return _res;
  14238. }
  14239. static PyObject *Qt_MovieImportSetSampleDescription(PyObject *_self, PyObject *_args)
  14240. {
  14241. PyObject *_res = NULL;
  14242. ComponentResult _rv;
  14243. MovieImportComponent ci;
  14244. SampleDescriptionHandle desc;
  14245. OSType mediaType;
  14246. #ifndef MovieImportSetSampleDescription
  14247. PyMac_PRECHECK(MovieImportSetSampleDescription);
  14248. #endif
  14249. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14250. CmpInstObj_Convert, &ci,
  14251. ResObj_Convert, &desc,
  14252. PyMac_GetOSType, &mediaType))
  14253. return NULL;
  14254. _rv = MovieImportSetSampleDescription(ci,
  14255. desc,
  14256. mediaType);
  14257. _res = Py_BuildValue("l",
  14258. _rv);
  14259. return _res;
  14260. }
  14261. static PyObject *Qt_MovieImportSetMediaFile(PyObject *_self, PyObject *_args)
  14262. {
  14263. PyObject *_res = NULL;
  14264. ComponentResult _rv;
  14265. MovieImportComponent ci;
  14266. AliasHandle alias;
  14267. #ifndef MovieImportSetMediaFile
  14268. PyMac_PRECHECK(MovieImportSetMediaFile);
  14269. #endif
  14270. if (!PyArg_ParseTuple(_args, "O&O&",
  14271. CmpInstObj_Convert, &ci,
  14272. ResObj_Convert, &alias))
  14273. return NULL;
  14274. _rv = MovieImportSetMediaFile(ci,
  14275. alias);
  14276. _res = Py_BuildValue("l",
  14277. _rv);
  14278. return _res;
  14279. }
  14280. static PyObject *Qt_MovieImportSetDimensions(PyObject *_self, PyObject *_args)
  14281. {
  14282. PyObject *_res = NULL;
  14283. ComponentResult _rv;
  14284. MovieImportComponent ci;
  14285. Fixed width;
  14286. Fixed height;
  14287. #ifndef MovieImportSetDimensions
  14288. PyMac_PRECHECK(MovieImportSetDimensions);
  14289. #endif
  14290. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14291. CmpInstObj_Convert, &ci,
  14292. PyMac_GetFixed, &width,
  14293. PyMac_GetFixed, &height))
  14294. return NULL;
  14295. _rv = MovieImportSetDimensions(ci,
  14296. width,
  14297. height);
  14298. _res = Py_BuildValue("l",
  14299. _rv);
  14300. return _res;
  14301. }
  14302. static PyObject *Qt_MovieImportSetChunkSize(PyObject *_self, PyObject *_args)
  14303. {
  14304. PyObject *_res = NULL;
  14305. ComponentResult _rv;
  14306. MovieImportComponent ci;
  14307. long chunkSize;
  14308. #ifndef MovieImportSetChunkSize
  14309. PyMac_PRECHECK(MovieImportSetChunkSize);
  14310. #endif
  14311. if (!PyArg_ParseTuple(_args, "O&l",
  14312. CmpInstObj_Convert, &ci,
  14313. &chunkSize))
  14314. return NULL;
  14315. _rv = MovieImportSetChunkSize(ci,
  14316. chunkSize);
  14317. _res = Py_BuildValue("l",
  14318. _rv);
  14319. return _res;
  14320. }
  14321. static PyObject *Qt_MovieImportSetAuxiliaryData(PyObject *_self, PyObject *_args)
  14322. {
  14323. PyObject *_res = NULL;
  14324. ComponentResult _rv;
  14325. MovieImportComponent ci;
  14326. Handle data;
  14327. OSType handleType;
  14328. #ifndef MovieImportSetAuxiliaryData
  14329. PyMac_PRECHECK(MovieImportSetAuxiliaryData);
  14330. #endif
  14331. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14332. CmpInstObj_Convert, &ci,
  14333. ResObj_Convert, &data,
  14334. PyMac_GetOSType, &handleType))
  14335. return NULL;
  14336. _rv = MovieImportSetAuxiliaryData(ci,
  14337. data,
  14338. handleType);
  14339. _res = Py_BuildValue("l",
  14340. _rv);
  14341. return _res;
  14342. }
  14343. static PyObject *Qt_MovieImportSetFromScrap(PyObject *_self, PyObject *_args)
  14344. {
  14345. PyObject *_res = NULL;
  14346. ComponentResult _rv;
  14347. MovieImportComponent ci;
  14348. Boolean fromScrap;
  14349. #ifndef MovieImportSetFromScrap
  14350. PyMac_PRECHECK(MovieImportSetFromScrap);
  14351. #endif
  14352. if (!PyArg_ParseTuple(_args, "O&b",
  14353. CmpInstObj_Convert, &ci,
  14354. &fromScrap))
  14355. return NULL;
  14356. _rv = MovieImportSetFromScrap(ci,
  14357. fromScrap);
  14358. _res = Py_BuildValue("l",
  14359. _rv);
  14360. return _res;
  14361. }
  14362. static PyObject *Qt_MovieImportDoUserDialog(PyObject *_self, PyObject *_args)
  14363. {
  14364. PyObject *_res = NULL;
  14365. ComponentResult _rv;
  14366. MovieImportComponent ci;
  14367. FSSpec theFile;
  14368. Handle theData;
  14369. Boolean canceled;
  14370. #ifndef MovieImportDoUserDialog
  14371. PyMac_PRECHECK(MovieImportDoUserDialog);
  14372. #endif
  14373. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14374. CmpInstObj_Convert, &ci,
  14375. PyMac_GetFSSpec, &theFile,
  14376. ResObj_Convert, &theData))
  14377. return NULL;
  14378. _rv = MovieImportDoUserDialog(ci,
  14379. &theFile,
  14380. theData,
  14381. &canceled);
  14382. _res = Py_BuildValue("lb",
  14383. _rv,
  14384. canceled);
  14385. return _res;
  14386. }
  14387. static PyObject *Qt_MovieImportSetDuration(PyObject *_self, PyObject *_args)
  14388. {
  14389. PyObject *_res = NULL;
  14390. ComponentResult _rv;
  14391. MovieImportComponent ci;
  14392. TimeValue duration;
  14393. #ifndef MovieImportSetDuration
  14394. PyMac_PRECHECK(MovieImportSetDuration);
  14395. #endif
  14396. if (!PyArg_ParseTuple(_args, "O&l",
  14397. CmpInstObj_Convert, &ci,
  14398. &duration))
  14399. return NULL;
  14400. _rv = MovieImportSetDuration(ci,
  14401. duration);
  14402. _res = Py_BuildValue("l",
  14403. _rv);
  14404. return _res;
  14405. }
  14406. static PyObject *Qt_MovieImportGetAuxiliaryDataType(PyObject *_self, PyObject *_args)
  14407. {
  14408. PyObject *_res = NULL;
  14409. ComponentResult _rv;
  14410. MovieImportComponent ci;
  14411. OSType auxType;
  14412. #ifndef MovieImportGetAuxiliaryDataType
  14413. PyMac_PRECHECK(MovieImportGetAuxiliaryDataType);
  14414. #endif
  14415. if (!PyArg_ParseTuple(_args, "O&",
  14416. CmpInstObj_Convert, &ci))
  14417. return NULL;
  14418. _rv = MovieImportGetAuxiliaryDataType(ci,
  14419. &auxType);
  14420. _res = Py_BuildValue("lO&",
  14421. _rv,
  14422. PyMac_BuildOSType, auxType);
  14423. return _res;
  14424. }
  14425. static PyObject *Qt_MovieImportValidate(PyObject *_self, PyObject *_args)
  14426. {
  14427. PyObject *_res = NULL;
  14428. ComponentResult _rv;
  14429. MovieImportComponent ci;
  14430. FSSpec theFile;
  14431. Handle theData;
  14432. Boolean valid;
  14433. #ifndef MovieImportValidate
  14434. PyMac_PRECHECK(MovieImportValidate);
  14435. #endif
  14436. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14437. CmpInstObj_Convert, &ci,
  14438. PyMac_GetFSSpec, &theFile,
  14439. ResObj_Convert, &theData))
  14440. return NULL;
  14441. _rv = MovieImportValidate(ci,
  14442. &theFile,
  14443. theData,
  14444. &valid);
  14445. _res = Py_BuildValue("lb",
  14446. _rv,
  14447. valid);
  14448. return _res;
  14449. }
  14450. static PyObject *Qt_MovieImportGetFileType(PyObject *_self, PyObject *_args)
  14451. {
  14452. PyObject *_res = NULL;
  14453. ComponentResult _rv;
  14454. MovieImportComponent ci;
  14455. OSType fileType;
  14456. #ifndef MovieImportGetFileType
  14457. PyMac_PRECHECK(MovieImportGetFileType);
  14458. #endif
  14459. if (!PyArg_ParseTuple(_args, "O&",
  14460. CmpInstObj_Convert, &ci))
  14461. return NULL;
  14462. _rv = MovieImportGetFileType(ci,
  14463. &fileType);
  14464. _res = Py_BuildValue("lO&",
  14465. _rv,
  14466. PyMac_BuildOSType, fileType);
  14467. return _res;
  14468. }
  14469. static PyObject *Qt_MovieImportDataRef(PyObject *_self, PyObject *_args)
  14470. {
  14471. PyObject *_res = NULL;
  14472. ComponentResult _rv;
  14473. MovieImportComponent ci;
  14474. Handle dataRef;
  14475. OSType dataRefType;
  14476. Movie theMovie;
  14477. Track targetTrack;
  14478. Track usedTrack;
  14479. TimeValue atTime;
  14480. TimeValue addedDuration;
  14481. long inFlags;
  14482. long outFlags;
  14483. #ifndef MovieImportDataRef
  14484. PyMac_PRECHECK(MovieImportDataRef);
  14485. #endif
  14486. if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
  14487. CmpInstObj_Convert, &ci,
  14488. ResObj_Convert, &dataRef,
  14489. PyMac_GetOSType, &dataRefType,
  14490. MovieObj_Convert, &theMovie,
  14491. TrackObj_Convert, &targetTrack,
  14492. &atTime,
  14493. &inFlags))
  14494. return NULL;
  14495. _rv = MovieImportDataRef(ci,
  14496. dataRef,
  14497. dataRefType,
  14498. theMovie,
  14499. targetTrack,
  14500. &usedTrack,
  14501. atTime,
  14502. &addedDuration,
  14503. inFlags,
  14504. &outFlags);
  14505. _res = Py_BuildValue("lO&ll",
  14506. _rv,
  14507. TrackObj_New, usedTrack,
  14508. addedDuration,
  14509. outFlags);
  14510. return _res;
  14511. }
  14512. static PyObject *Qt_MovieImportGetSampleDescription(PyObject *_self, PyObject *_args)
  14513. {
  14514. PyObject *_res = NULL;
  14515. ComponentResult _rv;
  14516. MovieImportComponent ci;
  14517. SampleDescriptionHandle desc;
  14518. OSType mediaType;
  14519. #ifndef MovieImportGetSampleDescription
  14520. PyMac_PRECHECK(MovieImportGetSampleDescription);
  14521. #endif
  14522. if (!PyArg_ParseTuple(_args, "O&",
  14523. CmpInstObj_Convert, &ci))
  14524. return NULL;
  14525. _rv = MovieImportGetSampleDescription(ci,
  14526. &desc,
  14527. &mediaType);
  14528. _res = Py_BuildValue("lO&O&",
  14529. _rv,
  14530. ResObj_New, desc,
  14531. PyMac_BuildOSType, mediaType);
  14532. return _res;
  14533. }
  14534. static PyObject *Qt_MovieImportSetOffsetAndLimit(PyObject *_self, PyObject *_args)
  14535. {
  14536. PyObject *_res = NULL;
  14537. ComponentResult _rv;
  14538. MovieImportComponent ci;
  14539. unsigned long offset;
  14540. unsigned long limit;
  14541. #ifndef MovieImportSetOffsetAndLimit
  14542. PyMac_PRECHECK(MovieImportSetOffsetAndLimit);
  14543. #endif
  14544. if (!PyArg_ParseTuple(_args, "O&ll",
  14545. CmpInstObj_Convert, &ci,
  14546. &offset,
  14547. &limit))
  14548. return NULL;
  14549. _rv = MovieImportSetOffsetAndLimit(ci,
  14550. offset,
  14551. limit);
  14552. _res = Py_BuildValue("l",
  14553. _rv);
  14554. return _res;
  14555. }
  14556. static PyObject *Qt_MovieImportSetOffsetAndLimit64(PyObject *_self, PyObject *_args)
  14557. {
  14558. PyObject *_res = NULL;
  14559. ComponentResult _rv;
  14560. MovieImportComponent ci;
  14561. wide offset;
  14562. wide limit;
  14563. #ifndef MovieImportSetOffsetAndLimit64
  14564. PyMac_PRECHECK(MovieImportSetOffsetAndLimit64);
  14565. #endif
  14566. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14567. CmpInstObj_Convert, &ci,
  14568. PyMac_Getwide, &offset,
  14569. PyMac_Getwide, &limit))
  14570. return NULL;
  14571. _rv = MovieImportSetOffsetAndLimit64(ci,
  14572. &offset,
  14573. &limit);
  14574. _res = Py_BuildValue("l",
  14575. _rv);
  14576. return _res;
  14577. }
  14578. static PyObject *Qt_MovieImportIdle(PyObject *_self, PyObject *_args)
  14579. {
  14580. PyObject *_res = NULL;
  14581. ComponentResult _rv;
  14582. MovieImportComponent ci;
  14583. long inFlags;
  14584. long outFlags;
  14585. #ifndef MovieImportIdle
  14586. PyMac_PRECHECK(MovieImportIdle);
  14587. #endif
  14588. if (!PyArg_ParseTuple(_args, "O&l",
  14589. CmpInstObj_Convert, &ci,
  14590. &inFlags))
  14591. return NULL;
  14592. _rv = MovieImportIdle(ci,
  14593. inFlags,
  14594. &outFlags);
  14595. _res = Py_BuildValue("ll",
  14596. _rv,
  14597. outFlags);
  14598. return _res;
  14599. }
  14600. static PyObject *Qt_MovieImportValidateDataRef(PyObject *_self, PyObject *_args)
  14601. {
  14602. PyObject *_res = NULL;
  14603. ComponentResult _rv;
  14604. MovieImportComponent ci;
  14605. Handle dataRef;
  14606. OSType dataRefType;
  14607. UInt8 valid;
  14608. #ifndef MovieImportValidateDataRef
  14609. PyMac_PRECHECK(MovieImportValidateDataRef);
  14610. #endif
  14611. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14612. CmpInstObj_Convert, &ci,
  14613. ResObj_Convert, &dataRef,
  14614. PyMac_GetOSType, &dataRefType))
  14615. return NULL;
  14616. _rv = MovieImportValidateDataRef(ci,
  14617. dataRef,
  14618. dataRefType,
  14619. &valid);
  14620. _res = Py_BuildValue("lb",
  14621. _rv,
  14622. valid);
  14623. return _res;
  14624. }
  14625. static PyObject *Qt_MovieImportGetLoadState(PyObject *_self, PyObject *_args)
  14626. {
  14627. PyObject *_res = NULL;
  14628. ComponentResult _rv;
  14629. MovieImportComponent ci;
  14630. long importerLoadState;
  14631. #ifndef MovieImportGetLoadState
  14632. PyMac_PRECHECK(MovieImportGetLoadState);
  14633. #endif
  14634. if (!PyArg_ParseTuple(_args, "O&",
  14635. CmpInstObj_Convert, &ci))
  14636. return NULL;
  14637. _rv = MovieImportGetLoadState(ci,
  14638. &importerLoadState);
  14639. _res = Py_BuildValue("ll",
  14640. _rv,
  14641. importerLoadState);
  14642. return _res;
  14643. }
  14644. static PyObject *Qt_MovieImportGetMaxLoadedTime(PyObject *_self, PyObject *_args)
  14645. {
  14646. PyObject *_res = NULL;
  14647. ComponentResult _rv;
  14648. MovieImportComponent ci;
  14649. TimeValue time;
  14650. #ifndef MovieImportGetMaxLoadedTime
  14651. PyMac_PRECHECK(MovieImportGetMaxLoadedTime);
  14652. #endif
  14653. if (!PyArg_ParseTuple(_args, "O&",
  14654. CmpInstObj_Convert, &ci))
  14655. return NULL;
  14656. _rv = MovieImportGetMaxLoadedTime(ci,
  14657. &time);
  14658. _res = Py_BuildValue("ll",
  14659. _rv,
  14660. time);
  14661. return _res;
  14662. }
  14663. static PyObject *Qt_MovieImportEstimateCompletionTime(PyObject *_self, PyObject *_args)
  14664. {
  14665. PyObject *_res = NULL;
  14666. ComponentResult _rv;
  14667. MovieImportComponent ci;
  14668. TimeRecord time;
  14669. #ifndef MovieImportEstimateCompletionTime
  14670. PyMac_PRECHECK(MovieImportEstimateCompletionTime);
  14671. #endif
  14672. if (!PyArg_ParseTuple(_args, "O&",
  14673. CmpInstObj_Convert, &ci))
  14674. return NULL;
  14675. _rv = MovieImportEstimateCompletionTime(ci,
  14676. &time);
  14677. _res = Py_BuildValue("lO&",
  14678. _rv,
  14679. QtTimeRecord_New, &time);
  14680. return _res;
  14681. }
  14682. static PyObject *Qt_MovieImportSetDontBlock(PyObject *_self, PyObject *_args)
  14683. {
  14684. PyObject *_res = NULL;
  14685. ComponentResult _rv;
  14686. MovieImportComponent ci;
  14687. Boolean dontBlock;
  14688. #ifndef MovieImportSetDontBlock
  14689. PyMac_PRECHECK(MovieImportSetDontBlock);
  14690. #endif
  14691. if (!PyArg_ParseTuple(_args, "O&b",
  14692. CmpInstObj_Convert, &ci,
  14693. &dontBlock))
  14694. return NULL;
  14695. _rv = MovieImportSetDontBlock(ci,
  14696. dontBlock);
  14697. _res = Py_BuildValue("l",
  14698. _rv);
  14699. return _res;
  14700. }
  14701. static PyObject *Qt_MovieImportGetDontBlock(PyObject *_self, PyObject *_args)
  14702. {
  14703. PyObject *_res = NULL;
  14704. ComponentResult _rv;
  14705. MovieImportComponent ci;
  14706. Boolean willBlock;
  14707. #ifndef MovieImportGetDontBlock
  14708. PyMac_PRECHECK(MovieImportGetDontBlock);
  14709. #endif
  14710. if (!PyArg_ParseTuple(_args, "O&",
  14711. CmpInstObj_Convert, &ci))
  14712. return NULL;
  14713. _rv = MovieImportGetDontBlock(ci,
  14714. &willBlock);
  14715. _res = Py_BuildValue("lb",
  14716. _rv,
  14717. willBlock);
  14718. return _res;
  14719. }
  14720. static PyObject *Qt_MovieImportSetIdleManager(PyObject *_self, PyObject *_args)
  14721. {
  14722. PyObject *_res = NULL;
  14723. ComponentResult _rv;
  14724. MovieImportComponent ci;
  14725. IdleManager im;
  14726. #ifndef MovieImportSetIdleManager
  14727. PyMac_PRECHECK(MovieImportSetIdleManager);
  14728. #endif
  14729. if (!PyArg_ParseTuple(_args, "O&O&",
  14730. CmpInstObj_Convert, &ci,
  14731. IdleManagerObj_Convert, &im))
  14732. return NULL;
  14733. _rv = MovieImportSetIdleManager(ci,
  14734. im);
  14735. _res = Py_BuildValue("l",
  14736. _rv);
  14737. return _res;
  14738. }
  14739. static PyObject *Qt_MovieImportSetNewMovieFlags(PyObject *_self, PyObject *_args)
  14740. {
  14741. PyObject *_res = NULL;
  14742. ComponentResult _rv;
  14743. MovieImportComponent ci;
  14744. long newMovieFlags;
  14745. #ifndef MovieImportSetNewMovieFlags
  14746. PyMac_PRECHECK(MovieImportSetNewMovieFlags);
  14747. #endif
  14748. if (!PyArg_ParseTuple(_args, "O&l",
  14749. CmpInstObj_Convert, &ci,
  14750. &newMovieFlags))
  14751. return NULL;
  14752. _rv = MovieImportSetNewMovieFlags(ci,
  14753. newMovieFlags);
  14754. _res = Py_BuildValue("l",
  14755. _rv);
  14756. return _res;
  14757. }
  14758. static PyObject *Qt_MovieImportGetDestinationMediaType(PyObject *_self, PyObject *_args)
  14759. {
  14760. PyObject *_res = NULL;
  14761. ComponentResult _rv;
  14762. MovieImportComponent ci;
  14763. OSType mediaType;
  14764. #ifndef MovieImportGetDestinationMediaType
  14765. PyMac_PRECHECK(MovieImportGetDestinationMediaType);
  14766. #endif
  14767. if (!PyArg_ParseTuple(_args, "O&",
  14768. CmpInstObj_Convert, &ci))
  14769. return NULL;
  14770. _rv = MovieImportGetDestinationMediaType(ci,
  14771. &mediaType);
  14772. _res = Py_BuildValue("lO&",
  14773. _rv,
  14774. PyMac_BuildOSType, mediaType);
  14775. return _res;
  14776. }
  14777. static PyObject *Qt_MovieExportToHandle(PyObject *_self, PyObject *_args)
  14778. {
  14779. PyObject *_res = NULL;
  14780. ComponentResult _rv;
  14781. MovieExportComponent ci;
  14782. Handle dataH;
  14783. Movie theMovie;
  14784. Track onlyThisTrack;
  14785. TimeValue startTime;
  14786. TimeValue duration;
  14787. #ifndef MovieExportToHandle
  14788. PyMac_PRECHECK(MovieExportToHandle);
  14789. #endif
  14790. if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
  14791. CmpInstObj_Convert, &ci,
  14792. ResObj_Convert, &dataH,
  14793. MovieObj_Convert, &theMovie,
  14794. TrackObj_Convert, &onlyThisTrack,
  14795. &startTime,
  14796. &duration))
  14797. return NULL;
  14798. _rv = MovieExportToHandle(ci,
  14799. dataH,
  14800. theMovie,
  14801. onlyThisTrack,
  14802. startTime,
  14803. duration);
  14804. _res = Py_BuildValue("l",
  14805. _rv);
  14806. return _res;
  14807. }
  14808. static PyObject *Qt_MovieExportToFile(PyObject *_self, PyObject *_args)
  14809. {
  14810. PyObject *_res = NULL;
  14811. ComponentResult _rv;
  14812. MovieExportComponent ci;
  14813. FSSpec theFile;
  14814. Movie theMovie;
  14815. Track onlyThisTrack;
  14816. TimeValue startTime;
  14817. TimeValue duration;
  14818. #ifndef MovieExportToFile
  14819. PyMac_PRECHECK(MovieExportToFile);
  14820. #endif
  14821. if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
  14822. CmpInstObj_Convert, &ci,
  14823. PyMac_GetFSSpec, &theFile,
  14824. MovieObj_Convert, &theMovie,
  14825. TrackObj_Convert, &onlyThisTrack,
  14826. &startTime,
  14827. &duration))
  14828. return NULL;
  14829. _rv = MovieExportToFile(ci,
  14830. &theFile,
  14831. theMovie,
  14832. onlyThisTrack,
  14833. startTime,
  14834. duration);
  14835. _res = Py_BuildValue("l",
  14836. _rv);
  14837. return _res;
  14838. }
  14839. static PyObject *Qt_MovieExportGetAuxiliaryData(PyObject *_self, PyObject *_args)
  14840. {
  14841. PyObject *_res = NULL;
  14842. ComponentResult _rv;
  14843. MovieExportComponent ci;
  14844. Handle dataH;
  14845. OSType handleType;
  14846. #ifndef MovieExportGetAuxiliaryData
  14847. PyMac_PRECHECK(MovieExportGetAuxiliaryData);
  14848. #endif
  14849. if (!PyArg_ParseTuple(_args, "O&O&",
  14850. CmpInstObj_Convert, &ci,
  14851. ResObj_Convert, &dataH))
  14852. return NULL;
  14853. _rv = MovieExportGetAuxiliaryData(ci,
  14854. dataH,
  14855. &handleType);
  14856. _res = Py_BuildValue("lO&",
  14857. _rv,
  14858. PyMac_BuildOSType, handleType);
  14859. return _res;
  14860. }
  14861. static PyObject *Qt_MovieExportSetSampleDescription(PyObject *_self, PyObject *_args)
  14862. {
  14863. PyObject *_res = NULL;
  14864. ComponentResult _rv;
  14865. MovieExportComponent ci;
  14866. SampleDescriptionHandle desc;
  14867. OSType mediaType;
  14868. #ifndef MovieExportSetSampleDescription
  14869. PyMac_PRECHECK(MovieExportSetSampleDescription);
  14870. #endif
  14871. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14872. CmpInstObj_Convert, &ci,
  14873. ResObj_Convert, &desc,
  14874. PyMac_GetOSType, &mediaType))
  14875. return NULL;
  14876. _rv = MovieExportSetSampleDescription(ci,
  14877. desc,
  14878. mediaType);
  14879. _res = Py_BuildValue("l",
  14880. _rv);
  14881. return _res;
  14882. }
  14883. static PyObject *Qt_MovieExportDoUserDialog(PyObject *_self, PyObject *_args)
  14884. {
  14885. PyObject *_res = NULL;
  14886. ComponentResult _rv;
  14887. MovieExportComponent ci;
  14888. Movie theMovie;
  14889. Track onlyThisTrack;
  14890. TimeValue startTime;
  14891. TimeValue duration;
  14892. Boolean canceled;
  14893. #ifndef MovieExportDoUserDialog
  14894. PyMac_PRECHECK(MovieExportDoUserDialog);
  14895. #endif
  14896. if (!PyArg_ParseTuple(_args, "O&O&O&ll",
  14897. CmpInstObj_Convert, &ci,
  14898. MovieObj_Convert, &theMovie,
  14899. TrackObj_Convert, &onlyThisTrack,
  14900. &startTime,
  14901. &duration))
  14902. return NULL;
  14903. _rv = MovieExportDoUserDialog(ci,
  14904. theMovie,
  14905. onlyThisTrack,
  14906. startTime,
  14907. duration,
  14908. &canceled);
  14909. _res = Py_BuildValue("lb",
  14910. _rv,
  14911. canceled);
  14912. return _res;
  14913. }
  14914. static PyObject *Qt_MovieExportGetCreatorType(PyObject *_self, PyObject *_args)
  14915. {
  14916. PyObject *_res = NULL;
  14917. ComponentResult _rv;
  14918. MovieExportComponent ci;
  14919. OSType creator;
  14920. #ifndef MovieExportGetCreatorType
  14921. PyMac_PRECHECK(MovieExportGetCreatorType);
  14922. #endif
  14923. if (!PyArg_ParseTuple(_args, "O&",
  14924. CmpInstObj_Convert, &ci))
  14925. return NULL;
  14926. _rv = MovieExportGetCreatorType(ci,
  14927. &creator);
  14928. _res = Py_BuildValue("lO&",
  14929. _rv,
  14930. PyMac_BuildOSType, creator);
  14931. return _res;
  14932. }
  14933. static PyObject *Qt_MovieExportToDataRef(PyObject *_self, PyObject *_args)
  14934. {
  14935. PyObject *_res = NULL;
  14936. ComponentResult _rv;
  14937. MovieExportComponent ci;
  14938. Handle dataRef;
  14939. OSType dataRefType;
  14940. Movie theMovie;
  14941. Track onlyThisTrack;
  14942. TimeValue startTime;
  14943. TimeValue duration;
  14944. #ifndef MovieExportToDataRef
  14945. PyMac_PRECHECK(MovieExportToDataRef);
  14946. #endif
  14947. if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
  14948. CmpInstObj_Convert, &ci,
  14949. ResObj_Convert, &dataRef,
  14950. PyMac_GetOSType, &dataRefType,
  14951. MovieObj_Convert, &theMovie,
  14952. TrackObj_Convert, &onlyThisTrack,
  14953. &startTime,
  14954. &duration))
  14955. return NULL;
  14956. _rv = MovieExportToDataRef(ci,
  14957. dataRef,
  14958. dataRefType,
  14959. theMovie,
  14960. onlyThisTrack,
  14961. startTime,
  14962. duration);
  14963. _res = Py_BuildValue("l",
  14964. _rv);
  14965. return _res;
  14966. }
  14967. static PyObject *Qt_MovieExportFromProceduresToDataRef(PyObject *_self, PyObject *_args)
  14968. {
  14969. PyObject *_res = NULL;
  14970. ComponentResult _rv;
  14971. MovieExportComponent ci;
  14972. Handle dataRef;
  14973. OSType dataRefType;
  14974. #ifndef MovieExportFromProceduresToDataRef
  14975. PyMac_PRECHECK(MovieExportFromProceduresToDataRef);
  14976. #endif
  14977. if (!PyArg_ParseTuple(_args, "O&O&O&",
  14978. CmpInstObj_Convert, &ci,
  14979. ResObj_Convert, &dataRef,
  14980. PyMac_GetOSType, &dataRefType))
  14981. return NULL;
  14982. _rv = MovieExportFromProceduresToDataRef(ci,
  14983. dataRef,
  14984. dataRefType);
  14985. _res = Py_BuildValue("l",
  14986. _rv);
  14987. return _res;
  14988. }
  14989. static PyObject *Qt_MovieExportValidate(PyObject *_self, PyObject *_args)
  14990. {
  14991. PyObject *_res = NULL;
  14992. ComponentResult _rv;
  14993. MovieExportComponent ci;
  14994. Movie theMovie;
  14995. Track onlyThisTrack;
  14996. Boolean valid;
  14997. #ifndef MovieExportValidate
  14998. PyMac_PRECHECK(MovieExportValidate);
  14999. #endif
  15000. if (!PyArg_ParseTuple(_args, "O&O&O&",
  15001. CmpInstObj_Convert, &ci,
  15002. MovieObj_Convert, &theMovie,
  15003. TrackObj_Convert, &onlyThisTrack))
  15004. return NULL;
  15005. _rv = MovieExportValidate(ci,
  15006. theMovie,
  15007. onlyThisTrack,
  15008. &valid);
  15009. _res = Py_BuildValue("lb",
  15010. _rv,
  15011. valid);
  15012. return _res;
  15013. }
  15014. static PyObject *Qt_MovieExportGetFileNameExtension(PyObject *_self, PyObject *_args)
  15015. {
  15016. PyObject *_res = NULL;
  15017. ComponentResult _rv;
  15018. MovieExportComponent ci;
  15019. OSType extension;
  15020. #ifndef MovieExportGetFileNameExtension
  15021. PyMac_PRECHECK(MovieExportGetFileNameExtension);
  15022. #endif
  15023. if (!PyArg_ParseTuple(_args, "O&",
  15024. CmpInstObj_Convert, &ci))
  15025. return NULL;
  15026. _rv = MovieExportGetFileNameExtension(ci,
  15027. &extension);
  15028. _res = Py_BuildValue("lO&",
  15029. _rv,
  15030. PyMac_BuildOSType, extension);
  15031. return _res;
  15032. }
  15033. static PyObject *Qt_MovieExportGetShortFileTypeString(PyObject *_self, PyObject *_args)
  15034. {
  15035. PyObject *_res = NULL;
  15036. ComponentResult _rv;
  15037. MovieExportComponent ci;
  15038. Str255 typeString;
  15039. #ifndef MovieExportGetShortFileTypeString
  15040. PyMac_PRECHECK(MovieExportGetShortFileTypeString);
  15041. #endif
  15042. if (!PyArg_ParseTuple(_args, "O&O&",
  15043. CmpInstObj_Convert, &ci,
  15044. PyMac_GetStr255, typeString))
  15045. return NULL;
  15046. _rv = MovieExportGetShortFileTypeString(ci,
  15047. typeString);
  15048. _res = Py_BuildValue("l",
  15049. _rv);
  15050. return _res;
  15051. }
  15052. static PyObject *Qt_MovieExportGetSourceMediaType(PyObject *_self, PyObject *_args)
  15053. {
  15054. PyObject *_res = NULL;
  15055. ComponentResult _rv;
  15056. MovieExportComponent ci;
  15057. OSType mediaType;
  15058. #ifndef MovieExportGetSourceMediaType
  15059. PyMac_PRECHECK(MovieExportGetSourceMediaType);
  15060. #endif
  15061. if (!PyArg_ParseTuple(_args, "O&",
  15062. CmpInstObj_Convert, &ci))
  15063. return NULL;
  15064. _rv = MovieExportGetSourceMediaType(ci,
  15065. &mediaType);
  15066. _res = Py_BuildValue("lO&",
  15067. _rv,
  15068. PyMac_BuildOSType, mediaType);
  15069. return _res;
  15070. }
  15071. static PyObject *Qt_TextExportGetTimeFraction(PyObject *_self, PyObject *_args)
  15072. {
  15073. PyObject *_res = NULL;
  15074. ComponentResult _rv;
  15075. TextExportComponent ci;
  15076. long movieTimeFraction;
  15077. #ifndef TextExportGetTimeFraction
  15078. PyMac_PRECHECK(TextExportGetTimeFraction);
  15079. #endif
  15080. if (!PyArg_ParseTuple(_args, "O&",
  15081. CmpInstObj_Convert, &ci))
  15082. return NULL;
  15083. _rv = TextExportGetTimeFraction(ci,
  15084. &movieTimeFraction);
  15085. _res = Py_BuildValue("ll",
  15086. _rv,
  15087. movieTimeFraction);
  15088. return _res;
  15089. }
  15090. static PyObject *Qt_TextExportSetTimeFraction(PyObject *_self, PyObject *_args)
  15091. {
  15092. PyObject *_res = NULL;
  15093. ComponentResult _rv;
  15094. TextExportComponent ci;
  15095. long movieTimeFraction;
  15096. #ifndef TextExportSetTimeFraction
  15097. PyMac_PRECHECK(TextExportSetTimeFraction);
  15098. #endif
  15099. if (!PyArg_ParseTuple(_args, "O&l",
  15100. CmpInstObj_Convert, &ci,
  15101. &movieTimeFraction))
  15102. return NULL;
  15103. _rv = TextExportSetTimeFraction(ci,
  15104. movieTimeFraction);
  15105. _res = Py_BuildValue("l",
  15106. _rv);
  15107. return _res;
  15108. }
  15109. static PyObject *Qt_TextExportGetSettings(PyObject *_self, PyObject *_args)
  15110. {
  15111. PyObject *_res = NULL;
  15112. ComponentResult _rv;
  15113. TextExportComponent ci;
  15114. long setting;
  15115. #ifndef TextExportGetSettings
  15116. PyMac_PRECHECK(TextExportGetSettings);
  15117. #endif
  15118. if (!PyArg_ParseTuple(_args, "O&",
  15119. CmpInstObj_Convert, &ci))
  15120. return NULL;
  15121. _rv = TextExportGetSettings(ci,
  15122. &setting);
  15123. _res = Py_BuildValue("ll",
  15124. _rv,
  15125. setting);
  15126. return _res;
  15127. }
  15128. static PyObject *Qt_TextExportSetSettings(PyObject *_self, PyObject *_args)
  15129. {
  15130. PyObject *_res = NULL;
  15131. ComponentResult _rv;
  15132. TextExportComponent ci;
  15133. long setting;
  15134. #ifndef TextExportSetSettings
  15135. PyMac_PRECHECK(TextExportSetSettings);
  15136. #endif
  15137. if (!PyArg_ParseTuple(_args, "O&l",
  15138. CmpInstObj_Convert, &ci,
  15139. &setting))
  15140. return NULL;
  15141. _rv = TextExportSetSettings(ci,
  15142. setting);
  15143. _res = Py_BuildValue("l",
  15144. _rv);
  15145. return _res;
  15146. }
  15147. static PyObject *Qt_MIDIImportGetSettings(PyObject *_self, PyObject *_args)
  15148. {
  15149. PyObject *_res = NULL;
  15150. ComponentResult _rv;
  15151. TextExportComponent ci;
  15152. long setting;
  15153. #ifndef MIDIImportGetSettings
  15154. PyMac_PRECHECK(MIDIImportGetSettings);
  15155. #endif
  15156. if (!PyArg_ParseTuple(_args, "O&",
  15157. CmpInstObj_Convert, &ci))
  15158. return NULL;
  15159. _rv = MIDIImportGetSettings(ci,
  15160. &setting);
  15161. _res = Py_BuildValue("ll",
  15162. _rv,
  15163. setting);
  15164. return _res;
  15165. }
  15166. static PyObject *Qt_MIDIImportSetSettings(PyObject *_self, PyObject *_args)
  15167. {
  15168. PyObject *_res = NULL;
  15169. ComponentResult _rv;
  15170. TextExportComponent ci;
  15171. long setting;
  15172. #ifndef MIDIImportSetSettings
  15173. PyMac_PRECHECK(MIDIImportSetSettings);
  15174. #endif
  15175. if (!PyArg_ParseTuple(_args, "O&l",
  15176. CmpInstObj_Convert, &ci,
  15177. &setting))
  15178. return NULL;
  15179. _rv = MIDIImportSetSettings(ci,
  15180. setting);
  15181. _res = Py_BuildValue("l",
  15182. _rv);
  15183. return _res;
  15184. }
  15185. static PyObject *Qt_GraphicsImageImportSetSequenceEnabled(PyObject *_self, PyObject *_args)
  15186. {
  15187. PyObject *_res = NULL;
  15188. ComponentResult _rv;
  15189. GraphicImageMovieImportComponent ci;
  15190. Boolean enable;
  15191. #ifndef GraphicsImageImportSetSequenceEnabled
  15192. PyMac_PRECHECK(GraphicsImageImportSetSequenceEnabled);
  15193. #endif
  15194. if (!PyArg_ParseTuple(_args, "O&b",
  15195. CmpInstObj_Convert, &ci,
  15196. &enable))
  15197. return NULL;
  15198. _rv = GraphicsImageImportSetSequenceEnabled(ci,
  15199. enable);
  15200. _res = Py_BuildValue("l",
  15201. _rv);
  15202. return _res;
  15203. }
  15204. static PyObject *Qt_GraphicsImageImportGetSequenceEnabled(PyObject *_self, PyObject *_args)
  15205. {
  15206. PyObject *_res = NULL;
  15207. ComponentResult _rv;
  15208. GraphicImageMovieImportComponent ci;
  15209. Boolean enable;
  15210. #ifndef GraphicsImageImportGetSequenceEnabled
  15211. PyMac_PRECHECK(GraphicsImageImportGetSequenceEnabled);
  15212. #endif
  15213. if (!PyArg_ParseTuple(_args, "O&",
  15214. CmpInstObj_Convert, &ci))
  15215. return NULL;
  15216. _rv = GraphicsImageImportGetSequenceEnabled(ci,
  15217. &enable);
  15218. _res = Py_BuildValue("lb",
  15219. _rv,
  15220. enable);
  15221. return _res;
  15222. }
  15223. static PyObject *Qt_PreviewShowData(PyObject *_self, PyObject *_args)
  15224. {
  15225. PyObject *_res = NULL;
  15226. ComponentResult _rv;
  15227. pnotComponent p;
  15228. OSType dataType;
  15229. Handle data;
  15230. Rect inHere;
  15231. #ifndef PreviewShowData
  15232. PyMac_PRECHECK(PreviewShowData);
  15233. #endif
  15234. if (!PyArg_ParseTuple(_args, "O&O&O&O&",
  15235. CmpInstObj_Convert, &p,
  15236. PyMac_GetOSType, &dataType,
  15237. ResObj_Convert, &data,
  15238. PyMac_GetRect, &inHere))
  15239. return NULL;
  15240. _rv = PreviewShowData(p,
  15241. dataType,
  15242. data,
  15243. &inHere);
  15244. _res = Py_BuildValue("l",
  15245. _rv);
  15246. return _res;
  15247. }
  15248. static PyObject *Qt_PreviewMakePreviewReference(PyObject *_self, PyObject *_args)
  15249. {
  15250. PyObject *_res = NULL;
  15251. ComponentResult _rv;
  15252. pnotComponent p;
  15253. OSType previewType;
  15254. short resID;
  15255. FSSpec sourceFile;
  15256. #ifndef PreviewMakePreviewReference
  15257. PyMac_PRECHECK(PreviewMakePreviewReference);
  15258. #endif
  15259. if (!PyArg_ParseTuple(_args, "O&O&",
  15260. CmpInstObj_Convert, &p,
  15261. PyMac_GetFSSpec, &sourceFile))
  15262. return NULL;
  15263. _rv = PreviewMakePreviewReference(p,
  15264. &previewType,
  15265. &resID,
  15266. &sourceFile);
  15267. _res = Py_BuildValue("lO&h",
  15268. _rv,
  15269. PyMac_BuildOSType, previewType,
  15270. resID);
  15271. return _res;
  15272. }
  15273. static PyObject *Qt_PreviewEvent(PyObject *_self, PyObject *_args)
  15274. {
  15275. PyObject *_res = NULL;
  15276. ComponentResult _rv;
  15277. pnotComponent p;
  15278. EventRecord e;
  15279. Boolean handledEvent;
  15280. #ifndef PreviewEvent
  15281. PyMac_PRECHECK(PreviewEvent);
  15282. #endif
  15283. if (!PyArg_ParseTuple(_args, "O&",
  15284. CmpInstObj_Convert, &p))
  15285. return NULL;
  15286. _rv = PreviewEvent(p,
  15287. &e,
  15288. &handledEvent);
  15289. _res = Py_BuildValue("lO&b",
  15290. _rv,
  15291. PyMac_BuildEventRecord, &e,
  15292. handledEvent);
  15293. return _res;
  15294. }
  15295. static PyObject *Qt_DataCodecDecompress(PyObject *_self, PyObject *_args)
  15296. {
  15297. PyObject *_res = NULL;
  15298. ComponentResult _rv;
  15299. DataCodecComponent dc;
  15300. void * srcData;
  15301. UInt32 srcSize;
  15302. void * dstData;
  15303. UInt32 dstBufferSize;
  15304. #ifndef DataCodecDecompress
  15305. PyMac_PRECHECK(DataCodecDecompress);
  15306. #endif
  15307. if (!PyArg_ParseTuple(_args, "O&slsl",
  15308. CmpInstObj_Convert, &dc,
  15309. &srcData,
  15310. &srcSize,
  15311. &dstData,
  15312. &dstBufferSize))
  15313. return NULL;
  15314. _rv = DataCodecDecompress(dc,
  15315. srcData,
  15316. srcSize,
  15317. dstData,
  15318. dstBufferSize);
  15319. _res = Py_BuildValue("l",
  15320. _rv);
  15321. return _res;
  15322. }
  15323. static PyObject *Qt_DataCodecGetCompressBufferSize(PyObject *_self, PyObject *_args)
  15324. {
  15325. PyObject *_res = NULL;
  15326. ComponentResult _rv;
  15327. DataCodecComponent dc;
  15328. UInt32 srcSize;
  15329. UInt32 dstSize;
  15330. #ifndef DataCodecGetCompressBufferSize
  15331. PyMac_PRECHECK(DataCodecGetCompressBufferSize);
  15332. #endif
  15333. if (!PyArg_ParseTuple(_args, "O&l",
  15334. CmpInstObj_Convert, &dc,
  15335. &srcSize))
  15336. return NULL;
  15337. _rv = DataCodecGetCompressBufferSize(dc,
  15338. srcSize,
  15339. &dstSize);
  15340. _res = Py_BuildValue("ll",
  15341. _rv,
  15342. dstSize);
  15343. return _res;
  15344. }
  15345. static PyObject *Qt_DataCodecCompress(PyObject *_self, PyObject *_args)
  15346. {
  15347. PyObject *_res = NULL;
  15348. ComponentResult _rv;
  15349. DataCodecComponent dc;
  15350. void * srcData;
  15351. UInt32 srcSize;
  15352. void * dstData;
  15353. UInt32 dstBufferSize;
  15354. UInt32 actualDstSize;
  15355. UInt32 decompressSlop;
  15356. #ifndef DataCodecCompress
  15357. PyMac_PRECHECK(DataCodecCompress);
  15358. #endif
  15359. if (!PyArg_ParseTuple(_args, "O&slsl",
  15360. CmpInstObj_Convert, &dc,
  15361. &srcData,
  15362. &srcSize,
  15363. &dstData,
  15364. &dstBufferSize))
  15365. return NULL;
  15366. _rv = DataCodecCompress(dc,
  15367. srcData,
  15368. srcSize,
  15369. dstData,
  15370. dstBufferSize,
  15371. &actualDstSize,
  15372. &decompressSlop);
  15373. _res = Py_BuildValue("lll",
  15374. _rv,
  15375. actualDstSize,
  15376. decompressSlop);
  15377. return _res;
  15378. }
  15379. static PyObject *Qt_DataCodecBeginInterruptSafe(PyObject *_self, PyObject *_args)
  15380. {
  15381. PyObject *_res = NULL;
  15382. ComponentResult _rv;
  15383. DataCodecComponent dc;
  15384. unsigned long maxSrcSize;
  15385. #ifndef DataCodecBeginInterruptSafe
  15386. PyMac_PRECHECK(DataCodecBeginInterruptSafe);
  15387. #endif
  15388. if (!PyArg_ParseTuple(_args, "O&l",
  15389. CmpInstObj_Convert, &dc,
  15390. &maxSrcSize))
  15391. return NULL;
  15392. _rv = DataCodecBeginInterruptSafe(dc,
  15393. maxSrcSize);
  15394. _res = Py_BuildValue("l",
  15395. _rv);
  15396. return _res;
  15397. }
  15398. static PyObject *Qt_DataCodecEndInterruptSafe(PyObject *_self, PyObject *_args)
  15399. {
  15400. PyObject *_res = NULL;
  15401. ComponentResult _rv;
  15402. DataCodecComponent dc;
  15403. #ifndef DataCodecEndInterruptSafe
  15404. PyMac_PRECHECK(DataCodecEndInterruptSafe);
  15405. #endif
  15406. if (!PyArg_ParseTuple(_args, "O&",
  15407. CmpInstObj_Convert, &dc))
  15408. return NULL;
  15409. _rv = DataCodecEndInterruptSafe(dc);
  15410. _res = Py_BuildValue("l",
  15411. _rv);
  15412. return _res;
  15413. }
  15414. static PyObject *Qt_DataHGetData(PyObject *_self, PyObject *_args)
  15415. {
  15416. PyObject *_res = NULL;
  15417. ComponentResult _rv;
  15418. DataHandler dh;
  15419. Handle h;
  15420. long hOffset;
  15421. long offset;
  15422. long size;
  15423. #ifndef DataHGetData
  15424. PyMac_PRECHECK(DataHGetData);
  15425. #endif
  15426. if (!PyArg_ParseTuple(_args, "O&O&lll",
  15427. CmpInstObj_Convert, &dh,
  15428. ResObj_Convert, &h,
  15429. &hOffset,
  15430. &offset,
  15431. &size))
  15432. return NULL;
  15433. _rv = DataHGetData(dh,
  15434. h,
  15435. hOffset,
  15436. offset,
  15437. size);
  15438. _res = Py_BuildValue("l",
  15439. _rv);
  15440. return _res;
  15441. }
  15442. static PyObject *Qt_DataHPutData(PyObject *_self, PyObject *_args)
  15443. {
  15444. PyObject *_res = NULL;
  15445. ComponentResult _rv;
  15446. DataHandler dh;
  15447. Handle h;
  15448. long hOffset;
  15449. long offset;
  15450. long size;
  15451. #ifndef DataHPutData
  15452. PyMac_PRECHECK(DataHPutData);
  15453. #endif
  15454. if (!PyArg_ParseTuple(_args, "O&O&ll",
  15455. CmpInstObj_Convert, &dh,
  15456. ResObj_Convert, &h,
  15457. &hOffset,
  15458. &size))
  15459. return NULL;
  15460. _rv = DataHPutData(dh,
  15461. h,
  15462. hOffset,
  15463. &offset,
  15464. size);
  15465. _res = Py_BuildValue("ll",
  15466. _rv,
  15467. offset);
  15468. return _res;
  15469. }
  15470. static PyObject *Qt_DataHFlushData(PyObject *_self, PyObject *_args)
  15471. {
  15472. PyObject *_res = NULL;
  15473. ComponentResult _rv;
  15474. DataHandler dh;
  15475. #ifndef DataHFlushData
  15476. PyMac_PRECHECK(DataHFlushData);
  15477. #endif
  15478. if (!PyArg_ParseTuple(_args, "O&",
  15479. CmpInstObj_Convert, &dh))
  15480. return NULL;
  15481. _rv = DataHFlushData(dh);
  15482. _res = Py_BuildValue("l",
  15483. _rv);
  15484. return _res;
  15485. }
  15486. static PyObject *Qt_DataHOpenForWrite(PyObject *_self, PyObject *_args)
  15487. {
  15488. PyObject *_res = NULL;
  15489. ComponentResult _rv;
  15490. DataHandler dh;
  15491. #ifndef DataHOpenForWrite
  15492. PyMac_PRECHECK(DataHOpenForWrite);
  15493. #endif
  15494. if (!PyArg_ParseTuple(_args, "O&",
  15495. CmpInstObj_Convert, &dh))
  15496. return NULL;
  15497. _rv = DataHOpenForWrite(dh);
  15498. _res = Py_BuildValue("l",
  15499. _rv);
  15500. return _res;
  15501. }
  15502. static PyObject *Qt_DataHCloseForWrite(PyObject *_self, PyObject *_args)
  15503. {
  15504. PyObject *_res = NULL;
  15505. ComponentResult _rv;
  15506. DataHandler dh;
  15507. #ifndef DataHCloseForWrite
  15508. PyMac_PRECHECK(DataHCloseForWrite);
  15509. #endif
  15510. if (!PyArg_ParseTuple(_args, "O&",
  15511. CmpInstObj_Convert, &dh))
  15512. return NULL;
  15513. _rv = DataHCloseForWrite(dh);
  15514. _res = Py_BuildValue("l",
  15515. _rv);
  15516. return _res;
  15517. }
  15518. static PyObject *Qt_DataHOpenForRead(PyObject *_self, PyObject *_args)
  15519. {
  15520. PyObject *_res = NULL;
  15521. ComponentResult _rv;
  15522. DataHandler dh;
  15523. #ifndef DataHOpenForRead
  15524. PyMac_PRECHECK(DataHOpenForRead);
  15525. #endif
  15526. if (!PyArg_ParseTuple(_args, "O&",
  15527. CmpInstObj_Convert, &dh))
  15528. return NULL;
  15529. _rv = DataHOpenForRead(dh);
  15530. _res = Py_BuildValue("l",
  15531. _rv);
  15532. return _res;
  15533. }
  15534. static PyObject *Qt_DataHCloseForRead(PyObject *_self, PyObject *_args)
  15535. {
  15536. PyObject *_res = NULL;
  15537. ComponentResult _rv;
  15538. DataHandler dh;
  15539. #ifndef DataHCloseForRead
  15540. PyMac_PRECHECK(DataHCloseForRead);
  15541. #endif
  15542. if (!PyArg_ParseTuple(_args, "O&",
  15543. CmpInstObj_Convert, &dh))
  15544. return NULL;
  15545. _rv = DataHCloseForRead(dh);
  15546. _res = Py_BuildValue("l",
  15547. _rv);
  15548. return _res;
  15549. }
  15550. static PyObject *Qt_DataHSetDataRef(PyObject *_self, PyObject *_args)
  15551. {
  15552. PyObject *_res = NULL;
  15553. ComponentResult _rv;
  15554. DataHandler dh;
  15555. Handle dataRef;
  15556. #ifndef DataHSetDataRef
  15557. PyMac_PRECHECK(DataHSetDataRef);
  15558. #endif
  15559. if (!PyArg_ParseTuple(_args, "O&O&",
  15560. CmpInstObj_Convert, &dh,
  15561. ResObj_Convert, &dataRef))
  15562. return NULL;
  15563. _rv = DataHSetDataRef(dh,
  15564. dataRef);
  15565. _res = Py_BuildValue("l",
  15566. _rv);
  15567. return _res;
  15568. }
  15569. static PyObject *Qt_DataHGetDataRef(PyObject *_self, PyObject *_args)
  15570. {
  15571. PyObject *_res = NULL;
  15572. ComponentResult _rv;
  15573. DataHandler dh;
  15574. Handle dataRef;
  15575. #ifndef DataHGetDataRef
  15576. PyMac_PRECHECK(DataHGetDataRef);
  15577. #endif
  15578. if (!PyArg_ParseTuple(_args, "O&",
  15579. CmpInstObj_Convert, &dh))
  15580. return NULL;
  15581. _rv = DataHGetDataRef(dh,
  15582. &dataRef);
  15583. _res = Py_BuildValue("lO&",
  15584. _rv,
  15585. ResObj_New, dataRef);
  15586. return _res;
  15587. }
  15588. static PyObject *Qt_DataHCompareDataRef(PyObject *_self, PyObject *_args)
  15589. {
  15590. PyObject *_res = NULL;
  15591. ComponentResult _rv;
  15592. DataHandler dh;
  15593. Handle dataRef;
  15594. Boolean equal;
  15595. #ifndef DataHCompareDataRef
  15596. PyMac_PRECHECK(DataHCompareDataRef);
  15597. #endif
  15598. if (!PyArg_ParseTuple(_args, "O&O&",
  15599. CmpInstObj_Convert, &dh,
  15600. ResObj_Convert, &dataRef))
  15601. return NULL;
  15602. _rv = DataHCompareDataRef(dh,
  15603. dataRef,
  15604. &equal);
  15605. _res = Py_BuildValue("lb",
  15606. _rv,
  15607. equal);
  15608. return _res;
  15609. }
  15610. static PyObject *Qt_DataHTask(PyObject *_self, PyObject *_args)
  15611. {
  15612. PyObject *_res = NULL;
  15613. ComponentResult _rv;
  15614. DataHandler dh;
  15615. #ifndef DataHTask
  15616. PyMac_PRECHECK(DataHTask);
  15617. #endif
  15618. if (!PyArg_ParseTuple(_args, "O&",
  15619. CmpInstObj_Convert, &dh))
  15620. return NULL;
  15621. _rv = DataHTask(dh);
  15622. _res = Py_BuildValue("l",
  15623. _rv);
  15624. return _res;
  15625. }
  15626. static PyObject *Qt_DataHFinishData(PyObject *_self, PyObject *_args)
  15627. {
  15628. PyObject *_res = NULL;
  15629. ComponentResult _rv;
  15630. DataHandler dh;
  15631. Ptr PlaceToPutDataPtr;
  15632. Boolean Cancel;
  15633. #ifndef DataHFinishData
  15634. PyMac_PRECHECK(DataHFinishData);
  15635. #endif
  15636. if (!PyArg_ParseTuple(_args, "O&sb",
  15637. CmpInstObj_Convert, &dh,
  15638. &PlaceToPutDataPtr,
  15639. &Cancel))
  15640. return NULL;
  15641. _rv = DataHFinishData(dh,
  15642. PlaceToPutDataPtr,
  15643. Cancel);
  15644. _res = Py_BuildValue("l",
  15645. _rv);
  15646. return _res;
  15647. }
  15648. static PyObject *Qt_DataHFlushCache(PyObject *_self, PyObject *_args)
  15649. {
  15650. PyObject *_res = NULL;
  15651. ComponentResult _rv;
  15652. DataHandler dh;
  15653. #ifndef DataHFlushCache
  15654. PyMac_PRECHECK(DataHFlushCache);
  15655. #endif
  15656. if (!PyArg_ParseTuple(_args, "O&",
  15657. CmpInstObj_Convert, &dh))
  15658. return NULL;
  15659. _rv = DataHFlushCache(dh);
  15660. _res = Py_BuildValue("l",
  15661. _rv);
  15662. return _res;
  15663. }
  15664. static PyObject *Qt_DataHResolveDataRef(PyObject *_self, PyObject *_args)
  15665. {
  15666. PyObject *_res = NULL;
  15667. ComponentResult _rv;
  15668. DataHandler dh;
  15669. Handle theDataRef;
  15670. Boolean wasChanged;
  15671. Boolean userInterfaceAllowed;
  15672. #ifndef DataHResolveDataRef
  15673. PyMac_PRECHECK(DataHResolveDataRef);
  15674. #endif
  15675. if (!PyArg_ParseTuple(_args, "O&O&b",
  15676. CmpInstObj_Convert, &dh,
  15677. ResObj_Convert, &theDataRef,
  15678. &userInterfaceAllowed))
  15679. return NULL;
  15680. _rv = DataHResolveDataRef(dh,
  15681. theDataRef,
  15682. &wasChanged,
  15683. userInterfaceAllowed);
  15684. _res = Py_BuildValue("lb",
  15685. _rv,
  15686. wasChanged);
  15687. return _res;
  15688. }
  15689. static PyObject *Qt_DataHGetFileSize(PyObject *_self, PyObject *_args)
  15690. {
  15691. PyObject *_res = NULL;
  15692. ComponentResult _rv;
  15693. DataHandler dh;
  15694. long fileSize;
  15695. #ifndef DataHGetFileSize
  15696. PyMac_PRECHECK(DataHGetFileSize);
  15697. #endif
  15698. if (!PyArg_ParseTuple(_args, "O&",
  15699. CmpInstObj_Convert, &dh))
  15700. return NULL;
  15701. _rv = DataHGetFileSize(dh,
  15702. &fileSize);
  15703. _res = Py_BuildValue("ll",
  15704. _rv,
  15705. fileSize);
  15706. return _res;
  15707. }
  15708. static PyObject *Qt_DataHCanUseDataRef(PyObject *_self, PyObject *_args)
  15709. {
  15710. PyObject *_res = NULL;
  15711. ComponentResult _rv;
  15712. DataHandler dh;
  15713. Handle dataRef;
  15714. long useFlags;
  15715. #ifndef DataHCanUseDataRef
  15716. PyMac_PRECHECK(DataHCanUseDataRef);
  15717. #endif
  15718. if (!PyArg_ParseTuple(_args, "O&O&",
  15719. CmpInstObj_Convert, &dh,
  15720. ResObj_Convert, &dataRef))
  15721. return NULL;
  15722. _rv = DataHCanUseDataRef(dh,
  15723. dataRef,
  15724. &useFlags);
  15725. _res = Py_BuildValue("ll",
  15726. _rv,
  15727. useFlags);
  15728. return _res;
  15729. }
  15730. static PyObject *Qt_DataHPreextend(PyObject *_self, PyObject *_args)
  15731. {
  15732. PyObject *_res = NULL;
  15733. ComponentResult _rv;
  15734. DataHandler dh;
  15735. unsigned long maxToAdd;
  15736. unsigned long spaceAdded;
  15737. #ifndef DataHPreextend
  15738. PyMac_PRECHECK(DataHPreextend);
  15739. #endif
  15740. if (!PyArg_ParseTuple(_args, "O&l",
  15741. CmpInstObj_Convert, &dh,
  15742. &maxToAdd))
  15743. return NULL;
  15744. _rv = DataHPreextend(dh,
  15745. maxToAdd,
  15746. &spaceAdded);
  15747. _res = Py_BuildValue("ll",
  15748. _rv,
  15749. spaceAdded);
  15750. return _res;
  15751. }
  15752. static PyObject *Qt_DataHSetFileSize(PyObject *_self, PyObject *_args)
  15753. {
  15754. PyObject *_res = NULL;
  15755. ComponentResult _rv;
  15756. DataHandler dh;
  15757. long fileSize;
  15758. #ifndef DataHSetFileSize
  15759. PyMac_PRECHECK(DataHSetFileSize);
  15760. #endif
  15761. if (!PyArg_ParseTuple(_args, "O&l",
  15762. CmpInstObj_Convert, &dh,
  15763. &fileSize))
  15764. return NULL;
  15765. _rv = DataHSetFileSize(dh,
  15766. fileSize);
  15767. _res = Py_BuildValue("l",
  15768. _rv);
  15769. return _res;
  15770. }
  15771. static PyObject *Qt_DataHGetFreeSpace(PyObject *_self, PyObject *_args)
  15772. {
  15773. PyObject *_res = NULL;
  15774. ComponentResult _rv;
  15775. DataHandler dh;
  15776. unsigned long freeSize;
  15777. #ifndef DataHGetFreeSpace
  15778. PyMac_PRECHECK(DataHGetFreeSpace);
  15779. #endif
  15780. if (!PyArg_ParseTuple(_args, "O&",
  15781. CmpInstObj_Convert, &dh))
  15782. return NULL;
  15783. _rv = DataHGetFreeSpace(dh,
  15784. &freeSize);
  15785. _res = Py_BuildValue("ll",
  15786. _rv,
  15787. freeSize);
  15788. return _res;
  15789. }
  15790. static PyObject *Qt_DataHCreateFile(PyObject *_self, PyObject *_args)
  15791. {
  15792. PyObject *_res = NULL;
  15793. ComponentResult _rv;
  15794. DataHandler dh;
  15795. OSType creator;
  15796. Boolean deleteExisting;
  15797. #ifndef DataHCreateFile
  15798. PyMac_PRECHECK(DataHCreateFile);
  15799. #endif
  15800. if (!PyArg_ParseTuple(_args, "O&O&b",
  15801. CmpInstObj_Convert, &dh,
  15802. PyMac_GetOSType, &creator,
  15803. &deleteExisting))
  15804. return NULL;
  15805. _rv = DataHCreateFile(dh,
  15806. creator,
  15807. deleteExisting);
  15808. _res = Py_BuildValue("l",
  15809. _rv);
  15810. return _res;
  15811. }
  15812. static PyObject *Qt_DataHGetPreferredBlockSize(PyObject *_self, PyObject *_args)
  15813. {
  15814. PyObject *_res = NULL;
  15815. ComponentResult _rv;
  15816. DataHandler dh;
  15817. long blockSize;
  15818. #ifndef DataHGetPreferredBlockSize
  15819. PyMac_PRECHECK(DataHGetPreferredBlockSize);
  15820. #endif
  15821. if (!PyArg_ParseTuple(_args, "O&",
  15822. CmpInstObj_Convert, &dh))
  15823. return NULL;
  15824. _rv = DataHGetPreferredBlockSize(dh,
  15825. &blockSize);
  15826. _res = Py_BuildValue("ll",
  15827. _rv,
  15828. blockSize);
  15829. return _res;
  15830. }
  15831. static PyObject *Qt_DataHGetDeviceIndex(PyObject *_self, PyObject *_args)
  15832. {
  15833. PyObject *_res = NULL;
  15834. ComponentResult _rv;
  15835. DataHandler dh;
  15836. long deviceIndex;
  15837. #ifndef DataHGetDeviceIndex
  15838. PyMac_PRECHECK(DataHGetDeviceIndex);
  15839. #endif
  15840. if (!PyArg_ParseTuple(_args, "O&",
  15841. CmpInstObj_Convert, &dh))
  15842. return NULL;
  15843. _rv = DataHGetDeviceIndex(dh,
  15844. &deviceIndex);
  15845. _res = Py_BuildValue("ll",
  15846. _rv,
  15847. deviceIndex);
  15848. return _res;
  15849. }
  15850. static PyObject *Qt_DataHIsStreamingDataHandler(PyObject *_self, PyObject *_args)
  15851. {
  15852. PyObject *_res = NULL;
  15853. ComponentResult _rv;
  15854. DataHandler dh;
  15855. Boolean yes;
  15856. #ifndef DataHIsStreamingDataHandler
  15857. PyMac_PRECHECK(DataHIsStreamingDataHandler);
  15858. #endif
  15859. if (!PyArg_ParseTuple(_args, "O&",
  15860. CmpInstObj_Convert, &dh))
  15861. return NULL;
  15862. _rv = DataHIsStreamingDataHandler(dh,
  15863. &yes);
  15864. _res = Py_BuildValue("lb",
  15865. _rv,
  15866. yes);
  15867. return _res;
  15868. }
  15869. static PyObject *Qt_DataHGetDataInBuffer(PyObject *_self, PyObject *_args)
  15870. {
  15871. PyObject *_res = NULL;
  15872. ComponentResult _rv;
  15873. DataHandler dh;
  15874. long startOffset;
  15875. long size;
  15876. #ifndef DataHGetDataInBuffer
  15877. PyMac_PRECHECK(DataHGetDataInBuffer);
  15878. #endif
  15879. if (!PyArg_ParseTuple(_args, "O&l",
  15880. CmpInstObj_Convert, &dh,
  15881. &startOffset))
  15882. return NULL;
  15883. _rv = DataHGetDataInBuffer(dh,
  15884. startOffset,
  15885. &size);
  15886. _res = Py_BuildValue("ll",
  15887. _rv,
  15888. size);
  15889. return _res;
  15890. }
  15891. static PyObject *Qt_DataHGetScheduleAheadTime(PyObject *_self, PyObject *_args)
  15892. {
  15893. PyObject *_res = NULL;
  15894. ComponentResult _rv;
  15895. DataHandler dh;
  15896. long millisecs;
  15897. #ifndef DataHGetScheduleAheadTime
  15898. PyMac_PRECHECK(DataHGetScheduleAheadTime);
  15899. #endif
  15900. if (!PyArg_ParseTuple(_args, "O&",
  15901. CmpInstObj_Convert, &dh))
  15902. return NULL;
  15903. _rv = DataHGetScheduleAheadTime(dh,
  15904. &millisecs);
  15905. _res = Py_BuildValue("ll",
  15906. _rv,
  15907. millisecs);
  15908. return _res;
  15909. }
  15910. static PyObject *Qt_DataHSetCacheSizeLimit(PyObject *_self, PyObject *_args)
  15911. {
  15912. PyObject *_res = NULL;
  15913. ComponentResult _rv;
  15914. DataHandler dh;
  15915. Size cacheSizeLimit;
  15916. #ifndef DataHSetCacheSizeLimit
  15917. PyMac_PRECHECK(DataHSetCacheSizeLimit);
  15918. #endif
  15919. if (!PyArg_ParseTuple(_args, "O&l",
  15920. CmpInstObj_Convert, &dh,
  15921. &cacheSizeLimit))
  15922. return NULL;
  15923. _rv = DataHSetCacheSizeLimit(dh,
  15924. cacheSizeLimit);
  15925. _res = Py_BuildValue("l",
  15926. _rv);
  15927. return _res;
  15928. }
  15929. static PyObject *Qt_DataHGetCacheSizeLimit(PyObject *_self, PyObject *_args)
  15930. {
  15931. PyObject *_res = NULL;
  15932. ComponentResult _rv;
  15933. DataHandler dh;
  15934. Size cacheSizeLimit;
  15935. #ifndef DataHGetCacheSizeLimit
  15936. PyMac_PRECHECK(DataHGetCacheSizeLimit);
  15937. #endif
  15938. if (!PyArg_ParseTuple(_args, "O&",
  15939. CmpInstObj_Convert, &dh))
  15940. return NULL;
  15941. _rv = DataHGetCacheSizeLimit(dh,
  15942. &cacheSizeLimit);
  15943. _res = Py_BuildValue("ll",
  15944. _rv,
  15945. cacheSizeLimit);
  15946. return _res;
  15947. }
  15948. static PyObject *Qt_DataHGetMovie(PyObject *_self, PyObject *_args)
  15949. {
  15950. PyObject *_res = NULL;
  15951. ComponentResult _rv;
  15952. DataHandler dh;
  15953. Movie theMovie;
  15954. short id;
  15955. #ifndef DataHGetMovie
  15956. PyMac_PRECHECK(DataHGetMovie);
  15957. #endif
  15958. if (!PyArg_ParseTuple(_args, "O&",
  15959. CmpInstObj_Convert, &dh))
  15960. return NULL;
  15961. _rv = DataHGetMovie(dh,
  15962. &theMovie,
  15963. &id);
  15964. _res = Py_BuildValue("lO&h",
  15965. _rv,
  15966. MovieObj_New, theMovie,
  15967. id);
  15968. return _res;
  15969. }
  15970. static PyObject *Qt_DataHAddMovie(PyObject *_self, PyObject *_args)
  15971. {
  15972. PyObject *_res = NULL;
  15973. ComponentResult _rv;
  15974. DataHandler dh;
  15975. Movie theMovie;
  15976. short id;
  15977. #ifndef DataHAddMovie
  15978. PyMac_PRECHECK(DataHAddMovie);
  15979. #endif
  15980. if (!PyArg_ParseTuple(_args, "O&O&",
  15981. CmpInstObj_Convert, &dh,
  15982. MovieObj_Convert, &theMovie))
  15983. return NULL;
  15984. _rv = DataHAddMovie(dh,
  15985. theMovie,
  15986. &id);
  15987. _res = Py_BuildValue("lh",
  15988. _rv,
  15989. id);
  15990. return _res;
  15991. }
  15992. static PyObject *Qt_DataHUpdateMovie(PyObject *_self, PyObject *_args)
  15993. {
  15994. PyObject *_res = NULL;
  15995. ComponentResult _rv;
  15996. DataHandler dh;
  15997. Movie theMovie;
  15998. short id;
  15999. #ifndef DataHUpdateMovie
  16000. PyMac_PRECHECK(DataHUpdateMovie);
  16001. #endif
  16002. if (!PyArg_ParseTuple(_args, "O&O&h",
  16003. CmpInstObj_Convert, &dh,
  16004. MovieObj_Convert, &theMovie,
  16005. &id))
  16006. return NULL;
  16007. _rv = DataHUpdateMovie(dh,
  16008. theMovie,
  16009. id);
  16010. _res = Py_BuildValue("l",
  16011. _rv);
  16012. return _res;
  16013. }
  16014. static PyObject *Qt_DataHDoesBuffer(PyObject *_self, PyObject *_args)
  16015. {
  16016. PyObject *_res = NULL;
  16017. ComponentResult _rv;
  16018. DataHandler dh;
  16019. Boolean buffersReads;
  16020. Boolean buffersWrites;
  16021. #ifndef DataHDoesBuffer
  16022. PyMac_PRECHECK(DataHDoesBuffer);
  16023. #endif
  16024. if (!PyArg_ParseTuple(_args, "O&",
  16025. CmpInstObj_Convert, &dh))
  16026. return NULL;
  16027. _rv = DataHDoesBuffer(dh,
  16028. &buffersReads,
  16029. &buffersWrites);
  16030. _res = Py_BuildValue("lbb",
  16031. _rv,
  16032. buffersReads,
  16033. buffersWrites);
  16034. return _res;
  16035. }
  16036. static PyObject *Qt_DataHGetFileName(PyObject *_self, PyObject *_args)
  16037. {
  16038. PyObject *_res = NULL;
  16039. ComponentResult _rv;
  16040. DataHandler dh;
  16041. Str255 str;
  16042. #ifndef DataHGetFileName
  16043. PyMac_PRECHECK(DataHGetFileName);
  16044. #endif
  16045. if (!PyArg_ParseTuple(_args, "O&O&",
  16046. CmpInstObj_Convert, &dh,
  16047. PyMac_GetStr255, str))
  16048. return NULL;
  16049. _rv = DataHGetFileName(dh,
  16050. str);
  16051. _res = Py_BuildValue("l",
  16052. _rv);
  16053. return _res;
  16054. }
  16055. static PyObject *Qt_DataHGetAvailableFileSize(PyObject *_self, PyObject *_args)
  16056. {
  16057. PyObject *_res = NULL;
  16058. ComponentResult _rv;
  16059. DataHandler dh;
  16060. long fileSize;
  16061. #ifndef DataHGetAvailableFileSize
  16062. PyMac_PRECHECK(DataHGetAvailableFileSize);
  16063. #endif
  16064. if (!PyArg_ParseTuple(_args, "O&",
  16065. CmpInstObj_Convert, &dh))
  16066. return NULL;
  16067. _rv = DataHGetAvailableFileSize(dh,
  16068. &fileSize);
  16069. _res = Py_BuildValue("ll",
  16070. _rv,
  16071. fileSize);
  16072. return _res;
  16073. }
  16074. static PyObject *Qt_DataHGetMacOSFileType(PyObject *_self, PyObject *_args)
  16075. {
  16076. PyObject *_res = NULL;
  16077. ComponentResult _rv;
  16078. DataHandler dh;
  16079. OSType fileType;
  16080. #ifndef DataHGetMacOSFileType
  16081. PyMac_PRECHECK(DataHGetMacOSFileType);
  16082. #endif
  16083. if (!PyArg_ParseTuple(_args, "O&",
  16084. CmpInstObj_Convert, &dh))
  16085. return NULL;
  16086. _rv = DataHGetMacOSFileType(dh,
  16087. &fileType);
  16088. _res = Py_BuildValue("lO&",
  16089. _rv,
  16090. PyMac_BuildOSType, fileType);
  16091. return _res;
  16092. }
  16093. static PyObject *Qt_DataHGetMIMEType(PyObject *_self, PyObject *_args)
  16094. {
  16095. PyObject *_res = NULL;
  16096. ComponentResult _rv;
  16097. DataHandler dh;
  16098. Str255 mimeType;
  16099. #ifndef DataHGetMIMEType
  16100. PyMac_PRECHECK(DataHGetMIMEType);
  16101. #endif
  16102. if (!PyArg_ParseTuple(_args, "O&O&",
  16103. CmpInstObj_Convert, &dh,
  16104. PyMac_GetStr255, mimeType))
  16105. return NULL;
  16106. _rv = DataHGetMIMEType(dh,
  16107. mimeType);
  16108. _res = Py_BuildValue("l",
  16109. _rv);
  16110. return _res;
  16111. }
  16112. static PyObject *Qt_DataHSetDataRefWithAnchor(PyObject *_self, PyObject *_args)
  16113. {
  16114. PyObject *_res = NULL;
  16115. ComponentResult _rv;
  16116. DataHandler dh;
  16117. Handle anchorDataRef;
  16118. OSType dataRefType;
  16119. Handle dataRef;
  16120. #ifndef DataHSetDataRefWithAnchor
  16121. PyMac_PRECHECK(DataHSetDataRefWithAnchor);
  16122. #endif
  16123. if (!PyArg_ParseTuple(_args, "O&O&O&O&",
  16124. CmpInstObj_Convert, &dh,
  16125. ResObj_Convert, &anchorDataRef,
  16126. PyMac_GetOSType, &dataRefType,
  16127. ResObj_Convert, &dataRef))
  16128. return NULL;
  16129. _rv = DataHSetDataRefWithAnchor(dh,
  16130. anchorDataRef,
  16131. dataRefType,
  16132. dataRef);
  16133. _res = Py_BuildValue("l",
  16134. _rv);
  16135. return _res;
  16136. }
  16137. static PyObject *Qt_DataHGetDataRefWithAnchor(PyObject *_self, PyObject *_args)
  16138. {
  16139. PyObject *_res = NULL;
  16140. ComponentResult _rv;
  16141. DataHandler dh;
  16142. Handle anchorDataRef;
  16143. OSType dataRefType;
  16144. Handle dataRef;
  16145. #ifndef DataHGetDataRefWithAnchor
  16146. PyMac_PRECHECK(DataHGetDataRefWithAnchor);
  16147. #endif
  16148. if (!PyArg_ParseTuple(_args, "O&O&O&",
  16149. CmpInstObj_Convert, &dh,
  16150. ResObj_Convert, &anchorDataRef,
  16151. PyMac_GetOSType, &dataRefType))
  16152. return NULL;
  16153. _rv = DataHGetDataRefWithAnchor(dh,
  16154. anchorDataRef,
  16155. dataRefType,
  16156. &dataRef);
  16157. _res = Py_BuildValue("lO&",
  16158. _rv,
  16159. ResObj_New, dataRef);
  16160. return _res;
  16161. }
  16162. static PyObject *Qt_DataHSetMacOSFileType(PyObject *_self, PyObject *_args)
  16163. {
  16164. PyObject *_res = NULL;
  16165. ComponentResult _rv;
  16166. DataHandler dh;
  16167. OSType fileType;
  16168. #ifndef DataHSetMacOSFileType
  16169. PyMac_PRECHECK(DataHSetMacOSFileType);
  16170. #endif
  16171. if (!PyArg_ParseTuple(_args, "O&O&",
  16172. CmpInstObj_Convert, &dh,
  16173. PyMac_GetOSType, &fileType))
  16174. return NULL;
  16175. _rv = DataHSetMacOSFileType(dh,
  16176. fileType);
  16177. _res = Py_BuildValue("l",
  16178. _rv);
  16179. return _res;
  16180. }
  16181. static PyObject *Qt_DataHSetTimeBase(PyObject *_self, PyObject *_args)
  16182. {
  16183. PyObject *_res = NULL;
  16184. ComponentResult _rv;
  16185. DataHandler dh;
  16186. TimeBase tb;
  16187. #ifndef DataHSetTimeBase
  16188. PyMac_PRECHECK(DataHSetTimeBase);
  16189. #endif
  16190. if (!PyArg_ParseTuple(_args, "O&O&",
  16191. CmpInstObj_Convert, &dh,
  16192. TimeBaseObj_Convert, &tb))
  16193. return NULL;
  16194. _rv = DataHSetTimeBase(dh,
  16195. tb);
  16196. _res = Py_BuildValue("l",
  16197. _rv);
  16198. return _res;
  16199. }
  16200. static PyObject *Qt_DataHGetInfoFlags(PyObject *_self, PyObject *_args)
  16201. {
  16202. PyObject *_res = NULL;
  16203. ComponentResult _rv;
  16204. DataHandler dh;
  16205. UInt32 flags;
  16206. #ifndef DataHGetInfoFlags
  16207. PyMac_PRECHECK(DataHGetInfoFlags);
  16208. #endif
  16209. if (!PyArg_ParseTuple(_args, "O&",
  16210. CmpInstObj_Convert, &dh))
  16211. return NULL;
  16212. _rv = DataHGetInfoFlags(dh,
  16213. &flags);
  16214. _res = Py_BuildValue("ll",
  16215. _rv,
  16216. flags);
  16217. return _res;
  16218. }
  16219. static PyObject *Qt_DataHGetFileSize64(PyObject *_self, PyObject *_args)
  16220. {
  16221. PyObject *_res = NULL;
  16222. ComponentResult _rv;
  16223. DataHandler dh;
  16224. wide fileSize;
  16225. #ifndef DataHGetFileSize64
  16226. PyMac_PRECHECK(DataHGetFileSize64);
  16227. #endif
  16228. if (!PyArg_ParseTuple(_args, "O&",
  16229. CmpInstObj_Convert, &dh))
  16230. return NULL;
  16231. _rv = DataHGetFileSize64(dh,
  16232. &fileSize);
  16233. _res = Py_BuildValue("lO&",
  16234. _rv,
  16235. PyMac_Buildwide, fileSize);
  16236. return _res;
  16237. }
  16238. static PyObject *Qt_DataHPreextend64(PyObject *_self, PyObject *_args)
  16239. {
  16240. PyObject *_res = NULL;
  16241. ComponentResult _rv;
  16242. DataHandler dh;
  16243. wide maxToAdd;
  16244. wide spaceAdded;
  16245. #ifndef DataHPreextend64
  16246. PyMac_PRECHECK(DataHPreextend64);
  16247. #endif
  16248. if (!PyArg_ParseTuple(_args, "O&O&",
  16249. CmpInstObj_Convert, &dh,
  16250. PyMac_Getwide, &maxToAdd))
  16251. return NULL;
  16252. _rv = DataHPreextend64(dh,
  16253. &maxToAdd,
  16254. &spaceAdded);
  16255. _res = Py_BuildValue("lO&",
  16256. _rv,
  16257. PyMac_Buildwide, spaceAdded);
  16258. return _res;
  16259. }
  16260. static PyObject *Qt_DataHSetFileSize64(PyObject *_self, PyObject *_args)
  16261. {
  16262. PyObject *_res = NULL;
  16263. ComponentResult _rv;
  16264. DataHandler dh;
  16265. wide fileSize;
  16266. #ifndef DataHSetFileSize64
  16267. PyMac_PRECHECK(DataHSetFileSize64);
  16268. #endif
  16269. if (!PyArg_ParseTuple(_args, "O&O&",
  16270. CmpInstObj_Convert, &dh,
  16271. PyMac_Getwide, &fileSize))
  16272. return NULL;
  16273. _rv = DataHSetFileSize64(dh,
  16274. &fileSize);
  16275. _res = Py_BuildValue("l",
  16276. _rv);
  16277. return _res;
  16278. }
  16279. static PyObject *Qt_DataHGetFreeSpace64(PyObject *_self, PyObject *_args)
  16280. {
  16281. PyObject *_res = NULL;
  16282. ComponentResult _rv;
  16283. DataHandler dh;
  16284. wide freeSize;
  16285. #ifndef DataHGetFreeSpace64
  16286. PyMac_PRECHECK(DataHGetFreeSpace64);
  16287. #endif
  16288. if (!PyArg_ParseTuple(_args, "O&",
  16289. CmpInstObj_Convert, &dh))
  16290. return NULL;
  16291. _rv = DataHGetFreeSpace64(dh,
  16292. &freeSize);
  16293. _res = Py_BuildValue("lO&",
  16294. _rv,
  16295. PyMac_Buildwide, freeSize);
  16296. return _res;
  16297. }
  16298. static PyObject *Qt_DataHAppend64(PyObject *_self, PyObject *_args)
  16299. {
  16300. PyObject *_res = NULL;
  16301. ComponentResult _rv;
  16302. DataHandler dh;
  16303. void * data;
  16304. wide fileOffset;
  16305. unsigned long size;
  16306. #ifndef DataHAppend64
  16307. PyMac_PRECHECK(DataHAppend64);
  16308. #endif
  16309. if (!PyArg_ParseTuple(_args, "O&sl",
  16310. CmpInstObj_Convert, &dh,
  16311. &data,
  16312. &size))
  16313. return NULL;
  16314. _rv = DataHAppend64(dh,
  16315. data,
  16316. &fileOffset,
  16317. size);
  16318. _res = Py_BuildValue("lO&",
  16319. _rv,
  16320. PyMac_Buildwide, fileOffset);
  16321. return _res;
  16322. }
  16323. static PyObject *Qt_DataHPollRead(PyObject *_self, PyObject *_args)
  16324. {
  16325. PyObject *_res = NULL;
  16326. ComponentResult _rv;
  16327. DataHandler dh;
  16328. void * dataPtr;
  16329. UInt32 dataSizeSoFar;
  16330. #ifndef DataHPollRead
  16331. PyMac_PRECHECK(DataHPollRead);
  16332. #endif
  16333. if (!PyArg_ParseTuple(_args, "O&s",
  16334. CmpInstObj_Convert, &dh,
  16335. &dataPtr))
  16336. return NULL;
  16337. _rv = DataHPollRead(dh,
  16338. dataPtr,
  16339. &dataSizeSoFar);
  16340. _res = Py_BuildValue("ll",
  16341. _rv,
  16342. dataSizeSoFar);
  16343. return _res;
  16344. }
  16345. static PyObject *Qt_DataHGetDataAvailability(PyObject *_self, PyObject *_args)
  16346. {
  16347. PyObject *_res = NULL;
  16348. ComponentResult _rv;
  16349. DataHandler dh;
  16350. long offset;
  16351. long len;
  16352. long missing_offset;
  16353. long missing_len;
  16354. #ifndef DataHGetDataAvailability
  16355. PyMac_PRECHECK(DataHGetDataAvailability);
  16356. #endif
  16357. if (!PyArg_ParseTuple(_args, "O&ll",
  16358. CmpInstObj_Convert, &dh,
  16359. &offset,
  16360. &len))
  16361. return NULL;
  16362. _rv = DataHGetDataAvailability(dh,
  16363. offset,
  16364. len,
  16365. &missing_offset,
  16366. &missing_len);
  16367. _res = Py_BuildValue("lll",
  16368. _rv,
  16369. missing_offset,
  16370. missing_len);
  16371. return _res;
  16372. }
  16373. static PyObject *Qt_DataHGetDataRefAsType(PyObject *_self, PyObject *_args)
  16374. {
  16375. PyObject *_res = NULL;
  16376. ComponentResult _rv;
  16377. DataHandler dh;
  16378. OSType requestedType;
  16379. Handle dataRef;
  16380. #ifndef DataHGetDataRefAsType
  16381. PyMac_PRECHECK(DataHGetDataRefAsType);
  16382. #endif
  16383. if (!PyArg_ParseTuple(_args, "O&O&",
  16384. CmpInstObj_Convert, &dh,
  16385. PyMac_GetOSType, &requestedType))
  16386. return NULL;
  16387. _rv = DataHGetDataRefAsType(dh,
  16388. requestedType,
  16389. &dataRef);
  16390. _res = Py_BuildValue("lO&",
  16391. _rv,
  16392. ResObj_New, dataRef);
  16393. return _res;
  16394. }
  16395. static PyObject *Qt_DataHSetDataRefExtension(PyObject *_self, PyObject *_args)
  16396. {
  16397. PyObject *_res = NULL;
  16398. ComponentResult _rv;
  16399. DataHandler dh;
  16400. Handle extension;
  16401. OSType idType;
  16402. #ifndef DataHSetDataRefExtension
  16403. PyMac_PRECHECK(DataHSetDataRefExtension);
  16404. #endif
  16405. if (!PyArg_ParseTuple(_args, "O&O&O&",
  16406. CmpInstObj_Convert, &dh,
  16407. ResObj_Convert, &extension,
  16408. PyMac_GetOSType, &idType))
  16409. return NULL;
  16410. _rv = DataHSetDataRefExtension(dh,
  16411. extension,
  16412. idType);
  16413. _res = Py_BuildValue("l",
  16414. _rv);
  16415. return _res;
  16416. }
  16417. static PyObject *Qt_DataHGetDataRefExtension(PyObject *_self, PyObject *_args)
  16418. {
  16419. PyObject *_res = NULL;
  16420. ComponentResult _rv;
  16421. DataHandler dh;
  16422. Handle extension;
  16423. OSType idType;
  16424. #ifndef DataHGetDataRefExtension
  16425. PyMac_PRECHECK(DataHGetDataRefExtension);
  16426. #endif
  16427. if (!PyArg_ParseTuple(_args, "O&O&",
  16428. CmpInstObj_Convert, &dh,
  16429. PyMac_GetOSType, &idType))
  16430. return NULL;
  16431. _rv = DataHGetDataRefExtension(dh,
  16432. &extension,
  16433. idType);
  16434. _res = Py_BuildValue("lO&",
  16435. _rv,
  16436. ResObj_New, extension);
  16437. return _res;
  16438. }
  16439. static PyObject *Qt_DataHGetMovieWithFlags(PyObject *_self, PyObject *_args)
  16440. {
  16441. PyObject *_res = NULL;
  16442. ComponentResult _rv;
  16443. DataHandler dh;
  16444. Movie theMovie;
  16445. short id;
  16446. short flags;
  16447. #ifndef DataHGetMovieWithFlags
  16448. PyMac_PRECHECK(DataHGetMovieWithFlags);
  16449. #endif
  16450. if (!PyArg_ParseTuple(_args, "O&h",
  16451. CmpInstObj_Convert, &dh,
  16452. &flags))
  16453. return NULL;
  16454. _rv = DataHGetMovieWithFlags(dh,
  16455. &theMovie,
  16456. &id,
  16457. flags);
  16458. _res = Py_BuildValue("lO&h",
  16459. _rv,
  16460. MovieObj_New, theMovie,
  16461. id);
  16462. return _res;
  16463. }
  16464. static PyObject *Qt_DataHGetFileTypeOrdering(PyObject *_self, PyObject *_args)
  16465. {
  16466. PyObject *_res = NULL;
  16467. ComponentResult _rv;
  16468. DataHandler dh;
  16469. DataHFileTypeOrderingHandle orderingListHandle;
  16470. #ifndef DataHGetFileTypeOrdering
  16471. PyMac_PRECHECK(DataHGetFileTypeOrdering);
  16472. #endif
  16473. if (!PyArg_ParseTuple(_args, "O&",
  16474. CmpInstObj_Convert, &dh))
  16475. return NULL;
  16476. _rv = DataHGetFileTypeOrdering(dh,
  16477. &orderingListHandle);
  16478. _res = Py_BuildValue("lO&",
  16479. _rv,
  16480. ResObj_New, orderingListHandle);
  16481. return _res;
  16482. }
  16483. static PyObject *Qt_DataHCreateFileWithFlags(PyObject *_self, PyObject *_args)
  16484. {
  16485. PyObject *_res = NULL;
  16486. ComponentResult _rv;
  16487. DataHandler dh;
  16488. OSType creator;
  16489. Boolean deleteExisting;
  16490. UInt32 flags;
  16491. #ifndef DataHCreateFileWithFlags
  16492. PyMac_PRECHECK(DataHCreateFileWithFlags);
  16493. #endif
  16494. if (!PyArg_ParseTuple(_args, "O&O&bl",
  16495. CmpInstObj_Convert, &dh,
  16496. PyMac_GetOSType, &creator,
  16497. &deleteExisting,
  16498. &flags))
  16499. return NULL;
  16500. _rv = DataHCreateFileWithFlags(dh,
  16501. creator,
  16502. deleteExisting,
  16503. flags);
  16504. _res = Py_BuildValue("l",
  16505. _rv);
  16506. return _res;
  16507. }
  16508. static PyObject *Qt_DataHGetInfo(PyObject *_self, PyObject *_args)
  16509. {
  16510. PyObject *_res = NULL;
  16511. ComponentResult _rv;
  16512. DataHandler dh;
  16513. OSType what;
  16514. void * info;
  16515. #ifndef DataHGetInfo
  16516. PyMac_PRECHECK(DataHGetInfo);
  16517. #endif
  16518. if (!PyArg_ParseTuple(_args, "O&O&s",
  16519. CmpInstObj_Convert, &dh,
  16520. PyMac_GetOSType, &what,
  16521. &info))
  16522. return NULL;
  16523. _rv = DataHGetInfo(dh,
  16524. what,
  16525. info);
  16526. _res = Py_BuildValue("l",
  16527. _rv);
  16528. return _res;
  16529. }
  16530. static PyObject *Qt_DataHSetIdleManager(PyObject *_self, PyObject *_args)
  16531. {
  16532. PyObject *_res = NULL;
  16533. ComponentResult _rv;
  16534. DataHandler dh;
  16535. IdleManager im;
  16536. #ifndef DataHSetIdleManager
  16537. PyMac_PRECHECK(DataHSetIdleManager);
  16538. #endif
  16539. if (!PyArg_ParseTuple(_args, "O&O&",
  16540. CmpInstObj_Convert, &dh,
  16541. IdleManagerObj_Convert, &im))
  16542. return NULL;
  16543. _rv = DataHSetIdleManager(dh,
  16544. im);
  16545. _res = Py_BuildValue("l",
  16546. _rv);
  16547. return _res;
  16548. }
  16549. static PyObject *Qt_DataHDeleteFile(PyObject *_self, PyObject *_args)
  16550. {
  16551. PyObject *_res = NULL;
  16552. ComponentResult _rv;
  16553. DataHandler dh;
  16554. #ifndef DataHDeleteFile
  16555. PyMac_PRECHECK(DataHDeleteFile);
  16556. #endif
  16557. if (!PyArg_ParseTuple(_args, "O&",
  16558. CmpInstObj_Convert, &dh))
  16559. return NULL;
  16560. _rv = DataHDeleteFile(dh);
  16561. _res = Py_BuildValue("l",
  16562. _rv);
  16563. return _res;
  16564. }
  16565. static PyObject *Qt_DataHSetMovieUsageFlags(PyObject *_self, PyObject *_args)
  16566. {
  16567. PyObject *_res = NULL;
  16568. ComponentResult _rv;
  16569. DataHandler dh;
  16570. long flags;
  16571. #ifndef DataHSetMovieUsageFlags
  16572. PyMac_PRECHECK(DataHSetMovieUsageFlags);
  16573. #endif
  16574. if (!Py