Move setting of ioready 'wait' earlier in call chain, to
[python/dscho.git] / Mac / Modules / qt / _Qtmodule.c
blob66bca4ba2f51a3e79983e10939a1d5350ee86d0a
2 /* =========================== Module _Qt =========================== */
4 #include "Python.h"
8 #ifdef _WIN32
9 #include "pywintoolbox.h"
10 #else
11 #include "macglue.h"
12 #include "pymactoolbox.h"
13 #endif
15 /* Macro to test whether a weak-loaded CFM function exists */
16 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
17 PyErr_SetString(PyExc_NotImplementedError, \
18 "Not available in this shared library/OS version"); \
19 return NULL; \
20 }} while(0)
23 #ifdef WITHOUT_FRAMEWORKS
24 #include <Movies.h>
25 #else
26 /* #include <Carbon/Carbon.h> */
27 #include <QuickTime/QuickTime.h>
28 #endif
31 #ifdef USE_TOOLBOX_OBJECT_GLUE
32 extern PyObject *_TrackObj_New(Track);
33 extern int _TrackObj_Convert(PyObject *, Track *);
34 extern PyObject *_MovieObj_New(Movie);
35 extern int _MovieObj_Convert(PyObject *, Movie *);
36 extern PyObject *_MovieCtlObj_New(MovieController);
37 extern int _MovieCtlObj_Convert(PyObject *, MovieController *);
38 extern PyObject *_TimeBaseObj_New(TimeBase);
39 extern int _TimeBaseObj_Convert(PyObject *, TimeBase *);
40 extern PyObject *_UserDataObj_New(UserData);
41 extern int _UserDataObj_Convert(PyObject *, UserData *);
42 extern PyObject *_MediaObj_New(Media);
43 extern int _MediaObj_Convert(PyObject *, Media *);
45 #define TrackObj_New _TrackObj_New
46 #define TrackObj_Convert _TrackObj_Convert
47 #define MovieObj_New _MovieObj_New
48 #define MovieObj_Convert _MovieObj_Convert
49 #define MovieCtlObj_New _MovieCtlObj_New
50 #define MovieCtlObj_Convert _MovieCtlObj_Convert
51 #define TimeBaseObj_New _TimeBaseObj_New
52 #define TimeBaseObj_Convert _TimeBaseObj_Convert
53 #define UserDataObj_New _UserDataObj_New
54 #define UserDataObj_Convert _UserDataObj_Convert
55 #define MediaObj_New _MediaObj_New
56 #define MediaObj_Convert _MediaObj_Convert
57 #endif
59 /* Macro to allow us to GetNextInterestingTime without duration */
60 #define GetMediaNextInterestingTimeOnly(media, flags, time, rate, rv) GetMediaNextInterestingTime(media, flags, time, rate, rv, NULL)
63 ** Parse/generate time records
65 static PyObject *
66 QtTimeRecord_New(TimeRecord *itself)
68 if (itself->base)
69 return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale,
70 TimeBaseObj_New, itself->base);
71 else
72 return Py_BuildValue("O&lO", PyMac_Buildwide, &itself->value, itself->scale,
73 Py_None);
76 static int
77 QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself)
79 PyObject *base = NULL;
80 if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale,
81 &base) )
82 return 0;
83 if ( base == NULL || base == Py_None )
84 p_itself->base = NULL;
85 else
86 if ( !TimeBaseObj_Convert(base, &p_itself->base) )
87 return 0;
88 return 1;
94 static PyObject *Qt_Error;
96 /* ------------------ Object type MovieController ------------------- */
98 PyTypeObject MovieController_Type;
100 #define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type || PyObject_TypeCheck((x), &MovieController_Type))
102 typedef struct MovieControllerObject {
103 PyObject_HEAD
104 MovieController ob_itself;
105 } MovieControllerObject;
107 PyObject *MovieCtlObj_New(MovieController itself)
109 MovieControllerObject *it;
110 if (itself == NULL) {
111 PyErr_SetString(Qt_Error,"Cannot create null MovieController");
112 return NULL;
114 it = PyObject_NEW(MovieControllerObject, &MovieController_Type);
115 if (it == NULL) return NULL;
116 it->ob_itself = itself;
117 return (PyObject *)it;
119 int MovieCtlObj_Convert(PyObject *v, MovieController *p_itself)
121 if (!MovieCtlObj_Check(v))
123 PyErr_SetString(PyExc_TypeError, "MovieController required");
124 return 0;
126 *p_itself = ((MovieControllerObject *)v)->ob_itself;
127 return 1;
130 static void MovieCtlObj_dealloc(MovieControllerObject *self)
132 DisposeMovieController(self->ob_itself);
133 self->ob_type->tp_free((PyObject *)self);
136 static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args)
138 PyObject *_res = NULL;
139 ComponentResult _rv;
140 Movie theMovie;
141 WindowPtr movieWindow;
142 Point where;
143 #ifndef MCSetMovie
144 PyMac_PRECHECK(MCSetMovie);
145 #endif
146 if (!PyArg_ParseTuple(_args, "O&O&O&",
147 MovieObj_Convert, &theMovie,
148 WinObj_Convert, &movieWindow,
149 PyMac_GetPoint, &where))
150 return NULL;
151 _rv = MCSetMovie(_self->ob_itself,
152 theMovie,
153 movieWindow,
154 where);
155 _res = Py_BuildValue("l",
156 _rv);
157 return _res;
160 static PyObject *MovieCtlObj_MCGetIndMovie(MovieControllerObject *_self, PyObject *_args)
162 PyObject *_res = NULL;
163 Movie _rv;
164 short index;
165 #ifndef MCGetIndMovie
166 PyMac_PRECHECK(MCGetIndMovie);
167 #endif
168 if (!PyArg_ParseTuple(_args, "h",
169 &index))
170 return NULL;
171 _rv = MCGetIndMovie(_self->ob_itself,
172 index);
173 _res = Py_BuildValue("O&",
174 MovieObj_New, _rv);
175 return _res;
178 static PyObject *MovieCtlObj_MCRemoveAllMovies(MovieControllerObject *_self, PyObject *_args)
180 PyObject *_res = NULL;
181 ComponentResult _rv;
182 #ifndef MCRemoveAllMovies
183 PyMac_PRECHECK(MCRemoveAllMovies);
184 #endif
185 if (!PyArg_ParseTuple(_args, ""))
186 return NULL;
187 _rv = MCRemoveAllMovies(_self->ob_itself);
188 _res = Py_BuildValue("l",
189 _rv);
190 return _res;
193 static PyObject *MovieCtlObj_MCRemoveAMovie(MovieControllerObject *_self, PyObject *_args)
195 PyObject *_res = NULL;
196 ComponentResult _rv;
197 Movie m;
198 #ifndef MCRemoveAMovie
199 PyMac_PRECHECK(MCRemoveAMovie);
200 #endif
201 if (!PyArg_ParseTuple(_args, "O&",
202 MovieObj_Convert, &m))
203 return NULL;
204 _rv = MCRemoveAMovie(_self->ob_itself,
206 _res = Py_BuildValue("l",
207 _rv);
208 return _res;
211 static PyObject *MovieCtlObj_MCRemoveMovie(MovieControllerObject *_self, PyObject *_args)
213 PyObject *_res = NULL;
214 ComponentResult _rv;
215 #ifndef MCRemoveMovie
216 PyMac_PRECHECK(MCRemoveMovie);
217 #endif
218 if (!PyArg_ParseTuple(_args, ""))
219 return NULL;
220 _rv = MCRemoveMovie(_self->ob_itself);
221 _res = Py_BuildValue("l",
222 _rv);
223 return _res;
226 static PyObject *MovieCtlObj_MCIsPlayerEvent(MovieControllerObject *_self, PyObject *_args)
228 PyObject *_res = NULL;
229 ComponentResult _rv;
230 EventRecord e;
231 #ifndef MCIsPlayerEvent
232 PyMac_PRECHECK(MCIsPlayerEvent);
233 #endif
234 if (!PyArg_ParseTuple(_args, "O&",
235 PyMac_GetEventRecord, &e))
236 return NULL;
237 _rv = MCIsPlayerEvent(_self->ob_itself,
238 &e);
239 _res = Py_BuildValue("l",
240 _rv);
241 return _res;
244 static PyObject *MovieCtlObj_MCDoAction(MovieControllerObject *_self, PyObject *_args)
246 PyObject *_res = NULL;
247 ComponentResult _rv;
248 short action;
249 void * params;
250 #ifndef MCDoAction
251 PyMac_PRECHECK(MCDoAction);
252 #endif
253 if (!PyArg_ParseTuple(_args, "hs",
254 &action,
255 &params))
256 return NULL;
257 _rv = MCDoAction(_self->ob_itself,
258 action,
259 params);
260 _res = Py_BuildValue("l",
261 _rv);
262 return _res;
265 static PyObject *MovieCtlObj_MCSetControllerAttached(MovieControllerObject *_self, PyObject *_args)
267 PyObject *_res = NULL;
268 ComponentResult _rv;
269 Boolean attach;
270 #ifndef MCSetControllerAttached
271 PyMac_PRECHECK(MCSetControllerAttached);
272 #endif
273 if (!PyArg_ParseTuple(_args, "b",
274 &attach))
275 return NULL;
276 _rv = MCSetControllerAttached(_self->ob_itself,
277 attach);
278 _res = Py_BuildValue("l",
279 _rv);
280 return _res;
283 static PyObject *MovieCtlObj_MCIsControllerAttached(MovieControllerObject *_self, PyObject *_args)
285 PyObject *_res = NULL;
286 ComponentResult _rv;
287 #ifndef MCIsControllerAttached
288 PyMac_PRECHECK(MCIsControllerAttached);
289 #endif
290 if (!PyArg_ParseTuple(_args, ""))
291 return NULL;
292 _rv = MCIsControllerAttached(_self->ob_itself);
293 _res = Py_BuildValue("l",
294 _rv);
295 return _res;
298 static PyObject *MovieCtlObj_MCSetControllerPort(MovieControllerObject *_self, PyObject *_args)
300 PyObject *_res = NULL;
301 ComponentResult _rv;
302 CGrafPtr gp;
303 #ifndef MCSetControllerPort
304 PyMac_PRECHECK(MCSetControllerPort);
305 #endif
306 if (!PyArg_ParseTuple(_args, "O&",
307 GrafObj_Convert, &gp))
308 return NULL;
309 _rv = MCSetControllerPort(_self->ob_itself,
310 gp);
311 _res = Py_BuildValue("l",
312 _rv);
313 return _res;
316 static PyObject *MovieCtlObj_MCGetControllerPort(MovieControllerObject *_self, PyObject *_args)
318 PyObject *_res = NULL;
319 CGrafPtr _rv;
320 #ifndef MCGetControllerPort
321 PyMac_PRECHECK(MCGetControllerPort);
322 #endif
323 if (!PyArg_ParseTuple(_args, ""))
324 return NULL;
325 _rv = MCGetControllerPort(_self->ob_itself);
326 _res = Py_BuildValue("O&",
327 GrafObj_New, _rv);
328 return _res;
331 static PyObject *MovieCtlObj_MCSetVisible(MovieControllerObject *_self, PyObject *_args)
333 PyObject *_res = NULL;
334 ComponentResult _rv;
335 Boolean visible;
336 #ifndef MCSetVisible
337 PyMac_PRECHECK(MCSetVisible);
338 #endif
339 if (!PyArg_ParseTuple(_args, "b",
340 &visible))
341 return NULL;
342 _rv = MCSetVisible(_self->ob_itself,
343 visible);
344 _res = Py_BuildValue("l",
345 _rv);
346 return _res;
349 static PyObject *MovieCtlObj_MCGetVisible(MovieControllerObject *_self, PyObject *_args)
351 PyObject *_res = NULL;
352 ComponentResult _rv;
353 #ifndef MCGetVisible
354 PyMac_PRECHECK(MCGetVisible);
355 #endif
356 if (!PyArg_ParseTuple(_args, ""))
357 return NULL;
358 _rv = MCGetVisible(_self->ob_itself);
359 _res = Py_BuildValue("l",
360 _rv);
361 return _res;
364 static PyObject *MovieCtlObj_MCGetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
366 PyObject *_res = NULL;
367 ComponentResult _rv;
368 Rect bounds;
369 #ifndef MCGetControllerBoundsRect
370 PyMac_PRECHECK(MCGetControllerBoundsRect);
371 #endif
372 if (!PyArg_ParseTuple(_args, ""))
373 return NULL;
374 _rv = MCGetControllerBoundsRect(_self->ob_itself,
375 &bounds);
376 _res = Py_BuildValue("lO&",
377 _rv,
378 PyMac_BuildRect, &bounds);
379 return _res;
382 static PyObject *MovieCtlObj_MCSetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
384 PyObject *_res = NULL;
385 ComponentResult _rv;
386 Rect bounds;
387 #ifndef MCSetControllerBoundsRect
388 PyMac_PRECHECK(MCSetControllerBoundsRect);
389 #endif
390 if (!PyArg_ParseTuple(_args, "O&",
391 PyMac_GetRect, &bounds))
392 return NULL;
393 _rv = MCSetControllerBoundsRect(_self->ob_itself,
394 &bounds);
395 _res = Py_BuildValue("l",
396 _rv);
397 return _res;
400 static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(MovieControllerObject *_self, PyObject *_args)
402 PyObject *_res = NULL;
403 RgnHandle _rv;
404 #ifndef MCGetControllerBoundsRgn
405 PyMac_PRECHECK(MCGetControllerBoundsRgn);
406 #endif
407 if (!PyArg_ParseTuple(_args, ""))
408 return NULL;
409 _rv = MCGetControllerBoundsRgn(_self->ob_itself);
410 _res = Py_BuildValue("O&",
411 ResObj_New, _rv);
412 return _res;
415 static PyObject *MovieCtlObj_MCGetWindowRgn(MovieControllerObject *_self, PyObject *_args)
417 PyObject *_res = NULL;
418 RgnHandle _rv;
419 WindowPtr w;
420 #ifndef MCGetWindowRgn
421 PyMac_PRECHECK(MCGetWindowRgn);
422 #endif
423 if (!PyArg_ParseTuple(_args, "O&",
424 WinObj_Convert, &w))
425 return NULL;
426 _rv = MCGetWindowRgn(_self->ob_itself,
428 _res = Py_BuildValue("O&",
429 ResObj_New, _rv);
430 return _res;
433 static PyObject *MovieCtlObj_MCMovieChanged(MovieControllerObject *_self, PyObject *_args)
435 PyObject *_res = NULL;
436 ComponentResult _rv;
437 Movie m;
438 #ifndef MCMovieChanged
439 PyMac_PRECHECK(MCMovieChanged);
440 #endif
441 if (!PyArg_ParseTuple(_args, "O&",
442 MovieObj_Convert, &m))
443 return NULL;
444 _rv = MCMovieChanged(_self->ob_itself,
446 _res = Py_BuildValue("l",
447 _rv);
448 return _res;
451 static PyObject *MovieCtlObj_MCSetDuration(MovieControllerObject *_self, PyObject *_args)
453 PyObject *_res = NULL;
454 ComponentResult _rv;
455 TimeValue duration;
456 #ifndef MCSetDuration
457 PyMac_PRECHECK(MCSetDuration);
458 #endif
459 if (!PyArg_ParseTuple(_args, "l",
460 &duration))
461 return NULL;
462 _rv = MCSetDuration(_self->ob_itself,
463 duration);
464 _res = Py_BuildValue("l",
465 _rv);
466 return _res;
469 static PyObject *MovieCtlObj_MCGetCurrentTime(MovieControllerObject *_self, PyObject *_args)
471 PyObject *_res = NULL;
472 TimeValue _rv;
473 TimeScale scale;
474 #ifndef MCGetCurrentTime
475 PyMac_PRECHECK(MCGetCurrentTime);
476 #endif
477 if (!PyArg_ParseTuple(_args, ""))
478 return NULL;
479 _rv = MCGetCurrentTime(_self->ob_itself,
480 &scale);
481 _res = Py_BuildValue("ll",
482 _rv,
483 scale);
484 return _res;
487 static PyObject *MovieCtlObj_MCNewAttachedController(MovieControllerObject *_self, PyObject *_args)
489 PyObject *_res = NULL;
490 ComponentResult _rv;
491 Movie theMovie;
492 WindowPtr w;
493 Point where;
494 #ifndef MCNewAttachedController
495 PyMac_PRECHECK(MCNewAttachedController);
496 #endif
497 if (!PyArg_ParseTuple(_args, "O&O&O&",
498 MovieObj_Convert, &theMovie,
499 WinObj_Convert, &w,
500 PyMac_GetPoint, &where))
501 return NULL;
502 _rv = MCNewAttachedController(_self->ob_itself,
503 theMovie,
505 where);
506 _res = Py_BuildValue("l",
507 _rv);
508 return _res;
511 static PyObject *MovieCtlObj_MCDraw(MovieControllerObject *_self, PyObject *_args)
513 PyObject *_res = NULL;
514 ComponentResult _rv;
515 WindowPtr w;
516 #ifndef MCDraw
517 PyMac_PRECHECK(MCDraw);
518 #endif
519 if (!PyArg_ParseTuple(_args, "O&",
520 WinObj_Convert, &w))
521 return NULL;
522 _rv = MCDraw(_self->ob_itself,
524 _res = Py_BuildValue("l",
525 _rv);
526 return _res;
529 static PyObject *MovieCtlObj_MCActivate(MovieControllerObject *_self, PyObject *_args)
531 PyObject *_res = NULL;
532 ComponentResult _rv;
533 WindowPtr w;
534 Boolean activate;
535 #ifndef MCActivate
536 PyMac_PRECHECK(MCActivate);
537 #endif
538 if (!PyArg_ParseTuple(_args, "O&b",
539 WinObj_Convert, &w,
540 &activate))
541 return NULL;
542 _rv = MCActivate(_self->ob_itself,
544 activate);
545 _res = Py_BuildValue("l",
546 _rv);
547 return _res;
550 static PyObject *MovieCtlObj_MCIdle(MovieControllerObject *_self, PyObject *_args)
552 PyObject *_res = NULL;
553 ComponentResult _rv;
554 #ifndef MCIdle
555 PyMac_PRECHECK(MCIdle);
556 #endif
557 if (!PyArg_ParseTuple(_args, ""))
558 return NULL;
559 _rv = MCIdle(_self->ob_itself);
560 _res = Py_BuildValue("l",
561 _rv);
562 return _res;
565 static PyObject *MovieCtlObj_MCKey(MovieControllerObject *_self, PyObject *_args)
567 PyObject *_res = NULL;
568 ComponentResult _rv;
569 SInt8 key;
570 long modifiers;
571 #ifndef MCKey
572 PyMac_PRECHECK(MCKey);
573 #endif
574 if (!PyArg_ParseTuple(_args, "bl",
575 &key,
576 &modifiers))
577 return NULL;
578 _rv = MCKey(_self->ob_itself,
579 key,
580 modifiers);
581 _res = Py_BuildValue("l",
582 _rv);
583 return _res;
586 static PyObject *MovieCtlObj_MCClick(MovieControllerObject *_self, PyObject *_args)
588 PyObject *_res = NULL;
589 ComponentResult _rv;
590 WindowPtr w;
591 Point where;
592 long when;
593 long modifiers;
594 #ifndef MCClick
595 PyMac_PRECHECK(MCClick);
596 #endif
597 if (!PyArg_ParseTuple(_args, "O&O&ll",
598 WinObj_Convert, &w,
599 PyMac_GetPoint, &where,
600 &when,
601 &modifiers))
602 return NULL;
603 _rv = MCClick(_self->ob_itself,
605 where,
606 when,
607 modifiers);
608 _res = Py_BuildValue("l",
609 _rv);
610 return _res;
613 static PyObject *MovieCtlObj_MCEnableEditing(MovieControllerObject *_self, PyObject *_args)
615 PyObject *_res = NULL;
616 ComponentResult _rv;
617 Boolean enabled;
618 #ifndef MCEnableEditing
619 PyMac_PRECHECK(MCEnableEditing);
620 #endif
621 if (!PyArg_ParseTuple(_args, "b",
622 &enabled))
623 return NULL;
624 _rv = MCEnableEditing(_self->ob_itself,
625 enabled);
626 _res = Py_BuildValue("l",
627 _rv);
628 return _res;
631 static PyObject *MovieCtlObj_MCIsEditingEnabled(MovieControllerObject *_self, PyObject *_args)
633 PyObject *_res = NULL;
634 long _rv;
635 #ifndef MCIsEditingEnabled
636 PyMac_PRECHECK(MCIsEditingEnabled);
637 #endif
638 if (!PyArg_ParseTuple(_args, ""))
639 return NULL;
640 _rv = MCIsEditingEnabled(_self->ob_itself);
641 _res = Py_BuildValue("l",
642 _rv);
643 return _res;
646 static PyObject *MovieCtlObj_MCCopy(MovieControllerObject *_self, PyObject *_args)
648 PyObject *_res = NULL;
649 Movie _rv;
650 #ifndef MCCopy
651 PyMac_PRECHECK(MCCopy);
652 #endif
653 if (!PyArg_ParseTuple(_args, ""))
654 return NULL;
655 _rv = MCCopy(_self->ob_itself);
656 _res = Py_BuildValue("O&",
657 MovieObj_New, _rv);
658 return _res;
661 static PyObject *MovieCtlObj_MCCut(MovieControllerObject *_self, PyObject *_args)
663 PyObject *_res = NULL;
664 Movie _rv;
665 #ifndef MCCut
666 PyMac_PRECHECK(MCCut);
667 #endif
668 if (!PyArg_ParseTuple(_args, ""))
669 return NULL;
670 _rv = MCCut(_self->ob_itself);
671 _res = Py_BuildValue("O&",
672 MovieObj_New, _rv);
673 return _res;
676 static PyObject *MovieCtlObj_MCPaste(MovieControllerObject *_self, PyObject *_args)
678 PyObject *_res = NULL;
679 ComponentResult _rv;
680 Movie srcMovie;
681 #ifndef MCPaste
682 PyMac_PRECHECK(MCPaste);
683 #endif
684 if (!PyArg_ParseTuple(_args, "O&",
685 MovieObj_Convert, &srcMovie))
686 return NULL;
687 _rv = MCPaste(_self->ob_itself,
688 srcMovie);
689 _res = Py_BuildValue("l",
690 _rv);
691 return _res;
694 static PyObject *MovieCtlObj_MCClear(MovieControllerObject *_self, PyObject *_args)
696 PyObject *_res = NULL;
697 ComponentResult _rv;
698 #ifndef MCClear
699 PyMac_PRECHECK(MCClear);
700 #endif
701 if (!PyArg_ParseTuple(_args, ""))
702 return NULL;
703 _rv = MCClear(_self->ob_itself);
704 _res = Py_BuildValue("l",
705 _rv);
706 return _res;
709 static PyObject *MovieCtlObj_MCUndo(MovieControllerObject *_self, PyObject *_args)
711 PyObject *_res = NULL;
712 ComponentResult _rv;
713 #ifndef MCUndo
714 PyMac_PRECHECK(MCUndo);
715 #endif
716 if (!PyArg_ParseTuple(_args, ""))
717 return NULL;
718 _rv = MCUndo(_self->ob_itself);
719 _res = Py_BuildValue("l",
720 _rv);
721 return _res;
724 static PyObject *MovieCtlObj_MCPositionController(MovieControllerObject *_self, PyObject *_args)
726 PyObject *_res = NULL;
727 ComponentResult _rv;
728 Rect movieRect;
729 Rect controllerRect;
730 long someFlags;
731 #ifndef MCPositionController
732 PyMac_PRECHECK(MCPositionController);
733 #endif
734 if (!PyArg_ParseTuple(_args, "O&O&l",
735 PyMac_GetRect, &movieRect,
736 PyMac_GetRect, &controllerRect,
737 &someFlags))
738 return NULL;
739 _rv = MCPositionController(_self->ob_itself,
740 &movieRect,
741 &controllerRect,
742 someFlags);
743 _res = Py_BuildValue("l",
744 _rv);
745 return _res;
748 static PyObject *MovieCtlObj_MCGetControllerInfo(MovieControllerObject *_self, PyObject *_args)
750 PyObject *_res = NULL;
751 ComponentResult _rv;
752 long someFlags;
753 #ifndef MCGetControllerInfo
754 PyMac_PRECHECK(MCGetControllerInfo);
755 #endif
756 if (!PyArg_ParseTuple(_args, ""))
757 return NULL;
758 _rv = MCGetControllerInfo(_self->ob_itself,
759 &someFlags);
760 _res = Py_BuildValue("ll",
761 _rv,
762 someFlags);
763 return _res;
766 static PyObject *MovieCtlObj_MCSetClip(MovieControllerObject *_self, PyObject *_args)
768 PyObject *_res = NULL;
769 ComponentResult _rv;
770 RgnHandle theClip;
771 RgnHandle movieClip;
772 #ifndef MCSetClip
773 PyMac_PRECHECK(MCSetClip);
774 #endif
775 if (!PyArg_ParseTuple(_args, "O&O&",
776 ResObj_Convert, &theClip,
777 ResObj_Convert, &movieClip))
778 return NULL;
779 _rv = MCSetClip(_self->ob_itself,
780 theClip,
781 movieClip);
782 _res = Py_BuildValue("l",
783 _rv);
784 return _res;
787 static PyObject *MovieCtlObj_MCGetClip(MovieControllerObject *_self, PyObject *_args)
789 PyObject *_res = NULL;
790 ComponentResult _rv;
791 RgnHandle theClip;
792 RgnHandle movieClip;
793 #ifndef MCGetClip
794 PyMac_PRECHECK(MCGetClip);
795 #endif
796 if (!PyArg_ParseTuple(_args, ""))
797 return NULL;
798 _rv = MCGetClip(_self->ob_itself,
799 &theClip,
800 &movieClip);
801 _res = Py_BuildValue("lO&O&",
802 _rv,
803 ResObj_New, theClip,
804 ResObj_New, movieClip);
805 return _res;
808 static PyObject *MovieCtlObj_MCDrawBadge(MovieControllerObject *_self, PyObject *_args)
810 PyObject *_res = NULL;
811 ComponentResult _rv;
812 RgnHandle movieRgn;
813 RgnHandle badgeRgn;
814 #ifndef MCDrawBadge
815 PyMac_PRECHECK(MCDrawBadge);
816 #endif
817 if (!PyArg_ParseTuple(_args, "O&",
818 ResObj_Convert, &movieRgn))
819 return NULL;
820 _rv = MCDrawBadge(_self->ob_itself,
821 movieRgn,
822 &badgeRgn);
823 _res = Py_BuildValue("lO&",
824 _rv,
825 ResObj_New, badgeRgn);
826 return _res;
829 static PyObject *MovieCtlObj_MCSetUpEditMenu(MovieControllerObject *_self, PyObject *_args)
831 PyObject *_res = NULL;
832 ComponentResult _rv;
833 long modifiers;
834 MenuHandle mh;
835 #ifndef MCSetUpEditMenu
836 PyMac_PRECHECK(MCSetUpEditMenu);
837 #endif
838 if (!PyArg_ParseTuple(_args, "lO&",
839 &modifiers,
840 MenuObj_Convert, &mh))
841 return NULL;
842 _rv = MCSetUpEditMenu(_self->ob_itself,
843 modifiers,
844 mh);
845 _res = Py_BuildValue("l",
846 _rv);
847 return _res;
850 static PyObject *MovieCtlObj_MCGetMenuString(MovieControllerObject *_self, PyObject *_args)
852 PyObject *_res = NULL;
853 ComponentResult _rv;
854 long modifiers;
855 short item;
856 Str255 aString;
857 #ifndef MCGetMenuString
858 PyMac_PRECHECK(MCGetMenuString);
859 #endif
860 if (!PyArg_ParseTuple(_args, "lhO&",
861 &modifiers,
862 &item,
863 PyMac_GetStr255, aString))
864 return NULL;
865 _rv = MCGetMenuString(_self->ob_itself,
866 modifiers,
867 item,
868 aString);
869 _res = Py_BuildValue("l",
870 _rv);
871 return _res;
874 static PyObject *MovieCtlObj_MCPtInController(MovieControllerObject *_self, PyObject *_args)
876 PyObject *_res = NULL;
877 ComponentResult _rv;
878 Point thePt;
879 Boolean inController;
880 #ifndef MCPtInController
881 PyMac_PRECHECK(MCPtInController);
882 #endif
883 if (!PyArg_ParseTuple(_args, "O&",
884 PyMac_GetPoint, &thePt))
885 return NULL;
886 _rv = MCPtInController(_self->ob_itself,
887 thePt,
888 &inController);
889 _res = Py_BuildValue("lb",
890 _rv,
891 inController);
892 return _res;
895 static PyObject *MovieCtlObj_MCInvalidate(MovieControllerObject *_self, PyObject *_args)
897 PyObject *_res = NULL;
898 ComponentResult _rv;
899 WindowPtr w;
900 RgnHandle invalidRgn;
901 #ifndef MCInvalidate
902 PyMac_PRECHECK(MCInvalidate);
903 #endif
904 if (!PyArg_ParseTuple(_args, "O&O&",
905 WinObj_Convert, &w,
906 ResObj_Convert, &invalidRgn))
907 return NULL;
908 _rv = MCInvalidate(_self->ob_itself,
910 invalidRgn);
911 _res = Py_BuildValue("l",
912 _rv);
913 return _res;
916 static PyObject *MovieCtlObj_MCAdjustCursor(MovieControllerObject *_self, PyObject *_args)
918 PyObject *_res = NULL;
919 ComponentResult _rv;
920 WindowPtr w;
921 Point where;
922 long modifiers;
923 #ifndef MCAdjustCursor
924 PyMac_PRECHECK(MCAdjustCursor);
925 #endif
926 if (!PyArg_ParseTuple(_args, "O&O&l",
927 WinObj_Convert, &w,
928 PyMac_GetPoint, &where,
929 &modifiers))
930 return NULL;
931 _rv = MCAdjustCursor(_self->ob_itself,
933 where,
934 modifiers);
935 _res = Py_BuildValue("l",
936 _rv);
937 return _res;
940 static PyObject *MovieCtlObj_MCGetInterfaceElement(MovieControllerObject *_self, PyObject *_args)
942 PyObject *_res = NULL;
943 ComponentResult _rv;
944 MCInterfaceElement whichElement;
945 void * element;
946 #ifndef MCGetInterfaceElement
947 PyMac_PRECHECK(MCGetInterfaceElement);
948 #endif
949 if (!PyArg_ParseTuple(_args, "ls",
950 &whichElement,
951 &element))
952 return NULL;
953 _rv = MCGetInterfaceElement(_self->ob_itself,
954 whichElement,
955 element);
956 _res = Py_BuildValue("l",
957 _rv);
958 return _res;
961 static PyObject *MovieCtlObj_MCAddMovieSegment(MovieControllerObject *_self, PyObject *_args)
963 PyObject *_res = NULL;
964 ComponentResult _rv;
965 Movie srcMovie;
966 Boolean scaled;
967 #ifndef MCAddMovieSegment
968 PyMac_PRECHECK(MCAddMovieSegment);
969 #endif
970 if (!PyArg_ParseTuple(_args, "O&b",
971 MovieObj_Convert, &srcMovie,
972 &scaled))
973 return NULL;
974 _rv = MCAddMovieSegment(_self->ob_itself,
975 srcMovie,
976 scaled);
977 _res = Py_BuildValue("l",
978 _rv);
979 return _res;
982 static PyObject *MovieCtlObj_MCTrimMovieSegment(MovieControllerObject *_self, PyObject *_args)
984 PyObject *_res = NULL;
985 ComponentResult _rv;
986 #ifndef MCTrimMovieSegment
987 PyMac_PRECHECK(MCTrimMovieSegment);
988 #endif
989 if (!PyArg_ParseTuple(_args, ""))
990 return NULL;
991 _rv = MCTrimMovieSegment(_self->ob_itself);
992 _res = Py_BuildValue("l",
993 _rv);
994 return _res;
997 static PyMethodDef MovieCtlObj_methods[] = {
998 {"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
999 PyDoc_STR("(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)")},
1000 {"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1,
1001 PyDoc_STR("(short index) -> (Movie _rv)")},
1002 {"MCRemoveAllMovies", (PyCFunction)MovieCtlObj_MCRemoveAllMovies, 1,
1003 PyDoc_STR("() -> (ComponentResult _rv)")},
1004 {"MCRemoveAMovie", (PyCFunction)MovieCtlObj_MCRemoveAMovie, 1,
1005 PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
1006 {"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1,
1007 PyDoc_STR("() -> (ComponentResult _rv)")},
1008 {"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1,
1009 PyDoc_STR("(EventRecord e) -> (ComponentResult _rv)")},
1010 {"MCDoAction", (PyCFunction)MovieCtlObj_MCDoAction, 1,
1011 PyDoc_STR("(short action, void * params) -> (ComponentResult _rv)")},
1012 {"MCSetControllerAttached", (PyCFunction)MovieCtlObj_MCSetControllerAttached, 1,
1013 PyDoc_STR("(Boolean attach) -> (ComponentResult _rv)")},
1014 {"MCIsControllerAttached", (PyCFunction)MovieCtlObj_MCIsControllerAttached, 1,
1015 PyDoc_STR("() -> (ComponentResult _rv)")},
1016 {"MCSetControllerPort", (PyCFunction)MovieCtlObj_MCSetControllerPort, 1,
1017 PyDoc_STR("(CGrafPtr gp) -> (ComponentResult _rv)")},
1018 {"MCGetControllerPort", (PyCFunction)MovieCtlObj_MCGetControllerPort, 1,
1019 PyDoc_STR("() -> (CGrafPtr _rv)")},
1020 {"MCSetVisible", (PyCFunction)MovieCtlObj_MCSetVisible, 1,
1021 PyDoc_STR("(Boolean visible) -> (ComponentResult _rv)")},
1022 {"MCGetVisible", (PyCFunction)MovieCtlObj_MCGetVisible, 1,
1023 PyDoc_STR("() -> (ComponentResult _rv)")},
1024 {"MCGetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRect, 1,
1025 PyDoc_STR("() -> (ComponentResult _rv, Rect bounds)")},
1026 {"MCSetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCSetControllerBoundsRect, 1,
1027 PyDoc_STR("(Rect bounds) -> (ComponentResult _rv)")},
1028 {"MCGetControllerBoundsRgn", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRgn, 1,
1029 PyDoc_STR("() -> (RgnHandle _rv)")},
1030 {"MCGetWindowRgn", (PyCFunction)MovieCtlObj_MCGetWindowRgn, 1,
1031 PyDoc_STR("(WindowPtr w) -> (RgnHandle _rv)")},
1032 {"MCMovieChanged", (PyCFunction)MovieCtlObj_MCMovieChanged, 1,
1033 PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
1034 {"MCSetDuration", (PyCFunction)MovieCtlObj_MCSetDuration, 1,
1035 PyDoc_STR("(TimeValue duration) -> (ComponentResult _rv)")},
1036 {"MCGetCurrentTime", (PyCFunction)MovieCtlObj_MCGetCurrentTime, 1,
1037 PyDoc_STR("() -> (TimeValue _rv, TimeScale scale)")},
1038 {"MCNewAttachedController", (PyCFunction)MovieCtlObj_MCNewAttachedController, 1,
1039 PyDoc_STR("(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)")},
1040 {"MCDraw", (PyCFunction)MovieCtlObj_MCDraw, 1,
1041 PyDoc_STR("(WindowPtr w) -> (ComponentResult _rv)")},
1042 {"MCActivate", (PyCFunction)MovieCtlObj_MCActivate, 1,
1043 PyDoc_STR("(WindowPtr w, Boolean activate) -> (ComponentResult _rv)")},
1044 {"MCIdle", (PyCFunction)MovieCtlObj_MCIdle, 1,
1045 PyDoc_STR("() -> (ComponentResult _rv)")},
1046 {"MCKey", (PyCFunction)MovieCtlObj_MCKey, 1,
1047 PyDoc_STR("(SInt8 key, long modifiers) -> (ComponentResult _rv)")},
1048 {"MCClick", (PyCFunction)MovieCtlObj_MCClick, 1,
1049 PyDoc_STR("(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)")},
1050 {"MCEnableEditing", (PyCFunction)MovieCtlObj_MCEnableEditing, 1,
1051 PyDoc_STR("(Boolean enabled) -> (ComponentResult _rv)")},
1052 {"MCIsEditingEnabled", (PyCFunction)MovieCtlObj_MCIsEditingEnabled, 1,
1053 PyDoc_STR("() -> (long _rv)")},
1054 {"MCCopy", (PyCFunction)MovieCtlObj_MCCopy, 1,
1055 PyDoc_STR("() -> (Movie _rv)")},
1056 {"MCCut", (PyCFunction)MovieCtlObj_MCCut, 1,
1057 PyDoc_STR("() -> (Movie _rv)")},
1058 {"MCPaste", (PyCFunction)MovieCtlObj_MCPaste, 1,
1059 PyDoc_STR("(Movie srcMovie) -> (ComponentResult _rv)")},
1060 {"MCClear", (PyCFunction)MovieCtlObj_MCClear, 1,
1061 PyDoc_STR("() -> (ComponentResult _rv)")},
1062 {"MCUndo", (PyCFunction)MovieCtlObj_MCUndo, 1,
1063 PyDoc_STR("() -> (ComponentResult _rv)")},
1064 {"MCPositionController", (PyCFunction)MovieCtlObj_MCPositionController, 1,
1065 PyDoc_STR("(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)")},
1066 {"MCGetControllerInfo", (PyCFunction)MovieCtlObj_MCGetControllerInfo, 1,
1067 PyDoc_STR("() -> (ComponentResult _rv, long someFlags)")},
1068 {"MCSetClip", (PyCFunction)MovieCtlObj_MCSetClip, 1,
1069 PyDoc_STR("(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)")},
1070 {"MCGetClip", (PyCFunction)MovieCtlObj_MCGetClip, 1,
1071 PyDoc_STR("() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)")},
1072 {"MCDrawBadge", (PyCFunction)MovieCtlObj_MCDrawBadge, 1,
1073 PyDoc_STR("(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)")},
1074 {"MCSetUpEditMenu", (PyCFunction)MovieCtlObj_MCSetUpEditMenu, 1,
1075 PyDoc_STR("(long modifiers, MenuHandle mh) -> (ComponentResult _rv)")},
1076 {"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1,
1077 PyDoc_STR("(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)")},
1078 {"MCPtInController", (PyCFunction)MovieCtlObj_MCPtInController, 1,
1079 PyDoc_STR("(Point thePt) -> (ComponentResult _rv, Boolean inController)")},
1080 {"MCInvalidate", (PyCFunction)MovieCtlObj_MCInvalidate, 1,
1081 PyDoc_STR("(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)")},
1082 {"MCAdjustCursor", (PyCFunction)MovieCtlObj_MCAdjustCursor, 1,
1083 PyDoc_STR("(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)")},
1084 {"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
1085 PyDoc_STR("(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)")},
1086 {"MCAddMovieSegment", (PyCFunction)MovieCtlObj_MCAddMovieSegment, 1,
1087 PyDoc_STR("(Movie srcMovie, Boolean scaled) -> (ComponentResult _rv)")},
1088 {"MCTrimMovieSegment", (PyCFunction)MovieCtlObj_MCTrimMovieSegment, 1,
1089 PyDoc_STR("() -> (ComponentResult _rv)")},
1090 {NULL, NULL, 0}
1093 #define MovieCtlObj_getsetlist NULL
1096 #define MovieCtlObj_compare NULL
1098 #define MovieCtlObj_repr NULL
1100 #define MovieCtlObj_hash NULL
1101 #define MovieCtlObj_tp_init 0
1103 #define MovieCtlObj_tp_alloc PyType_GenericAlloc
1105 static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
1107 PyObject *self;
1108 MovieController itself;
1109 char *kw[] = {"itself", 0};
1111 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MovieCtlObj_Convert, &itself)) return NULL;
1112 if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
1113 ((MovieControllerObject *)self)->ob_itself = itself;
1114 return self;
1117 #define MovieCtlObj_tp_free PyObject_Del
1120 PyTypeObject MovieController_Type = {
1121 PyObject_HEAD_INIT(NULL)
1122 0, /*ob_size*/
1123 "_Qt.MovieController", /*tp_name*/
1124 sizeof(MovieControllerObject), /*tp_basicsize*/
1125 0, /*tp_itemsize*/
1126 /* methods */
1127 (destructor) MovieCtlObj_dealloc, /*tp_dealloc*/
1128 0, /*tp_print*/
1129 (getattrfunc)0, /*tp_getattr*/
1130 (setattrfunc)0, /*tp_setattr*/
1131 (cmpfunc) MovieCtlObj_compare, /*tp_compare*/
1132 (reprfunc) MovieCtlObj_repr, /*tp_repr*/
1133 (PyNumberMethods *)0, /* tp_as_number */
1134 (PySequenceMethods *)0, /* tp_as_sequence */
1135 (PyMappingMethods *)0, /* tp_as_mapping */
1136 (hashfunc) MovieCtlObj_hash, /*tp_hash*/
1137 0, /*tp_call*/
1138 0, /*tp_str*/
1139 PyObject_GenericGetAttr, /*tp_getattro*/
1140 PyObject_GenericSetAttr, /*tp_setattro */
1141 0, /*tp_as_buffer*/
1142 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
1143 0, /*tp_doc*/
1144 0, /*tp_traverse*/
1145 0, /*tp_clear*/
1146 0, /*tp_richcompare*/
1147 0, /*tp_weaklistoffset*/
1148 0, /*tp_iter*/
1149 0, /*tp_iternext*/
1150 MovieCtlObj_methods, /* tp_methods */
1151 0, /*tp_members*/
1152 MovieCtlObj_getsetlist, /*tp_getset*/
1153 0, /*tp_base*/
1154 0, /*tp_dict*/
1155 0, /*tp_descr_get*/
1156 0, /*tp_descr_set*/
1157 0, /*tp_dictoffset*/
1158 MovieCtlObj_tp_init, /* tp_init */
1159 MovieCtlObj_tp_alloc, /* tp_alloc */
1160 MovieCtlObj_tp_new, /* tp_new */
1161 MovieCtlObj_tp_free, /* tp_free */
1164 /* ---------------- End object type MovieController ----------------- */
1167 /* ---------------------- Object type TimeBase ---------------------- */
1169 PyTypeObject TimeBase_Type;
1171 #define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type || PyObject_TypeCheck((x), &TimeBase_Type))
1173 typedef struct TimeBaseObject {
1174 PyObject_HEAD
1175 TimeBase ob_itself;
1176 } TimeBaseObject;
1178 PyObject *TimeBaseObj_New(TimeBase itself)
1180 TimeBaseObject *it;
1181 if (itself == NULL) {
1182 PyErr_SetString(Qt_Error,"Cannot create null TimeBase");
1183 return NULL;
1185 it = PyObject_NEW(TimeBaseObject, &TimeBase_Type);
1186 if (it == NULL) return NULL;
1187 it->ob_itself = itself;
1188 return (PyObject *)it;
1190 int TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself)
1192 if (!TimeBaseObj_Check(v))
1194 PyErr_SetString(PyExc_TypeError, "TimeBase required");
1195 return 0;
1197 *p_itself = ((TimeBaseObject *)v)->ob_itself;
1198 return 1;
1201 static void TimeBaseObj_dealloc(TimeBaseObject *self)
1203 /* Cleanup of self->ob_itself goes here */
1204 self->ob_type->tp_free((PyObject *)self);
1207 static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args)
1209 PyObject *_res = NULL;
1210 #ifndef DisposeTimeBase
1211 PyMac_PRECHECK(DisposeTimeBase);
1212 #endif
1213 if (!PyArg_ParseTuple(_args, ""))
1214 return NULL;
1215 DisposeTimeBase(_self->ob_itself);
1216 Py_INCREF(Py_None);
1217 _res = Py_None;
1218 return _res;
1221 static PyObject *TimeBaseObj_GetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
1223 PyObject *_res = NULL;
1224 TimeValue _rv;
1225 TimeScale s;
1226 TimeRecord tr;
1227 #ifndef GetTimeBaseTime
1228 PyMac_PRECHECK(GetTimeBaseTime);
1229 #endif
1230 if (!PyArg_ParseTuple(_args, "l",
1231 &s))
1232 return NULL;
1233 _rv = GetTimeBaseTime(_self->ob_itself,
1235 &tr);
1236 _res = Py_BuildValue("lO&",
1237 _rv,
1238 QtTimeRecord_New, &tr);
1239 return _res;
1242 static PyObject *TimeBaseObj_SetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
1244 PyObject *_res = NULL;
1245 TimeRecord tr;
1246 #ifndef SetTimeBaseTime
1247 PyMac_PRECHECK(SetTimeBaseTime);
1248 #endif
1249 if (!PyArg_ParseTuple(_args, "O&",
1250 QtTimeRecord_Convert, &tr))
1251 return NULL;
1252 SetTimeBaseTime(_self->ob_itself,
1253 &tr);
1254 Py_INCREF(Py_None);
1255 _res = Py_None;
1256 return _res;
1259 static PyObject *TimeBaseObj_SetTimeBaseValue(TimeBaseObject *_self, PyObject *_args)
1261 PyObject *_res = NULL;
1262 TimeValue t;
1263 TimeScale s;
1264 #ifndef SetTimeBaseValue
1265 PyMac_PRECHECK(SetTimeBaseValue);
1266 #endif
1267 if (!PyArg_ParseTuple(_args, "ll",
1269 &s))
1270 return NULL;
1271 SetTimeBaseValue(_self->ob_itself,
1274 Py_INCREF(Py_None);
1275 _res = Py_None;
1276 return _res;
1279 static PyObject *TimeBaseObj_GetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
1281 PyObject *_res = NULL;
1282 Fixed _rv;
1283 #ifndef GetTimeBaseRate
1284 PyMac_PRECHECK(GetTimeBaseRate);
1285 #endif
1286 if (!PyArg_ParseTuple(_args, ""))
1287 return NULL;
1288 _rv = GetTimeBaseRate(_self->ob_itself);
1289 _res = Py_BuildValue("O&",
1290 PyMac_BuildFixed, _rv);
1291 return _res;
1294 static PyObject *TimeBaseObj_SetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
1296 PyObject *_res = NULL;
1297 Fixed r;
1298 #ifndef SetTimeBaseRate
1299 PyMac_PRECHECK(SetTimeBaseRate);
1300 #endif
1301 if (!PyArg_ParseTuple(_args, "O&",
1302 PyMac_GetFixed, &r))
1303 return NULL;
1304 SetTimeBaseRate(_self->ob_itself,
1306 Py_INCREF(Py_None);
1307 _res = Py_None;
1308 return _res;
1311 static PyObject *TimeBaseObj_GetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
1313 PyObject *_res = NULL;
1314 TimeValue _rv;
1315 TimeScale s;
1316 TimeRecord tr;
1317 #ifndef GetTimeBaseStartTime
1318 PyMac_PRECHECK(GetTimeBaseStartTime);
1319 #endif
1320 if (!PyArg_ParseTuple(_args, "l",
1321 &s))
1322 return NULL;
1323 _rv = GetTimeBaseStartTime(_self->ob_itself,
1325 &tr);
1326 _res = Py_BuildValue("lO&",
1327 _rv,
1328 QtTimeRecord_New, &tr);
1329 return _res;
1332 static PyObject *TimeBaseObj_SetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
1334 PyObject *_res = NULL;
1335 TimeRecord tr;
1336 #ifndef SetTimeBaseStartTime
1337 PyMac_PRECHECK(SetTimeBaseStartTime);
1338 #endif
1339 if (!PyArg_ParseTuple(_args, "O&",
1340 QtTimeRecord_Convert, &tr))
1341 return NULL;
1342 SetTimeBaseStartTime(_self->ob_itself,
1343 &tr);
1344 Py_INCREF(Py_None);
1345 _res = Py_None;
1346 return _res;
1349 static PyObject *TimeBaseObj_GetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
1351 PyObject *_res = NULL;
1352 TimeValue _rv;
1353 TimeScale s;
1354 TimeRecord tr;
1355 #ifndef GetTimeBaseStopTime
1356 PyMac_PRECHECK(GetTimeBaseStopTime);
1357 #endif
1358 if (!PyArg_ParseTuple(_args, "l",
1359 &s))
1360 return NULL;
1361 _rv = GetTimeBaseStopTime(_self->ob_itself,
1363 &tr);
1364 _res = Py_BuildValue("lO&",
1365 _rv,
1366 QtTimeRecord_New, &tr);
1367 return _res;
1370 static PyObject *TimeBaseObj_SetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
1372 PyObject *_res = NULL;
1373 TimeRecord tr;
1374 #ifndef SetTimeBaseStopTime
1375 PyMac_PRECHECK(SetTimeBaseStopTime);
1376 #endif
1377 if (!PyArg_ParseTuple(_args, "O&",
1378 QtTimeRecord_Convert, &tr))
1379 return NULL;
1380 SetTimeBaseStopTime(_self->ob_itself,
1381 &tr);
1382 Py_INCREF(Py_None);
1383 _res = Py_None;
1384 return _res;
1387 static PyObject *TimeBaseObj_GetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
1389 PyObject *_res = NULL;
1390 long _rv;
1391 #ifndef GetTimeBaseFlags
1392 PyMac_PRECHECK(GetTimeBaseFlags);
1393 #endif
1394 if (!PyArg_ParseTuple(_args, ""))
1395 return NULL;
1396 _rv = GetTimeBaseFlags(_self->ob_itself);
1397 _res = Py_BuildValue("l",
1398 _rv);
1399 return _res;
1402 static PyObject *TimeBaseObj_SetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
1404 PyObject *_res = NULL;
1405 long timeBaseFlags;
1406 #ifndef SetTimeBaseFlags
1407 PyMac_PRECHECK(SetTimeBaseFlags);
1408 #endif
1409 if (!PyArg_ParseTuple(_args, "l",
1410 &timeBaseFlags))
1411 return NULL;
1412 SetTimeBaseFlags(_self->ob_itself,
1413 timeBaseFlags);
1414 Py_INCREF(Py_None);
1415 _res = Py_None;
1416 return _res;
1419 static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
1421 PyObject *_res = NULL;
1422 TimeBase master;
1423 TimeRecord slaveZero;
1424 #ifndef SetTimeBaseMasterTimeBase
1425 PyMac_PRECHECK(SetTimeBaseMasterTimeBase);
1426 #endif
1427 if (!PyArg_ParseTuple(_args, "O&O&",
1428 TimeBaseObj_Convert, &master,
1429 QtTimeRecord_Convert, &slaveZero))
1430 return NULL;
1431 SetTimeBaseMasterTimeBase(_self->ob_itself,
1432 master,
1433 &slaveZero);
1434 Py_INCREF(Py_None);
1435 _res = Py_None;
1436 return _res;
1439 static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
1441 PyObject *_res = NULL;
1442 TimeBase _rv;
1443 #ifndef GetTimeBaseMasterTimeBase
1444 PyMac_PRECHECK(GetTimeBaseMasterTimeBase);
1445 #endif
1446 if (!PyArg_ParseTuple(_args, ""))
1447 return NULL;
1448 _rv = GetTimeBaseMasterTimeBase(_self->ob_itself);
1449 _res = Py_BuildValue("O&",
1450 TimeBaseObj_New, _rv);
1451 return _res;
1454 static PyObject *TimeBaseObj_SetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
1456 PyObject *_res = NULL;
1457 Component clockMeister;
1458 TimeRecord slaveZero;
1459 #ifndef SetTimeBaseMasterClock
1460 PyMac_PRECHECK(SetTimeBaseMasterClock);
1461 #endif
1462 if (!PyArg_ParseTuple(_args, "O&O&",
1463 CmpObj_Convert, &clockMeister,
1464 QtTimeRecord_Convert, &slaveZero))
1465 return NULL;
1466 SetTimeBaseMasterClock(_self->ob_itself,
1467 clockMeister,
1468 &slaveZero);
1469 Py_INCREF(Py_None);
1470 _res = Py_None;
1471 return _res;
1474 static PyObject *TimeBaseObj_GetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
1476 PyObject *_res = NULL;
1477 ComponentInstance _rv;
1478 #ifndef GetTimeBaseMasterClock
1479 PyMac_PRECHECK(GetTimeBaseMasterClock);
1480 #endif
1481 if (!PyArg_ParseTuple(_args, ""))
1482 return NULL;
1483 _rv = GetTimeBaseMasterClock(_self->ob_itself);
1484 _res = Py_BuildValue("O&",
1485 CmpInstObj_New, _rv);
1486 return _res;
1489 static PyObject *TimeBaseObj_GetTimeBaseStatus(TimeBaseObject *_self, PyObject *_args)
1491 PyObject *_res = NULL;
1492 long _rv;
1493 TimeRecord unpinnedTime;
1494 #ifndef GetTimeBaseStatus
1495 PyMac_PRECHECK(GetTimeBaseStatus);
1496 #endif
1497 if (!PyArg_ParseTuple(_args, ""))
1498 return NULL;
1499 _rv = GetTimeBaseStatus(_self->ob_itself,
1500 &unpinnedTime);
1501 _res = Py_BuildValue("lO&",
1502 _rv,
1503 QtTimeRecord_New, &unpinnedTime);
1504 return _res;
1507 static PyObject *TimeBaseObj_SetTimeBaseZero(TimeBaseObject *_self, PyObject *_args)
1509 PyObject *_res = NULL;
1510 TimeRecord zero;
1511 #ifndef SetTimeBaseZero
1512 PyMac_PRECHECK(SetTimeBaseZero);
1513 #endif
1514 if (!PyArg_ParseTuple(_args, "O&",
1515 QtTimeRecord_Convert, &zero))
1516 return NULL;
1517 SetTimeBaseZero(_self->ob_itself,
1518 &zero);
1519 Py_INCREF(Py_None);
1520 _res = Py_None;
1521 return _res;
1524 static PyObject *TimeBaseObj_GetTimeBaseEffectiveRate(TimeBaseObject *_self, PyObject *_args)
1526 PyObject *_res = NULL;
1527 Fixed _rv;
1528 #ifndef GetTimeBaseEffectiveRate
1529 PyMac_PRECHECK(GetTimeBaseEffectiveRate);
1530 #endif
1531 if (!PyArg_ParseTuple(_args, ""))
1532 return NULL;
1533 _rv = GetTimeBaseEffectiveRate(_self->ob_itself);
1534 _res = Py_BuildValue("O&",
1535 PyMac_BuildFixed, _rv);
1536 return _res;
1539 static PyMethodDef TimeBaseObj_methods[] = {
1540 {"DisposeTimeBase", (PyCFunction)TimeBaseObj_DisposeTimeBase, 1,
1541 PyDoc_STR("() -> None")},
1542 {"GetTimeBaseTime", (PyCFunction)TimeBaseObj_GetTimeBaseTime, 1,
1543 PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
1544 {"SetTimeBaseTime", (PyCFunction)TimeBaseObj_SetTimeBaseTime, 1,
1545 PyDoc_STR("(TimeRecord tr) -> None")},
1546 {"SetTimeBaseValue", (PyCFunction)TimeBaseObj_SetTimeBaseValue, 1,
1547 PyDoc_STR("(TimeValue t, TimeScale s) -> None")},
1548 {"GetTimeBaseRate", (PyCFunction)TimeBaseObj_GetTimeBaseRate, 1,
1549 PyDoc_STR("() -> (Fixed _rv)")},
1550 {"SetTimeBaseRate", (PyCFunction)TimeBaseObj_SetTimeBaseRate, 1,
1551 PyDoc_STR("(Fixed r) -> None")},
1552 {"GetTimeBaseStartTime", (PyCFunction)TimeBaseObj_GetTimeBaseStartTime, 1,
1553 PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
1554 {"SetTimeBaseStartTime", (PyCFunction)TimeBaseObj_SetTimeBaseStartTime, 1,
1555 PyDoc_STR("(TimeRecord tr) -> None")},
1556 {"GetTimeBaseStopTime", (PyCFunction)TimeBaseObj_GetTimeBaseStopTime, 1,
1557 PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
1558 {"SetTimeBaseStopTime", (PyCFunction)TimeBaseObj_SetTimeBaseStopTime, 1,
1559 PyDoc_STR("(TimeRecord tr) -> None")},
1560 {"GetTimeBaseFlags", (PyCFunction)TimeBaseObj_GetTimeBaseFlags, 1,
1561 PyDoc_STR("() -> (long _rv)")},
1562 {"SetTimeBaseFlags", (PyCFunction)TimeBaseObj_SetTimeBaseFlags, 1,
1563 PyDoc_STR("(long timeBaseFlags) -> None")},
1564 {"SetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_SetTimeBaseMasterTimeBase, 1,
1565 PyDoc_STR("(TimeBase master, TimeRecord slaveZero) -> None")},
1566 {"GetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_GetTimeBaseMasterTimeBase, 1,
1567 PyDoc_STR("() -> (TimeBase _rv)")},
1568 {"SetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_SetTimeBaseMasterClock, 1,
1569 PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
1570 {"GetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_GetTimeBaseMasterClock, 1,
1571 PyDoc_STR("() -> (ComponentInstance _rv)")},
1572 {"GetTimeBaseStatus", (PyCFunction)TimeBaseObj_GetTimeBaseStatus, 1,
1573 PyDoc_STR("() -> (long _rv, TimeRecord unpinnedTime)")},
1574 {"SetTimeBaseZero", (PyCFunction)TimeBaseObj_SetTimeBaseZero, 1,
1575 PyDoc_STR("(TimeRecord zero) -> None")},
1576 {"GetTimeBaseEffectiveRate", (PyCFunction)TimeBaseObj_GetTimeBaseEffectiveRate, 1,
1577 PyDoc_STR("() -> (Fixed _rv)")},
1578 {NULL, NULL, 0}
1581 #define TimeBaseObj_getsetlist NULL
1584 #define TimeBaseObj_compare NULL
1586 #define TimeBaseObj_repr NULL
1588 #define TimeBaseObj_hash NULL
1589 #define TimeBaseObj_tp_init 0
1591 #define TimeBaseObj_tp_alloc PyType_GenericAlloc
1593 static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
1595 PyObject *self;
1596 TimeBase itself;
1597 char *kw[] = {"itself", 0};
1599 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TimeBaseObj_Convert, &itself)) return NULL;
1600 if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
1601 ((TimeBaseObject *)self)->ob_itself = itself;
1602 return self;
1605 #define TimeBaseObj_tp_free PyObject_Del
1608 PyTypeObject TimeBase_Type = {
1609 PyObject_HEAD_INIT(NULL)
1610 0, /*ob_size*/
1611 "_Qt.TimeBase", /*tp_name*/
1612 sizeof(TimeBaseObject), /*tp_basicsize*/
1613 0, /*tp_itemsize*/
1614 /* methods */
1615 (destructor) TimeBaseObj_dealloc, /*tp_dealloc*/
1616 0, /*tp_print*/
1617 (getattrfunc)0, /*tp_getattr*/
1618 (setattrfunc)0, /*tp_setattr*/
1619 (cmpfunc) TimeBaseObj_compare, /*tp_compare*/
1620 (reprfunc) TimeBaseObj_repr, /*tp_repr*/
1621 (PyNumberMethods *)0, /* tp_as_number */
1622 (PySequenceMethods *)0, /* tp_as_sequence */
1623 (PyMappingMethods *)0, /* tp_as_mapping */
1624 (hashfunc) TimeBaseObj_hash, /*tp_hash*/
1625 0, /*tp_call*/
1626 0, /*tp_str*/
1627 PyObject_GenericGetAttr, /*tp_getattro*/
1628 PyObject_GenericSetAttr, /*tp_setattro */
1629 0, /*tp_as_buffer*/
1630 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
1631 0, /*tp_doc*/
1632 0, /*tp_traverse*/
1633 0, /*tp_clear*/
1634 0, /*tp_richcompare*/
1635 0, /*tp_weaklistoffset*/
1636 0, /*tp_iter*/
1637 0, /*tp_iternext*/
1638 TimeBaseObj_methods, /* tp_methods */
1639 0, /*tp_members*/
1640 TimeBaseObj_getsetlist, /*tp_getset*/
1641 0, /*tp_base*/
1642 0, /*tp_dict*/
1643 0, /*tp_descr_get*/
1644 0, /*tp_descr_set*/
1645 0, /*tp_dictoffset*/
1646 TimeBaseObj_tp_init, /* tp_init */
1647 TimeBaseObj_tp_alloc, /* tp_alloc */
1648 TimeBaseObj_tp_new, /* tp_new */
1649 TimeBaseObj_tp_free, /* tp_free */
1652 /* -------------------- End object type TimeBase -------------------- */
1655 /* ---------------------- Object type UserData ---------------------- */
1657 PyTypeObject UserData_Type;
1659 #define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type || PyObject_TypeCheck((x), &UserData_Type))
1661 typedef struct UserDataObject {
1662 PyObject_HEAD
1663 UserData ob_itself;
1664 } UserDataObject;
1666 PyObject *UserDataObj_New(UserData itself)
1668 UserDataObject *it;
1669 if (itself == NULL) {
1670 PyErr_SetString(Qt_Error,"Cannot create null UserData");
1671 return NULL;
1673 it = PyObject_NEW(UserDataObject, &UserData_Type);
1674 if (it == NULL) return NULL;
1675 it->ob_itself = itself;
1676 return (PyObject *)it;
1678 int UserDataObj_Convert(PyObject *v, UserData *p_itself)
1680 if (!UserDataObj_Check(v))
1682 PyErr_SetString(PyExc_TypeError, "UserData required");
1683 return 0;
1685 *p_itself = ((UserDataObject *)v)->ob_itself;
1686 return 1;
1689 static void UserDataObj_dealloc(UserDataObject *self)
1691 DisposeUserData(self->ob_itself);
1692 self->ob_type->tp_free((PyObject *)self);
1695 static PyObject *UserDataObj_GetUserData(UserDataObject *_self, PyObject *_args)
1697 PyObject *_res = NULL;
1698 OSErr _err;
1699 Handle data;
1700 OSType udType;
1701 long index;
1702 #ifndef GetUserData
1703 PyMac_PRECHECK(GetUserData);
1704 #endif
1705 if (!PyArg_ParseTuple(_args, "O&O&l",
1706 ResObj_Convert, &data,
1707 PyMac_GetOSType, &udType,
1708 &index))
1709 return NULL;
1710 _err = GetUserData(_self->ob_itself,
1711 data,
1712 udType,
1713 index);
1714 if (_err != noErr) return PyMac_Error(_err);
1715 Py_INCREF(Py_None);
1716 _res = Py_None;
1717 return _res;
1720 static PyObject *UserDataObj_AddUserData(UserDataObject *_self, PyObject *_args)
1722 PyObject *_res = NULL;
1723 OSErr _err;
1724 Handle data;
1725 OSType udType;
1726 #ifndef AddUserData
1727 PyMac_PRECHECK(AddUserData);
1728 #endif
1729 if (!PyArg_ParseTuple(_args, "O&O&",
1730 ResObj_Convert, &data,
1731 PyMac_GetOSType, &udType))
1732 return NULL;
1733 _err = AddUserData(_self->ob_itself,
1734 data,
1735 udType);
1736 if (_err != noErr) return PyMac_Error(_err);
1737 Py_INCREF(Py_None);
1738 _res = Py_None;
1739 return _res;
1742 static PyObject *UserDataObj_RemoveUserData(UserDataObject *_self, PyObject *_args)
1744 PyObject *_res = NULL;
1745 OSErr _err;
1746 OSType udType;
1747 long index;
1748 #ifndef RemoveUserData
1749 PyMac_PRECHECK(RemoveUserData);
1750 #endif
1751 if (!PyArg_ParseTuple(_args, "O&l",
1752 PyMac_GetOSType, &udType,
1753 &index))
1754 return NULL;
1755 _err = RemoveUserData(_self->ob_itself,
1756 udType,
1757 index);
1758 if (_err != noErr) return PyMac_Error(_err);
1759 Py_INCREF(Py_None);
1760 _res = Py_None;
1761 return _res;
1764 static PyObject *UserDataObj_CountUserDataType(UserDataObject *_self, PyObject *_args)
1766 PyObject *_res = NULL;
1767 short _rv;
1768 OSType udType;
1769 #ifndef CountUserDataType
1770 PyMac_PRECHECK(CountUserDataType);
1771 #endif
1772 if (!PyArg_ParseTuple(_args, "O&",
1773 PyMac_GetOSType, &udType))
1774 return NULL;
1775 _rv = CountUserDataType(_self->ob_itself,
1776 udType);
1777 _res = Py_BuildValue("h",
1778 _rv);
1779 return _res;
1782 static PyObject *UserDataObj_GetNextUserDataType(UserDataObject *_self, PyObject *_args)
1784 PyObject *_res = NULL;
1785 long _rv;
1786 OSType udType;
1787 #ifndef GetNextUserDataType
1788 PyMac_PRECHECK(GetNextUserDataType);
1789 #endif
1790 if (!PyArg_ParseTuple(_args, "O&",
1791 PyMac_GetOSType, &udType))
1792 return NULL;
1793 _rv = GetNextUserDataType(_self->ob_itself,
1794 udType);
1795 _res = Py_BuildValue("l",
1796 _rv);
1797 return _res;
1800 static PyObject *UserDataObj_AddUserDataText(UserDataObject *_self, PyObject *_args)
1802 PyObject *_res = NULL;
1803 OSErr _err;
1804 Handle data;
1805 OSType udType;
1806 long index;
1807 short itlRegionTag;
1808 #ifndef AddUserDataText
1809 PyMac_PRECHECK(AddUserDataText);
1810 #endif
1811 if (!PyArg_ParseTuple(_args, "O&O&lh",
1812 ResObj_Convert, &data,
1813 PyMac_GetOSType, &udType,
1814 &index,
1815 &itlRegionTag))
1816 return NULL;
1817 _err = AddUserDataText(_self->ob_itself,
1818 data,
1819 udType,
1820 index,
1821 itlRegionTag);
1822 if (_err != noErr) return PyMac_Error(_err);
1823 Py_INCREF(Py_None);
1824 _res = Py_None;
1825 return _res;
1828 static PyObject *UserDataObj_GetUserDataText(UserDataObject *_self, PyObject *_args)
1830 PyObject *_res = NULL;
1831 OSErr _err;
1832 Handle data;
1833 OSType udType;
1834 long index;
1835 short itlRegionTag;
1836 #ifndef GetUserDataText
1837 PyMac_PRECHECK(GetUserDataText);
1838 #endif
1839 if (!PyArg_ParseTuple(_args, "O&O&lh",
1840 ResObj_Convert, &data,
1841 PyMac_GetOSType, &udType,
1842 &index,
1843 &itlRegionTag))
1844 return NULL;
1845 _err = GetUserDataText(_self->ob_itself,
1846 data,
1847 udType,
1848 index,
1849 itlRegionTag);
1850 if (_err != noErr) return PyMac_Error(_err);
1851 Py_INCREF(Py_None);
1852 _res = Py_None;
1853 return _res;
1856 static PyObject *UserDataObj_RemoveUserDataText(UserDataObject *_self, PyObject *_args)
1858 PyObject *_res = NULL;
1859 OSErr _err;
1860 OSType udType;
1861 long index;
1862 short itlRegionTag;
1863 #ifndef RemoveUserDataText
1864 PyMac_PRECHECK(RemoveUserDataText);
1865 #endif
1866 if (!PyArg_ParseTuple(_args, "O&lh",
1867 PyMac_GetOSType, &udType,
1868 &index,
1869 &itlRegionTag))
1870 return NULL;
1871 _err = RemoveUserDataText(_self->ob_itself,
1872 udType,
1873 index,
1874 itlRegionTag);
1875 if (_err != noErr) return PyMac_Error(_err);
1876 Py_INCREF(Py_None);
1877 _res = Py_None;
1878 return _res;
1881 static PyObject *UserDataObj_PutUserDataIntoHandle(UserDataObject *_self, PyObject *_args)
1883 PyObject *_res = NULL;
1884 OSErr _err;
1885 Handle h;
1886 #ifndef PutUserDataIntoHandle
1887 PyMac_PRECHECK(PutUserDataIntoHandle);
1888 #endif
1889 if (!PyArg_ParseTuple(_args, "O&",
1890 ResObj_Convert, &h))
1891 return NULL;
1892 _err = PutUserDataIntoHandle(_self->ob_itself,
1894 if (_err != noErr) return PyMac_Error(_err);
1895 Py_INCREF(Py_None);
1896 _res = Py_None;
1897 return _res;
1900 static PyMethodDef UserDataObj_methods[] = {
1901 {"GetUserData", (PyCFunction)UserDataObj_GetUserData, 1,
1902 PyDoc_STR("(Handle data, OSType udType, long index) -> None")},
1903 {"AddUserData", (PyCFunction)UserDataObj_AddUserData, 1,
1904 PyDoc_STR("(Handle data, OSType udType) -> None")},
1905 {"RemoveUserData", (PyCFunction)UserDataObj_RemoveUserData, 1,
1906 PyDoc_STR("(OSType udType, long index) -> None")},
1907 {"CountUserDataType", (PyCFunction)UserDataObj_CountUserDataType, 1,
1908 PyDoc_STR("(OSType udType) -> (short _rv)")},
1909 {"GetNextUserDataType", (PyCFunction)UserDataObj_GetNextUserDataType, 1,
1910 PyDoc_STR("(OSType udType) -> (long _rv)")},
1911 {"AddUserDataText", (PyCFunction)UserDataObj_AddUserDataText, 1,
1912 PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
1913 {"GetUserDataText", (PyCFunction)UserDataObj_GetUserDataText, 1,
1914 PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
1915 {"RemoveUserDataText", (PyCFunction)UserDataObj_RemoveUserDataText, 1,
1916 PyDoc_STR("(OSType udType, long index, short itlRegionTag) -> None")},
1917 {"PutUserDataIntoHandle", (PyCFunction)UserDataObj_PutUserDataIntoHandle, 1,
1918 PyDoc_STR("(Handle h) -> None")},
1919 {NULL, NULL, 0}
1922 #define UserDataObj_getsetlist NULL
1925 #define UserDataObj_compare NULL
1927 #define UserDataObj_repr NULL
1929 #define UserDataObj_hash NULL
1930 #define UserDataObj_tp_init 0
1932 #define UserDataObj_tp_alloc PyType_GenericAlloc
1934 static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
1936 PyObject *self;
1937 UserData itself;
1938 char *kw[] = {"itself", 0};
1940 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, UserDataObj_Convert, &itself)) return NULL;
1941 if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
1942 ((UserDataObject *)self)->ob_itself = itself;
1943 return self;
1946 #define UserDataObj_tp_free PyObject_Del
1949 PyTypeObject UserData_Type = {
1950 PyObject_HEAD_INIT(NULL)
1951 0, /*ob_size*/
1952 "_Qt.UserData", /*tp_name*/
1953 sizeof(UserDataObject), /*tp_basicsize*/
1954 0, /*tp_itemsize*/
1955 /* methods */
1956 (destructor) UserDataObj_dealloc, /*tp_dealloc*/
1957 0, /*tp_print*/
1958 (getattrfunc)0, /*tp_getattr*/
1959 (setattrfunc)0, /*tp_setattr*/
1960 (cmpfunc) UserDataObj_compare, /*tp_compare*/
1961 (reprfunc) UserDataObj_repr, /*tp_repr*/
1962 (PyNumberMethods *)0, /* tp_as_number */
1963 (PySequenceMethods *)0, /* tp_as_sequence */
1964 (PyMappingMethods *)0, /* tp_as_mapping */
1965 (hashfunc) UserDataObj_hash, /*tp_hash*/
1966 0, /*tp_call*/
1967 0, /*tp_str*/
1968 PyObject_GenericGetAttr, /*tp_getattro*/
1969 PyObject_GenericSetAttr, /*tp_setattro */
1970 0, /*tp_as_buffer*/
1971 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
1972 0, /*tp_doc*/
1973 0, /*tp_traverse*/
1974 0, /*tp_clear*/
1975 0, /*tp_richcompare*/
1976 0, /*tp_weaklistoffset*/
1977 0, /*tp_iter*/
1978 0, /*tp_iternext*/
1979 UserDataObj_methods, /* tp_methods */
1980 0, /*tp_members*/
1981 UserDataObj_getsetlist, /*tp_getset*/
1982 0, /*tp_base*/
1983 0, /*tp_dict*/
1984 0, /*tp_descr_get*/
1985 0, /*tp_descr_set*/
1986 0, /*tp_dictoffset*/
1987 UserDataObj_tp_init, /* tp_init */
1988 UserDataObj_tp_alloc, /* tp_alloc */
1989 UserDataObj_tp_new, /* tp_new */
1990 UserDataObj_tp_free, /* tp_free */
1993 /* -------------------- End object type UserData -------------------- */
1996 /* ----------------------- Object type Media ------------------------ */
1998 PyTypeObject Media_Type;
2000 #define MediaObj_Check(x) ((x)->ob_type == &Media_Type || PyObject_TypeCheck((x), &Media_Type))
2002 typedef struct MediaObject {
2003 PyObject_HEAD
2004 Media ob_itself;
2005 } MediaObject;
2007 PyObject *MediaObj_New(Media itself)
2009 MediaObject *it;
2010 if (itself == NULL) {
2011 PyErr_SetString(Qt_Error,"Cannot create null Media");
2012 return NULL;
2014 it = PyObject_NEW(MediaObject, &Media_Type);
2015 if (it == NULL) return NULL;
2016 it->ob_itself = itself;
2017 return (PyObject *)it;
2019 int MediaObj_Convert(PyObject *v, Media *p_itself)
2021 if (!MediaObj_Check(v))
2023 PyErr_SetString(PyExc_TypeError, "Media required");
2024 return 0;
2026 *p_itself = ((MediaObject *)v)->ob_itself;
2027 return 1;
2030 static void MediaObj_dealloc(MediaObject *self)
2032 DisposeTrackMedia(self->ob_itself);
2033 self->ob_type->tp_free((PyObject *)self);
2036 static PyObject *MediaObj_LoadMediaIntoRam(MediaObject *_self, PyObject *_args)
2038 PyObject *_res = NULL;
2039 OSErr _err;
2040 TimeValue time;
2041 TimeValue duration;
2042 long flags;
2043 #ifndef LoadMediaIntoRam
2044 PyMac_PRECHECK(LoadMediaIntoRam);
2045 #endif
2046 if (!PyArg_ParseTuple(_args, "lll",
2047 &time,
2048 &duration,
2049 &flags))
2050 return NULL;
2051 _err = LoadMediaIntoRam(_self->ob_itself,
2052 time,
2053 duration,
2054 flags);
2055 if (_err != noErr) return PyMac_Error(_err);
2056 Py_INCREF(Py_None);
2057 _res = Py_None;
2058 return _res;
2061 static PyObject *MediaObj_GetMediaTrack(MediaObject *_self, PyObject *_args)
2063 PyObject *_res = NULL;
2064 Track _rv;
2065 #ifndef GetMediaTrack
2066 PyMac_PRECHECK(GetMediaTrack);
2067 #endif
2068 if (!PyArg_ParseTuple(_args, ""))
2069 return NULL;
2070 _rv = GetMediaTrack(_self->ob_itself);
2071 _res = Py_BuildValue("O&",
2072 TrackObj_New, _rv);
2073 return _res;
2076 static PyObject *MediaObj_GetMediaCreationTime(MediaObject *_self, PyObject *_args)
2078 PyObject *_res = NULL;
2079 unsigned long _rv;
2080 #ifndef GetMediaCreationTime
2081 PyMac_PRECHECK(GetMediaCreationTime);
2082 #endif
2083 if (!PyArg_ParseTuple(_args, ""))
2084 return NULL;
2085 _rv = GetMediaCreationTime(_self->ob_itself);
2086 _res = Py_BuildValue("l",
2087 _rv);
2088 return _res;
2091 static PyObject *MediaObj_GetMediaModificationTime(MediaObject *_self, PyObject *_args)
2093 PyObject *_res = NULL;
2094 unsigned long _rv;
2095 #ifndef GetMediaModificationTime
2096 PyMac_PRECHECK(GetMediaModificationTime);
2097 #endif
2098 if (!PyArg_ParseTuple(_args, ""))
2099 return NULL;
2100 _rv = GetMediaModificationTime(_self->ob_itself);
2101 _res = Py_BuildValue("l",
2102 _rv);
2103 return _res;
2106 static PyObject *MediaObj_GetMediaTimeScale(MediaObject *_self, PyObject *_args)
2108 PyObject *_res = NULL;
2109 TimeScale _rv;
2110 #ifndef GetMediaTimeScale
2111 PyMac_PRECHECK(GetMediaTimeScale);
2112 #endif
2113 if (!PyArg_ParseTuple(_args, ""))
2114 return NULL;
2115 _rv = GetMediaTimeScale(_self->ob_itself);
2116 _res = Py_BuildValue("l",
2117 _rv);
2118 return _res;
2121 static PyObject *MediaObj_SetMediaTimeScale(MediaObject *_self, PyObject *_args)
2123 PyObject *_res = NULL;
2124 TimeScale timeScale;
2125 #ifndef SetMediaTimeScale
2126 PyMac_PRECHECK(SetMediaTimeScale);
2127 #endif
2128 if (!PyArg_ParseTuple(_args, "l",
2129 &timeScale))
2130 return NULL;
2131 SetMediaTimeScale(_self->ob_itself,
2132 timeScale);
2133 Py_INCREF(Py_None);
2134 _res = Py_None;
2135 return _res;
2138 static PyObject *MediaObj_GetMediaDuration(MediaObject *_self, PyObject *_args)
2140 PyObject *_res = NULL;
2141 TimeValue _rv;
2142 #ifndef GetMediaDuration
2143 PyMac_PRECHECK(GetMediaDuration);
2144 #endif
2145 if (!PyArg_ParseTuple(_args, ""))
2146 return NULL;
2147 _rv = GetMediaDuration(_self->ob_itself);
2148 _res = Py_BuildValue("l",
2149 _rv);
2150 return _res;
2153 static PyObject *MediaObj_GetMediaLanguage(MediaObject *_self, PyObject *_args)
2155 PyObject *_res = NULL;
2156 short _rv;
2157 #ifndef GetMediaLanguage
2158 PyMac_PRECHECK(GetMediaLanguage);
2159 #endif
2160 if (!PyArg_ParseTuple(_args, ""))
2161 return NULL;
2162 _rv = GetMediaLanguage(_self->ob_itself);
2163 _res = Py_BuildValue("h",
2164 _rv);
2165 return _res;
2168 static PyObject *MediaObj_SetMediaLanguage(MediaObject *_self, PyObject *_args)
2170 PyObject *_res = NULL;
2171 short language;
2172 #ifndef SetMediaLanguage
2173 PyMac_PRECHECK(SetMediaLanguage);
2174 #endif
2175 if (!PyArg_ParseTuple(_args, "h",
2176 &language))
2177 return NULL;
2178 SetMediaLanguage(_self->ob_itself,
2179 language);
2180 Py_INCREF(Py_None);
2181 _res = Py_None;
2182 return _res;
2185 static PyObject *MediaObj_GetMediaQuality(MediaObject *_self, PyObject *_args)
2187 PyObject *_res = NULL;
2188 short _rv;
2189 #ifndef GetMediaQuality
2190 PyMac_PRECHECK(GetMediaQuality);
2191 #endif
2192 if (!PyArg_ParseTuple(_args, ""))
2193 return NULL;
2194 _rv = GetMediaQuality(_self->ob_itself);
2195 _res = Py_BuildValue("h",
2196 _rv);
2197 return _res;
2200 static PyObject *MediaObj_SetMediaQuality(MediaObject *_self, PyObject *_args)
2202 PyObject *_res = NULL;
2203 short quality;
2204 #ifndef SetMediaQuality
2205 PyMac_PRECHECK(SetMediaQuality);
2206 #endif
2207 if (!PyArg_ParseTuple(_args, "h",
2208 &quality))
2209 return NULL;
2210 SetMediaQuality(_self->ob_itself,
2211 quality);
2212 Py_INCREF(Py_None);
2213 _res = Py_None;
2214 return _res;
2217 static PyObject *MediaObj_GetMediaHandlerDescription(MediaObject *_self, PyObject *_args)
2219 PyObject *_res = NULL;
2220 OSType mediaType;
2221 Str255 creatorName;
2222 OSType creatorManufacturer;
2223 #ifndef GetMediaHandlerDescription
2224 PyMac_PRECHECK(GetMediaHandlerDescription);
2225 #endif
2226 if (!PyArg_ParseTuple(_args, "O&",
2227 PyMac_GetStr255, creatorName))
2228 return NULL;
2229 GetMediaHandlerDescription(_self->ob_itself,
2230 &mediaType,
2231 creatorName,
2232 &creatorManufacturer);
2233 _res = Py_BuildValue("O&O&",
2234 PyMac_BuildOSType, mediaType,
2235 PyMac_BuildOSType, creatorManufacturer);
2236 return _res;
2239 static PyObject *MediaObj_GetMediaUserData(MediaObject *_self, PyObject *_args)
2241 PyObject *_res = NULL;
2242 UserData _rv;
2243 #ifndef GetMediaUserData
2244 PyMac_PRECHECK(GetMediaUserData);
2245 #endif
2246 if (!PyArg_ParseTuple(_args, ""))
2247 return NULL;
2248 _rv = GetMediaUserData(_self->ob_itself);
2249 _res = Py_BuildValue("O&",
2250 UserDataObj_New, _rv);
2251 return _res;
2254 static PyObject *MediaObj_GetMediaHandler(MediaObject *_self, PyObject *_args)
2256 PyObject *_res = NULL;
2257 MediaHandler _rv;
2258 #ifndef GetMediaHandler
2259 PyMac_PRECHECK(GetMediaHandler);
2260 #endif
2261 if (!PyArg_ParseTuple(_args, ""))
2262 return NULL;
2263 _rv = GetMediaHandler(_self->ob_itself);
2264 _res = Py_BuildValue("O&",
2265 CmpInstObj_New, _rv);
2266 return _res;
2269 static PyObject *MediaObj_SetMediaHandler(MediaObject *_self, PyObject *_args)
2271 PyObject *_res = NULL;
2272 OSErr _err;
2273 MediaHandlerComponent mH;
2274 #ifndef SetMediaHandler
2275 PyMac_PRECHECK(SetMediaHandler);
2276 #endif
2277 if (!PyArg_ParseTuple(_args, "O&",
2278 CmpObj_Convert, &mH))
2279 return NULL;
2280 _err = SetMediaHandler(_self->ob_itself,
2281 mH);
2282 if (_err != noErr) return PyMac_Error(_err);
2283 Py_INCREF(Py_None);
2284 _res = Py_None;
2285 return _res;
2288 static PyObject *MediaObj_BeginMediaEdits(MediaObject *_self, PyObject *_args)
2290 PyObject *_res = NULL;
2291 OSErr _err;
2292 #ifndef BeginMediaEdits
2293 PyMac_PRECHECK(BeginMediaEdits);
2294 #endif
2295 if (!PyArg_ParseTuple(_args, ""))
2296 return NULL;
2297 _err = BeginMediaEdits(_self->ob_itself);
2298 if (_err != noErr) return PyMac_Error(_err);
2299 Py_INCREF(Py_None);
2300 _res = Py_None;
2301 return _res;
2304 static PyObject *MediaObj_EndMediaEdits(MediaObject *_self, PyObject *_args)
2306 PyObject *_res = NULL;
2307 OSErr _err;
2308 #ifndef EndMediaEdits
2309 PyMac_PRECHECK(EndMediaEdits);
2310 #endif
2311 if (!PyArg_ParseTuple(_args, ""))
2312 return NULL;
2313 _err = EndMediaEdits(_self->ob_itself);
2314 if (_err != noErr) return PyMac_Error(_err);
2315 Py_INCREF(Py_None);
2316 _res = Py_None;
2317 return _res;
2320 static PyObject *MediaObj_SetMediaDefaultDataRefIndex(MediaObject *_self, PyObject *_args)
2322 PyObject *_res = NULL;
2323 OSErr _err;
2324 short index;
2325 #ifndef SetMediaDefaultDataRefIndex
2326 PyMac_PRECHECK(SetMediaDefaultDataRefIndex);
2327 #endif
2328 if (!PyArg_ParseTuple(_args, "h",
2329 &index))
2330 return NULL;
2331 _err = SetMediaDefaultDataRefIndex(_self->ob_itself,
2332 index);
2333 if (_err != noErr) return PyMac_Error(_err);
2334 Py_INCREF(Py_None);
2335 _res = Py_None;
2336 return _res;
2339 static PyObject *MediaObj_GetMediaDataHandlerDescription(MediaObject *_self, PyObject *_args)
2341 PyObject *_res = NULL;
2342 short index;
2343 OSType dhType;
2344 Str255 creatorName;
2345 OSType creatorManufacturer;
2346 #ifndef GetMediaDataHandlerDescription
2347 PyMac_PRECHECK(GetMediaDataHandlerDescription);
2348 #endif
2349 if (!PyArg_ParseTuple(_args, "hO&",
2350 &index,
2351 PyMac_GetStr255, creatorName))
2352 return NULL;
2353 GetMediaDataHandlerDescription(_self->ob_itself,
2354 index,
2355 &dhType,
2356 creatorName,
2357 &creatorManufacturer);
2358 _res = Py_BuildValue("O&O&",
2359 PyMac_BuildOSType, dhType,
2360 PyMac_BuildOSType, creatorManufacturer);
2361 return _res;
2364 static PyObject *MediaObj_GetMediaDataHandler(MediaObject *_self, PyObject *_args)
2366 PyObject *_res = NULL;
2367 DataHandler _rv;
2368 short index;
2369 #ifndef GetMediaDataHandler
2370 PyMac_PRECHECK(GetMediaDataHandler);
2371 #endif
2372 if (!PyArg_ParseTuple(_args, "h",
2373 &index))
2374 return NULL;
2375 _rv = GetMediaDataHandler(_self->ob_itself,
2376 index);
2377 _res = Py_BuildValue("O&",
2378 CmpInstObj_New, _rv);
2379 return _res;
2382 static PyObject *MediaObj_SetMediaDataHandler(MediaObject *_self, PyObject *_args)
2384 PyObject *_res = NULL;
2385 OSErr _err;
2386 short index;
2387 DataHandlerComponent dataHandler;
2388 #ifndef SetMediaDataHandler
2389 PyMac_PRECHECK(SetMediaDataHandler);
2390 #endif
2391 if (!PyArg_ParseTuple(_args, "hO&",
2392 &index,
2393 CmpObj_Convert, &dataHandler))
2394 return NULL;
2395 _err = SetMediaDataHandler(_self->ob_itself,
2396 index,
2397 dataHandler);
2398 if (_err != noErr) return PyMac_Error(_err);
2399 Py_INCREF(Py_None);
2400 _res = Py_None;
2401 return _res;
2404 static PyObject *MediaObj_GetMediaSampleDescriptionCount(MediaObject *_self, PyObject *_args)
2406 PyObject *_res = NULL;
2407 long _rv;
2408 #ifndef GetMediaSampleDescriptionCount
2409 PyMac_PRECHECK(GetMediaSampleDescriptionCount);
2410 #endif
2411 if (!PyArg_ParseTuple(_args, ""))
2412 return NULL;
2413 _rv = GetMediaSampleDescriptionCount(_self->ob_itself);
2414 _res = Py_BuildValue("l",
2415 _rv);
2416 return _res;
2419 static PyObject *MediaObj_GetMediaSampleDescription(MediaObject *_self, PyObject *_args)
2421 PyObject *_res = NULL;
2422 long index;
2423 SampleDescriptionHandle descH;
2424 #ifndef GetMediaSampleDescription
2425 PyMac_PRECHECK(GetMediaSampleDescription);
2426 #endif
2427 if (!PyArg_ParseTuple(_args, "lO&",
2428 &index,
2429 ResObj_Convert, &descH))
2430 return NULL;
2431 GetMediaSampleDescription(_self->ob_itself,
2432 index,
2433 descH);
2434 Py_INCREF(Py_None);
2435 _res = Py_None;
2436 return _res;
2439 static PyObject *MediaObj_SetMediaSampleDescription(MediaObject *_self, PyObject *_args)
2441 PyObject *_res = NULL;
2442 OSErr _err;
2443 long index;
2444 SampleDescriptionHandle descH;
2445 #ifndef SetMediaSampleDescription
2446 PyMac_PRECHECK(SetMediaSampleDescription);
2447 #endif
2448 if (!PyArg_ParseTuple(_args, "lO&",
2449 &index,
2450 ResObj_Convert, &descH))
2451 return NULL;
2452 _err = SetMediaSampleDescription(_self->ob_itself,
2453 index,
2454 descH);
2455 if (_err != noErr) return PyMac_Error(_err);
2456 Py_INCREF(Py_None);
2457 _res = Py_None;
2458 return _res;
2461 static PyObject *MediaObj_GetMediaSampleCount(MediaObject *_self, PyObject *_args)
2463 PyObject *_res = NULL;
2464 long _rv;
2465 #ifndef GetMediaSampleCount
2466 PyMac_PRECHECK(GetMediaSampleCount);
2467 #endif
2468 if (!PyArg_ParseTuple(_args, ""))
2469 return NULL;
2470 _rv = GetMediaSampleCount(_self->ob_itself);
2471 _res = Py_BuildValue("l",
2472 _rv);
2473 return _res;
2476 static PyObject *MediaObj_GetMediaSyncSampleCount(MediaObject *_self, PyObject *_args)
2478 PyObject *_res = NULL;
2479 long _rv;
2480 #ifndef GetMediaSyncSampleCount
2481 PyMac_PRECHECK(GetMediaSyncSampleCount);
2482 #endif
2483 if (!PyArg_ParseTuple(_args, ""))
2484 return NULL;
2485 _rv = GetMediaSyncSampleCount(_self->ob_itself);
2486 _res = Py_BuildValue("l",
2487 _rv);
2488 return _res;
2491 static PyObject *MediaObj_SampleNumToMediaTime(MediaObject *_self, PyObject *_args)
2493 PyObject *_res = NULL;
2494 long logicalSampleNum;
2495 TimeValue sampleTime;
2496 TimeValue sampleDuration;
2497 #ifndef SampleNumToMediaTime
2498 PyMac_PRECHECK(SampleNumToMediaTime);
2499 #endif
2500 if (!PyArg_ParseTuple(_args, "l",
2501 &logicalSampleNum))
2502 return NULL;
2503 SampleNumToMediaTime(_self->ob_itself,
2504 logicalSampleNum,
2505 &sampleTime,
2506 &sampleDuration);
2507 _res = Py_BuildValue("ll",
2508 sampleTime,
2509 sampleDuration);
2510 return _res;
2513 static PyObject *MediaObj_MediaTimeToSampleNum(MediaObject *_self, PyObject *_args)
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;
2538 static PyObject *MediaObj_AddMediaSample(MediaObject *_self, PyObject *_args)
2540 PyObject *_res = NULL;
2541 OSErr _err;
2542 Handle dataIn;
2543 long inOffset;
2544 unsigned long size;
2545 TimeValue durationPerSample;
2546 SampleDescriptionHandle sampleDescriptionH;
2547 long numberOfSamples;
2548 short sampleFlags;
2549 TimeValue sampleTime;
2550 #ifndef AddMediaSample
2551 PyMac_PRECHECK(AddMediaSample);
2552 #endif
2553 if (!PyArg_ParseTuple(_args, "O&lllO&lh",
2554 ResObj_Convert, &dataIn,
2555 &inOffset,
2556 &size,
2557 &durationPerSample,
2558 ResObj_Convert, &sampleDescriptionH,
2559 &numberOfSamples,
2560 &sampleFlags))
2561 return NULL;
2562 _err = AddMediaSample(_self->ob_itself,
2563 dataIn,
2564 inOffset,
2565 size,
2566 durationPerSample,
2567 sampleDescriptionH,
2568 numberOfSamples,
2569 sampleFlags,
2570 &sampleTime);
2571 if (_err != noErr) return PyMac_Error(_err);
2572 _res = Py_BuildValue("l",
2573 sampleTime);
2574 return _res;
2577 static PyObject *MediaObj_AddMediaSampleReference(MediaObject *_self, PyObject *_args)
2579 PyObject *_res = NULL;
2580 OSErr _err;
2581 long dataOffset;
2582 unsigned long size;
2583 TimeValue durationPerSample;
2584 SampleDescriptionHandle sampleDescriptionH;
2585 long numberOfSamples;
2586 short sampleFlags;
2587 TimeValue sampleTime;
2588 #ifndef AddMediaSampleReference
2589 PyMac_PRECHECK(AddMediaSampleReference);
2590 #endif
2591 if (!PyArg_ParseTuple(_args, "lllO&lh",
2592 &dataOffset,
2593 &size,
2594 &durationPerSample,
2595 ResObj_Convert, &sampleDescriptionH,
2596 &numberOfSamples,
2597 &sampleFlags))
2598 return NULL;
2599 _err = AddMediaSampleReference(_self->ob_itself,
2600 dataOffset,
2601 size,
2602 durationPerSample,
2603 sampleDescriptionH,
2604 numberOfSamples,
2605 sampleFlags,
2606 &sampleTime);
2607 if (_err != noErr) return PyMac_Error(_err);
2608 _res = Py_BuildValue("l",
2609 sampleTime);
2610 return _res;
2613 static PyObject *MediaObj_GetMediaSample(MediaObject *_self, PyObject *_args)
2615 PyObject *_res = NULL;
2616 OSErr _err;
2617 Handle dataOut;
2618 long maxSizeToGrow;
2619 long size;
2620 TimeValue time;
2621 TimeValue sampleTime;
2622 TimeValue durationPerSample;
2623 SampleDescriptionHandle sampleDescriptionH;
2624 long sampleDescriptionIndex;
2625 long maxNumberOfSamples;
2626 long numberOfSamples;
2627 short sampleFlags;
2628 #ifndef GetMediaSample
2629 PyMac_PRECHECK(GetMediaSample);
2630 #endif
2631 if (!PyArg_ParseTuple(_args, "O&llO&l",
2632 ResObj_Convert, &dataOut,
2633 &maxSizeToGrow,
2634 &time,
2635 ResObj_Convert, &sampleDescriptionH,
2636 &maxNumberOfSamples))
2637 return NULL;
2638 _err = GetMediaSample(_self->ob_itself,
2639 dataOut,
2640 maxSizeToGrow,
2641 &size,
2642 time,
2643 &sampleTime,
2644 &durationPerSample,
2645 sampleDescriptionH,
2646 &sampleDescriptionIndex,
2647 maxNumberOfSamples,
2648 &numberOfSamples,
2649 &sampleFlags);
2650 if (_err != noErr) return PyMac_Error(_err);
2651 _res = Py_BuildValue("lllllh",
2652 size,
2653 sampleTime,
2654 durationPerSample,
2655 sampleDescriptionIndex,
2656 numberOfSamples,
2657 sampleFlags);
2658 return _res;
2661 static PyObject *MediaObj_GetMediaSampleReference(MediaObject *_self, PyObject *_args)
2663 PyObject *_res = NULL;
2664 OSErr _err;
2665 long dataOffset;
2666 long size;
2667 TimeValue time;
2668 TimeValue sampleTime;
2669 TimeValue durationPerSample;
2670 SampleDescriptionHandle sampleDescriptionH;
2671 long sampleDescriptionIndex;
2672 long maxNumberOfSamples;
2673 long numberOfSamples;
2674 short sampleFlags;
2675 #ifndef GetMediaSampleReference
2676 PyMac_PRECHECK(GetMediaSampleReference);
2677 #endif
2678 if (!PyArg_ParseTuple(_args, "lO&l",
2679 &time,
2680 ResObj_Convert, &sampleDescriptionH,
2681 &maxNumberOfSamples))
2682 return NULL;
2683 _err = GetMediaSampleReference(_self->ob_itself,
2684 &dataOffset,
2685 &size,
2686 time,
2687 &sampleTime,
2688 &durationPerSample,
2689 sampleDescriptionH,
2690 &sampleDescriptionIndex,
2691 maxNumberOfSamples,
2692 &numberOfSamples,
2693 &sampleFlags);
2694 if (_err != noErr) return PyMac_Error(_err);
2695 _res = Py_BuildValue("llllllh",
2696 dataOffset,
2697 size,
2698 sampleTime,
2699 durationPerSample,
2700 sampleDescriptionIndex,
2701 numberOfSamples,
2702 sampleFlags);
2703 return _res;
2706 static PyObject *MediaObj_SetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
2708 PyObject *_res = NULL;
2709 OSErr _err;
2710 long maxChunkSize;
2711 #ifndef SetMediaPreferredChunkSize
2712 PyMac_PRECHECK(SetMediaPreferredChunkSize);
2713 #endif
2714 if (!PyArg_ParseTuple(_args, "l",
2715 &maxChunkSize))
2716 return NULL;
2717 _err = SetMediaPreferredChunkSize(_self->ob_itself,
2718 maxChunkSize);
2719 if (_err != noErr) return PyMac_Error(_err);
2720 Py_INCREF(Py_None);
2721 _res = Py_None;
2722 return _res;
2725 static PyObject *MediaObj_GetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
2727 PyObject *_res = NULL;
2728 OSErr _err;
2729 long maxChunkSize;
2730 #ifndef GetMediaPreferredChunkSize
2731 PyMac_PRECHECK(GetMediaPreferredChunkSize);
2732 #endif
2733 if (!PyArg_ParseTuple(_args, ""))
2734 return NULL;
2735 _err = GetMediaPreferredChunkSize(_self->ob_itself,
2736 &maxChunkSize);
2737 if (_err != noErr) return PyMac_Error(_err);
2738 _res = Py_BuildValue("l",
2739 maxChunkSize);
2740 return _res;
2743 static PyObject *MediaObj_SetMediaShadowSync(MediaObject *_self, PyObject *_args)
2745 PyObject *_res = NULL;
2746 OSErr _err;
2747 long frameDiffSampleNum;
2748 long syncSampleNum;
2749 #ifndef SetMediaShadowSync
2750 PyMac_PRECHECK(SetMediaShadowSync);
2751 #endif
2752 if (!PyArg_ParseTuple(_args, "ll",
2753 &frameDiffSampleNum,
2754 &syncSampleNum))
2755 return NULL;
2756 _err = SetMediaShadowSync(_self->ob_itself,
2757 frameDiffSampleNum,
2758 syncSampleNum);
2759 if (_err != noErr) return PyMac_Error(_err);
2760 Py_INCREF(Py_None);
2761 _res = Py_None;
2762 return _res;
2765 static PyObject *MediaObj_GetMediaShadowSync(MediaObject *_self, PyObject *_args)
2767 PyObject *_res = NULL;
2768 OSErr _err;
2769 long frameDiffSampleNum;
2770 long syncSampleNum;
2771 #ifndef GetMediaShadowSync
2772 PyMac_PRECHECK(GetMediaShadowSync);
2773 #endif
2774 if (!PyArg_ParseTuple(_args, "l",
2775 &frameDiffSampleNum))
2776 return NULL;
2777 _err = GetMediaShadowSync(_self->ob_itself,
2778 frameDiffSampleNum,
2779 &syncSampleNum);
2780 if (_err != noErr) return PyMac_Error(_err);
2781 _res = Py_BuildValue("l",
2782 syncSampleNum);
2783 return _res;
2786 static PyObject *MediaObj_GetMediaDataSize(MediaObject *_self, PyObject *_args)
2788 PyObject *_res = NULL;
2789 long _rv;
2790 TimeValue startTime;
2791 TimeValue duration;
2792 #ifndef GetMediaDataSize
2793 PyMac_PRECHECK(GetMediaDataSize);
2794 #endif
2795 if (!PyArg_ParseTuple(_args, "ll",
2796 &startTime,
2797 &duration))
2798 return NULL;
2799 _rv = GetMediaDataSize(_self->ob_itself,
2800 startTime,
2801 duration);
2802 _res = Py_BuildValue("l",
2803 _rv);
2804 return _res;
2807 static PyObject *MediaObj_GetMediaDataSize64(MediaObject *_self, PyObject *_args)
2809 PyObject *_res = NULL;
2810 OSErr _err;
2811 TimeValue startTime;
2812 TimeValue duration;
2813 wide dataSize;
2814 #ifndef GetMediaDataSize64
2815 PyMac_PRECHECK(GetMediaDataSize64);
2816 #endif
2817 if (!PyArg_ParseTuple(_args, "ll",
2818 &startTime,
2819 &duration))
2820 return NULL;
2821 _err = GetMediaDataSize64(_self->ob_itself,
2822 startTime,
2823 duration,
2824 &dataSize);
2825 if (_err != noErr) return PyMac_Error(_err);
2826 _res = Py_BuildValue("O&",
2827 PyMac_Buildwide, dataSize);
2828 return _res;
2831 static PyObject *MediaObj_GetMediaNextInterestingTime(MediaObject *_self, PyObject *_args)
2833 PyObject *_res = NULL;
2834 short interestingTimeFlags;
2835 TimeValue time;
2836 Fixed rate;
2837 TimeValue interestingTime;
2838 TimeValue interestingDuration;
2839 #ifndef GetMediaNextInterestingTime
2840 PyMac_PRECHECK(GetMediaNextInterestingTime);
2841 #endif
2842 if (!PyArg_ParseTuple(_args, "hlO&",
2843 &interestingTimeFlags,
2844 &time,
2845 PyMac_GetFixed, &rate))
2846 return NULL;
2847 GetMediaNextInterestingTime(_self->ob_itself,
2848 interestingTimeFlags,
2849 time,
2850 rate,
2851 &interestingTime,
2852 &interestingDuration);
2853 _res = Py_BuildValue("ll",
2854 interestingTime,
2855 interestingDuration);
2856 return _res;
2859 static PyObject *MediaObj_GetMediaDataRef(MediaObject *_self, PyObject *_args)
2861 PyObject *_res = NULL;
2862 OSErr _err;
2863 short index;
2864 Handle dataRef;
2865 OSType dataRefType;
2866 long dataRefAttributes;
2867 #ifndef GetMediaDataRef
2868 PyMac_PRECHECK(GetMediaDataRef);
2869 #endif
2870 if (!PyArg_ParseTuple(_args, "h",
2871 &index))
2872 return NULL;
2873 _err = GetMediaDataRef(_self->ob_itself,
2874 index,
2875 &dataRef,
2876 &dataRefType,
2877 &dataRefAttributes);
2878 if (_err != noErr) return PyMac_Error(_err);
2879 _res = Py_BuildValue("O&O&l",
2880 ResObj_New, dataRef,
2881 PyMac_BuildOSType, dataRefType,
2882 dataRefAttributes);
2883 return _res;
2886 static PyObject *MediaObj_SetMediaDataRef(MediaObject *_self, PyObject *_args)
2888 PyObject *_res = NULL;
2889 OSErr _err;
2890 short index;
2891 Handle dataRef;
2892 OSType dataRefType;
2893 #ifndef SetMediaDataRef
2894 PyMac_PRECHECK(SetMediaDataRef);
2895 #endif
2896 if (!PyArg_ParseTuple(_args, "hO&O&",
2897 &index,
2898 ResObj_Convert, &dataRef,
2899 PyMac_GetOSType, &dataRefType))
2900 return NULL;
2901 _err = SetMediaDataRef(_self->ob_itself,
2902 index,
2903 dataRef,
2904 dataRefType);
2905 if (_err != noErr) return PyMac_Error(_err);
2906 Py_INCREF(Py_None);
2907 _res = Py_None;
2908 return _res;
2911 static PyObject *MediaObj_SetMediaDataRefAttributes(MediaObject *_self, PyObject *_args)
2913 PyObject *_res = NULL;
2914 OSErr _err;
2915 short index;
2916 long dataRefAttributes;
2917 #ifndef SetMediaDataRefAttributes
2918 PyMac_PRECHECK(SetMediaDataRefAttributes);
2919 #endif
2920 if (!PyArg_ParseTuple(_args, "hl",
2921 &index,
2922 &dataRefAttributes))
2923 return NULL;
2924 _err = SetMediaDataRefAttributes(_self->ob_itself,
2925 index,
2926 dataRefAttributes);
2927 if (_err != noErr) return PyMac_Error(_err);
2928 Py_INCREF(Py_None);
2929 _res = Py_None;
2930 return _res;
2933 static PyObject *MediaObj_AddMediaDataRef(MediaObject *_self, PyObject *_args)
2935 PyObject *_res = NULL;
2936 OSErr _err;
2937 short index;
2938 Handle dataRef;
2939 OSType dataRefType;
2940 #ifndef AddMediaDataRef
2941 PyMac_PRECHECK(AddMediaDataRef);
2942 #endif
2943 if (!PyArg_ParseTuple(_args, "O&O&",
2944 ResObj_Convert, &dataRef,
2945 PyMac_GetOSType, &dataRefType))
2946 return NULL;
2947 _err = AddMediaDataRef(_self->ob_itself,
2948 &index,
2949 dataRef,
2950 dataRefType);
2951 if (_err != noErr) return PyMac_Error(_err);
2952 _res = Py_BuildValue("h",
2953 index);
2954 return _res;
2957 static PyObject *MediaObj_GetMediaDataRefCount(MediaObject *_self, PyObject *_args)
2959 PyObject *_res = NULL;
2960 OSErr _err;
2961 short count;
2962 #ifndef GetMediaDataRefCount
2963 PyMac_PRECHECK(GetMediaDataRefCount);
2964 #endif
2965 if (!PyArg_ParseTuple(_args, ""))
2966 return NULL;
2967 _err = GetMediaDataRefCount(_self->ob_itself,
2968 &count);
2969 if (_err != noErr) return PyMac_Error(_err);
2970 _res = Py_BuildValue("h",
2971 count);
2972 return _res;
2975 static PyObject *MediaObj_SetMediaPlayHints(MediaObject *_self, PyObject *_args)
2977 PyObject *_res = NULL;
2978 long flags;
2979 long flagsMask;
2980 #ifndef SetMediaPlayHints
2981 PyMac_PRECHECK(SetMediaPlayHints);
2982 #endif
2983 if (!PyArg_ParseTuple(_args, "ll",
2984 &flags,
2985 &flagsMask))
2986 return NULL;
2987 SetMediaPlayHints(_self->ob_itself,
2988 flags,
2989 flagsMask);
2990 Py_INCREF(Py_None);
2991 _res = Py_None;
2992 return _res;
2995 static PyObject *MediaObj_GetMediaPlayHints(MediaObject *_self, PyObject *_args)
2997 PyObject *_res = NULL;
2998 long flags;
2999 #ifndef GetMediaPlayHints
3000 PyMac_PRECHECK(GetMediaPlayHints);
3001 #endif
3002 if (!PyArg_ParseTuple(_args, ""))
3003 return NULL;
3004 GetMediaPlayHints(_self->ob_itself,
3005 &flags);
3006 _res = Py_BuildValue("l",
3007 flags);
3008 return _res;
3011 static PyObject *MediaObj_GetMediaNextInterestingTimeOnly(MediaObject *_self, PyObject *_args)
3013 PyObject *_res = NULL;
3014 short interestingTimeFlags;
3015 TimeValue time;
3016 Fixed rate;
3017 TimeValue interestingTime;
3018 #ifndef GetMediaNextInterestingTimeOnly
3019 PyMac_PRECHECK(GetMediaNextInterestingTimeOnly);
3020 #endif
3021 if (!PyArg_ParseTuple(_args, "hlO&",
3022 &interestingTimeFlags,
3023 &time,
3024 PyMac_GetFixed, &rate))
3025 return NULL;
3026 GetMediaNextInterestingTimeOnly(_self->ob_itself,
3027 interestingTimeFlags,
3028 time,
3029 rate,
3030 &interestingTime);
3031 _res = Py_BuildValue("l",
3032 interestingTime);
3033 return _res;
3036 static PyMethodDef MediaObj_methods[] = {
3037 {"LoadMediaIntoRam", (PyCFunction)MediaObj_LoadMediaIntoRam, 1,
3038 PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
3039 {"GetMediaTrack", (PyCFunction)MediaObj_GetMediaTrack, 1,
3040 PyDoc_STR("() -> (Track _rv)")},
3041 {"GetMediaCreationTime", (PyCFunction)MediaObj_GetMediaCreationTime, 1,
3042 PyDoc_STR("() -> (unsigned long _rv)")},
3043 {"GetMediaModificationTime", (PyCFunction)MediaObj_GetMediaModificationTime, 1,
3044 PyDoc_STR("() -> (unsigned long _rv)")},
3045 {"GetMediaTimeScale", (PyCFunction)MediaObj_GetMediaTimeScale, 1,
3046 PyDoc_STR("() -> (TimeScale _rv)")},
3047 {"SetMediaTimeScale", (PyCFunction)MediaObj_SetMediaTimeScale, 1,
3048 PyDoc_STR("(TimeScale timeScale) -> None")},
3049 {"GetMediaDuration", (PyCFunction)MediaObj_GetMediaDuration, 1,
3050 PyDoc_STR("() -> (TimeValue _rv)")},
3051 {"GetMediaLanguage", (PyCFunction)MediaObj_GetMediaLanguage, 1,
3052 PyDoc_STR("() -> (short _rv)")},
3053 {"SetMediaLanguage", (PyCFunction)MediaObj_SetMediaLanguage, 1,
3054 PyDoc_STR("(short language) -> None")},
3055 {"GetMediaQuality", (PyCFunction)MediaObj_GetMediaQuality, 1,
3056 PyDoc_STR("() -> (short _rv)")},
3057 {"SetMediaQuality", (PyCFunction)MediaObj_SetMediaQuality, 1,
3058 PyDoc_STR("(short quality) -> None")},
3059 {"GetMediaHandlerDescription", (PyCFunction)MediaObj_GetMediaHandlerDescription, 1,
3060 PyDoc_STR("(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)")},
3061 {"GetMediaUserData", (PyCFunction)MediaObj_GetMediaUserData, 1,
3062 PyDoc_STR("() -> (UserData _rv)")},
3063 {"GetMediaHandler", (PyCFunction)MediaObj_GetMediaHandler, 1,
3064 PyDoc_STR("() -> (MediaHandler _rv)")},
3065 {"SetMediaHandler", (PyCFunction)MediaObj_SetMediaHandler, 1,
3066 PyDoc_STR("(MediaHandlerComponent mH) -> None")},
3067 {"BeginMediaEdits", (PyCFunction)MediaObj_BeginMediaEdits, 1,
3068 PyDoc_STR("() -> None")},
3069 {"EndMediaEdits", (PyCFunction)MediaObj_EndMediaEdits, 1,
3070 PyDoc_STR("() -> None")},
3071 {"SetMediaDefaultDataRefIndex", (PyCFunction)MediaObj_SetMediaDefaultDataRefIndex, 1,
3072 PyDoc_STR("(short index) -> None")},
3073 {"GetMediaDataHandlerDescription", (PyCFunction)MediaObj_GetMediaDataHandlerDescription, 1,
3074 PyDoc_STR("(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)")},
3075 {"GetMediaDataHandler", (PyCFunction)MediaObj_GetMediaDataHandler, 1,
3076 PyDoc_STR("(short index) -> (DataHandler _rv)")},
3077 {"SetMediaDataHandler", (PyCFunction)MediaObj_SetMediaDataHandler, 1,
3078 PyDoc_STR("(short index, DataHandlerComponent dataHandler) -> None")},
3079 {"GetMediaSampleDescriptionCount", (PyCFunction)MediaObj_GetMediaSampleDescriptionCount, 1,
3080 PyDoc_STR("() -> (long _rv)")},
3081 {"GetMediaSampleDescription", (PyCFunction)MediaObj_GetMediaSampleDescription, 1,
3082 PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
3083 {"SetMediaSampleDescription", (PyCFunction)MediaObj_SetMediaSampleDescription, 1,
3084 PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
3085 {"GetMediaSampleCount", (PyCFunction)MediaObj_GetMediaSampleCount, 1,
3086 PyDoc_STR("() -> (long _rv)")},
3087 {"GetMediaSyncSampleCount", (PyCFunction)MediaObj_GetMediaSyncSampleCount, 1,
3088 PyDoc_STR("() -> (long _rv)")},
3089 {"SampleNumToMediaTime", (PyCFunction)MediaObj_SampleNumToMediaTime, 1,
3090 PyDoc_STR("(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)")},
3091 {"MediaTimeToSampleNum", (PyCFunction)MediaObj_MediaTimeToSampleNum, 1,
3092 PyDoc_STR("(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)")},
3093 {"AddMediaSample", (PyCFunction)MediaObj_AddMediaSample, 1,
3094 PyDoc_STR("(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
3095 {"AddMediaSampleReference", (PyCFunction)MediaObj_AddMediaSampleReference, 1,
3096 PyDoc_STR("(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
3097 {"GetMediaSample", (PyCFunction)MediaObj_GetMediaSample, 1,
3098 PyDoc_STR("(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
3099 {"GetMediaSampleReference", (PyCFunction)MediaObj_GetMediaSampleReference, 1,
3100 PyDoc_STR("(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
3101 {"SetMediaPreferredChunkSize", (PyCFunction)MediaObj_SetMediaPreferredChunkSize, 1,
3102 PyDoc_STR("(long maxChunkSize) -> None")},
3103 {"GetMediaPreferredChunkSize", (PyCFunction)MediaObj_GetMediaPreferredChunkSize, 1,
3104 PyDoc_STR("() -> (long maxChunkSize)")},
3105 {"SetMediaShadowSync", (PyCFunction)MediaObj_SetMediaShadowSync, 1,
3106 PyDoc_STR("(long frameDiffSampleNum, long syncSampleNum) -> None")},
3107 {"GetMediaShadowSync", (PyCFunction)MediaObj_GetMediaShadowSync, 1,
3108 PyDoc_STR("(long frameDiffSampleNum) -> (long syncSampleNum)")},
3109 {"GetMediaDataSize", (PyCFunction)MediaObj_GetMediaDataSize, 1,
3110 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
3111 {"GetMediaDataSize64", (PyCFunction)MediaObj_GetMediaDataSize64, 1,
3112 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
3113 {"GetMediaNextInterestingTime", (PyCFunction)MediaObj_GetMediaNextInterestingTime, 1,
3114 PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
3115 {"GetMediaDataRef", (PyCFunction)MediaObj_GetMediaDataRef, 1,
3116 PyDoc_STR("(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)")},
3117 {"SetMediaDataRef", (PyCFunction)MediaObj_SetMediaDataRef, 1,
3118 PyDoc_STR("(short index, Handle dataRef, OSType dataRefType) -> None")},
3119 {"SetMediaDataRefAttributes", (PyCFunction)MediaObj_SetMediaDataRefAttributes, 1,
3120 PyDoc_STR("(short index, long dataRefAttributes) -> None")},
3121 {"AddMediaDataRef", (PyCFunction)MediaObj_AddMediaDataRef, 1,
3122 PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (short index)")},
3123 {"GetMediaDataRefCount", (PyCFunction)MediaObj_GetMediaDataRefCount, 1,
3124 PyDoc_STR("() -> (short count)")},
3125 {"SetMediaPlayHints", (PyCFunction)MediaObj_SetMediaPlayHints, 1,
3126 PyDoc_STR("(long flags, long flagsMask) -> None")},
3127 {"GetMediaPlayHints", (PyCFunction)MediaObj_GetMediaPlayHints, 1,
3128 PyDoc_STR("() -> (long flags)")},
3129 {"GetMediaNextInterestingTimeOnly", (PyCFunction)MediaObj_GetMediaNextInterestingTimeOnly, 1,
3130 PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime)")},
3131 {NULL, NULL, 0}
3134 #define MediaObj_getsetlist NULL
3137 #define MediaObj_compare NULL
3139 #define MediaObj_repr NULL
3141 #define MediaObj_hash NULL
3142 #define MediaObj_tp_init 0
3144 #define MediaObj_tp_alloc PyType_GenericAlloc
3146 static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
3148 PyObject *self;
3149 Media itself;
3150 char *kw[] = {"itself", 0};
3152 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MediaObj_Convert, &itself)) return NULL;
3153 if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
3154 ((MediaObject *)self)->ob_itself = itself;
3155 return self;
3158 #define MediaObj_tp_free PyObject_Del
3161 PyTypeObject Media_Type = {
3162 PyObject_HEAD_INIT(NULL)
3163 0, /*ob_size*/
3164 "_Qt.Media", /*tp_name*/
3165 sizeof(MediaObject), /*tp_basicsize*/
3166 0, /*tp_itemsize*/
3167 /* methods */
3168 (destructor) MediaObj_dealloc, /*tp_dealloc*/
3169 0, /*tp_print*/
3170 (getattrfunc)0, /*tp_getattr*/
3171 (setattrfunc)0, /*tp_setattr*/
3172 (cmpfunc) MediaObj_compare, /*tp_compare*/
3173 (reprfunc) MediaObj_repr, /*tp_repr*/
3174 (PyNumberMethods *)0, /* tp_as_number */
3175 (PySequenceMethods *)0, /* tp_as_sequence */
3176 (PyMappingMethods *)0, /* tp_as_mapping */
3177 (hashfunc) MediaObj_hash, /*tp_hash*/
3178 0, /*tp_call*/
3179 0, /*tp_str*/
3180 PyObject_GenericGetAttr, /*tp_getattro*/
3181 PyObject_GenericSetAttr, /*tp_setattro */
3182 0, /*tp_as_buffer*/
3183 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
3184 0, /*tp_doc*/
3185 0, /*tp_traverse*/
3186 0, /*tp_clear*/
3187 0, /*tp_richcompare*/
3188 0, /*tp_weaklistoffset*/
3189 0, /*tp_iter*/
3190 0, /*tp_iternext*/
3191 MediaObj_methods, /* tp_methods */
3192 0, /*tp_members*/
3193 MediaObj_getsetlist, /*tp_getset*/
3194 0, /*tp_base*/
3195 0, /*tp_dict*/
3196 0, /*tp_descr_get*/
3197 0, /*tp_descr_set*/
3198 0, /*tp_dictoffset*/
3199 MediaObj_tp_init, /* tp_init */
3200 MediaObj_tp_alloc, /* tp_alloc */
3201 MediaObj_tp_new, /* tp_new */
3202 MediaObj_tp_free, /* tp_free */
3205 /* --------------------- End object type Media ---------------------- */
3208 /* ----------------------- Object type Track ------------------------ */
3210 PyTypeObject Track_Type;
3212 #define TrackObj_Check(x) ((x)->ob_type == &Track_Type || PyObject_TypeCheck((x), &Track_Type))
3214 typedef struct TrackObject {
3215 PyObject_HEAD
3216 Track ob_itself;
3217 } TrackObject;
3219 PyObject *TrackObj_New(Track itself)
3221 TrackObject *it;
3222 if (itself == NULL) {
3223 PyErr_SetString(Qt_Error,"Cannot create null Track");
3224 return NULL;
3226 it = PyObject_NEW(TrackObject, &Track_Type);
3227 if (it == NULL) return NULL;
3228 it->ob_itself = itself;
3229 return (PyObject *)it;
3231 int TrackObj_Convert(PyObject *v, Track *p_itself)
3233 if (!TrackObj_Check(v))
3235 PyErr_SetString(PyExc_TypeError, "Track required");
3236 return 0;
3238 *p_itself = ((TrackObject *)v)->ob_itself;
3239 return 1;
3242 static void TrackObj_dealloc(TrackObject *self)
3244 DisposeMovieTrack(self->ob_itself);
3245 self->ob_type->tp_free((PyObject *)self);
3248 static PyObject *TrackObj_LoadTrackIntoRam(TrackObject *_self, PyObject *_args)
3250 PyObject *_res = NULL;
3251 OSErr _err;
3252 TimeValue time;
3253 TimeValue duration;
3254 long flags;
3255 #ifndef LoadTrackIntoRam
3256 PyMac_PRECHECK(LoadTrackIntoRam);
3257 #endif
3258 if (!PyArg_ParseTuple(_args, "lll",
3259 &time,
3260 &duration,
3261 &flags))
3262 return NULL;
3263 _err = LoadTrackIntoRam(_self->ob_itself,
3264 time,
3265 duration,
3266 flags);
3267 if (_err != noErr) return PyMac_Error(_err);
3268 Py_INCREF(Py_None);
3269 _res = Py_None;
3270 return _res;
3273 static PyObject *TrackObj_GetTrackPict(TrackObject *_self, PyObject *_args)
3275 PyObject *_res = NULL;
3276 PicHandle _rv;
3277 TimeValue time;
3278 #ifndef GetTrackPict
3279 PyMac_PRECHECK(GetTrackPict);
3280 #endif
3281 if (!PyArg_ParseTuple(_args, "l",
3282 &time))
3283 return NULL;
3284 _rv = GetTrackPict(_self->ob_itself,
3285 time);
3286 _res = Py_BuildValue("O&",
3287 ResObj_New, _rv);
3288 return _res;
3291 static PyObject *TrackObj_GetTrackClipRgn(TrackObject *_self, PyObject *_args)
3293 PyObject *_res = NULL;
3294 RgnHandle _rv;
3295 #ifndef GetTrackClipRgn
3296 PyMac_PRECHECK(GetTrackClipRgn);
3297 #endif
3298 if (!PyArg_ParseTuple(_args, ""))
3299 return NULL;
3300 _rv = GetTrackClipRgn(_self->ob_itself);
3301 _res = Py_BuildValue("O&",
3302 ResObj_New, _rv);
3303 return _res;
3306 static PyObject *TrackObj_SetTrackClipRgn(TrackObject *_self, PyObject *_args)
3308 PyObject *_res = NULL;
3309 RgnHandle theClip;
3310 #ifndef SetTrackClipRgn
3311 PyMac_PRECHECK(SetTrackClipRgn);
3312 #endif
3313 if (!PyArg_ParseTuple(_args, "O&",
3314 ResObj_Convert, &theClip))
3315 return NULL;
3316 SetTrackClipRgn(_self->ob_itself,
3317 theClip);
3318 Py_INCREF(Py_None);
3319 _res = Py_None;
3320 return _res;
3323 static PyObject *TrackObj_GetTrackDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
3325 PyObject *_res = NULL;
3326 RgnHandle _rv;
3327 #ifndef GetTrackDisplayBoundsRgn
3328 PyMac_PRECHECK(GetTrackDisplayBoundsRgn);
3329 #endif
3330 if (!PyArg_ParseTuple(_args, ""))
3331 return NULL;
3332 _rv = GetTrackDisplayBoundsRgn(_self->ob_itself);
3333 _res = Py_BuildValue("O&",
3334 ResObj_New, _rv);
3335 return _res;
3338 static PyObject *TrackObj_GetTrackMovieBoundsRgn(TrackObject *_self, PyObject *_args)
3340 PyObject *_res = NULL;
3341 RgnHandle _rv;
3342 #ifndef GetTrackMovieBoundsRgn
3343 PyMac_PRECHECK(GetTrackMovieBoundsRgn);
3344 #endif
3345 if (!PyArg_ParseTuple(_args, ""))
3346 return NULL;
3347 _rv = GetTrackMovieBoundsRgn(_self->ob_itself);
3348 _res = Py_BuildValue("O&",
3349 ResObj_New, _rv);
3350 return _res;
3353 static PyObject *TrackObj_GetTrackBoundsRgn(TrackObject *_self, PyObject *_args)
3355 PyObject *_res = NULL;
3356 RgnHandle _rv;
3357 #ifndef GetTrackBoundsRgn
3358 PyMac_PRECHECK(GetTrackBoundsRgn);
3359 #endif
3360 if (!PyArg_ParseTuple(_args, ""))
3361 return NULL;
3362 _rv = GetTrackBoundsRgn(_self->ob_itself);
3363 _res = Py_BuildValue("O&",
3364 ResObj_New, _rv);
3365 return _res;
3368 static PyObject *TrackObj_GetTrackMatte(TrackObject *_self, PyObject *_args)
3370 PyObject *_res = NULL;
3371 PixMapHandle _rv;
3372 #ifndef GetTrackMatte
3373 PyMac_PRECHECK(GetTrackMatte);
3374 #endif
3375 if (!PyArg_ParseTuple(_args, ""))
3376 return NULL;
3377 _rv = GetTrackMatte(_self->ob_itself);
3378 _res = Py_BuildValue("O&",
3379 ResObj_New, _rv);
3380 return _res;
3383 static PyObject *TrackObj_SetTrackMatte(TrackObject *_self, PyObject *_args)
3385 PyObject *_res = NULL;
3386 PixMapHandle theMatte;
3387 #ifndef SetTrackMatte
3388 PyMac_PRECHECK(SetTrackMatte);
3389 #endif
3390 if (!PyArg_ParseTuple(_args, "O&",
3391 ResObj_Convert, &theMatte))
3392 return NULL;
3393 SetTrackMatte(_self->ob_itself,
3394 theMatte);
3395 Py_INCREF(Py_None);
3396 _res = Py_None;
3397 return _res;
3400 static PyObject *TrackObj_GetTrackID(TrackObject *_self, PyObject *_args)
3402 PyObject *_res = NULL;
3403 long _rv;
3404 #ifndef GetTrackID
3405 PyMac_PRECHECK(GetTrackID);
3406 #endif
3407 if (!PyArg_ParseTuple(_args, ""))
3408 return NULL;
3409 _rv = GetTrackID(_self->ob_itself);
3410 _res = Py_BuildValue("l",
3411 _rv);
3412 return _res;
3415 static PyObject *TrackObj_GetTrackMovie(TrackObject *_self, PyObject *_args)
3417 PyObject *_res = NULL;
3418 Movie _rv;
3419 #ifndef GetTrackMovie
3420 PyMac_PRECHECK(GetTrackMovie);
3421 #endif
3422 if (!PyArg_ParseTuple(_args, ""))
3423 return NULL;
3424 _rv = GetTrackMovie(_self->ob_itself);
3425 _res = Py_BuildValue("O&",
3426 MovieObj_New, _rv);
3427 return _res;
3430 static PyObject *TrackObj_GetTrackCreationTime(TrackObject *_self, PyObject *_args)
3432 PyObject *_res = NULL;
3433 unsigned long _rv;
3434 #ifndef GetTrackCreationTime
3435 PyMac_PRECHECK(GetTrackCreationTime);
3436 #endif
3437 if (!PyArg_ParseTuple(_args, ""))
3438 return NULL;
3439 _rv = GetTrackCreationTime(_self->ob_itself);
3440 _res = Py_BuildValue("l",
3441 _rv);
3442 return _res;
3445 static PyObject *TrackObj_GetTrackModificationTime(TrackObject *_self, PyObject *_args)
3447 PyObject *_res = NULL;
3448 unsigned long _rv;
3449 #ifndef GetTrackModificationTime
3450 PyMac_PRECHECK(GetTrackModificationTime);
3451 #endif
3452 if (!PyArg_ParseTuple(_args, ""))
3453 return NULL;
3454 _rv = GetTrackModificationTime(_self->ob_itself);
3455 _res = Py_BuildValue("l",
3456 _rv);
3457 return _res;
3460 static PyObject *TrackObj_GetTrackEnabled(TrackObject *_self, PyObject *_args)
3462 PyObject *_res = NULL;
3463 Boolean _rv;
3464 #ifndef GetTrackEnabled
3465 PyMac_PRECHECK(GetTrackEnabled);
3466 #endif
3467 if (!PyArg_ParseTuple(_args, ""))
3468 return NULL;
3469 _rv = GetTrackEnabled(_self->ob_itself);
3470 _res = Py_BuildValue("b",
3471 _rv);
3472 return _res;
3475 static PyObject *TrackObj_SetTrackEnabled(TrackObject *_self, PyObject *_args)
3477 PyObject *_res = NULL;
3478 Boolean isEnabled;
3479 #ifndef SetTrackEnabled
3480 PyMac_PRECHECK(SetTrackEnabled);
3481 #endif
3482 if (!PyArg_ParseTuple(_args, "b",
3483 &isEnabled))
3484 return NULL;
3485 SetTrackEnabled(_self->ob_itself,
3486 isEnabled);
3487 Py_INCREF(Py_None);
3488 _res = Py_None;
3489 return _res;
3492 static PyObject *TrackObj_GetTrackUsage(TrackObject *_self, PyObject *_args)
3494 PyObject *_res = NULL;
3495 long _rv;
3496 #ifndef GetTrackUsage
3497 PyMac_PRECHECK(GetTrackUsage);
3498 #endif
3499 if (!PyArg_ParseTuple(_args, ""))
3500 return NULL;
3501 _rv = GetTrackUsage(_self->ob_itself);
3502 _res = Py_BuildValue("l",
3503 _rv);
3504 return _res;
3507 static PyObject *TrackObj_SetTrackUsage(TrackObject *_self, PyObject *_args)
3509 PyObject *_res = NULL;
3510 long usage;
3511 #ifndef SetTrackUsage
3512 PyMac_PRECHECK(SetTrackUsage);
3513 #endif
3514 if (!PyArg_ParseTuple(_args, "l",
3515 &usage))
3516 return NULL;
3517 SetTrackUsage(_self->ob_itself,
3518 usage);
3519 Py_INCREF(Py_None);
3520 _res = Py_None;
3521 return _res;
3524 static PyObject *TrackObj_GetTrackDuration(TrackObject *_self, PyObject *_args)
3526 PyObject *_res = NULL;
3527 TimeValue _rv;
3528 #ifndef GetTrackDuration
3529 PyMac_PRECHECK(GetTrackDuration);
3530 #endif
3531 if (!PyArg_ParseTuple(_args, ""))
3532 return NULL;
3533 _rv = GetTrackDuration(_self->ob_itself);
3534 _res = Py_BuildValue("l",
3535 _rv);
3536 return _res;
3539 static PyObject *TrackObj_GetTrackOffset(TrackObject *_self, PyObject *_args)
3541 PyObject *_res = NULL;
3542 TimeValue _rv;
3543 #ifndef GetTrackOffset
3544 PyMac_PRECHECK(GetTrackOffset);
3545 #endif
3546 if (!PyArg_ParseTuple(_args, ""))
3547 return NULL;
3548 _rv = GetTrackOffset(_self->ob_itself);
3549 _res = Py_BuildValue("l",
3550 _rv);
3551 return _res;
3554 static PyObject *TrackObj_SetTrackOffset(TrackObject *_self, PyObject *_args)
3556 PyObject *_res = NULL;
3557 TimeValue movieOffsetTime;
3558 #ifndef SetTrackOffset
3559 PyMac_PRECHECK(SetTrackOffset);
3560 #endif
3561 if (!PyArg_ParseTuple(_args, "l",
3562 &movieOffsetTime))
3563 return NULL;
3564 SetTrackOffset(_self->ob_itself,
3565 movieOffsetTime);
3566 Py_INCREF(Py_None);
3567 _res = Py_None;
3568 return _res;
3571 static PyObject *TrackObj_GetTrackLayer(TrackObject *_self, PyObject *_args)
3573 PyObject *_res = NULL;
3574 short _rv;
3575 #ifndef GetTrackLayer
3576 PyMac_PRECHECK(GetTrackLayer);
3577 #endif
3578 if (!PyArg_ParseTuple(_args, ""))
3579 return NULL;
3580 _rv = GetTrackLayer(_self->ob_itself);
3581 _res = Py_BuildValue("h",
3582 _rv);
3583 return _res;
3586 static PyObject *TrackObj_SetTrackLayer(TrackObject *_self, PyObject *_args)
3588 PyObject *_res = NULL;
3589 short layer;
3590 #ifndef SetTrackLayer
3591 PyMac_PRECHECK(SetTrackLayer);
3592 #endif
3593 if (!PyArg_ParseTuple(_args, "h",
3594 &layer))
3595 return NULL;
3596 SetTrackLayer(_self->ob_itself,
3597 layer);
3598 Py_INCREF(Py_None);
3599 _res = Py_None;
3600 return _res;
3603 static PyObject *TrackObj_GetTrackAlternate(TrackObject *_self, PyObject *_args)
3605 PyObject *_res = NULL;
3606 Track _rv;
3607 #ifndef GetTrackAlternate
3608 PyMac_PRECHECK(GetTrackAlternate);
3609 #endif
3610 if (!PyArg_ParseTuple(_args, ""))
3611 return NULL;
3612 _rv = GetTrackAlternate(_self->ob_itself);
3613 _res = Py_BuildValue("O&",
3614 TrackObj_New, _rv);
3615 return _res;
3618 static PyObject *TrackObj_SetTrackAlternate(TrackObject *_self, PyObject *_args)
3620 PyObject *_res = NULL;
3621 Track alternateT;
3622 #ifndef SetTrackAlternate
3623 PyMac_PRECHECK(SetTrackAlternate);
3624 #endif
3625 if (!PyArg_ParseTuple(_args, "O&",
3626 TrackObj_Convert, &alternateT))
3627 return NULL;
3628 SetTrackAlternate(_self->ob_itself,
3629 alternateT);
3630 Py_INCREF(Py_None);
3631 _res = Py_None;
3632 return _res;
3635 static PyObject *TrackObj_GetTrackVolume(TrackObject *_self, PyObject *_args)
3637 PyObject *_res = NULL;
3638 short _rv;
3639 #ifndef GetTrackVolume
3640 PyMac_PRECHECK(GetTrackVolume);
3641 #endif
3642 if (!PyArg_ParseTuple(_args, ""))
3643 return NULL;
3644 _rv = GetTrackVolume(_self->ob_itself);
3645 _res = Py_BuildValue("h",
3646 _rv);
3647 return _res;
3650 static PyObject *TrackObj_SetTrackVolume(TrackObject *_self, PyObject *_args)
3652 PyObject *_res = NULL;
3653 short volume;
3654 #ifndef SetTrackVolume
3655 PyMac_PRECHECK(SetTrackVolume);
3656 #endif
3657 if (!PyArg_ParseTuple(_args, "h",
3658 &volume))
3659 return NULL;
3660 SetTrackVolume(_self->ob_itself,
3661 volume);
3662 Py_INCREF(Py_None);
3663 _res = Py_None;
3664 return _res;
3667 static PyObject *TrackObj_GetTrackDimensions(TrackObject *_self, PyObject *_args)
3669 PyObject *_res = NULL;
3670 Fixed width;
3671 Fixed height;
3672 #ifndef GetTrackDimensions
3673 PyMac_PRECHECK(GetTrackDimensions);
3674 #endif
3675 if (!PyArg_ParseTuple(_args, ""))
3676 return NULL;
3677 GetTrackDimensions(_self->ob_itself,
3678 &width,
3679 &height);
3680 _res = Py_BuildValue("O&O&",
3681 PyMac_BuildFixed, width,
3682 PyMac_BuildFixed, height);
3683 return _res;
3686 static PyObject *TrackObj_SetTrackDimensions(TrackObject *_self, PyObject *_args)
3688 PyObject *_res = NULL;
3689 Fixed width;
3690 Fixed height;
3691 #ifndef SetTrackDimensions
3692 PyMac_PRECHECK(SetTrackDimensions);
3693 #endif
3694 if (!PyArg_ParseTuple(_args, "O&O&",
3695 PyMac_GetFixed, &width,
3696 PyMac_GetFixed, &height))
3697 return NULL;
3698 SetTrackDimensions(_self->ob_itself,
3699 width,
3700 height);
3701 Py_INCREF(Py_None);
3702 _res = Py_None;
3703 return _res;
3706 static PyObject *TrackObj_GetTrackUserData(TrackObject *_self, PyObject *_args)
3708 PyObject *_res = NULL;
3709 UserData _rv;
3710 #ifndef GetTrackUserData
3711 PyMac_PRECHECK(GetTrackUserData);
3712 #endif
3713 if (!PyArg_ParseTuple(_args, ""))
3714 return NULL;
3715 _rv = GetTrackUserData(_self->ob_itself);
3716 _res = Py_BuildValue("O&",
3717 UserDataObj_New, _rv);
3718 return _res;
3721 static PyObject *TrackObj_GetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
3723 PyObject *_res = NULL;
3724 OSErr _err;
3725 Handle settings;
3726 #ifndef GetTrackSoundLocalizationSettings
3727 PyMac_PRECHECK(GetTrackSoundLocalizationSettings);
3728 #endif
3729 if (!PyArg_ParseTuple(_args, ""))
3730 return NULL;
3731 _err = GetTrackSoundLocalizationSettings(_self->ob_itself,
3732 &settings);
3733 if (_err != noErr) return PyMac_Error(_err);
3734 _res = Py_BuildValue("O&",
3735 ResObj_New, settings);
3736 return _res;
3739 static PyObject *TrackObj_SetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
3741 PyObject *_res = NULL;
3742 OSErr _err;
3743 Handle settings;
3744 #ifndef SetTrackSoundLocalizationSettings
3745 PyMac_PRECHECK(SetTrackSoundLocalizationSettings);
3746 #endif
3747 if (!PyArg_ParseTuple(_args, "O&",
3748 ResObj_Convert, &settings))
3749 return NULL;
3750 _err = SetTrackSoundLocalizationSettings(_self->ob_itself,
3751 settings);
3752 if (_err != noErr) return PyMac_Error(_err);
3753 Py_INCREF(Py_None);
3754 _res = Py_None;
3755 return _res;
3758 static PyObject *TrackObj_NewTrackMedia(TrackObject *_self, PyObject *_args)
3760 PyObject *_res = NULL;
3761 Media _rv;
3762 OSType mediaType;
3763 TimeScale timeScale;
3764 Handle dataRef;
3765 OSType dataRefType;
3766 #ifndef NewTrackMedia
3767 PyMac_PRECHECK(NewTrackMedia);
3768 #endif
3769 if (!PyArg_ParseTuple(_args, "O&lO&O&",
3770 PyMac_GetOSType, &mediaType,
3771 &timeScale,
3772 ResObj_Convert, &dataRef,
3773 PyMac_GetOSType, &dataRefType))
3774 return NULL;
3775 _rv = NewTrackMedia(_self->ob_itself,
3776 mediaType,
3777 timeScale,
3778 dataRef,
3779 dataRefType);
3780 _res = Py_BuildValue("O&",
3781 MediaObj_New, _rv);
3782 return _res;
3785 static PyObject *TrackObj_GetTrackMedia(TrackObject *_self, PyObject *_args)
3787 PyObject *_res = NULL;
3788 Media _rv;
3789 #ifndef GetTrackMedia
3790 PyMac_PRECHECK(GetTrackMedia);
3791 #endif
3792 if (!PyArg_ParseTuple(_args, ""))
3793 return NULL;
3794 _rv = GetTrackMedia(_self->ob_itself);
3795 _res = Py_BuildValue("O&",
3796 MediaObj_New, _rv);
3797 return _res;
3800 static PyObject *TrackObj_InsertMediaIntoTrack(TrackObject *_self, PyObject *_args)
3802 PyObject *_res = NULL;
3803 OSErr _err;
3804 TimeValue trackStart;
3805 TimeValue mediaTime;
3806 TimeValue mediaDuration;
3807 Fixed mediaRate;
3808 #ifndef InsertMediaIntoTrack
3809 PyMac_PRECHECK(InsertMediaIntoTrack);
3810 #endif
3811 if (!PyArg_ParseTuple(_args, "lllO&",
3812 &trackStart,
3813 &mediaTime,
3814 &mediaDuration,
3815 PyMac_GetFixed, &mediaRate))
3816 return NULL;
3817 _err = InsertMediaIntoTrack(_self->ob_itself,
3818 trackStart,
3819 mediaTime,
3820 mediaDuration,
3821 mediaRate);
3822 if (_err != noErr) return PyMac_Error(_err);
3823 Py_INCREF(Py_None);
3824 _res = Py_None;
3825 return _res;
3828 static PyObject *TrackObj_InsertTrackSegment(TrackObject *_self, PyObject *_args)
3830 PyObject *_res = NULL;
3831 OSErr _err;
3832 Track dstTrack;
3833 TimeValue srcIn;
3834 TimeValue srcDuration;
3835 TimeValue dstIn;
3836 #ifndef InsertTrackSegment
3837 PyMac_PRECHECK(InsertTrackSegment);
3838 #endif
3839 if (!PyArg_ParseTuple(_args, "O&lll",
3840 TrackObj_Convert, &dstTrack,
3841 &srcIn,
3842 &srcDuration,
3843 &dstIn))
3844 return NULL;
3845 _err = InsertTrackSegment(_self->ob_itself,
3846 dstTrack,
3847 srcIn,
3848 srcDuration,
3849 dstIn);
3850 if (_err != noErr) return PyMac_Error(_err);
3851 Py_INCREF(Py_None);
3852 _res = Py_None;
3853 return _res;
3856 static PyObject *TrackObj_InsertEmptyTrackSegment(TrackObject *_self, PyObject *_args)
3858 PyObject *_res = NULL;
3859 OSErr _err;
3860 TimeValue dstIn;
3861 TimeValue dstDuration;
3862 #ifndef InsertEmptyTrackSegment
3863 PyMac_PRECHECK(InsertEmptyTrackSegment);
3864 #endif
3865 if (!PyArg_ParseTuple(_args, "ll",
3866 &dstIn,
3867 &dstDuration))
3868 return NULL;
3869 _err = InsertEmptyTrackSegment(_self->ob_itself,
3870 dstIn,
3871 dstDuration);
3872 if (_err != noErr) return PyMac_Error(_err);
3873 Py_INCREF(Py_None);
3874 _res = Py_None;
3875 return _res;
3878 static PyObject *TrackObj_DeleteTrackSegment(TrackObject *_self, PyObject *_args)
3880 PyObject *_res = NULL;
3881 OSErr _err;
3882 TimeValue startTime;
3883 TimeValue duration;
3884 #ifndef DeleteTrackSegment
3885 PyMac_PRECHECK(DeleteTrackSegment);
3886 #endif
3887 if (!PyArg_ParseTuple(_args, "ll",
3888 &startTime,
3889 &duration))
3890 return NULL;
3891 _err = DeleteTrackSegment(_self->ob_itself,
3892 startTime,
3893 duration);
3894 if (_err != noErr) return PyMac_Error(_err);
3895 Py_INCREF(Py_None);
3896 _res = Py_None;
3897 return _res;
3900 static PyObject *TrackObj_ScaleTrackSegment(TrackObject *_self, PyObject *_args)
3902 PyObject *_res = NULL;
3903 OSErr _err;
3904 TimeValue startTime;
3905 TimeValue oldDuration;
3906 TimeValue newDuration;
3907 #ifndef ScaleTrackSegment
3908 PyMac_PRECHECK(ScaleTrackSegment);
3909 #endif
3910 if (!PyArg_ParseTuple(_args, "lll",
3911 &startTime,
3912 &oldDuration,
3913 &newDuration))
3914 return NULL;
3915 _err = ScaleTrackSegment(_self->ob_itself,
3916 startTime,
3917 oldDuration,
3918 newDuration);
3919 if (_err != noErr) return PyMac_Error(_err);
3920 Py_INCREF(Py_None);
3921 _res = Py_None;
3922 return _res;
3925 static PyObject *TrackObj_IsScrapMovie(TrackObject *_self, PyObject *_args)
3927 PyObject *_res = NULL;
3928 Component _rv;
3929 #ifndef IsScrapMovie
3930 PyMac_PRECHECK(IsScrapMovie);
3931 #endif
3932 if (!PyArg_ParseTuple(_args, ""))
3933 return NULL;
3934 _rv = IsScrapMovie(_self->ob_itself);
3935 _res = Py_BuildValue("O&",
3936 CmpObj_New, _rv);
3937 return _res;
3940 static PyObject *TrackObj_CopyTrackSettings(TrackObject *_self, PyObject *_args)
3942 PyObject *_res = NULL;
3943 OSErr _err;
3944 Track dstTrack;
3945 #ifndef CopyTrackSettings
3946 PyMac_PRECHECK(CopyTrackSettings);
3947 #endif
3948 if (!PyArg_ParseTuple(_args, "O&",
3949 TrackObj_Convert, &dstTrack))
3950 return NULL;
3951 _err = CopyTrackSettings(_self->ob_itself,
3952 dstTrack);
3953 if (_err != noErr) return PyMac_Error(_err);
3954 Py_INCREF(Py_None);
3955 _res = Py_None;
3956 return _res;
3959 static PyObject *TrackObj_AddEmptyTrackToMovie(TrackObject *_self, PyObject *_args)
3961 PyObject *_res = NULL;
3962 OSErr _err;
3963 Movie dstMovie;
3964 Handle dataRef;
3965 OSType dataRefType;
3966 Track dstTrack;
3967 #ifndef AddEmptyTrackToMovie
3968 PyMac_PRECHECK(AddEmptyTrackToMovie);
3969 #endif
3970 if (!PyArg_ParseTuple(_args, "O&O&O&",
3971 MovieObj_Convert, &dstMovie,
3972 ResObj_Convert, &dataRef,
3973 PyMac_GetOSType, &dataRefType))
3974 return NULL;
3975 _err = AddEmptyTrackToMovie(_self->ob_itself,
3976 dstMovie,
3977 dataRef,
3978 dataRefType,
3979 &dstTrack);
3980 if (_err != noErr) return PyMac_Error(_err);
3981 _res = Py_BuildValue("O&",
3982 TrackObj_New, dstTrack);
3983 return _res;
3986 static PyObject *TrackObj_AddClonedTrackToMovie(TrackObject *_self, PyObject *_args)
3988 PyObject *_res = NULL;
3989 OSErr _err;
3990 Movie dstMovie;
3991 long flags;
3992 Track dstTrack;
3993 #ifndef AddClonedTrackToMovie
3994 PyMac_PRECHECK(AddClonedTrackToMovie);
3995 #endif
3996 if (!PyArg_ParseTuple(_args, "O&l",
3997 MovieObj_Convert, &dstMovie,
3998 &flags))
3999 return NULL;
4000 _err = AddClonedTrackToMovie(_self->ob_itself,
4001 dstMovie,
4002 flags,
4003 &dstTrack);
4004 if (_err != noErr) return PyMac_Error(_err);
4005 _res = Py_BuildValue("O&",
4006 TrackObj_New, dstTrack);
4007 return _res;
4010 static PyObject *TrackObj_AddTrackReference(TrackObject *_self, PyObject *_args)
4012 PyObject *_res = NULL;
4013 OSErr _err;
4014 Track refTrack;
4015 OSType refType;
4016 long addedIndex;
4017 #ifndef AddTrackReference
4018 PyMac_PRECHECK(AddTrackReference);
4019 #endif
4020 if (!PyArg_ParseTuple(_args, "O&O&",
4021 TrackObj_Convert, &refTrack,
4022 PyMac_GetOSType, &refType))
4023 return NULL;
4024 _err = AddTrackReference(_self->ob_itself,
4025 refTrack,
4026 refType,
4027 &addedIndex);
4028 if (_err != noErr) return PyMac_Error(_err);
4029 _res = Py_BuildValue("l",
4030 addedIndex);
4031 return _res;
4034 static PyObject *TrackObj_DeleteTrackReference(TrackObject *_self, PyObject *_args)
4036 PyObject *_res = NULL;
4037 OSErr _err;
4038 OSType refType;
4039 long index;
4040 #ifndef DeleteTrackReference
4041 PyMac_PRECHECK(DeleteTrackReference);
4042 #endif
4043 if (!PyArg_ParseTuple(_args, "O&l",
4044 PyMac_GetOSType, &refType,
4045 &index))
4046 return NULL;
4047 _err = DeleteTrackReference(_self->ob_itself,
4048 refType,
4049 index);
4050 if (_err != noErr) return PyMac_Error(_err);
4051 Py_INCREF(Py_None);
4052 _res = Py_None;
4053 return _res;
4056 static PyObject *TrackObj_SetTrackReference(TrackObject *_self, PyObject *_args)
4058 PyObject *_res = NULL;
4059 OSErr _err;
4060 Track refTrack;
4061 OSType refType;
4062 long index;
4063 #ifndef SetTrackReference
4064 PyMac_PRECHECK(SetTrackReference);
4065 #endif
4066 if (!PyArg_ParseTuple(_args, "O&O&l",
4067 TrackObj_Convert, &refTrack,
4068 PyMac_GetOSType, &refType,
4069 &index))
4070 return NULL;
4071 _err = SetTrackReference(_self->ob_itself,
4072 refTrack,
4073 refType,
4074 index);
4075 if (_err != noErr) return PyMac_Error(_err);
4076 Py_INCREF(Py_None);
4077 _res = Py_None;
4078 return _res;
4081 static PyObject *TrackObj_GetTrackReference(TrackObject *_self, PyObject *_args)
4083 PyObject *_res = NULL;
4084 Track _rv;
4085 OSType refType;
4086 long index;
4087 #ifndef GetTrackReference
4088 PyMac_PRECHECK(GetTrackReference);
4089 #endif
4090 if (!PyArg_ParseTuple(_args, "O&l",
4091 PyMac_GetOSType, &refType,
4092 &index))
4093 return NULL;
4094 _rv = GetTrackReference(_self->ob_itself,
4095 refType,
4096 index);
4097 _res = Py_BuildValue("O&",
4098 TrackObj_New, _rv);
4099 return _res;
4102 static PyObject *TrackObj_GetNextTrackReferenceType(TrackObject *_self, PyObject *_args)
4104 PyObject *_res = NULL;
4105 OSType _rv;
4106 OSType refType;
4107 #ifndef GetNextTrackReferenceType
4108 PyMac_PRECHECK(GetNextTrackReferenceType);
4109 #endif
4110 if (!PyArg_ParseTuple(_args, "O&",
4111 PyMac_GetOSType, &refType))
4112 return NULL;
4113 _rv = GetNextTrackReferenceType(_self->ob_itself,
4114 refType);
4115 _res = Py_BuildValue("O&",
4116 PyMac_BuildOSType, _rv);
4117 return _res;
4120 static PyObject *TrackObj_GetTrackReferenceCount(TrackObject *_self, PyObject *_args)
4122 PyObject *_res = NULL;
4123 long _rv;
4124 OSType refType;
4125 #ifndef GetTrackReferenceCount
4126 PyMac_PRECHECK(GetTrackReferenceCount);
4127 #endif
4128 if (!PyArg_ParseTuple(_args, "O&",
4129 PyMac_GetOSType, &refType))
4130 return NULL;
4131 _rv = GetTrackReferenceCount(_self->ob_itself,
4132 refType);
4133 _res = Py_BuildValue("l",
4134 _rv);
4135 return _res;
4138 static PyObject *TrackObj_GetTrackEditRate(TrackObject *_self, PyObject *_args)
4140 PyObject *_res = NULL;
4141 Fixed _rv;
4142 TimeValue atTime;
4143 #ifndef GetTrackEditRate
4144 PyMac_PRECHECK(GetTrackEditRate);
4145 #endif
4146 if (!PyArg_ParseTuple(_args, "l",
4147 &atTime))
4148 return NULL;
4149 _rv = GetTrackEditRate(_self->ob_itself,
4150 atTime);
4151 _res = Py_BuildValue("O&",
4152 PyMac_BuildFixed, _rv);
4153 return _res;
4156 static PyObject *TrackObj_GetTrackDataSize(TrackObject *_self, PyObject *_args)
4158 PyObject *_res = NULL;
4159 long _rv;
4160 TimeValue startTime;
4161 TimeValue duration;
4162 #ifndef GetTrackDataSize
4163 PyMac_PRECHECK(GetTrackDataSize);
4164 #endif
4165 if (!PyArg_ParseTuple(_args, "ll",
4166 &startTime,
4167 &duration))
4168 return NULL;
4169 _rv = GetTrackDataSize(_self->ob_itself,
4170 startTime,
4171 duration);
4172 _res = Py_BuildValue("l",
4173 _rv);
4174 return _res;
4177 static PyObject *TrackObj_GetTrackDataSize64(TrackObject *_self, PyObject *_args)
4179 PyObject *_res = NULL;
4180 OSErr _err;
4181 TimeValue startTime;
4182 TimeValue duration;
4183 wide dataSize;
4184 #ifndef GetTrackDataSize64
4185 PyMac_PRECHECK(GetTrackDataSize64);
4186 #endif
4187 if (!PyArg_ParseTuple(_args, "ll",
4188 &startTime,
4189 &duration))
4190 return NULL;
4191 _err = GetTrackDataSize64(_self->ob_itself,
4192 startTime,
4193 duration,
4194 &dataSize);
4195 if (_err != noErr) return PyMac_Error(_err);
4196 _res = Py_BuildValue("O&",
4197 PyMac_Buildwide, dataSize);
4198 return _res;
4201 static PyObject *TrackObj_PtInTrack(TrackObject *_self, PyObject *_args)
4203 PyObject *_res = NULL;
4204 Boolean _rv;
4205 Point pt;
4206 #ifndef PtInTrack
4207 PyMac_PRECHECK(PtInTrack);
4208 #endif
4209 if (!PyArg_ParseTuple(_args, "O&",
4210 PyMac_GetPoint, &pt))
4211 return NULL;
4212 _rv = PtInTrack(_self->ob_itself,
4213 pt);
4214 _res = Py_BuildValue("b",
4215 _rv);
4216 return _res;
4219 static PyObject *TrackObj_GetTrackNextInterestingTime(TrackObject *_self, PyObject *_args)
4221 PyObject *_res = NULL;
4222 short interestingTimeFlags;
4223 TimeValue time;
4224 Fixed rate;
4225 TimeValue interestingTime;
4226 TimeValue interestingDuration;
4227 #ifndef GetTrackNextInterestingTime
4228 PyMac_PRECHECK(GetTrackNextInterestingTime);
4229 #endif
4230 if (!PyArg_ParseTuple(_args, "hlO&",
4231 &interestingTimeFlags,
4232 &time,
4233 PyMac_GetFixed, &rate))
4234 return NULL;
4235 GetTrackNextInterestingTime(_self->ob_itself,
4236 interestingTimeFlags,
4237 time,
4238 rate,
4239 &interestingTime,
4240 &interestingDuration);
4241 _res = Py_BuildValue("ll",
4242 interestingTime,
4243 interestingDuration);
4244 return _res;
4247 static PyObject *TrackObj_GetTrackSegmentDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
4249 PyObject *_res = NULL;
4250 RgnHandle _rv;
4251 TimeValue time;
4252 TimeValue duration;
4253 #ifndef GetTrackSegmentDisplayBoundsRgn
4254 PyMac_PRECHECK(GetTrackSegmentDisplayBoundsRgn);
4255 #endif
4256 if (!PyArg_ParseTuple(_args, "ll",
4257 &time,
4258 &duration))
4259 return NULL;
4260 _rv = GetTrackSegmentDisplayBoundsRgn(_self->ob_itself,
4261 time,
4262 duration);
4263 _res = Py_BuildValue("O&",
4264 ResObj_New, _rv);
4265 return _res;
4268 static PyObject *TrackObj_GetTrackStatus(TrackObject *_self, PyObject *_args)
4270 PyObject *_res = NULL;
4271 ComponentResult _rv;
4272 #ifndef GetTrackStatus
4273 PyMac_PRECHECK(GetTrackStatus);
4274 #endif
4275 if (!PyArg_ParseTuple(_args, ""))
4276 return NULL;
4277 _rv = GetTrackStatus(_self->ob_itself);
4278 _res = Py_BuildValue("l",
4279 _rv);
4280 return _res;
4283 static PyObject *TrackObj_SetTrackLoadSettings(TrackObject *_self, PyObject *_args)
4285 PyObject *_res = NULL;
4286 TimeValue preloadTime;
4287 TimeValue preloadDuration;
4288 long preloadFlags;
4289 long defaultHints;
4290 #ifndef SetTrackLoadSettings
4291 PyMac_PRECHECK(SetTrackLoadSettings);
4292 #endif
4293 if (!PyArg_ParseTuple(_args, "llll",
4294 &preloadTime,
4295 &preloadDuration,
4296 &preloadFlags,
4297 &defaultHints))
4298 return NULL;
4299 SetTrackLoadSettings(_self->ob_itself,
4300 preloadTime,
4301 preloadDuration,
4302 preloadFlags,
4303 defaultHints);
4304 Py_INCREF(Py_None);
4305 _res = Py_None;
4306 return _res;
4309 static PyObject *TrackObj_GetTrackLoadSettings(TrackObject *_self, PyObject *_args)
4311 PyObject *_res = NULL;
4312 TimeValue preloadTime;
4313 TimeValue preloadDuration;
4314 long preloadFlags;
4315 long defaultHints;
4316 #ifndef GetTrackLoadSettings
4317 PyMac_PRECHECK(GetTrackLoadSettings);
4318 #endif
4319 if (!PyArg_ParseTuple(_args, ""))
4320 return NULL;
4321 GetTrackLoadSettings(_self->ob_itself,
4322 &preloadTime,
4323 &preloadDuration,
4324 &preloadFlags,
4325 &defaultHints);
4326 _res = Py_BuildValue("llll",
4327 preloadTime,
4328 preloadDuration,
4329 preloadFlags,
4330 defaultHints);
4331 return _res;
4334 static PyMethodDef TrackObj_methods[] = {
4335 {"LoadTrackIntoRam", (PyCFunction)TrackObj_LoadTrackIntoRam, 1,
4336 PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
4337 {"GetTrackPict", (PyCFunction)TrackObj_GetTrackPict, 1,
4338 PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
4339 {"GetTrackClipRgn", (PyCFunction)TrackObj_GetTrackClipRgn, 1,
4340 PyDoc_STR("() -> (RgnHandle _rv)")},
4341 {"SetTrackClipRgn", (PyCFunction)TrackObj_SetTrackClipRgn, 1,
4342 PyDoc_STR("(RgnHandle theClip) -> None")},
4343 {"GetTrackDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackDisplayBoundsRgn, 1,
4344 PyDoc_STR("() -> (RgnHandle _rv)")},
4345 {"GetTrackMovieBoundsRgn", (PyCFunction)TrackObj_GetTrackMovieBoundsRgn, 1,
4346 PyDoc_STR("() -> (RgnHandle _rv)")},
4347 {"GetTrackBoundsRgn", (PyCFunction)TrackObj_GetTrackBoundsRgn, 1,
4348 PyDoc_STR("() -> (RgnHandle _rv)")},
4349 {"GetTrackMatte", (PyCFunction)TrackObj_GetTrackMatte, 1,
4350 PyDoc_STR("() -> (PixMapHandle _rv)")},
4351 {"SetTrackMatte", (PyCFunction)TrackObj_SetTrackMatte, 1,
4352 PyDoc_STR("(PixMapHandle theMatte) -> None")},
4353 {"GetTrackID", (PyCFunction)TrackObj_GetTrackID, 1,
4354 PyDoc_STR("() -> (long _rv)")},
4355 {"GetTrackMovie", (PyCFunction)TrackObj_GetTrackMovie, 1,
4356 PyDoc_STR("() -> (Movie _rv)")},
4357 {"GetTrackCreationTime", (PyCFunction)TrackObj_GetTrackCreationTime, 1,
4358 PyDoc_STR("() -> (unsigned long _rv)")},
4359 {"GetTrackModificationTime", (PyCFunction)TrackObj_GetTrackModificationTime, 1,
4360 PyDoc_STR("() -> (unsigned long _rv)")},
4361 {"GetTrackEnabled", (PyCFunction)TrackObj_GetTrackEnabled, 1,
4362 PyDoc_STR("() -> (Boolean _rv)")},
4363 {"SetTrackEnabled", (PyCFunction)TrackObj_SetTrackEnabled, 1,
4364 PyDoc_STR("(Boolean isEnabled) -> None")},
4365 {"GetTrackUsage", (PyCFunction)TrackObj_GetTrackUsage, 1,
4366 PyDoc_STR("() -> (long _rv)")},
4367 {"SetTrackUsage", (PyCFunction)TrackObj_SetTrackUsage, 1,
4368 PyDoc_STR("(long usage) -> None")},
4369 {"GetTrackDuration", (PyCFunction)TrackObj_GetTrackDuration, 1,
4370 PyDoc_STR("() -> (TimeValue _rv)")},
4371 {"GetTrackOffset", (PyCFunction)TrackObj_GetTrackOffset, 1,
4372 PyDoc_STR("() -> (TimeValue _rv)")},
4373 {"SetTrackOffset", (PyCFunction)TrackObj_SetTrackOffset, 1,
4374 PyDoc_STR("(TimeValue movieOffsetTime) -> None")},
4375 {"GetTrackLayer", (PyCFunction)TrackObj_GetTrackLayer, 1,
4376 PyDoc_STR("() -> (short _rv)")},
4377 {"SetTrackLayer", (PyCFunction)TrackObj_SetTrackLayer, 1,
4378 PyDoc_STR("(short layer) -> None")},
4379 {"GetTrackAlternate", (PyCFunction)TrackObj_GetTrackAlternate, 1,
4380 PyDoc_STR("() -> (Track _rv)")},
4381 {"SetTrackAlternate", (PyCFunction)TrackObj_SetTrackAlternate, 1,
4382 PyDoc_STR("(Track alternateT) -> None")},
4383 {"GetTrackVolume", (PyCFunction)TrackObj_GetTrackVolume, 1,
4384 PyDoc_STR("() -> (short _rv)")},
4385 {"SetTrackVolume", (PyCFunction)TrackObj_SetTrackVolume, 1,
4386 PyDoc_STR("(short volume) -> None")},
4387 {"GetTrackDimensions", (PyCFunction)TrackObj_GetTrackDimensions, 1,
4388 PyDoc_STR("() -> (Fixed width, Fixed height)")},
4389 {"SetTrackDimensions", (PyCFunction)TrackObj_SetTrackDimensions, 1,
4390 PyDoc_STR("(Fixed width, Fixed height) -> None")},
4391 {"GetTrackUserData", (PyCFunction)TrackObj_GetTrackUserData, 1,
4392 PyDoc_STR("() -> (UserData _rv)")},
4393 {"GetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_GetTrackSoundLocalizationSettings, 1,
4394 PyDoc_STR("() -> (Handle settings)")},
4395 {"SetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_SetTrackSoundLocalizationSettings, 1,
4396 PyDoc_STR("(Handle settings) -> None")},
4397 {"NewTrackMedia", (PyCFunction)TrackObj_NewTrackMedia, 1,
4398 PyDoc_STR("(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)")},
4399 {"GetTrackMedia", (PyCFunction)TrackObj_GetTrackMedia, 1,
4400 PyDoc_STR("() -> (Media _rv)")},
4401 {"InsertMediaIntoTrack", (PyCFunction)TrackObj_InsertMediaIntoTrack, 1,
4402 PyDoc_STR("(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None")},
4403 {"InsertTrackSegment", (PyCFunction)TrackObj_InsertTrackSegment, 1,
4404 PyDoc_STR("(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
4405 {"InsertEmptyTrackSegment", (PyCFunction)TrackObj_InsertEmptyTrackSegment, 1,
4406 PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
4407 {"DeleteTrackSegment", (PyCFunction)TrackObj_DeleteTrackSegment, 1,
4408 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
4409 {"ScaleTrackSegment", (PyCFunction)TrackObj_ScaleTrackSegment, 1,
4410 PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
4411 {"IsScrapMovie", (PyCFunction)TrackObj_IsScrapMovie, 1,
4412 PyDoc_STR("() -> (Component _rv)")},
4413 {"CopyTrackSettings", (PyCFunction)TrackObj_CopyTrackSettings, 1,
4414 PyDoc_STR("(Track dstTrack) -> None")},
4415 {"AddEmptyTrackToMovie", (PyCFunction)TrackObj_AddEmptyTrackToMovie, 1,
4416 PyDoc_STR("(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)")},
4417 {"AddClonedTrackToMovie", (PyCFunction)TrackObj_AddClonedTrackToMovie, 1,
4418 PyDoc_STR("(Movie dstMovie, long flags) -> (Track dstTrack)")},
4419 {"AddTrackReference", (PyCFunction)TrackObj_AddTrackReference, 1,
4420 PyDoc_STR("(Track refTrack, OSType refType) -> (long addedIndex)")},
4421 {"DeleteTrackReference", (PyCFunction)TrackObj_DeleteTrackReference, 1,
4422 PyDoc_STR("(OSType refType, long index) -> None")},
4423 {"SetTrackReference", (PyCFunction)TrackObj_SetTrackReference, 1,
4424 PyDoc_STR("(Track refTrack, OSType refType, long index) -> None")},
4425 {"GetTrackReference", (PyCFunction)TrackObj_GetTrackReference, 1,
4426 PyDoc_STR("(OSType refType, long index) -> (Track _rv)")},
4427 {"GetNextTrackReferenceType", (PyCFunction)TrackObj_GetNextTrackReferenceType, 1,
4428 PyDoc_STR("(OSType refType) -> (OSType _rv)")},
4429 {"GetTrackReferenceCount", (PyCFunction)TrackObj_GetTrackReferenceCount, 1,
4430 PyDoc_STR("(OSType refType) -> (long _rv)")},
4431 {"GetTrackEditRate", (PyCFunction)TrackObj_GetTrackEditRate, 1,
4432 PyDoc_STR("(TimeValue atTime) -> (Fixed _rv)")},
4433 {"GetTrackDataSize", (PyCFunction)TrackObj_GetTrackDataSize, 1,
4434 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
4435 {"GetTrackDataSize64", (PyCFunction)TrackObj_GetTrackDataSize64, 1,
4436 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
4437 {"PtInTrack", (PyCFunction)TrackObj_PtInTrack, 1,
4438 PyDoc_STR("(Point pt) -> (Boolean _rv)")},
4439 {"GetTrackNextInterestingTime", (PyCFunction)TrackObj_GetTrackNextInterestingTime, 1,
4440 PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
4441 {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackSegmentDisplayBoundsRgn, 1,
4442 PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
4443 {"GetTrackStatus", (PyCFunction)TrackObj_GetTrackStatus, 1,
4444 PyDoc_STR("() -> (ComponentResult _rv)")},
4445 {"SetTrackLoadSettings", (PyCFunction)TrackObj_SetTrackLoadSettings, 1,
4446 PyDoc_STR("(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None")},
4447 {"GetTrackLoadSettings", (PyCFunction)TrackObj_GetTrackLoadSettings, 1,
4448 PyDoc_STR("() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)")},
4449 {NULL, NULL, 0}
4452 #define TrackObj_getsetlist NULL
4455 #define TrackObj_compare NULL
4457 #define TrackObj_repr NULL
4459 #define TrackObj_hash NULL
4460 #define TrackObj_tp_init 0
4462 #define TrackObj_tp_alloc PyType_GenericAlloc
4464 static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
4466 PyObject *self;
4467 Track itself;
4468 char *kw[] = {"itself", 0};
4470 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TrackObj_Convert, &itself)) return NULL;
4471 if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
4472 ((TrackObject *)self)->ob_itself = itself;
4473 return self;
4476 #define TrackObj_tp_free PyObject_Del
4479 PyTypeObject Track_Type = {
4480 PyObject_HEAD_INIT(NULL)
4481 0, /*ob_size*/
4482 "_Qt.Track", /*tp_name*/
4483 sizeof(TrackObject), /*tp_basicsize*/
4484 0, /*tp_itemsize*/
4485 /* methods */
4486 (destructor) TrackObj_dealloc, /*tp_dealloc*/
4487 0, /*tp_print*/
4488 (getattrfunc)0, /*tp_getattr*/
4489 (setattrfunc)0, /*tp_setattr*/
4490 (cmpfunc) TrackObj_compare, /*tp_compare*/
4491 (reprfunc) TrackObj_repr, /*tp_repr*/
4492 (PyNumberMethods *)0, /* tp_as_number */
4493 (PySequenceMethods *)0, /* tp_as_sequence */
4494 (PyMappingMethods *)0, /* tp_as_mapping */
4495 (hashfunc) TrackObj_hash, /*tp_hash*/
4496 0, /*tp_call*/
4497 0, /*tp_str*/
4498 PyObject_GenericGetAttr, /*tp_getattro*/
4499 PyObject_GenericSetAttr, /*tp_setattro */
4500 0, /*tp_as_buffer*/
4501 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
4502 0, /*tp_doc*/
4503 0, /*tp_traverse*/
4504 0, /*tp_clear*/
4505 0, /*tp_richcompare*/
4506 0, /*tp_weaklistoffset*/
4507 0, /*tp_iter*/
4508 0, /*tp_iternext*/
4509 TrackObj_methods, /* tp_methods */
4510 0, /*tp_members*/
4511 TrackObj_getsetlist, /*tp_getset*/
4512 0, /*tp_base*/
4513 0, /*tp_dict*/
4514 0, /*tp_descr_get*/
4515 0, /*tp_descr_set*/
4516 0, /*tp_dictoffset*/
4517 TrackObj_tp_init, /* tp_init */
4518 TrackObj_tp_alloc, /* tp_alloc */
4519 TrackObj_tp_new, /* tp_new */
4520 TrackObj_tp_free, /* tp_free */
4523 /* --------------------- End object type Track ---------------------- */
4526 /* ----------------------- Object type Movie ------------------------ */
4528 PyTypeObject Movie_Type;
4530 #define MovieObj_Check(x) ((x)->ob_type == &Movie_Type || PyObject_TypeCheck((x), &Movie_Type))
4532 typedef struct MovieObject {
4533 PyObject_HEAD
4534 Movie ob_itself;
4535 } MovieObject;
4537 PyObject *MovieObj_New(Movie itself)
4539 MovieObject *it;
4540 if (itself == NULL) {
4541 PyErr_SetString(Qt_Error,"Cannot create null Movie");
4542 return NULL;
4544 it = PyObject_NEW(MovieObject, &Movie_Type);
4545 if (it == NULL) return NULL;
4546 it->ob_itself = itself;
4547 return (PyObject *)it;
4549 int MovieObj_Convert(PyObject *v, Movie *p_itself)
4551 if (!MovieObj_Check(v))
4553 PyErr_SetString(PyExc_TypeError, "Movie required");
4554 return 0;
4556 *p_itself = ((MovieObject *)v)->ob_itself;
4557 return 1;
4560 static void MovieObj_dealloc(MovieObject *self)
4562 DisposeMovie(self->ob_itself);
4563 self->ob_type->tp_free((PyObject *)self);
4566 static PyObject *MovieObj_MoviesTask(MovieObject *_self, PyObject *_args)
4568 PyObject *_res = NULL;
4569 long maxMilliSecToUse;
4570 #ifndef MoviesTask
4571 PyMac_PRECHECK(MoviesTask);
4572 #endif
4573 if (!PyArg_ParseTuple(_args, "l",
4574 &maxMilliSecToUse))
4575 return NULL;
4576 MoviesTask(_self->ob_itself,
4577 maxMilliSecToUse);
4578 Py_INCREF(Py_None);
4579 _res = Py_None;
4580 return _res;
4583 static PyObject *MovieObj_PrerollMovie(MovieObject *_self, PyObject *_args)
4585 PyObject *_res = NULL;
4586 OSErr _err;
4587 TimeValue time;
4588 Fixed Rate;
4589 #ifndef PrerollMovie
4590 PyMac_PRECHECK(PrerollMovie);
4591 #endif
4592 if (!PyArg_ParseTuple(_args, "lO&",
4593 &time,
4594 PyMac_GetFixed, &Rate))
4595 return NULL;
4596 _err = PrerollMovie(_self->ob_itself,
4597 time,
4598 Rate);
4599 if (_err != noErr) return PyMac_Error(_err);
4600 Py_INCREF(Py_None);
4601 _res = Py_None;
4602 return _res;
4605 static PyObject *MovieObj_AbortPrePrerollMovie(MovieObject *_self, PyObject *_args)
4607 PyObject *_res = NULL;
4608 OSErr err;
4609 #ifndef AbortPrePrerollMovie
4610 PyMac_PRECHECK(AbortPrePrerollMovie);
4611 #endif
4612 if (!PyArg_ParseTuple(_args, "h",
4613 &err))
4614 return NULL;
4615 AbortPrePrerollMovie(_self->ob_itself,
4616 err);
4617 Py_INCREF(Py_None);
4618 _res = Py_None;
4619 return _res;
4622 static PyObject *MovieObj_LoadMovieIntoRam(MovieObject *_self, PyObject *_args)
4624 PyObject *_res = NULL;
4625 OSErr _err;
4626 TimeValue time;
4627 TimeValue duration;
4628 long flags;
4629 #ifndef LoadMovieIntoRam
4630 PyMac_PRECHECK(LoadMovieIntoRam);
4631 #endif
4632 if (!PyArg_ParseTuple(_args, "lll",
4633 &time,
4634 &duration,
4635 &flags))
4636 return NULL;
4637 _err = LoadMovieIntoRam(_self->ob_itself,
4638 time,
4639 duration,
4640 flags);
4641 if (_err != noErr) return PyMac_Error(_err);
4642 Py_INCREF(Py_None);
4643 _res = Py_None;
4644 return _res;
4647 static PyObject *MovieObj_SetMovieActive(MovieObject *_self, PyObject *_args)
4649 PyObject *_res = NULL;
4650 Boolean active;
4651 #ifndef SetMovieActive
4652 PyMac_PRECHECK(SetMovieActive);
4653 #endif
4654 if (!PyArg_ParseTuple(_args, "b",
4655 &active))
4656 return NULL;
4657 SetMovieActive(_self->ob_itself,
4658 active);
4659 Py_INCREF(Py_None);
4660 _res = Py_None;
4661 return _res;
4664 static PyObject *MovieObj_GetMovieActive(MovieObject *_self, PyObject *_args)
4666 PyObject *_res = NULL;
4667 Boolean _rv;
4668 #ifndef GetMovieActive
4669 PyMac_PRECHECK(GetMovieActive);
4670 #endif
4671 if (!PyArg_ParseTuple(_args, ""))
4672 return NULL;
4673 _rv = GetMovieActive(_self->ob_itself);
4674 _res = Py_BuildValue("b",
4675 _rv);
4676 return _res;
4679 static PyObject *MovieObj_StartMovie(MovieObject *_self, PyObject *_args)
4681 PyObject *_res = NULL;
4682 #ifndef StartMovie
4683 PyMac_PRECHECK(StartMovie);
4684 #endif
4685 if (!PyArg_ParseTuple(_args, ""))
4686 return NULL;
4687 StartMovie(_self->ob_itself);
4688 Py_INCREF(Py_None);
4689 _res = Py_None;
4690 return _res;
4693 static PyObject *MovieObj_StopMovie(MovieObject *_self, PyObject *_args)
4695 PyObject *_res = NULL;
4696 #ifndef StopMovie
4697 PyMac_PRECHECK(StopMovie);
4698 #endif
4699 if (!PyArg_ParseTuple(_args, ""))
4700 return NULL;
4701 StopMovie(_self->ob_itself);
4702 Py_INCREF(Py_None);
4703 _res = Py_None;
4704 return _res;
4707 static PyObject *MovieObj_GoToBeginningOfMovie(MovieObject *_self, PyObject *_args)
4709 PyObject *_res = NULL;
4710 #ifndef GoToBeginningOfMovie
4711 PyMac_PRECHECK(GoToBeginningOfMovie);
4712 #endif
4713 if (!PyArg_ParseTuple(_args, ""))
4714 return NULL;
4715 GoToBeginningOfMovie(_self->ob_itself);
4716 Py_INCREF(Py_None);
4717 _res = Py_None;
4718 return _res;
4721 static PyObject *MovieObj_GoToEndOfMovie(MovieObject *_self, PyObject *_args)
4723 PyObject *_res = NULL;
4724 #ifndef GoToEndOfMovie
4725 PyMac_PRECHECK(GoToEndOfMovie);
4726 #endif
4727 if (!PyArg_ParseTuple(_args, ""))
4728 return NULL;
4729 GoToEndOfMovie(_self->ob_itself);
4730 Py_INCREF(Py_None);
4731 _res = Py_None;
4732 return _res;
4735 static PyObject *MovieObj_IsMovieDone(MovieObject *_self, PyObject *_args)
4737 PyObject *_res = NULL;
4738 Boolean _rv;
4739 #ifndef IsMovieDone
4740 PyMac_PRECHECK(IsMovieDone);
4741 #endif
4742 if (!PyArg_ParseTuple(_args, ""))
4743 return NULL;
4744 _rv = IsMovieDone(_self->ob_itself);
4745 _res = Py_BuildValue("b",
4746 _rv);
4747 return _res;
4750 static PyObject *MovieObj_GetMoviePreviewMode(MovieObject *_self, PyObject *_args)
4752 PyObject *_res = NULL;
4753 Boolean _rv;
4754 #ifndef GetMoviePreviewMode
4755 PyMac_PRECHECK(GetMoviePreviewMode);
4756 #endif
4757 if (!PyArg_ParseTuple(_args, ""))
4758 return NULL;
4759 _rv = GetMoviePreviewMode(_self->ob_itself);
4760 _res = Py_BuildValue("b",
4761 _rv);
4762 return _res;
4765 static PyObject *MovieObj_SetMoviePreviewMode(MovieObject *_self, PyObject *_args)
4767 PyObject *_res = NULL;
4768 Boolean usePreview;
4769 #ifndef SetMoviePreviewMode
4770 PyMac_PRECHECK(SetMoviePreviewMode);
4771 #endif
4772 if (!PyArg_ParseTuple(_args, "b",
4773 &usePreview))
4774 return NULL;
4775 SetMoviePreviewMode(_self->ob_itself,
4776 usePreview);
4777 Py_INCREF(Py_None);
4778 _res = Py_None;
4779 return _res;
4782 static PyObject *MovieObj_ShowMoviePoster(MovieObject *_self, PyObject *_args)
4784 PyObject *_res = NULL;
4785 #ifndef ShowMoviePoster
4786 PyMac_PRECHECK(ShowMoviePoster);
4787 #endif
4788 if (!PyArg_ParseTuple(_args, ""))
4789 return NULL;
4790 ShowMoviePoster(_self->ob_itself);
4791 Py_INCREF(Py_None);
4792 _res = Py_None;
4793 return _res;
4796 static PyObject *MovieObj_GetMovieTimeBase(MovieObject *_self, PyObject *_args)
4798 PyObject *_res = NULL;
4799 TimeBase _rv;
4800 #ifndef GetMovieTimeBase
4801 PyMac_PRECHECK(GetMovieTimeBase);
4802 #endif
4803 if (!PyArg_ParseTuple(_args, ""))
4804 return NULL;
4805 _rv = GetMovieTimeBase(_self->ob_itself);
4806 _res = Py_BuildValue("O&",
4807 TimeBaseObj_New, _rv);
4808 return _res;
4811 static PyObject *MovieObj_SetMovieMasterTimeBase(MovieObject *_self, PyObject *_args)
4813 PyObject *_res = NULL;
4814 TimeBase tb;
4815 TimeRecord slaveZero;
4816 #ifndef SetMovieMasterTimeBase
4817 PyMac_PRECHECK(SetMovieMasterTimeBase);
4818 #endif
4819 if (!PyArg_ParseTuple(_args, "O&O&",
4820 TimeBaseObj_Convert, &tb,
4821 QtTimeRecord_Convert, &slaveZero))
4822 return NULL;
4823 SetMovieMasterTimeBase(_self->ob_itself,
4825 &slaveZero);
4826 Py_INCREF(Py_None);
4827 _res = Py_None;
4828 return _res;
4831 static PyObject *MovieObj_SetMovieMasterClock(MovieObject *_self, PyObject *_args)
4833 PyObject *_res = NULL;
4834 Component clockMeister;
4835 TimeRecord slaveZero;
4836 #ifndef SetMovieMasterClock
4837 PyMac_PRECHECK(SetMovieMasterClock);
4838 #endif
4839 if (!PyArg_ParseTuple(_args, "O&O&",
4840 CmpObj_Convert, &clockMeister,
4841 QtTimeRecord_Convert, &slaveZero))
4842 return NULL;
4843 SetMovieMasterClock(_self->ob_itself,
4844 clockMeister,
4845 &slaveZero);
4846 Py_INCREF(Py_None);
4847 _res = Py_None;
4848 return _res;
4851 static PyObject *MovieObj_GetMovieGWorld(MovieObject *_self, PyObject *_args)
4853 PyObject *_res = NULL;
4854 CGrafPtr port;
4855 GDHandle gdh;
4856 #ifndef GetMovieGWorld
4857 PyMac_PRECHECK(GetMovieGWorld);
4858 #endif
4859 if (!PyArg_ParseTuple(_args, ""))
4860 return NULL;
4861 GetMovieGWorld(_self->ob_itself,
4862 &port,
4863 &gdh);
4864 _res = Py_BuildValue("O&O&",
4865 GrafObj_New, port,
4866 OptResObj_New, gdh);
4867 return _res;
4870 static PyObject *MovieObj_SetMovieGWorld(MovieObject *_self, PyObject *_args)
4872 PyObject *_res = NULL;
4873 CGrafPtr port;
4874 GDHandle gdh;
4875 #ifndef SetMovieGWorld
4876 PyMac_PRECHECK(SetMovieGWorld);
4877 #endif
4878 if (!PyArg_ParseTuple(_args, "O&O&",
4879 GrafObj_Convert, &port,
4880 OptResObj_Convert, &gdh))
4881 return NULL;
4882 SetMovieGWorld(_self->ob_itself,
4883 port,
4884 gdh);
4885 Py_INCREF(Py_None);
4886 _res = Py_None;
4887 return _res;
4890 static PyObject *MovieObj_GetMovieNaturalBoundsRect(MovieObject *_self, PyObject *_args)
4892 PyObject *_res = NULL;
4893 Rect naturalBounds;
4894 #ifndef GetMovieNaturalBoundsRect
4895 PyMac_PRECHECK(GetMovieNaturalBoundsRect);
4896 #endif
4897 if (!PyArg_ParseTuple(_args, ""))
4898 return NULL;
4899 GetMovieNaturalBoundsRect(_self->ob_itself,
4900 &naturalBounds);
4901 _res = Py_BuildValue("O&",
4902 PyMac_BuildRect, &naturalBounds);
4903 return _res;
4906 static PyObject *MovieObj_GetNextTrackForCompositing(MovieObject *_self, PyObject *_args)
4908 PyObject *_res = NULL;
4909 Track _rv;
4910 Track theTrack;
4911 #ifndef GetNextTrackForCompositing
4912 PyMac_PRECHECK(GetNextTrackForCompositing);
4913 #endif
4914 if (!PyArg_ParseTuple(_args, "O&",
4915 TrackObj_Convert, &theTrack))
4916 return NULL;
4917 _rv = GetNextTrackForCompositing(_self->ob_itself,
4918 theTrack);
4919 _res = Py_BuildValue("O&",
4920 TrackObj_New, _rv);
4921 return _res;
4924 static PyObject *MovieObj_GetPrevTrackForCompositing(MovieObject *_self, PyObject *_args)
4926 PyObject *_res = NULL;
4927 Track _rv;
4928 Track theTrack;
4929 #ifndef GetPrevTrackForCompositing
4930 PyMac_PRECHECK(GetPrevTrackForCompositing);
4931 #endif
4932 if (!PyArg_ParseTuple(_args, "O&",
4933 TrackObj_Convert, &theTrack))
4934 return NULL;
4935 _rv = GetPrevTrackForCompositing(_self->ob_itself,
4936 theTrack);
4937 _res = Py_BuildValue("O&",
4938 TrackObj_New, _rv);
4939 return _res;
4942 static PyObject *MovieObj_GetMoviePict(MovieObject *_self, PyObject *_args)
4944 PyObject *_res = NULL;
4945 PicHandle _rv;
4946 TimeValue time;
4947 #ifndef GetMoviePict
4948 PyMac_PRECHECK(GetMoviePict);
4949 #endif
4950 if (!PyArg_ParseTuple(_args, "l",
4951 &time))
4952 return NULL;
4953 _rv = GetMoviePict(_self->ob_itself,
4954 time);
4955 _res = Py_BuildValue("O&",
4956 ResObj_New, _rv);
4957 return _res;
4960 static PyObject *MovieObj_GetMoviePosterPict(MovieObject *_self, PyObject *_args)
4962 PyObject *_res = NULL;
4963 PicHandle _rv;
4964 #ifndef GetMoviePosterPict
4965 PyMac_PRECHECK(GetMoviePosterPict);
4966 #endif
4967 if (!PyArg_ParseTuple(_args, ""))
4968 return NULL;
4969 _rv = GetMoviePosterPict(_self->ob_itself);
4970 _res = Py_BuildValue("O&",
4971 ResObj_New, _rv);
4972 return _res;
4975 static PyObject *MovieObj_UpdateMovie(MovieObject *_self, PyObject *_args)
4977 PyObject *_res = NULL;
4978 OSErr _err;
4979 #ifndef UpdateMovie
4980 PyMac_PRECHECK(UpdateMovie);
4981 #endif
4982 if (!PyArg_ParseTuple(_args, ""))
4983 return NULL;
4984 _err = UpdateMovie(_self->ob_itself);
4985 if (_err != noErr) return PyMac_Error(_err);
4986 Py_INCREF(Py_None);
4987 _res = Py_None;
4988 return _res;
4991 static PyObject *MovieObj_InvalidateMovieRegion(MovieObject *_self, PyObject *_args)
4993 PyObject *_res = NULL;
4994 OSErr _err;
4995 RgnHandle invalidRgn;
4996 #ifndef InvalidateMovieRegion
4997 PyMac_PRECHECK(InvalidateMovieRegion);
4998 #endif
4999 if (!PyArg_ParseTuple(_args, "O&",
5000 ResObj_Convert, &invalidRgn))
5001 return NULL;
5002 _err = InvalidateMovieRegion(_self->ob_itself,
5003 invalidRgn);
5004 if (_err != noErr) return PyMac_Error(_err);
5005 Py_INCREF(Py_None);
5006 _res = Py_None;
5007 return _res;
5010 static PyObject *MovieObj_GetMovieBox(MovieObject *_self, PyObject *_args)
5012 PyObject *_res = NULL;
5013 Rect boxRect;
5014 #ifndef GetMovieBox
5015 PyMac_PRECHECK(GetMovieBox);
5016 #endif
5017 if (!PyArg_ParseTuple(_args, ""))
5018 return NULL;
5019 GetMovieBox(_self->ob_itself,
5020 &boxRect);
5021 _res = Py_BuildValue("O&",
5022 PyMac_BuildRect, &boxRect);
5023 return _res;
5026 static PyObject *MovieObj_SetMovieBox(MovieObject *_self, PyObject *_args)
5028 PyObject *_res = NULL;
5029 Rect boxRect;
5030 #ifndef SetMovieBox
5031 PyMac_PRECHECK(SetMovieBox);
5032 #endif
5033 if (!PyArg_ParseTuple(_args, "O&",
5034 PyMac_GetRect, &boxRect))
5035 return NULL;
5036 SetMovieBox(_self->ob_itself,
5037 &boxRect);
5038 Py_INCREF(Py_None);
5039 _res = Py_None;
5040 return _res;
5043 static PyObject *MovieObj_GetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
5045 PyObject *_res = NULL;
5046 RgnHandle _rv;
5047 #ifndef GetMovieDisplayClipRgn
5048 PyMac_PRECHECK(GetMovieDisplayClipRgn);
5049 #endif
5050 if (!PyArg_ParseTuple(_args, ""))
5051 return NULL;
5052 _rv = GetMovieDisplayClipRgn(_self->ob_itself);
5053 _res = Py_BuildValue("O&",
5054 ResObj_New, _rv);
5055 return _res;
5058 static PyObject *MovieObj_SetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
5060 PyObject *_res = NULL;
5061 RgnHandle theClip;
5062 #ifndef SetMovieDisplayClipRgn
5063 PyMac_PRECHECK(SetMovieDisplayClipRgn);
5064 #endif
5065 if (!PyArg_ParseTuple(_args, "O&",
5066 ResObj_Convert, &theClip))
5067 return NULL;
5068 SetMovieDisplayClipRgn(_self->ob_itself,
5069 theClip);
5070 Py_INCREF(Py_None);
5071 _res = Py_None;
5072 return _res;
5075 static PyObject *MovieObj_GetMovieClipRgn(MovieObject *_self, PyObject *_args)
5077 PyObject *_res = NULL;
5078 RgnHandle _rv;
5079 #ifndef GetMovieClipRgn
5080 PyMac_PRECHECK(GetMovieClipRgn);
5081 #endif
5082 if (!PyArg_ParseTuple(_args, ""))
5083 return NULL;
5084 _rv = GetMovieClipRgn(_self->ob_itself);
5085 _res = Py_BuildValue("O&",
5086 ResObj_New, _rv);
5087 return _res;
5090 static PyObject *MovieObj_SetMovieClipRgn(MovieObject *_self, PyObject *_args)
5092 PyObject *_res = NULL;
5093 RgnHandle theClip;
5094 #ifndef SetMovieClipRgn
5095 PyMac_PRECHECK(SetMovieClipRgn);
5096 #endif
5097 if (!PyArg_ParseTuple(_args, "O&",
5098 ResObj_Convert, &theClip))
5099 return NULL;
5100 SetMovieClipRgn(_self->ob_itself,
5101 theClip);
5102 Py_INCREF(Py_None);
5103 _res = Py_None;
5104 return _res;
5107 static PyObject *MovieObj_GetMovieDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
5109 PyObject *_res = NULL;
5110 RgnHandle _rv;
5111 #ifndef GetMovieDisplayBoundsRgn
5112 PyMac_PRECHECK(GetMovieDisplayBoundsRgn);
5113 #endif
5114 if (!PyArg_ParseTuple(_args, ""))
5115 return NULL;
5116 _rv = GetMovieDisplayBoundsRgn(_self->ob_itself);
5117 _res = Py_BuildValue("O&",
5118 ResObj_New, _rv);
5119 return _res;
5122 static PyObject *MovieObj_GetMovieBoundsRgn(MovieObject *_self, PyObject *_args)
5124 PyObject *_res = NULL;
5125 RgnHandle _rv;
5126 #ifndef GetMovieBoundsRgn
5127 PyMac_PRECHECK(GetMovieBoundsRgn);
5128 #endif
5129 if (!PyArg_ParseTuple(_args, ""))
5130 return NULL;
5131 _rv = GetMovieBoundsRgn(_self->ob_itself);
5132 _res = Py_BuildValue("O&",
5133 ResObj_New, _rv);
5134 return _res;
5137 static PyObject *MovieObj_SetMovieVideoOutput(MovieObject *_self, PyObject *_args)
5139 PyObject *_res = NULL;
5140 ComponentInstance vout;
5141 #ifndef SetMovieVideoOutput
5142 PyMac_PRECHECK(SetMovieVideoOutput);
5143 #endif
5144 if (!PyArg_ParseTuple(_args, "O&",
5145 CmpInstObj_Convert, &vout))
5146 return NULL;
5147 SetMovieVideoOutput(_self->ob_itself,
5148 vout);
5149 Py_INCREF(Py_None);
5150 _res = Py_None;
5151 return _res;
5154 static PyObject *MovieObj_PutMovieIntoHandle(MovieObject *_self, PyObject *_args)
5156 PyObject *_res = NULL;
5157 OSErr _err;
5158 Handle publicMovie;
5159 #ifndef PutMovieIntoHandle
5160 PyMac_PRECHECK(PutMovieIntoHandle);
5161 #endif
5162 if (!PyArg_ParseTuple(_args, "O&",
5163 ResObj_Convert, &publicMovie))
5164 return NULL;
5165 _err = PutMovieIntoHandle(_self->ob_itself,
5166 publicMovie);
5167 if (_err != noErr) return PyMac_Error(_err);
5168 Py_INCREF(Py_None);
5169 _res = Py_None;
5170 return _res;
5173 static PyObject *MovieObj_PutMovieIntoDataFork(MovieObject *_self, PyObject *_args)
5175 PyObject *_res = NULL;
5176 OSErr _err;
5177 short fRefNum;
5178 long offset;
5179 long maxSize;
5180 #ifndef PutMovieIntoDataFork
5181 PyMac_PRECHECK(PutMovieIntoDataFork);
5182 #endif
5183 if (!PyArg_ParseTuple(_args, "hll",
5184 &fRefNum,
5185 &offset,
5186 &maxSize))
5187 return NULL;
5188 _err = PutMovieIntoDataFork(_self->ob_itself,
5189 fRefNum,
5190 offset,
5191 maxSize);
5192 if (_err != noErr) return PyMac_Error(_err);
5193 Py_INCREF(Py_None);
5194 _res = Py_None;
5195 return _res;
5198 static PyObject *MovieObj_PutMovieIntoDataFork64(MovieObject *_self, PyObject *_args)
5200 PyObject *_res = NULL;
5201 OSErr _err;
5202 long fRefNum;
5203 wide offset;
5204 unsigned long maxSize;
5205 #ifndef PutMovieIntoDataFork64
5206 PyMac_PRECHECK(PutMovieIntoDataFork64);
5207 #endif
5208 if (!PyArg_ParseTuple(_args, "lO&l",
5209 &fRefNum,
5210 PyMac_Getwide, &offset,
5211 &maxSize))
5212 return NULL;
5213 _err = PutMovieIntoDataFork64(_self->ob_itself,
5214 fRefNum,
5215 &offset,
5216 maxSize);
5217 if (_err != noErr) return PyMac_Error(_err);
5218 Py_INCREF(Py_None);
5219 _res = Py_None;
5220 return _res;
5223 static PyObject *MovieObj_GetMovieCreationTime(MovieObject *_self, PyObject *_args)
5225 PyObject *_res = NULL;
5226 unsigned long _rv;
5227 #ifndef GetMovieCreationTime
5228 PyMac_PRECHECK(GetMovieCreationTime);
5229 #endif
5230 if (!PyArg_ParseTuple(_args, ""))
5231 return NULL;
5232 _rv = GetMovieCreationTime(_self->ob_itself);
5233 _res = Py_BuildValue("l",
5234 _rv);
5235 return _res;
5238 static PyObject *MovieObj_GetMovieModificationTime(MovieObject *_self, PyObject *_args)
5240 PyObject *_res = NULL;
5241 unsigned long _rv;
5242 #ifndef GetMovieModificationTime
5243 PyMac_PRECHECK(GetMovieModificationTime);
5244 #endif
5245 if (!PyArg_ParseTuple(_args, ""))
5246 return NULL;
5247 _rv = GetMovieModificationTime(_self->ob_itself);
5248 _res = Py_BuildValue("l",
5249 _rv);
5250 return _res;
5253 static PyObject *MovieObj_GetMovieTimeScale(MovieObject *_self, PyObject *_args)
5255 PyObject *_res = NULL;
5256 TimeScale _rv;
5257 #ifndef GetMovieTimeScale
5258 PyMac_PRECHECK(GetMovieTimeScale);
5259 #endif
5260 if (!PyArg_ParseTuple(_args, ""))
5261 return NULL;
5262 _rv = GetMovieTimeScale(_self->ob_itself);
5263 _res = Py_BuildValue("l",
5264 _rv);
5265 return _res;
5268 static PyObject *MovieObj_SetMovieTimeScale(MovieObject *_self, PyObject *_args)
5270 PyObject *_res = NULL;
5271 TimeScale timeScale;
5272 #ifndef SetMovieTimeScale
5273 PyMac_PRECHECK(SetMovieTimeScale);
5274 #endif
5275 if (!PyArg_ParseTuple(_args, "l",
5276 &timeScale))
5277 return NULL;
5278 SetMovieTimeScale(_self->ob_itself,
5279 timeScale);
5280 Py_INCREF(Py_None);
5281 _res = Py_None;
5282 return _res;
5285 static PyObject *MovieObj_GetMovieDuration(MovieObject *_self, PyObject *_args)
5287 PyObject *_res = NULL;
5288 TimeValue _rv;
5289 #ifndef GetMovieDuration
5290 PyMac_PRECHECK(GetMovieDuration);
5291 #endif
5292 if (!PyArg_ParseTuple(_args, ""))
5293 return NULL;
5294 _rv = GetMovieDuration(_self->ob_itself);
5295 _res = Py_BuildValue("l",
5296 _rv);
5297 return _res;
5300 static PyObject *MovieObj_GetMovieRate(MovieObject *_self, PyObject *_args)
5302 PyObject *_res = NULL;
5303 Fixed _rv;
5304 #ifndef GetMovieRate
5305 PyMac_PRECHECK(GetMovieRate);
5306 #endif
5307 if (!PyArg_ParseTuple(_args, ""))
5308 return NULL;
5309 _rv = GetMovieRate(_self->ob_itself);
5310 _res = Py_BuildValue("O&",
5311 PyMac_BuildFixed, _rv);
5312 return _res;
5315 static PyObject *MovieObj_SetMovieRate(MovieObject *_self, PyObject *_args)
5317 PyObject *_res = NULL;
5318 Fixed rate;
5319 #ifndef SetMovieRate
5320 PyMac_PRECHECK(SetMovieRate);
5321 #endif
5322 if (!PyArg_ParseTuple(_args, "O&",
5323 PyMac_GetFixed, &rate))
5324 return NULL;
5325 SetMovieRate(_self->ob_itself,
5326 rate);
5327 Py_INCREF(Py_None);
5328 _res = Py_None;
5329 return _res;
5332 static PyObject *MovieObj_GetMoviePreferredRate(MovieObject *_self, PyObject *_args)
5334 PyObject *_res = NULL;
5335 Fixed _rv;
5336 #ifndef GetMoviePreferredRate
5337 PyMac_PRECHECK(GetMoviePreferredRate);
5338 #endif
5339 if (!PyArg_ParseTuple(_args, ""))
5340 return NULL;
5341 _rv = GetMoviePreferredRate(_self->ob_itself);
5342 _res = Py_BuildValue("O&",
5343 PyMac_BuildFixed, _rv);
5344 return _res;
5347 static PyObject *MovieObj_SetMoviePreferredRate(MovieObject *_self, PyObject *_args)
5349 PyObject *_res = NULL;
5350 Fixed rate;
5351 #ifndef SetMoviePreferredRate
5352 PyMac_PRECHECK(SetMoviePreferredRate);
5353 #endif
5354 if (!PyArg_ParseTuple(_args, "O&",
5355 PyMac_GetFixed, &rate))
5356 return NULL;
5357 SetMoviePreferredRate(_self->ob_itself,
5358 rate);
5359 Py_INCREF(Py_None);
5360 _res = Py_None;
5361 return _res;
5364 static PyObject *MovieObj_GetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
5366 PyObject *_res = NULL;
5367 short _rv;
5368 #ifndef GetMoviePreferredVolume
5369 PyMac_PRECHECK(GetMoviePreferredVolume);
5370 #endif
5371 if (!PyArg_ParseTuple(_args, ""))
5372 return NULL;
5373 _rv = GetMoviePreferredVolume(_self->ob_itself);
5374 _res = Py_BuildValue("h",
5375 _rv);
5376 return _res;
5379 static PyObject *MovieObj_SetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
5381 PyObject *_res = NULL;
5382 short volume;
5383 #ifndef SetMoviePreferredVolume
5384 PyMac_PRECHECK(SetMoviePreferredVolume);
5385 #endif
5386 if (!PyArg_ParseTuple(_args, "h",
5387 &volume))
5388 return NULL;
5389 SetMoviePreferredVolume(_self->ob_itself,
5390 volume);
5391 Py_INCREF(Py_None);
5392 _res = Py_None;
5393 return _res;
5396 static PyObject *MovieObj_GetMovieVolume(MovieObject *_self, PyObject *_args)
5398 PyObject *_res = NULL;
5399 short _rv;
5400 #ifndef GetMovieVolume
5401 PyMac_PRECHECK(GetMovieVolume);
5402 #endif
5403 if (!PyArg_ParseTuple(_args, ""))
5404 return NULL;
5405 _rv = GetMovieVolume(_self->ob_itself);
5406 _res = Py_BuildValue("h",
5407 _rv);
5408 return _res;
5411 static PyObject *MovieObj_SetMovieVolume(MovieObject *_self, PyObject *_args)
5413 PyObject *_res = NULL;
5414 short volume;
5415 #ifndef SetMovieVolume
5416 PyMac_PRECHECK(SetMovieVolume);
5417 #endif
5418 if (!PyArg_ParseTuple(_args, "h",
5419 &volume))
5420 return NULL;
5421 SetMovieVolume(_self->ob_itself,
5422 volume);
5423 Py_INCREF(Py_None);
5424 _res = Py_None;
5425 return _res;
5428 static PyObject *MovieObj_GetMoviePreviewTime(MovieObject *_self, PyObject *_args)
5430 PyObject *_res = NULL;
5431 TimeValue previewTime;
5432 TimeValue previewDuration;
5433 #ifndef GetMoviePreviewTime
5434 PyMac_PRECHECK(GetMoviePreviewTime);
5435 #endif
5436 if (!PyArg_ParseTuple(_args, ""))
5437 return NULL;
5438 GetMoviePreviewTime(_self->ob_itself,
5439 &previewTime,
5440 &previewDuration);
5441 _res = Py_BuildValue("ll",
5442 previewTime,
5443 previewDuration);
5444 return _res;
5447 static PyObject *MovieObj_SetMoviePreviewTime(MovieObject *_self, PyObject *_args)
5449 PyObject *_res = NULL;
5450 TimeValue previewTime;
5451 TimeValue previewDuration;
5452 #ifndef SetMoviePreviewTime
5453 PyMac_PRECHECK(SetMoviePreviewTime);
5454 #endif
5455 if (!PyArg_ParseTuple(_args, "ll",
5456 &previewTime,
5457 &previewDuration))
5458 return NULL;
5459 SetMoviePreviewTime(_self->ob_itself,
5460 previewTime,
5461 previewDuration);
5462 Py_INCREF(Py_None);
5463 _res = Py_None;
5464 return _res;
5467 static PyObject *MovieObj_GetMoviePosterTime(MovieObject *_self, PyObject *_args)
5469 PyObject *_res = NULL;
5470 TimeValue _rv;
5471 #ifndef GetMoviePosterTime
5472 PyMac_PRECHECK(GetMoviePosterTime);
5473 #endif
5474 if (!PyArg_ParseTuple(_args, ""))
5475 return NULL;
5476 _rv = GetMoviePosterTime(_self->ob_itself);
5477 _res = Py_BuildValue("l",
5478 _rv);
5479 return _res;
5482 static PyObject *MovieObj_SetMoviePosterTime(MovieObject *_self, PyObject *_args)
5484 PyObject *_res = NULL;
5485 TimeValue posterTime;
5486 #ifndef SetMoviePosterTime
5487 PyMac_PRECHECK(SetMoviePosterTime);
5488 #endif
5489 if (!PyArg_ParseTuple(_args, "l",
5490 &posterTime))
5491 return NULL;
5492 SetMoviePosterTime(_self->ob_itself,
5493 posterTime);
5494 Py_INCREF(Py_None);
5495 _res = Py_None;
5496 return _res;
5499 static PyObject *MovieObj_GetMovieSelection(MovieObject *_self, PyObject *_args)
5501 PyObject *_res = NULL;
5502 TimeValue selectionTime;
5503 TimeValue selectionDuration;
5504 #ifndef GetMovieSelection
5505 PyMac_PRECHECK(GetMovieSelection);
5506 #endif
5507 if (!PyArg_ParseTuple(_args, ""))
5508 return NULL;
5509 GetMovieSelection(_self->ob_itself,
5510 &selectionTime,
5511 &selectionDuration);
5512 _res = Py_BuildValue("ll",
5513 selectionTime,
5514 selectionDuration);
5515 return _res;
5518 static PyObject *MovieObj_SetMovieSelection(MovieObject *_self, PyObject *_args)
5520 PyObject *_res = NULL;
5521 TimeValue selectionTime;
5522 TimeValue selectionDuration;
5523 #ifndef SetMovieSelection
5524 PyMac_PRECHECK(SetMovieSelection);
5525 #endif
5526 if (!PyArg_ParseTuple(_args, "ll",
5527 &selectionTime,
5528 &selectionDuration))
5529 return NULL;
5530 SetMovieSelection(_self->ob_itself,
5531 selectionTime,
5532 selectionDuration);
5533 Py_INCREF(Py_None);
5534 _res = Py_None;
5535 return _res;
5538 static PyObject *MovieObj_SetMovieActiveSegment(MovieObject *_self, PyObject *_args)
5540 PyObject *_res = NULL;
5541 TimeValue startTime;
5542 TimeValue duration;
5543 #ifndef SetMovieActiveSegment
5544 PyMac_PRECHECK(SetMovieActiveSegment);
5545 #endif
5546 if (!PyArg_ParseTuple(_args, "ll",
5547 &startTime,
5548 &duration))
5549 return NULL;
5550 SetMovieActiveSegment(_self->ob_itself,
5551 startTime,
5552 duration);
5553 Py_INCREF(Py_None);
5554 _res = Py_None;
5555 return _res;
5558 static PyObject *MovieObj_GetMovieActiveSegment(MovieObject *_self, PyObject *_args)
5560 PyObject *_res = NULL;
5561 TimeValue startTime;
5562 TimeValue duration;
5563 #ifndef GetMovieActiveSegment
5564 PyMac_PRECHECK(GetMovieActiveSegment);
5565 #endif
5566 if (!PyArg_ParseTuple(_args, ""))
5567 return NULL;
5568 GetMovieActiveSegment(_self->ob_itself,
5569 &startTime,
5570 &duration);
5571 _res = Py_BuildValue("ll",
5572 startTime,
5573 duration);
5574 return _res;
5577 static PyObject *MovieObj_GetMovieTime(MovieObject *_self, PyObject *_args)
5579 PyObject *_res = NULL;
5580 TimeValue _rv;
5581 TimeRecord currentTime;
5582 #ifndef GetMovieTime
5583 PyMac_PRECHECK(GetMovieTime);
5584 #endif
5585 if (!PyArg_ParseTuple(_args, ""))
5586 return NULL;
5587 _rv = GetMovieTime(_self->ob_itself,
5588 &currentTime);
5589 _res = Py_BuildValue("lO&",
5590 _rv,
5591 QtTimeRecord_New, &currentTime);
5592 return _res;
5595 static PyObject *MovieObj_SetMovieTime(MovieObject *_self, PyObject *_args)
5597 PyObject *_res = NULL;
5598 TimeRecord newtime;
5599 #ifndef SetMovieTime
5600 PyMac_PRECHECK(SetMovieTime);
5601 #endif
5602 if (!PyArg_ParseTuple(_args, "O&",
5603 QtTimeRecord_Convert, &newtime))
5604 return NULL;
5605 SetMovieTime(_self->ob_itself,
5606 &newtime);
5607 Py_INCREF(Py_None);
5608 _res = Py_None;
5609 return _res;
5612 static PyObject *MovieObj_SetMovieTimeValue(MovieObject *_self, PyObject *_args)
5614 PyObject *_res = NULL;
5615 TimeValue newtime;
5616 #ifndef SetMovieTimeValue
5617 PyMac_PRECHECK(SetMovieTimeValue);
5618 #endif
5619 if (!PyArg_ParseTuple(_args, "l",
5620 &newtime))
5621 return NULL;
5622 SetMovieTimeValue(_self->ob_itself,
5623 newtime);
5624 Py_INCREF(Py_None);
5625 _res = Py_None;
5626 return _res;
5629 static PyObject *MovieObj_GetMovieUserData(MovieObject *_self, PyObject *_args)
5631 PyObject *_res = NULL;
5632 UserData _rv;
5633 #ifndef GetMovieUserData
5634 PyMac_PRECHECK(GetMovieUserData);
5635 #endif
5636 if (!PyArg_ParseTuple(_args, ""))
5637 return NULL;
5638 _rv = GetMovieUserData(_self->ob_itself);
5639 _res = Py_BuildValue("O&",
5640 UserDataObj_New, _rv);
5641 return _res;
5644 static PyObject *MovieObj_GetMovieTrackCount(MovieObject *_self, PyObject *_args)
5646 PyObject *_res = NULL;
5647 long _rv;
5648 #ifndef GetMovieTrackCount
5649 PyMac_PRECHECK(GetMovieTrackCount);
5650 #endif
5651 if (!PyArg_ParseTuple(_args, ""))
5652 return NULL;
5653 _rv = GetMovieTrackCount(_self->ob_itself);
5654 _res = Py_BuildValue("l",
5655 _rv);
5656 return _res;
5659 static PyObject *MovieObj_GetMovieTrack(MovieObject *_self, PyObject *_args)
5661 PyObject *_res = NULL;
5662 Track _rv;
5663 long trackID;
5664 #ifndef GetMovieTrack
5665 PyMac_PRECHECK(GetMovieTrack);
5666 #endif
5667 if (!PyArg_ParseTuple(_args, "l",
5668 &trackID))
5669 return NULL;
5670 _rv = GetMovieTrack(_self->ob_itself,
5671 trackID);
5672 _res = Py_BuildValue("O&",
5673 TrackObj_New, _rv);
5674 return _res;
5677 static PyObject *MovieObj_GetMovieIndTrack(MovieObject *_self, PyObject *_args)
5679 PyObject *_res = NULL;
5680 Track _rv;
5681 long index;
5682 #ifndef GetMovieIndTrack
5683 PyMac_PRECHECK(GetMovieIndTrack);
5684 #endif
5685 if (!PyArg_ParseTuple(_args, "l",
5686 &index))
5687 return NULL;
5688 _rv = GetMovieIndTrack(_self->ob_itself,
5689 index);
5690 _res = Py_BuildValue("O&",
5691 TrackObj_New, _rv);
5692 return _res;
5695 static PyObject *MovieObj_GetMovieIndTrackType(MovieObject *_self, PyObject *_args)
5697 PyObject *_res = NULL;
5698 Track _rv;
5699 long index;
5700 OSType trackType;
5701 long flags;
5702 #ifndef GetMovieIndTrackType
5703 PyMac_PRECHECK(GetMovieIndTrackType);
5704 #endif
5705 if (!PyArg_ParseTuple(_args, "lO&l",
5706 &index,
5707 PyMac_GetOSType, &trackType,
5708 &flags))
5709 return NULL;
5710 _rv = GetMovieIndTrackType(_self->ob_itself,
5711 index,
5712 trackType,
5713 flags);
5714 _res = Py_BuildValue("O&",
5715 TrackObj_New, _rv);
5716 return _res;
5719 static PyObject *MovieObj_NewMovieTrack(MovieObject *_self, PyObject *_args)
5721 PyObject *_res = NULL;
5722 Track _rv;
5723 Fixed width;
5724 Fixed height;
5725 short trackVolume;
5726 #ifndef NewMovieTrack
5727 PyMac_PRECHECK(NewMovieTrack);
5728 #endif
5729 if (!PyArg_ParseTuple(_args, "O&O&h",
5730 PyMac_GetFixed, &width,
5731 PyMac_GetFixed, &height,
5732 &trackVolume))
5733 return NULL;
5734 _rv = NewMovieTrack(_self->ob_itself,
5735 width,
5736 height,
5737 trackVolume);
5738 _res = Py_BuildValue("O&",
5739 TrackObj_New, _rv);
5740 return _res;
5743 static PyObject *MovieObj_SetAutoTrackAlternatesEnabled(MovieObject *_self, PyObject *_args)
5745 PyObject *_res = NULL;
5746 Boolean enable;
5747 #ifndef SetAutoTrackAlternatesEnabled
5748 PyMac_PRECHECK(SetAutoTrackAlternatesEnabled);
5749 #endif
5750 if (!PyArg_ParseTuple(_args, "b",
5751 &enable))
5752 return NULL;
5753 SetAutoTrackAlternatesEnabled(_self->ob_itself,
5754 enable);
5755 Py_INCREF(Py_None);
5756 _res = Py_None;
5757 return _res;
5760 static PyObject *MovieObj_SelectMovieAlternates(MovieObject *_self, PyObject *_args)
5762 PyObject *_res = NULL;
5763 #ifndef SelectMovieAlternates
5764 PyMac_PRECHECK(SelectMovieAlternates);
5765 #endif
5766 if (!PyArg_ParseTuple(_args, ""))
5767 return NULL;
5768 SelectMovieAlternates(_self->ob_itself);
5769 Py_INCREF(Py_None);
5770 _res = Py_None;
5771 return _res;
5774 static PyObject *MovieObj_InsertMovieSegment(MovieObject *_self, PyObject *_args)
5776 PyObject *_res = NULL;
5777 OSErr _err;
5778 Movie dstMovie;
5779 TimeValue srcIn;
5780 TimeValue srcDuration;
5781 TimeValue dstIn;
5782 #ifndef InsertMovieSegment
5783 PyMac_PRECHECK(InsertMovieSegment);
5784 #endif
5785 if (!PyArg_ParseTuple(_args, "O&lll",
5786 MovieObj_Convert, &dstMovie,
5787 &srcIn,
5788 &srcDuration,
5789 &dstIn))
5790 return NULL;
5791 _err = InsertMovieSegment(_self->ob_itself,
5792 dstMovie,
5793 srcIn,
5794 srcDuration,
5795 dstIn);
5796 if (_err != noErr) return PyMac_Error(_err);
5797 Py_INCREF(Py_None);
5798 _res = Py_None;
5799 return _res;
5802 static PyObject *MovieObj_InsertEmptyMovieSegment(MovieObject *_self, PyObject *_args)
5804 PyObject *_res = NULL;
5805 OSErr _err;
5806 TimeValue dstIn;
5807 TimeValue dstDuration;
5808 #ifndef InsertEmptyMovieSegment
5809 PyMac_PRECHECK(InsertEmptyMovieSegment);
5810 #endif
5811 if (!PyArg_ParseTuple(_args, "ll",
5812 &dstIn,
5813 &dstDuration))
5814 return NULL;
5815 _err = InsertEmptyMovieSegment(_self->ob_itself,
5816 dstIn,
5817 dstDuration);
5818 if (_err != noErr) return PyMac_Error(_err);
5819 Py_INCREF(Py_None);
5820 _res = Py_None;
5821 return _res;
5824 static PyObject *MovieObj_DeleteMovieSegment(MovieObject *_self, PyObject *_args)
5826 PyObject *_res = NULL;
5827 OSErr _err;
5828 TimeValue startTime;
5829 TimeValue duration;
5830 #ifndef DeleteMovieSegment
5831 PyMac_PRECHECK(DeleteMovieSegment);
5832 #endif
5833 if (!PyArg_ParseTuple(_args, "ll",
5834 &startTime,
5835 &duration))
5836 return NULL;
5837 _err = DeleteMovieSegment(_self->ob_itself,
5838 startTime,
5839 duration);
5840 if (_err != noErr) return PyMac_Error(_err);
5841 Py_INCREF(Py_None);
5842 _res = Py_None;
5843 return _res;
5846 static PyObject *MovieObj_ScaleMovieSegment(MovieObject *_self, PyObject *_args)
5848 PyObject *_res = NULL;
5849 OSErr _err;
5850 TimeValue startTime;
5851 TimeValue oldDuration;
5852 TimeValue newDuration;
5853 #ifndef ScaleMovieSegment
5854 PyMac_PRECHECK(ScaleMovieSegment);
5855 #endif
5856 if (!PyArg_ParseTuple(_args, "lll",
5857 &startTime,
5858 &oldDuration,
5859 &newDuration))
5860 return NULL;
5861 _err = ScaleMovieSegment(_self->ob_itself,
5862 startTime,
5863 oldDuration,
5864 newDuration);
5865 if (_err != noErr) return PyMac_Error(_err);
5866 Py_INCREF(Py_None);
5867 _res = Py_None;
5868 return _res;
5871 static PyObject *MovieObj_CutMovieSelection(MovieObject *_self, PyObject *_args)
5873 PyObject *_res = NULL;
5874 Movie _rv;
5875 #ifndef CutMovieSelection
5876 PyMac_PRECHECK(CutMovieSelection);
5877 #endif
5878 if (!PyArg_ParseTuple(_args, ""))
5879 return NULL;
5880 _rv = CutMovieSelection(_self->ob_itself);
5881 _res = Py_BuildValue("O&",
5882 MovieObj_New, _rv);
5883 return _res;
5886 static PyObject *MovieObj_CopyMovieSelection(MovieObject *_self, PyObject *_args)
5888 PyObject *_res = NULL;
5889 Movie _rv;
5890 #ifndef CopyMovieSelection
5891 PyMac_PRECHECK(CopyMovieSelection);
5892 #endif
5893 if (!PyArg_ParseTuple(_args, ""))
5894 return NULL;
5895 _rv = CopyMovieSelection(_self->ob_itself);
5896 _res = Py_BuildValue("O&",
5897 MovieObj_New, _rv);
5898 return _res;
5901 static PyObject *MovieObj_PasteMovieSelection(MovieObject *_self, PyObject *_args)
5903 PyObject *_res = NULL;
5904 Movie src;
5905 #ifndef PasteMovieSelection
5906 PyMac_PRECHECK(PasteMovieSelection);
5907 #endif
5908 if (!PyArg_ParseTuple(_args, "O&",
5909 MovieObj_Convert, &src))
5910 return NULL;
5911 PasteMovieSelection(_self->ob_itself,
5912 src);
5913 Py_INCREF(Py_None);
5914 _res = Py_None;
5915 return _res;
5918 static PyObject *MovieObj_AddMovieSelection(MovieObject *_self, PyObject *_args)
5920 PyObject *_res = NULL;
5921 Movie src;
5922 #ifndef AddMovieSelection
5923 PyMac_PRECHECK(AddMovieSelection);
5924 #endif
5925 if (!PyArg_ParseTuple(_args, "O&",
5926 MovieObj_Convert, &src))
5927 return NULL;
5928 AddMovieSelection(_self->ob_itself,
5929 src);
5930 Py_INCREF(Py_None);
5931 _res = Py_None;
5932 return _res;
5935 static PyObject *MovieObj_ClearMovieSelection(MovieObject *_self, PyObject *_args)
5937 PyObject *_res = NULL;
5938 #ifndef ClearMovieSelection
5939 PyMac_PRECHECK(ClearMovieSelection);
5940 #endif
5941 if (!PyArg_ParseTuple(_args, ""))
5942 return NULL;
5943 ClearMovieSelection(_self->ob_itself);
5944 Py_INCREF(Py_None);
5945 _res = Py_None;
5946 return _res;
5949 static PyObject *MovieObj_PutMovieIntoTypedHandle(MovieObject *_self, PyObject *_args)
5951 PyObject *_res = NULL;
5952 OSErr _err;
5953 Track targetTrack;
5954 OSType handleType;
5955 Handle publicMovie;
5956 TimeValue start;
5957 TimeValue dur;
5958 long flags;
5959 ComponentInstance userComp;
5960 #ifndef PutMovieIntoTypedHandle
5961 PyMac_PRECHECK(PutMovieIntoTypedHandle);
5962 #endif
5963 if (!PyArg_ParseTuple(_args, "O&O&O&lllO&",
5964 TrackObj_Convert, &targetTrack,
5965 PyMac_GetOSType, &handleType,
5966 ResObj_Convert, &publicMovie,
5967 &start,
5968 &dur,
5969 &flags,
5970 CmpInstObj_Convert, &userComp))
5971 return NULL;
5972 _err = PutMovieIntoTypedHandle(_self->ob_itself,
5973 targetTrack,
5974 handleType,
5975 publicMovie,
5976 start,
5977 dur,
5978 flags,
5979 userComp);
5980 if (_err != noErr) return PyMac_Error(_err);
5981 Py_INCREF(Py_None);
5982 _res = Py_None;
5983 return _res;
5986 static PyObject *MovieObj_CopyMovieSettings(MovieObject *_self, PyObject *_args)
5988 PyObject *_res = NULL;
5989 OSErr _err;
5990 Movie dstMovie;
5991 #ifndef CopyMovieSettings
5992 PyMac_PRECHECK(CopyMovieSettings);
5993 #endif
5994 if (!PyArg_ParseTuple(_args, "O&",
5995 MovieObj_Convert, &dstMovie))
5996 return NULL;
5997 _err = CopyMovieSettings(_self->ob_itself,
5998 dstMovie);
5999 if (_err != noErr) return PyMac_Error(_err);
6000 Py_INCREF(Py_None);
6001 _res = Py_None;
6002 return _res;
6005 static PyObject *MovieObj_ConvertMovieToFile(MovieObject *_self, PyObject *_args)
6007 PyObject *_res = NULL;
6008 OSErr _err;
6009 Track onlyTrack;
6010 FSSpec outputFile;
6011 OSType fileType;
6012 OSType creator;
6013 ScriptCode scriptTag;
6014 short resID;
6015 long flags;
6016 ComponentInstance userComp;
6017 #ifndef ConvertMovieToFile
6018 PyMac_PRECHECK(ConvertMovieToFile);
6019 #endif
6020 if (!PyArg_ParseTuple(_args, "O&O&O&O&hlO&",
6021 TrackObj_Convert, &onlyTrack,
6022 PyMac_GetFSSpec, &outputFile,
6023 PyMac_GetOSType, &fileType,
6024 PyMac_GetOSType, &creator,
6025 &scriptTag,
6026 &flags,
6027 CmpInstObj_Convert, &userComp))
6028 return NULL;
6029 _err = ConvertMovieToFile(_self->ob_itself,
6030 onlyTrack,
6031 &outputFile,
6032 fileType,
6033 creator,
6034 scriptTag,
6035 &resID,
6036 flags,
6037 userComp);
6038 if (_err != noErr) return PyMac_Error(_err);
6039 _res = Py_BuildValue("h",
6040 resID);
6041 return _res;
6044 static PyObject *MovieObj_GetMovieDataSize(MovieObject *_self, PyObject *_args)
6046 PyObject *_res = NULL;
6047 long _rv;
6048 TimeValue startTime;
6049 TimeValue duration;
6050 #ifndef GetMovieDataSize
6051 PyMac_PRECHECK(GetMovieDataSize);
6052 #endif
6053 if (!PyArg_ParseTuple(_args, "ll",
6054 &startTime,
6055 &duration))
6056 return NULL;
6057 _rv = GetMovieDataSize(_self->ob_itself,
6058 startTime,
6059 duration);
6060 _res = Py_BuildValue("l",
6061 _rv);
6062 return _res;
6065 static PyObject *MovieObj_GetMovieDataSize64(MovieObject *_self, PyObject *_args)
6067 PyObject *_res = NULL;
6068 OSErr _err;
6069 TimeValue startTime;
6070 TimeValue duration;
6071 wide dataSize;
6072 #ifndef GetMovieDataSize64
6073 PyMac_PRECHECK(GetMovieDataSize64);
6074 #endif
6075 if (!PyArg_ParseTuple(_args, "ll",
6076 &startTime,
6077 &duration))
6078 return NULL;
6079 _err = GetMovieDataSize64(_self->ob_itself,
6080 startTime,
6081 duration,
6082 &dataSize);
6083 if (_err != noErr) return PyMac_Error(_err);
6084 _res = Py_BuildValue("O&",
6085 PyMac_Buildwide, dataSize);
6086 return _res;
6089 static PyObject *MovieObj_PtInMovie(MovieObject *_self, PyObject *_args)
6091 PyObject *_res = NULL;
6092 Boolean _rv;
6093 Point pt;
6094 #ifndef PtInMovie
6095 PyMac_PRECHECK(PtInMovie);
6096 #endif
6097 if (!PyArg_ParseTuple(_args, "O&",
6098 PyMac_GetPoint, &pt))
6099 return NULL;
6100 _rv = PtInMovie(_self->ob_itself,
6101 pt);
6102 _res = Py_BuildValue("b",
6103 _rv);
6104 return _res;
6107 static PyObject *MovieObj_SetMovieLanguage(MovieObject *_self, PyObject *_args)
6109 PyObject *_res = NULL;
6110 long language;
6111 #ifndef SetMovieLanguage
6112 PyMac_PRECHECK(SetMovieLanguage);
6113 #endif
6114 if (!PyArg_ParseTuple(_args, "l",
6115 &language))
6116 return NULL;
6117 SetMovieLanguage(_self->ob_itself,
6118 language);
6119 Py_INCREF(Py_None);
6120 _res = Py_None;
6121 return _res;
6124 static PyObject *MovieObj_GetMovieNextInterestingTime(MovieObject *_self, PyObject *_args)
6126 PyObject *_res = NULL;
6127 short interestingTimeFlags;
6128 short numMediaTypes;
6129 OSType whichMediaTypes;
6130 TimeValue time;
6131 Fixed rate;
6132 TimeValue interestingTime;
6133 TimeValue interestingDuration;
6134 #ifndef GetMovieNextInterestingTime
6135 PyMac_PRECHECK(GetMovieNextInterestingTime);
6136 #endif
6137 if (!PyArg_ParseTuple(_args, "hhO&lO&",
6138 &interestingTimeFlags,
6139 &numMediaTypes,
6140 PyMac_GetOSType, &whichMediaTypes,
6141 &time,
6142 PyMac_GetFixed, &rate))
6143 return NULL;
6144 GetMovieNextInterestingTime(_self->ob_itself,
6145 interestingTimeFlags,
6146 numMediaTypes,
6147 &whichMediaTypes,
6148 time,
6149 rate,
6150 &interestingTime,
6151 &interestingDuration);
6152 _res = Py_BuildValue("ll",
6153 interestingTime,
6154 interestingDuration);
6155 return _res;
6158 static PyObject *MovieObj_AddMovieResource(MovieObject *_self, PyObject *_args)
6160 PyObject *_res = NULL;
6161 OSErr _err;
6162 short resRefNum;
6163 short resId;
6164 Str255 resName;
6165 #ifndef AddMovieResource
6166 PyMac_PRECHECK(AddMovieResource);
6167 #endif
6168 if (!PyArg_ParseTuple(_args, "hO&",
6169 &resRefNum,
6170 PyMac_GetStr255, resName))
6171 return NULL;
6172 _err = AddMovieResource(_self->ob_itself,
6173 resRefNum,
6174 &resId,
6175 resName);
6176 if (_err != noErr) return PyMac_Error(_err);
6177 _res = Py_BuildValue("h",
6178 resId);
6179 return _res;
6182 static PyObject *MovieObj_UpdateMovieResource(MovieObject *_self, PyObject *_args)
6184 PyObject *_res = NULL;
6185 OSErr _err;
6186 short resRefNum;
6187 short resId;
6188 Str255 resName;
6189 #ifndef UpdateMovieResource
6190 PyMac_PRECHECK(UpdateMovieResource);
6191 #endif
6192 if (!PyArg_ParseTuple(_args, "hhO&",
6193 &resRefNum,
6194 &resId,
6195 PyMac_GetStr255, resName))
6196 return NULL;
6197 _err = UpdateMovieResource(_self->ob_itself,
6198 resRefNum,
6199 resId,
6200 resName);
6201 if (_err != noErr) return PyMac_Error(_err);
6202 Py_INCREF(Py_None);
6203 _res = Py_None;
6204 return _res;
6207 static PyObject *MovieObj_HasMovieChanged(MovieObject *_self, PyObject *_args)
6209 PyObject *_res = NULL;
6210 Boolean _rv;
6211 #ifndef HasMovieChanged
6212 PyMac_PRECHECK(HasMovieChanged);
6213 #endif
6214 if (!PyArg_ParseTuple(_args, ""))
6215 return NULL;
6216 _rv = HasMovieChanged(_self->ob_itself);
6217 _res = Py_BuildValue("b",
6218 _rv);
6219 return _res;
6222 static PyObject *MovieObj_ClearMovieChanged(MovieObject *_self, PyObject *_args)
6224 PyObject *_res = NULL;
6225 #ifndef ClearMovieChanged
6226 PyMac_PRECHECK(ClearMovieChanged);
6227 #endif
6228 if (!PyArg_ParseTuple(_args, ""))
6229 return NULL;
6230 ClearMovieChanged(_self->ob_itself);
6231 Py_INCREF(Py_None);
6232 _res = Py_None;
6233 return _res;
6236 static PyObject *MovieObj_SetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
6238 PyObject *_res = NULL;
6239 OSErr _err;
6240 Handle dataRef;
6241 OSType dataRefType;
6242 #ifndef SetMovieDefaultDataRef
6243 PyMac_PRECHECK(SetMovieDefaultDataRef);
6244 #endif
6245 if (!PyArg_ParseTuple(_args, "O&O&",
6246 ResObj_Convert, &dataRef,
6247 PyMac_GetOSType, &dataRefType))
6248 return NULL;
6249 _err = SetMovieDefaultDataRef(_self->ob_itself,
6250 dataRef,
6251 dataRefType);
6252 if (_err != noErr) return PyMac_Error(_err);
6253 Py_INCREF(Py_None);
6254 _res = Py_None;
6255 return _res;
6258 static PyObject *MovieObj_GetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
6260 PyObject *_res = NULL;
6261 OSErr _err;
6262 Handle dataRef;
6263 OSType dataRefType;
6264 #ifndef GetMovieDefaultDataRef
6265 PyMac_PRECHECK(GetMovieDefaultDataRef);
6266 #endif
6267 if (!PyArg_ParseTuple(_args, ""))
6268 return NULL;
6269 _err = GetMovieDefaultDataRef(_self->ob_itself,
6270 &dataRef,
6271 &dataRefType);
6272 if (_err != noErr) return PyMac_Error(_err);
6273 _res = Py_BuildValue("O&O&",
6274 ResObj_New, dataRef,
6275 PyMac_BuildOSType, dataRefType);
6276 return _res;
6279 static PyObject *MovieObj_SetMovieColorTable(MovieObject *_self, PyObject *_args)
6281 PyObject *_res = NULL;
6282 OSErr _err;
6283 CTabHandle ctab;
6284 #ifndef SetMovieColorTable
6285 PyMac_PRECHECK(SetMovieColorTable);
6286 #endif
6287 if (!PyArg_ParseTuple(_args, "O&",
6288 ResObj_Convert, &ctab))
6289 return NULL;
6290 _err = SetMovieColorTable(_self->ob_itself,
6291 ctab);
6292 if (_err != noErr) return PyMac_Error(_err);
6293 Py_INCREF(Py_None);
6294 _res = Py_None;
6295 return _res;
6298 static PyObject *MovieObj_GetMovieColorTable(MovieObject *_self, PyObject *_args)
6300 PyObject *_res = NULL;
6301 OSErr _err;
6302 CTabHandle ctab;
6303 #ifndef GetMovieColorTable
6304 PyMac_PRECHECK(GetMovieColorTable);
6305 #endif
6306 if (!PyArg_ParseTuple(_args, ""))
6307 return NULL;
6308 _err = GetMovieColorTable(_self->ob_itself,
6309 &ctab);
6310 if (_err != noErr) return PyMac_Error(_err);
6311 _res = Py_BuildValue("O&",
6312 ResObj_New, ctab);
6313 return _res;
6316 static PyObject *MovieObj_FlattenMovie(MovieObject *_self, PyObject *_args)
6318 PyObject *_res = NULL;
6319 long movieFlattenFlags;
6320 FSSpec theFile;
6321 OSType creator;
6322 ScriptCode scriptTag;
6323 long createMovieFileFlags;
6324 short resId;
6325 Str255 resName;
6326 #ifndef FlattenMovie
6327 PyMac_PRECHECK(FlattenMovie);
6328 #endif
6329 if (!PyArg_ParseTuple(_args, "lO&O&hlO&",
6330 &movieFlattenFlags,
6331 PyMac_GetFSSpec, &theFile,
6332 PyMac_GetOSType, &creator,
6333 &scriptTag,
6334 &createMovieFileFlags,
6335 PyMac_GetStr255, resName))
6336 return NULL;
6337 FlattenMovie(_self->ob_itself,
6338 movieFlattenFlags,
6339 &theFile,
6340 creator,
6341 scriptTag,
6342 createMovieFileFlags,
6343 &resId,
6344 resName);
6345 _res = Py_BuildValue("h",
6346 resId);
6347 return _res;
6350 static PyObject *MovieObj_FlattenMovieData(MovieObject *_self, PyObject *_args)
6352 PyObject *_res = NULL;
6353 Movie _rv;
6354 long movieFlattenFlags;
6355 FSSpec theFile;
6356 OSType creator;
6357 ScriptCode scriptTag;
6358 long createMovieFileFlags;
6359 #ifndef FlattenMovieData
6360 PyMac_PRECHECK(FlattenMovieData);
6361 #endif
6362 if (!PyArg_ParseTuple(_args, "lO&O&hl",
6363 &movieFlattenFlags,
6364 PyMac_GetFSSpec, &theFile,
6365 PyMac_GetOSType, &creator,
6366 &scriptTag,
6367 &createMovieFileFlags))
6368 return NULL;
6369 _rv = FlattenMovieData(_self->ob_itself,
6370 movieFlattenFlags,
6371 &theFile,
6372 creator,
6373 scriptTag,
6374 createMovieFileFlags);
6375 _res = Py_BuildValue("O&",
6376 MovieObj_New, _rv);
6377 return _res;
6380 static PyObject *MovieObj_MovieSearchText(MovieObject *_self, PyObject *_args)
6382 PyObject *_res = NULL;
6383 OSErr _err;
6384 Ptr text;
6385 long size;
6386 long searchFlags;
6387 Track searchTrack;
6388 TimeValue searchTime;
6389 long searchOffset;
6390 #ifndef MovieSearchText
6391 PyMac_PRECHECK(MovieSearchText);
6392 #endif
6393 if (!PyArg_ParseTuple(_args, "sll",
6394 &text,
6395 &size,
6396 &searchFlags))
6397 return NULL;
6398 _err = MovieSearchText(_self->ob_itself,
6399 text,
6400 size,
6401 searchFlags,
6402 &searchTrack,
6403 &searchTime,
6404 &searchOffset);
6405 if (_err != noErr) return PyMac_Error(_err);
6406 _res = Py_BuildValue("O&ll",
6407 TrackObj_New, searchTrack,
6408 searchTime,
6409 searchOffset);
6410 return _res;
6413 static PyObject *MovieObj_GetPosterBox(MovieObject *_self, PyObject *_args)
6415 PyObject *_res = NULL;
6416 Rect boxRect;
6417 #ifndef GetPosterBox
6418 PyMac_PRECHECK(GetPosterBox);
6419 #endif
6420 if (!PyArg_ParseTuple(_args, ""))
6421 return NULL;
6422 GetPosterBox(_self->ob_itself,
6423 &boxRect);
6424 _res = Py_BuildValue("O&",
6425 PyMac_BuildRect, &boxRect);
6426 return _res;
6429 static PyObject *MovieObj_SetPosterBox(MovieObject *_self, PyObject *_args)
6431 PyObject *_res = NULL;
6432 Rect boxRect;
6433 #ifndef SetPosterBox
6434 PyMac_PRECHECK(SetPosterBox);
6435 #endif
6436 if (!PyArg_ParseTuple(_args, "O&",
6437 PyMac_GetRect, &boxRect))
6438 return NULL;
6439 SetPosterBox(_self->ob_itself,
6440 &boxRect);
6441 Py_INCREF(Py_None);
6442 _res = Py_None;
6443 return _res;
6446 static PyObject *MovieObj_GetMovieSegmentDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
6448 PyObject *_res = NULL;
6449 RgnHandle _rv;
6450 TimeValue time;
6451 TimeValue duration;
6452 #ifndef GetMovieSegmentDisplayBoundsRgn
6453 PyMac_PRECHECK(GetMovieSegmentDisplayBoundsRgn);
6454 #endif
6455 if (!PyArg_ParseTuple(_args, "ll",
6456 &time,
6457 &duration))
6458 return NULL;
6459 _rv = GetMovieSegmentDisplayBoundsRgn(_self->ob_itself,
6460 time,
6461 duration);
6462 _res = Py_BuildValue("O&",
6463 ResObj_New, _rv);
6464 return _res;
6467 static PyObject *MovieObj_GetMovieStatus(MovieObject *_self, PyObject *_args)
6469 PyObject *_res = NULL;
6470 ComponentResult _rv;
6471 Track firstProblemTrack;
6472 #ifndef GetMovieStatus
6473 PyMac_PRECHECK(GetMovieStatus);
6474 #endif
6475 if (!PyArg_ParseTuple(_args, ""))
6476 return NULL;
6477 _rv = GetMovieStatus(_self->ob_itself,
6478 &firstProblemTrack);
6479 _res = Py_BuildValue("lO&",
6480 _rv,
6481 TrackObj_New, firstProblemTrack);
6482 return _res;
6485 static PyObject *MovieObj_NewMovieController(MovieObject *_self, PyObject *_args)
6487 PyObject *_res = NULL;
6488 MovieController _rv;
6489 Rect movieRect;
6490 long someFlags;
6491 #ifndef NewMovieController
6492 PyMac_PRECHECK(NewMovieController);
6493 #endif
6494 if (!PyArg_ParseTuple(_args, "O&l",
6495 PyMac_GetRect, &movieRect,
6496 &someFlags))
6497 return NULL;
6498 _rv = NewMovieController(_self->ob_itself,
6499 &movieRect,
6500 someFlags);
6501 _res = Py_BuildValue("O&",
6502 MovieCtlObj_New, _rv);
6503 return _res;
6506 static PyObject *MovieObj_PutMovieOnScrap(MovieObject *_self, PyObject *_args)
6508 PyObject *_res = NULL;
6509 OSErr _err;
6510 long movieScrapFlags;
6511 #ifndef PutMovieOnScrap
6512 PyMac_PRECHECK(PutMovieOnScrap);
6513 #endif
6514 if (!PyArg_ParseTuple(_args, "l",
6515 &movieScrapFlags))
6516 return NULL;
6517 _err = PutMovieOnScrap(_self->ob_itself,
6518 movieScrapFlags);
6519 if (_err != noErr) return PyMac_Error(_err);
6520 Py_INCREF(Py_None);
6521 _res = Py_None;
6522 return _res;
6525 static PyObject *MovieObj_SetMoviePlayHints(MovieObject *_self, PyObject *_args)
6527 PyObject *_res = NULL;
6528 long flags;
6529 long flagsMask;
6530 #ifndef SetMoviePlayHints
6531 PyMac_PRECHECK(SetMoviePlayHints);
6532 #endif
6533 if (!PyArg_ParseTuple(_args, "ll",
6534 &flags,
6535 &flagsMask))
6536 return NULL;
6537 SetMoviePlayHints(_self->ob_itself,
6538 flags,
6539 flagsMask);
6540 Py_INCREF(Py_None);
6541 _res = Py_None;
6542 return _res;
6545 static PyObject *MovieObj_GetMaxLoadedTimeInMovie(MovieObject *_self, PyObject *_args)
6547 PyObject *_res = NULL;
6548 OSErr _err;
6549 TimeValue time;
6550 #ifndef GetMaxLoadedTimeInMovie
6551 PyMac_PRECHECK(GetMaxLoadedTimeInMovie);
6552 #endif
6553 if (!PyArg_ParseTuple(_args, ""))
6554 return NULL;
6555 _err = GetMaxLoadedTimeInMovie(_self->ob_itself,
6556 &time);
6557 if (_err != noErr) return PyMac_Error(_err);
6558 _res = Py_BuildValue("l",
6559 time);
6560 return _res;
6563 static PyObject *MovieObj_QTMovieNeedsTimeTable(MovieObject *_self, PyObject *_args)
6565 PyObject *_res = NULL;
6566 OSErr _err;
6567 Boolean needsTimeTable;
6568 #ifndef QTMovieNeedsTimeTable
6569 PyMac_PRECHECK(QTMovieNeedsTimeTable);
6570 #endif
6571 if (!PyArg_ParseTuple(_args, ""))
6572 return NULL;
6573 _err = QTMovieNeedsTimeTable(_self->ob_itself,
6574 &needsTimeTable);
6575 if (_err != noErr) return PyMac_Error(_err);
6576 _res = Py_BuildValue("b",
6577 needsTimeTable);
6578 return _res;
6581 static PyObject *MovieObj_QTGetDataRefMaxFileOffset(MovieObject *_self, PyObject *_args)
6583 PyObject *_res = NULL;
6584 OSErr _err;
6585 OSType dataRefType;
6586 Handle dataRef;
6587 long offset;
6588 #ifndef QTGetDataRefMaxFileOffset
6589 PyMac_PRECHECK(QTGetDataRefMaxFileOffset);
6590 #endif
6591 if (!PyArg_ParseTuple(_args, "O&O&",
6592 PyMac_GetOSType, &dataRefType,
6593 ResObj_Convert, &dataRef))
6594 return NULL;
6595 _err = QTGetDataRefMaxFileOffset(_self->ob_itself,
6596 dataRefType,
6597 dataRef,
6598 &offset);
6599 if (_err != noErr) return PyMac_Error(_err);
6600 _res = Py_BuildValue("l",
6601 offset);
6602 return _res;
6605 static PyMethodDef MovieObj_methods[] = {
6606 {"MoviesTask", (PyCFunction)MovieObj_MoviesTask, 1,
6607 PyDoc_STR("(long maxMilliSecToUse) -> None")},
6608 {"PrerollMovie", (PyCFunction)MovieObj_PrerollMovie, 1,
6609 PyDoc_STR("(TimeValue time, Fixed Rate) -> None")},
6610 {"AbortPrePrerollMovie", (PyCFunction)MovieObj_AbortPrePrerollMovie, 1,
6611 PyDoc_STR("(OSErr err) -> None")},
6612 {"LoadMovieIntoRam", (PyCFunction)MovieObj_LoadMovieIntoRam, 1,
6613 PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
6614 {"SetMovieActive", (PyCFunction)MovieObj_SetMovieActive, 1,
6615 PyDoc_STR("(Boolean active) -> None")},
6616 {"GetMovieActive", (PyCFunction)MovieObj_GetMovieActive, 1,
6617 PyDoc_STR("() -> (Boolean _rv)")},
6618 {"StartMovie", (PyCFunction)MovieObj_StartMovie, 1,
6619 PyDoc_STR("() -> None")},
6620 {"StopMovie", (PyCFunction)MovieObj_StopMovie, 1,
6621 PyDoc_STR("() -> None")},
6622 {"GoToBeginningOfMovie", (PyCFunction)MovieObj_GoToBeginningOfMovie, 1,
6623 PyDoc_STR("() -> None")},
6624 {"GoToEndOfMovie", (PyCFunction)MovieObj_GoToEndOfMovie, 1,
6625 PyDoc_STR("() -> None")},
6626 {"IsMovieDone", (PyCFunction)MovieObj_IsMovieDone, 1,
6627 PyDoc_STR("() -> (Boolean _rv)")},
6628 {"GetMoviePreviewMode", (PyCFunction)MovieObj_GetMoviePreviewMode, 1,
6629 PyDoc_STR("() -> (Boolean _rv)")},
6630 {"SetMoviePreviewMode", (PyCFunction)MovieObj_SetMoviePreviewMode, 1,
6631 PyDoc_STR("(Boolean usePreview) -> None")},
6632 {"ShowMoviePoster", (PyCFunction)MovieObj_ShowMoviePoster, 1,
6633 PyDoc_STR("() -> None")},
6634 {"GetMovieTimeBase", (PyCFunction)MovieObj_GetMovieTimeBase, 1,
6635 PyDoc_STR("() -> (TimeBase _rv)")},
6636 {"SetMovieMasterTimeBase", (PyCFunction)MovieObj_SetMovieMasterTimeBase, 1,
6637 PyDoc_STR("(TimeBase tb, TimeRecord slaveZero) -> None")},
6638 {"SetMovieMasterClock", (PyCFunction)MovieObj_SetMovieMasterClock, 1,
6639 PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
6640 {"GetMovieGWorld", (PyCFunction)MovieObj_GetMovieGWorld, 1,
6641 PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
6642 {"SetMovieGWorld", (PyCFunction)MovieObj_SetMovieGWorld, 1,
6643 PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
6644 {"GetMovieNaturalBoundsRect", (PyCFunction)MovieObj_GetMovieNaturalBoundsRect, 1,
6645 PyDoc_STR("() -> (Rect naturalBounds)")},
6646 {"GetNextTrackForCompositing", (PyCFunction)MovieObj_GetNextTrackForCompositing, 1,
6647 PyDoc_STR("(Track theTrack) -> (Track _rv)")},
6648 {"GetPrevTrackForCompositing", (PyCFunction)MovieObj_GetPrevTrackForCompositing, 1,
6649 PyDoc_STR("(Track theTrack) -> (Track _rv)")},
6650 {"GetMoviePict", (PyCFunction)MovieObj_GetMoviePict, 1,
6651 PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
6652 {"GetMoviePosterPict", (PyCFunction)MovieObj_GetMoviePosterPict, 1,
6653 PyDoc_STR("() -> (PicHandle _rv)")},
6654 {"UpdateMovie", (PyCFunction)MovieObj_UpdateMovie, 1,
6655 PyDoc_STR("() -> None")},
6656 {"InvalidateMovieRegion", (PyCFunction)MovieObj_InvalidateMovieRegion, 1,
6657 PyDoc_STR("(RgnHandle invalidRgn) -> None")},
6658 {"GetMovieBox", (PyCFunction)MovieObj_GetMovieBox, 1,
6659 PyDoc_STR("() -> (Rect boxRect)")},
6660 {"SetMovieBox", (PyCFunction)MovieObj_SetMovieBox, 1,
6661 PyDoc_STR("(Rect boxRect) -> None")},
6662 {"GetMovieDisplayClipRgn", (PyCFunction)MovieObj_GetMovieDisplayClipRgn, 1,
6663 PyDoc_STR("() -> (RgnHandle _rv)")},
6664 {"SetMovieDisplayClipRgn", (PyCFunction)MovieObj_SetMovieDisplayClipRgn, 1,
6665 PyDoc_STR("(RgnHandle theClip) -> None")},
6666 {"GetMovieClipRgn", (PyCFunction)MovieObj_GetMovieClipRgn, 1,
6667 PyDoc_STR("() -> (RgnHandle _rv)")},
6668 {"SetMovieClipRgn", (PyCFunction)MovieObj_SetMovieClipRgn, 1,
6669 PyDoc_STR("(RgnHandle theClip) -> None")},
6670 {"GetMovieDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieDisplayBoundsRgn, 1,
6671 PyDoc_STR("() -> (RgnHandle _rv)")},
6672 {"GetMovieBoundsRgn", (PyCFunction)MovieObj_GetMovieBoundsRgn, 1,
6673 PyDoc_STR("() -> (RgnHandle _rv)")},
6674 {"SetMovieVideoOutput", (PyCFunction)MovieObj_SetMovieVideoOutput, 1,
6675 PyDoc_STR("(ComponentInstance vout) -> None")},
6676 {"PutMovieIntoHandle", (PyCFunction)MovieObj_PutMovieIntoHandle, 1,
6677 PyDoc_STR("(Handle publicMovie) -> None")},
6678 {"PutMovieIntoDataFork", (PyCFunction)MovieObj_PutMovieIntoDataFork, 1,
6679 PyDoc_STR("(short fRefNum, long offset, long maxSize) -> None")},
6680 {"PutMovieIntoDataFork64", (PyCFunction)MovieObj_PutMovieIntoDataFork64, 1,
6681 PyDoc_STR("(long fRefNum, wide offset, unsigned long maxSize) -> None")},
6682 {"GetMovieCreationTime", (PyCFunction)MovieObj_GetMovieCreationTime, 1,
6683 PyDoc_STR("() -> (unsigned long _rv)")},
6684 {"GetMovieModificationTime", (PyCFunction)MovieObj_GetMovieModificationTime, 1,
6685 PyDoc_STR("() -> (unsigned long _rv)")},
6686 {"GetMovieTimeScale", (PyCFunction)MovieObj_GetMovieTimeScale, 1,
6687 PyDoc_STR("() -> (TimeScale _rv)")},
6688 {"SetMovieTimeScale", (PyCFunction)MovieObj_SetMovieTimeScale, 1,
6689 PyDoc_STR("(TimeScale timeScale) -> None")},
6690 {"GetMovieDuration", (PyCFunction)MovieObj_GetMovieDuration, 1,
6691 PyDoc_STR("() -> (TimeValue _rv)")},
6692 {"GetMovieRate", (PyCFunction)MovieObj_GetMovieRate, 1,
6693 PyDoc_STR("() -> (Fixed _rv)")},
6694 {"SetMovieRate", (PyCFunction)MovieObj_SetMovieRate, 1,
6695 PyDoc_STR("(Fixed rate) -> None")},
6696 {"GetMoviePreferredRate", (PyCFunction)MovieObj_GetMoviePreferredRate, 1,
6697 PyDoc_STR("() -> (Fixed _rv)")},
6698 {"SetMoviePreferredRate", (PyCFunction)MovieObj_SetMoviePreferredRate, 1,
6699 PyDoc_STR("(Fixed rate) -> None")},
6700 {"GetMoviePreferredVolume", (PyCFunction)MovieObj_GetMoviePreferredVolume, 1,
6701 PyDoc_STR("() -> (short _rv)")},
6702 {"SetMoviePreferredVolume", (PyCFunction)MovieObj_SetMoviePreferredVolume, 1,
6703 PyDoc_STR("(short volume) -> None")},
6704 {"GetMovieVolume", (PyCFunction)MovieObj_GetMovieVolume, 1,
6705 PyDoc_STR("() -> (short _rv)")},
6706 {"SetMovieVolume", (PyCFunction)MovieObj_SetMovieVolume, 1,
6707 PyDoc_STR("(short volume) -> None")},
6708 {"GetMoviePreviewTime", (PyCFunction)MovieObj_GetMoviePreviewTime, 1,
6709 PyDoc_STR("() -> (TimeValue previewTime, TimeValue previewDuration)")},
6710 {"SetMoviePreviewTime", (PyCFunction)MovieObj_SetMoviePreviewTime, 1,
6711 PyDoc_STR("(TimeValue previewTime, TimeValue previewDuration) -> None")},
6712 {"GetMoviePosterTime", (PyCFunction)MovieObj_GetMoviePosterTime, 1,
6713 PyDoc_STR("() -> (TimeValue _rv)")},
6714 {"SetMoviePosterTime", (PyCFunction)MovieObj_SetMoviePosterTime, 1,
6715 PyDoc_STR("(TimeValue posterTime) -> None")},
6716 {"GetMovieSelection", (PyCFunction)MovieObj_GetMovieSelection, 1,
6717 PyDoc_STR("() -> (TimeValue selectionTime, TimeValue selectionDuration)")},
6718 {"SetMovieSelection", (PyCFunction)MovieObj_SetMovieSelection, 1,
6719 PyDoc_STR("(TimeValue selectionTime, TimeValue selectionDuration) -> None")},
6720 {"SetMovieActiveSegment", (PyCFunction)MovieObj_SetMovieActiveSegment, 1,
6721 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
6722 {"GetMovieActiveSegment", (PyCFunction)MovieObj_GetMovieActiveSegment, 1,
6723 PyDoc_STR("() -> (TimeValue startTime, TimeValue duration)")},
6724 {"GetMovieTime", (PyCFunction)MovieObj_GetMovieTime, 1,
6725 PyDoc_STR("() -> (TimeValue _rv, TimeRecord currentTime)")},
6726 {"SetMovieTime", (PyCFunction)MovieObj_SetMovieTime, 1,
6727 PyDoc_STR("(TimeRecord newtime) -> None")},
6728 {"SetMovieTimeValue", (PyCFunction)MovieObj_SetMovieTimeValue, 1,
6729 PyDoc_STR("(TimeValue newtime) -> None")},
6730 {"GetMovieUserData", (PyCFunction)MovieObj_GetMovieUserData, 1,
6731 PyDoc_STR("() -> (UserData _rv)")},
6732 {"GetMovieTrackCount", (PyCFunction)MovieObj_GetMovieTrackCount, 1,
6733 PyDoc_STR("() -> (long _rv)")},
6734 {"GetMovieTrack", (PyCFunction)MovieObj_GetMovieTrack, 1,
6735 PyDoc_STR("(long trackID) -> (Track _rv)")},
6736 {"GetMovieIndTrack", (PyCFunction)MovieObj_GetMovieIndTrack, 1,
6737 PyDoc_STR("(long index) -> (Track _rv)")},
6738 {"GetMovieIndTrackType", (PyCFunction)MovieObj_GetMovieIndTrackType, 1,
6739 PyDoc_STR("(long index, OSType trackType, long flags) -> (Track _rv)")},
6740 {"NewMovieTrack", (PyCFunction)MovieObj_NewMovieTrack, 1,
6741 PyDoc_STR("(Fixed width, Fixed height, short trackVolume) -> (Track _rv)")},
6742 {"SetAutoTrackAlternatesEnabled", (PyCFunction)MovieObj_SetAutoTrackAlternatesEnabled, 1,
6743 PyDoc_STR("(Boolean enable) -> None")},
6744 {"SelectMovieAlternates", (PyCFunction)MovieObj_SelectMovieAlternates, 1,
6745 PyDoc_STR("() -> None")},
6746 {"InsertMovieSegment", (PyCFunction)MovieObj_InsertMovieSegment, 1,
6747 PyDoc_STR("(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
6748 {"InsertEmptyMovieSegment", (PyCFunction)MovieObj_InsertEmptyMovieSegment, 1,
6749 PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
6750 {"DeleteMovieSegment", (PyCFunction)MovieObj_DeleteMovieSegment, 1,
6751 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
6752 {"ScaleMovieSegment", (PyCFunction)MovieObj_ScaleMovieSegment, 1,
6753 PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
6754 {"CutMovieSelection", (PyCFunction)MovieObj_CutMovieSelection, 1,
6755 PyDoc_STR("() -> (Movie _rv)")},
6756 {"CopyMovieSelection", (PyCFunction)MovieObj_CopyMovieSelection, 1,
6757 PyDoc_STR("() -> (Movie _rv)")},
6758 {"PasteMovieSelection", (PyCFunction)MovieObj_PasteMovieSelection, 1,
6759 PyDoc_STR("(Movie src) -> None")},
6760 {"AddMovieSelection", (PyCFunction)MovieObj_AddMovieSelection, 1,
6761 PyDoc_STR("(Movie src) -> None")},
6762 {"ClearMovieSelection", (PyCFunction)MovieObj_ClearMovieSelection, 1,
6763 PyDoc_STR("() -> None")},
6764 {"PutMovieIntoTypedHandle", (PyCFunction)MovieObj_PutMovieIntoTypedHandle, 1,
6765 PyDoc_STR("(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None")},
6766 {"CopyMovieSettings", (PyCFunction)MovieObj_CopyMovieSettings, 1,
6767 PyDoc_STR("(Movie dstMovie) -> None")},
6768 {"ConvertMovieToFile", (PyCFunction)MovieObj_ConvertMovieToFile, 1,
6769 PyDoc_STR("(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)")},
6770 {"GetMovieDataSize", (PyCFunction)MovieObj_GetMovieDataSize, 1,
6771 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
6772 {"GetMovieDataSize64", (PyCFunction)MovieObj_GetMovieDataSize64, 1,
6773 PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
6774 {"PtInMovie", (PyCFunction)MovieObj_PtInMovie, 1,
6775 PyDoc_STR("(Point pt) -> (Boolean _rv)")},
6776 {"SetMovieLanguage", (PyCFunction)MovieObj_SetMovieLanguage, 1,
6777 PyDoc_STR("(long language) -> None")},
6778 {"GetMovieNextInterestingTime", (PyCFunction)MovieObj_GetMovieNextInterestingTime, 1,
6779 PyDoc_STR("(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
6780 {"AddMovieResource", (PyCFunction)MovieObj_AddMovieResource, 1,
6781 PyDoc_STR("(short resRefNum, Str255 resName) -> (short resId)")},
6782 {"UpdateMovieResource", (PyCFunction)MovieObj_UpdateMovieResource, 1,
6783 PyDoc_STR("(short resRefNum, short resId, Str255 resName) -> None")},
6784 {"HasMovieChanged", (PyCFunction)MovieObj_HasMovieChanged, 1,
6785 PyDoc_STR("() -> (Boolean _rv)")},
6786 {"ClearMovieChanged", (PyCFunction)MovieObj_ClearMovieChanged, 1,
6787 PyDoc_STR("() -> None")},
6788 {"SetMovieDefaultDataRef", (PyCFunction)MovieObj_SetMovieDefaultDataRef, 1,
6789 PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
6790 {"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
6791 PyDoc_STR("() -> (Handle dataRef, OSType dataRefType)")},
6792 {"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
6793 PyDoc_STR("(CTabHandle ctab) -> None")},
6794 {"GetMovieColorTable", (PyCFunction)MovieObj_GetMovieColorTable, 1,
6795 PyDoc_STR("() -> (CTabHandle ctab)")},
6796 {"FlattenMovie", (PyCFunction)MovieObj_FlattenMovie, 1,
6797 PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)")},
6798 {"FlattenMovieData", (PyCFunction)MovieObj_FlattenMovieData, 1,
6799 PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
6800 {"MovieSearchText", (PyCFunction)MovieObj_MovieSearchText, 1,
6801 PyDoc_STR("(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)")},
6802 {"GetPosterBox", (PyCFunction)MovieObj_GetPosterBox, 1,
6803 PyDoc_STR("() -> (Rect boxRect)")},
6804 {"SetPosterBox", (PyCFunction)MovieObj_SetPosterBox, 1,
6805 PyDoc_STR("(Rect boxRect) -> None")},
6806 {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieSegmentDisplayBoundsRgn, 1,
6807 PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
6808 {"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
6809 PyDoc_STR("() -> (ComponentResult _rv, Track firstProblemTrack)")},
6810 {"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
6811 PyDoc_STR("(Rect movieRect, long someFlags) -> (MovieController _rv)")},
6812 {"PutMovieOnScrap", (PyCFunction)MovieObj_PutMovieOnScrap, 1,
6813 PyDoc_STR("(long movieScrapFlags) -> None")},
6814 {"SetMoviePlayHints", (PyCFunction)MovieObj_SetMoviePlayHints, 1,
6815 PyDoc_STR("(long flags, long flagsMask) -> None")},
6816 {"GetMaxLoadedTimeInMovie", (PyCFunction)MovieObj_GetMaxLoadedTimeInMovie, 1,
6817 PyDoc_STR("() -> (TimeValue time)")},
6818 {"QTMovieNeedsTimeTable", (PyCFunction)MovieObj_QTMovieNeedsTimeTable, 1,
6819 PyDoc_STR("() -> (Boolean needsTimeTable)")},
6820 {"QTGetDataRefMaxFileOffset", (PyCFunction)MovieObj_QTGetDataRefMaxFileOffset, 1,
6821 PyDoc_STR("(OSType dataRefType, Handle dataRef) -> (long offset)")},
6822 {NULL, NULL, 0}
6825 #define MovieObj_getsetlist NULL
6828 #define MovieObj_compare NULL
6830 #define MovieObj_repr NULL
6832 #define MovieObj_hash NULL
6833 #define MovieObj_tp_init 0
6835 #define MovieObj_tp_alloc PyType_GenericAlloc
6837 static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
6839 PyObject *self;
6840 Movie itself;
6841 char *kw[] = {"itself", 0};
6843 if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MovieObj_Convert, &itself)) return NULL;
6844 if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
6845 ((MovieObject *)self)->ob_itself = itself;
6846 return self;
6849 #define MovieObj_tp_free PyObject_Del
6852 PyTypeObject Movie_Type = {
6853 PyObject_HEAD_INIT(NULL)
6854 0, /*ob_size*/
6855 "_Qt.Movie", /*tp_name*/
6856 sizeof(MovieObject), /*tp_basicsize*/
6857 0, /*tp_itemsize*/
6858 /* methods */
6859 (destructor) MovieObj_dealloc, /*tp_dealloc*/
6860 0, /*tp_print*/
6861 (getattrfunc)0, /*tp_getattr*/
6862 (setattrfunc)0, /*tp_setattr*/
6863 (cmpfunc) MovieObj_compare, /*tp_compare*/
6864 (reprfunc) MovieObj_repr, /*tp_repr*/
6865 (PyNumberMethods *)0, /* tp_as_number */
6866 (PySequenceMethods *)0, /* tp_as_sequence */
6867 (PyMappingMethods *)0, /* tp_as_mapping */
6868 (hashfunc) MovieObj_hash, /*tp_hash*/
6869 0, /*tp_call*/
6870 0, /*tp_str*/
6871 PyObject_GenericGetAttr, /*tp_getattro*/
6872 PyObject_GenericSetAttr, /*tp_setattro */
6873 0, /*tp_as_buffer*/
6874 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
6875 0, /*tp_doc*/
6876 0, /*tp_traverse*/
6877 0, /*tp_clear*/
6878 0, /*tp_richcompare*/
6879 0, /*tp_weaklistoffset*/
6880 0, /*tp_iter*/
6881 0, /*tp_iternext*/
6882 MovieObj_methods, /* tp_methods */
6883 0, /*tp_members*/
6884 MovieObj_getsetlist, /*tp_getset*/
6885 0, /*tp_base*/
6886 0, /*tp_dict*/
6887 0, /*tp_descr_get*/
6888 0, /*tp_descr_set*/
6889 0, /*tp_dictoffset*/
6890 MovieObj_tp_init, /* tp_init */
6891 MovieObj_tp_alloc, /* tp_alloc */
6892 MovieObj_tp_new, /* tp_new */
6893 MovieObj_tp_free, /* tp_free */
6896 /* --------------------- End object type Movie ---------------------- */
6899 static PyObject *Qt_EnterMovies(PyObject *_self, PyObject *_args)
6901 PyObject *_res = NULL;
6902 OSErr _err;
6903 #ifndef EnterMovies
6904 PyMac_PRECHECK(EnterMovies);
6905 #endif
6906 if (!PyArg_ParseTuple(_args, ""))
6907 return NULL;
6908 _err = EnterMovies();
6909 if (_err != noErr) return PyMac_Error(_err);
6910 Py_INCREF(Py_None);
6911 _res = Py_None;
6912 return _res;
6915 static PyObject *Qt_ExitMovies(PyObject *_self, PyObject *_args)
6917 PyObject *_res = NULL;
6918 #ifndef ExitMovies
6919 PyMac_PRECHECK(ExitMovies);
6920 #endif
6921 if (!PyArg_ParseTuple(_args, ""))
6922 return NULL;
6923 ExitMovies();
6924 Py_INCREF(Py_None);
6925 _res = Py_None;
6926 return _res;
6929 static PyObject *Qt_GetMoviesError(PyObject *_self, PyObject *_args)
6931 PyObject *_res = NULL;
6932 OSErr _err;
6933 #ifndef GetMoviesError
6934 PyMac_PRECHECK(GetMoviesError);
6935 #endif
6936 if (!PyArg_ParseTuple(_args, ""))
6937 return NULL;
6938 _err = GetMoviesError();
6939 if (_err != noErr) return PyMac_Error(_err);
6940 Py_INCREF(Py_None);
6941 _res = Py_None;
6942 return _res;
6945 static PyObject *Qt_ClearMoviesStickyError(PyObject *_self, PyObject *_args)
6947 PyObject *_res = NULL;
6948 #ifndef ClearMoviesStickyError
6949 PyMac_PRECHECK(ClearMoviesStickyError);
6950 #endif
6951 if (!PyArg_ParseTuple(_args, ""))
6952 return NULL;
6953 ClearMoviesStickyError();
6954 Py_INCREF(Py_None);
6955 _res = Py_None;
6956 return _res;
6959 static PyObject *Qt_GetMoviesStickyError(PyObject *_self, PyObject *_args)
6961 PyObject *_res = NULL;
6962 OSErr _err;
6963 #ifndef GetMoviesStickyError
6964 PyMac_PRECHECK(GetMoviesStickyError);
6965 #endif
6966 if (!PyArg_ParseTuple(_args, ""))
6967 return NULL;
6968 _err = GetMoviesStickyError();
6969 if (_err != noErr) return PyMac_Error(_err);
6970 Py_INCREF(Py_None);
6971 _res = Py_None;
6972 return _res;
6975 static PyObject *Qt_DisposeMatte(PyObject *_self, PyObject *_args)
6977 PyObject *_res = NULL;
6978 PixMapHandle theMatte;
6979 #ifndef DisposeMatte
6980 PyMac_PRECHECK(DisposeMatte);
6981 #endif
6982 if (!PyArg_ParseTuple(_args, "O&",
6983 ResObj_Convert, &theMatte))
6984 return NULL;
6985 DisposeMatte(theMatte);
6986 Py_INCREF(Py_None);
6987 _res = Py_None;
6988 return _res;
6991 static PyObject *Qt_NewMovie(PyObject *_self, PyObject *_args)
6993 PyObject *_res = NULL;
6994 Movie _rv;
6995 long flags;
6996 #ifndef NewMovie
6997 PyMac_PRECHECK(NewMovie);
6998 #endif
6999 if (!PyArg_ParseTuple(_args, "l",
7000 &flags))
7001 return NULL;
7002 _rv = NewMovie(flags);
7003 _res = Py_BuildValue("O&",
7004 MovieObj_New, _rv);
7005 return _res;
7008 static PyObject *Qt_GetDataHandler(PyObject *_self, PyObject *_args)
7010 PyObject *_res = NULL;
7011 Component _rv;
7012 Handle dataRef;
7013 OSType dataHandlerSubType;
7014 long flags;
7015 #ifndef GetDataHandler
7016 PyMac_PRECHECK(GetDataHandler);
7017 #endif
7018 if (!PyArg_ParseTuple(_args, "O&O&l",
7019 ResObj_Convert, &dataRef,
7020 PyMac_GetOSType, &dataHandlerSubType,
7021 &flags))
7022 return NULL;
7023 _rv = GetDataHandler(dataRef,
7024 dataHandlerSubType,
7025 flags);
7026 _res = Py_BuildValue("O&",
7027 CmpObj_New, _rv);
7028 return _res;
7031 static PyObject *Qt_PasteHandleIntoMovie(PyObject *_self, PyObject *_args)
7033 PyObject *_res = NULL;
7034 OSErr _err;
7035 Handle h;
7036 OSType handleType;
7037 Movie theMovie;
7038 long flags;
7039 ComponentInstance userComp;
7040 #ifndef PasteHandleIntoMovie
7041 PyMac_PRECHECK(PasteHandleIntoMovie);
7042 #endif
7043 if (!PyArg_ParseTuple(_args, "O&O&O&lO&",
7044 ResObj_Convert, &h,
7045 PyMac_GetOSType, &handleType,
7046 MovieObj_Convert, &theMovie,
7047 &flags,
7048 CmpInstObj_Convert, &userComp))
7049 return NULL;
7050 _err = PasteHandleIntoMovie(h,
7051 handleType,
7052 theMovie,
7053 flags,
7054 userComp);
7055 if (_err != noErr) return PyMac_Error(_err);
7056 Py_INCREF(Py_None);
7057 _res = Py_None;
7058 return _res;
7061 static PyObject *Qt_GetMovieImporterForDataRef(PyObject *_self, PyObject *_args)
7063 PyObject *_res = NULL;
7064 OSErr _err;
7065 OSType dataRefType;
7066 Handle dataRef;
7067 long flags;
7068 Component importer;
7069 #ifndef GetMovieImporterForDataRef
7070 PyMac_PRECHECK(GetMovieImporterForDataRef);
7071 #endif
7072 if (!PyArg_ParseTuple(_args, "O&O&l",
7073 PyMac_GetOSType, &dataRefType,
7074 ResObj_Convert, &dataRef,
7075 &flags))
7076 return NULL;
7077 _err = GetMovieImporterForDataRef(dataRefType,
7078 dataRef,
7079 flags,
7080 &importer);
7081 if (_err != noErr) return PyMac_Error(_err);
7082 _res = Py_BuildValue("O&",
7083 CmpObj_New, importer);
7084 return _res;
7087 static PyObject *Qt_QTGetMIMETypeInfo(PyObject *_self, PyObject *_args)
7089 PyObject *_res = NULL;
7090 OSErr _err;
7091 char* mimeStringStart;
7092 short mimeStringLength;
7093 OSType infoSelector;
7094 void * infoDataPtr;
7095 long infoDataSize;
7096 #ifndef QTGetMIMETypeInfo
7097 PyMac_PRECHECK(QTGetMIMETypeInfo);
7098 #endif
7099 if (!PyArg_ParseTuple(_args, "shO&s",
7100 &mimeStringStart,
7101 &mimeStringLength,
7102 PyMac_GetOSType, &infoSelector,
7103 &infoDataPtr))
7104 return NULL;
7105 _err = QTGetMIMETypeInfo(mimeStringStart,
7106 mimeStringLength,
7107 infoSelector,
7108 infoDataPtr,
7109 &infoDataSize);
7110 if (_err != noErr) return PyMac_Error(_err);
7111 _res = Py_BuildValue("l",
7112 infoDataSize);
7113 return _res;
7116 static PyObject *Qt_TrackTimeToMediaTime(PyObject *_self, PyObject *_args)
7118 PyObject *_res = NULL;
7119 TimeValue _rv;
7120 TimeValue value;
7121 Track theTrack;
7122 #ifndef TrackTimeToMediaTime
7123 PyMac_PRECHECK(TrackTimeToMediaTime);
7124 #endif
7125 if (!PyArg_ParseTuple(_args, "lO&",
7126 &value,
7127 TrackObj_Convert, &theTrack))
7128 return NULL;
7129 _rv = TrackTimeToMediaTime(value,
7130 theTrack);
7131 _res = Py_BuildValue("l",
7132 _rv);
7133 return _res;
7136 static PyObject *Qt_NewUserData(PyObject *_self, PyObject *_args)
7138 PyObject *_res = NULL;
7139 OSErr _err;
7140 UserData theUserData;
7141 #ifndef NewUserData
7142 PyMac_PRECHECK(NewUserData);
7143 #endif
7144 if (!PyArg_ParseTuple(_args, ""))
7145 return NULL;
7146 _err = NewUserData(&theUserData);
7147 if (_err != noErr) return PyMac_Error(_err);
7148 _res = Py_BuildValue("O&",
7149 UserDataObj_New, theUserData);
7150 return _res;
7153 static PyObject *Qt_NewUserDataFromHandle(PyObject *_self, PyObject *_args)
7155 PyObject *_res = NULL;
7156 OSErr _err;
7157 Handle h;
7158 UserData theUserData;
7159 #ifndef NewUserDataFromHandle
7160 PyMac_PRECHECK(NewUserDataFromHandle);
7161 #endif
7162 if (!PyArg_ParseTuple(_args, "O&",
7163 ResObj_Convert, &h))
7164 return NULL;
7165 _err = NewUserDataFromHandle(h,
7166 &theUserData);
7167 if (_err != noErr) return PyMac_Error(_err);
7168 _res = Py_BuildValue("O&",
7169 UserDataObj_New, theUserData);
7170 return _res;
7173 static PyObject *Qt_CreateMovieFile(PyObject *_self, PyObject *_args)
7175 PyObject *_res = NULL;
7176 OSErr _err;
7177 FSSpec fileSpec;
7178 OSType creator;
7179 ScriptCode scriptTag;
7180 long createMovieFileFlags;
7181 short resRefNum;
7182 Movie newmovie;
7183 #ifndef CreateMovieFile
7184 PyMac_PRECHECK(CreateMovieFile);
7185 #endif
7186 if (!PyArg_ParseTuple(_args, "O&O&hl",
7187 PyMac_GetFSSpec, &fileSpec,
7188 PyMac_GetOSType, &creator,
7189 &scriptTag,
7190 &createMovieFileFlags))
7191 return NULL;
7192 _err = CreateMovieFile(&fileSpec,
7193 creator,
7194 scriptTag,
7195 createMovieFileFlags,
7196 &resRefNum,
7197 &newmovie);
7198 if (_err != noErr) return PyMac_Error(_err);
7199 _res = Py_BuildValue("hO&",
7200 resRefNum,
7201 MovieObj_New, newmovie);
7202 return _res;
7205 static PyObject *Qt_OpenMovieFile(PyObject *_self, PyObject *_args)
7207 PyObject *_res = NULL;
7208 OSErr _err;
7209 FSSpec fileSpec;
7210 short resRefNum;
7211 SInt8 permission;
7212 #ifndef OpenMovieFile
7213 PyMac_PRECHECK(OpenMovieFile);
7214 #endif
7215 if (!PyArg_ParseTuple(_args, "O&b",
7216 PyMac_GetFSSpec, &fileSpec,
7217 &permission))
7218 return NULL;
7219 _err = OpenMovieFile(&fileSpec,
7220 &resRefNum,
7221 permission);
7222 if (_err != noErr) return PyMac_Error(_err);
7223 _res = Py_BuildValue("h",
7224 resRefNum);
7225 return _res;
7228 static PyObject *Qt_CloseMovieFile(PyObject *_self, PyObject *_args)
7230 PyObject *_res = NULL;
7231 OSErr _err;
7232 short resRefNum;
7233 #ifndef CloseMovieFile
7234 PyMac_PRECHECK(CloseMovieFile);
7235 #endif
7236 if (!PyArg_ParseTuple(_args, "h",
7237 &resRefNum))
7238 return NULL;
7239 _err = CloseMovieFile(resRefNum);
7240 if (_err != noErr) return PyMac_Error(_err);
7241 Py_INCREF(Py_None);
7242 _res = Py_None;
7243 return _res;
7246 static PyObject *Qt_DeleteMovieFile(PyObject *_self, PyObject *_args)
7248 PyObject *_res = NULL;
7249 OSErr _err;
7250 FSSpec fileSpec;
7251 #ifndef DeleteMovieFile
7252 PyMac_PRECHECK(DeleteMovieFile);
7253 #endif
7254 if (!PyArg_ParseTuple(_args, "O&",
7255 PyMac_GetFSSpec, &fileSpec))
7256 return NULL;
7257 _err = DeleteMovieFile(&fileSpec);
7258 if (_err != noErr) return PyMac_Error(_err);
7259 Py_INCREF(Py_None);
7260 _res = Py_None;
7261 return _res;
7264 static PyObject *Qt_NewMovieFromFile(PyObject *_self, PyObject *_args)
7266 PyObject *_res = NULL;
7267 OSErr _err;
7268 Movie theMovie;
7269 short resRefNum;
7270 short resId;
7271 short newMovieFlags;
7272 Boolean dataRefWasChanged;
7273 #ifndef NewMovieFromFile
7274 PyMac_PRECHECK(NewMovieFromFile);
7275 #endif
7276 if (!PyArg_ParseTuple(_args, "hhh",
7277 &resRefNum,
7278 &resId,
7279 &newMovieFlags))
7280 return NULL;
7281 _err = NewMovieFromFile(&theMovie,
7282 resRefNum,
7283 &resId,
7284 (StringPtr)0,
7285 newMovieFlags,
7286 &dataRefWasChanged);
7287 if (_err != noErr) return PyMac_Error(_err);
7288 _res = Py_BuildValue("O&hb",
7289 MovieObj_New, theMovie,
7290 resId,
7291 dataRefWasChanged);
7292 return _res;
7295 static PyObject *Qt_NewMovieFromHandle(PyObject *_self, PyObject *_args)
7297 PyObject *_res = NULL;
7298 OSErr _err;
7299 Movie theMovie;
7300 Handle h;
7301 short newMovieFlags;
7302 Boolean dataRefWasChanged;
7303 #ifndef NewMovieFromHandle
7304 PyMac_PRECHECK(NewMovieFromHandle);
7305 #endif
7306 if (!PyArg_ParseTuple(_args, "O&h",
7307 ResObj_Convert, &h,
7308 &newMovieFlags))
7309 return NULL;
7310 _err = NewMovieFromHandle(&theMovie,
7312 newMovieFlags,
7313 &dataRefWasChanged);
7314 if (_err != noErr) return PyMac_Error(_err);
7315 _res = Py_BuildValue("O&b",
7316 MovieObj_New, theMovie,
7317 dataRefWasChanged);
7318 return _res;
7321 static PyObject *Qt_NewMovieFromDataFork(PyObject *_self, PyObject *_args)
7323 PyObject *_res = NULL;
7324 OSErr _err;
7325 Movie theMovie;
7326 short fRefNum;
7327 long fileOffset;
7328 short newMovieFlags;
7329 Boolean dataRefWasChanged;
7330 #ifndef NewMovieFromDataFork
7331 PyMac_PRECHECK(NewMovieFromDataFork);
7332 #endif
7333 if (!PyArg_ParseTuple(_args, "hlh",
7334 &fRefNum,
7335 &fileOffset,
7336 &newMovieFlags))
7337 return NULL;
7338 _err = NewMovieFromDataFork(&theMovie,
7339 fRefNum,
7340 fileOffset,
7341 newMovieFlags,
7342 &dataRefWasChanged);
7343 if (_err != noErr) return PyMac_Error(_err);
7344 _res = Py_BuildValue("O&b",
7345 MovieObj_New, theMovie,
7346 dataRefWasChanged);
7347 return _res;
7350 static PyObject *Qt_NewMovieFromDataFork64(PyObject *_self, PyObject *_args)
7352 PyObject *_res = NULL;
7353 OSErr _err;
7354 Movie theMovie;
7355 long fRefNum;
7356 wide fileOffset;
7357 short newMovieFlags;
7358 Boolean dataRefWasChanged;
7359 #ifndef NewMovieFromDataFork64
7360 PyMac_PRECHECK(NewMovieFromDataFork64);
7361 #endif
7362 if (!PyArg_ParseTuple(_args, "lO&h",
7363 &fRefNum,
7364 PyMac_Getwide, &fileOffset,
7365 &newMovieFlags))
7366 return NULL;
7367 _err = NewMovieFromDataFork64(&theMovie,
7368 fRefNum,
7369 &fileOffset,
7370 newMovieFlags,
7371 &dataRefWasChanged);
7372 if (_err != noErr) return PyMac_Error(_err);
7373 _res = Py_BuildValue("O&b",
7374 MovieObj_New, theMovie,
7375 dataRefWasChanged);
7376 return _res;
7379 static PyObject *Qt_NewMovieFromDataRef(PyObject *_self, PyObject *_args)
7381 PyObject *_res = NULL;
7382 OSErr _err;
7383 Movie m;
7384 short flags;
7385 short id;
7386 Handle dataRef;
7387 OSType dataRefType;
7388 #ifndef NewMovieFromDataRef
7389 PyMac_PRECHECK(NewMovieFromDataRef);
7390 #endif
7391 if (!PyArg_ParseTuple(_args, "hO&O&",
7392 &flags,
7393 ResObj_Convert, &dataRef,
7394 PyMac_GetOSType, &dataRefType))
7395 return NULL;
7396 _err = NewMovieFromDataRef(&m,
7397 flags,
7398 &id,
7399 dataRef,
7400 dataRefType);
7401 if (_err != noErr) return PyMac_Error(_err);
7402 _res = Py_BuildValue("O&h",
7403 MovieObj_New, m,
7404 id);
7405 return _res;
7408 static PyObject *Qt_RemoveMovieResource(PyObject *_self, PyObject *_args)
7410 PyObject *_res = NULL;
7411 OSErr _err;
7412 short resRefNum;
7413 short resId;
7414 #ifndef RemoveMovieResource
7415 PyMac_PRECHECK(RemoveMovieResource);
7416 #endif
7417 if (!PyArg_ParseTuple(_args, "hh",
7418 &resRefNum,
7419 &resId))
7420 return NULL;
7421 _err = RemoveMovieResource(resRefNum,
7422 resId);
7423 if (_err != noErr) return PyMac_Error(_err);
7424 Py_INCREF(Py_None);
7425 _res = Py_None;
7426 return _res;
7429 static PyObject *Qt_CreateShortcutMovieFile(PyObject *_self, PyObject *_args)
7431 PyObject *_res = NULL;
7432 OSErr _err;
7433 FSSpec fileSpec;
7434 OSType creator;
7435 ScriptCode scriptTag;
7436 long createMovieFileFlags;
7437 Handle targetDataRef;
7438 OSType targetDataRefType;
7439 #ifndef CreateShortcutMovieFile
7440 PyMac_PRECHECK(CreateShortcutMovieFile);
7441 #endif
7442 if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
7443 PyMac_GetFSSpec, &fileSpec,
7444 PyMac_GetOSType, &creator,
7445 &scriptTag,
7446 &createMovieFileFlags,
7447 ResObj_Convert, &targetDataRef,
7448 PyMac_GetOSType, &targetDataRefType))
7449 return NULL;
7450 _err = CreateShortcutMovieFile(&fileSpec,
7451 creator,
7452 scriptTag,
7453 createMovieFileFlags,
7454 targetDataRef,
7455 targetDataRefType);
7456 if (_err != noErr) return PyMac_Error(_err);
7457 Py_INCREF(Py_None);
7458 _res = Py_None;
7459 return _res;
7462 static PyObject *Qt_CanQuickTimeOpenFile(PyObject *_self, PyObject *_args)
7464 PyObject *_res = NULL;
7465 OSErr _err;
7466 FSSpec fileSpec;
7467 OSType fileType;
7468 OSType fileNameExtension;
7469 Boolean outCanOpenWithGraphicsImporter;
7470 Boolean outCanOpenAsMovie;
7471 Boolean outPreferGraphicsImporter;
7472 UInt32 inFlags;
7473 #ifndef CanQuickTimeOpenFile
7474 PyMac_PRECHECK(CanQuickTimeOpenFile);
7475 #endif
7476 if (!PyArg_ParseTuple(_args, "O&O&O&l",
7477 PyMac_GetFSSpec, &fileSpec,
7478 PyMac_GetOSType, &fileType,
7479 PyMac_GetOSType, &fileNameExtension,
7480 &inFlags))
7481 return NULL;
7482 _err = CanQuickTimeOpenFile(&fileSpec,
7483 fileType,
7484 fileNameExtension,
7485 &outCanOpenWithGraphicsImporter,
7486 &outCanOpenAsMovie,
7487 &outPreferGraphicsImporter,
7488 inFlags);
7489 if (_err != noErr) return PyMac_Error(_err);
7490 _res = Py_BuildValue("bbb",
7491 outCanOpenWithGraphicsImporter,
7492 outCanOpenAsMovie,
7493 outPreferGraphicsImporter);
7494 return _res;
7497 static PyObject *Qt_CanQuickTimeOpenDataRef(PyObject *_self, PyObject *_args)
7499 PyObject *_res = NULL;
7500 OSErr _err;
7501 Handle dataRef;
7502 OSType dataRefType;
7503 Boolean outCanOpenWithGraphicsImporter;
7504 Boolean outCanOpenAsMovie;
7505 Boolean outPreferGraphicsImporter;
7506 UInt32 inFlags;
7507 #ifndef CanQuickTimeOpenDataRef
7508 PyMac_PRECHECK(CanQuickTimeOpenDataRef);
7509 #endif
7510 if (!PyArg_ParseTuple(_args, "O&O&l",
7511 ResObj_Convert, &dataRef,
7512 PyMac_GetOSType, &dataRefType,
7513 &inFlags))
7514 return NULL;
7515 _err = CanQuickTimeOpenDataRef(dataRef,
7516 dataRefType,
7517 &outCanOpenWithGraphicsImporter,
7518 &outCanOpenAsMovie,
7519 &outPreferGraphicsImporter,
7520 inFlags);
7521 if (_err != noErr) return PyMac_Error(_err);
7522 _res = Py_BuildValue("bbb",
7523 outCanOpenWithGraphicsImporter,
7524 outCanOpenAsMovie,
7525 outPreferGraphicsImporter);
7526 return _res;
7529 static PyObject *Qt_NewMovieFromScrap(PyObject *_self, PyObject *_args)
7531 PyObject *_res = NULL;
7532 Movie _rv;
7533 long newMovieFlags;
7534 #ifndef NewMovieFromScrap
7535 PyMac_PRECHECK(NewMovieFromScrap);
7536 #endif
7537 if (!PyArg_ParseTuple(_args, "l",
7538 &newMovieFlags))
7539 return NULL;
7540 _rv = NewMovieFromScrap(newMovieFlags);
7541 _res = Py_BuildValue("O&",
7542 MovieObj_New, _rv);
7543 return _res;
7546 static PyObject *Qt_QTNewAlias(PyObject *_self, PyObject *_args)
7548 PyObject *_res = NULL;
7549 OSErr _err;
7550 FSSpec fss;
7551 AliasHandle alias;
7552 Boolean minimal;
7553 #ifndef QTNewAlias
7554 PyMac_PRECHECK(QTNewAlias);
7555 #endif
7556 if (!PyArg_ParseTuple(_args, "O&b",
7557 PyMac_GetFSSpec, &fss,
7558 &minimal))
7559 return NULL;
7560 _err = QTNewAlias(&fss,
7561 &alias,
7562 minimal);
7563 if (_err != noErr) return PyMac_Error(_err);
7564 _res = Py_BuildValue("O&",
7565 ResObj_New, alias);
7566 return _res;
7569 static PyObject *Qt_EndFullScreen(PyObject *_self, PyObject *_args)
7571 PyObject *_res = NULL;
7572 OSErr _err;
7573 Ptr fullState;
7574 long flags;
7575 #ifndef EndFullScreen
7576 PyMac_PRECHECK(EndFullScreen);
7577 #endif
7578 if (!PyArg_ParseTuple(_args, "sl",
7579 &fullState,
7580 &flags))
7581 return NULL;
7582 _err = EndFullScreen(fullState,
7583 flags);
7584 if (_err != noErr) return PyMac_Error(_err);
7585 Py_INCREF(Py_None);
7586 _res = Py_None;
7587 return _res;
7590 static PyObject *Qt_AddSoundDescriptionExtension(PyObject *_self, PyObject *_args)
7592 PyObject *_res = NULL;
7593 OSErr _err;
7594 SoundDescriptionHandle desc;
7595 Handle extension;
7596 OSType idType;
7597 #ifndef AddSoundDescriptionExtension
7598 PyMac_PRECHECK(AddSoundDescriptionExtension);
7599 #endif
7600 if (!PyArg_ParseTuple(_args, "O&O&O&",
7601 ResObj_Convert, &desc,
7602 ResObj_Convert, &extension,
7603 PyMac_GetOSType, &idType))
7604 return NULL;
7605 _err = AddSoundDescriptionExtension(desc,
7606 extension,
7607 idType);
7608 if (_err != noErr) return PyMac_Error(_err);
7609 Py_INCREF(Py_None);
7610 _res = Py_None;
7611 return _res;
7614 static PyObject *Qt_GetSoundDescriptionExtension(PyObject *_self, PyObject *_args)
7616 PyObject *_res = NULL;
7617 OSErr _err;
7618 SoundDescriptionHandle desc;
7619 Handle extension;
7620 OSType idType;
7621 #ifndef GetSoundDescriptionExtension
7622 PyMac_PRECHECK(GetSoundDescriptionExtension);
7623 #endif
7624 if (!PyArg_ParseTuple(_args, "O&O&",
7625 ResObj_Convert, &desc,
7626 PyMac_GetOSType, &idType))
7627 return NULL;
7628 _err = GetSoundDescriptionExtension(desc,
7629 &extension,
7630 idType);
7631 if (_err != noErr) return PyMac_Error(_err);
7632 _res = Py_BuildValue("O&",
7633 ResObj_New, extension);
7634 return _res;
7637 static PyObject *Qt_RemoveSoundDescriptionExtension(PyObject *_self, PyObject *_args)
7639 PyObject *_res = NULL;
7640 OSErr _err;
7641 SoundDescriptionHandle desc;
7642 OSType idType;
7643 #ifndef RemoveSoundDescriptionExtension
7644 PyMac_PRECHECK(RemoveSoundDescriptionExtension);
7645 #endif
7646 if (!PyArg_ParseTuple(_args, "O&O&",
7647 ResObj_Convert, &desc,
7648 PyMac_GetOSType, &idType))
7649 return NULL;
7650 _err = RemoveSoundDescriptionExtension(desc,
7651 idType);
7652 if (_err != noErr) return PyMac_Error(_err);
7653 Py_INCREF(Py_None);
7654 _res = Py_None;
7655 return _res;
7658 static PyObject *Qt_QTIsStandardParameterDialogEvent(PyObject *_self, PyObject *_args)
7660 PyObject *_res = NULL;
7661 OSErr _err;
7662 EventRecord pEvent;
7663 QTParameterDialog createdDialog;
7664 #ifndef QTIsStandardParameterDialogEvent
7665 PyMac_PRECHECK(QTIsStandardParameterDialogEvent);
7666 #endif
7667 if (!PyArg_ParseTuple(_args, "l",
7668 &createdDialog))
7669 return NULL;
7670 _err = QTIsStandardParameterDialogEvent(&pEvent,
7671 createdDialog);
7672 if (_err != noErr) return PyMac_Error(_err);
7673 _res = Py_BuildValue("O&",
7674 PyMac_BuildEventRecord, &pEvent);
7675 return _res;
7678 static PyObject *Qt_QTDismissStandardParameterDialog(PyObject *_self, PyObject *_args)
7680 PyObject *_res = NULL;
7681 OSErr _err;
7682 QTParameterDialog createdDialog;
7683 #ifndef QTDismissStandardParameterDialog
7684 PyMac_PRECHECK(QTDismissStandardParameterDialog);
7685 #endif
7686 if (!PyArg_ParseTuple(_args, "l",
7687 &createdDialog))
7688 return NULL;
7689 _err = QTDismissStandardParameterDialog(createdDialog);
7690 if (_err != noErr) return PyMac_Error(_err);
7691 Py_INCREF(Py_None);
7692 _res = Py_None;
7693 return _res;
7696 static PyObject *Qt_QTStandardParameterDialogDoAction(PyObject *_self, PyObject *_args)
7698 PyObject *_res = NULL;
7699 OSErr _err;
7700 QTParameterDialog createdDialog;
7701 long action;
7702 void * params;
7703 #ifndef QTStandardParameterDialogDoAction
7704 PyMac_PRECHECK(QTStandardParameterDialogDoAction);
7705 #endif
7706 if (!PyArg_ParseTuple(_args, "lls",
7707 &createdDialog,
7708 &action,
7709 &params))
7710 return NULL;
7711 _err = QTStandardParameterDialogDoAction(createdDialog,
7712 action,
7713 params);
7714 if (_err != noErr) return PyMac_Error(_err);
7715 Py_INCREF(Py_None);
7716 _res = Py_None;
7717 return _res;
7720 static PyObject *Qt_QTRegisterAccessKey(PyObject *_self, PyObject *_args)
7722 PyObject *_res = NULL;
7723 OSErr _err;
7724 Str255 accessKeyType;
7725 long flags;
7726 Handle accessKey;
7727 #ifndef QTRegisterAccessKey
7728 PyMac_PRECHECK(QTRegisterAccessKey);
7729 #endif
7730 if (!PyArg_ParseTuple(_args, "O&lO&",
7731 PyMac_GetStr255, accessKeyType,
7732 &flags,
7733 ResObj_Convert, &accessKey))
7734 return NULL;
7735 _err = QTRegisterAccessKey(accessKeyType,
7736 flags,
7737 accessKey);
7738 if (_err != noErr) return PyMac_Error(_err);
7739 Py_INCREF(Py_None);
7740 _res = Py_None;
7741 return _res;
7744 static PyObject *Qt_QTUnregisterAccessKey(PyObject *_self, PyObject *_args)
7746 PyObject *_res = NULL;
7747 OSErr _err;
7748 Str255 accessKeyType;
7749 long flags;
7750 Handle accessKey;
7751 #ifndef QTUnregisterAccessKey
7752 PyMac_PRECHECK(QTUnregisterAccessKey);
7753 #endif
7754 if (!PyArg_ParseTuple(_args, "O&lO&",
7755 PyMac_GetStr255, accessKeyType,
7756 &flags,
7757 ResObj_Convert, &accessKey))
7758 return NULL;
7759 _err = QTUnregisterAccessKey(accessKeyType,
7760 flags,
7761 accessKey);
7762 if (_err != noErr) return PyMac_Error(_err);
7763 Py_INCREF(Py_None);
7764 _res = Py_None;
7765 return _res;
7768 static PyObject *Qt_QTTextToNativeText(PyObject *_self, PyObject *_args)
7770 PyObject *_res = NULL;
7771 OSErr _err;
7772 Handle theText;
7773 long encoding;
7774 long flags;
7775 #ifndef QTTextToNativeText
7776 PyMac_PRECHECK(QTTextToNativeText);
7777 #endif
7778 if (!PyArg_ParseTuple(_args, "O&ll",
7779 ResObj_Convert, &theText,
7780 &encoding,
7781 &flags))
7782 return NULL;
7783 _err = QTTextToNativeText(theText,
7784 encoding,
7785 flags);
7786 if (_err != noErr) return PyMac_Error(_err);
7787 Py_INCREF(Py_None);
7788 _res = Py_None;
7789 return _res;
7792 static PyObject *Qt_VideoMediaResetStatistics(PyObject *_self, PyObject *_args)
7794 PyObject *_res = NULL;
7795 ComponentResult _rv;
7796 MediaHandler mh;
7797 #ifndef VideoMediaResetStatistics
7798 PyMac_PRECHECK(VideoMediaResetStatistics);
7799 #endif
7800 if (!PyArg_ParseTuple(_args, "O&",
7801 CmpInstObj_Convert, &mh))
7802 return NULL;
7803 _rv = VideoMediaResetStatistics(mh);
7804 _res = Py_BuildValue("l",
7805 _rv);
7806 return _res;
7809 static PyObject *Qt_VideoMediaGetStatistics(PyObject *_self, PyObject *_args)
7811 PyObject *_res = NULL;
7812 ComponentResult _rv;
7813 MediaHandler mh;
7814 #ifndef VideoMediaGetStatistics
7815 PyMac_PRECHECK(VideoMediaGetStatistics);
7816 #endif
7817 if (!PyArg_ParseTuple(_args, "O&",
7818 CmpInstObj_Convert, &mh))
7819 return NULL;
7820 _rv = VideoMediaGetStatistics(mh);
7821 _res = Py_BuildValue("l",
7822 _rv);
7823 return _res;
7826 static PyObject *Qt_VideoMediaGetStallCount(PyObject *_self, PyObject *_args)
7828 PyObject *_res = NULL;
7829 ComponentResult _rv;
7830 MediaHandler mh;
7831 unsigned long stalls;
7832 #ifndef VideoMediaGetStallCount
7833 PyMac_PRECHECK(VideoMediaGetStallCount);
7834 #endif
7835 if (!PyArg_ParseTuple(_args, "O&",
7836 CmpInstObj_Convert, &mh))
7837 return NULL;
7838 _rv = VideoMediaGetStallCount(mh,
7839 &stalls);
7840 _res = Py_BuildValue("ll",
7841 _rv,
7842 stalls);
7843 return _res;
7846 static PyObject *Qt_VideoMediaSetCodecParameter(PyObject *_self, PyObject *_args)
7848 PyObject *_res = NULL;
7849 ComponentResult _rv;
7850 MediaHandler mh;
7851 CodecType cType;
7852 OSType parameterID;
7853 long parameterChangeSeed;
7854 void * dataPtr;
7855 long dataSize;
7856 #ifndef VideoMediaSetCodecParameter
7857 PyMac_PRECHECK(VideoMediaSetCodecParameter);
7858 #endif
7859 if (!PyArg_ParseTuple(_args, "O&O&O&lsl",
7860 CmpInstObj_Convert, &mh,
7861 PyMac_GetOSType, &cType,
7862 PyMac_GetOSType, &parameterID,
7863 &parameterChangeSeed,
7864 &dataPtr,
7865 &dataSize))
7866 return NULL;
7867 _rv = VideoMediaSetCodecParameter(mh,
7868 cType,
7869 parameterID,
7870 parameterChangeSeed,
7871 dataPtr,
7872 dataSize);
7873 _res = Py_BuildValue("l",
7874 _rv);
7875 return _res;
7878 static PyObject *Qt_VideoMediaGetCodecParameter(PyObject *_self, PyObject *_args)
7880 PyObject *_res = NULL;
7881 ComponentResult _rv;
7882 MediaHandler mh;
7883 CodecType cType;
7884 OSType parameterID;
7885 Handle outParameterData;
7886 #ifndef VideoMediaGetCodecParameter
7887 PyMac_PRECHECK(VideoMediaGetCodecParameter);
7888 #endif
7889 if (!PyArg_ParseTuple(_args, "O&O&O&O&",
7890 CmpInstObj_Convert, &mh,
7891 PyMac_GetOSType, &cType,
7892 PyMac_GetOSType, &parameterID,
7893 ResObj_Convert, &outParameterData))
7894 return NULL;
7895 _rv = VideoMediaGetCodecParameter(mh,
7896 cType,
7897 parameterID,
7898 outParameterData);
7899 _res = Py_BuildValue("l",
7900 _rv);
7901 return _res;
7904 static PyObject *Qt_TextMediaAddTextSample(PyObject *_self, PyObject *_args)
7906 PyObject *_res = NULL;
7907 ComponentResult _rv;
7908 MediaHandler mh;
7909 Ptr text;
7910 unsigned long size;
7911 short fontNumber;
7912 short fontSize;
7913 Style textFace;
7914 RGBColor textColor;
7915 RGBColor backColor;
7916 short textJustification;
7917 Rect textBox;
7918 long displayFlags;
7919 TimeValue scrollDelay;
7920 short hiliteStart;
7921 short hiliteEnd;
7922 RGBColor rgbHiliteColor;
7923 TimeValue duration;
7924 TimeValue sampleTime;
7925 #ifndef TextMediaAddTextSample
7926 PyMac_PRECHECK(TextMediaAddTextSample);
7927 #endif
7928 if (!PyArg_ParseTuple(_args, "O&slhhbhllhhl",
7929 CmpInstObj_Convert, &mh,
7930 &text,
7931 &size,
7932 &fontNumber,
7933 &fontSize,
7934 &textFace,
7935 &textJustification,
7936 &displayFlags,
7937 &scrollDelay,
7938 &hiliteStart,
7939 &hiliteEnd,
7940 &duration))
7941 return NULL;
7942 _rv = TextMediaAddTextSample(mh,
7943 text,
7944 size,
7945 fontNumber,
7946 fontSize,
7947 textFace,
7948 &textColor,
7949 &backColor,
7950 textJustification,
7951 &textBox,
7952 displayFlags,
7953 scrollDelay,
7954 hiliteStart,
7955 hiliteEnd,
7956 &rgbHiliteColor,
7957 duration,
7958 &sampleTime);
7959 _res = Py_BuildValue("lO&O&O&O&l",
7960 _rv,
7961 QdRGB_New, &textColor,
7962 QdRGB_New, &backColor,
7963 PyMac_BuildRect, &textBox,
7964 QdRGB_New, &rgbHiliteColor,
7965 sampleTime);
7966 return _res;
7969 static PyObject *Qt_TextMediaAddTESample(PyObject *_self, PyObject *_args)
7971 PyObject *_res = NULL;
7972 ComponentResult _rv;
7973 MediaHandler mh;
7974 TEHandle hTE;
7975 RGBColor backColor;
7976 short textJustification;
7977 Rect textBox;
7978 long displayFlags;
7979 TimeValue scrollDelay;
7980 short hiliteStart;
7981 short hiliteEnd;
7982 RGBColor rgbHiliteColor;
7983 TimeValue duration;
7984 TimeValue sampleTime;
7985 #ifndef TextMediaAddTESample
7986 PyMac_PRECHECK(TextMediaAddTESample);
7987 #endif
7988 if (!PyArg_ParseTuple(_args, "O&O&hllhhl",
7989 CmpInstObj_Convert, &mh,
7990 ResObj_Convert, &hTE,
7991 &textJustification,
7992 &displayFlags,
7993 &scrollDelay,
7994 &hiliteStart,
7995 &hiliteEnd,
7996 &duration))
7997 return NULL;
7998 _rv = TextMediaAddTESample(mh,
7999 hTE,
8000 &backColor,
8001 textJustification,
8002 &textBox,
8003 displayFlags,
8004 scrollDelay,
8005 hiliteStart,
8006 hiliteEnd,
8007 &rgbHiliteColor,
8008 duration,
8009 &sampleTime);
8010 _res = Py_BuildValue("lO&O&O&l",
8011 _rv,
8012 QdRGB_New, &backColor,
8013 PyMac_BuildRect, &textBox,
8014 QdRGB_New, &rgbHiliteColor,
8015 sampleTime);
8016 return _res;
8019 static PyObject *Qt_TextMediaAddHiliteSample(PyObject *_self, PyObject *_args)
8021 PyObject *_res = NULL;
8022 ComponentResult _rv;
8023 MediaHandler mh;
8024 short hiliteStart;
8025 short hiliteEnd;
8026 RGBColor rgbHiliteColor;
8027 TimeValue duration;
8028 TimeValue sampleTime;
8029 #ifndef TextMediaAddHiliteSample
8030 PyMac_PRECHECK(TextMediaAddHiliteSample);
8031 #endif
8032 if (!PyArg_ParseTuple(_args, "O&hhl",
8033 CmpInstObj_Convert, &mh,
8034 &hiliteStart,
8035 &hiliteEnd,
8036 &duration))
8037 return NULL;
8038 _rv = TextMediaAddHiliteSample(mh,
8039 hiliteStart,
8040 hiliteEnd,
8041 &rgbHiliteColor,
8042 duration,
8043 &sampleTime);
8044 _res = Py_BuildValue("lO&l",
8045 _rv,
8046 QdRGB_New, &rgbHiliteColor,
8047 sampleTime);
8048 return _res;
8051 static PyObject *Qt_TextMediaDrawRaw(PyObject *_self, PyObject *_args)
8053 PyObject *_res = NULL;
8054 ComponentResult _rv;
8055 MediaHandler mh;
8056 GWorldPtr gw;
8057 GDHandle gd;
8058 void * data;
8059 long dataSize;
8060 TextDescriptionHandle tdh;
8061 #ifndef TextMediaDrawRaw
8062 PyMac_PRECHECK(TextMediaDrawRaw);
8063 #endif
8064 if (!PyArg_ParseTuple(_args, "O&O&O&slO&",
8065 CmpInstObj_Convert, &mh,
8066 GWorldObj_Convert, &gw,
8067 OptResObj_Convert, &gd,
8068 &data,
8069 &dataSize,
8070 ResObj_Convert, &tdh))
8071 return NULL;
8072 _rv = TextMediaDrawRaw(mh,
8075 data,
8076 dataSize,
8077 tdh);
8078 _res = Py_BuildValue("l",
8079 _rv);
8080 return _res;
8083 static PyObject *Qt_TextMediaSetTextProperty(PyObject *_self, PyObject *_args)
8085 PyObject *_res = NULL;
8086 ComponentResult _rv;
8087 MediaHandler mh;
8088 TimeValue atMediaTime;
8089 long propertyType;
8090 void * data;
8091 long dataSize;
8092 #ifndef TextMediaSetTextProperty
8093 PyMac_PRECHECK(TextMediaSetTextProperty);
8094 #endif
8095 if (!PyArg_ParseTuple(_args, "O&llsl",
8096 CmpInstObj_Convert, &mh,
8097 &atMediaTime,
8098 &propertyType,
8099 &data,
8100 &dataSize))
8101 return NULL;
8102 _rv = TextMediaSetTextProperty(mh,
8103 atMediaTime,
8104 propertyType,
8105 data,
8106 dataSize);
8107 _res = Py_BuildValue("l",
8108 _rv);
8109 return _res;
8112 static PyObject *Qt_TextMediaRawSetup(PyObject *_self, PyObject *_args)
8114 PyObject *_res = NULL;
8115 ComponentResult _rv;
8116 MediaHandler mh;
8117 GWorldPtr gw;
8118 GDHandle gd;
8119 void * data;
8120 long dataSize;
8121 TextDescriptionHandle tdh;
8122 TimeValue sampleDuration;
8123 #ifndef TextMediaRawSetup
8124 PyMac_PRECHECK(TextMediaRawSetup);
8125 #endif
8126 if (!PyArg_ParseTuple(_args, "O&O&O&slO&l",
8127 CmpInstObj_Convert, &mh,
8128 GWorldObj_Convert, &gw,
8129 OptResObj_Convert, &gd,
8130 &data,
8131 &dataSize,
8132 ResObj_Convert, &tdh,
8133 &sampleDuration))
8134 return NULL;
8135 _rv = TextMediaRawSetup(mh,
8138 data,
8139 dataSize,
8140 tdh,
8141 sampleDuration);
8142 _res = Py_BuildValue("l",
8143 _rv);
8144 return _res;
8147 static PyObject *Qt_TextMediaRawIdle(PyObject *_self, PyObject *_args)
8149 PyObject *_res = NULL;
8150 ComponentResult _rv;
8151 MediaHandler mh;
8152 GWorldPtr gw;
8153 GDHandle gd;
8154 TimeValue sampleTime;
8155 long flagsIn;
8156 long flagsOut;
8157 #ifndef TextMediaRawIdle
8158 PyMac_PRECHECK(TextMediaRawIdle);
8159 #endif
8160 if (!PyArg_ParseTuple(_args, "O&O&O&ll",
8161 CmpInstObj_Convert, &mh,
8162 GWorldObj_Convert, &gw,
8163 OptResObj_Convert, &gd,
8164 &sampleTime,
8165 &flagsIn))
8166 return NULL;
8167 _rv = TextMediaRawIdle(mh,
8170 sampleTime,
8171 flagsIn,
8172 &flagsOut);
8173 _res = Py_BuildValue("ll",
8174 _rv,
8175 flagsOut);
8176 return _res;
8179 static PyObject *Qt_TextMediaGetTextProperty(PyObject *_self, PyObject *_args)
8181 PyObject *_res = NULL;
8182 ComponentResult _rv;
8183 MediaHandler mh;
8184 TimeValue atMediaTime;
8185 long propertyType;
8186 void * data;
8187 long dataSize;
8188 #ifndef TextMediaGetTextProperty
8189 PyMac_PRECHECK(TextMediaGetTextProperty);
8190 #endif
8191 if (!PyArg_ParseTuple(_args, "O&llsl",
8192 CmpInstObj_Convert, &mh,
8193 &atMediaTime,
8194 &propertyType,
8195 &data,
8196 &dataSize))
8197 return NULL;
8198 _rv = TextMediaGetTextProperty(mh,
8199 atMediaTime,
8200 propertyType,
8201 data,
8202 dataSize);
8203 _res = Py_BuildValue("l",
8204 _rv);
8205 return _res;
8208 static PyObject *Qt_TextMediaFindNextText(PyObject *_self, PyObject *_args)
8210 PyObject *_res = NULL;
8211 ComponentResult _rv;
8212 MediaHandler mh;
8213 Ptr text;
8214 long size;
8215 short findFlags;
8216 TimeValue startTime;
8217 TimeValue foundTime;
8218 TimeValue foundDuration;
8219 long offset;
8220 #ifndef TextMediaFindNextText
8221 PyMac_PRECHECK(TextMediaFindNextText);
8222 #endif
8223 if (!PyArg_ParseTuple(_args, "O&slhl",
8224 CmpInstObj_Convert, &mh,
8225 &text,
8226 &size,
8227 &findFlags,
8228 &startTime))
8229 return NULL;
8230 _rv = TextMediaFindNextText(mh,
8231 text,
8232 size,
8233 findFlags,
8234 startTime,
8235 &foundTime,
8236 &foundDuration,
8237 &offset);
8238 _res = Py_BuildValue("llll",
8239 _rv,
8240 foundTime,
8241 foundDuration,
8242 offset);
8243 return _res;
8246 static PyObject *Qt_TextMediaHiliteTextSample(PyObject *_self, PyObject *_args)
8248 PyObject *_res = NULL;
8249 ComponentResult _rv;
8250 MediaHandler mh;
8251 TimeValue sampleTime;
8252 short hiliteStart;
8253 short hiliteEnd;
8254 RGBColor rgbHiliteColor;
8255 #ifndef TextMediaHiliteTextSample
8256 PyMac_PRECHECK(TextMediaHiliteTextSample);
8257 #endif
8258 if (!PyArg_ParseTuple(_args, "O&lhh",
8259 CmpInstObj_Convert, &mh,
8260 &sampleTime,
8261 &hiliteStart,
8262 &hiliteEnd))
8263 return NULL;
8264 _rv = TextMediaHiliteTextSample(mh,
8265 sampleTime,
8266 hiliteStart,
8267 hiliteEnd,
8268 &rgbHiliteColor);
8269 _res = Py_BuildValue("lO&",
8270 _rv,
8271 QdRGB_New, &rgbHiliteColor);
8272 return _res;
8275 static PyObject *Qt_TextMediaSetTextSampleData(PyObject *_self, PyObject *_args)
8277 PyObject *_res = NULL;
8278 ComponentResult _rv;
8279 MediaHandler mh;
8280 void * data;
8281 OSType dataType;
8282 #ifndef TextMediaSetTextSampleData
8283 PyMac_PRECHECK(TextMediaSetTextSampleData);
8284 #endif
8285 if (!PyArg_ParseTuple(_args, "O&sO&",
8286 CmpInstObj_Convert, &mh,
8287 &data,
8288 PyMac_GetOSType, &dataType))
8289 return NULL;
8290 _rv = TextMediaSetTextSampleData(mh,
8291 data,
8292 dataType);
8293 _res = Py_BuildValue("l",
8294 _rv);
8295 return _res;
8298 static PyObject *Qt_SpriteMediaSetProperty(PyObject *_self, PyObject *_args)
8300 PyObject *_res = NULL;
8301 ComponentResult _rv;
8302 MediaHandler mh;
8303 short spriteIndex;
8304 long propertyType;
8305 void * propertyValue;
8306 #ifndef SpriteMediaSetProperty
8307 PyMac_PRECHECK(SpriteMediaSetProperty);
8308 #endif
8309 if (!PyArg_ParseTuple(_args, "O&hls",
8310 CmpInstObj_Convert, &mh,
8311 &spriteIndex,
8312 &propertyType,
8313 &propertyValue))
8314 return NULL;
8315 _rv = SpriteMediaSetProperty(mh,
8316 spriteIndex,
8317 propertyType,
8318 propertyValue);
8319 _res = Py_BuildValue("l",
8320 _rv);
8321 return _res;
8324 static PyObject *Qt_SpriteMediaGetProperty(PyObject *_self, PyObject *_args)
8326 PyObject *_res = NULL;
8327 ComponentResult _rv;
8328 MediaHandler mh;
8329 short spriteIndex;
8330 long propertyType;
8331 void * propertyValue;
8332 #ifndef SpriteMediaGetProperty
8333 PyMac_PRECHECK(SpriteMediaGetProperty);
8334 #endif
8335 if (!PyArg_ParseTuple(_args, "O&hls",
8336 CmpInstObj_Convert, &mh,
8337 &spriteIndex,
8338 &propertyType,
8339 &propertyValue))
8340 return NULL;
8341 _rv = SpriteMediaGetProperty(mh,
8342 spriteIndex,
8343 propertyType,
8344 propertyValue);
8345 _res = Py_BuildValue("l",
8346 _rv);
8347 return _res;
8350 static PyObject *Qt_SpriteMediaHitTestSprites(PyObject *_self, PyObject *_args)
8352 PyObject *_res = NULL;
8353 ComponentResult _rv;
8354 MediaHandler mh;
8355 long flags;
8356 Point loc;
8357 short spriteHitIndex;
8358 #ifndef SpriteMediaHitTestSprites
8359 PyMac_PRECHECK(SpriteMediaHitTestSprites);
8360 #endif
8361 if (!PyArg_ParseTuple(_args, "O&lO&",
8362 CmpInstObj_Convert, &mh,
8363 &flags,
8364 PyMac_GetPoint, &loc))
8365 return NULL;
8366 _rv = SpriteMediaHitTestSprites(mh,
8367 flags,
8368 loc,
8369 &spriteHitIndex);
8370 _res = Py_BuildValue("lh",
8371 _rv,
8372 spriteHitIndex);
8373 return _res;
8376 static PyObject *Qt_SpriteMediaCountSprites(PyObject *_self, PyObject *_args)
8378 PyObject *_res = NULL;
8379 ComponentResult _rv;
8380 MediaHandler mh;
8381 short numSprites;
8382 #ifndef SpriteMediaCountSprites
8383 PyMac_PRECHECK(SpriteMediaCountSprites);
8384 #endif
8385 if (!PyArg_ParseTuple(_args, "O&",
8386 CmpInstObj_Convert, &mh))
8387 return NULL;
8388 _rv = SpriteMediaCountSprites(mh,
8389 &numSprites);
8390 _res = Py_BuildValue("lh",
8391 _rv,
8392 numSprites);
8393 return _res;
8396 static PyObject *Qt_SpriteMediaCountImages(PyObject *_self, PyObject *_args)
8398 PyObject *_res = NULL;
8399 ComponentResult _rv;
8400 MediaHandler mh;
8401 short numImages;
8402 #ifndef SpriteMediaCountImages
8403 PyMac_PRECHECK(SpriteMediaCountImages);
8404 #endif
8405 if (!PyArg_ParseTuple(_args, "O&",
8406 CmpInstObj_Convert, &mh))
8407 return NULL;
8408 _rv = SpriteMediaCountImages(mh,
8409 &numImages);
8410 _res = Py_BuildValue("lh",
8411 _rv,
8412 numImages);
8413 return _res;
8416 static PyObject *Qt_SpriteMediaGetIndImageDescription(PyObject *_self, PyObject *_args)
8418 PyObject *_res = NULL;
8419 ComponentResult _rv;
8420 MediaHandler mh;
8421 short imageIndex;
8422 ImageDescriptionHandle imageDescription;
8423 #ifndef SpriteMediaGetIndImageDescription
8424 PyMac_PRECHECK(SpriteMediaGetIndImageDescription);
8425 #endif
8426 if (!PyArg_ParseTuple(_args, "O&hO&",
8427 CmpInstObj_Convert, &mh,
8428 &imageIndex,
8429 ResObj_Convert, &imageDescription))
8430 return NULL;
8431 _rv = SpriteMediaGetIndImageDescription(mh,
8432 imageIndex,
8433 imageDescription);
8434 _res = Py_BuildValue("l",
8435 _rv);
8436 return _res;
8439 static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(PyObject *_self, PyObject *_args)
8441 PyObject *_res = NULL;
8442 ComponentResult _rv;
8443 MediaHandler mh;
8444 long sampleNum;
8445 #ifndef SpriteMediaGetDisplayedSampleNumber
8446 PyMac_PRECHECK(SpriteMediaGetDisplayedSampleNumber);
8447 #endif
8448 if (!PyArg_ParseTuple(_args, "O&",
8449 CmpInstObj_Convert, &mh))
8450 return NULL;
8451 _rv = SpriteMediaGetDisplayedSampleNumber(mh,
8452 &sampleNum);
8453 _res = Py_BuildValue("ll",
8454 _rv,
8455 sampleNum);
8456 return _res;
8459 static PyObject *Qt_SpriteMediaGetSpriteName(PyObject *_self, PyObject *_args)
8461 PyObject *_res = NULL;
8462 ComponentResult _rv;
8463 MediaHandler mh;
8464 QTAtomID spriteID;
8465 Str255 spriteName;
8466 #ifndef SpriteMediaGetSpriteName
8467 PyMac_PRECHECK(SpriteMediaGetSpriteName);
8468 #endif
8469 if (!PyArg_ParseTuple(_args, "O&lO&",
8470 CmpInstObj_Convert, &mh,
8471 &spriteID,
8472 PyMac_GetStr255, spriteName))
8473 return NULL;
8474 _rv = SpriteMediaGetSpriteName(mh,
8475 spriteID,
8476 spriteName);
8477 _res = Py_BuildValue("l",
8478 _rv);
8479 return _res;
8482 static PyObject *Qt_SpriteMediaGetImageName(PyObject *_self, PyObject *_args)
8484 PyObject *_res = NULL;
8485 ComponentResult _rv;
8486 MediaHandler mh;
8487 short imageIndex;
8488 Str255 imageName;
8489 #ifndef SpriteMediaGetImageName
8490 PyMac_PRECHECK(SpriteMediaGetImageName);
8491 #endif
8492 if (!PyArg_ParseTuple(_args, "O&hO&",
8493 CmpInstObj_Convert, &mh,
8494 &imageIndex,
8495 PyMac_GetStr255, imageName))
8496 return NULL;
8497 _rv = SpriteMediaGetImageName(mh,
8498 imageIndex,
8499 imageName);
8500 _res = Py_BuildValue("l",
8501 _rv);
8502 return _res;
8505 static PyObject *Qt_SpriteMediaSetSpriteProperty(PyObject *_self, PyObject *_args)
8507 PyObject *_res = NULL;
8508 ComponentResult _rv;
8509 MediaHandler mh;
8510 QTAtomID spriteID;
8511 long propertyType;
8512 void * propertyValue;
8513 #ifndef SpriteMediaSetSpriteProperty
8514 PyMac_PRECHECK(SpriteMediaSetSpriteProperty);
8515 #endif
8516 if (!PyArg_ParseTuple(_args, "O&lls",
8517 CmpInstObj_Convert, &mh,
8518 &spriteID,
8519 &propertyType,
8520 &propertyValue))
8521 return NULL;
8522 _rv = SpriteMediaSetSpriteProperty(mh,
8523 spriteID,
8524 propertyType,
8525 propertyValue);
8526 _res = Py_BuildValue("l",
8527 _rv);
8528 return _res;
8531 static PyObject *Qt_SpriteMediaGetSpriteProperty(PyObject *_self, PyObject *_args)
8533 PyObject *_res = NULL;
8534 ComponentResult _rv;
8535 MediaHandler mh;
8536 QTAtomID spriteID;
8537 long propertyType;
8538 void * propertyValue;
8539 #ifndef SpriteMediaGetSpriteProperty
8540 PyMac_PRECHECK(SpriteMediaGetSpriteProperty);
8541 #endif
8542 if (!PyArg_ParseTuple(_args, "O&lls",
8543 CmpInstObj_Convert, &mh,
8544 &spriteID,
8545 &propertyType,
8546 &propertyValue))
8547 return NULL;
8548 _rv = SpriteMediaGetSpriteProperty(mh,
8549 spriteID,
8550 propertyType,
8551 propertyValue);
8552 _res = Py_BuildValue("l",
8553 _rv);
8554 return _res;
8557 static PyObject *Qt_SpriteMediaHitTestAllSprites(PyObject *_self, PyObject *_args)
8559 PyObject *_res = NULL;
8560 ComponentResult _rv;
8561 MediaHandler mh;
8562 long flags;
8563 Point loc;
8564 QTAtomID spriteHitID;
8565 #ifndef SpriteMediaHitTestAllSprites
8566 PyMac_PRECHECK(SpriteMediaHitTestAllSprites);
8567 #endif
8568 if (!PyArg_ParseTuple(_args, "O&lO&",
8569 CmpInstObj_Convert, &mh,
8570 &flags,
8571 PyMac_GetPoint, &loc))
8572 return NULL;
8573 _rv = SpriteMediaHitTestAllSprites(mh,
8574 flags,
8575 loc,
8576 &spriteHitID);
8577 _res = Py_BuildValue("ll",
8578 _rv,
8579 spriteHitID);
8580 return _res;
8583 static PyObject *Qt_SpriteMediaHitTestOneSprite(PyObject *_self, PyObject *_args)
8585 PyObject *_res = NULL;
8586 ComponentResult _rv;
8587 MediaHandler mh;
8588 QTAtomID spriteID;
8589 long flags;
8590 Point loc;
8591 Boolean wasHit;
8592 #ifndef SpriteMediaHitTestOneSprite
8593 PyMac_PRECHECK(SpriteMediaHitTestOneSprite);
8594 #endif
8595 if (!PyArg_ParseTuple(_args, "O&llO&",
8596 CmpInstObj_Convert, &mh,
8597 &spriteID,
8598 &flags,
8599 PyMac_GetPoint, &loc))
8600 return NULL;
8601 _rv = SpriteMediaHitTestOneSprite(mh,
8602 spriteID,
8603 flags,
8604 loc,
8605 &wasHit);
8606 _res = Py_BuildValue("lb",
8607 _rv,
8608 wasHit);
8609 return _res;
8612 static PyObject *Qt_SpriteMediaSpriteIndexToID(PyObject *_self, PyObject *_args)
8614 PyObject *_res = NULL;
8615 ComponentResult _rv;
8616 MediaHandler mh;
8617 short spriteIndex;
8618 QTAtomID spriteID;
8619 #ifndef SpriteMediaSpriteIndexToID
8620 PyMac_PRECHECK(SpriteMediaSpriteIndexToID);
8621 #endif
8622 if (!PyArg_ParseTuple(_args, "O&h",
8623 CmpInstObj_Convert, &mh,
8624 &spriteIndex))
8625 return NULL;
8626 _rv = SpriteMediaSpriteIndexToID(mh,
8627 spriteIndex,
8628 &spriteID);
8629 _res = Py_BuildValue("ll",
8630 _rv,
8631 spriteID);
8632 return _res;
8635 static PyObject *Qt_SpriteMediaSpriteIDToIndex(PyObject *_self, PyObject *_args)
8637 PyObject *_res = NULL;
8638 ComponentResult _rv;
8639 MediaHandler mh;
8640 QTAtomID spriteID;
8641 short spriteIndex;
8642 #ifndef SpriteMediaSpriteIDToIndex
8643 PyMac_PRECHECK(SpriteMediaSpriteIDToIndex);
8644 #endif
8645 if (!PyArg_ParseTuple(_args, "O&l",
8646 CmpInstObj_Convert, &mh,
8647 &spriteID))
8648 return NULL;
8649 _rv = SpriteMediaSpriteIDToIndex(mh,
8650 spriteID,
8651 &spriteIndex);
8652 _res = Py_BuildValue("lh",
8653 _rv,
8654 spriteIndex);
8655 return _res;
8658 static PyObject *Qt_SpriteMediaSetActionVariable(PyObject *_self, PyObject *_args)
8660 PyObject *_res = NULL;
8661 ComponentResult _rv;
8662 MediaHandler mh;
8663 QTAtomID variableID;
8664 float value;
8665 #ifndef SpriteMediaSetActionVariable
8666 PyMac_PRECHECK(SpriteMediaSetActionVariable);
8667 #endif
8668 if (!PyArg_ParseTuple(_args, "O&lf",
8669 CmpInstObj_Convert, &mh,
8670 &variableID,
8671 &value))
8672 return NULL;
8673 _rv = SpriteMediaSetActionVariable(mh,
8674 variableID,
8675 &value);
8676 _res = Py_BuildValue("l",
8677 _rv);
8678 return _res;
8681 static PyObject *Qt_SpriteMediaGetActionVariable(PyObject *_self, PyObject *_args)
8683 PyObject *_res = NULL;
8684 ComponentResult _rv;
8685 MediaHandler mh;
8686 QTAtomID variableID;
8687 float value;
8688 #ifndef SpriteMediaGetActionVariable
8689 PyMac_PRECHECK(SpriteMediaGetActionVariable);
8690 #endif
8691 if (!PyArg_ParseTuple(_args, "O&l",
8692 CmpInstObj_Convert, &mh,
8693 &variableID))
8694 return NULL;
8695 _rv = SpriteMediaGetActionVariable(mh,
8696 variableID,
8697 &value);
8698 _res = Py_BuildValue("lf",
8699 _rv,
8700 value);
8701 return _res;
8704 static PyObject *Qt_SpriteMediaDisposeSprite(PyObject *_self, PyObject *_args)
8706 PyObject *_res = NULL;
8707 ComponentResult _rv;
8708 MediaHandler mh;
8709 QTAtomID spriteID;
8710 #ifndef SpriteMediaDisposeSprite
8711 PyMac_PRECHECK(SpriteMediaDisposeSprite);
8712 #endif
8713 if (!PyArg_ParseTuple(_args, "O&l",
8714 CmpInstObj_Convert, &mh,
8715 &spriteID))
8716 return NULL;
8717 _rv = SpriteMediaDisposeSprite(mh,
8718 spriteID);
8719 _res = Py_BuildValue("l",
8720 _rv);
8721 return _res;
8724 static PyObject *Qt_SpriteMediaSetActionVariableToString(PyObject *_self, PyObject *_args)
8726 PyObject *_res = NULL;
8727 ComponentResult _rv;
8728 MediaHandler mh;
8729 QTAtomID variableID;
8730 Ptr theCString;
8731 #ifndef SpriteMediaSetActionVariableToString
8732 PyMac_PRECHECK(SpriteMediaSetActionVariableToString);
8733 #endif
8734 if (!PyArg_ParseTuple(_args, "O&ls",
8735 CmpInstObj_Convert, &mh,
8736 &variableID,
8737 &theCString))
8738 return NULL;
8739 _rv = SpriteMediaSetActionVariableToString(mh,
8740 variableID,
8741 theCString);
8742 _res = Py_BuildValue("l",
8743 _rv);
8744 return _res;
8747 static PyObject *Qt_SpriteMediaGetActionVariableAsString(PyObject *_self, PyObject *_args)
8749 PyObject *_res = NULL;
8750 ComponentResult _rv;
8751 MediaHandler mh;
8752 QTAtomID variableID;
8753 Handle theCString;
8754 #ifndef SpriteMediaGetActionVariableAsString
8755 PyMac_PRECHECK(SpriteMediaGetActionVariableAsString);
8756 #endif
8757 if (!PyArg_ParseTuple(_args, "O&l",
8758 CmpInstObj_Convert, &mh,
8759 &variableID))
8760 return NULL;
8761 _rv = SpriteMediaGetActionVariableAsString(mh,
8762 variableID,
8763 &theCString);
8764 _res = Py_BuildValue("lO&",
8765 _rv,
8766 ResObj_New, theCString);
8767 return _res;
8770 static PyObject *Qt_FlashMediaSetPan(PyObject *_self, PyObject *_args)
8772 PyObject *_res = NULL;
8773 ComponentResult _rv;
8774 MediaHandler mh;
8775 short xPercent;
8776 short yPercent;
8777 #ifndef FlashMediaSetPan
8778 PyMac_PRECHECK(FlashMediaSetPan);
8779 #endif
8780 if (!PyArg_ParseTuple(_args, "O&hh",
8781 CmpInstObj_Convert, &mh,
8782 &xPercent,
8783 &yPercent))
8784 return NULL;
8785 _rv = FlashMediaSetPan(mh,
8786 xPercent,
8787 yPercent);
8788 _res = Py_BuildValue("l",
8789 _rv);
8790 return _res;
8793 static PyObject *Qt_FlashMediaSetZoom(PyObject *_self, PyObject *_args)
8795 PyObject *_res = NULL;
8796 ComponentResult _rv;
8797 MediaHandler mh;
8798 short factor;
8799 #ifndef FlashMediaSetZoom
8800 PyMac_PRECHECK(FlashMediaSetZoom);
8801 #endif
8802 if (!PyArg_ParseTuple(_args, "O&h",
8803 CmpInstObj_Convert, &mh,
8804 &factor))
8805 return NULL;
8806 _rv = FlashMediaSetZoom(mh,
8807 factor);
8808 _res = Py_BuildValue("l",
8809 _rv);
8810 return _res;
8813 static PyObject *Qt_FlashMediaSetZoomRect(PyObject *_self, PyObject *_args)
8815 PyObject *_res = NULL;
8816 ComponentResult _rv;
8817 MediaHandler mh;
8818 long left;
8819 long top;
8820 long right;
8821 long bottom;
8822 #ifndef FlashMediaSetZoomRect
8823 PyMac_PRECHECK(FlashMediaSetZoomRect);
8824 #endif
8825 if (!PyArg_ParseTuple(_args, "O&llll",
8826 CmpInstObj_Convert, &mh,
8827 &left,
8828 &top,
8829 &right,
8830 &bottom))
8831 return NULL;
8832 _rv = FlashMediaSetZoomRect(mh,
8833 left,
8834 top,
8835 right,
8836 bottom);
8837 _res = Py_BuildValue("l",
8838 _rv);
8839 return _res;
8842 static PyObject *Qt_FlashMediaGetRefConBounds(PyObject *_self, PyObject *_args)
8844 PyObject *_res = NULL;
8845 ComponentResult _rv;
8846 MediaHandler mh;
8847 long refCon;
8848 long left;
8849 long top;
8850 long right;
8851 long bottom;
8852 #ifndef FlashMediaGetRefConBounds
8853 PyMac_PRECHECK(FlashMediaGetRefConBounds);
8854 #endif
8855 if (!PyArg_ParseTuple(_args, "O&l",
8856 CmpInstObj_Convert, &mh,
8857 &refCon))
8858 return NULL;
8859 _rv = FlashMediaGetRefConBounds(mh,
8860 refCon,
8861 &left,
8862 &top,
8863 &right,
8864 &bottom);
8865 _res = Py_BuildValue("lllll",
8866 _rv,
8867 left,
8868 top,
8869 right,
8870 bottom);
8871 return _res;
8874 static PyObject *Qt_FlashMediaGetRefConID(PyObject *_self, PyObject *_args)
8876 PyObject *_res = NULL;
8877 ComponentResult _rv;
8878 MediaHandler mh;
8879 long refCon;
8880 long refConID;
8881 #ifndef FlashMediaGetRefConID
8882 PyMac_PRECHECK(FlashMediaGetRefConID);
8883 #endif
8884 if (!PyArg_ParseTuple(_args, "O&l",
8885 CmpInstObj_Convert, &mh,
8886 &refCon))
8887 return NULL;
8888 _rv = FlashMediaGetRefConID(mh,
8889 refCon,
8890 &refConID);
8891 _res = Py_BuildValue("ll",
8892 _rv,
8893 refConID);
8894 return _res;
8897 static PyObject *Qt_FlashMediaIDToRefCon(PyObject *_self, PyObject *_args)
8899 PyObject *_res = NULL;
8900 ComponentResult _rv;
8901 MediaHandler mh;
8902 long refConID;
8903 long refCon;
8904 #ifndef FlashMediaIDToRefCon
8905 PyMac_PRECHECK(FlashMediaIDToRefCon);
8906 #endif
8907 if (!PyArg_ParseTuple(_args, "O&l",
8908 CmpInstObj_Convert, &mh,
8909 &refConID))
8910 return NULL;
8911 _rv = FlashMediaIDToRefCon(mh,
8912 refConID,
8913 &refCon);
8914 _res = Py_BuildValue("ll",
8915 _rv,
8916 refCon);
8917 return _res;
8920 static PyObject *Qt_FlashMediaGetDisplayedFrameNumber(PyObject *_self, PyObject *_args)
8922 PyObject *_res = NULL;
8923 ComponentResult _rv;
8924 MediaHandler mh;
8925 long flashFrameNumber;
8926 #ifndef FlashMediaGetDisplayedFrameNumber
8927 PyMac_PRECHECK(FlashMediaGetDisplayedFrameNumber);
8928 #endif
8929 if (!PyArg_ParseTuple(_args, "O&",
8930 CmpInstObj_Convert, &mh))
8931 return NULL;
8932 _rv = FlashMediaGetDisplayedFrameNumber(mh,
8933 &flashFrameNumber);
8934 _res = Py_BuildValue("ll",
8935 _rv,
8936 flashFrameNumber);
8937 return _res;
8940 static PyObject *Qt_FlashMediaFrameNumberToMovieTime(PyObject *_self, PyObject *_args)
8942 PyObject *_res = NULL;
8943 ComponentResult _rv;
8944 MediaHandler mh;
8945 long flashFrameNumber;
8946 TimeValue movieTime;
8947 #ifndef FlashMediaFrameNumberToMovieTime
8948 PyMac_PRECHECK(FlashMediaFrameNumberToMovieTime);
8949 #endif
8950 if (!PyArg_ParseTuple(_args, "O&l",
8951 CmpInstObj_Convert, &mh,
8952 &flashFrameNumber))
8953 return NULL;
8954 _rv = FlashMediaFrameNumberToMovieTime(mh,
8955 flashFrameNumber,
8956 &movieTime);
8957 _res = Py_BuildValue("ll",
8958 _rv,
8959 movieTime);
8960 return _res;
8963 static PyObject *Qt_FlashMediaFrameLabelToMovieTime(PyObject *_self, PyObject *_args)
8965 PyObject *_res = NULL;
8966 ComponentResult _rv;
8967 MediaHandler mh;
8968 Ptr theLabel;
8969 TimeValue movieTime;
8970 #ifndef FlashMediaFrameLabelToMovieTime
8971 PyMac_PRECHECK(FlashMediaFrameLabelToMovieTime);
8972 #endif
8973 if (!PyArg_ParseTuple(_args, "O&s",
8974 CmpInstObj_Convert, &mh,
8975 &theLabel))
8976 return NULL;
8977 _rv = FlashMediaFrameLabelToMovieTime(mh,
8978 theLabel,
8979 &movieTime);
8980 _res = Py_BuildValue("ll",
8981 _rv,
8982 movieTime);
8983 return _res;
8986 static PyObject *Qt_FlashMediaGetFlashVariable(PyObject *_self, PyObject *_args)
8988 PyObject *_res = NULL;
8989 ComponentResult _rv;
8990 MediaHandler mh;
8991 char path;
8992 char name;
8993 Handle theVariableCStringOut;
8994 #ifndef FlashMediaGetFlashVariable
8995 PyMac_PRECHECK(FlashMediaGetFlashVariable);
8996 #endif
8997 if (!PyArg_ParseTuple(_args, "O&",
8998 CmpInstObj_Convert, &mh))
8999 return NULL;
9000 _rv = FlashMediaGetFlashVariable(mh,
9001 &path,
9002 &name,
9003 &theVariableCStringOut);
9004 _res = Py_BuildValue("lccO&",
9005 _rv,
9006 path,
9007 name,
9008 ResObj_New, theVariableCStringOut);
9009 return _res;
9012 static PyObject *Qt_FlashMediaSetFlashVariable(PyObject *_self, PyObject *_args)
9014 PyObject *_res = NULL;
9015 ComponentResult _rv;
9016 MediaHandler mh;
9017 char path;
9018 char name;
9019 char value;
9020 Boolean updateFocus;
9021 #ifndef FlashMediaSetFlashVariable
9022 PyMac_PRECHECK(FlashMediaSetFlashVariable);
9023 #endif
9024 if (!PyArg_ParseTuple(_args, "O&b",
9025 CmpInstObj_Convert, &mh,
9026 &updateFocus))
9027 return NULL;
9028 _rv = FlashMediaSetFlashVariable(mh,
9029 &path,
9030 &name,
9031 &value,
9032 updateFocus);
9033 _res = Py_BuildValue("lccc",
9034 _rv,
9035 path,
9036 name,
9037 value);
9038 return _res;
9041 static PyObject *Qt_FlashMediaDoButtonActions(PyObject *_self, PyObject *_args)
9043 PyObject *_res = NULL;
9044 ComponentResult _rv;
9045 MediaHandler mh;
9046 char path;
9047 long buttonID;
9048 long transition;
9049 #ifndef FlashMediaDoButtonActions
9050 PyMac_PRECHECK(FlashMediaDoButtonActions);
9051 #endif
9052 if (!PyArg_ParseTuple(_args, "O&ll",
9053 CmpInstObj_Convert, &mh,
9054 &buttonID,
9055 &transition))
9056 return NULL;
9057 _rv = FlashMediaDoButtonActions(mh,
9058 &path,
9059 buttonID,
9060 transition);
9061 _res = Py_BuildValue("lc",
9062 _rv,
9063 path);
9064 return _res;
9067 static PyObject *Qt_FlashMediaGetSupportedSwfVersion(PyObject *_self, PyObject *_args)
9069 PyObject *_res = NULL;
9070 ComponentResult _rv;
9071 MediaHandler mh;
9072 UInt8 swfVersion;
9073 #ifndef FlashMediaGetSupportedSwfVersion
9074 PyMac_PRECHECK(FlashMediaGetSupportedSwfVersion);
9075 #endif
9076 if (!PyArg_ParseTuple(_args, "O&",
9077 CmpInstObj_Convert, &mh))
9078 return NULL;
9079 _rv = FlashMediaGetSupportedSwfVersion(mh,
9080 &swfVersion);
9081 _res = Py_BuildValue("lb",
9082 _rv,
9083 swfVersion);
9084 return _res;
9087 static PyObject *Qt_Media3DGetCurrentGroup(PyObject *_self, PyObject *_args)
9089 PyObject *_res = NULL;
9090 ComponentResult _rv;
9091 MediaHandler mh;
9092 void * group;
9093 #ifndef Media3DGetCurrentGroup
9094 PyMac_PRECHECK(Media3DGetCurrentGroup);
9095 #endif
9096 if (!PyArg_ParseTuple(_args, "O&s",
9097 CmpInstObj_Convert, &mh,
9098 &group))
9099 return NULL;
9100 _rv = Media3DGetCurrentGroup(mh,
9101 group);
9102 _res = Py_BuildValue("l",
9103 _rv);
9104 return _res;
9107 static PyObject *Qt_Media3DTranslateNamedObjectTo(PyObject *_self, PyObject *_args)
9109 PyObject *_res = NULL;
9110 ComponentResult _rv;
9111 MediaHandler mh;
9112 char objectName;
9113 Fixed x;
9114 Fixed y;
9115 Fixed z;
9116 #ifndef Media3DTranslateNamedObjectTo
9117 PyMac_PRECHECK(Media3DTranslateNamedObjectTo);
9118 #endif
9119 if (!PyArg_ParseTuple(_args, "O&O&O&O&",
9120 CmpInstObj_Convert, &mh,
9121 PyMac_GetFixed, &x,
9122 PyMac_GetFixed, &y,
9123 PyMac_GetFixed, &z))
9124 return NULL;
9125 _rv = Media3DTranslateNamedObjectTo(mh,
9126 &objectName,
9130 _res = Py_BuildValue("lc",
9131 _rv,
9132 objectName);
9133 return _res;
9136 static PyObject *Qt_Media3DScaleNamedObjectTo(PyObject *_self, PyObject *_args)
9138 PyObject *_res = NULL;
9139 ComponentResult _rv;
9140 MediaHandler mh;
9141 char objectName;
9142 Fixed xScale;
9143 Fixed yScale;
9144 Fixed zScale;
9145 #ifndef Media3DScaleNamedObjectTo
9146 PyMac_PRECHECK(Media3DScaleNamedObjectTo);
9147 #endif
9148 if (!PyArg_ParseTuple(_args, "O&O&O&O&",
9149 CmpInstObj_Convert, &mh,
9150 PyMac_GetFixed, &xScale,
9151 PyMac_GetFixed, &yScale,
9152 PyMac_GetFixed, &zScale))
9153 return NULL;
9154 _rv = Media3DScaleNamedObjectTo(mh,
9155 &objectName,
9156 xScale,
9157 yScale,
9158 zScale);
9159 _res = Py_BuildValue("lc",
9160 _rv,
9161 objectName);
9162 return _res;
9165 static PyObject *Qt_Media3DRotateNamedObjectTo(PyObject *_self, PyObject *_args)
9167 PyObject *_res = NULL;
9168 ComponentResult _rv;
9169 MediaHandler mh;
9170 char objectName;
9171 Fixed xDegrees;
9172 Fixed yDegrees;
9173 Fixed zDegrees;
9174 #ifndef Media3DRotateNamedObjectTo
9175 PyMac_PRECHECK(Media3DRotateNamedObjectTo);
9176 #endif
9177 if (!PyArg_ParseTuple(_args, "O&O&O&O&",
9178 CmpInstObj_Convert, &mh,
9179 PyMac_GetFixed, &xDegrees,
9180 PyMac_GetFixed, &yDegrees,
9181 PyMac_GetFixed, &zDegrees))
9182 return NULL;
9183 _rv = Media3DRotateNamedObjectTo(mh,
9184 &objectName,
9185 xDegrees,
9186 yDegrees,
9187 zDegrees);
9188 _res = Py_BuildValue("lc",
9189 _rv,
9190 objectName);
9191 return _res;
9194 static PyObject *Qt_Media3DSetCameraData(PyObject *_self, PyObject *_args)
9196 PyObject *_res = NULL;
9197 ComponentResult _rv;
9198 MediaHandler mh;
9199 void * cameraData;
9200 #ifndef Media3DSetCameraData
9201 PyMac_PRECHECK(Media3DSetCameraData);
9202 #endif
9203 if (!PyArg_ParseTuple(_args, "O&s",
9204 CmpInstObj_Convert, &mh,
9205 &cameraData))
9206 return NULL;
9207 _rv = Media3DSetCameraData(mh,
9208 cameraData);
9209 _res = Py_BuildValue("l",
9210 _rv);
9211 return _res;
9214 static PyObject *Qt_Media3DGetCameraData(PyObject *_self, PyObject *_args)
9216 PyObject *_res = NULL;
9217 ComponentResult _rv;
9218 MediaHandler mh;
9219 void * cameraData;
9220 #ifndef Media3DGetCameraData
9221 PyMac_PRECHECK(Media3DGetCameraData);
9222 #endif
9223 if (!PyArg_ParseTuple(_args, "O&s",
9224 CmpInstObj_Convert, &mh,
9225 &cameraData))
9226 return NULL;
9227 _rv = Media3DGetCameraData(mh,
9228 cameraData);
9229 _res = Py_BuildValue("l",
9230 _rv);
9231 return _res;
9234 static PyObject *Qt_Media3DSetCameraAngleAspect(PyObject *_self, PyObject *_args)
9236 PyObject *_res = NULL;
9237 ComponentResult _rv;
9238 MediaHandler mh;
9239 QTFloatSingle fov;
9240 QTFloatSingle aspectRatioXToY;
9241 #ifndef Media3DSetCameraAngleAspect
9242 PyMac_PRECHECK(Media3DSetCameraAngleAspect);
9243 #endif
9244 if (!PyArg_ParseTuple(_args, "O&ff",
9245 CmpInstObj_Convert, &mh,
9246 &fov,
9247 &aspectRatioXToY))
9248 return NULL;
9249 _rv = Media3DSetCameraAngleAspect(mh,
9250 fov,
9251 aspectRatioXToY);
9252 _res = Py_BuildValue("l",
9253 _rv);
9254 return _res;
9257 static PyObject *Qt_Media3DGetCameraAngleAspect(PyObject *_self, PyObject *_args)
9259 PyObject *_res = NULL;
9260 ComponentResult _rv;
9261 MediaHandler mh;
9262 QTFloatSingle fov;
9263 QTFloatSingle aspectRatioXToY;
9264 #ifndef Media3DGetCameraAngleAspect
9265 PyMac_PRECHECK(Media3DGetCameraAngleAspect);
9266 #endif
9267 if (!PyArg_ParseTuple(_args, "O&",
9268 CmpInstObj_Convert, &mh))
9269 return NULL;
9270 _rv = Media3DGetCameraAngleAspect(mh,
9271 &fov,
9272 &aspectRatioXToY);
9273 _res = Py_BuildValue("lff",
9274 _rv,
9275 fov,
9276 aspectRatioXToY);
9277 return _res;
9280 static PyObject *Qt_Media3DSetCameraRange(PyObject *_self, PyObject *_args)
9282 PyObject *_res = NULL;
9283 ComponentResult _rv;
9284 MediaHandler mh;
9285 void * tQ3CameraRange;
9286 #ifndef Media3DSetCameraRange
9287 PyMac_PRECHECK(Media3DSetCameraRange);
9288 #endif
9289 if (!PyArg_ParseTuple(_args, "O&s",
9290 CmpInstObj_Convert, &mh,
9291 &tQ3CameraRange))
9292 return NULL;
9293 _rv = Media3DSetCameraRange(mh,
9294 tQ3CameraRange);
9295 _res = Py_BuildValue("l",
9296 _rv);
9297 return _res;
9300 static PyObject *Qt_Media3DGetCameraRange(PyObject *_self, PyObject *_args)
9302 PyObject *_res = NULL;
9303 ComponentResult _rv;
9304 MediaHandler mh;
9305 void * tQ3CameraRange;
9306 #ifndef Media3DGetCameraRange
9307 PyMac_PRECHECK(Media3DGetCameraRange);
9308 #endif
9309 if (!PyArg_ParseTuple(_args, "O&s",
9310 CmpInstObj_Convert, &mh,
9311 &tQ3CameraRange))
9312 return NULL;
9313 _rv = Media3DGetCameraRange(mh,
9314 tQ3CameraRange);
9315 _res = Py_BuildValue("l",
9316 _rv);
9317 return _res;
9320 static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args)
9322 PyObject *_res = NULL;
9323 TimeBase _rv;
9324 #ifndef NewTimeBase
9325 PyMac_PRECHECK(NewTimeBase);
9326 #endif
9327 if (!PyArg_ParseTuple(_args, ""))
9328 return NULL;
9329 _rv = NewTimeBase();
9330 _res = Py_BuildValue("O&",
9331 TimeBaseObj_New, _rv);
9332 return _res;
9335 static PyObject *Qt_ConvertTime(PyObject *_self, PyObject *_args)
9337 PyObject *_res = NULL;
9338 TimeRecord theTime;
9339 TimeBase newBase;
9340 #ifndef ConvertTime
9341 PyMac_PRECHECK(ConvertTime);
9342 #endif
9343 if (!PyArg_ParseTuple(_args, "O&O&",
9344 QtTimeRecord_Convert, &theTime,
9345 TimeBaseObj_Convert, &newBase))
9346 return NULL;
9347 ConvertTime(&theTime,
9348 newBase);
9349 _res = Py_BuildValue("O&",
9350 QtTimeRecord_New, &theTime);
9351 return _res;
9354 static PyObject *Qt_ConvertTimeScale(PyObject *_self, PyObject *_args)
9356 PyObject *_res = NULL;
9357 TimeRecord theTime;
9358 TimeScale newScale;
9359 #ifndef ConvertTimeScale
9360 PyMac_PRECHECK(ConvertTimeScale);
9361 #endif
9362 if (!PyArg_ParseTuple(_args, "O&l",
9363 QtTimeRecord_Convert, &theTime,
9364 &newScale))
9365 return NULL;
9366 ConvertTimeScale(&theTime,
9367 newScale);
9368 _res = Py_BuildValue("O&",
9369 QtTimeRecord_New, &theTime);
9370 return _res;
9373 static PyObject *Qt_AddTime(PyObject *_self, PyObject *_args)
9375 PyObject *_res = NULL;
9376 TimeRecord dst;
9377 TimeRecord src;
9378 #ifndef AddTime
9379 PyMac_PRECHECK(AddTime);
9380 #endif
9381 if (!PyArg_ParseTuple(_args, "O&O&",
9382 QtTimeRecord_Convert, &dst,
9383 QtTimeRecord_Convert, &src))
9384 return NULL;
9385 AddTime(&dst,
9386 &src);
9387 _res = Py_BuildValue("O&",
9388 QtTimeRecord_New, &dst);
9389 return _res;
9392 static PyObject *Qt_SubtractTime(PyObject *_self, PyObject *_args)
9394 PyObject *_res = NULL;
9395 TimeRecord dst;
9396 TimeRecord src;
9397 #ifndef SubtractTime
9398 PyMac_PRECHECK(SubtractTime);
9399 #endif
9400 if (!PyArg_ParseTuple(_args, "O&O&",
9401 QtTimeRecord_Convert, &dst,
9402 QtTimeRecord_Convert, &src))
9403 return NULL;
9404 SubtractTime(&dst,
9405 &src);
9406 _res = Py_BuildValue("O&",
9407 QtTimeRecord_New, &dst);
9408 return _res;
9411 static PyObject *Qt_MusicMediaGetIndexedTunePlayer(PyObject *_self, PyObject *_args)
9413 PyObject *_res = NULL;
9414 ComponentResult _rv;
9415 ComponentInstance ti;
9416 long sampleDescIndex;
9417 ComponentInstance tp;
9418 #ifndef MusicMediaGetIndexedTunePlayer
9419 PyMac_PRECHECK(MusicMediaGetIndexedTunePlayer);
9420 #endif
9421 if (!PyArg_ParseTuple(_args, "O&l",
9422 CmpInstObj_Convert, &ti,
9423 &sampleDescIndex))
9424 return NULL;
9425 _rv = MusicMediaGetIndexedTunePlayer(ti,
9426 sampleDescIndex,
9427 &tp);
9428 _res = Py_BuildValue("lO&",
9429 _rv,
9430 CmpInstObj_New, tp);
9431 return _res;
9434 static PyObject *Qt_AlignWindow(PyObject *_self, PyObject *_args)
9436 PyObject *_res = NULL;
9437 WindowPtr wp;
9438 Boolean front;
9439 #ifndef AlignWindow
9440 PyMac_PRECHECK(AlignWindow);
9441 #endif
9442 if (!PyArg_ParseTuple(_args, "O&b",
9443 WinObj_Convert, &wp,
9444 &front))
9445 return NULL;
9446 AlignWindow(wp,
9447 front,
9448 (Rect *)0,
9449 (ICMAlignmentProcRecordPtr)0);
9450 Py_INCREF(Py_None);
9451 _res = Py_None;
9452 return _res;
9455 static PyObject *Qt_DragAlignedWindow(PyObject *_self, PyObject *_args)
9457 PyObject *_res = NULL;
9458 WindowPtr wp;
9459 Point startPt;
9460 Rect boundsRect;
9461 #ifndef DragAlignedWindow
9462 PyMac_PRECHECK(DragAlignedWindow);
9463 #endif
9464 if (!PyArg_ParseTuple(_args, "O&O&O&",
9465 WinObj_Convert, &wp,
9466 PyMac_GetPoint, &startPt,
9467 PyMac_GetRect, &boundsRect))
9468 return NULL;
9469 DragAlignedWindow(wp,
9470 startPt,
9471 &boundsRect,
9472 (Rect *)0,
9473 (ICMAlignmentProcRecordPtr)0);
9474 Py_INCREF(Py_None);
9475 _res = Py_None;
9476 return _res;
9479 static PyObject *Qt_MoviesTask(PyObject *_self, PyObject *_args)
9481 PyObject *_res = NULL;
9482 long maxMilliSecToUse;
9483 #ifndef MoviesTask
9484 PyMac_PRECHECK(MoviesTask);
9485 #endif
9486 if (!PyArg_ParseTuple(_args, "l",
9487 &maxMilliSecToUse))
9488 return NULL;
9489 MoviesTask((Movie)0,
9490 maxMilliSecToUse);
9491 Py_INCREF(Py_None);
9492 _res = Py_None;
9493 return _res;
9496 static PyMethodDef Qt_methods[] = {
9497 {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
9498 PyDoc_STR("() -> None")},
9499 {"ExitMovies", (PyCFunction)Qt_ExitMovies, 1,
9500 PyDoc_STR("() -> None")},
9501 {"GetMoviesError", (PyCFunction)Qt_GetMoviesError, 1,
9502 PyDoc_STR("() -> None")},
9503 {"ClearMoviesStickyError", (PyCFunction)Qt_ClearMoviesStickyError, 1,
9504 PyDoc_STR("() -> None")},
9505 {"GetMoviesStickyError", (PyCFunction)Qt_GetMoviesStickyError, 1,
9506 PyDoc_STR("() -> None")},
9507 {"DisposeMatte", (PyCFunction)Qt_DisposeMatte, 1,
9508 PyDoc_STR("(PixMapHandle theMatte) -> None")},
9509 {"NewMovie", (PyCFunction)Qt_NewMovie, 1,
9510 PyDoc_STR("(long flags) -> (Movie _rv)")},
9511 {"GetDataHandler", (PyCFunction)Qt_GetDataHandler, 1,
9512 PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)")},
9513 {"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
9514 PyDoc_STR("(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None")},
9515 {"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
9516 PyDoc_STR("(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)")},
9517 {"QTGetMIMETypeInfo", (PyCFunction)Qt_QTGetMIMETypeInfo, 1,
9518 PyDoc_STR("(char* mimeStringStart, short mimeStringLength, OSType infoSelector, void * infoDataPtr) -> (long infoDataSize)")},
9519 {"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1,
9520 PyDoc_STR("(TimeValue value, Track theTrack) -> (TimeValue _rv)")},
9521 {"NewUserData", (PyCFunction)Qt_NewUserData, 1,
9522 PyDoc_STR("() -> (UserData theUserData)")},
9523 {"NewUserDataFromHandle", (PyCFunction)Qt_NewUserDataFromHandle, 1,
9524 PyDoc_STR("(Handle h) -> (UserData theUserData)")},
9525 {"CreateMovieFile", (PyCFunction)Qt_CreateMovieFile, 1,
9526 PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)")},
9527 {"OpenMovieFile", (PyCFunction)Qt_OpenMovieFile, 1,
9528 PyDoc_STR("(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)")},
9529 {"CloseMovieFile", (PyCFunction)Qt_CloseMovieFile, 1,
9530 PyDoc_STR("(short resRefNum) -> None")},
9531 {"DeleteMovieFile", (PyCFunction)Qt_DeleteMovieFile, 1,
9532 PyDoc_STR("(FSSpec fileSpec) -> None")},
9533 {"NewMovieFromFile", (PyCFunction)Qt_NewMovieFromFile, 1,
9534 PyDoc_STR("(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)")},
9535 {"NewMovieFromHandle", (PyCFunction)Qt_NewMovieFromHandle, 1,
9536 PyDoc_STR("(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
9537 {"NewMovieFromDataFork", (PyCFunction)Qt_NewMovieFromDataFork, 1,
9538 PyDoc_STR("(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
9539 {"NewMovieFromDataFork64", (PyCFunction)Qt_NewMovieFromDataFork64, 1,
9540 PyDoc_STR("(long fRefNum, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
9541 {"NewMovieFromDataRef", (PyCFunction)Qt_NewMovieFromDataRef, 1,
9542 PyDoc_STR("(short flags, Handle dataRef, OSType dataRefType) -> (Movie m, short id)")},
9543 {"RemoveMovieResource", (PyCFunction)Qt_RemoveMovieResource, 1,
9544 PyDoc_STR("(short resRefNum, short resId) -> None")},
9545 {"CreateShortcutMovieFile", (PyCFunction)Qt_CreateShortcutMovieFile, 1,
9546 PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None")},
9547 {"CanQuickTimeOpenFile", (PyCFunction)Qt_CanQuickTimeOpenFile, 1,
9548 PyDoc_STR("(FSSpec fileSpec, OSType fileType, OSType fileNameExtension, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
9549 {"CanQuickTimeOpenDataRef", (PyCFunction)Qt_CanQuickTimeOpenDataRef, 1,
9550 PyDoc_STR("(Handle dataRef, OSType dataRefType, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
9551 {"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1,
9552 PyDoc_STR("(long newMovieFlags) -> (Movie _rv)")},
9553 {"QTNewAlias", (PyCFunction)Qt_QTNewAlias, 1,
9554 PyDoc_STR("(FSSpec fss, Boolean minimal) -> (AliasHandle alias)")},
9555 {"EndFullScreen", (PyCFunction)Qt_EndFullScreen, 1,
9556 PyDoc_STR("(Ptr fullState, long flags) -> None")},
9557 {"AddSoundDescriptionExtension", (PyCFunction)Qt_AddSoundDescriptionExtension, 1,
9558 PyDoc_STR("(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None")},
9559 {"GetSoundDescriptionExtension", (PyCFunction)Qt_GetSoundDescriptionExtension, 1,
9560 PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)")},
9561 {"RemoveSoundDescriptionExtension", (PyCFunction)Qt_RemoveSoundDescriptionExtension, 1,
9562 PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> None")},
9563 {"QTIsStandardParameterDialogEvent", (PyCFunction)Qt_QTIsStandardParameterDialogEvent, 1,
9564 PyDoc_STR("(QTParameterDialog createdDialog) -> (EventRecord pEvent)")},
9565 {"QTDismissStandardParameterDialog", (PyCFunction)Qt_QTDismissStandardParameterDialog, 1,
9566 PyDoc_STR("(QTParameterDialog createdDialog) -> None")},
9567 {"QTStandardParameterDialogDoAction", (PyCFunction)Qt_QTStandardParameterDialogDoAction, 1,
9568 PyDoc_STR("(QTParameterDialog createdDialog, long action, void * params) -> None")},
9569 {"QTRegisterAccessKey", (PyCFunction)Qt_QTRegisterAccessKey, 1,
9570 PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
9571 {"QTUnregisterAccessKey", (PyCFunction)Qt_QTUnregisterAccessKey, 1,
9572 PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
9573 {"QTTextToNativeText", (PyCFunction)Qt_QTTextToNativeText, 1,
9574 PyDoc_STR("(Handle theText, long encoding, long flags) -> None")},
9575 {"VideoMediaResetStatistics", (PyCFunction)Qt_VideoMediaResetStatistics, 1,
9576 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
9577 {"VideoMediaGetStatistics", (PyCFunction)Qt_VideoMediaGetStatistics, 1,
9578 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
9579 {"VideoMediaGetStallCount", (PyCFunction)Qt_VideoMediaGetStallCount, 1,
9580 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, unsigned long stalls)")},
9581 {"VideoMediaSetCodecParameter", (PyCFunction)Qt_VideoMediaSetCodecParameter, 1,
9582 PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, long parameterChangeSeed, void * dataPtr, long dataSize) -> (ComponentResult _rv)")},
9583 {"VideoMediaGetCodecParameter", (PyCFunction)Qt_VideoMediaGetCodecParameter, 1,
9584 PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, Handle outParameterData) -> (ComponentResult _rv)")},
9585 {"TextMediaAddTextSample", (PyCFunction)Qt_TextMediaAddTextSample, 1,
9586 PyDoc_STR("(MediaHandler mh, Ptr text, unsigned long size, short fontNumber, short fontSize, Style textFace, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor textColor, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
9587 {"TextMediaAddTESample", (PyCFunction)Qt_TextMediaAddTESample, 1,
9588 PyDoc_STR("(MediaHandler mh, TEHandle hTE, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
9589 {"TextMediaAddHiliteSample", (PyCFunction)Qt_TextMediaAddHiliteSample, 1,
9590 PyDoc_STR("(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
9591 {"TextMediaDrawRaw", (PyCFunction)Qt_TextMediaDrawRaw, 1,
9592 PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh) -> (ComponentResult _rv)")},
9593 {"TextMediaSetTextProperty", (PyCFunction)Qt_TextMediaSetTextProperty, 1,
9594 PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
9595 {"TextMediaRawSetup", (PyCFunction)Qt_TextMediaRawSetup, 1,
9596 PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)")},
9597 {"TextMediaRawIdle", (PyCFunction)Qt_TextMediaRawIdle, 1,
9598 PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)")},
9599 {"TextMediaGetTextProperty", (PyCFunction)Qt_TextMediaGetTextProperty, 1,
9600 PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
9601 {"TextMediaFindNextText", (PyCFunction)Qt_TextMediaFindNextText, 1,
9602 PyDoc_STR("(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)")},
9603 {"TextMediaHiliteTextSample", (PyCFunction)Qt_TextMediaHiliteTextSample, 1,
9604 PyDoc_STR("(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)")},
9605 {"TextMediaSetTextSampleData", (PyCFunction)Qt_TextMediaSetTextSampleData, 1,
9606 PyDoc_STR("(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)")},
9607 {"SpriteMediaSetProperty", (PyCFunction)Qt_SpriteMediaSetProperty, 1,
9608 PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
9609 {"SpriteMediaGetProperty", (PyCFunction)Qt_SpriteMediaGetProperty, 1,
9610 PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
9611 {"SpriteMediaHitTestSprites", (PyCFunction)Qt_SpriteMediaHitTestSprites, 1,
9612 PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)")},
9613 {"SpriteMediaCountSprites", (PyCFunction)Qt_SpriteMediaCountSprites, 1,
9614 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numSprites)")},
9615 {"SpriteMediaCountImages", (PyCFunction)Qt_SpriteMediaCountImages, 1,
9616 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numImages)")},
9617 {"SpriteMediaGetIndImageDescription", (PyCFunction)Qt_SpriteMediaGetIndImageDescription, 1,
9618 PyDoc_STR("(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)")},
9619 {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction)Qt_SpriteMediaGetDisplayedSampleNumber, 1,
9620 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)")},
9621 {"SpriteMediaGetSpriteName", (PyCFunction)Qt_SpriteMediaGetSpriteName, 1,
9622 PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)")},
9623 {"SpriteMediaGetImageName", (PyCFunction)Qt_SpriteMediaGetImageName, 1,
9624 PyDoc_STR("(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)")},
9625 {"SpriteMediaSetSpriteProperty", (PyCFunction)Qt_SpriteMediaSetSpriteProperty, 1,
9626 PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
9627 {"SpriteMediaGetSpriteProperty", (PyCFunction)Qt_SpriteMediaGetSpriteProperty, 1,
9628 PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
9629 {"SpriteMediaHitTestAllSprites", (PyCFunction)Qt_SpriteMediaHitTestAllSprites, 1,
9630 PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)")},
9631 {"SpriteMediaHitTestOneSprite", (PyCFunction)Qt_SpriteMediaHitTestOneSprite, 1,
9632 PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)")},
9633 {"SpriteMediaSpriteIndexToID", (PyCFunction)Qt_SpriteMediaSpriteIndexToID, 1,
9634 PyDoc_STR("(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)")},
9635 {"SpriteMediaSpriteIDToIndex", (PyCFunction)Qt_SpriteMediaSpriteIDToIndex, 1,
9636 PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)")},
9637 {"SpriteMediaSetActionVariable", (PyCFunction)Qt_SpriteMediaSetActionVariable, 1,
9638 PyDoc_STR("(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)")},
9639 {"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
9640 PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)")},
9641 {"SpriteMediaDisposeSprite", (PyCFunction)Qt_SpriteMediaDisposeSprite, 1,
9642 PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)")},
9643 {"SpriteMediaSetActionVariableToString", (PyCFunction)Qt_SpriteMediaSetActionVariableToString, 1,
9644 PyDoc_STR("(MediaHandler mh, QTAtomID variableID, Ptr theCString) -> (ComponentResult _rv)")},
9645 {"SpriteMediaGetActionVariableAsString", (PyCFunction)Qt_SpriteMediaGetActionVariableAsString, 1,
9646 PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, Handle theCString)")},
9647 {"FlashMediaSetPan", (PyCFunction)Qt_FlashMediaSetPan, 1,
9648 PyDoc_STR("(MediaHandler mh, short xPercent, short yPercent) -> (ComponentResult _rv)")},
9649 {"FlashMediaSetZoom", (PyCFunction)Qt_FlashMediaSetZoom, 1,
9650 PyDoc_STR("(MediaHandler mh, short factor) -> (ComponentResult _rv)")},
9651 {"FlashMediaSetZoomRect", (PyCFunction)Qt_FlashMediaSetZoomRect, 1,
9652 PyDoc_STR("(MediaHandler mh, long left, long top, long right, long bottom) -> (ComponentResult _rv)")},
9653 {"FlashMediaGetRefConBounds", (PyCFunction)Qt_FlashMediaGetRefConBounds, 1,
9654 PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long left, long top, long right, long bottom)")},
9655 {"FlashMediaGetRefConID", (PyCFunction)Qt_FlashMediaGetRefConID, 1,
9656 PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long refConID)")},
9657 {"FlashMediaIDToRefCon", (PyCFunction)Qt_FlashMediaIDToRefCon, 1,
9658 PyDoc_STR("(MediaHandler mh, long refConID) -> (ComponentResult _rv, long refCon)")},
9659 {"FlashMediaGetDisplayedFrameNumber", (PyCFunction)Qt_FlashMediaGetDisplayedFrameNumber, 1,
9660 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long flashFrameNumber)")},
9661 {"FlashMediaFrameNumberToMovieTime", (PyCFunction)Qt_FlashMediaFrameNumberToMovieTime, 1,
9662 PyDoc_STR("(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)")},
9663 {"FlashMediaFrameLabelToMovieTime", (PyCFunction)Qt_FlashMediaFrameLabelToMovieTime, 1,
9664 PyDoc_STR("(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)")},
9665 {"FlashMediaGetFlashVariable", (PyCFunction)Qt_FlashMediaGetFlashVariable, 1,
9666 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, char path, char name, Handle theVariableCStringOut)")},
9667 {"FlashMediaSetFlashVariable", (PyCFunction)Qt_FlashMediaSetFlashVariable, 1,
9668 PyDoc_STR("(MediaHandler mh, Boolean updateFocus) -> (ComponentResult _rv, char path, char name, char value)")},
9669 {"FlashMediaDoButtonActions", (PyCFunction)Qt_FlashMediaDoButtonActions, 1,
9670 PyDoc_STR("(MediaHandler mh, long buttonID, long transition) -> (ComponentResult _rv, char path)")},
9671 {"FlashMediaGetSupportedSwfVersion", (PyCFunction)Qt_FlashMediaGetSupportedSwfVersion, 1,
9672 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 swfVersion)")},
9673 {"Media3DGetCurrentGroup", (PyCFunction)Qt_Media3DGetCurrentGroup, 1,
9674 PyDoc_STR("(MediaHandler mh, void * group) -> (ComponentResult _rv)")},
9675 {"Media3DTranslateNamedObjectTo", (PyCFunction)Qt_Media3DTranslateNamedObjectTo, 1,
9676 PyDoc_STR("(MediaHandler mh, Fixed x, Fixed y, Fixed z) -> (ComponentResult _rv, char objectName)")},
9677 {"Media3DScaleNamedObjectTo", (PyCFunction)Qt_Media3DScaleNamedObjectTo, 1,
9678 PyDoc_STR("(MediaHandler mh, Fixed xScale, Fixed yScale, Fixed zScale) -> (ComponentResult _rv, char objectName)")},
9679 {"Media3DRotateNamedObjectTo", (PyCFunction)Qt_Media3DRotateNamedObjectTo, 1,
9680 PyDoc_STR("(MediaHandler mh, Fixed xDegrees, Fixed yDegrees, Fixed zDegrees) -> (ComponentResult _rv, char objectName)")},
9681 {"Media3DSetCameraData", (PyCFunction)Qt_Media3DSetCameraData, 1,
9682 PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
9683 {"Media3DGetCameraData", (PyCFunction)Qt_Media3DGetCameraData, 1,
9684 PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
9685 {"Media3DSetCameraAngleAspect", (PyCFunction)Qt_Media3DSetCameraAngleAspect, 1,
9686 PyDoc_STR("(MediaHandler mh, QTFloatSingle fov, QTFloatSingle aspectRatioXToY) -> (ComponentResult _rv)")},
9687 {"Media3DGetCameraAngleAspect", (PyCFunction)Qt_Media3DGetCameraAngleAspect, 1,
9688 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, QTFloatSingle fov, QTFloatSingle aspectRatioXToY)")},
9689 {"Media3DSetCameraRange", (PyCFunction)Qt_Media3DSetCameraRange, 1,
9690 PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
9691 {"Media3DGetCameraRange", (PyCFunction)Qt_Media3DGetCameraRange, 1,
9692 PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
9693 {"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
9694 PyDoc_STR("() -> (TimeBase _rv)")},
9695 {"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
9696 PyDoc_STR("(TimeRecord theTime, TimeBase newBase) -> (TimeRecord theTime)")},
9697 {"ConvertTimeScale", (PyCFunction)Qt_ConvertTimeScale, 1,
9698 PyDoc_STR("(TimeRecord theTime, TimeScale newScale) -> (TimeRecord theTime)")},
9699 {"AddTime", (PyCFunction)Qt_AddTime, 1,
9700 PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
9701 {"SubtractTime", (PyCFunction)Qt_SubtractTime, 1,
9702 PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
9703 {"MusicMediaGetIndexedTunePlayer", (PyCFunction)Qt_MusicMediaGetIndexedTunePlayer, 1,
9704 PyDoc_STR("(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)")},
9705 {"AlignWindow", (PyCFunction)Qt_AlignWindow, 1,
9706 PyDoc_STR("(WindowPtr wp, Boolean front) -> None")},
9707 {"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1,
9708 PyDoc_STR("(WindowPtr wp, Point startPt, Rect boundsRect) -> None")},
9709 {"MoviesTask", (PyCFunction)Qt_MoviesTask, 1,
9710 PyDoc_STR("(long maxMilliSecToUse) -> None")},
9711 {NULL, NULL, 0}
9717 void init_Qt(void)
9719 PyObject *m;
9720 PyObject *d;
9724 PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New);
9725 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert);
9726 PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie, MovieObj_New);
9727 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie, MovieObj_Convert);
9728 PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController, MovieCtlObj_New);
9729 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController, MovieCtlObj_Convert);
9730 PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase, TimeBaseObj_New);
9731 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase, TimeBaseObj_Convert);
9732 PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData, UserDataObj_New);
9733 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert);
9734 PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New);
9735 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert);
9738 m = Py_InitModule("_Qt", Qt_methods);
9739 d = PyModule_GetDict(m);
9740 Qt_Error = PyMac_GetOSErrException();
9741 if (Qt_Error == NULL ||
9742 PyDict_SetItemString(d, "Error", Qt_Error) != 0)
9743 return;
9744 MovieController_Type.ob_type = &PyType_Type;
9745 if (PyType_Ready(&MovieController_Type) < 0) return;
9746 Py_INCREF(&MovieController_Type);
9747 PyModule_AddObject(m, "MovieController", (PyObject *)&MovieController_Type);
9748 /* Backward-compatible name */
9749 Py_INCREF(&MovieController_Type);
9750 PyModule_AddObject(m, "MovieControllerType", (PyObject *)&MovieController_Type);
9751 TimeBase_Type.ob_type = &PyType_Type;
9752 if (PyType_Ready(&TimeBase_Type) < 0) return;
9753 Py_INCREF(&TimeBase_Type);
9754 PyModule_AddObject(m, "TimeBase", (PyObject *)&TimeBase_Type);
9755 /* Backward-compatible name */
9756 Py_INCREF(&TimeBase_Type);
9757 PyModule_AddObject(m, "TimeBaseType", (PyObject *)&TimeBase_Type);
9758 UserData_Type.ob_type = &PyType_Type;
9759 if (PyType_Ready(&UserData_Type) < 0) return;
9760 Py_INCREF(&UserData_Type);
9761 PyModule_AddObject(m, "UserData", (PyObject *)&UserData_Type);
9762 /* Backward-compatible name */
9763 Py_INCREF(&UserData_Type);
9764 PyModule_AddObject(m, "UserDataType", (PyObject *)&UserData_Type);
9765 Media_Type.ob_type = &PyType_Type;
9766 if (PyType_Ready(&Media_Type) < 0) return;
9767 Py_INCREF(&Media_Type);
9768 PyModule_AddObject(m, "Media", (PyObject *)&Media_Type);
9769 /* Backward-compatible name */
9770 Py_INCREF(&Media_Type);
9771 PyModule_AddObject(m, "MediaType", (PyObject *)&Media_Type);
9772 Track_Type.ob_type = &PyType_Type;
9773 if (PyType_Ready(&Track_Type) < 0) return;
9774 Py_INCREF(&Track_Type);
9775 PyModule_AddObject(m, "Track", (PyObject *)&Track_Type);
9776 /* Backward-compatible name */
9777 Py_INCREF(&Track_Type);
9778 PyModule_AddObject(m, "TrackType", (PyObject *)&Track_Type);
9779 Movie_Type.ob_type = &PyType_Type;
9780 if (PyType_Ready(&Movie_Type) < 0) return;
9781 Py_INCREF(&Movie_Type);
9782 PyModule_AddObject(m, "Movie", (PyObject *)&Movie_Type);
9783 /* Backward-compatible name */
9784 Py_INCREF(&Movie_Type);
9785 PyModule_AddObject(m, "MovieType", (PyObject *)&Movie_Type);
9788 /* ========================= End module _Qt ========================= */