2 /* =========================== Module Qt ============================ */
9 #include "pymactoolbox.h"
11 #ifdef WITHOUT_FRAMEWORKS
14 /* #include <Carbon/Carbon.h> */
15 #include <QuickTime/QuickTime.h>
19 #ifdef USE_TOOLBOX_OBJECT_GLUE
20 extern PyObject
*_TrackObj_New(Track
);
21 extern int _TrackObj_Convert(PyObject
*, Track
*);
22 extern PyObject
*_MovieObj_New(Movie
);
23 extern int _MovieObj_Convert(PyObject
*, Movie
*);
24 extern PyObject
*_MovieCtlObj_New(MovieController
);
25 extern int _MovieCtlObj_Convert(PyObject
*, MovieController
*);
26 extern PyObject
*_TimeBaseObj_New(TimeBase
);
27 extern int _TimeBaseObj_Convert(PyObject
*, TimeBase
*);
28 extern PyObject
*_UserDataObj_New(UserData
);
29 extern int _UserDataObj_Convert(PyObject
*, UserData
*);
30 extern PyObject
*_MediaObj_New(Media
);
31 extern int _MediaObj_Convert(PyObject
*, Media
*);
33 #define TrackObj_New _TrackObj_New
34 #define TrackObj_Convert _TrackObj_Convert
35 #define MovieObj_New _MovieObj_New
36 #define MovieObj_Convert _MovieObj_Convert
37 #define MovieCtlObj_New _MovieCtlObj_New
38 #define MovieCtlObj_Convert _MovieCtlObj_Convert
39 #define TimeBaseObj_New _TimeBaseObj_New
40 #define TimeBaseObj_Convert _TimeBaseObj_Convert
41 #define UserDataObj_New _UserDataObj_New
42 #define UserDataObj_Convert _UserDataObj_Convert
43 #define MediaObj_New _MediaObj_New
44 #define MediaObj_Convert _MediaObj_Convert
47 /* Macro to allow us to GetNextInterestingTime without duration */
48 #define GetMediaNextInterestingTimeOnly(media, flags, time, rate, rv) GetMediaNextInterestingTime(media, flags, time, rate, rv, NULL)
51 ** Parse/generate time records
54 QtTimeRecord_New(TimeRecord
*itself
)
57 return Py_BuildValue("O&lO&", PyMac_Buildwide
, &itself
->value
, itself
->scale
,
58 TimeBaseObj_New
, itself
->base
);
60 return Py_BuildValue("O&lO", PyMac_Buildwide
, &itself
->value
, itself
->scale
,
65 QtTimeRecord_Convert(PyObject
*v
, TimeRecord
*p_itself
)
67 PyObject
*base
= NULL
;
68 if( !PyArg_ParseTuple(v
, "O&l|O", PyMac_Getwide
, &p_itself
->value
, &p_itself
->scale
,
71 if ( base
== NULL
|| base
== Py_None
)
72 p_itself
->base
= NULL
;
74 if ( !TimeBaseObj_Convert(base
, &p_itself
->base
) )
82 static PyObject
*Qt_Error
;
84 /* ------------------ Object type MovieController ------------------- */
86 PyTypeObject MovieController_Type
;
88 #define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type)
90 typedef struct MovieControllerObject
{
92 MovieController ob_itself
;
93 } MovieControllerObject
;
95 PyObject
*MovieCtlObj_New(MovieController itself
)
97 MovieControllerObject
*it
;
99 PyErr_SetString(Qt_Error
,"Cannot create null MovieController");
102 it
= PyObject_NEW(MovieControllerObject
, &MovieController_Type
);
103 if (it
== NULL
) return NULL
;
104 it
->ob_itself
= itself
;
105 return (PyObject
*)it
;
107 MovieCtlObj_Convert(PyObject
*v
, MovieController
*p_itself
)
109 if (!MovieCtlObj_Check(v
))
111 PyErr_SetString(PyExc_TypeError
, "MovieController required");
114 *p_itself
= ((MovieControllerObject
*)v
)->ob_itself
;
118 static void MovieCtlObj_dealloc(MovieControllerObject
*self
)
120 DisposeMovieController(self
->ob_itself
);
124 static PyObject
*MovieCtlObj_MCSetMovie(MovieControllerObject
*_self
, PyObject
*_args
)
126 PyObject
*_res
= NULL
;
129 WindowPtr movieWindow
;
131 if (!PyArg_ParseTuple(_args
, "O&O&O&",
132 MovieObj_Convert
, &theMovie
,
133 WinObj_Convert
, &movieWindow
,
134 PyMac_GetPoint
, &where
))
136 _rv
= MCSetMovie(_self
->ob_itself
,
140 _res
= Py_BuildValue("l",
145 static PyObject
*MovieCtlObj_MCGetIndMovie(MovieControllerObject
*_self
, PyObject
*_args
)
147 PyObject
*_res
= NULL
;
150 if (!PyArg_ParseTuple(_args
, "h",
153 _rv
= MCGetIndMovie(_self
->ob_itself
,
155 _res
= Py_BuildValue("O&",
160 static PyObject
*MovieCtlObj_MCRemoveAllMovies(MovieControllerObject
*_self
, PyObject
*_args
)
162 PyObject
*_res
= NULL
;
164 if (!PyArg_ParseTuple(_args
, ""))
166 _rv
= MCRemoveAllMovies(_self
->ob_itself
);
167 _res
= Py_BuildValue("l",
172 static PyObject
*MovieCtlObj_MCRemoveAMovie(MovieControllerObject
*_self
, PyObject
*_args
)
174 PyObject
*_res
= NULL
;
177 if (!PyArg_ParseTuple(_args
, "O&",
178 MovieObj_Convert
, &m
))
180 _rv
= MCRemoveAMovie(_self
->ob_itself
,
182 _res
= Py_BuildValue("l",
187 static PyObject
*MovieCtlObj_MCRemoveMovie(MovieControllerObject
*_self
, PyObject
*_args
)
189 PyObject
*_res
= NULL
;
191 if (!PyArg_ParseTuple(_args
, ""))
193 _rv
= MCRemoveMovie(_self
->ob_itself
);
194 _res
= Py_BuildValue("l",
199 static PyObject
*MovieCtlObj_MCIsPlayerEvent(MovieControllerObject
*_self
, PyObject
*_args
)
201 PyObject
*_res
= NULL
;
204 if (!PyArg_ParseTuple(_args
, "O&",
205 PyMac_GetEventRecord
, &e
))
207 _rv
= MCIsPlayerEvent(_self
->ob_itself
,
209 _res
= Py_BuildValue("l",
214 static PyObject
*MovieCtlObj_MCDoAction(MovieControllerObject
*_self
, PyObject
*_args
)
216 PyObject
*_res
= NULL
;
220 if (!PyArg_ParseTuple(_args
, "hs",
224 _rv
= MCDoAction(_self
->ob_itself
,
227 _res
= Py_BuildValue("l",
232 static PyObject
*MovieCtlObj_MCSetControllerAttached(MovieControllerObject
*_self
, PyObject
*_args
)
234 PyObject
*_res
= NULL
;
237 if (!PyArg_ParseTuple(_args
, "b",
240 _rv
= MCSetControllerAttached(_self
->ob_itself
,
242 _res
= Py_BuildValue("l",
247 static PyObject
*MovieCtlObj_MCIsControllerAttached(MovieControllerObject
*_self
, PyObject
*_args
)
249 PyObject
*_res
= NULL
;
251 if (!PyArg_ParseTuple(_args
, ""))
253 _rv
= MCIsControllerAttached(_self
->ob_itself
);
254 _res
= Py_BuildValue("l",
259 static PyObject
*MovieCtlObj_MCSetControllerPort(MovieControllerObject
*_self
, PyObject
*_args
)
261 PyObject
*_res
= NULL
;
264 if (!PyArg_ParseTuple(_args
, "O&",
265 GrafObj_Convert
, &gp
))
267 _rv
= MCSetControllerPort(_self
->ob_itself
,
269 _res
= Py_BuildValue("l",
274 static PyObject
*MovieCtlObj_MCGetControllerPort(MovieControllerObject
*_self
, PyObject
*_args
)
276 PyObject
*_res
= NULL
;
278 if (!PyArg_ParseTuple(_args
, ""))
280 _rv
= MCGetControllerPort(_self
->ob_itself
);
281 _res
= Py_BuildValue("O&",
286 static PyObject
*MovieCtlObj_MCSetVisible(MovieControllerObject
*_self
, PyObject
*_args
)
288 PyObject
*_res
= NULL
;
291 if (!PyArg_ParseTuple(_args
, "b",
294 _rv
= MCSetVisible(_self
->ob_itself
,
296 _res
= Py_BuildValue("l",
301 static PyObject
*MovieCtlObj_MCGetVisible(MovieControllerObject
*_self
, PyObject
*_args
)
303 PyObject
*_res
= NULL
;
305 if (!PyArg_ParseTuple(_args
, ""))
307 _rv
= MCGetVisible(_self
->ob_itself
);
308 _res
= Py_BuildValue("l",
313 static PyObject
*MovieCtlObj_MCGetControllerBoundsRect(MovieControllerObject
*_self
, PyObject
*_args
)
315 PyObject
*_res
= NULL
;
318 if (!PyArg_ParseTuple(_args
, ""))
320 _rv
= MCGetControllerBoundsRect(_self
->ob_itself
,
322 _res
= Py_BuildValue("lO&",
324 PyMac_BuildRect
, &bounds
);
328 static PyObject
*MovieCtlObj_MCSetControllerBoundsRect(MovieControllerObject
*_self
, PyObject
*_args
)
330 PyObject
*_res
= NULL
;
333 if (!PyArg_ParseTuple(_args
, "O&",
334 PyMac_GetRect
, &bounds
))
336 _rv
= MCSetControllerBoundsRect(_self
->ob_itself
,
338 _res
= Py_BuildValue("l",
343 static PyObject
*MovieCtlObj_MCGetControllerBoundsRgn(MovieControllerObject
*_self
, PyObject
*_args
)
345 PyObject
*_res
= NULL
;
347 if (!PyArg_ParseTuple(_args
, ""))
349 _rv
= MCGetControllerBoundsRgn(_self
->ob_itself
);
350 _res
= Py_BuildValue("O&",
355 static PyObject
*MovieCtlObj_MCGetWindowRgn(MovieControllerObject
*_self
, PyObject
*_args
)
357 PyObject
*_res
= NULL
;
360 if (!PyArg_ParseTuple(_args
, "O&",
363 _rv
= MCGetWindowRgn(_self
->ob_itself
,
365 _res
= Py_BuildValue("O&",
370 static PyObject
*MovieCtlObj_MCMovieChanged(MovieControllerObject
*_self
, PyObject
*_args
)
372 PyObject
*_res
= NULL
;
375 if (!PyArg_ParseTuple(_args
, "O&",
376 MovieObj_Convert
, &m
))
378 _rv
= MCMovieChanged(_self
->ob_itself
,
380 _res
= Py_BuildValue("l",
385 static PyObject
*MovieCtlObj_MCSetDuration(MovieControllerObject
*_self
, PyObject
*_args
)
387 PyObject
*_res
= NULL
;
390 if (!PyArg_ParseTuple(_args
, "l",
393 _rv
= MCSetDuration(_self
->ob_itself
,
395 _res
= Py_BuildValue("l",
400 static PyObject
*MovieCtlObj_MCGetCurrentTime(MovieControllerObject
*_self
, PyObject
*_args
)
402 PyObject
*_res
= NULL
;
405 if (!PyArg_ParseTuple(_args
, ""))
407 _rv
= MCGetCurrentTime(_self
->ob_itself
,
409 _res
= Py_BuildValue("ll",
415 static PyObject
*MovieCtlObj_MCNewAttachedController(MovieControllerObject
*_self
, PyObject
*_args
)
417 PyObject
*_res
= NULL
;
422 if (!PyArg_ParseTuple(_args
, "O&O&O&",
423 MovieObj_Convert
, &theMovie
,
425 PyMac_GetPoint
, &where
))
427 _rv
= MCNewAttachedController(_self
->ob_itself
,
431 _res
= Py_BuildValue("l",
436 static PyObject
*MovieCtlObj_MCDraw(MovieControllerObject
*_self
, PyObject
*_args
)
438 PyObject
*_res
= NULL
;
441 if (!PyArg_ParseTuple(_args
, "O&",
444 _rv
= MCDraw(_self
->ob_itself
,
446 _res
= Py_BuildValue("l",
451 static PyObject
*MovieCtlObj_MCActivate(MovieControllerObject
*_self
, PyObject
*_args
)
453 PyObject
*_res
= NULL
;
457 if (!PyArg_ParseTuple(_args
, "O&b",
461 _rv
= MCActivate(_self
->ob_itself
,
464 _res
= Py_BuildValue("l",
469 static PyObject
*MovieCtlObj_MCIdle(MovieControllerObject
*_self
, PyObject
*_args
)
471 PyObject
*_res
= NULL
;
473 if (!PyArg_ParseTuple(_args
, ""))
475 _rv
= MCIdle(_self
->ob_itself
);
476 _res
= Py_BuildValue("l",
481 static PyObject
*MovieCtlObj_MCKey(MovieControllerObject
*_self
, PyObject
*_args
)
483 PyObject
*_res
= NULL
;
487 if (!PyArg_ParseTuple(_args
, "bl",
491 _rv
= MCKey(_self
->ob_itself
,
494 _res
= Py_BuildValue("l",
499 static PyObject
*MovieCtlObj_MCClick(MovieControllerObject
*_self
, PyObject
*_args
)
501 PyObject
*_res
= NULL
;
507 if (!PyArg_ParseTuple(_args
, "O&O&ll",
509 PyMac_GetPoint
, &where
,
513 _rv
= MCClick(_self
->ob_itself
,
518 _res
= Py_BuildValue("l",
523 static PyObject
*MovieCtlObj_MCEnableEditing(MovieControllerObject
*_self
, PyObject
*_args
)
525 PyObject
*_res
= NULL
;
528 if (!PyArg_ParseTuple(_args
, "b",
531 _rv
= MCEnableEditing(_self
->ob_itself
,
533 _res
= Py_BuildValue("l",
538 static PyObject
*MovieCtlObj_MCIsEditingEnabled(MovieControllerObject
*_self
, PyObject
*_args
)
540 PyObject
*_res
= NULL
;
542 if (!PyArg_ParseTuple(_args
, ""))
544 _rv
= MCIsEditingEnabled(_self
->ob_itself
);
545 _res
= Py_BuildValue("l",
550 static PyObject
*MovieCtlObj_MCCopy(MovieControllerObject
*_self
, PyObject
*_args
)
552 PyObject
*_res
= NULL
;
554 if (!PyArg_ParseTuple(_args
, ""))
556 _rv
= MCCopy(_self
->ob_itself
);
557 _res
= Py_BuildValue("O&",
562 static PyObject
*MovieCtlObj_MCCut(MovieControllerObject
*_self
, PyObject
*_args
)
564 PyObject
*_res
= NULL
;
566 if (!PyArg_ParseTuple(_args
, ""))
568 _rv
= MCCut(_self
->ob_itself
);
569 _res
= Py_BuildValue("O&",
574 static PyObject
*MovieCtlObj_MCPaste(MovieControllerObject
*_self
, PyObject
*_args
)
576 PyObject
*_res
= NULL
;
579 if (!PyArg_ParseTuple(_args
, "O&",
580 MovieObj_Convert
, &srcMovie
))
582 _rv
= MCPaste(_self
->ob_itself
,
584 _res
= Py_BuildValue("l",
589 static PyObject
*MovieCtlObj_MCClear(MovieControllerObject
*_self
, PyObject
*_args
)
591 PyObject
*_res
= NULL
;
593 if (!PyArg_ParseTuple(_args
, ""))
595 _rv
= MCClear(_self
->ob_itself
);
596 _res
= Py_BuildValue("l",
601 static PyObject
*MovieCtlObj_MCUndo(MovieControllerObject
*_self
, PyObject
*_args
)
603 PyObject
*_res
= NULL
;
605 if (!PyArg_ParseTuple(_args
, ""))
607 _rv
= MCUndo(_self
->ob_itself
);
608 _res
= Py_BuildValue("l",
613 static PyObject
*MovieCtlObj_MCPositionController(MovieControllerObject
*_self
, PyObject
*_args
)
615 PyObject
*_res
= NULL
;
620 if (!PyArg_ParseTuple(_args
, "O&O&l",
621 PyMac_GetRect
, &movieRect
,
622 PyMac_GetRect
, &controllerRect
,
625 _rv
= MCPositionController(_self
->ob_itself
,
629 _res
= Py_BuildValue("l",
634 static PyObject
*MovieCtlObj_MCGetControllerInfo(MovieControllerObject
*_self
, PyObject
*_args
)
636 PyObject
*_res
= NULL
;
639 if (!PyArg_ParseTuple(_args
, ""))
641 _rv
= MCGetControllerInfo(_self
->ob_itself
,
643 _res
= Py_BuildValue("ll",
649 static PyObject
*MovieCtlObj_MCSetClip(MovieControllerObject
*_self
, PyObject
*_args
)
651 PyObject
*_res
= NULL
;
655 if (!PyArg_ParseTuple(_args
, "O&O&",
656 ResObj_Convert
, &theClip
,
657 ResObj_Convert
, &movieClip
))
659 _rv
= MCSetClip(_self
->ob_itself
,
662 _res
= Py_BuildValue("l",
667 static PyObject
*MovieCtlObj_MCGetClip(MovieControllerObject
*_self
, PyObject
*_args
)
669 PyObject
*_res
= NULL
;
673 if (!PyArg_ParseTuple(_args
, ""))
675 _rv
= MCGetClip(_self
->ob_itself
,
678 _res
= Py_BuildValue("lO&O&",
681 ResObj_New
, movieClip
);
685 static PyObject
*MovieCtlObj_MCDrawBadge(MovieControllerObject
*_self
, PyObject
*_args
)
687 PyObject
*_res
= NULL
;
691 if (!PyArg_ParseTuple(_args
, "O&",
692 ResObj_Convert
, &movieRgn
))
694 _rv
= MCDrawBadge(_self
->ob_itself
,
697 _res
= Py_BuildValue("lO&",
699 ResObj_New
, badgeRgn
);
703 static PyObject
*MovieCtlObj_MCSetUpEditMenu(MovieControllerObject
*_self
, PyObject
*_args
)
705 PyObject
*_res
= NULL
;
709 if (!PyArg_ParseTuple(_args
, "lO&",
711 MenuObj_Convert
, &mh
))
713 _rv
= MCSetUpEditMenu(_self
->ob_itself
,
716 _res
= Py_BuildValue("l",
721 static PyObject
*MovieCtlObj_MCGetMenuString(MovieControllerObject
*_self
, PyObject
*_args
)
723 PyObject
*_res
= NULL
;
728 if (!PyArg_ParseTuple(_args
, "lhO&",
731 PyMac_GetStr255
, aString
))
733 _rv
= MCGetMenuString(_self
->ob_itself
,
737 _res
= Py_BuildValue("l",
742 static PyObject
*MovieCtlObj_MCPtInController(MovieControllerObject
*_self
, PyObject
*_args
)
744 PyObject
*_res
= NULL
;
747 Boolean inController
;
748 if (!PyArg_ParseTuple(_args
, "O&",
749 PyMac_GetPoint
, &thePt
))
751 _rv
= MCPtInController(_self
->ob_itself
,
754 _res
= Py_BuildValue("lb",
760 static PyObject
*MovieCtlObj_MCInvalidate(MovieControllerObject
*_self
, PyObject
*_args
)
762 PyObject
*_res
= NULL
;
765 RgnHandle invalidRgn
;
766 if (!PyArg_ParseTuple(_args
, "O&O&",
768 ResObj_Convert
, &invalidRgn
))
770 _rv
= MCInvalidate(_self
->ob_itself
,
773 _res
= Py_BuildValue("l",
778 static PyObject
*MovieCtlObj_MCAdjustCursor(MovieControllerObject
*_self
, PyObject
*_args
)
780 PyObject
*_res
= NULL
;
785 if (!PyArg_ParseTuple(_args
, "O&O&l",
787 PyMac_GetPoint
, &where
,
790 _rv
= MCAdjustCursor(_self
->ob_itself
,
794 _res
= Py_BuildValue("l",
799 static PyObject
*MovieCtlObj_MCGetInterfaceElement(MovieControllerObject
*_self
, PyObject
*_args
)
801 PyObject
*_res
= NULL
;
803 MCInterfaceElement whichElement
;
805 if (!PyArg_ParseTuple(_args
, "ls",
809 _rv
= MCGetInterfaceElement(_self
->ob_itself
,
812 _res
= Py_BuildValue("l",
817 static PyMethodDef MovieCtlObj_methods
[] = {
818 {"MCSetMovie", (PyCFunction
)MovieCtlObj_MCSetMovie
, 1,
819 "(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)"},
820 {"MCGetIndMovie", (PyCFunction
)MovieCtlObj_MCGetIndMovie
, 1,
821 "(short index) -> (Movie _rv)"},
822 {"MCRemoveAllMovies", (PyCFunction
)MovieCtlObj_MCRemoveAllMovies
, 1,
823 "() -> (ComponentResult _rv)"},
824 {"MCRemoveAMovie", (PyCFunction
)MovieCtlObj_MCRemoveAMovie
, 1,
825 "(Movie m) -> (ComponentResult _rv)"},
826 {"MCRemoveMovie", (PyCFunction
)MovieCtlObj_MCRemoveMovie
, 1,
827 "() -> (ComponentResult _rv)"},
828 {"MCIsPlayerEvent", (PyCFunction
)MovieCtlObj_MCIsPlayerEvent
, 1,
829 "(EventRecord e) -> (ComponentResult _rv)"},
830 {"MCDoAction", (PyCFunction
)MovieCtlObj_MCDoAction
, 1,
831 "(short action, void * params) -> (ComponentResult _rv)"},
832 {"MCSetControllerAttached", (PyCFunction
)MovieCtlObj_MCSetControllerAttached
, 1,
833 "(Boolean attach) -> (ComponentResult _rv)"},
834 {"MCIsControllerAttached", (PyCFunction
)MovieCtlObj_MCIsControllerAttached
, 1,
835 "() -> (ComponentResult _rv)"},
836 {"MCSetControllerPort", (PyCFunction
)MovieCtlObj_MCSetControllerPort
, 1,
837 "(CGrafPtr gp) -> (ComponentResult _rv)"},
838 {"MCGetControllerPort", (PyCFunction
)MovieCtlObj_MCGetControllerPort
, 1,
839 "() -> (CGrafPtr _rv)"},
840 {"MCSetVisible", (PyCFunction
)MovieCtlObj_MCSetVisible
, 1,
841 "(Boolean visible) -> (ComponentResult _rv)"},
842 {"MCGetVisible", (PyCFunction
)MovieCtlObj_MCGetVisible
, 1,
843 "() -> (ComponentResult _rv)"},
844 {"MCGetControllerBoundsRect", (PyCFunction
)MovieCtlObj_MCGetControllerBoundsRect
, 1,
845 "() -> (ComponentResult _rv, Rect bounds)"},
846 {"MCSetControllerBoundsRect", (PyCFunction
)MovieCtlObj_MCSetControllerBoundsRect
, 1,
847 "(Rect bounds) -> (ComponentResult _rv)"},
848 {"MCGetControllerBoundsRgn", (PyCFunction
)MovieCtlObj_MCGetControllerBoundsRgn
, 1,
849 "() -> (RgnHandle _rv)"},
850 {"MCGetWindowRgn", (PyCFunction
)MovieCtlObj_MCGetWindowRgn
, 1,
851 "(WindowPtr w) -> (RgnHandle _rv)"},
852 {"MCMovieChanged", (PyCFunction
)MovieCtlObj_MCMovieChanged
, 1,
853 "(Movie m) -> (ComponentResult _rv)"},
854 {"MCSetDuration", (PyCFunction
)MovieCtlObj_MCSetDuration
, 1,
855 "(TimeValue duration) -> (ComponentResult _rv)"},
856 {"MCGetCurrentTime", (PyCFunction
)MovieCtlObj_MCGetCurrentTime
, 1,
857 "() -> (TimeValue _rv, TimeScale scale)"},
858 {"MCNewAttachedController", (PyCFunction
)MovieCtlObj_MCNewAttachedController
, 1,
859 "(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)"},
860 {"MCDraw", (PyCFunction
)MovieCtlObj_MCDraw
, 1,
861 "(WindowPtr w) -> (ComponentResult _rv)"},
862 {"MCActivate", (PyCFunction
)MovieCtlObj_MCActivate
, 1,
863 "(WindowPtr w, Boolean activate) -> (ComponentResult _rv)"},
864 {"MCIdle", (PyCFunction
)MovieCtlObj_MCIdle
, 1,
865 "() -> (ComponentResult _rv)"},
866 {"MCKey", (PyCFunction
)MovieCtlObj_MCKey
, 1,
867 "(SInt8 key, long modifiers) -> (ComponentResult _rv)"},
868 {"MCClick", (PyCFunction
)MovieCtlObj_MCClick
, 1,
869 "(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)"},
870 {"MCEnableEditing", (PyCFunction
)MovieCtlObj_MCEnableEditing
, 1,
871 "(Boolean enabled) -> (ComponentResult _rv)"},
872 {"MCIsEditingEnabled", (PyCFunction
)MovieCtlObj_MCIsEditingEnabled
, 1,
874 {"MCCopy", (PyCFunction
)MovieCtlObj_MCCopy
, 1,
875 "() -> (Movie _rv)"},
876 {"MCCut", (PyCFunction
)MovieCtlObj_MCCut
, 1,
877 "() -> (Movie _rv)"},
878 {"MCPaste", (PyCFunction
)MovieCtlObj_MCPaste
, 1,
879 "(Movie srcMovie) -> (ComponentResult _rv)"},
880 {"MCClear", (PyCFunction
)MovieCtlObj_MCClear
, 1,
881 "() -> (ComponentResult _rv)"},
882 {"MCUndo", (PyCFunction
)MovieCtlObj_MCUndo
, 1,
883 "() -> (ComponentResult _rv)"},
884 {"MCPositionController", (PyCFunction
)MovieCtlObj_MCPositionController
, 1,
885 "(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)"},
886 {"MCGetControllerInfo", (PyCFunction
)MovieCtlObj_MCGetControllerInfo
, 1,
887 "() -> (ComponentResult _rv, long someFlags)"},
888 {"MCSetClip", (PyCFunction
)MovieCtlObj_MCSetClip
, 1,
889 "(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)"},
890 {"MCGetClip", (PyCFunction
)MovieCtlObj_MCGetClip
, 1,
891 "() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)"},
892 {"MCDrawBadge", (PyCFunction
)MovieCtlObj_MCDrawBadge
, 1,
893 "(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)"},
894 {"MCSetUpEditMenu", (PyCFunction
)MovieCtlObj_MCSetUpEditMenu
, 1,
895 "(long modifiers, MenuHandle mh) -> (ComponentResult _rv)"},
896 {"MCGetMenuString", (PyCFunction
)MovieCtlObj_MCGetMenuString
, 1,
897 "(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)"},
898 {"MCPtInController", (PyCFunction
)MovieCtlObj_MCPtInController
, 1,
899 "(Point thePt) -> (ComponentResult _rv, Boolean inController)"},
900 {"MCInvalidate", (PyCFunction
)MovieCtlObj_MCInvalidate
, 1,
901 "(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)"},
902 {"MCAdjustCursor", (PyCFunction
)MovieCtlObj_MCAdjustCursor
, 1,
903 "(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)"},
904 {"MCGetInterfaceElement", (PyCFunction
)MovieCtlObj_MCGetInterfaceElement
, 1,
905 "(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)"},
909 PyMethodChain MovieCtlObj_chain
= { MovieCtlObj_methods
, NULL
};
911 static PyObject
*MovieCtlObj_getattr(MovieControllerObject
*self
, char *name
)
913 return Py_FindMethodInChain(&MovieCtlObj_chain
, (PyObject
*)self
, name
);
916 #define MovieCtlObj_setattr NULL
918 #define MovieCtlObj_compare NULL
920 #define MovieCtlObj_repr NULL
922 #define MovieCtlObj_hash NULL
924 PyTypeObject MovieController_Type
= {
925 PyObject_HEAD_INIT(&PyType_Type
)
927 "MovieController", /*tp_name*/
928 sizeof(MovieControllerObject
), /*tp_basicsize*/
931 (destructor
) MovieCtlObj_dealloc
, /*tp_dealloc*/
933 (getattrfunc
) MovieCtlObj_getattr
, /*tp_getattr*/
934 (setattrfunc
) MovieCtlObj_setattr
, /*tp_setattr*/
935 (cmpfunc
) MovieCtlObj_compare
, /*tp_compare*/
936 (reprfunc
) MovieCtlObj_repr
, /*tp_repr*/
937 (PyNumberMethods
*)0, /* tp_as_number */
938 (PySequenceMethods
*)0, /* tp_as_sequence */
939 (PyMappingMethods
*)0, /* tp_as_mapping */
940 (hashfunc
) MovieCtlObj_hash
, /*tp_hash*/
943 /* ---------------- End object type MovieController ----------------- */
946 /* ---------------------- Object type TimeBase ---------------------- */
948 PyTypeObject TimeBase_Type
;
950 #define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type)
952 typedef struct TimeBaseObject
{
957 PyObject
*TimeBaseObj_New(TimeBase itself
)
960 if (itself
== NULL
) {
961 PyErr_SetString(Qt_Error
,"Cannot create null TimeBase");
964 it
= PyObject_NEW(TimeBaseObject
, &TimeBase_Type
);
965 if (it
== NULL
) return NULL
;
966 it
->ob_itself
= itself
;
967 return (PyObject
*)it
;
969 TimeBaseObj_Convert(PyObject
*v
, TimeBase
*p_itself
)
971 if (!TimeBaseObj_Check(v
))
973 PyErr_SetString(PyExc_TypeError
, "TimeBase required");
976 *p_itself
= ((TimeBaseObject
*)v
)->ob_itself
;
980 static void TimeBaseObj_dealloc(TimeBaseObject
*self
)
982 /* Cleanup of self->ob_itself goes here */
986 static PyObject
*TimeBaseObj_DisposeTimeBase(TimeBaseObject
*_self
, PyObject
*_args
)
988 PyObject
*_res
= NULL
;
989 if (!PyArg_ParseTuple(_args
, ""))
991 DisposeTimeBase(_self
->ob_itself
);
997 static PyObject
*TimeBaseObj_GetTimeBaseTime(TimeBaseObject
*_self
, PyObject
*_args
)
999 PyObject
*_res
= NULL
;
1003 if (!PyArg_ParseTuple(_args
, "l",
1006 _rv
= GetTimeBaseTime(_self
->ob_itself
,
1009 _res
= Py_BuildValue("lO&",
1011 QtTimeRecord_New
, &tr
);
1015 static PyObject
*TimeBaseObj_SetTimeBaseTime(TimeBaseObject
*_self
, PyObject
*_args
)
1017 PyObject
*_res
= NULL
;
1019 if (!PyArg_ParseTuple(_args
, "O&",
1020 QtTimeRecord_Convert
, &tr
))
1022 SetTimeBaseTime(_self
->ob_itself
,
1029 static PyObject
*TimeBaseObj_SetTimeBaseValue(TimeBaseObject
*_self
, PyObject
*_args
)
1031 PyObject
*_res
= NULL
;
1034 if (!PyArg_ParseTuple(_args
, "ll",
1038 SetTimeBaseValue(_self
->ob_itself
,
1046 static PyObject
*TimeBaseObj_GetTimeBaseRate(TimeBaseObject
*_self
, PyObject
*_args
)
1048 PyObject
*_res
= NULL
;
1050 if (!PyArg_ParseTuple(_args
, ""))
1052 _rv
= GetTimeBaseRate(_self
->ob_itself
);
1053 _res
= Py_BuildValue("O&",
1054 PyMac_BuildFixed
, _rv
);
1058 static PyObject
*TimeBaseObj_SetTimeBaseRate(TimeBaseObject
*_self
, PyObject
*_args
)
1060 PyObject
*_res
= NULL
;
1062 if (!PyArg_ParseTuple(_args
, "O&",
1063 PyMac_GetFixed
, &r
))
1065 SetTimeBaseRate(_self
->ob_itself
,
1072 static PyObject
*TimeBaseObj_GetTimeBaseStartTime(TimeBaseObject
*_self
, PyObject
*_args
)
1074 PyObject
*_res
= NULL
;
1078 if (!PyArg_ParseTuple(_args
, "l",
1081 _rv
= GetTimeBaseStartTime(_self
->ob_itself
,
1084 _res
= Py_BuildValue("lO&",
1086 QtTimeRecord_New
, &tr
);
1090 static PyObject
*TimeBaseObj_SetTimeBaseStartTime(TimeBaseObject
*_self
, PyObject
*_args
)
1092 PyObject
*_res
= NULL
;
1094 if (!PyArg_ParseTuple(_args
, "O&",
1095 QtTimeRecord_Convert
, &tr
))
1097 SetTimeBaseStartTime(_self
->ob_itself
,
1104 static PyObject
*TimeBaseObj_GetTimeBaseStopTime(TimeBaseObject
*_self
, PyObject
*_args
)
1106 PyObject
*_res
= NULL
;
1110 if (!PyArg_ParseTuple(_args
, "l",
1113 _rv
= GetTimeBaseStopTime(_self
->ob_itself
,
1116 _res
= Py_BuildValue("lO&",
1118 QtTimeRecord_New
, &tr
);
1122 static PyObject
*TimeBaseObj_SetTimeBaseStopTime(TimeBaseObject
*_self
, PyObject
*_args
)
1124 PyObject
*_res
= NULL
;
1126 if (!PyArg_ParseTuple(_args
, "O&",
1127 QtTimeRecord_Convert
, &tr
))
1129 SetTimeBaseStopTime(_self
->ob_itself
,
1136 static PyObject
*TimeBaseObj_GetTimeBaseFlags(TimeBaseObject
*_self
, PyObject
*_args
)
1138 PyObject
*_res
= NULL
;
1140 if (!PyArg_ParseTuple(_args
, ""))
1142 _rv
= GetTimeBaseFlags(_self
->ob_itself
);
1143 _res
= Py_BuildValue("l",
1148 static PyObject
*TimeBaseObj_SetTimeBaseFlags(TimeBaseObject
*_self
, PyObject
*_args
)
1150 PyObject
*_res
= NULL
;
1152 if (!PyArg_ParseTuple(_args
, "l",
1155 SetTimeBaseFlags(_self
->ob_itself
,
1162 static PyObject
*TimeBaseObj_SetTimeBaseMasterTimeBase(TimeBaseObject
*_self
, PyObject
*_args
)
1164 PyObject
*_res
= NULL
;
1166 TimeRecord slaveZero
;
1167 if (!PyArg_ParseTuple(_args
, "O&O&",
1168 TimeBaseObj_Convert
, &master
,
1169 QtTimeRecord_Convert
, &slaveZero
))
1171 SetTimeBaseMasterTimeBase(_self
->ob_itself
,
1179 static PyObject
*TimeBaseObj_GetTimeBaseMasterTimeBase(TimeBaseObject
*_self
, PyObject
*_args
)
1181 PyObject
*_res
= NULL
;
1183 if (!PyArg_ParseTuple(_args
, ""))
1185 _rv
= GetTimeBaseMasterTimeBase(_self
->ob_itself
);
1186 _res
= Py_BuildValue("O&",
1187 TimeBaseObj_New
, _rv
);
1191 static PyObject
*TimeBaseObj_SetTimeBaseMasterClock(TimeBaseObject
*_self
, PyObject
*_args
)
1193 PyObject
*_res
= NULL
;
1194 Component clockMeister
;
1195 TimeRecord slaveZero
;
1196 if (!PyArg_ParseTuple(_args
, "O&O&",
1197 CmpObj_Convert
, &clockMeister
,
1198 QtTimeRecord_Convert
, &slaveZero
))
1200 SetTimeBaseMasterClock(_self
->ob_itself
,
1208 static PyObject
*TimeBaseObj_GetTimeBaseMasterClock(TimeBaseObject
*_self
, PyObject
*_args
)
1210 PyObject
*_res
= NULL
;
1211 ComponentInstance _rv
;
1212 if (!PyArg_ParseTuple(_args
, ""))
1214 _rv
= GetTimeBaseMasterClock(_self
->ob_itself
);
1215 _res
= Py_BuildValue("O&",
1216 CmpInstObj_New
, _rv
);
1220 static PyObject
*TimeBaseObj_GetTimeBaseStatus(TimeBaseObject
*_self
, PyObject
*_args
)
1222 PyObject
*_res
= NULL
;
1224 TimeRecord unpinnedTime
;
1225 if (!PyArg_ParseTuple(_args
, ""))
1227 _rv
= GetTimeBaseStatus(_self
->ob_itself
,
1229 _res
= Py_BuildValue("lO&",
1231 QtTimeRecord_New
, &unpinnedTime
);
1235 static PyObject
*TimeBaseObj_SetTimeBaseZero(TimeBaseObject
*_self
, PyObject
*_args
)
1237 PyObject
*_res
= NULL
;
1239 if (!PyArg_ParseTuple(_args
, "O&",
1240 QtTimeRecord_Convert
, &zero
))
1242 SetTimeBaseZero(_self
->ob_itself
,
1249 static PyObject
*TimeBaseObj_GetTimeBaseEffectiveRate(TimeBaseObject
*_self
, PyObject
*_args
)
1251 PyObject
*_res
= NULL
;
1253 if (!PyArg_ParseTuple(_args
, ""))
1255 _rv
= GetTimeBaseEffectiveRate(_self
->ob_itself
);
1256 _res
= Py_BuildValue("O&",
1257 PyMac_BuildFixed
, _rv
);
1261 static PyMethodDef TimeBaseObj_methods
[] = {
1262 {"DisposeTimeBase", (PyCFunction
)TimeBaseObj_DisposeTimeBase
, 1,
1264 {"GetTimeBaseTime", (PyCFunction
)TimeBaseObj_GetTimeBaseTime
, 1,
1265 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1266 {"SetTimeBaseTime", (PyCFunction
)TimeBaseObj_SetTimeBaseTime
, 1,
1267 "(TimeRecord tr) -> None"},
1268 {"SetTimeBaseValue", (PyCFunction
)TimeBaseObj_SetTimeBaseValue
, 1,
1269 "(TimeValue t, TimeScale s) -> None"},
1270 {"GetTimeBaseRate", (PyCFunction
)TimeBaseObj_GetTimeBaseRate
, 1,
1271 "() -> (Fixed _rv)"},
1272 {"SetTimeBaseRate", (PyCFunction
)TimeBaseObj_SetTimeBaseRate
, 1,
1273 "(Fixed r) -> None"},
1274 {"GetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStartTime
, 1,
1275 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1276 {"SetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStartTime
, 1,
1277 "(TimeRecord tr) -> None"},
1278 {"GetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStopTime
, 1,
1279 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1280 {"SetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStopTime
, 1,
1281 "(TimeRecord tr) -> None"},
1282 {"GetTimeBaseFlags", (PyCFunction
)TimeBaseObj_GetTimeBaseFlags
, 1,
1283 "() -> (long _rv)"},
1284 {"SetTimeBaseFlags", (PyCFunction
)TimeBaseObj_SetTimeBaseFlags
, 1,
1285 "(long timeBaseFlags) -> None"},
1286 {"SetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterTimeBase
, 1,
1287 "(TimeBase master, TimeRecord slaveZero) -> None"},
1288 {"GetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterTimeBase
, 1,
1289 "() -> (TimeBase _rv)"},
1290 {"SetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterClock
, 1,
1291 "(Component clockMeister, TimeRecord slaveZero) -> None"},
1292 {"GetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterClock
, 1,
1293 "() -> (ComponentInstance _rv)"},
1294 {"GetTimeBaseStatus", (PyCFunction
)TimeBaseObj_GetTimeBaseStatus
, 1,
1295 "() -> (long _rv, TimeRecord unpinnedTime)"},
1296 {"SetTimeBaseZero", (PyCFunction
)TimeBaseObj_SetTimeBaseZero
, 1,
1297 "(TimeRecord zero) -> None"},
1298 {"GetTimeBaseEffectiveRate", (PyCFunction
)TimeBaseObj_GetTimeBaseEffectiveRate
, 1,
1299 "() -> (Fixed _rv)"},
1303 PyMethodChain TimeBaseObj_chain
= { TimeBaseObj_methods
, NULL
};
1305 static PyObject
*TimeBaseObj_getattr(TimeBaseObject
*self
, char *name
)
1307 return Py_FindMethodInChain(&TimeBaseObj_chain
, (PyObject
*)self
, name
);
1310 #define TimeBaseObj_setattr NULL
1312 #define TimeBaseObj_compare NULL
1314 #define TimeBaseObj_repr NULL
1316 #define TimeBaseObj_hash NULL
1318 PyTypeObject TimeBase_Type
= {
1319 PyObject_HEAD_INIT(&PyType_Type
)
1321 "TimeBase", /*tp_name*/
1322 sizeof(TimeBaseObject
), /*tp_basicsize*/
1325 (destructor
) TimeBaseObj_dealloc
, /*tp_dealloc*/
1327 (getattrfunc
) TimeBaseObj_getattr
, /*tp_getattr*/
1328 (setattrfunc
) TimeBaseObj_setattr
, /*tp_setattr*/
1329 (cmpfunc
) TimeBaseObj_compare
, /*tp_compare*/
1330 (reprfunc
) TimeBaseObj_repr
, /*tp_repr*/
1331 (PyNumberMethods
*)0, /* tp_as_number */
1332 (PySequenceMethods
*)0, /* tp_as_sequence */
1333 (PyMappingMethods
*)0, /* tp_as_mapping */
1334 (hashfunc
) TimeBaseObj_hash
, /*tp_hash*/
1337 /* -------------------- End object type TimeBase -------------------- */
1340 /* ---------------------- Object type UserData ---------------------- */
1342 PyTypeObject UserData_Type
;
1344 #define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type)
1346 typedef struct UserDataObject
{
1351 PyObject
*UserDataObj_New(UserData itself
)
1354 if (itself
== NULL
) {
1355 PyErr_SetString(Qt_Error
,"Cannot create null UserData");
1358 it
= PyObject_NEW(UserDataObject
, &UserData_Type
);
1359 if (it
== NULL
) return NULL
;
1360 it
->ob_itself
= itself
;
1361 return (PyObject
*)it
;
1363 UserDataObj_Convert(PyObject
*v
, UserData
*p_itself
)
1365 if (!UserDataObj_Check(v
))
1367 PyErr_SetString(PyExc_TypeError
, "UserData required");
1370 *p_itself
= ((UserDataObject
*)v
)->ob_itself
;
1374 static void UserDataObj_dealloc(UserDataObject
*self
)
1376 DisposeUserData(self
->ob_itself
);
1380 static PyObject
*UserDataObj_GetUserData(UserDataObject
*_self
, PyObject
*_args
)
1382 PyObject
*_res
= NULL
;
1387 if (!PyArg_ParseTuple(_args
, "O&O&l",
1388 ResObj_Convert
, &data
,
1389 PyMac_GetOSType
, &udType
,
1392 _err
= GetUserData(_self
->ob_itself
,
1396 if (_err
!= noErr
) return PyMac_Error(_err
);
1402 static PyObject
*UserDataObj_AddUserData(UserDataObject
*_self
, PyObject
*_args
)
1404 PyObject
*_res
= NULL
;
1408 if (!PyArg_ParseTuple(_args
, "O&O&",
1409 ResObj_Convert
, &data
,
1410 PyMac_GetOSType
, &udType
))
1412 _err
= AddUserData(_self
->ob_itself
,
1415 if (_err
!= noErr
) return PyMac_Error(_err
);
1421 static PyObject
*UserDataObj_RemoveUserData(UserDataObject
*_self
, PyObject
*_args
)
1423 PyObject
*_res
= NULL
;
1427 if (!PyArg_ParseTuple(_args
, "O&l",
1428 PyMac_GetOSType
, &udType
,
1431 _err
= RemoveUserData(_self
->ob_itself
,
1434 if (_err
!= noErr
) return PyMac_Error(_err
);
1440 static PyObject
*UserDataObj_CountUserDataType(UserDataObject
*_self
, PyObject
*_args
)
1442 PyObject
*_res
= NULL
;
1445 if (!PyArg_ParseTuple(_args
, "O&",
1446 PyMac_GetOSType
, &udType
))
1448 _rv
= CountUserDataType(_self
->ob_itself
,
1450 _res
= Py_BuildValue("h",
1455 static PyObject
*UserDataObj_GetNextUserDataType(UserDataObject
*_self
, PyObject
*_args
)
1457 PyObject
*_res
= NULL
;
1460 if (!PyArg_ParseTuple(_args
, "O&",
1461 PyMac_GetOSType
, &udType
))
1463 _rv
= GetNextUserDataType(_self
->ob_itself
,
1465 _res
= Py_BuildValue("l",
1470 static PyObject
*UserDataObj_AddUserDataText(UserDataObject
*_self
, PyObject
*_args
)
1472 PyObject
*_res
= NULL
;
1478 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1479 ResObj_Convert
, &data
,
1480 PyMac_GetOSType
, &udType
,
1484 _err
= AddUserDataText(_self
->ob_itself
,
1489 if (_err
!= noErr
) return PyMac_Error(_err
);
1495 static PyObject
*UserDataObj_GetUserDataText(UserDataObject
*_self
, PyObject
*_args
)
1497 PyObject
*_res
= NULL
;
1503 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1504 ResObj_Convert
, &data
,
1505 PyMac_GetOSType
, &udType
,
1509 _err
= GetUserDataText(_self
->ob_itself
,
1514 if (_err
!= noErr
) return PyMac_Error(_err
);
1520 static PyObject
*UserDataObj_RemoveUserDataText(UserDataObject
*_self
, PyObject
*_args
)
1522 PyObject
*_res
= NULL
;
1527 if (!PyArg_ParseTuple(_args
, "O&lh",
1528 PyMac_GetOSType
, &udType
,
1532 _err
= RemoveUserDataText(_self
->ob_itself
,
1536 if (_err
!= noErr
) return PyMac_Error(_err
);
1542 static PyObject
*UserDataObj_PutUserDataIntoHandle(UserDataObject
*_self
, PyObject
*_args
)
1544 PyObject
*_res
= NULL
;
1547 if (!PyArg_ParseTuple(_args
, "O&",
1548 ResObj_Convert
, &h
))
1550 _err
= PutUserDataIntoHandle(_self
->ob_itself
,
1552 if (_err
!= noErr
) return PyMac_Error(_err
);
1558 static PyMethodDef UserDataObj_methods
[] = {
1559 {"GetUserData", (PyCFunction
)UserDataObj_GetUserData
, 1,
1560 "(Handle data, OSType udType, long index) -> None"},
1561 {"AddUserData", (PyCFunction
)UserDataObj_AddUserData
, 1,
1562 "(Handle data, OSType udType) -> None"},
1563 {"RemoveUserData", (PyCFunction
)UserDataObj_RemoveUserData
, 1,
1564 "(OSType udType, long index) -> None"},
1565 {"CountUserDataType", (PyCFunction
)UserDataObj_CountUserDataType
, 1,
1566 "(OSType udType) -> (short _rv)"},
1567 {"GetNextUserDataType", (PyCFunction
)UserDataObj_GetNextUserDataType
, 1,
1568 "(OSType udType) -> (long _rv)"},
1569 {"AddUserDataText", (PyCFunction
)UserDataObj_AddUserDataText
, 1,
1570 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1571 {"GetUserDataText", (PyCFunction
)UserDataObj_GetUserDataText
, 1,
1572 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1573 {"RemoveUserDataText", (PyCFunction
)UserDataObj_RemoveUserDataText
, 1,
1574 "(OSType udType, long index, short itlRegionTag) -> None"},
1575 {"PutUserDataIntoHandle", (PyCFunction
)UserDataObj_PutUserDataIntoHandle
, 1,
1576 "(Handle h) -> None"},
1580 PyMethodChain UserDataObj_chain
= { UserDataObj_methods
, NULL
};
1582 static PyObject
*UserDataObj_getattr(UserDataObject
*self
, char *name
)
1584 return Py_FindMethodInChain(&UserDataObj_chain
, (PyObject
*)self
, name
);
1587 #define UserDataObj_setattr NULL
1589 #define UserDataObj_compare NULL
1591 #define UserDataObj_repr NULL
1593 #define UserDataObj_hash NULL
1595 PyTypeObject UserData_Type
= {
1596 PyObject_HEAD_INIT(&PyType_Type
)
1598 "UserData", /*tp_name*/
1599 sizeof(UserDataObject
), /*tp_basicsize*/
1602 (destructor
) UserDataObj_dealloc
, /*tp_dealloc*/
1604 (getattrfunc
) UserDataObj_getattr
, /*tp_getattr*/
1605 (setattrfunc
) UserDataObj_setattr
, /*tp_setattr*/
1606 (cmpfunc
) UserDataObj_compare
, /*tp_compare*/
1607 (reprfunc
) UserDataObj_repr
, /*tp_repr*/
1608 (PyNumberMethods
*)0, /* tp_as_number */
1609 (PySequenceMethods
*)0, /* tp_as_sequence */
1610 (PyMappingMethods
*)0, /* tp_as_mapping */
1611 (hashfunc
) UserDataObj_hash
, /*tp_hash*/
1614 /* -------------------- End object type UserData -------------------- */
1617 /* ----------------------- Object type Media ------------------------ */
1619 PyTypeObject Media_Type
;
1621 #define MediaObj_Check(x) ((x)->ob_type == &Media_Type)
1623 typedef struct MediaObject
{
1628 PyObject
*MediaObj_New(Media itself
)
1631 if (itself
== NULL
) {
1632 PyErr_SetString(Qt_Error
,"Cannot create null Media");
1635 it
= PyObject_NEW(MediaObject
, &Media_Type
);
1636 if (it
== NULL
) return NULL
;
1637 it
->ob_itself
= itself
;
1638 return (PyObject
*)it
;
1640 MediaObj_Convert(PyObject
*v
, Media
*p_itself
)
1642 if (!MediaObj_Check(v
))
1644 PyErr_SetString(PyExc_TypeError
, "Media required");
1647 *p_itself
= ((MediaObject
*)v
)->ob_itself
;
1651 static void MediaObj_dealloc(MediaObject
*self
)
1653 DisposeTrackMedia(self
->ob_itself
);
1657 static PyObject
*MediaObj_LoadMediaIntoRam(MediaObject
*_self
, PyObject
*_args
)
1659 PyObject
*_res
= NULL
;
1664 if (!PyArg_ParseTuple(_args
, "lll",
1669 _err
= LoadMediaIntoRam(_self
->ob_itself
,
1673 if (_err
!= noErr
) return PyMac_Error(_err
);
1679 static PyObject
*MediaObj_GetMediaTrack(MediaObject
*_self
, PyObject
*_args
)
1681 PyObject
*_res
= NULL
;
1683 if (!PyArg_ParseTuple(_args
, ""))
1685 _rv
= GetMediaTrack(_self
->ob_itself
);
1686 _res
= Py_BuildValue("O&",
1691 static PyObject
*MediaObj_GetMediaCreationTime(MediaObject
*_self
, PyObject
*_args
)
1693 PyObject
*_res
= NULL
;
1695 if (!PyArg_ParseTuple(_args
, ""))
1697 _rv
= GetMediaCreationTime(_self
->ob_itself
);
1698 _res
= Py_BuildValue("l",
1703 static PyObject
*MediaObj_GetMediaModificationTime(MediaObject
*_self
, PyObject
*_args
)
1705 PyObject
*_res
= NULL
;
1707 if (!PyArg_ParseTuple(_args
, ""))
1709 _rv
= GetMediaModificationTime(_self
->ob_itself
);
1710 _res
= Py_BuildValue("l",
1715 static PyObject
*MediaObj_GetMediaTimeScale(MediaObject
*_self
, PyObject
*_args
)
1717 PyObject
*_res
= NULL
;
1719 if (!PyArg_ParseTuple(_args
, ""))
1721 _rv
= GetMediaTimeScale(_self
->ob_itself
);
1722 _res
= Py_BuildValue("l",
1727 static PyObject
*MediaObj_SetMediaTimeScale(MediaObject
*_self
, PyObject
*_args
)
1729 PyObject
*_res
= NULL
;
1730 TimeScale timeScale
;
1731 if (!PyArg_ParseTuple(_args
, "l",
1734 SetMediaTimeScale(_self
->ob_itself
,
1741 static PyObject
*MediaObj_GetMediaDuration(MediaObject
*_self
, PyObject
*_args
)
1743 PyObject
*_res
= NULL
;
1745 if (!PyArg_ParseTuple(_args
, ""))
1747 _rv
= GetMediaDuration(_self
->ob_itself
);
1748 _res
= Py_BuildValue("l",
1753 static PyObject
*MediaObj_GetMediaLanguage(MediaObject
*_self
, PyObject
*_args
)
1755 PyObject
*_res
= NULL
;
1757 if (!PyArg_ParseTuple(_args
, ""))
1759 _rv
= GetMediaLanguage(_self
->ob_itself
);
1760 _res
= Py_BuildValue("h",
1765 static PyObject
*MediaObj_SetMediaLanguage(MediaObject
*_self
, PyObject
*_args
)
1767 PyObject
*_res
= NULL
;
1769 if (!PyArg_ParseTuple(_args
, "h",
1772 SetMediaLanguage(_self
->ob_itself
,
1779 static PyObject
*MediaObj_GetMediaQuality(MediaObject
*_self
, PyObject
*_args
)
1781 PyObject
*_res
= NULL
;
1783 if (!PyArg_ParseTuple(_args
, ""))
1785 _rv
= GetMediaQuality(_self
->ob_itself
);
1786 _res
= Py_BuildValue("h",
1791 static PyObject
*MediaObj_SetMediaQuality(MediaObject
*_self
, PyObject
*_args
)
1793 PyObject
*_res
= NULL
;
1795 if (!PyArg_ParseTuple(_args
, "h",
1798 SetMediaQuality(_self
->ob_itself
,
1805 static PyObject
*MediaObj_GetMediaHandlerDescription(MediaObject
*_self
, PyObject
*_args
)
1807 PyObject
*_res
= NULL
;
1810 OSType creatorManufacturer
;
1811 if (!PyArg_ParseTuple(_args
, "O&",
1812 PyMac_GetStr255
, creatorName
))
1814 GetMediaHandlerDescription(_self
->ob_itself
,
1817 &creatorManufacturer
);
1818 _res
= Py_BuildValue("O&O&",
1819 PyMac_BuildOSType
, mediaType
,
1820 PyMac_BuildOSType
, creatorManufacturer
);
1824 static PyObject
*MediaObj_GetMediaUserData(MediaObject
*_self
, PyObject
*_args
)
1826 PyObject
*_res
= NULL
;
1828 if (!PyArg_ParseTuple(_args
, ""))
1830 _rv
= GetMediaUserData(_self
->ob_itself
);
1831 _res
= Py_BuildValue("O&",
1832 UserDataObj_New
, _rv
);
1836 static PyObject
*MediaObj_GetMediaHandler(MediaObject
*_self
, PyObject
*_args
)
1838 PyObject
*_res
= NULL
;
1840 if (!PyArg_ParseTuple(_args
, ""))
1842 _rv
= GetMediaHandler(_self
->ob_itself
);
1843 _res
= Py_BuildValue("O&",
1844 CmpInstObj_New
, _rv
);
1848 static PyObject
*MediaObj_SetMediaHandler(MediaObject
*_self
, PyObject
*_args
)
1850 PyObject
*_res
= NULL
;
1852 MediaHandlerComponent mH
;
1853 if (!PyArg_ParseTuple(_args
, "O&",
1854 CmpObj_Convert
, &mH
))
1856 _err
= SetMediaHandler(_self
->ob_itself
,
1858 if (_err
!= noErr
) return PyMac_Error(_err
);
1864 static PyObject
*MediaObj_BeginMediaEdits(MediaObject
*_self
, PyObject
*_args
)
1866 PyObject
*_res
= NULL
;
1868 if (!PyArg_ParseTuple(_args
, ""))
1870 _err
= BeginMediaEdits(_self
->ob_itself
);
1871 if (_err
!= noErr
) return PyMac_Error(_err
);
1877 static PyObject
*MediaObj_EndMediaEdits(MediaObject
*_self
, PyObject
*_args
)
1879 PyObject
*_res
= NULL
;
1881 if (!PyArg_ParseTuple(_args
, ""))
1883 _err
= EndMediaEdits(_self
->ob_itself
);
1884 if (_err
!= noErr
) return PyMac_Error(_err
);
1890 static PyObject
*MediaObj_SetMediaDefaultDataRefIndex(MediaObject
*_self
, PyObject
*_args
)
1892 PyObject
*_res
= NULL
;
1895 if (!PyArg_ParseTuple(_args
, "h",
1898 _err
= SetMediaDefaultDataRefIndex(_self
->ob_itself
,
1900 if (_err
!= noErr
) return PyMac_Error(_err
);
1906 static PyObject
*MediaObj_GetMediaDataHandlerDescription(MediaObject
*_self
, PyObject
*_args
)
1908 PyObject
*_res
= NULL
;
1912 OSType creatorManufacturer
;
1913 if (!PyArg_ParseTuple(_args
, "hO&",
1915 PyMac_GetStr255
, creatorName
))
1917 GetMediaDataHandlerDescription(_self
->ob_itself
,
1921 &creatorManufacturer
);
1922 _res
= Py_BuildValue("O&O&",
1923 PyMac_BuildOSType
, dhType
,
1924 PyMac_BuildOSType
, creatorManufacturer
);
1928 static PyObject
*MediaObj_GetMediaDataHandler(MediaObject
*_self
, PyObject
*_args
)
1930 PyObject
*_res
= NULL
;
1933 if (!PyArg_ParseTuple(_args
, "h",
1936 _rv
= GetMediaDataHandler(_self
->ob_itself
,
1938 _res
= Py_BuildValue("O&",
1939 CmpInstObj_New
, _rv
);
1943 static PyObject
*MediaObj_SetMediaDataHandler(MediaObject
*_self
, PyObject
*_args
)
1945 PyObject
*_res
= NULL
;
1948 DataHandlerComponent dataHandler
;
1949 if (!PyArg_ParseTuple(_args
, "hO&",
1951 CmpObj_Convert
, &dataHandler
))
1953 _err
= SetMediaDataHandler(_self
->ob_itself
,
1956 if (_err
!= noErr
) return PyMac_Error(_err
);
1962 static PyObject
*MediaObj_GetMediaSampleDescriptionCount(MediaObject
*_self
, PyObject
*_args
)
1964 PyObject
*_res
= NULL
;
1966 if (!PyArg_ParseTuple(_args
, ""))
1968 _rv
= GetMediaSampleDescriptionCount(_self
->ob_itself
);
1969 _res
= Py_BuildValue("l",
1974 static PyObject
*MediaObj_GetMediaSampleDescription(MediaObject
*_self
, PyObject
*_args
)
1976 PyObject
*_res
= NULL
;
1978 SampleDescriptionHandle descH
;
1979 if (!PyArg_ParseTuple(_args
, "lO&",
1981 ResObj_Convert
, &descH
))
1983 GetMediaSampleDescription(_self
->ob_itself
,
1991 static PyObject
*MediaObj_SetMediaSampleDescription(MediaObject
*_self
, PyObject
*_args
)
1993 PyObject
*_res
= NULL
;
1996 SampleDescriptionHandle descH
;
1997 if (!PyArg_ParseTuple(_args
, "lO&",
1999 ResObj_Convert
, &descH
))
2001 _err
= SetMediaSampleDescription(_self
->ob_itself
,
2004 if (_err
!= noErr
) return PyMac_Error(_err
);
2010 static PyObject
*MediaObj_GetMediaSampleCount(MediaObject
*_self
, PyObject
*_args
)
2012 PyObject
*_res
= NULL
;
2014 if (!PyArg_ParseTuple(_args
, ""))
2016 _rv
= GetMediaSampleCount(_self
->ob_itself
);
2017 _res
= Py_BuildValue("l",
2022 static PyObject
*MediaObj_GetMediaSyncSampleCount(MediaObject
*_self
, PyObject
*_args
)
2024 PyObject
*_res
= NULL
;
2026 if (!PyArg_ParseTuple(_args
, ""))
2028 _rv
= GetMediaSyncSampleCount(_self
->ob_itself
);
2029 _res
= Py_BuildValue("l",
2034 static PyObject
*MediaObj_SampleNumToMediaTime(MediaObject
*_self
, PyObject
*_args
)
2036 PyObject
*_res
= NULL
;
2037 long logicalSampleNum
;
2038 TimeValue sampleTime
;
2039 TimeValue sampleDuration
;
2040 if (!PyArg_ParseTuple(_args
, "l",
2043 SampleNumToMediaTime(_self
->ob_itself
,
2047 _res
= Py_BuildValue("ll",
2053 static PyObject
*MediaObj_MediaTimeToSampleNum(MediaObject
*_self
, PyObject
*_args
)
2055 PyObject
*_res
= NULL
;
2058 TimeValue sampleTime
;
2059 TimeValue sampleDuration
;
2060 if (!PyArg_ParseTuple(_args
, "l",
2063 MediaTimeToSampleNum(_self
->ob_itself
,
2068 _res
= Py_BuildValue("lll",
2075 static PyObject
*MediaObj_AddMediaSample(MediaObject
*_self
, PyObject
*_args
)
2077 PyObject
*_res
= NULL
;
2082 TimeValue durationPerSample
;
2083 SampleDescriptionHandle sampleDescriptionH
;
2084 long numberOfSamples
;
2086 TimeValue sampleTime
;
2087 if (!PyArg_ParseTuple(_args
, "O&lllO&lh",
2088 ResObj_Convert
, &dataIn
,
2092 ResObj_Convert
, &sampleDescriptionH
,
2096 _err
= AddMediaSample(_self
->ob_itself
,
2105 if (_err
!= noErr
) return PyMac_Error(_err
);
2106 _res
= Py_BuildValue("l",
2111 static PyObject
*MediaObj_AddMediaSampleReference(MediaObject
*_self
, PyObject
*_args
)
2113 PyObject
*_res
= NULL
;
2117 TimeValue durationPerSample
;
2118 SampleDescriptionHandle sampleDescriptionH
;
2119 long numberOfSamples
;
2121 TimeValue sampleTime
;
2122 if (!PyArg_ParseTuple(_args
, "lllO&lh",
2126 ResObj_Convert
, &sampleDescriptionH
,
2130 _err
= AddMediaSampleReference(_self
->ob_itself
,
2138 if (_err
!= noErr
) return PyMac_Error(_err
);
2139 _res
= Py_BuildValue("l",
2144 static PyObject
*MediaObj_GetMediaSample(MediaObject
*_self
, PyObject
*_args
)
2146 PyObject
*_res
= NULL
;
2152 TimeValue sampleTime
;
2153 TimeValue durationPerSample
;
2154 SampleDescriptionHandle sampleDescriptionH
;
2155 long sampleDescriptionIndex
;
2156 long maxNumberOfSamples
;
2157 long numberOfSamples
;
2159 if (!PyArg_ParseTuple(_args
, "O&llO&l",
2160 ResObj_Convert
, &dataOut
,
2163 ResObj_Convert
, &sampleDescriptionH
,
2164 &maxNumberOfSamples
))
2166 _err
= GetMediaSample(_self
->ob_itself
,
2174 &sampleDescriptionIndex
,
2178 if (_err
!= noErr
) return PyMac_Error(_err
);
2179 _res
= Py_BuildValue("lllllh",
2183 sampleDescriptionIndex
,
2189 static PyObject
*MediaObj_GetMediaSampleReference(MediaObject
*_self
, PyObject
*_args
)
2191 PyObject
*_res
= NULL
;
2196 TimeValue sampleTime
;
2197 TimeValue durationPerSample
;
2198 SampleDescriptionHandle sampleDescriptionH
;
2199 long sampleDescriptionIndex
;
2200 long maxNumberOfSamples
;
2201 long numberOfSamples
;
2203 if (!PyArg_ParseTuple(_args
, "lO&l",
2205 ResObj_Convert
, &sampleDescriptionH
,
2206 &maxNumberOfSamples
))
2208 _err
= GetMediaSampleReference(_self
->ob_itself
,
2215 &sampleDescriptionIndex
,
2219 if (_err
!= noErr
) return PyMac_Error(_err
);
2220 _res
= Py_BuildValue("llllllh",
2225 sampleDescriptionIndex
,
2231 static PyObject
*MediaObj_SetMediaPreferredChunkSize(MediaObject
*_self
, PyObject
*_args
)
2233 PyObject
*_res
= NULL
;
2236 if (!PyArg_ParseTuple(_args
, "l",
2239 _err
= SetMediaPreferredChunkSize(_self
->ob_itself
,
2241 if (_err
!= noErr
) return PyMac_Error(_err
);
2247 static PyObject
*MediaObj_GetMediaPreferredChunkSize(MediaObject
*_self
, PyObject
*_args
)
2249 PyObject
*_res
= NULL
;
2252 if (!PyArg_ParseTuple(_args
, ""))
2254 _err
= GetMediaPreferredChunkSize(_self
->ob_itself
,
2256 if (_err
!= noErr
) return PyMac_Error(_err
);
2257 _res
= Py_BuildValue("l",
2262 static PyObject
*MediaObj_SetMediaShadowSync(MediaObject
*_self
, PyObject
*_args
)
2264 PyObject
*_res
= NULL
;
2266 long frameDiffSampleNum
;
2268 if (!PyArg_ParseTuple(_args
, "ll",
2269 &frameDiffSampleNum
,
2272 _err
= SetMediaShadowSync(_self
->ob_itself
,
2275 if (_err
!= noErr
) return PyMac_Error(_err
);
2281 static PyObject
*MediaObj_GetMediaShadowSync(MediaObject
*_self
, PyObject
*_args
)
2283 PyObject
*_res
= NULL
;
2285 long frameDiffSampleNum
;
2287 if (!PyArg_ParseTuple(_args
, "l",
2288 &frameDiffSampleNum
))
2290 _err
= GetMediaShadowSync(_self
->ob_itself
,
2293 if (_err
!= noErr
) return PyMac_Error(_err
);
2294 _res
= Py_BuildValue("l",
2299 static PyObject
*MediaObj_GetMediaDataSize(MediaObject
*_self
, PyObject
*_args
)
2301 PyObject
*_res
= NULL
;
2303 TimeValue startTime
;
2305 if (!PyArg_ParseTuple(_args
, "ll",
2309 _rv
= GetMediaDataSize(_self
->ob_itself
,
2312 _res
= Py_BuildValue("l",
2317 static PyObject
*MediaObj_GetMediaDataSize64(MediaObject
*_self
, PyObject
*_args
)
2319 PyObject
*_res
= NULL
;
2321 TimeValue startTime
;
2324 if (!PyArg_ParseTuple(_args
, "ll",
2328 _err
= GetMediaDataSize64(_self
->ob_itself
,
2332 if (_err
!= noErr
) return PyMac_Error(_err
);
2333 _res
= Py_BuildValue("O&",
2334 PyMac_Buildwide
, dataSize
);
2338 static PyObject
*MediaObj_GetMediaNextInterestingTime(MediaObject
*_self
, PyObject
*_args
)
2340 PyObject
*_res
= NULL
;
2341 short interestingTimeFlags
;
2344 TimeValue interestingTime
;
2345 TimeValue interestingDuration
;
2346 if (!PyArg_ParseTuple(_args
, "hlO&",
2347 &interestingTimeFlags
,
2349 PyMac_GetFixed
, &rate
))
2351 GetMediaNextInterestingTime(_self
->ob_itself
,
2352 interestingTimeFlags
,
2356 &interestingDuration
);
2357 _res
= Py_BuildValue("ll",
2359 interestingDuration
);
2363 static PyObject
*MediaObj_GetMediaDataRef(MediaObject
*_self
, PyObject
*_args
)
2365 PyObject
*_res
= NULL
;
2370 long dataRefAttributes
;
2371 if (!PyArg_ParseTuple(_args
, "h",
2374 _err
= GetMediaDataRef(_self
->ob_itself
,
2378 &dataRefAttributes
);
2379 if (_err
!= noErr
) return PyMac_Error(_err
);
2380 _res
= Py_BuildValue("O&O&l",
2381 ResObj_New
, dataRef
,
2382 PyMac_BuildOSType
, dataRefType
,
2387 static PyObject
*MediaObj_SetMediaDataRef(MediaObject
*_self
, PyObject
*_args
)
2389 PyObject
*_res
= NULL
;
2394 if (!PyArg_ParseTuple(_args
, "hO&O&",
2396 ResObj_Convert
, &dataRef
,
2397 PyMac_GetOSType
, &dataRefType
))
2399 _err
= SetMediaDataRef(_self
->ob_itself
,
2403 if (_err
!= noErr
) return PyMac_Error(_err
);
2409 static PyObject
*MediaObj_SetMediaDataRefAttributes(MediaObject
*_self
, PyObject
*_args
)
2411 PyObject
*_res
= NULL
;
2414 long dataRefAttributes
;
2415 if (!PyArg_ParseTuple(_args
, "hl",
2417 &dataRefAttributes
))
2419 _err
= SetMediaDataRefAttributes(_self
->ob_itself
,
2422 if (_err
!= noErr
) return PyMac_Error(_err
);
2428 static PyObject
*MediaObj_AddMediaDataRef(MediaObject
*_self
, PyObject
*_args
)
2430 PyObject
*_res
= NULL
;
2435 if (!PyArg_ParseTuple(_args
, "O&O&",
2436 ResObj_Convert
, &dataRef
,
2437 PyMac_GetOSType
, &dataRefType
))
2439 _err
= AddMediaDataRef(_self
->ob_itself
,
2443 if (_err
!= noErr
) return PyMac_Error(_err
);
2444 _res
= Py_BuildValue("h",
2449 static PyObject
*MediaObj_GetMediaDataRefCount(MediaObject
*_self
, PyObject
*_args
)
2451 PyObject
*_res
= NULL
;
2454 if (!PyArg_ParseTuple(_args
, ""))
2456 _err
= GetMediaDataRefCount(_self
->ob_itself
,
2458 if (_err
!= noErr
) return PyMac_Error(_err
);
2459 _res
= Py_BuildValue("h",
2464 static PyObject
*MediaObj_SetMediaPlayHints(MediaObject
*_self
, PyObject
*_args
)
2466 PyObject
*_res
= NULL
;
2469 if (!PyArg_ParseTuple(_args
, "ll",
2473 SetMediaPlayHints(_self
->ob_itself
,
2481 static PyObject
*MediaObj_GetMediaPlayHints(MediaObject
*_self
, PyObject
*_args
)
2483 PyObject
*_res
= NULL
;
2485 if (!PyArg_ParseTuple(_args
, ""))
2487 GetMediaPlayHints(_self
->ob_itself
,
2489 _res
= Py_BuildValue("l",
2494 static PyObject
*MediaObj_GetMediaNextInterestingTimeOnly(MediaObject
*_self
, PyObject
*_args
)
2496 PyObject
*_res
= NULL
;
2497 short interestingTimeFlags
;
2500 TimeValue interestingTime
;
2501 if (!PyArg_ParseTuple(_args
, "hlO&",
2502 &interestingTimeFlags
,
2504 PyMac_GetFixed
, &rate
))
2506 GetMediaNextInterestingTimeOnly(_self
->ob_itself
,
2507 interestingTimeFlags
,
2511 _res
= Py_BuildValue("l",
2516 static PyMethodDef MediaObj_methods
[] = {
2517 {"LoadMediaIntoRam", (PyCFunction
)MediaObj_LoadMediaIntoRam
, 1,
2518 "(TimeValue time, TimeValue duration, long flags) -> None"},
2519 {"GetMediaTrack", (PyCFunction
)MediaObj_GetMediaTrack
, 1,
2520 "() -> (Track _rv)"},
2521 {"GetMediaCreationTime", (PyCFunction
)MediaObj_GetMediaCreationTime
, 1,
2522 "() -> (unsigned long _rv)"},
2523 {"GetMediaModificationTime", (PyCFunction
)MediaObj_GetMediaModificationTime
, 1,
2524 "() -> (unsigned long _rv)"},
2525 {"GetMediaTimeScale", (PyCFunction
)MediaObj_GetMediaTimeScale
, 1,
2526 "() -> (TimeScale _rv)"},
2527 {"SetMediaTimeScale", (PyCFunction
)MediaObj_SetMediaTimeScale
, 1,
2528 "(TimeScale timeScale) -> None"},
2529 {"GetMediaDuration", (PyCFunction
)MediaObj_GetMediaDuration
, 1,
2530 "() -> (TimeValue _rv)"},
2531 {"GetMediaLanguage", (PyCFunction
)MediaObj_GetMediaLanguage
, 1,
2532 "() -> (short _rv)"},
2533 {"SetMediaLanguage", (PyCFunction
)MediaObj_SetMediaLanguage
, 1,
2534 "(short language) -> None"},
2535 {"GetMediaQuality", (PyCFunction
)MediaObj_GetMediaQuality
, 1,
2536 "() -> (short _rv)"},
2537 {"SetMediaQuality", (PyCFunction
)MediaObj_SetMediaQuality
, 1,
2538 "(short quality) -> None"},
2539 {"GetMediaHandlerDescription", (PyCFunction
)MediaObj_GetMediaHandlerDescription
, 1,
2540 "(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)"},
2541 {"GetMediaUserData", (PyCFunction
)MediaObj_GetMediaUserData
, 1,
2542 "() -> (UserData _rv)"},
2543 {"GetMediaHandler", (PyCFunction
)MediaObj_GetMediaHandler
, 1,
2544 "() -> (MediaHandler _rv)"},
2545 {"SetMediaHandler", (PyCFunction
)MediaObj_SetMediaHandler
, 1,
2546 "(MediaHandlerComponent mH) -> None"},
2547 {"BeginMediaEdits", (PyCFunction
)MediaObj_BeginMediaEdits
, 1,
2549 {"EndMediaEdits", (PyCFunction
)MediaObj_EndMediaEdits
, 1,
2551 {"SetMediaDefaultDataRefIndex", (PyCFunction
)MediaObj_SetMediaDefaultDataRefIndex
, 1,
2552 "(short index) -> None"},
2553 {"GetMediaDataHandlerDescription", (PyCFunction
)MediaObj_GetMediaDataHandlerDescription
, 1,
2554 "(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)"},
2555 {"GetMediaDataHandler", (PyCFunction
)MediaObj_GetMediaDataHandler
, 1,
2556 "(short index) -> (DataHandler _rv)"},
2557 {"SetMediaDataHandler", (PyCFunction
)MediaObj_SetMediaDataHandler
, 1,
2558 "(short index, DataHandlerComponent dataHandler) -> None"},
2559 {"GetMediaSampleDescriptionCount", (PyCFunction
)MediaObj_GetMediaSampleDescriptionCount
, 1,
2560 "() -> (long _rv)"},
2561 {"GetMediaSampleDescription", (PyCFunction
)MediaObj_GetMediaSampleDescription
, 1,
2562 "(long index, SampleDescriptionHandle descH) -> None"},
2563 {"SetMediaSampleDescription", (PyCFunction
)MediaObj_SetMediaSampleDescription
, 1,
2564 "(long index, SampleDescriptionHandle descH) -> None"},
2565 {"GetMediaSampleCount", (PyCFunction
)MediaObj_GetMediaSampleCount
, 1,
2566 "() -> (long _rv)"},
2567 {"GetMediaSyncSampleCount", (PyCFunction
)MediaObj_GetMediaSyncSampleCount
, 1,
2568 "() -> (long _rv)"},
2569 {"SampleNumToMediaTime", (PyCFunction
)MediaObj_SampleNumToMediaTime
, 1,
2570 "(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)"},
2571 {"MediaTimeToSampleNum", (PyCFunction
)MediaObj_MediaTimeToSampleNum
, 1,
2572 "(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)"},
2573 {"AddMediaSample", (PyCFunction
)MediaObj_AddMediaSample
, 1,
2574 "(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2575 {"AddMediaSampleReference", (PyCFunction
)MediaObj_AddMediaSampleReference
, 1,
2576 "(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2577 {"GetMediaSample", (PyCFunction
)MediaObj_GetMediaSample
, 1,
2578 "(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2579 {"GetMediaSampleReference", (PyCFunction
)MediaObj_GetMediaSampleReference
, 1,
2580 "(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2581 {"SetMediaPreferredChunkSize", (PyCFunction
)MediaObj_SetMediaPreferredChunkSize
, 1,
2582 "(long maxChunkSize) -> None"},
2583 {"GetMediaPreferredChunkSize", (PyCFunction
)MediaObj_GetMediaPreferredChunkSize
, 1,
2584 "() -> (long maxChunkSize)"},
2585 {"SetMediaShadowSync", (PyCFunction
)MediaObj_SetMediaShadowSync
, 1,
2586 "(long frameDiffSampleNum, long syncSampleNum) -> None"},
2587 {"GetMediaShadowSync", (PyCFunction
)MediaObj_GetMediaShadowSync
, 1,
2588 "(long frameDiffSampleNum) -> (long syncSampleNum)"},
2589 {"GetMediaDataSize", (PyCFunction
)MediaObj_GetMediaDataSize
, 1,
2590 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
2591 {"GetMediaDataSize64", (PyCFunction
)MediaObj_GetMediaDataSize64
, 1,
2592 "(TimeValue startTime, TimeValue duration) -> (wide dataSize)"},
2593 {"GetMediaNextInterestingTime", (PyCFunction
)MediaObj_GetMediaNextInterestingTime
, 1,
2594 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
2595 {"GetMediaDataRef", (PyCFunction
)MediaObj_GetMediaDataRef
, 1,
2596 "(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)"},
2597 {"SetMediaDataRef", (PyCFunction
)MediaObj_SetMediaDataRef
, 1,
2598 "(short index, Handle dataRef, OSType dataRefType) -> None"},
2599 {"SetMediaDataRefAttributes", (PyCFunction
)MediaObj_SetMediaDataRefAttributes
, 1,
2600 "(short index, long dataRefAttributes) -> None"},
2601 {"AddMediaDataRef", (PyCFunction
)MediaObj_AddMediaDataRef
, 1,
2602 "(Handle dataRef, OSType dataRefType) -> (short index)"},
2603 {"GetMediaDataRefCount", (PyCFunction
)MediaObj_GetMediaDataRefCount
, 1,
2604 "() -> (short count)"},
2605 {"SetMediaPlayHints", (PyCFunction
)MediaObj_SetMediaPlayHints
, 1,
2606 "(long flags, long flagsMask) -> None"},
2607 {"GetMediaPlayHints", (PyCFunction
)MediaObj_GetMediaPlayHints
, 1,
2608 "() -> (long flags)"},
2609 {"GetMediaNextInterestingTimeOnly", (PyCFunction
)MediaObj_GetMediaNextInterestingTimeOnly
, 1,
2610 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime)"},
2614 PyMethodChain MediaObj_chain
= { MediaObj_methods
, NULL
};
2616 static PyObject
*MediaObj_getattr(MediaObject
*self
, char *name
)
2618 return Py_FindMethodInChain(&MediaObj_chain
, (PyObject
*)self
, name
);
2621 #define MediaObj_setattr NULL
2623 #define MediaObj_compare NULL
2625 #define MediaObj_repr NULL
2627 #define MediaObj_hash NULL
2629 PyTypeObject Media_Type
= {
2630 PyObject_HEAD_INIT(&PyType_Type
)
2632 "Media", /*tp_name*/
2633 sizeof(MediaObject
), /*tp_basicsize*/
2636 (destructor
) MediaObj_dealloc
, /*tp_dealloc*/
2638 (getattrfunc
) MediaObj_getattr
, /*tp_getattr*/
2639 (setattrfunc
) MediaObj_setattr
, /*tp_setattr*/
2640 (cmpfunc
) MediaObj_compare
, /*tp_compare*/
2641 (reprfunc
) MediaObj_repr
, /*tp_repr*/
2642 (PyNumberMethods
*)0, /* tp_as_number */
2643 (PySequenceMethods
*)0, /* tp_as_sequence */
2644 (PyMappingMethods
*)0, /* tp_as_mapping */
2645 (hashfunc
) MediaObj_hash
, /*tp_hash*/
2648 /* --------------------- End object type Media ---------------------- */
2651 /* ----------------------- Object type Track ------------------------ */
2653 PyTypeObject Track_Type
;
2655 #define TrackObj_Check(x) ((x)->ob_type == &Track_Type)
2657 typedef struct TrackObject
{
2662 PyObject
*TrackObj_New(Track itself
)
2665 if (itself
== NULL
) {
2666 PyErr_SetString(Qt_Error
,"Cannot create null Track");
2669 it
= PyObject_NEW(TrackObject
, &Track_Type
);
2670 if (it
== NULL
) return NULL
;
2671 it
->ob_itself
= itself
;
2672 return (PyObject
*)it
;
2674 TrackObj_Convert(PyObject
*v
, Track
*p_itself
)
2676 if (!TrackObj_Check(v
))
2678 PyErr_SetString(PyExc_TypeError
, "Track required");
2681 *p_itself
= ((TrackObject
*)v
)->ob_itself
;
2685 static void TrackObj_dealloc(TrackObject
*self
)
2687 DisposeMovieTrack(self
->ob_itself
);
2691 static PyObject
*TrackObj_LoadTrackIntoRam(TrackObject
*_self
, PyObject
*_args
)
2693 PyObject
*_res
= NULL
;
2698 if (!PyArg_ParseTuple(_args
, "lll",
2703 _err
= LoadTrackIntoRam(_self
->ob_itself
,
2707 if (_err
!= noErr
) return PyMac_Error(_err
);
2713 static PyObject
*TrackObj_GetTrackPict(TrackObject
*_self
, PyObject
*_args
)
2715 PyObject
*_res
= NULL
;
2718 if (!PyArg_ParseTuple(_args
, "l",
2721 _rv
= GetTrackPict(_self
->ob_itself
,
2723 _res
= Py_BuildValue("O&",
2728 static PyObject
*TrackObj_GetTrackClipRgn(TrackObject
*_self
, PyObject
*_args
)
2730 PyObject
*_res
= NULL
;
2732 if (!PyArg_ParseTuple(_args
, ""))
2734 _rv
= GetTrackClipRgn(_self
->ob_itself
);
2735 _res
= Py_BuildValue("O&",
2740 static PyObject
*TrackObj_SetTrackClipRgn(TrackObject
*_self
, PyObject
*_args
)
2742 PyObject
*_res
= NULL
;
2744 if (!PyArg_ParseTuple(_args
, "O&",
2745 ResObj_Convert
, &theClip
))
2747 SetTrackClipRgn(_self
->ob_itself
,
2754 static PyObject
*TrackObj_GetTrackDisplayBoundsRgn(TrackObject
*_self
, PyObject
*_args
)
2756 PyObject
*_res
= NULL
;
2758 if (!PyArg_ParseTuple(_args
, ""))
2760 _rv
= GetTrackDisplayBoundsRgn(_self
->ob_itself
);
2761 _res
= Py_BuildValue("O&",
2766 static PyObject
*TrackObj_GetTrackMovieBoundsRgn(TrackObject
*_self
, PyObject
*_args
)
2768 PyObject
*_res
= NULL
;
2770 if (!PyArg_ParseTuple(_args
, ""))
2772 _rv
= GetTrackMovieBoundsRgn(_self
->ob_itself
);
2773 _res
= Py_BuildValue("O&",
2778 static PyObject
*TrackObj_GetTrackBoundsRgn(TrackObject
*_self
, PyObject
*_args
)
2780 PyObject
*_res
= NULL
;
2782 if (!PyArg_ParseTuple(_args
, ""))
2784 _rv
= GetTrackBoundsRgn(_self
->ob_itself
);
2785 _res
= Py_BuildValue("O&",
2790 static PyObject
*TrackObj_GetTrackMatte(TrackObject
*_self
, PyObject
*_args
)
2792 PyObject
*_res
= NULL
;
2794 if (!PyArg_ParseTuple(_args
, ""))
2796 _rv
= GetTrackMatte(_self
->ob_itself
);
2797 _res
= Py_BuildValue("O&",
2802 static PyObject
*TrackObj_SetTrackMatte(TrackObject
*_self
, PyObject
*_args
)
2804 PyObject
*_res
= NULL
;
2805 PixMapHandle theMatte
;
2806 if (!PyArg_ParseTuple(_args
, "O&",
2807 ResObj_Convert
, &theMatte
))
2809 SetTrackMatte(_self
->ob_itself
,
2816 static PyObject
*TrackObj_GetTrackID(TrackObject
*_self
, PyObject
*_args
)
2818 PyObject
*_res
= NULL
;
2820 if (!PyArg_ParseTuple(_args
, ""))
2822 _rv
= GetTrackID(_self
->ob_itself
);
2823 _res
= Py_BuildValue("l",
2828 static PyObject
*TrackObj_GetTrackMovie(TrackObject
*_self
, PyObject
*_args
)
2830 PyObject
*_res
= NULL
;
2832 if (!PyArg_ParseTuple(_args
, ""))
2834 _rv
= GetTrackMovie(_self
->ob_itself
);
2835 _res
= Py_BuildValue("O&",
2840 static PyObject
*TrackObj_GetTrackCreationTime(TrackObject
*_self
, PyObject
*_args
)
2842 PyObject
*_res
= NULL
;
2844 if (!PyArg_ParseTuple(_args
, ""))
2846 _rv
= GetTrackCreationTime(_self
->ob_itself
);
2847 _res
= Py_BuildValue("l",
2852 static PyObject
*TrackObj_GetTrackModificationTime(TrackObject
*_self
, PyObject
*_args
)
2854 PyObject
*_res
= NULL
;
2856 if (!PyArg_ParseTuple(_args
, ""))
2858 _rv
= GetTrackModificationTime(_self
->ob_itself
);
2859 _res
= Py_BuildValue("l",
2864 static PyObject
*TrackObj_GetTrackEnabled(TrackObject
*_self
, PyObject
*_args
)
2866 PyObject
*_res
= NULL
;
2868 if (!PyArg_ParseTuple(_args
, ""))
2870 _rv
= GetTrackEnabled(_self
->ob_itself
);
2871 _res
= Py_BuildValue("b",
2876 static PyObject
*TrackObj_SetTrackEnabled(TrackObject
*_self
, PyObject
*_args
)
2878 PyObject
*_res
= NULL
;
2880 if (!PyArg_ParseTuple(_args
, "b",
2883 SetTrackEnabled(_self
->ob_itself
,
2890 static PyObject
*TrackObj_GetTrackUsage(TrackObject
*_self
, PyObject
*_args
)
2892 PyObject
*_res
= NULL
;
2894 if (!PyArg_ParseTuple(_args
, ""))
2896 _rv
= GetTrackUsage(_self
->ob_itself
);
2897 _res
= Py_BuildValue("l",
2902 static PyObject
*TrackObj_SetTrackUsage(TrackObject
*_self
, PyObject
*_args
)
2904 PyObject
*_res
= NULL
;
2906 if (!PyArg_ParseTuple(_args
, "l",
2909 SetTrackUsage(_self
->ob_itself
,
2916 static PyObject
*TrackObj_GetTrackDuration(TrackObject
*_self
, PyObject
*_args
)
2918 PyObject
*_res
= NULL
;
2920 if (!PyArg_ParseTuple(_args
, ""))
2922 _rv
= GetTrackDuration(_self
->ob_itself
);
2923 _res
= Py_BuildValue("l",
2928 static PyObject
*TrackObj_GetTrackOffset(TrackObject
*_self
, PyObject
*_args
)
2930 PyObject
*_res
= NULL
;
2932 if (!PyArg_ParseTuple(_args
, ""))
2934 _rv
= GetTrackOffset(_self
->ob_itself
);
2935 _res
= Py_BuildValue("l",
2940 static PyObject
*TrackObj_SetTrackOffset(TrackObject
*_self
, PyObject
*_args
)
2942 PyObject
*_res
= NULL
;
2943 TimeValue movieOffsetTime
;
2944 if (!PyArg_ParseTuple(_args
, "l",
2947 SetTrackOffset(_self
->ob_itself
,
2954 static PyObject
*TrackObj_GetTrackLayer(TrackObject
*_self
, PyObject
*_args
)
2956 PyObject
*_res
= NULL
;
2958 if (!PyArg_ParseTuple(_args
, ""))
2960 _rv
= GetTrackLayer(_self
->ob_itself
);
2961 _res
= Py_BuildValue("h",
2966 static PyObject
*TrackObj_SetTrackLayer(TrackObject
*_self
, PyObject
*_args
)
2968 PyObject
*_res
= NULL
;
2970 if (!PyArg_ParseTuple(_args
, "h",
2973 SetTrackLayer(_self
->ob_itself
,
2980 static PyObject
*TrackObj_GetTrackAlternate(TrackObject
*_self
, PyObject
*_args
)
2982 PyObject
*_res
= NULL
;
2984 if (!PyArg_ParseTuple(_args
, ""))
2986 _rv
= GetTrackAlternate(_self
->ob_itself
);
2987 _res
= Py_BuildValue("O&",
2992 static PyObject
*TrackObj_SetTrackAlternate(TrackObject
*_self
, PyObject
*_args
)
2994 PyObject
*_res
= NULL
;
2996 if (!PyArg_ParseTuple(_args
, "O&",
2997 TrackObj_Convert
, &alternateT
))
2999 SetTrackAlternate(_self
->ob_itself
,
3006 static PyObject
*TrackObj_GetTrackVolume(TrackObject
*_self
, PyObject
*_args
)
3008 PyObject
*_res
= NULL
;
3010 if (!PyArg_ParseTuple(_args
, ""))
3012 _rv
= GetTrackVolume(_self
->ob_itself
);
3013 _res
= Py_BuildValue("h",
3018 static PyObject
*TrackObj_SetTrackVolume(TrackObject
*_self
, PyObject
*_args
)
3020 PyObject
*_res
= NULL
;
3022 if (!PyArg_ParseTuple(_args
, "h",
3025 SetTrackVolume(_self
->ob_itself
,
3032 static PyObject
*TrackObj_GetTrackDimensions(TrackObject
*_self
, PyObject
*_args
)
3034 PyObject
*_res
= NULL
;
3037 if (!PyArg_ParseTuple(_args
, ""))
3039 GetTrackDimensions(_self
->ob_itself
,
3042 _res
= Py_BuildValue("O&O&",
3043 PyMac_BuildFixed
, width
,
3044 PyMac_BuildFixed
, height
);
3048 static PyObject
*TrackObj_SetTrackDimensions(TrackObject
*_self
, PyObject
*_args
)
3050 PyObject
*_res
= NULL
;
3053 if (!PyArg_ParseTuple(_args
, "O&O&",
3054 PyMac_GetFixed
, &width
,
3055 PyMac_GetFixed
, &height
))
3057 SetTrackDimensions(_self
->ob_itself
,
3065 static PyObject
*TrackObj_GetTrackUserData(TrackObject
*_self
, PyObject
*_args
)
3067 PyObject
*_res
= NULL
;
3069 if (!PyArg_ParseTuple(_args
, ""))
3071 _rv
= GetTrackUserData(_self
->ob_itself
);
3072 _res
= Py_BuildValue("O&",
3073 UserDataObj_New
, _rv
);
3077 static PyObject
*TrackObj_GetTrackSoundLocalizationSettings(TrackObject
*_self
, PyObject
*_args
)
3079 PyObject
*_res
= NULL
;
3082 if (!PyArg_ParseTuple(_args
, ""))
3084 _err
= GetTrackSoundLocalizationSettings(_self
->ob_itself
,
3086 if (_err
!= noErr
) return PyMac_Error(_err
);
3087 _res
= Py_BuildValue("O&",
3088 ResObj_New
, settings
);
3092 static PyObject
*TrackObj_SetTrackSoundLocalizationSettings(TrackObject
*_self
, PyObject
*_args
)
3094 PyObject
*_res
= NULL
;
3097 if (!PyArg_ParseTuple(_args
, "O&",
3098 ResObj_Convert
, &settings
))
3100 _err
= SetTrackSoundLocalizationSettings(_self
->ob_itself
,
3102 if (_err
!= noErr
) return PyMac_Error(_err
);
3108 static PyObject
*TrackObj_NewTrackMedia(TrackObject
*_self
, PyObject
*_args
)
3110 PyObject
*_res
= NULL
;
3113 TimeScale timeScale
;
3116 if (!PyArg_ParseTuple(_args
, "O&lO&O&",
3117 PyMac_GetOSType
, &mediaType
,
3119 ResObj_Convert
, &dataRef
,
3120 PyMac_GetOSType
, &dataRefType
))
3122 _rv
= NewTrackMedia(_self
->ob_itself
,
3127 _res
= Py_BuildValue("O&",
3132 static PyObject
*TrackObj_GetTrackMedia(TrackObject
*_self
, PyObject
*_args
)
3134 PyObject
*_res
= NULL
;
3136 if (!PyArg_ParseTuple(_args
, ""))
3138 _rv
= GetTrackMedia(_self
->ob_itself
);
3139 _res
= Py_BuildValue("O&",
3144 static PyObject
*TrackObj_InsertMediaIntoTrack(TrackObject
*_self
, PyObject
*_args
)
3146 PyObject
*_res
= NULL
;
3148 TimeValue trackStart
;
3149 TimeValue mediaTime
;
3150 TimeValue mediaDuration
;
3152 if (!PyArg_ParseTuple(_args
, "lllO&",
3156 PyMac_GetFixed
, &mediaRate
))
3158 _err
= InsertMediaIntoTrack(_self
->ob_itself
,
3163 if (_err
!= noErr
) return PyMac_Error(_err
);
3169 static PyObject
*TrackObj_InsertTrackSegment(TrackObject
*_self
, PyObject
*_args
)
3171 PyObject
*_res
= NULL
;
3175 TimeValue srcDuration
;
3177 if (!PyArg_ParseTuple(_args
, "O&lll",
3178 TrackObj_Convert
, &dstTrack
,
3183 _err
= InsertTrackSegment(_self
->ob_itself
,
3188 if (_err
!= noErr
) return PyMac_Error(_err
);
3194 static PyObject
*TrackObj_InsertEmptyTrackSegment(TrackObject
*_self
, PyObject
*_args
)
3196 PyObject
*_res
= NULL
;
3199 TimeValue dstDuration
;
3200 if (!PyArg_ParseTuple(_args
, "ll",
3204 _err
= InsertEmptyTrackSegment(_self
->ob_itself
,
3207 if (_err
!= noErr
) return PyMac_Error(_err
);
3213 static PyObject
*TrackObj_DeleteTrackSegment(TrackObject
*_self
, PyObject
*_args
)
3215 PyObject
*_res
= NULL
;
3217 TimeValue startTime
;
3219 if (!PyArg_ParseTuple(_args
, "ll",
3223 _err
= DeleteTrackSegment(_self
->ob_itself
,
3226 if (_err
!= noErr
) return PyMac_Error(_err
);
3232 static PyObject
*TrackObj_ScaleTrackSegment(TrackObject
*_self
, PyObject
*_args
)
3234 PyObject
*_res
= NULL
;
3236 TimeValue startTime
;
3237 TimeValue oldDuration
;
3238 TimeValue newDuration
;
3239 if (!PyArg_ParseTuple(_args
, "lll",
3244 _err
= ScaleTrackSegment(_self
->ob_itself
,
3248 if (_err
!= noErr
) return PyMac_Error(_err
);
3254 static PyObject
*TrackObj_IsScrapMovie(TrackObject
*_self
, PyObject
*_args
)
3256 PyObject
*_res
= NULL
;
3258 if (!PyArg_ParseTuple(_args
, ""))
3260 _rv
= IsScrapMovie(_self
->ob_itself
);
3261 _res
= Py_BuildValue("O&",
3266 static PyObject
*TrackObj_CopyTrackSettings(TrackObject
*_self
, PyObject
*_args
)
3268 PyObject
*_res
= NULL
;
3271 if (!PyArg_ParseTuple(_args
, "O&",
3272 TrackObj_Convert
, &dstTrack
))
3274 _err
= CopyTrackSettings(_self
->ob_itself
,
3276 if (_err
!= noErr
) return PyMac_Error(_err
);
3282 static PyObject
*TrackObj_AddEmptyTrackToMovie(TrackObject
*_self
, PyObject
*_args
)
3284 PyObject
*_res
= NULL
;
3290 if (!PyArg_ParseTuple(_args
, "O&O&O&",
3291 MovieObj_Convert
, &dstMovie
,
3292 ResObj_Convert
, &dataRef
,
3293 PyMac_GetOSType
, &dataRefType
))
3295 _err
= AddEmptyTrackToMovie(_self
->ob_itself
,
3300 if (_err
!= noErr
) return PyMac_Error(_err
);
3301 _res
= Py_BuildValue("O&",
3302 TrackObj_New
, dstTrack
);
3306 static PyObject
*TrackObj_AddTrackReference(TrackObject
*_self
, PyObject
*_args
)
3308 PyObject
*_res
= NULL
;
3313 if (!PyArg_ParseTuple(_args
, "O&O&",
3314 TrackObj_Convert
, &refTrack
,
3315 PyMac_GetOSType
, &refType
))
3317 _err
= AddTrackReference(_self
->ob_itself
,
3321 if (_err
!= noErr
) return PyMac_Error(_err
);
3322 _res
= Py_BuildValue("l",
3327 static PyObject
*TrackObj_DeleteTrackReference(TrackObject
*_self
, PyObject
*_args
)
3329 PyObject
*_res
= NULL
;
3333 if (!PyArg_ParseTuple(_args
, "O&l",
3334 PyMac_GetOSType
, &refType
,
3337 _err
= DeleteTrackReference(_self
->ob_itself
,
3340 if (_err
!= noErr
) return PyMac_Error(_err
);
3346 static PyObject
*TrackObj_SetTrackReference(TrackObject
*_self
, PyObject
*_args
)
3348 PyObject
*_res
= NULL
;
3353 if (!PyArg_ParseTuple(_args
, "O&O&l",
3354 TrackObj_Convert
, &refTrack
,
3355 PyMac_GetOSType
, &refType
,
3358 _err
= SetTrackReference(_self
->ob_itself
,
3362 if (_err
!= noErr
) return PyMac_Error(_err
);
3368 static PyObject
*TrackObj_GetTrackReference(TrackObject
*_self
, PyObject
*_args
)
3370 PyObject
*_res
= NULL
;
3374 if (!PyArg_ParseTuple(_args
, "O&l",
3375 PyMac_GetOSType
, &refType
,
3378 _rv
= GetTrackReference(_self
->ob_itself
,
3381 _res
= Py_BuildValue("O&",
3386 static PyObject
*TrackObj_GetNextTrackReferenceType(TrackObject
*_self
, PyObject
*_args
)
3388 PyObject
*_res
= NULL
;
3391 if (!PyArg_ParseTuple(_args
, "O&",
3392 PyMac_GetOSType
, &refType
))
3394 _rv
= GetNextTrackReferenceType(_self
->ob_itself
,
3396 _res
= Py_BuildValue("O&",
3397 PyMac_BuildOSType
, _rv
);
3401 static PyObject
*TrackObj_GetTrackReferenceCount(TrackObject
*_self
, PyObject
*_args
)
3403 PyObject
*_res
= NULL
;
3406 if (!PyArg_ParseTuple(_args
, "O&",
3407 PyMac_GetOSType
, &refType
))
3409 _rv
= GetTrackReferenceCount(_self
->ob_itself
,
3411 _res
= Py_BuildValue("l",
3416 static PyObject
*TrackObj_GetTrackEditRate(TrackObject
*_self
, PyObject
*_args
)
3418 PyObject
*_res
= NULL
;
3421 if (!PyArg_ParseTuple(_args
, "l",
3424 _rv
= GetTrackEditRate(_self
->ob_itself
,
3426 _res
= Py_BuildValue("O&",
3427 PyMac_BuildFixed
, _rv
);
3431 static PyObject
*TrackObj_GetTrackDataSize(TrackObject
*_self
, PyObject
*_args
)
3433 PyObject
*_res
= NULL
;
3435 TimeValue startTime
;
3437 if (!PyArg_ParseTuple(_args
, "ll",
3441 _rv
= GetTrackDataSize(_self
->ob_itself
,
3444 _res
= Py_BuildValue("l",
3449 static PyObject
*TrackObj_GetTrackDataSize64(TrackObject
*_self
, PyObject
*_args
)
3451 PyObject
*_res
= NULL
;
3453 TimeValue startTime
;
3456 if (!PyArg_ParseTuple(_args
, "ll",
3460 _err
= GetTrackDataSize64(_self
->ob_itself
,
3464 if (_err
!= noErr
) return PyMac_Error(_err
);
3465 _res
= Py_BuildValue("O&",
3466 PyMac_Buildwide
, dataSize
);
3470 static PyObject
*TrackObj_PtInTrack(TrackObject
*_self
, PyObject
*_args
)
3472 PyObject
*_res
= NULL
;
3475 if (!PyArg_ParseTuple(_args
, "O&",
3476 PyMac_GetPoint
, &pt
))
3478 _rv
= PtInTrack(_self
->ob_itself
,
3480 _res
= Py_BuildValue("b",
3485 static PyObject
*TrackObj_GetTrackNextInterestingTime(TrackObject
*_self
, PyObject
*_args
)
3487 PyObject
*_res
= NULL
;
3488 short interestingTimeFlags
;
3491 TimeValue interestingTime
;
3492 TimeValue interestingDuration
;
3493 if (!PyArg_ParseTuple(_args
, "hlO&",
3494 &interestingTimeFlags
,
3496 PyMac_GetFixed
, &rate
))
3498 GetTrackNextInterestingTime(_self
->ob_itself
,
3499 interestingTimeFlags
,
3503 &interestingDuration
);
3504 _res
= Py_BuildValue("ll",
3506 interestingDuration
);
3510 static PyObject
*TrackObj_GetTrackSegmentDisplayBoundsRgn(TrackObject
*_self
, PyObject
*_args
)
3512 PyObject
*_res
= NULL
;
3516 if (!PyArg_ParseTuple(_args
, "ll",
3520 _rv
= GetTrackSegmentDisplayBoundsRgn(_self
->ob_itself
,
3523 _res
= Py_BuildValue("O&",
3528 static PyObject
*TrackObj_GetTrackStatus(TrackObject
*_self
, PyObject
*_args
)
3530 PyObject
*_res
= NULL
;
3531 ComponentResult _rv
;
3532 if (!PyArg_ParseTuple(_args
, ""))
3534 _rv
= GetTrackStatus(_self
->ob_itself
);
3535 _res
= Py_BuildValue("l",
3540 static PyObject
*TrackObj_SetTrackLoadSettings(TrackObject
*_self
, PyObject
*_args
)
3542 PyObject
*_res
= NULL
;
3543 TimeValue preloadTime
;
3544 TimeValue preloadDuration
;
3547 if (!PyArg_ParseTuple(_args
, "llll",
3553 SetTrackLoadSettings(_self
->ob_itself
,
3563 static PyObject
*TrackObj_GetTrackLoadSettings(TrackObject
*_self
, PyObject
*_args
)
3565 PyObject
*_res
= NULL
;
3566 TimeValue preloadTime
;
3567 TimeValue preloadDuration
;
3570 if (!PyArg_ParseTuple(_args
, ""))
3572 GetTrackLoadSettings(_self
->ob_itself
,
3577 _res
= Py_BuildValue("llll",
3585 static PyMethodDef TrackObj_methods
[] = {
3586 {"LoadTrackIntoRam", (PyCFunction
)TrackObj_LoadTrackIntoRam
, 1,
3587 "(TimeValue time, TimeValue duration, long flags) -> None"},
3588 {"GetTrackPict", (PyCFunction
)TrackObj_GetTrackPict
, 1,
3589 "(TimeValue time) -> (PicHandle _rv)"},
3590 {"GetTrackClipRgn", (PyCFunction
)TrackObj_GetTrackClipRgn
, 1,
3591 "() -> (RgnHandle _rv)"},
3592 {"SetTrackClipRgn", (PyCFunction
)TrackObj_SetTrackClipRgn
, 1,
3593 "(RgnHandle theClip) -> None"},
3594 {"GetTrackDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackDisplayBoundsRgn
, 1,
3595 "() -> (RgnHandle _rv)"},
3596 {"GetTrackMovieBoundsRgn", (PyCFunction
)TrackObj_GetTrackMovieBoundsRgn
, 1,
3597 "() -> (RgnHandle _rv)"},
3598 {"GetTrackBoundsRgn", (PyCFunction
)TrackObj_GetTrackBoundsRgn
, 1,
3599 "() -> (RgnHandle _rv)"},
3600 {"GetTrackMatte", (PyCFunction
)TrackObj_GetTrackMatte
, 1,
3601 "() -> (PixMapHandle _rv)"},
3602 {"SetTrackMatte", (PyCFunction
)TrackObj_SetTrackMatte
, 1,
3603 "(PixMapHandle theMatte) -> None"},
3604 {"GetTrackID", (PyCFunction
)TrackObj_GetTrackID
, 1,
3605 "() -> (long _rv)"},
3606 {"GetTrackMovie", (PyCFunction
)TrackObj_GetTrackMovie
, 1,
3607 "() -> (Movie _rv)"},
3608 {"GetTrackCreationTime", (PyCFunction
)TrackObj_GetTrackCreationTime
, 1,
3609 "() -> (unsigned long _rv)"},
3610 {"GetTrackModificationTime", (PyCFunction
)TrackObj_GetTrackModificationTime
, 1,
3611 "() -> (unsigned long _rv)"},
3612 {"GetTrackEnabled", (PyCFunction
)TrackObj_GetTrackEnabled
, 1,
3613 "() -> (Boolean _rv)"},
3614 {"SetTrackEnabled", (PyCFunction
)TrackObj_SetTrackEnabled
, 1,
3615 "(Boolean isEnabled) -> None"},
3616 {"GetTrackUsage", (PyCFunction
)TrackObj_GetTrackUsage
, 1,
3617 "() -> (long _rv)"},
3618 {"SetTrackUsage", (PyCFunction
)TrackObj_SetTrackUsage
, 1,
3619 "(long usage) -> None"},
3620 {"GetTrackDuration", (PyCFunction
)TrackObj_GetTrackDuration
, 1,
3621 "() -> (TimeValue _rv)"},
3622 {"GetTrackOffset", (PyCFunction
)TrackObj_GetTrackOffset
, 1,
3623 "() -> (TimeValue _rv)"},
3624 {"SetTrackOffset", (PyCFunction
)TrackObj_SetTrackOffset
, 1,
3625 "(TimeValue movieOffsetTime) -> None"},
3626 {"GetTrackLayer", (PyCFunction
)TrackObj_GetTrackLayer
, 1,
3627 "() -> (short _rv)"},
3628 {"SetTrackLayer", (PyCFunction
)TrackObj_SetTrackLayer
, 1,
3629 "(short layer) -> None"},
3630 {"GetTrackAlternate", (PyCFunction
)TrackObj_GetTrackAlternate
, 1,
3631 "() -> (Track _rv)"},
3632 {"SetTrackAlternate", (PyCFunction
)TrackObj_SetTrackAlternate
, 1,
3633 "(Track alternateT) -> None"},
3634 {"GetTrackVolume", (PyCFunction
)TrackObj_GetTrackVolume
, 1,
3635 "() -> (short _rv)"},
3636 {"SetTrackVolume", (PyCFunction
)TrackObj_SetTrackVolume
, 1,
3637 "(short volume) -> None"},
3638 {"GetTrackDimensions", (PyCFunction
)TrackObj_GetTrackDimensions
, 1,
3639 "() -> (Fixed width, Fixed height)"},
3640 {"SetTrackDimensions", (PyCFunction
)TrackObj_SetTrackDimensions
, 1,
3641 "(Fixed width, Fixed height) -> None"},
3642 {"GetTrackUserData", (PyCFunction
)TrackObj_GetTrackUserData
, 1,
3643 "() -> (UserData _rv)"},
3644 {"GetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_GetTrackSoundLocalizationSettings
, 1,
3645 "() -> (Handle settings)"},
3646 {"SetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_SetTrackSoundLocalizationSettings
, 1,
3647 "(Handle settings) -> None"},
3648 {"NewTrackMedia", (PyCFunction
)TrackObj_NewTrackMedia
, 1,
3649 "(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)"},
3650 {"GetTrackMedia", (PyCFunction
)TrackObj_GetTrackMedia
, 1,
3651 "() -> (Media _rv)"},
3652 {"InsertMediaIntoTrack", (PyCFunction
)TrackObj_InsertMediaIntoTrack
, 1,
3653 "(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None"},
3654 {"InsertTrackSegment", (PyCFunction
)TrackObj_InsertTrackSegment
, 1,
3655 "(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
3656 {"InsertEmptyTrackSegment", (PyCFunction
)TrackObj_InsertEmptyTrackSegment
, 1,
3657 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
3658 {"DeleteTrackSegment", (PyCFunction
)TrackObj_DeleteTrackSegment
, 1,
3659 "(TimeValue startTime, TimeValue duration) -> None"},
3660 {"ScaleTrackSegment", (PyCFunction
)TrackObj_ScaleTrackSegment
, 1,
3661 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
3662 {"IsScrapMovie", (PyCFunction
)TrackObj_IsScrapMovie
, 1,
3663 "() -> (Component _rv)"},
3664 {"CopyTrackSettings", (PyCFunction
)TrackObj_CopyTrackSettings
, 1,
3665 "(Track dstTrack) -> None"},
3666 {"AddEmptyTrackToMovie", (PyCFunction
)TrackObj_AddEmptyTrackToMovie
, 1,
3667 "(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)"},
3668 {"AddTrackReference", (PyCFunction
)TrackObj_AddTrackReference
, 1,
3669 "(Track refTrack, OSType refType) -> (long addedIndex)"},
3670 {"DeleteTrackReference", (PyCFunction
)TrackObj_DeleteTrackReference
, 1,
3671 "(OSType refType, long index) -> None"},
3672 {"SetTrackReference", (PyCFunction
)TrackObj_SetTrackReference
, 1,
3673 "(Track refTrack, OSType refType, long index) -> None"},
3674 {"GetTrackReference", (PyCFunction
)TrackObj_GetTrackReference
, 1,
3675 "(OSType refType, long index) -> (Track _rv)"},
3676 {"GetNextTrackReferenceType", (PyCFunction
)TrackObj_GetNextTrackReferenceType
, 1,
3677 "(OSType refType) -> (OSType _rv)"},
3678 {"GetTrackReferenceCount", (PyCFunction
)TrackObj_GetTrackReferenceCount
, 1,
3679 "(OSType refType) -> (long _rv)"},
3680 {"GetTrackEditRate", (PyCFunction
)TrackObj_GetTrackEditRate
, 1,
3681 "(TimeValue atTime) -> (Fixed _rv)"},
3682 {"GetTrackDataSize", (PyCFunction
)TrackObj_GetTrackDataSize
, 1,
3683 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
3684 {"GetTrackDataSize64", (PyCFunction
)TrackObj_GetTrackDataSize64
, 1,
3685 "(TimeValue startTime, TimeValue duration) -> (wide dataSize)"},
3686 {"PtInTrack", (PyCFunction
)TrackObj_PtInTrack
, 1,
3687 "(Point pt) -> (Boolean _rv)"},
3688 {"GetTrackNextInterestingTime", (PyCFunction
)TrackObj_GetTrackNextInterestingTime
, 1,
3689 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
3690 {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackSegmentDisplayBoundsRgn
, 1,
3691 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
3692 {"GetTrackStatus", (PyCFunction
)TrackObj_GetTrackStatus
, 1,
3693 "() -> (ComponentResult _rv)"},
3694 {"SetTrackLoadSettings", (PyCFunction
)TrackObj_SetTrackLoadSettings
, 1,
3695 "(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None"},
3696 {"GetTrackLoadSettings", (PyCFunction
)TrackObj_GetTrackLoadSettings
, 1,
3697 "() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)"},
3701 PyMethodChain TrackObj_chain
= { TrackObj_methods
, NULL
};
3703 static PyObject
*TrackObj_getattr(TrackObject
*self
, char *name
)
3705 return Py_FindMethodInChain(&TrackObj_chain
, (PyObject
*)self
, name
);
3708 #define TrackObj_setattr NULL
3710 #define TrackObj_compare NULL
3712 #define TrackObj_repr NULL
3714 #define TrackObj_hash NULL
3716 PyTypeObject Track_Type
= {
3717 PyObject_HEAD_INIT(&PyType_Type
)
3719 "Track", /*tp_name*/
3720 sizeof(TrackObject
), /*tp_basicsize*/
3723 (destructor
) TrackObj_dealloc
, /*tp_dealloc*/
3725 (getattrfunc
) TrackObj_getattr
, /*tp_getattr*/
3726 (setattrfunc
) TrackObj_setattr
, /*tp_setattr*/
3727 (cmpfunc
) TrackObj_compare
, /*tp_compare*/
3728 (reprfunc
) TrackObj_repr
, /*tp_repr*/
3729 (PyNumberMethods
*)0, /* tp_as_number */
3730 (PySequenceMethods
*)0, /* tp_as_sequence */
3731 (PyMappingMethods
*)0, /* tp_as_mapping */
3732 (hashfunc
) TrackObj_hash
, /*tp_hash*/
3735 /* --------------------- End object type Track ---------------------- */
3738 /* ----------------------- Object type Movie ------------------------ */
3740 PyTypeObject Movie_Type
;
3742 #define MovieObj_Check(x) ((x)->ob_type == &Movie_Type)
3744 typedef struct MovieObject
{
3749 PyObject
*MovieObj_New(Movie itself
)
3752 if (itself
== NULL
) {
3753 PyErr_SetString(Qt_Error
,"Cannot create null Movie");
3756 it
= PyObject_NEW(MovieObject
, &Movie_Type
);
3757 if (it
== NULL
) return NULL
;
3758 it
->ob_itself
= itself
;
3759 return (PyObject
*)it
;
3761 MovieObj_Convert(PyObject
*v
, Movie
*p_itself
)
3763 if (!MovieObj_Check(v
))
3765 PyErr_SetString(PyExc_TypeError
, "Movie required");
3768 *p_itself
= ((MovieObject
*)v
)->ob_itself
;
3772 static void MovieObj_dealloc(MovieObject
*self
)
3774 DisposeMovie(self
->ob_itself
);
3778 static PyObject
*MovieObj_MoviesTask(MovieObject
*_self
, PyObject
*_args
)
3780 PyObject
*_res
= NULL
;
3781 long maxMilliSecToUse
;
3782 if (!PyArg_ParseTuple(_args
, "l",
3785 MoviesTask(_self
->ob_itself
,
3792 static PyObject
*MovieObj_PrerollMovie(MovieObject
*_self
, PyObject
*_args
)
3794 PyObject
*_res
= NULL
;
3798 if (!PyArg_ParseTuple(_args
, "lO&",
3800 PyMac_GetFixed
, &Rate
))
3802 _err
= PrerollMovie(_self
->ob_itself
,
3805 if (_err
!= noErr
) return PyMac_Error(_err
);
3811 static PyObject
*MovieObj_AbortPrePrerollMovie(MovieObject
*_self
, PyObject
*_args
)
3813 PyObject
*_res
= NULL
;
3815 if (!PyArg_ParseTuple(_args
, "h",
3818 AbortPrePrerollMovie(_self
->ob_itself
,
3825 static PyObject
*MovieObj_LoadMovieIntoRam(MovieObject
*_self
, PyObject
*_args
)
3827 PyObject
*_res
= NULL
;
3832 if (!PyArg_ParseTuple(_args
, "lll",
3837 _err
= LoadMovieIntoRam(_self
->ob_itself
,
3841 if (_err
!= noErr
) return PyMac_Error(_err
);
3847 static PyObject
*MovieObj_SetMovieActive(MovieObject
*_self
, PyObject
*_args
)
3849 PyObject
*_res
= NULL
;
3851 if (!PyArg_ParseTuple(_args
, "b",
3854 SetMovieActive(_self
->ob_itself
,
3861 static PyObject
*MovieObj_GetMovieActive(MovieObject
*_self
, PyObject
*_args
)
3863 PyObject
*_res
= NULL
;
3865 if (!PyArg_ParseTuple(_args
, ""))
3867 _rv
= GetMovieActive(_self
->ob_itself
);
3868 _res
= Py_BuildValue("b",
3873 static PyObject
*MovieObj_StartMovie(MovieObject
*_self
, PyObject
*_args
)
3875 PyObject
*_res
= NULL
;
3876 if (!PyArg_ParseTuple(_args
, ""))
3878 StartMovie(_self
->ob_itself
);
3884 static PyObject
*MovieObj_StopMovie(MovieObject
*_self
, PyObject
*_args
)
3886 PyObject
*_res
= NULL
;
3887 if (!PyArg_ParseTuple(_args
, ""))
3889 StopMovie(_self
->ob_itself
);
3895 static PyObject
*MovieObj_GoToBeginningOfMovie(MovieObject
*_self
, PyObject
*_args
)
3897 PyObject
*_res
= NULL
;
3898 if (!PyArg_ParseTuple(_args
, ""))
3900 GoToBeginningOfMovie(_self
->ob_itself
);
3906 static PyObject
*MovieObj_GoToEndOfMovie(MovieObject
*_self
, PyObject
*_args
)
3908 PyObject
*_res
= NULL
;
3909 if (!PyArg_ParseTuple(_args
, ""))
3911 GoToEndOfMovie(_self
->ob_itself
);
3917 static PyObject
*MovieObj_IsMovieDone(MovieObject
*_self
, PyObject
*_args
)
3919 PyObject
*_res
= NULL
;
3921 if (!PyArg_ParseTuple(_args
, ""))
3923 _rv
= IsMovieDone(_self
->ob_itself
);
3924 _res
= Py_BuildValue("b",
3929 static PyObject
*MovieObj_GetMoviePreviewMode(MovieObject
*_self
, PyObject
*_args
)
3931 PyObject
*_res
= NULL
;
3933 if (!PyArg_ParseTuple(_args
, ""))
3935 _rv
= GetMoviePreviewMode(_self
->ob_itself
);
3936 _res
= Py_BuildValue("b",
3941 static PyObject
*MovieObj_SetMoviePreviewMode(MovieObject
*_self
, PyObject
*_args
)
3943 PyObject
*_res
= NULL
;
3945 if (!PyArg_ParseTuple(_args
, "b",
3948 SetMoviePreviewMode(_self
->ob_itself
,
3955 static PyObject
*MovieObj_ShowMoviePoster(MovieObject
*_self
, PyObject
*_args
)
3957 PyObject
*_res
= NULL
;
3958 if (!PyArg_ParseTuple(_args
, ""))
3960 ShowMoviePoster(_self
->ob_itself
);
3966 static PyObject
*MovieObj_GetMovieTimeBase(MovieObject
*_self
, PyObject
*_args
)
3968 PyObject
*_res
= NULL
;
3970 if (!PyArg_ParseTuple(_args
, ""))
3972 _rv
= GetMovieTimeBase(_self
->ob_itself
);
3973 _res
= Py_BuildValue("O&",
3974 TimeBaseObj_New
, _rv
);
3978 static PyObject
*MovieObj_SetMovieMasterTimeBase(MovieObject
*_self
, PyObject
*_args
)
3980 PyObject
*_res
= NULL
;
3982 TimeRecord slaveZero
;
3983 if (!PyArg_ParseTuple(_args
, "O&O&",
3984 TimeBaseObj_Convert
, &tb
,
3985 QtTimeRecord_Convert
, &slaveZero
))
3987 SetMovieMasterTimeBase(_self
->ob_itself
,
3995 static PyObject
*MovieObj_SetMovieMasterClock(MovieObject
*_self
, PyObject
*_args
)
3997 PyObject
*_res
= NULL
;
3998 Component clockMeister
;
3999 TimeRecord slaveZero
;
4000 if (!PyArg_ParseTuple(_args
, "O&O&",
4001 CmpObj_Convert
, &clockMeister
,
4002 QtTimeRecord_Convert
, &slaveZero
))
4004 SetMovieMasterClock(_self
->ob_itself
,
4012 static PyObject
*MovieObj_GetMovieGWorld(MovieObject
*_self
, PyObject
*_args
)
4014 PyObject
*_res
= NULL
;
4017 if (!PyArg_ParseTuple(_args
, ""))
4019 GetMovieGWorld(_self
->ob_itself
,
4022 _res
= Py_BuildValue("O&O&",
4024 OptResObj_New
, gdh
);
4028 static PyObject
*MovieObj_SetMovieGWorld(MovieObject
*_self
, PyObject
*_args
)
4030 PyObject
*_res
= NULL
;
4033 if (!PyArg_ParseTuple(_args
, "O&O&",
4034 GrafObj_Convert
, &port
,
4035 OptResObj_Convert
, &gdh
))
4037 SetMovieGWorld(_self
->ob_itself
,
4045 static PyObject
*MovieObj_GetMovieNaturalBoundsRect(MovieObject
*_self
, PyObject
*_args
)
4047 PyObject
*_res
= NULL
;
4049 if (!PyArg_ParseTuple(_args
, ""))
4051 GetMovieNaturalBoundsRect(_self
->ob_itself
,
4053 _res
= Py_BuildValue("O&",
4054 PyMac_BuildRect
, &naturalBounds
);
4058 static PyObject
*MovieObj_GetNextTrackForCompositing(MovieObject
*_self
, PyObject
*_args
)
4060 PyObject
*_res
= NULL
;
4063 if (!PyArg_ParseTuple(_args
, "O&",
4064 TrackObj_Convert
, &theTrack
))
4066 _rv
= GetNextTrackForCompositing(_self
->ob_itself
,
4068 _res
= Py_BuildValue("O&",
4073 static PyObject
*MovieObj_GetPrevTrackForCompositing(MovieObject
*_self
, PyObject
*_args
)
4075 PyObject
*_res
= NULL
;
4078 if (!PyArg_ParseTuple(_args
, "O&",
4079 TrackObj_Convert
, &theTrack
))
4081 _rv
= GetPrevTrackForCompositing(_self
->ob_itself
,
4083 _res
= Py_BuildValue("O&",
4088 static PyObject
*MovieObj_GetMoviePict(MovieObject
*_self
, PyObject
*_args
)
4090 PyObject
*_res
= NULL
;
4093 if (!PyArg_ParseTuple(_args
, "l",
4096 _rv
= GetMoviePict(_self
->ob_itself
,
4098 _res
= Py_BuildValue("O&",
4103 static PyObject
*MovieObj_GetMoviePosterPict(MovieObject
*_self
, PyObject
*_args
)
4105 PyObject
*_res
= NULL
;
4107 if (!PyArg_ParseTuple(_args
, ""))
4109 _rv
= GetMoviePosterPict(_self
->ob_itself
);
4110 _res
= Py_BuildValue("O&",
4115 static PyObject
*MovieObj_UpdateMovie(MovieObject
*_self
, PyObject
*_args
)
4117 PyObject
*_res
= NULL
;
4119 if (!PyArg_ParseTuple(_args
, ""))
4121 _err
= UpdateMovie(_self
->ob_itself
);
4122 if (_err
!= noErr
) return PyMac_Error(_err
);
4128 static PyObject
*MovieObj_InvalidateMovieRegion(MovieObject
*_self
, PyObject
*_args
)
4130 PyObject
*_res
= NULL
;
4132 RgnHandle invalidRgn
;
4133 if (!PyArg_ParseTuple(_args
, "O&",
4134 ResObj_Convert
, &invalidRgn
))
4136 _err
= InvalidateMovieRegion(_self
->ob_itself
,
4138 if (_err
!= noErr
) return PyMac_Error(_err
);
4144 static PyObject
*MovieObj_GetMovieBox(MovieObject
*_self
, PyObject
*_args
)
4146 PyObject
*_res
= NULL
;
4148 if (!PyArg_ParseTuple(_args
, ""))
4150 GetMovieBox(_self
->ob_itself
,
4152 _res
= Py_BuildValue("O&",
4153 PyMac_BuildRect
, &boxRect
);
4157 static PyObject
*MovieObj_SetMovieBox(MovieObject
*_self
, PyObject
*_args
)
4159 PyObject
*_res
= NULL
;
4161 if (!PyArg_ParseTuple(_args
, "O&",
4162 PyMac_GetRect
, &boxRect
))
4164 SetMovieBox(_self
->ob_itself
,
4171 static PyObject
*MovieObj_GetMovieDisplayClipRgn(MovieObject
*_self
, PyObject
*_args
)
4173 PyObject
*_res
= NULL
;
4175 if (!PyArg_ParseTuple(_args
, ""))
4177 _rv
= GetMovieDisplayClipRgn(_self
->ob_itself
);
4178 _res
= Py_BuildValue("O&",
4183 static PyObject
*MovieObj_SetMovieDisplayClipRgn(MovieObject
*_self
, PyObject
*_args
)
4185 PyObject
*_res
= NULL
;
4187 if (!PyArg_ParseTuple(_args
, "O&",
4188 ResObj_Convert
, &theClip
))
4190 SetMovieDisplayClipRgn(_self
->ob_itself
,
4197 static PyObject
*MovieObj_GetMovieClipRgn(MovieObject
*_self
, PyObject
*_args
)
4199 PyObject
*_res
= NULL
;
4201 if (!PyArg_ParseTuple(_args
, ""))
4203 _rv
= GetMovieClipRgn(_self
->ob_itself
);
4204 _res
= Py_BuildValue("O&",
4209 static PyObject
*MovieObj_SetMovieClipRgn(MovieObject
*_self
, PyObject
*_args
)
4211 PyObject
*_res
= NULL
;
4213 if (!PyArg_ParseTuple(_args
, "O&",
4214 ResObj_Convert
, &theClip
))
4216 SetMovieClipRgn(_self
->ob_itself
,
4223 static PyObject
*MovieObj_GetMovieDisplayBoundsRgn(MovieObject
*_self
, PyObject
*_args
)
4225 PyObject
*_res
= NULL
;
4227 if (!PyArg_ParseTuple(_args
, ""))
4229 _rv
= GetMovieDisplayBoundsRgn(_self
->ob_itself
);
4230 _res
= Py_BuildValue("O&",
4235 static PyObject
*MovieObj_GetMovieBoundsRgn(MovieObject
*_self
, PyObject
*_args
)
4237 PyObject
*_res
= NULL
;
4239 if (!PyArg_ParseTuple(_args
, ""))
4241 _rv
= GetMovieBoundsRgn(_self
->ob_itself
);
4242 _res
= Py_BuildValue("O&",
4247 static PyObject
*MovieObj_PutMovieIntoHandle(MovieObject
*_self
, PyObject
*_args
)
4249 PyObject
*_res
= NULL
;
4252 if (!PyArg_ParseTuple(_args
, "O&",
4253 ResObj_Convert
, &publicMovie
))
4255 _err
= PutMovieIntoHandle(_self
->ob_itself
,
4257 if (_err
!= noErr
) return PyMac_Error(_err
);
4263 static PyObject
*MovieObj_PutMovieIntoDataFork(MovieObject
*_self
, PyObject
*_args
)
4265 PyObject
*_res
= NULL
;
4270 if (!PyArg_ParseTuple(_args
, "hll",
4275 _err
= PutMovieIntoDataFork(_self
->ob_itself
,
4279 if (_err
!= noErr
) return PyMac_Error(_err
);
4285 static PyObject
*MovieObj_PutMovieIntoDataFork64(MovieObject
*_self
, PyObject
*_args
)
4287 PyObject
*_res
= NULL
;
4291 unsigned long maxSize
;
4292 if (!PyArg_ParseTuple(_args
, "lO&l",
4294 PyMac_Getwide
, &offset
,
4297 _err
= PutMovieIntoDataFork64(_self
->ob_itself
,
4301 if (_err
!= noErr
) return PyMac_Error(_err
);
4307 static PyObject
*MovieObj_GetMovieCreationTime(MovieObject
*_self
, PyObject
*_args
)
4309 PyObject
*_res
= NULL
;
4311 if (!PyArg_ParseTuple(_args
, ""))
4313 _rv
= GetMovieCreationTime(_self
->ob_itself
);
4314 _res
= Py_BuildValue("l",
4319 static PyObject
*MovieObj_GetMovieModificationTime(MovieObject
*_self
, PyObject
*_args
)
4321 PyObject
*_res
= NULL
;
4323 if (!PyArg_ParseTuple(_args
, ""))
4325 _rv
= GetMovieModificationTime(_self
->ob_itself
);
4326 _res
= Py_BuildValue("l",
4331 static PyObject
*MovieObj_GetMovieTimeScale(MovieObject
*_self
, PyObject
*_args
)
4333 PyObject
*_res
= NULL
;
4335 if (!PyArg_ParseTuple(_args
, ""))
4337 _rv
= GetMovieTimeScale(_self
->ob_itself
);
4338 _res
= Py_BuildValue("l",
4343 static PyObject
*MovieObj_SetMovieTimeScale(MovieObject
*_self
, PyObject
*_args
)
4345 PyObject
*_res
= NULL
;
4346 TimeScale timeScale
;
4347 if (!PyArg_ParseTuple(_args
, "l",
4350 SetMovieTimeScale(_self
->ob_itself
,
4357 static PyObject
*MovieObj_GetMovieDuration(MovieObject
*_self
, PyObject
*_args
)
4359 PyObject
*_res
= NULL
;
4361 if (!PyArg_ParseTuple(_args
, ""))
4363 _rv
= GetMovieDuration(_self
->ob_itself
);
4364 _res
= Py_BuildValue("l",
4369 static PyObject
*MovieObj_GetMovieRate(MovieObject
*_self
, PyObject
*_args
)
4371 PyObject
*_res
= NULL
;
4373 if (!PyArg_ParseTuple(_args
, ""))
4375 _rv
= GetMovieRate(_self
->ob_itself
);
4376 _res
= Py_BuildValue("O&",
4377 PyMac_BuildFixed
, _rv
);
4381 static PyObject
*MovieObj_SetMovieRate(MovieObject
*_self
, PyObject
*_args
)
4383 PyObject
*_res
= NULL
;
4385 if (!PyArg_ParseTuple(_args
, "O&",
4386 PyMac_GetFixed
, &rate
))
4388 SetMovieRate(_self
->ob_itself
,
4395 static PyObject
*MovieObj_GetMoviePreferredRate(MovieObject
*_self
, PyObject
*_args
)
4397 PyObject
*_res
= NULL
;
4399 if (!PyArg_ParseTuple(_args
, ""))
4401 _rv
= GetMoviePreferredRate(_self
->ob_itself
);
4402 _res
= Py_BuildValue("O&",
4403 PyMac_BuildFixed
, _rv
);
4407 static PyObject
*MovieObj_SetMoviePreferredRate(MovieObject
*_self
, PyObject
*_args
)
4409 PyObject
*_res
= NULL
;
4411 if (!PyArg_ParseTuple(_args
, "O&",
4412 PyMac_GetFixed
, &rate
))
4414 SetMoviePreferredRate(_self
->ob_itself
,
4421 static PyObject
*MovieObj_GetMoviePreferredVolume(MovieObject
*_self
, PyObject
*_args
)
4423 PyObject
*_res
= NULL
;
4425 if (!PyArg_ParseTuple(_args
, ""))
4427 _rv
= GetMoviePreferredVolume(_self
->ob_itself
);
4428 _res
= Py_BuildValue("h",
4433 static PyObject
*MovieObj_SetMoviePreferredVolume(MovieObject
*_self
, PyObject
*_args
)
4435 PyObject
*_res
= NULL
;
4437 if (!PyArg_ParseTuple(_args
, "h",
4440 SetMoviePreferredVolume(_self
->ob_itself
,
4447 static PyObject
*MovieObj_GetMovieVolume(MovieObject
*_self
, PyObject
*_args
)
4449 PyObject
*_res
= NULL
;
4451 if (!PyArg_ParseTuple(_args
, ""))
4453 _rv
= GetMovieVolume(_self
->ob_itself
);
4454 _res
= Py_BuildValue("h",
4459 static PyObject
*MovieObj_SetMovieVolume(MovieObject
*_self
, PyObject
*_args
)
4461 PyObject
*_res
= NULL
;
4463 if (!PyArg_ParseTuple(_args
, "h",
4466 SetMovieVolume(_self
->ob_itself
,
4473 static PyObject
*MovieObj_GetMoviePreviewTime(MovieObject
*_self
, PyObject
*_args
)
4475 PyObject
*_res
= NULL
;
4476 TimeValue previewTime
;
4477 TimeValue previewDuration
;
4478 if (!PyArg_ParseTuple(_args
, ""))
4480 GetMoviePreviewTime(_self
->ob_itself
,
4483 _res
= Py_BuildValue("ll",
4489 static PyObject
*MovieObj_SetMoviePreviewTime(MovieObject
*_self
, PyObject
*_args
)
4491 PyObject
*_res
= NULL
;
4492 TimeValue previewTime
;
4493 TimeValue previewDuration
;
4494 if (!PyArg_ParseTuple(_args
, "ll",
4498 SetMoviePreviewTime(_self
->ob_itself
,
4506 static PyObject
*MovieObj_GetMoviePosterTime(MovieObject
*_self
, PyObject
*_args
)
4508 PyObject
*_res
= NULL
;
4510 if (!PyArg_ParseTuple(_args
, ""))
4512 _rv
= GetMoviePosterTime(_self
->ob_itself
);
4513 _res
= Py_BuildValue("l",
4518 static PyObject
*MovieObj_SetMoviePosterTime(MovieObject
*_self
, PyObject
*_args
)
4520 PyObject
*_res
= NULL
;
4521 TimeValue posterTime
;
4522 if (!PyArg_ParseTuple(_args
, "l",
4525 SetMoviePosterTime(_self
->ob_itself
,
4532 static PyObject
*MovieObj_GetMovieSelection(MovieObject
*_self
, PyObject
*_args
)
4534 PyObject
*_res
= NULL
;
4535 TimeValue selectionTime
;
4536 TimeValue selectionDuration
;
4537 if (!PyArg_ParseTuple(_args
, ""))
4539 GetMovieSelection(_self
->ob_itself
,
4541 &selectionDuration
);
4542 _res
= Py_BuildValue("ll",
4548 static PyObject
*MovieObj_SetMovieSelection(MovieObject
*_self
, PyObject
*_args
)
4550 PyObject
*_res
= NULL
;
4551 TimeValue selectionTime
;
4552 TimeValue selectionDuration
;
4553 if (!PyArg_ParseTuple(_args
, "ll",
4555 &selectionDuration
))
4557 SetMovieSelection(_self
->ob_itself
,
4565 static PyObject
*MovieObj_SetMovieActiveSegment(MovieObject
*_self
, PyObject
*_args
)
4567 PyObject
*_res
= NULL
;
4568 TimeValue startTime
;
4570 if (!PyArg_ParseTuple(_args
, "ll",
4574 SetMovieActiveSegment(_self
->ob_itself
,
4582 static PyObject
*MovieObj_GetMovieActiveSegment(MovieObject
*_self
, PyObject
*_args
)
4584 PyObject
*_res
= NULL
;
4585 TimeValue startTime
;
4587 if (!PyArg_ParseTuple(_args
, ""))
4589 GetMovieActiveSegment(_self
->ob_itself
,
4592 _res
= Py_BuildValue("ll",
4598 static PyObject
*MovieObj_GetMovieTime(MovieObject
*_self
, PyObject
*_args
)
4600 PyObject
*_res
= NULL
;
4602 TimeRecord currentTime
;
4603 if (!PyArg_ParseTuple(_args
, ""))
4605 _rv
= GetMovieTime(_self
->ob_itself
,
4607 _res
= Py_BuildValue("lO&",
4609 QtTimeRecord_New
, ¤tTime
);
4613 static PyObject
*MovieObj_SetMovieTime(MovieObject
*_self
, PyObject
*_args
)
4615 PyObject
*_res
= NULL
;
4617 if (!PyArg_ParseTuple(_args
, "O&",
4618 QtTimeRecord_Convert
, &newtime
))
4620 SetMovieTime(_self
->ob_itself
,
4627 static PyObject
*MovieObj_SetMovieTimeValue(MovieObject
*_self
, PyObject
*_args
)
4629 PyObject
*_res
= NULL
;
4631 if (!PyArg_ParseTuple(_args
, "l",
4634 SetMovieTimeValue(_self
->ob_itself
,
4641 static PyObject
*MovieObj_GetMovieUserData(MovieObject
*_self
, PyObject
*_args
)
4643 PyObject
*_res
= NULL
;
4645 if (!PyArg_ParseTuple(_args
, ""))
4647 _rv
= GetMovieUserData(_self
->ob_itself
);
4648 _res
= Py_BuildValue("O&",
4649 UserDataObj_New
, _rv
);
4653 static PyObject
*MovieObj_GetMovieTrackCount(MovieObject
*_self
, PyObject
*_args
)
4655 PyObject
*_res
= NULL
;
4657 if (!PyArg_ParseTuple(_args
, ""))
4659 _rv
= GetMovieTrackCount(_self
->ob_itself
);
4660 _res
= Py_BuildValue("l",
4665 static PyObject
*MovieObj_GetMovieTrack(MovieObject
*_self
, PyObject
*_args
)
4667 PyObject
*_res
= NULL
;
4670 if (!PyArg_ParseTuple(_args
, "l",
4673 _rv
= GetMovieTrack(_self
->ob_itself
,
4675 _res
= Py_BuildValue("O&",
4680 static PyObject
*MovieObj_GetMovieIndTrack(MovieObject
*_self
, PyObject
*_args
)
4682 PyObject
*_res
= NULL
;
4685 if (!PyArg_ParseTuple(_args
, "l",
4688 _rv
= GetMovieIndTrack(_self
->ob_itself
,
4690 _res
= Py_BuildValue("O&",
4695 static PyObject
*MovieObj_GetMovieIndTrackType(MovieObject
*_self
, PyObject
*_args
)
4697 PyObject
*_res
= NULL
;
4702 if (!PyArg_ParseTuple(_args
, "lO&l",
4704 PyMac_GetOSType
, &trackType
,
4707 _rv
= GetMovieIndTrackType(_self
->ob_itself
,
4711 _res
= Py_BuildValue("O&",
4716 static PyObject
*MovieObj_NewMovieTrack(MovieObject
*_self
, PyObject
*_args
)
4718 PyObject
*_res
= NULL
;
4723 if (!PyArg_ParseTuple(_args
, "O&O&h",
4724 PyMac_GetFixed
, &width
,
4725 PyMac_GetFixed
, &height
,
4728 _rv
= NewMovieTrack(_self
->ob_itself
,
4732 _res
= Py_BuildValue("O&",
4737 static PyObject
*MovieObj_SetAutoTrackAlternatesEnabled(MovieObject
*_self
, PyObject
*_args
)
4739 PyObject
*_res
= NULL
;
4741 if (!PyArg_ParseTuple(_args
, "b",
4744 SetAutoTrackAlternatesEnabled(_self
->ob_itself
,
4751 static PyObject
*MovieObj_SelectMovieAlternates(MovieObject
*_self
, PyObject
*_args
)
4753 PyObject
*_res
= NULL
;
4754 if (!PyArg_ParseTuple(_args
, ""))
4756 SelectMovieAlternates(_self
->ob_itself
);
4762 static PyObject
*MovieObj_InsertMovieSegment(MovieObject
*_self
, PyObject
*_args
)
4764 PyObject
*_res
= NULL
;
4768 TimeValue srcDuration
;
4770 if (!PyArg_ParseTuple(_args
, "O&lll",
4771 MovieObj_Convert
, &dstMovie
,
4776 _err
= InsertMovieSegment(_self
->ob_itself
,
4781 if (_err
!= noErr
) return PyMac_Error(_err
);
4787 static PyObject
*MovieObj_InsertEmptyMovieSegment(MovieObject
*_self
, PyObject
*_args
)
4789 PyObject
*_res
= NULL
;
4792 TimeValue dstDuration
;
4793 if (!PyArg_ParseTuple(_args
, "ll",
4797 _err
= InsertEmptyMovieSegment(_self
->ob_itself
,
4800 if (_err
!= noErr
) return PyMac_Error(_err
);
4806 static PyObject
*MovieObj_DeleteMovieSegment(MovieObject
*_self
, PyObject
*_args
)
4808 PyObject
*_res
= NULL
;
4810 TimeValue startTime
;
4812 if (!PyArg_ParseTuple(_args
, "ll",
4816 _err
= DeleteMovieSegment(_self
->ob_itself
,
4819 if (_err
!= noErr
) return PyMac_Error(_err
);
4825 static PyObject
*MovieObj_ScaleMovieSegment(MovieObject
*_self
, PyObject
*_args
)
4827 PyObject
*_res
= NULL
;
4829 TimeValue startTime
;
4830 TimeValue oldDuration
;
4831 TimeValue newDuration
;
4832 if (!PyArg_ParseTuple(_args
, "lll",
4837 _err
= ScaleMovieSegment(_self
->ob_itself
,
4841 if (_err
!= noErr
) return PyMac_Error(_err
);
4847 static PyObject
*MovieObj_CutMovieSelection(MovieObject
*_self
, PyObject
*_args
)
4849 PyObject
*_res
= NULL
;
4851 if (!PyArg_ParseTuple(_args
, ""))
4853 _rv
= CutMovieSelection(_self
->ob_itself
);
4854 _res
= Py_BuildValue("O&",
4859 static PyObject
*MovieObj_CopyMovieSelection(MovieObject
*_self
, PyObject
*_args
)
4861 PyObject
*_res
= NULL
;
4863 if (!PyArg_ParseTuple(_args
, ""))
4865 _rv
= CopyMovieSelection(_self
->ob_itself
);
4866 _res
= Py_BuildValue("O&",
4871 static PyObject
*MovieObj_PasteMovieSelection(MovieObject
*_self
, PyObject
*_args
)
4873 PyObject
*_res
= NULL
;
4875 if (!PyArg_ParseTuple(_args
, "O&",
4876 MovieObj_Convert
, &src
))
4878 PasteMovieSelection(_self
->ob_itself
,
4885 static PyObject
*MovieObj_AddMovieSelection(MovieObject
*_self
, PyObject
*_args
)
4887 PyObject
*_res
= NULL
;
4889 if (!PyArg_ParseTuple(_args
, "O&",
4890 MovieObj_Convert
, &src
))
4892 AddMovieSelection(_self
->ob_itself
,
4899 static PyObject
*MovieObj_ClearMovieSelection(MovieObject
*_self
, PyObject
*_args
)
4901 PyObject
*_res
= NULL
;
4902 if (!PyArg_ParseTuple(_args
, ""))
4904 ClearMovieSelection(_self
->ob_itself
);
4910 static PyObject
*MovieObj_PutMovieIntoTypedHandle(MovieObject
*_self
, PyObject
*_args
)
4912 PyObject
*_res
= NULL
;
4920 ComponentInstance userComp
;
4921 if (!PyArg_ParseTuple(_args
, "O&O&O&lllO&",
4922 TrackObj_Convert
, &targetTrack
,
4923 PyMac_GetOSType
, &handleType
,
4924 ResObj_Convert
, &publicMovie
,
4928 CmpInstObj_Convert
, &userComp
))
4930 _err
= PutMovieIntoTypedHandle(_self
->ob_itself
,
4938 if (_err
!= noErr
) return PyMac_Error(_err
);
4944 static PyObject
*MovieObj_CopyMovieSettings(MovieObject
*_self
, PyObject
*_args
)
4946 PyObject
*_res
= NULL
;
4949 if (!PyArg_ParseTuple(_args
, "O&",
4950 MovieObj_Convert
, &dstMovie
))
4952 _err
= CopyMovieSettings(_self
->ob_itself
,
4954 if (_err
!= noErr
) return PyMac_Error(_err
);
4960 static PyObject
*MovieObj_ConvertMovieToFile(MovieObject
*_self
, PyObject
*_args
)
4962 PyObject
*_res
= NULL
;
4968 ScriptCode scriptTag
;
4971 ComponentInstance userComp
;
4972 if (!PyArg_ParseTuple(_args
, "O&O&O&O&hlO&",
4973 TrackObj_Convert
, &onlyTrack
,
4974 PyMac_GetFSSpec
, &outputFile
,
4975 PyMac_GetOSType
, &fileType
,
4976 PyMac_GetOSType
, &creator
,
4979 CmpInstObj_Convert
, &userComp
))
4981 _err
= ConvertMovieToFile(_self
->ob_itself
,
4990 if (_err
!= noErr
) return PyMac_Error(_err
);
4991 _res
= Py_BuildValue("h",
4996 static PyObject
*MovieObj_GetMovieDataSize(MovieObject
*_self
, PyObject
*_args
)
4998 PyObject
*_res
= NULL
;
5000 TimeValue startTime
;
5002 if (!PyArg_ParseTuple(_args
, "ll",
5006 _rv
= GetMovieDataSize(_self
->ob_itself
,
5009 _res
= Py_BuildValue("l",
5014 static PyObject
*MovieObj_GetMovieDataSize64(MovieObject
*_self
, PyObject
*_args
)
5016 PyObject
*_res
= NULL
;
5018 TimeValue startTime
;
5021 if (!PyArg_ParseTuple(_args
, "ll",
5025 _err
= GetMovieDataSize64(_self
->ob_itself
,
5029 if (_err
!= noErr
) return PyMac_Error(_err
);
5030 _res
= Py_BuildValue("O&",
5031 PyMac_Buildwide
, dataSize
);
5035 static PyObject
*MovieObj_PtInMovie(MovieObject
*_self
, PyObject
*_args
)
5037 PyObject
*_res
= NULL
;
5040 if (!PyArg_ParseTuple(_args
, "O&",
5041 PyMac_GetPoint
, &pt
))
5043 _rv
= PtInMovie(_self
->ob_itself
,
5045 _res
= Py_BuildValue("b",
5050 static PyObject
*MovieObj_SetMovieLanguage(MovieObject
*_self
, PyObject
*_args
)
5052 PyObject
*_res
= NULL
;
5054 if (!PyArg_ParseTuple(_args
, "l",
5057 SetMovieLanguage(_self
->ob_itself
,
5064 static PyObject
*MovieObj_GetMovieNextInterestingTime(MovieObject
*_self
, PyObject
*_args
)
5066 PyObject
*_res
= NULL
;
5067 short interestingTimeFlags
;
5068 short numMediaTypes
;
5069 OSType whichMediaTypes
;
5072 TimeValue interestingTime
;
5073 TimeValue interestingDuration
;
5074 if (!PyArg_ParseTuple(_args
, "hhO&lO&",
5075 &interestingTimeFlags
,
5077 PyMac_GetOSType
, &whichMediaTypes
,
5079 PyMac_GetFixed
, &rate
))
5081 GetMovieNextInterestingTime(_self
->ob_itself
,
5082 interestingTimeFlags
,
5088 &interestingDuration
);
5089 _res
= Py_BuildValue("ll",
5091 interestingDuration
);
5095 static PyObject
*MovieObj_AddMovieResource(MovieObject
*_self
, PyObject
*_args
)
5097 PyObject
*_res
= NULL
;
5102 if (!PyArg_ParseTuple(_args
, "hO&",
5104 PyMac_GetStr255
, resName
))
5106 _err
= AddMovieResource(_self
->ob_itself
,
5110 if (_err
!= noErr
) return PyMac_Error(_err
);
5111 _res
= Py_BuildValue("h",
5116 static PyObject
*MovieObj_UpdateMovieResource(MovieObject
*_self
, PyObject
*_args
)
5118 PyObject
*_res
= NULL
;
5123 if (!PyArg_ParseTuple(_args
, "hhO&",
5126 PyMac_GetStr255
, resName
))
5128 _err
= UpdateMovieResource(_self
->ob_itself
,
5132 if (_err
!= noErr
) return PyMac_Error(_err
);
5138 static PyObject
*MovieObj_HasMovieChanged(MovieObject
*_self
, PyObject
*_args
)
5140 PyObject
*_res
= NULL
;
5142 if (!PyArg_ParseTuple(_args
, ""))
5144 _rv
= HasMovieChanged(_self
->ob_itself
);
5145 _res
= Py_BuildValue("b",
5150 static PyObject
*MovieObj_ClearMovieChanged(MovieObject
*_self
, PyObject
*_args
)
5152 PyObject
*_res
= NULL
;
5153 if (!PyArg_ParseTuple(_args
, ""))
5155 ClearMovieChanged(_self
->ob_itself
);
5161 static PyObject
*MovieObj_SetMovieDefaultDataRef(MovieObject
*_self
, PyObject
*_args
)
5163 PyObject
*_res
= NULL
;
5167 if (!PyArg_ParseTuple(_args
, "O&O&",
5168 ResObj_Convert
, &dataRef
,
5169 PyMac_GetOSType
, &dataRefType
))
5171 _err
= SetMovieDefaultDataRef(_self
->ob_itself
,
5174 if (_err
!= noErr
) return PyMac_Error(_err
);
5180 static PyObject
*MovieObj_GetMovieDefaultDataRef(MovieObject
*_self
, PyObject
*_args
)
5182 PyObject
*_res
= NULL
;
5186 if (!PyArg_ParseTuple(_args
, ""))
5188 _err
= GetMovieDefaultDataRef(_self
->ob_itself
,
5191 if (_err
!= noErr
) return PyMac_Error(_err
);
5192 _res
= Py_BuildValue("O&O&",
5193 ResObj_New
, dataRef
,
5194 PyMac_BuildOSType
, dataRefType
);
5198 #if !TARGET_API_MAC_CARBON
5200 static PyObject
*MovieObj_SetMovieAnchorDataRef(MovieObject
*_self
, PyObject
*_args
)
5202 PyObject
*_res
= NULL
;
5206 if (!PyArg_ParseTuple(_args
, "O&O&",
5207 ResObj_Convert
, &dataRef
,
5208 PyMac_GetOSType
, &dataRefType
))
5210 _err
= SetMovieAnchorDataRef(_self
->ob_itself
,
5213 if (_err
!= noErr
) return PyMac_Error(_err
);
5220 #if !TARGET_API_MAC_CARBON
5222 static PyObject
*MovieObj_GetMovieAnchorDataRef(MovieObject
*_self
, PyObject
*_args
)
5224 PyObject
*_res
= NULL
;
5229 if (!PyArg_ParseTuple(_args
, ""))
5231 _err
= GetMovieAnchorDataRef(_self
->ob_itself
,
5235 if (_err
!= noErr
) return PyMac_Error(_err
);
5236 _res
= Py_BuildValue("O&O&l",
5237 ResObj_New
, dataRef
,
5238 PyMac_BuildOSType
, dataRefType
,
5244 static PyObject
*MovieObj_SetMovieColorTable(MovieObject
*_self
, PyObject
*_args
)
5246 PyObject
*_res
= NULL
;
5249 if (!PyArg_ParseTuple(_args
, "O&",
5250 ResObj_Convert
, &ctab
))
5252 _err
= SetMovieColorTable(_self
->ob_itself
,
5254 if (_err
!= noErr
) return PyMac_Error(_err
);
5260 static PyObject
*MovieObj_GetMovieColorTable(MovieObject
*_self
, PyObject
*_args
)
5262 PyObject
*_res
= NULL
;
5265 if (!PyArg_ParseTuple(_args
, ""))
5267 _err
= GetMovieColorTable(_self
->ob_itself
,
5269 if (_err
!= noErr
) return PyMac_Error(_err
);
5270 _res
= Py_BuildValue("O&",
5275 static PyObject
*MovieObj_FlattenMovie(MovieObject
*_self
, PyObject
*_args
)
5277 PyObject
*_res
= NULL
;
5278 long movieFlattenFlags
;
5281 ScriptCode scriptTag
;
5282 long createMovieFileFlags
;
5285 if (!PyArg_ParseTuple(_args
, "lO&O&hlO&",
5287 PyMac_GetFSSpec
, &theFile
,
5288 PyMac_GetOSType
, &creator
,
5290 &createMovieFileFlags
,
5291 PyMac_GetStr255
, resName
))
5293 FlattenMovie(_self
->ob_itself
,
5298 createMovieFileFlags
,
5301 _res
= Py_BuildValue("h",
5306 static PyObject
*MovieObj_FlattenMovieData(MovieObject
*_self
, PyObject
*_args
)
5308 PyObject
*_res
= NULL
;
5310 long movieFlattenFlags
;
5313 ScriptCode scriptTag
;
5314 long createMovieFileFlags
;
5315 if (!PyArg_ParseTuple(_args
, "lO&O&hl",
5317 PyMac_GetFSSpec
, &theFile
,
5318 PyMac_GetOSType
, &creator
,
5320 &createMovieFileFlags
))
5322 _rv
= FlattenMovieData(_self
->ob_itself
,
5327 createMovieFileFlags
);
5328 _res
= Py_BuildValue("O&",
5333 static PyObject
*MovieObj_MovieSearchText(MovieObject
*_self
, PyObject
*_args
)
5335 PyObject
*_res
= NULL
;
5341 TimeValue searchTime
;
5343 if (!PyArg_ParseTuple(_args
, "sll",
5348 _err
= MovieSearchText(_self
->ob_itself
,
5355 if (_err
!= noErr
) return PyMac_Error(_err
);
5356 _res
= Py_BuildValue("O&ll",
5357 TrackObj_New
, searchTrack
,
5363 static PyObject
*MovieObj_GetPosterBox(MovieObject
*_self
, PyObject
*_args
)
5365 PyObject
*_res
= NULL
;
5367 if (!PyArg_ParseTuple(_args
, ""))
5369 GetPosterBox(_self
->ob_itself
,
5371 _res
= Py_BuildValue("O&",
5372 PyMac_BuildRect
, &boxRect
);
5376 static PyObject
*MovieObj_SetPosterBox(MovieObject
*_self
, PyObject
*_args
)
5378 PyObject
*_res
= NULL
;
5380 if (!PyArg_ParseTuple(_args
, "O&",
5381 PyMac_GetRect
, &boxRect
))
5383 SetPosterBox(_self
->ob_itself
,
5390 static PyObject
*MovieObj_GetMovieSegmentDisplayBoundsRgn(MovieObject
*_self
, PyObject
*_args
)
5392 PyObject
*_res
= NULL
;
5396 if (!PyArg_ParseTuple(_args
, "ll",
5400 _rv
= GetMovieSegmentDisplayBoundsRgn(_self
->ob_itself
,
5403 _res
= Py_BuildValue("O&",
5408 static PyObject
*MovieObj_GetMovieStatus(MovieObject
*_self
, PyObject
*_args
)
5410 PyObject
*_res
= NULL
;
5411 ComponentResult _rv
;
5412 Track firstProblemTrack
;
5413 if (!PyArg_ParseTuple(_args
, ""))
5415 _rv
= GetMovieStatus(_self
->ob_itself
,
5416 &firstProblemTrack
);
5417 _res
= Py_BuildValue("lO&",
5419 TrackObj_New
, firstProblemTrack
);
5423 #if !TARGET_API_MAC_CARBON
5425 static PyObject
*MovieObj_GetMovieLoadState(MovieObject
*_self
, PyObject
*_args
)
5427 PyObject
*_res
= NULL
;
5429 if (!PyArg_ParseTuple(_args
, ""))
5431 _rv
= GetMovieLoadState(_self
->ob_itself
);
5432 _res
= Py_BuildValue("l",
5438 static PyObject
*MovieObj_NewMovieController(MovieObject
*_self
, PyObject
*_args
)
5440 PyObject
*_res
= NULL
;
5441 MovieController _rv
;
5444 if (!PyArg_ParseTuple(_args
, "O&l",
5445 PyMac_GetRect
, &movieRect
,
5448 _rv
= NewMovieController(_self
->ob_itself
,
5451 _res
= Py_BuildValue("O&",
5452 MovieCtlObj_New
, _rv
);
5456 static PyObject
*MovieObj_PutMovieOnScrap(MovieObject
*_self
, PyObject
*_args
)
5458 PyObject
*_res
= NULL
;
5460 long movieScrapFlags
;
5461 if (!PyArg_ParseTuple(_args
, "l",
5464 _err
= PutMovieOnScrap(_self
->ob_itself
,
5466 if (_err
!= noErr
) return PyMac_Error(_err
);
5472 static PyObject
*MovieObj_SetMoviePlayHints(MovieObject
*_self
, PyObject
*_args
)
5474 PyObject
*_res
= NULL
;
5477 if (!PyArg_ParseTuple(_args
, "ll",
5481 SetMoviePlayHints(_self
->ob_itself
,
5489 static PyObject
*MovieObj_GetMaxLoadedTimeInMovie(MovieObject
*_self
, PyObject
*_args
)
5491 PyObject
*_res
= NULL
;
5494 if (!PyArg_ParseTuple(_args
, ""))
5496 _err
= GetMaxLoadedTimeInMovie(_self
->ob_itself
,
5498 if (_err
!= noErr
) return PyMac_Error(_err
);
5499 _res
= Py_BuildValue("l",
5504 static PyObject
*MovieObj_QTMovieNeedsTimeTable(MovieObject
*_self
, PyObject
*_args
)
5506 PyObject
*_res
= NULL
;
5508 Boolean needsTimeTable
;
5509 if (!PyArg_ParseTuple(_args
, ""))
5511 _err
= QTMovieNeedsTimeTable(_self
->ob_itself
,
5513 if (_err
!= noErr
) return PyMac_Error(_err
);
5514 _res
= Py_BuildValue("b",
5519 static PyObject
*MovieObj_QTGetDataRefMaxFileOffset(MovieObject
*_self
, PyObject
*_args
)
5521 PyObject
*_res
= NULL
;
5526 if (!PyArg_ParseTuple(_args
, "O&O&",
5527 PyMac_GetOSType
, &dataRefType
,
5528 ResObj_Convert
, &dataRef
))
5530 _err
= QTGetDataRefMaxFileOffset(_self
->ob_itself
,
5534 if (_err
!= noErr
) return PyMac_Error(_err
);
5535 _res
= Py_BuildValue("l",
5540 static PyMethodDef MovieObj_methods
[] = {
5541 {"MoviesTask", (PyCFunction
)MovieObj_MoviesTask
, 1,
5542 "(long maxMilliSecToUse) -> None"},
5543 {"PrerollMovie", (PyCFunction
)MovieObj_PrerollMovie
, 1,
5544 "(TimeValue time, Fixed Rate) -> None"},
5545 {"AbortPrePrerollMovie", (PyCFunction
)MovieObj_AbortPrePrerollMovie
, 1,
5546 "(OSErr err) -> None"},
5547 {"LoadMovieIntoRam", (PyCFunction
)MovieObj_LoadMovieIntoRam
, 1,
5548 "(TimeValue time, TimeValue duration, long flags) -> None"},
5549 {"SetMovieActive", (PyCFunction
)MovieObj_SetMovieActive
, 1,
5550 "(Boolean active) -> None"},
5551 {"GetMovieActive", (PyCFunction
)MovieObj_GetMovieActive
, 1,
5552 "() -> (Boolean _rv)"},
5553 {"StartMovie", (PyCFunction
)MovieObj_StartMovie
, 1,
5555 {"StopMovie", (PyCFunction
)MovieObj_StopMovie
, 1,
5557 {"GoToBeginningOfMovie", (PyCFunction
)MovieObj_GoToBeginningOfMovie
, 1,
5559 {"GoToEndOfMovie", (PyCFunction
)MovieObj_GoToEndOfMovie
, 1,
5561 {"IsMovieDone", (PyCFunction
)MovieObj_IsMovieDone
, 1,
5562 "() -> (Boolean _rv)"},
5563 {"GetMoviePreviewMode", (PyCFunction
)MovieObj_GetMoviePreviewMode
, 1,
5564 "() -> (Boolean _rv)"},
5565 {"SetMoviePreviewMode", (PyCFunction
)MovieObj_SetMoviePreviewMode
, 1,
5566 "(Boolean usePreview) -> None"},
5567 {"ShowMoviePoster", (PyCFunction
)MovieObj_ShowMoviePoster
, 1,
5569 {"GetMovieTimeBase", (PyCFunction
)MovieObj_GetMovieTimeBase
, 1,
5570 "() -> (TimeBase _rv)"},
5571 {"SetMovieMasterTimeBase", (PyCFunction
)MovieObj_SetMovieMasterTimeBase
, 1,
5572 "(TimeBase tb, TimeRecord slaveZero) -> None"},
5573 {"SetMovieMasterClock", (PyCFunction
)MovieObj_SetMovieMasterClock
, 1,
5574 "(Component clockMeister, TimeRecord slaveZero) -> None"},
5575 {"GetMovieGWorld", (PyCFunction
)MovieObj_GetMovieGWorld
, 1,
5576 "() -> (CGrafPtr port, GDHandle gdh)"},
5577 {"SetMovieGWorld", (PyCFunction
)MovieObj_SetMovieGWorld
, 1,
5578 "(CGrafPtr port, GDHandle gdh) -> None"},
5579 {"GetMovieNaturalBoundsRect", (PyCFunction
)MovieObj_GetMovieNaturalBoundsRect
, 1,
5580 "() -> (Rect naturalBounds)"},
5581 {"GetNextTrackForCompositing", (PyCFunction
)MovieObj_GetNextTrackForCompositing
, 1,
5582 "(Track theTrack) -> (Track _rv)"},
5583 {"GetPrevTrackForCompositing", (PyCFunction
)MovieObj_GetPrevTrackForCompositing
, 1,
5584 "(Track theTrack) -> (Track _rv)"},
5585 {"GetMoviePict", (PyCFunction
)MovieObj_GetMoviePict
, 1,
5586 "(TimeValue time) -> (PicHandle _rv)"},
5587 {"GetMoviePosterPict", (PyCFunction
)MovieObj_GetMoviePosterPict
, 1,
5588 "() -> (PicHandle _rv)"},
5589 {"UpdateMovie", (PyCFunction
)MovieObj_UpdateMovie
, 1,
5591 {"InvalidateMovieRegion", (PyCFunction
)MovieObj_InvalidateMovieRegion
, 1,
5592 "(RgnHandle invalidRgn) -> None"},
5593 {"GetMovieBox", (PyCFunction
)MovieObj_GetMovieBox
, 1,
5594 "() -> (Rect boxRect)"},
5595 {"SetMovieBox", (PyCFunction
)MovieObj_SetMovieBox
, 1,
5596 "(Rect boxRect) -> None"},
5597 {"GetMovieDisplayClipRgn", (PyCFunction
)MovieObj_GetMovieDisplayClipRgn
, 1,
5598 "() -> (RgnHandle _rv)"},
5599 {"SetMovieDisplayClipRgn", (PyCFunction
)MovieObj_SetMovieDisplayClipRgn
, 1,
5600 "(RgnHandle theClip) -> None"},
5601 {"GetMovieClipRgn", (PyCFunction
)MovieObj_GetMovieClipRgn
, 1,
5602 "() -> (RgnHandle _rv)"},
5603 {"SetMovieClipRgn", (PyCFunction
)MovieObj_SetMovieClipRgn
, 1,
5604 "(RgnHandle theClip) -> None"},
5605 {"GetMovieDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieDisplayBoundsRgn
, 1,
5606 "() -> (RgnHandle _rv)"},
5607 {"GetMovieBoundsRgn", (PyCFunction
)MovieObj_GetMovieBoundsRgn
, 1,
5608 "() -> (RgnHandle _rv)"},
5609 {"PutMovieIntoHandle", (PyCFunction
)MovieObj_PutMovieIntoHandle
, 1,
5610 "(Handle publicMovie) -> None"},
5611 {"PutMovieIntoDataFork", (PyCFunction
)MovieObj_PutMovieIntoDataFork
, 1,
5612 "(short fRefNum, long offset, long maxSize) -> None"},
5613 {"PutMovieIntoDataFork64", (PyCFunction
)MovieObj_PutMovieIntoDataFork64
, 1,
5614 "(long fRefNum, wide offset, unsigned long maxSize) -> None"},
5615 {"GetMovieCreationTime", (PyCFunction
)MovieObj_GetMovieCreationTime
, 1,
5616 "() -> (unsigned long _rv)"},
5617 {"GetMovieModificationTime", (PyCFunction
)MovieObj_GetMovieModificationTime
, 1,
5618 "() -> (unsigned long _rv)"},
5619 {"GetMovieTimeScale", (PyCFunction
)MovieObj_GetMovieTimeScale
, 1,
5620 "() -> (TimeScale _rv)"},
5621 {"SetMovieTimeScale", (PyCFunction
)MovieObj_SetMovieTimeScale
, 1,
5622 "(TimeScale timeScale) -> None"},
5623 {"GetMovieDuration", (PyCFunction
)MovieObj_GetMovieDuration
, 1,
5624 "() -> (TimeValue _rv)"},
5625 {"GetMovieRate", (PyCFunction
)MovieObj_GetMovieRate
, 1,
5626 "() -> (Fixed _rv)"},
5627 {"SetMovieRate", (PyCFunction
)MovieObj_SetMovieRate
, 1,
5628 "(Fixed rate) -> None"},
5629 {"GetMoviePreferredRate", (PyCFunction
)MovieObj_GetMoviePreferredRate
, 1,
5630 "() -> (Fixed _rv)"},
5631 {"SetMoviePreferredRate", (PyCFunction
)MovieObj_SetMoviePreferredRate
, 1,
5632 "(Fixed rate) -> None"},
5633 {"GetMoviePreferredVolume", (PyCFunction
)MovieObj_GetMoviePreferredVolume
, 1,
5634 "() -> (short _rv)"},
5635 {"SetMoviePreferredVolume", (PyCFunction
)MovieObj_SetMoviePreferredVolume
, 1,
5636 "(short volume) -> None"},
5637 {"GetMovieVolume", (PyCFunction
)MovieObj_GetMovieVolume
, 1,
5638 "() -> (short _rv)"},
5639 {"SetMovieVolume", (PyCFunction
)MovieObj_SetMovieVolume
, 1,
5640 "(short volume) -> None"},
5641 {"GetMoviePreviewTime", (PyCFunction
)MovieObj_GetMoviePreviewTime
, 1,
5642 "() -> (TimeValue previewTime, TimeValue previewDuration)"},
5643 {"SetMoviePreviewTime", (PyCFunction
)MovieObj_SetMoviePreviewTime
, 1,
5644 "(TimeValue previewTime, TimeValue previewDuration) -> None"},
5645 {"GetMoviePosterTime", (PyCFunction
)MovieObj_GetMoviePosterTime
, 1,
5646 "() -> (TimeValue _rv)"},
5647 {"SetMoviePosterTime", (PyCFunction
)MovieObj_SetMoviePosterTime
, 1,
5648 "(TimeValue posterTime) -> None"},
5649 {"GetMovieSelection", (PyCFunction
)MovieObj_GetMovieSelection
, 1,
5650 "() -> (TimeValue selectionTime, TimeValue selectionDuration)"},
5651 {"SetMovieSelection", (PyCFunction
)MovieObj_SetMovieSelection
, 1,
5652 "(TimeValue selectionTime, TimeValue selectionDuration) -> None"},
5653 {"SetMovieActiveSegment", (PyCFunction
)MovieObj_SetMovieActiveSegment
, 1,
5654 "(TimeValue startTime, TimeValue duration) -> None"},
5655 {"GetMovieActiveSegment", (PyCFunction
)MovieObj_GetMovieActiveSegment
, 1,
5656 "() -> (TimeValue startTime, TimeValue duration)"},
5657 {"GetMovieTime", (PyCFunction
)MovieObj_GetMovieTime
, 1,
5658 "() -> (TimeValue _rv, TimeRecord currentTime)"},
5659 {"SetMovieTime", (PyCFunction
)MovieObj_SetMovieTime
, 1,
5660 "(TimeRecord newtime) -> None"},
5661 {"SetMovieTimeValue", (PyCFunction
)MovieObj_SetMovieTimeValue
, 1,
5662 "(TimeValue newtime) -> None"},
5663 {"GetMovieUserData", (PyCFunction
)MovieObj_GetMovieUserData
, 1,
5664 "() -> (UserData _rv)"},
5665 {"GetMovieTrackCount", (PyCFunction
)MovieObj_GetMovieTrackCount
, 1,
5666 "() -> (long _rv)"},
5667 {"GetMovieTrack", (PyCFunction
)MovieObj_GetMovieTrack
, 1,
5668 "(long trackID) -> (Track _rv)"},
5669 {"GetMovieIndTrack", (PyCFunction
)MovieObj_GetMovieIndTrack
, 1,
5670 "(long index) -> (Track _rv)"},
5671 {"GetMovieIndTrackType", (PyCFunction
)MovieObj_GetMovieIndTrackType
, 1,
5672 "(long index, OSType trackType, long flags) -> (Track _rv)"},
5673 {"NewMovieTrack", (PyCFunction
)MovieObj_NewMovieTrack
, 1,
5674 "(Fixed width, Fixed height, short trackVolume) -> (Track _rv)"},
5675 {"SetAutoTrackAlternatesEnabled", (PyCFunction
)MovieObj_SetAutoTrackAlternatesEnabled
, 1,
5676 "(Boolean enable) -> None"},
5677 {"SelectMovieAlternates", (PyCFunction
)MovieObj_SelectMovieAlternates
, 1,
5679 {"InsertMovieSegment", (PyCFunction
)MovieObj_InsertMovieSegment
, 1,
5680 "(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
5681 {"InsertEmptyMovieSegment", (PyCFunction
)MovieObj_InsertEmptyMovieSegment
, 1,
5682 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
5683 {"DeleteMovieSegment", (PyCFunction
)MovieObj_DeleteMovieSegment
, 1,
5684 "(TimeValue startTime, TimeValue duration) -> None"},
5685 {"ScaleMovieSegment", (PyCFunction
)MovieObj_ScaleMovieSegment
, 1,
5686 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
5687 {"CutMovieSelection", (PyCFunction
)MovieObj_CutMovieSelection
, 1,
5688 "() -> (Movie _rv)"},
5689 {"CopyMovieSelection", (PyCFunction
)MovieObj_CopyMovieSelection
, 1,
5690 "() -> (Movie _rv)"},
5691 {"PasteMovieSelection", (PyCFunction
)MovieObj_PasteMovieSelection
, 1,
5692 "(Movie src) -> None"},
5693 {"AddMovieSelection", (PyCFunction
)MovieObj_AddMovieSelection
, 1,
5694 "(Movie src) -> None"},
5695 {"ClearMovieSelection", (PyCFunction
)MovieObj_ClearMovieSelection
, 1,
5697 {"PutMovieIntoTypedHandle", (PyCFunction
)MovieObj_PutMovieIntoTypedHandle
, 1,
5698 "(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None"},
5699 {"CopyMovieSettings", (PyCFunction
)MovieObj_CopyMovieSettings
, 1,
5700 "(Movie dstMovie) -> None"},
5701 {"ConvertMovieToFile", (PyCFunction
)MovieObj_ConvertMovieToFile
, 1,
5702 "(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)"},
5703 {"GetMovieDataSize", (PyCFunction
)MovieObj_GetMovieDataSize
, 1,
5704 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
5705 {"GetMovieDataSize64", (PyCFunction
)MovieObj_GetMovieDataSize64
, 1,
5706 "(TimeValue startTime, TimeValue duration) -> (wide dataSize)"},
5707 {"PtInMovie", (PyCFunction
)MovieObj_PtInMovie
, 1,
5708 "(Point pt) -> (Boolean _rv)"},
5709 {"SetMovieLanguage", (PyCFunction
)MovieObj_SetMovieLanguage
, 1,
5710 "(long language) -> None"},
5711 {"GetMovieNextInterestingTime", (PyCFunction
)MovieObj_GetMovieNextInterestingTime
, 1,
5712 "(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
5713 {"AddMovieResource", (PyCFunction
)MovieObj_AddMovieResource
, 1,
5714 "(short resRefNum, Str255 resName) -> (short resId)"},
5715 {"UpdateMovieResource", (PyCFunction
)MovieObj_UpdateMovieResource
, 1,
5716 "(short resRefNum, short resId, Str255 resName) -> None"},
5717 {"HasMovieChanged", (PyCFunction
)MovieObj_HasMovieChanged
, 1,
5718 "() -> (Boolean _rv)"},
5719 {"ClearMovieChanged", (PyCFunction
)MovieObj_ClearMovieChanged
, 1,
5721 {"SetMovieDefaultDataRef", (PyCFunction
)MovieObj_SetMovieDefaultDataRef
, 1,
5722 "(Handle dataRef, OSType dataRefType) -> None"},
5723 {"GetMovieDefaultDataRef", (PyCFunction
)MovieObj_GetMovieDefaultDataRef
, 1,
5724 "() -> (Handle dataRef, OSType dataRefType)"},
5726 #if !TARGET_API_MAC_CARBON
5727 {"SetMovieAnchorDataRef", (PyCFunction
)MovieObj_SetMovieAnchorDataRef
, 1,
5728 "(Handle dataRef, OSType dataRefType) -> None"},
5731 #if !TARGET_API_MAC_CARBON
5732 {"GetMovieAnchorDataRef", (PyCFunction
)MovieObj_GetMovieAnchorDataRef
, 1,
5733 "() -> (Handle dataRef, OSType dataRefType, long outFlags)"},
5735 {"SetMovieColorTable", (PyCFunction
)MovieObj_SetMovieColorTable
, 1,
5736 "(CTabHandle ctab) -> None"},
5737 {"GetMovieColorTable", (PyCFunction
)MovieObj_GetMovieColorTable
, 1,
5738 "() -> (CTabHandle ctab)"},
5739 {"FlattenMovie", (PyCFunction
)MovieObj_FlattenMovie
, 1,
5740 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)"},
5741 {"FlattenMovieData", (PyCFunction
)MovieObj_FlattenMovieData
, 1,
5742 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)"},
5743 {"MovieSearchText", (PyCFunction
)MovieObj_MovieSearchText
, 1,
5744 "(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)"},
5745 {"GetPosterBox", (PyCFunction
)MovieObj_GetPosterBox
, 1,
5746 "() -> (Rect boxRect)"},
5747 {"SetPosterBox", (PyCFunction
)MovieObj_SetPosterBox
, 1,
5748 "(Rect boxRect) -> None"},
5749 {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieSegmentDisplayBoundsRgn
, 1,
5750 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
5751 {"GetMovieStatus", (PyCFunction
)MovieObj_GetMovieStatus
, 1,
5752 "() -> (ComponentResult _rv, Track firstProblemTrack)"},
5754 #if !TARGET_API_MAC_CARBON
5755 {"GetMovieLoadState", (PyCFunction
)MovieObj_GetMovieLoadState
, 1,
5756 "() -> (long _rv)"},
5758 {"NewMovieController", (PyCFunction
)MovieObj_NewMovieController
, 1,
5759 "(Rect movieRect, long someFlags) -> (MovieController _rv)"},
5760 {"PutMovieOnScrap", (PyCFunction
)MovieObj_PutMovieOnScrap
, 1,
5761 "(long movieScrapFlags) -> None"},
5762 {"SetMoviePlayHints", (PyCFunction
)MovieObj_SetMoviePlayHints
, 1,
5763 "(long flags, long flagsMask) -> None"},
5764 {"GetMaxLoadedTimeInMovie", (PyCFunction
)MovieObj_GetMaxLoadedTimeInMovie
, 1,
5765 "() -> (TimeValue time)"},
5766 {"QTMovieNeedsTimeTable", (PyCFunction
)MovieObj_QTMovieNeedsTimeTable
, 1,
5767 "() -> (Boolean needsTimeTable)"},
5768 {"QTGetDataRefMaxFileOffset", (PyCFunction
)MovieObj_QTGetDataRefMaxFileOffset
, 1,
5769 "(OSType dataRefType, Handle dataRef) -> (long offset)"},
5773 PyMethodChain MovieObj_chain
= { MovieObj_methods
, NULL
};
5775 static PyObject
*MovieObj_getattr(MovieObject
*self
, char *name
)
5777 return Py_FindMethodInChain(&MovieObj_chain
, (PyObject
*)self
, name
);
5780 #define MovieObj_setattr NULL
5782 #define MovieObj_compare NULL
5784 #define MovieObj_repr NULL
5786 #define MovieObj_hash NULL
5788 PyTypeObject Movie_Type
= {
5789 PyObject_HEAD_INIT(&PyType_Type
)
5791 "Movie", /*tp_name*/
5792 sizeof(MovieObject
), /*tp_basicsize*/
5795 (destructor
) MovieObj_dealloc
, /*tp_dealloc*/
5797 (getattrfunc
) MovieObj_getattr
, /*tp_getattr*/
5798 (setattrfunc
) MovieObj_setattr
, /*tp_setattr*/
5799 (cmpfunc
) MovieObj_compare
, /*tp_compare*/
5800 (reprfunc
) MovieObj_repr
, /*tp_repr*/
5801 (PyNumberMethods
*)0, /* tp_as_number */
5802 (PySequenceMethods
*)0, /* tp_as_sequence */
5803 (PyMappingMethods
*)0, /* tp_as_mapping */
5804 (hashfunc
) MovieObj_hash
, /*tp_hash*/
5807 /* --------------------- End object type Movie ---------------------- */
5810 #if !TARGET_API_MAC_CARBON
5812 static PyObject
*Qt_CheckQuickTimeRegistration(PyObject
*_self
, PyObject
*_args
)
5814 PyObject
*_res
= NULL
;
5815 void * registrationKey
;
5817 if (!PyArg_ParseTuple(_args
, "sl",
5821 CheckQuickTimeRegistration(registrationKey
,
5829 static PyObject
*Qt_EnterMovies(PyObject
*_self
, PyObject
*_args
)
5831 PyObject
*_res
= NULL
;
5833 if (!PyArg_ParseTuple(_args
, ""))
5835 _err
= EnterMovies();
5836 if (_err
!= noErr
) return PyMac_Error(_err
);
5842 static PyObject
*Qt_ExitMovies(PyObject
*_self
, PyObject
*_args
)
5844 PyObject
*_res
= NULL
;
5845 if (!PyArg_ParseTuple(_args
, ""))
5853 static PyObject
*Qt_GetMoviesError(PyObject
*_self
, PyObject
*_args
)
5855 PyObject
*_res
= NULL
;
5857 if (!PyArg_ParseTuple(_args
, ""))
5859 _err
= GetMoviesError();
5860 if (_err
!= noErr
) return PyMac_Error(_err
);
5866 static PyObject
*Qt_ClearMoviesStickyError(PyObject
*_self
, PyObject
*_args
)
5868 PyObject
*_res
= NULL
;
5869 if (!PyArg_ParseTuple(_args
, ""))
5871 ClearMoviesStickyError();
5877 static PyObject
*Qt_GetMoviesStickyError(PyObject
*_self
, PyObject
*_args
)
5879 PyObject
*_res
= NULL
;
5881 if (!PyArg_ParseTuple(_args
, ""))
5883 _err
= GetMoviesStickyError();
5884 if (_err
!= noErr
) return PyMac_Error(_err
);
5890 static PyObject
*Qt_DisposeMatte(PyObject
*_self
, PyObject
*_args
)
5892 PyObject
*_res
= NULL
;
5893 PixMapHandle theMatte
;
5894 if (!PyArg_ParseTuple(_args
, "O&",
5895 ResObj_Convert
, &theMatte
))
5897 DisposeMatte(theMatte
);
5903 static PyObject
*Qt_NewMovie(PyObject
*_self
, PyObject
*_args
)
5905 PyObject
*_res
= NULL
;
5908 if (!PyArg_ParseTuple(_args
, "l",
5911 _rv
= NewMovie(flags
);
5912 _res
= Py_BuildValue("O&",
5917 static PyObject
*Qt_GetDataHandler(PyObject
*_self
, PyObject
*_args
)
5919 PyObject
*_res
= NULL
;
5922 OSType dataHandlerSubType
;
5924 if (!PyArg_ParseTuple(_args
, "O&O&l",
5925 ResObj_Convert
, &dataRef
,
5926 PyMac_GetOSType
, &dataHandlerSubType
,
5929 _rv
= GetDataHandler(dataRef
,
5932 _res
= Py_BuildValue("O&",
5937 #if !TARGET_API_MAC_CARBON
5939 static PyObject
*Qt_OpenADataHandler(PyObject
*_self
, PyObject
*_args
)
5941 PyObject
*_res
= NULL
;
5944 OSType dataHandlerSubType
;
5945 Handle anchorDataRef
;
5946 OSType anchorDataRefType
;
5949 ComponentInstance dh
;
5950 if (!PyArg_ParseTuple(_args
, "O&O&O&O&O&l",
5951 ResObj_Convert
, &dataRef
,
5952 PyMac_GetOSType
, &dataHandlerSubType
,
5953 ResObj_Convert
, &anchorDataRef
,
5954 PyMac_GetOSType
, &anchorDataRefType
,
5955 TimeBaseObj_Convert
, &tb
,
5958 _err
= OpenADataHandler(dataRef
,
5965 if (_err
!= noErr
) return PyMac_Error(_err
);
5966 _res
= Py_BuildValue("O&",
5967 CmpInstObj_New
, dh
);
5972 static PyObject
*Qt_PasteHandleIntoMovie(PyObject
*_self
, PyObject
*_args
)
5974 PyObject
*_res
= NULL
;
5980 ComponentInstance userComp
;
5981 if (!PyArg_ParseTuple(_args
, "O&O&O&lO&",
5983 PyMac_GetOSType
, &handleType
,
5984 MovieObj_Convert
, &theMovie
,
5986 CmpInstObj_Convert
, &userComp
))
5988 _err
= PasteHandleIntoMovie(h
,
5993 if (_err
!= noErr
) return PyMac_Error(_err
);
5999 static PyObject
*Qt_GetMovieImporterForDataRef(PyObject
*_self
, PyObject
*_args
)
6001 PyObject
*_res
= NULL
;
6007 if (!PyArg_ParseTuple(_args
, "O&O&l",
6008 PyMac_GetOSType
, &dataRefType
,
6009 ResObj_Convert
, &dataRef
,
6012 _err
= GetMovieImporterForDataRef(dataRefType
,
6016 if (_err
!= noErr
) return PyMac_Error(_err
);
6017 _res
= Py_BuildValue("O&",
6018 CmpObj_New
, importer
);
6022 static PyObject
*Qt_TrackTimeToMediaTime(PyObject
*_self
, PyObject
*_args
)
6024 PyObject
*_res
= NULL
;
6028 if (!PyArg_ParseTuple(_args
, "lO&",
6030 TrackObj_Convert
, &theTrack
))
6032 _rv
= TrackTimeToMediaTime(value
,
6034 _res
= Py_BuildValue("l",
6039 static PyObject
*Qt_NewUserData(PyObject
*_self
, PyObject
*_args
)
6041 PyObject
*_res
= NULL
;
6043 UserData theUserData
;
6044 if (!PyArg_ParseTuple(_args
, ""))
6046 _err
= NewUserData(&theUserData
);
6047 if (_err
!= noErr
) return PyMac_Error(_err
);
6048 _res
= Py_BuildValue("O&",
6049 UserDataObj_New
, theUserData
);
6053 static PyObject
*Qt_NewUserDataFromHandle(PyObject
*_self
, PyObject
*_args
)
6055 PyObject
*_res
= NULL
;
6058 UserData theUserData
;
6059 if (!PyArg_ParseTuple(_args
, "O&",
6060 ResObj_Convert
, &h
))
6062 _err
= NewUserDataFromHandle(h
,
6064 if (_err
!= noErr
) return PyMac_Error(_err
);
6065 _res
= Py_BuildValue("O&",
6066 UserDataObj_New
, theUserData
);
6070 static PyObject
*Qt_CreateMovieFile(PyObject
*_self
, PyObject
*_args
)
6072 PyObject
*_res
= NULL
;
6076 ScriptCode scriptTag
;
6077 long createMovieFileFlags
;
6080 if (!PyArg_ParseTuple(_args
, "O&O&hl",
6081 PyMac_GetFSSpec
, &fileSpec
,
6082 PyMac_GetOSType
, &creator
,
6084 &createMovieFileFlags
))
6086 _err
= CreateMovieFile(&fileSpec
,
6089 createMovieFileFlags
,
6092 if (_err
!= noErr
) return PyMac_Error(_err
);
6093 _res
= Py_BuildValue("hO&",
6095 MovieObj_New
, newmovie
);
6099 static PyObject
*Qt_OpenMovieFile(PyObject
*_self
, PyObject
*_args
)
6101 PyObject
*_res
= NULL
;
6106 if (!PyArg_ParseTuple(_args
, "O&b",
6107 PyMac_GetFSSpec
, &fileSpec
,
6110 _err
= OpenMovieFile(&fileSpec
,
6113 if (_err
!= noErr
) return PyMac_Error(_err
);
6114 _res
= Py_BuildValue("h",
6119 static PyObject
*Qt_CloseMovieFile(PyObject
*_self
, PyObject
*_args
)
6121 PyObject
*_res
= NULL
;
6124 if (!PyArg_ParseTuple(_args
, "h",
6127 _err
= CloseMovieFile(resRefNum
);
6128 if (_err
!= noErr
) return PyMac_Error(_err
);
6134 static PyObject
*Qt_DeleteMovieFile(PyObject
*_self
, PyObject
*_args
)
6136 PyObject
*_res
= NULL
;
6139 if (!PyArg_ParseTuple(_args
, "O&",
6140 PyMac_GetFSSpec
, &fileSpec
))
6142 _err
= DeleteMovieFile(&fileSpec
);
6143 if (_err
!= noErr
) return PyMac_Error(_err
);
6149 static PyObject
*Qt_NewMovieFromFile(PyObject
*_self
, PyObject
*_args
)
6151 PyObject
*_res
= NULL
;
6156 short newMovieFlags
;
6157 Boolean dataRefWasChanged
;
6158 if (!PyArg_ParseTuple(_args
, "hhh",
6163 _err
= NewMovieFromFile(&theMovie
,
6168 &dataRefWasChanged
);
6169 if (_err
!= noErr
) return PyMac_Error(_err
);
6170 _res
= Py_BuildValue("O&hb",
6171 MovieObj_New
, theMovie
,
6177 static PyObject
*Qt_NewMovieFromHandle(PyObject
*_self
, PyObject
*_args
)
6179 PyObject
*_res
= NULL
;
6183 short newMovieFlags
;
6184 Boolean dataRefWasChanged
;
6185 if (!PyArg_ParseTuple(_args
, "O&h",
6189 _err
= NewMovieFromHandle(&theMovie
,
6192 &dataRefWasChanged
);
6193 if (_err
!= noErr
) return PyMac_Error(_err
);
6194 _res
= Py_BuildValue("O&b",
6195 MovieObj_New
, theMovie
,
6200 static PyObject
*Qt_NewMovieFromDataFork(PyObject
*_self
, PyObject
*_args
)
6202 PyObject
*_res
= NULL
;
6207 short newMovieFlags
;
6208 Boolean dataRefWasChanged
;
6209 if (!PyArg_ParseTuple(_args
, "hlh",
6214 _err
= NewMovieFromDataFork(&theMovie
,
6218 &dataRefWasChanged
);
6219 if (_err
!= noErr
) return PyMac_Error(_err
);
6220 _res
= Py_BuildValue("O&b",
6221 MovieObj_New
, theMovie
,
6226 static PyObject
*Qt_NewMovieFromDataFork64(PyObject
*_self
, PyObject
*_args
)
6228 PyObject
*_res
= NULL
;
6233 short newMovieFlags
;
6234 Boolean dataRefWasChanged
;
6235 if (!PyArg_ParseTuple(_args
, "lO&h",
6237 PyMac_Getwide
, &fileOffset
,
6240 _err
= NewMovieFromDataFork64(&theMovie
,
6244 &dataRefWasChanged
);
6245 if (_err
!= noErr
) return PyMac_Error(_err
);
6246 _res
= Py_BuildValue("O&b",
6247 MovieObj_New
, theMovie
,
6252 static PyObject
*Qt_NewMovieFromDataRef(PyObject
*_self
, PyObject
*_args
)
6254 PyObject
*_res
= NULL
;
6261 if (!PyArg_ParseTuple(_args
, "hO&O&",
6263 ResObj_Convert
, &dataRef
,
6264 PyMac_GetOSType
, &dataRefType
))
6266 _err
= NewMovieFromDataRef(&m
,
6271 if (_err
!= noErr
) return PyMac_Error(_err
);
6272 _res
= Py_BuildValue("O&h",
6278 static PyObject
*Qt_RemoveMovieResource(PyObject
*_self
, PyObject
*_args
)
6280 PyObject
*_res
= NULL
;
6284 if (!PyArg_ParseTuple(_args
, "hh",
6288 _err
= RemoveMovieResource(resRefNum
,
6290 if (_err
!= noErr
) return PyMac_Error(_err
);
6296 static PyObject
*Qt_CreateShortcutMovieFile(PyObject
*_self
, PyObject
*_args
)
6298 PyObject
*_res
= NULL
;
6302 ScriptCode scriptTag
;
6303 long createMovieFileFlags
;
6304 Handle targetDataRef
;
6305 OSType targetDataRefType
;
6306 if (!PyArg_ParseTuple(_args
, "O&O&hlO&O&",
6307 PyMac_GetFSSpec
, &fileSpec
,
6308 PyMac_GetOSType
, &creator
,
6310 &createMovieFileFlags
,
6311 ResObj_Convert
, &targetDataRef
,
6312 PyMac_GetOSType
, &targetDataRefType
))
6314 _err
= CreateShortcutMovieFile(&fileSpec
,
6317 createMovieFileFlags
,
6320 if (_err
!= noErr
) return PyMac_Error(_err
);
6326 static PyObject
*Qt_NewMovieFromScrap(PyObject
*_self
, PyObject
*_args
)
6328 PyObject
*_res
= NULL
;
6331 if (!PyArg_ParseTuple(_args
, "l",
6334 _rv
= NewMovieFromScrap(newMovieFlags
);
6335 _res
= Py_BuildValue("O&",
6340 static PyObject
*Qt_QTNewAlias(PyObject
*_self
, PyObject
*_args
)
6342 PyObject
*_res
= NULL
;
6347 if (!PyArg_ParseTuple(_args
, "O&b",
6348 PyMac_GetFSSpec
, &fss
,
6351 _err
= QTNewAlias(&fss
,
6354 if (_err
!= noErr
) return PyMac_Error(_err
);
6355 _res
= Py_BuildValue("O&",
6360 static PyObject
*Qt_EndFullScreen(PyObject
*_self
, PyObject
*_args
)
6362 PyObject
*_res
= NULL
;
6366 if (!PyArg_ParseTuple(_args
, "sl",
6370 _err
= EndFullScreen(fullState
,
6372 if (_err
!= noErr
) return PyMac_Error(_err
);
6378 static PyObject
*Qt_AddSoundDescriptionExtension(PyObject
*_self
, PyObject
*_args
)
6380 PyObject
*_res
= NULL
;
6382 SoundDescriptionHandle desc
;
6385 if (!PyArg_ParseTuple(_args
, "O&O&O&",
6386 ResObj_Convert
, &desc
,
6387 ResObj_Convert
, &extension
,
6388 PyMac_GetOSType
, &idType
))
6390 _err
= AddSoundDescriptionExtension(desc
,
6393 if (_err
!= noErr
) return PyMac_Error(_err
);
6399 static PyObject
*Qt_GetSoundDescriptionExtension(PyObject
*_self
, PyObject
*_args
)
6401 PyObject
*_res
= NULL
;
6403 SoundDescriptionHandle desc
;
6406 if (!PyArg_ParseTuple(_args
, "O&O&",
6407 ResObj_Convert
, &desc
,
6408 PyMac_GetOSType
, &idType
))
6410 _err
= GetSoundDescriptionExtension(desc
,
6413 if (_err
!= noErr
) return PyMac_Error(_err
);
6414 _res
= Py_BuildValue("O&",
6415 ResObj_New
, extension
);
6419 static PyObject
*Qt_RemoveSoundDescriptionExtension(PyObject
*_self
, PyObject
*_args
)
6421 PyObject
*_res
= NULL
;
6423 SoundDescriptionHandle desc
;
6425 if (!PyArg_ParseTuple(_args
, "O&O&",
6426 ResObj_Convert
, &desc
,
6427 PyMac_GetOSType
, &idType
))
6429 _err
= RemoveSoundDescriptionExtension(desc
,
6431 if (_err
!= noErr
) return PyMac_Error(_err
);
6437 static PyObject
*Qt_QTIsStandardParameterDialogEvent(PyObject
*_self
, PyObject
*_args
)
6439 PyObject
*_res
= NULL
;
6442 QTParameterDialog createdDialog
;
6443 if (!PyArg_ParseTuple(_args
, "l",
6446 _err
= QTIsStandardParameterDialogEvent(&pEvent
,
6448 if (_err
!= noErr
) return PyMac_Error(_err
);
6449 _res
= Py_BuildValue("O&",
6450 PyMac_BuildEventRecord
, &pEvent
);
6454 static PyObject
*Qt_QTDismissStandardParameterDialog(PyObject
*_self
, PyObject
*_args
)
6456 PyObject
*_res
= NULL
;
6458 QTParameterDialog createdDialog
;
6459 if (!PyArg_ParseTuple(_args
, "l",
6462 _err
= QTDismissStandardParameterDialog(createdDialog
);
6463 if (_err
!= noErr
) return PyMac_Error(_err
);
6469 static PyObject
*Qt_QTStandardParameterDialogDoAction(PyObject
*_self
, PyObject
*_args
)
6471 PyObject
*_res
= NULL
;
6473 QTParameterDialog createdDialog
;
6476 if (!PyArg_ParseTuple(_args
, "lls",
6481 _err
= QTStandardParameterDialogDoAction(createdDialog
,
6484 if (_err
!= noErr
) return PyMac_Error(_err
);
6490 static PyObject
*Qt_QTRegisterAccessKey(PyObject
*_self
, PyObject
*_args
)
6492 PyObject
*_res
= NULL
;
6494 Str255 accessKeyType
;
6497 if (!PyArg_ParseTuple(_args
, "O&lO&",
6498 PyMac_GetStr255
, accessKeyType
,
6500 ResObj_Convert
, &accessKey
))
6502 _err
= QTRegisterAccessKey(accessKeyType
,
6505 if (_err
!= noErr
) return PyMac_Error(_err
);
6511 static PyObject
*Qt_QTUnregisterAccessKey(PyObject
*_self
, PyObject
*_args
)
6513 PyObject
*_res
= NULL
;
6515 Str255 accessKeyType
;
6518 if (!PyArg_ParseTuple(_args
, "O&lO&",
6519 PyMac_GetStr255
, accessKeyType
,
6521 ResObj_Convert
, &accessKey
))
6523 _err
= QTUnregisterAccessKey(accessKeyType
,
6526 if (_err
!= noErr
) return PyMac_Error(_err
);
6532 static PyObject
*Qt_QTTextToNativeText(PyObject
*_self
, PyObject
*_args
)
6534 PyObject
*_res
= NULL
;
6539 if (!PyArg_ParseTuple(_args
, "O&ll",
6540 ResObj_Convert
, &theText
,
6544 _err
= QTTextToNativeText(theText
,
6547 if (_err
!= noErr
) return PyMac_Error(_err
);
6553 static PyObject
*Qt_VideoMediaResetStatistics(PyObject
*_self
, PyObject
*_args
)
6555 PyObject
*_res
= NULL
;
6556 ComponentResult _rv
;
6558 if (!PyArg_ParseTuple(_args
, "O&",
6559 CmpInstObj_Convert
, &mh
))
6561 _rv
= VideoMediaResetStatistics(mh
);
6562 _res
= Py_BuildValue("l",
6567 static PyObject
*Qt_VideoMediaGetStatistics(PyObject
*_self
, PyObject
*_args
)
6569 PyObject
*_res
= NULL
;
6570 ComponentResult _rv
;
6572 if (!PyArg_ParseTuple(_args
, "O&",
6573 CmpInstObj_Convert
, &mh
))
6575 _rv
= VideoMediaGetStatistics(mh
);
6576 _res
= Py_BuildValue("l",
6581 static PyObject
*Qt_VideoMediaGetStallCount(PyObject
*_self
, PyObject
*_args
)
6583 PyObject
*_res
= NULL
;
6584 ComponentResult _rv
;
6586 unsigned long stalls
;
6587 if (!PyArg_ParseTuple(_args
, "O&",
6588 CmpInstObj_Convert
, &mh
))
6590 _rv
= VideoMediaGetStallCount(mh
,
6592 _res
= Py_BuildValue("ll",
6598 static PyObject
*Qt_VideoMediaSetCodecParameter(PyObject
*_self
, PyObject
*_args
)
6600 PyObject
*_res
= NULL
;
6601 ComponentResult _rv
;
6605 long parameterChangeSeed
;
6608 if (!PyArg_ParseTuple(_args
, "O&O&O&lsl",
6609 CmpInstObj_Convert
, &mh
,
6610 PyMac_GetOSType
, &cType
,
6611 PyMac_GetOSType
, ¶meterID
,
6612 ¶meterChangeSeed
,
6616 _rv
= VideoMediaSetCodecParameter(mh
,
6619 parameterChangeSeed
,
6622 _res
= Py_BuildValue("l",
6627 static PyObject
*Qt_VideoMediaGetCodecParameter(PyObject
*_self
, PyObject
*_args
)
6629 PyObject
*_res
= NULL
;
6630 ComponentResult _rv
;
6634 Handle outParameterData
;
6635 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
6636 CmpInstObj_Convert
, &mh
,
6637 PyMac_GetOSType
, &cType
,
6638 PyMac_GetOSType
, ¶meterID
,
6639 ResObj_Convert
, &outParameterData
))
6641 _rv
= VideoMediaGetCodecParameter(mh
,
6645 _res
= Py_BuildValue("l",
6650 static PyObject
*Qt_TextMediaAddTextSample(PyObject
*_self
, PyObject
*_args
)
6652 PyObject
*_res
= NULL
;
6653 ComponentResult _rv
;
6662 short textJustification
;
6665 TimeValue scrollDelay
;
6668 RGBColor rgbHiliteColor
;
6670 TimeValue sampleTime
;
6671 if (!PyArg_ParseTuple(_args
, "O&slhhbhllhhl",
6672 CmpInstObj_Convert
, &mh
,
6685 _rv
= TextMediaAddTextSample(mh
,
6702 _res
= Py_BuildValue("lO&O&O&O&l",
6704 QdRGB_New
, &textColor
,
6705 QdRGB_New
, &backColor
,
6706 PyMac_BuildRect
, &textBox
,
6707 QdRGB_New
, &rgbHiliteColor
,
6712 static PyObject
*Qt_TextMediaAddTESample(PyObject
*_self
, PyObject
*_args
)
6714 PyObject
*_res
= NULL
;
6715 ComponentResult _rv
;
6719 short textJustification
;
6722 TimeValue scrollDelay
;
6725 RGBColor rgbHiliteColor
;
6727 TimeValue sampleTime
;
6728 if (!PyArg_ParseTuple(_args
, "O&O&hllhhl",
6729 CmpInstObj_Convert
, &mh
,
6730 ResObj_Convert
, &hTE
,
6738 _rv
= TextMediaAddTESample(mh
,
6750 _res
= Py_BuildValue("lO&O&O&l",
6752 QdRGB_New
, &backColor
,
6753 PyMac_BuildRect
, &textBox
,
6754 QdRGB_New
, &rgbHiliteColor
,
6759 static PyObject
*Qt_TextMediaAddHiliteSample(PyObject
*_self
, PyObject
*_args
)
6761 PyObject
*_res
= NULL
;
6762 ComponentResult _rv
;
6766 RGBColor rgbHiliteColor
;
6768 TimeValue sampleTime
;
6769 if (!PyArg_ParseTuple(_args
, "O&hhl",
6770 CmpInstObj_Convert
, &mh
,
6775 _rv
= TextMediaAddHiliteSample(mh
,
6781 _res
= Py_BuildValue("lO&l",
6783 QdRGB_New
, &rgbHiliteColor
,
6788 static PyObject
*Qt_TextMediaDrawRaw(PyObject
*_self
, PyObject
*_args
)
6790 PyObject
*_res
= NULL
;
6791 ComponentResult _rv
;
6797 TextDescriptionHandle tdh
;
6798 if (!PyArg_ParseTuple(_args
, "O&O&O&slO&",
6799 CmpInstObj_Convert
, &mh
,
6800 GWorldObj_Convert
, &gw
,
6801 OptResObj_Convert
, &gd
,
6804 ResObj_Convert
, &tdh
))
6806 _rv
= TextMediaDrawRaw(mh
,
6812 _res
= Py_BuildValue("l",
6817 static PyObject
*Qt_TextMediaSetTextProperty(PyObject
*_self
, PyObject
*_args
)
6819 PyObject
*_res
= NULL
;
6820 ComponentResult _rv
;
6822 TimeValue atMediaTime
;
6826 if (!PyArg_ParseTuple(_args
, "O&llsl",
6827 CmpInstObj_Convert
, &mh
,
6833 _rv
= TextMediaSetTextProperty(mh
,
6838 _res
= Py_BuildValue("l",
6843 static PyObject
*Qt_TextMediaRawSetup(PyObject
*_self
, PyObject
*_args
)
6845 PyObject
*_res
= NULL
;
6846 ComponentResult _rv
;
6852 TextDescriptionHandle tdh
;
6853 TimeValue sampleDuration
;
6854 if (!PyArg_ParseTuple(_args
, "O&O&O&slO&l",
6855 CmpInstObj_Convert
, &mh
,
6856 GWorldObj_Convert
, &gw
,
6857 OptResObj_Convert
, &gd
,
6860 ResObj_Convert
, &tdh
,
6863 _rv
= TextMediaRawSetup(mh
,
6870 _res
= Py_BuildValue("l",
6875 static PyObject
*Qt_TextMediaRawIdle(PyObject
*_self
, PyObject
*_args
)
6877 PyObject
*_res
= NULL
;
6878 ComponentResult _rv
;
6882 TimeValue sampleTime
;
6885 if (!PyArg_ParseTuple(_args
, "O&O&O&ll",
6886 CmpInstObj_Convert
, &mh
,
6887 GWorldObj_Convert
, &gw
,
6888 OptResObj_Convert
, &gd
,
6892 _rv
= TextMediaRawIdle(mh
,
6898 _res
= Py_BuildValue("ll",
6904 static PyObject
*Qt_TextMediaFindNextText(PyObject
*_self
, PyObject
*_args
)
6906 PyObject
*_res
= NULL
;
6907 ComponentResult _rv
;
6912 TimeValue startTime
;
6913 TimeValue foundTime
;
6914 TimeValue foundDuration
;
6916 if (!PyArg_ParseTuple(_args
, "O&slhl",
6917 CmpInstObj_Convert
, &mh
,
6923 _rv
= TextMediaFindNextText(mh
,
6931 _res
= Py_BuildValue("llll",
6939 static PyObject
*Qt_TextMediaHiliteTextSample(PyObject
*_self
, PyObject
*_args
)
6941 PyObject
*_res
= NULL
;
6942 ComponentResult _rv
;
6944 TimeValue sampleTime
;
6947 RGBColor rgbHiliteColor
;
6948 if (!PyArg_ParseTuple(_args
, "O&lhh",
6949 CmpInstObj_Convert
, &mh
,
6954 _rv
= TextMediaHiliteTextSample(mh
,
6959 _res
= Py_BuildValue("lO&",
6961 QdRGB_New
, &rgbHiliteColor
);
6965 static PyObject
*Qt_TextMediaSetTextSampleData(PyObject
*_self
, PyObject
*_args
)
6967 PyObject
*_res
= NULL
;
6968 ComponentResult _rv
;
6972 if (!PyArg_ParseTuple(_args
, "O&sO&",
6973 CmpInstObj_Convert
, &mh
,
6975 PyMac_GetOSType
, &dataType
))
6977 _rv
= TextMediaSetTextSampleData(mh
,
6980 _res
= Py_BuildValue("l",
6985 static PyObject
*Qt_SpriteMediaSetProperty(PyObject
*_self
, PyObject
*_args
)
6987 PyObject
*_res
= NULL
;
6988 ComponentResult _rv
;
6992 void * propertyValue
;
6993 if (!PyArg_ParseTuple(_args
, "O&hls",
6994 CmpInstObj_Convert
, &mh
,
6999 _rv
= SpriteMediaSetProperty(mh
,
7003 _res
= Py_BuildValue("l",
7008 static PyObject
*Qt_SpriteMediaGetProperty(PyObject
*_self
, PyObject
*_args
)
7010 PyObject
*_res
= NULL
;
7011 ComponentResult _rv
;
7015 void * propertyValue
;
7016 if (!PyArg_ParseTuple(_args
, "O&hls",
7017 CmpInstObj_Convert
, &mh
,
7022 _rv
= SpriteMediaGetProperty(mh
,
7026 _res
= Py_BuildValue("l",
7031 static PyObject
*Qt_SpriteMediaHitTestSprites(PyObject
*_self
, PyObject
*_args
)
7033 PyObject
*_res
= NULL
;
7034 ComponentResult _rv
;
7038 short spriteHitIndex
;
7039 if (!PyArg_ParseTuple(_args
, "O&lO&",
7040 CmpInstObj_Convert
, &mh
,
7042 PyMac_GetPoint
, &loc
))
7044 _rv
= SpriteMediaHitTestSprites(mh
,
7048 _res
= Py_BuildValue("lh",
7054 static PyObject
*Qt_SpriteMediaCountSprites(PyObject
*_self
, PyObject
*_args
)
7056 PyObject
*_res
= NULL
;
7057 ComponentResult _rv
;
7060 if (!PyArg_ParseTuple(_args
, "O&",
7061 CmpInstObj_Convert
, &mh
))
7063 _rv
= SpriteMediaCountSprites(mh
,
7065 _res
= Py_BuildValue("lh",
7071 static PyObject
*Qt_SpriteMediaCountImages(PyObject
*_self
, PyObject
*_args
)
7073 PyObject
*_res
= NULL
;
7074 ComponentResult _rv
;
7077 if (!PyArg_ParseTuple(_args
, "O&",
7078 CmpInstObj_Convert
, &mh
))
7080 _rv
= SpriteMediaCountImages(mh
,
7082 _res
= Py_BuildValue("lh",
7088 static PyObject
*Qt_SpriteMediaGetIndImageDescription(PyObject
*_self
, PyObject
*_args
)
7090 PyObject
*_res
= NULL
;
7091 ComponentResult _rv
;
7094 ImageDescriptionHandle imageDescription
;
7095 if (!PyArg_ParseTuple(_args
, "O&hO&",
7096 CmpInstObj_Convert
, &mh
,
7098 ResObj_Convert
, &imageDescription
))
7100 _rv
= SpriteMediaGetIndImageDescription(mh
,
7103 _res
= Py_BuildValue("l",
7108 static PyObject
*Qt_SpriteMediaGetDisplayedSampleNumber(PyObject
*_self
, PyObject
*_args
)
7110 PyObject
*_res
= NULL
;
7111 ComponentResult _rv
;
7114 if (!PyArg_ParseTuple(_args
, "O&",
7115 CmpInstObj_Convert
, &mh
))
7117 _rv
= SpriteMediaGetDisplayedSampleNumber(mh
,
7119 _res
= Py_BuildValue("ll",
7125 static PyObject
*Qt_SpriteMediaGetSpriteName(PyObject
*_self
, PyObject
*_args
)
7127 PyObject
*_res
= NULL
;
7128 ComponentResult _rv
;
7132 if (!PyArg_ParseTuple(_args
, "O&lO&",
7133 CmpInstObj_Convert
, &mh
,
7135 PyMac_GetStr255
, spriteName
))
7137 _rv
= SpriteMediaGetSpriteName(mh
,
7140 _res
= Py_BuildValue("l",
7145 static PyObject
*Qt_SpriteMediaGetImageName(PyObject
*_self
, PyObject
*_args
)
7147 PyObject
*_res
= NULL
;
7148 ComponentResult _rv
;
7152 if (!PyArg_ParseTuple(_args
, "O&hO&",
7153 CmpInstObj_Convert
, &mh
,
7155 PyMac_GetStr255
, imageName
))
7157 _rv
= SpriteMediaGetImageName(mh
,
7160 _res
= Py_BuildValue("l",
7165 static PyObject
*Qt_SpriteMediaSetSpriteProperty(PyObject
*_self
, PyObject
*_args
)
7167 PyObject
*_res
= NULL
;
7168 ComponentResult _rv
;
7172 void * propertyValue
;
7173 if (!PyArg_ParseTuple(_args
, "O&lls",
7174 CmpInstObj_Convert
, &mh
,
7179 _rv
= SpriteMediaSetSpriteProperty(mh
,
7183 _res
= Py_BuildValue("l",
7188 static PyObject
*Qt_SpriteMediaGetSpriteProperty(PyObject
*_self
, PyObject
*_args
)
7190 PyObject
*_res
= NULL
;
7191 ComponentResult _rv
;
7195 void * propertyValue
;
7196 if (!PyArg_ParseTuple(_args
, "O&lls",
7197 CmpInstObj_Convert
, &mh
,
7202 _rv
= SpriteMediaGetSpriteProperty(mh
,
7206 _res
= Py_BuildValue("l",
7211 static PyObject
*Qt_SpriteMediaHitTestAllSprites(PyObject
*_self
, PyObject
*_args
)
7213 PyObject
*_res
= NULL
;
7214 ComponentResult _rv
;
7218 QTAtomID spriteHitID
;
7219 if (!PyArg_ParseTuple(_args
, "O&lO&",
7220 CmpInstObj_Convert
, &mh
,
7222 PyMac_GetPoint
, &loc
))
7224 _rv
= SpriteMediaHitTestAllSprites(mh
,
7228 _res
= Py_BuildValue("ll",
7234 static PyObject
*Qt_SpriteMediaHitTestOneSprite(PyObject
*_self
, PyObject
*_args
)
7236 PyObject
*_res
= NULL
;
7237 ComponentResult _rv
;
7243 if (!PyArg_ParseTuple(_args
, "O&llO&",
7244 CmpInstObj_Convert
, &mh
,
7247 PyMac_GetPoint
, &loc
))
7249 _rv
= SpriteMediaHitTestOneSprite(mh
,
7254 _res
= Py_BuildValue("lb",
7260 static PyObject
*Qt_SpriteMediaSpriteIndexToID(PyObject
*_self
, PyObject
*_args
)
7262 PyObject
*_res
= NULL
;
7263 ComponentResult _rv
;
7267 if (!PyArg_ParseTuple(_args
, "O&h",
7268 CmpInstObj_Convert
, &mh
,
7271 _rv
= SpriteMediaSpriteIndexToID(mh
,
7274 _res
= Py_BuildValue("ll",
7280 static PyObject
*Qt_SpriteMediaSpriteIDToIndex(PyObject
*_self
, PyObject
*_args
)
7282 PyObject
*_res
= NULL
;
7283 ComponentResult _rv
;
7287 if (!PyArg_ParseTuple(_args
, "O&l",
7288 CmpInstObj_Convert
, &mh
,
7291 _rv
= SpriteMediaSpriteIDToIndex(mh
,
7294 _res
= Py_BuildValue("lh",
7300 static PyObject
*Qt_SpriteMediaSetActionVariable(PyObject
*_self
, PyObject
*_args
)
7302 PyObject
*_res
= NULL
;
7303 ComponentResult _rv
;
7305 QTAtomID variableID
;
7307 if (!PyArg_ParseTuple(_args
, "O&lf",
7308 CmpInstObj_Convert
, &mh
,
7312 _rv
= SpriteMediaSetActionVariable(mh
,
7315 _res
= Py_BuildValue("l",
7320 static PyObject
*Qt_SpriteMediaGetActionVariable(PyObject
*_self
, PyObject
*_args
)
7322 PyObject
*_res
= NULL
;
7323 ComponentResult _rv
;
7325 QTAtomID variableID
;
7327 if (!PyArg_ParseTuple(_args
, "O&l",
7328 CmpInstObj_Convert
, &mh
,
7331 _rv
= SpriteMediaGetActionVariable(mh
,
7334 _res
= Py_BuildValue("lf",
7340 #if !TARGET_API_MAC_CARBON
7342 static PyObject
*Qt_SpriteMediaGetIndImageProperty(PyObject
*_self
, PyObject
*_args
)
7344 PyObject
*_res
= NULL
;
7345 ComponentResult _rv
;
7348 long imagePropertyType
;
7349 void * imagePropertyValue
;
7350 if (!PyArg_ParseTuple(_args
, "O&hls",
7351 CmpInstObj_Convert
, &mh
,
7354 &imagePropertyValue
))
7356 _rv
= SpriteMediaGetIndImageProperty(mh
,
7359 imagePropertyValue
);
7360 _res
= Py_BuildValue("l",
7366 static PyObject
*Qt_SpriteMediaDisposeSprite(PyObject
*_self
, PyObject
*_args
)
7368 PyObject
*_res
= NULL
;
7369 ComponentResult _rv
;
7372 if (!PyArg_ParseTuple(_args
, "O&l",
7373 CmpInstObj_Convert
, &mh
,
7376 _rv
= SpriteMediaDisposeSprite(mh
,
7378 _res
= Py_BuildValue("l",
7383 static PyObject
*Qt_SpriteMediaSetActionVariableToString(PyObject
*_self
, PyObject
*_args
)
7385 PyObject
*_res
= NULL
;
7386 ComponentResult _rv
;
7388 QTAtomID variableID
;
7390 if (!PyArg_ParseTuple(_args
, "O&ls",
7391 CmpInstObj_Convert
, &mh
,
7395 _rv
= SpriteMediaSetActionVariableToString(mh
,
7398 _res
= Py_BuildValue("l",
7403 static PyObject
*Qt_SpriteMediaGetActionVariableAsString(PyObject
*_self
, PyObject
*_args
)
7405 PyObject
*_res
= NULL
;
7406 ComponentResult _rv
;
7408 QTAtomID variableID
;
7410 if (!PyArg_ParseTuple(_args
, "O&l",
7411 CmpInstObj_Convert
, &mh
,
7414 _rv
= SpriteMediaGetActionVariableAsString(mh
,
7417 _res
= Py_BuildValue("lO&",
7419 ResObj_New
, theCString
);
7423 static PyObject
*Qt_FlashMediaSetPan(PyObject
*_self
, PyObject
*_args
)
7425 PyObject
*_res
= NULL
;
7426 ComponentResult _rv
;
7430 if (!PyArg_ParseTuple(_args
, "O&hh",
7431 CmpInstObj_Convert
, &mh
,
7435 _rv
= FlashMediaSetPan(mh
,
7438 _res
= Py_BuildValue("l",
7443 static PyObject
*Qt_FlashMediaSetZoom(PyObject
*_self
, PyObject
*_args
)
7445 PyObject
*_res
= NULL
;
7446 ComponentResult _rv
;
7449 if (!PyArg_ParseTuple(_args
, "O&h",
7450 CmpInstObj_Convert
, &mh
,
7453 _rv
= FlashMediaSetZoom(mh
,
7455 _res
= Py_BuildValue("l",
7460 static PyObject
*Qt_FlashMediaSetZoomRect(PyObject
*_self
, PyObject
*_args
)
7462 PyObject
*_res
= NULL
;
7463 ComponentResult _rv
;
7469 if (!PyArg_ParseTuple(_args
, "O&llll",
7470 CmpInstObj_Convert
, &mh
,
7476 _rv
= FlashMediaSetZoomRect(mh
,
7481 _res
= Py_BuildValue("l",
7486 static PyObject
*Qt_FlashMediaGetRefConBounds(PyObject
*_self
, PyObject
*_args
)
7488 PyObject
*_res
= NULL
;
7489 ComponentResult _rv
;
7496 if (!PyArg_ParseTuple(_args
, "O&l",
7497 CmpInstObj_Convert
, &mh
,
7500 _rv
= FlashMediaGetRefConBounds(mh
,
7506 _res
= Py_BuildValue("lllll",
7515 static PyObject
*Qt_FlashMediaGetRefConID(PyObject
*_self
, PyObject
*_args
)
7517 PyObject
*_res
= NULL
;
7518 ComponentResult _rv
;
7522 if (!PyArg_ParseTuple(_args
, "O&l",
7523 CmpInstObj_Convert
, &mh
,
7526 _rv
= FlashMediaGetRefConID(mh
,
7529 _res
= Py_BuildValue("ll",
7535 static PyObject
*Qt_FlashMediaIDToRefCon(PyObject
*_self
, PyObject
*_args
)
7537 PyObject
*_res
= NULL
;
7538 ComponentResult _rv
;
7542 if (!PyArg_ParseTuple(_args
, "O&l",
7543 CmpInstObj_Convert
, &mh
,
7546 _rv
= FlashMediaIDToRefCon(mh
,
7549 _res
= Py_BuildValue("ll",
7555 static PyObject
*Qt_FlashMediaGetDisplayedFrameNumber(PyObject
*_self
, PyObject
*_args
)
7557 PyObject
*_res
= NULL
;
7558 ComponentResult _rv
;
7560 long flashFrameNumber
;
7561 if (!PyArg_ParseTuple(_args
, "O&",
7562 CmpInstObj_Convert
, &mh
))
7564 _rv
= FlashMediaGetDisplayedFrameNumber(mh
,
7566 _res
= Py_BuildValue("ll",
7572 static PyObject
*Qt_FlashMediaFrameNumberToMovieTime(PyObject
*_self
, PyObject
*_args
)
7574 PyObject
*_res
= NULL
;
7575 ComponentResult _rv
;
7577 long flashFrameNumber
;
7578 TimeValue movieTime
;
7579 if (!PyArg_ParseTuple(_args
, "O&l",
7580 CmpInstObj_Convert
, &mh
,
7583 _rv
= FlashMediaFrameNumberToMovieTime(mh
,
7586 _res
= Py_BuildValue("ll",
7592 static PyObject
*Qt_FlashMediaFrameLabelToMovieTime(PyObject
*_self
, PyObject
*_args
)
7594 PyObject
*_res
= NULL
;
7595 ComponentResult _rv
;
7598 TimeValue movieTime
;
7599 if (!PyArg_ParseTuple(_args
, "O&s",
7600 CmpInstObj_Convert
, &mh
,
7603 _rv
= FlashMediaFrameLabelToMovieTime(mh
,
7606 _res
= Py_BuildValue("ll",
7612 #if !TARGET_API_MAC_CARBON
7614 static PyObject
*Qt_MovieMediaGetCurrentMovieProperty(PyObject
*_self
, PyObject
*_args
)
7616 PyObject
*_res
= NULL
;
7617 ComponentResult _rv
;
7619 OSType whichProperty
;
7621 if (!PyArg_ParseTuple(_args
, "O&O&s",
7622 CmpInstObj_Convert
, &mh
,
7623 PyMac_GetOSType
, &whichProperty
,
7626 _rv
= MovieMediaGetCurrentMovieProperty(mh
,
7629 _res
= Py_BuildValue("l",
7635 #if !TARGET_API_MAC_CARBON
7637 static PyObject
*Qt_MovieMediaGetCurrentTrackProperty(PyObject
*_self
, PyObject
*_args
)
7639 PyObject
*_res
= NULL
;
7640 ComponentResult _rv
;
7643 OSType whichProperty
;
7645 if (!PyArg_ParseTuple(_args
, "O&lO&s",
7646 CmpInstObj_Convert
, &mh
,
7648 PyMac_GetOSType
, &whichProperty
,
7651 _rv
= MovieMediaGetCurrentTrackProperty(mh
,
7655 _res
= Py_BuildValue("l",
7661 #if !TARGET_API_MAC_CARBON
7663 static PyObject
*Qt_MovieMediaGetChildMovieDataReference(PyObject
*_self
, PyObject
*_args
)
7665 PyObject
*_res
= NULL
;
7666 ComponentResult _rv
;
7672 QTAtomID dataRefIDOut
;
7673 short dataRefIndexOut
;
7674 if (!PyArg_ParseTuple(_args
, "O&lh",
7675 CmpInstObj_Convert
, &mh
,
7679 _rv
= MovieMediaGetChildMovieDataReference(mh
,
7686 _res
= Py_BuildValue("lO&O&lh",
7688 PyMac_BuildOSType
, dataRefType
,
7689 ResObj_New
, dataRef
,
7696 #if !TARGET_API_MAC_CARBON
7698 static PyObject
*Qt_MovieMediaSetChildMovieDataReference(PyObject
*_self
, PyObject
*_args
)
7700 PyObject
*_res
= NULL
;
7701 ComponentResult _rv
;
7706 if (!PyArg_ParseTuple(_args
, "O&lO&O&",
7707 CmpInstObj_Convert
, &mh
,
7709 PyMac_GetOSType
, &dataRefType
,
7710 ResObj_Convert
, &dataRef
))
7712 _rv
= MovieMediaSetChildMovieDataReference(mh
,
7716 _res
= Py_BuildValue("l",
7722 #if !TARGET_API_MAC_CARBON
7724 static PyObject
*Qt_MovieMediaLoadChildMovieFromDataReference(PyObject
*_self
, PyObject
*_args
)
7726 PyObject
*_res
= NULL
;
7727 ComponentResult _rv
;
7730 if (!PyArg_ParseTuple(_args
, "O&l",
7731 CmpInstObj_Convert
, &mh
,
7734 _rv
= MovieMediaLoadChildMovieFromDataReference(mh
,
7736 _res
= Py_BuildValue("l",
7742 static PyObject
*Qt_Media3DGetCurrentGroup(PyObject
*_self
, PyObject
*_args
)
7744 PyObject
*_res
= NULL
;
7745 ComponentResult _rv
;
7748 if (!PyArg_ParseTuple(_args
, "O&s",
7749 CmpInstObj_Convert
, &mh
,
7752 _rv
= Media3DGetCurrentGroup(mh
,
7754 _res
= Py_BuildValue("l",
7759 static PyObject
*Qt_Media3DTranslateNamedObjectTo(PyObject
*_self
, PyObject
*_args
)
7761 PyObject
*_res
= NULL
;
7762 ComponentResult _rv
;
7768 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
7769 CmpInstObj_Convert
, &mh
,
7772 PyMac_GetFixed
, &z
))
7774 _rv
= Media3DTranslateNamedObjectTo(mh
,
7779 _res
= Py_BuildValue("lc",
7785 static PyObject
*Qt_Media3DScaleNamedObjectTo(PyObject
*_self
, PyObject
*_args
)
7787 PyObject
*_res
= NULL
;
7788 ComponentResult _rv
;
7794 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
7795 CmpInstObj_Convert
, &mh
,
7796 PyMac_GetFixed
, &xScale
,
7797 PyMac_GetFixed
, &yScale
,
7798 PyMac_GetFixed
, &zScale
))
7800 _rv
= Media3DScaleNamedObjectTo(mh
,
7805 _res
= Py_BuildValue("lc",
7811 static PyObject
*Qt_Media3DRotateNamedObjectTo(PyObject
*_self
, PyObject
*_args
)
7813 PyObject
*_res
= NULL
;
7814 ComponentResult _rv
;
7820 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
7821 CmpInstObj_Convert
, &mh
,
7822 PyMac_GetFixed
, &xDegrees
,
7823 PyMac_GetFixed
, &yDegrees
,
7824 PyMac_GetFixed
, &zDegrees
))
7826 _rv
= Media3DRotateNamedObjectTo(mh
,
7831 _res
= Py_BuildValue("lc",
7837 static PyObject
*Qt_Media3DSetCameraData(PyObject
*_self
, PyObject
*_args
)
7839 PyObject
*_res
= NULL
;
7840 ComponentResult _rv
;
7843 if (!PyArg_ParseTuple(_args
, "O&s",
7844 CmpInstObj_Convert
, &mh
,
7847 _rv
= Media3DSetCameraData(mh
,
7849 _res
= Py_BuildValue("l",
7854 static PyObject
*Qt_Media3DGetCameraData(PyObject
*_self
, PyObject
*_args
)
7856 PyObject
*_res
= NULL
;
7857 ComponentResult _rv
;
7860 if (!PyArg_ParseTuple(_args
, "O&s",
7861 CmpInstObj_Convert
, &mh
,
7864 _rv
= Media3DGetCameraData(mh
,
7866 _res
= Py_BuildValue("l",
7871 static PyObject
*Qt_Media3DSetCameraAngleAspect(PyObject
*_self
, PyObject
*_args
)
7873 PyObject
*_res
= NULL
;
7874 ComponentResult _rv
;
7877 QTFloatSingle aspectRatioXToY
;
7878 if (!PyArg_ParseTuple(_args
, "O&ff",
7879 CmpInstObj_Convert
, &mh
,
7883 _rv
= Media3DSetCameraAngleAspect(mh
,
7886 _res
= Py_BuildValue("l",
7891 static PyObject
*Qt_Media3DGetCameraAngleAspect(PyObject
*_self
, PyObject
*_args
)
7893 PyObject
*_res
= NULL
;
7894 ComponentResult _rv
;
7897 QTFloatSingle aspectRatioXToY
;
7898 if (!PyArg_ParseTuple(_args
, "O&",
7899 CmpInstObj_Convert
, &mh
))
7901 _rv
= Media3DGetCameraAngleAspect(mh
,
7904 _res
= Py_BuildValue("lff",
7911 static PyObject
*Qt_Media3DSetCameraRange(PyObject
*_self
, PyObject
*_args
)
7913 PyObject
*_res
= NULL
;
7914 ComponentResult _rv
;
7916 void * tQ3CameraRange
;
7917 if (!PyArg_ParseTuple(_args
, "O&s",
7918 CmpInstObj_Convert
, &mh
,
7921 _rv
= Media3DSetCameraRange(mh
,
7923 _res
= Py_BuildValue("l",
7928 static PyObject
*Qt_Media3DGetCameraRange(PyObject
*_self
, PyObject
*_args
)
7930 PyObject
*_res
= NULL
;
7931 ComponentResult _rv
;
7933 void * tQ3CameraRange
;
7934 if (!PyArg_ParseTuple(_args
, "O&s",
7935 CmpInstObj_Convert
, &mh
,
7938 _rv
= Media3DGetCameraRange(mh
,
7940 _res
= Py_BuildValue("l",
7945 #if !TARGET_API_MAC_CARBON
7947 static PyObject
*Qt_Media3DGetViewObject(PyObject
*_self
, PyObject
*_args
)
7949 PyObject
*_res
= NULL
;
7950 ComponentResult _rv
;
7952 void * tq3viewObject
;
7953 if (!PyArg_ParseTuple(_args
, "O&s",
7954 CmpInstObj_Convert
, &mh
,
7957 _rv
= Media3DGetViewObject(mh
,
7959 _res
= Py_BuildValue("l",
7965 static PyObject
*Qt_NewTimeBase(PyObject
*_self
, PyObject
*_args
)
7967 PyObject
*_res
= NULL
;
7969 if (!PyArg_ParseTuple(_args
, ""))
7971 _rv
= NewTimeBase();
7972 _res
= Py_BuildValue("O&",
7973 TimeBaseObj_New
, _rv
);
7977 static PyObject
*Qt_ConvertTime(PyObject
*_self
, PyObject
*_args
)
7979 PyObject
*_res
= NULL
;
7982 if (!PyArg_ParseTuple(_args
, "O&O&",
7983 QtTimeRecord_Convert
, &inout
,
7984 TimeBaseObj_Convert
, &newBase
))
7988 _res
= Py_BuildValue("O&",
7989 QtTimeRecord_New
, &inout
);
7993 static PyObject
*Qt_ConvertTimeScale(PyObject
*_self
, PyObject
*_args
)
7995 PyObject
*_res
= NULL
;
7998 if (!PyArg_ParseTuple(_args
, "O&l",
7999 QtTimeRecord_Convert
, &inout
,
8002 ConvertTimeScale(&inout
,
8004 _res
= Py_BuildValue("O&",
8005 QtTimeRecord_New
, &inout
);
8009 static PyObject
*Qt_AddTime(PyObject
*_self
, PyObject
*_args
)
8011 PyObject
*_res
= NULL
;
8014 if (!PyArg_ParseTuple(_args
, "O&O&",
8015 QtTimeRecord_Convert
, &dst
,
8016 QtTimeRecord_Convert
, &src
))
8020 _res
= Py_BuildValue("O&",
8021 QtTimeRecord_New
, &dst
);
8025 static PyObject
*Qt_SubtractTime(PyObject
*_self
, PyObject
*_args
)
8027 PyObject
*_res
= NULL
;
8030 if (!PyArg_ParseTuple(_args
, "O&O&",
8031 QtTimeRecord_Convert
, &dst
,
8032 QtTimeRecord_Convert
, &src
))
8036 _res
= Py_BuildValue("O&",
8037 QtTimeRecord_New
, &dst
);
8041 static PyObject
*Qt_MusicMediaGetIndexedTunePlayer(PyObject
*_self
, PyObject
*_args
)
8043 PyObject
*_res
= NULL
;
8044 ComponentResult _rv
;
8045 ComponentInstance ti
;
8046 long sampleDescIndex
;
8047 ComponentInstance tp
;
8048 if (!PyArg_ParseTuple(_args
, "O&l",
8049 CmpInstObj_Convert
, &ti
,
8052 _rv
= MusicMediaGetIndexedTunePlayer(ti
,
8055 _res
= Py_BuildValue("lO&",
8057 CmpInstObj_New
, tp
);
8061 static PyObject
*Qt_AlignWindow(PyObject
*_self
, PyObject
*_args
)
8063 PyObject
*_res
= NULL
;
8066 if (!PyArg_ParseTuple(_args
, "O&b",
8067 WinObj_Convert
, &wp
,
8073 (ICMAlignmentProcRecordPtr
)0);
8079 static PyObject
*Qt_DragAlignedWindow(PyObject
*_self
, PyObject
*_args
)
8081 PyObject
*_res
= NULL
;
8085 if (!PyArg_ParseTuple(_args
, "O&O&O&",
8086 WinObj_Convert
, &wp
,
8087 PyMac_GetPoint
, &startPt
,
8088 PyMac_GetRect
, &boundsRect
))
8090 DragAlignedWindow(wp
,
8094 (ICMAlignmentProcRecordPtr
)0);
8100 static PyObject
*Qt_MoviesTask(PyObject
*_self
, PyObject
*_args
)
8102 PyObject
*_res
= NULL
;
8103 long maxMilliSecToUse
;
8104 if (!PyArg_ParseTuple(_args
, "l",
8107 MoviesTask((Movie
)0,
8114 static PyMethodDef Qt_methods
[] = {
8116 #if !TARGET_API_MAC_CARBON
8117 {"CheckQuickTimeRegistration", (PyCFunction
)Qt_CheckQuickTimeRegistration
, 1,
8118 "(void * registrationKey, long flags) -> None"},
8120 {"EnterMovies", (PyCFunction
)Qt_EnterMovies
, 1,
8122 {"ExitMovies", (PyCFunction
)Qt_ExitMovies
, 1,
8124 {"GetMoviesError", (PyCFunction
)Qt_GetMoviesError
, 1,
8126 {"ClearMoviesStickyError", (PyCFunction
)Qt_ClearMoviesStickyError
, 1,
8128 {"GetMoviesStickyError", (PyCFunction
)Qt_GetMoviesStickyError
, 1,
8130 {"DisposeMatte", (PyCFunction
)Qt_DisposeMatte
, 1,
8131 "(PixMapHandle theMatte) -> None"},
8132 {"NewMovie", (PyCFunction
)Qt_NewMovie
, 1,
8133 "(long flags) -> (Movie _rv)"},
8134 {"GetDataHandler", (PyCFunction
)Qt_GetDataHandler
, 1,
8135 "(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)"},
8137 #if !TARGET_API_MAC_CARBON
8138 {"OpenADataHandler", (PyCFunction
)Qt_OpenADataHandler
, 1,
8139 "(Handle dataRef, OSType dataHandlerSubType, Handle anchorDataRef, OSType anchorDataRefType, TimeBase tb, long flags) -> (ComponentInstance dh)"},
8141 {"PasteHandleIntoMovie", (PyCFunction
)Qt_PasteHandleIntoMovie
, 1,
8142 "(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
8143 {"GetMovieImporterForDataRef", (PyCFunction
)Qt_GetMovieImporterForDataRef
, 1,
8144 "(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)"},
8145 {"TrackTimeToMediaTime", (PyCFunction
)Qt_TrackTimeToMediaTime
, 1,
8146 "(TimeValue value, Track theTrack) -> (TimeValue _rv)"},
8147 {"NewUserData", (PyCFunction
)Qt_NewUserData
, 1,
8148 "() -> (UserData theUserData)"},
8149 {"NewUserDataFromHandle", (PyCFunction
)Qt_NewUserDataFromHandle
, 1,
8150 "(Handle h) -> (UserData theUserData)"},
8151 {"CreateMovieFile", (PyCFunction
)Qt_CreateMovieFile
, 1,
8152 "(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)"},
8153 {"OpenMovieFile", (PyCFunction
)Qt_OpenMovieFile
, 1,
8154 "(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)"},
8155 {"CloseMovieFile", (PyCFunction
)Qt_CloseMovieFile
, 1,
8156 "(short resRefNum) -> None"},
8157 {"DeleteMovieFile", (PyCFunction
)Qt_DeleteMovieFile
, 1,
8158 "(FSSpec fileSpec) -> None"},
8159 {"NewMovieFromFile", (PyCFunction
)Qt_NewMovieFromFile
, 1,
8160 "(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)"},
8161 {"NewMovieFromHandle", (PyCFunction
)Qt_NewMovieFromHandle
, 1,
8162 "(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
8163 {"NewMovieFromDataFork", (PyCFunction
)Qt_NewMovieFromDataFork
, 1,
8164 "(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
8165 {"NewMovieFromDataFork64", (PyCFunction
)Qt_NewMovieFromDataFork64
, 1,
8166 "(long fRefNum, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
8167 {"NewMovieFromDataRef", (PyCFunction
)Qt_NewMovieFromDataRef
, 1,
8168 "(short flags, Handle dataRef, OSType dataRefType) -> (Movie m, short id)"},
8169 {"RemoveMovieResource", (PyCFunction
)Qt_RemoveMovieResource
, 1,
8170 "(short resRefNum, short resId) -> None"},
8171 {"CreateShortcutMovieFile", (PyCFunction
)Qt_CreateShortcutMovieFile
, 1,
8172 "(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None"},
8173 {"NewMovieFromScrap", (PyCFunction
)Qt_NewMovieFromScrap
, 1,
8174 "(long newMovieFlags) -> (Movie _rv)"},
8175 {"QTNewAlias", (PyCFunction
)Qt_QTNewAlias
, 1,
8176 "(FSSpec fss, Boolean minimal) -> (AliasHandle alias)"},
8177 {"EndFullScreen", (PyCFunction
)Qt_EndFullScreen
, 1,
8178 "(Ptr fullState, long flags) -> None"},
8179 {"AddSoundDescriptionExtension", (PyCFunction
)Qt_AddSoundDescriptionExtension
, 1,
8180 "(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None"},
8181 {"GetSoundDescriptionExtension", (PyCFunction
)Qt_GetSoundDescriptionExtension
, 1,
8182 "(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)"},
8183 {"RemoveSoundDescriptionExtension", (PyCFunction
)Qt_RemoveSoundDescriptionExtension
, 1,
8184 "(SoundDescriptionHandle desc, OSType idType) -> None"},
8185 {"QTIsStandardParameterDialogEvent", (PyCFunction
)Qt_QTIsStandardParameterDialogEvent
, 1,
8186 "(QTParameterDialog createdDialog) -> (EventRecord pEvent)"},
8187 {"QTDismissStandardParameterDialog", (PyCFunction
)Qt_QTDismissStandardParameterDialog
, 1,
8188 "(QTParameterDialog createdDialog) -> None"},
8189 {"QTStandardParameterDialogDoAction", (PyCFunction
)Qt_QTStandardParameterDialogDoAction
, 1,
8190 "(QTParameterDialog createdDialog, long action, void * params) -> None"},
8191 {"QTRegisterAccessKey", (PyCFunction
)Qt_QTRegisterAccessKey
, 1,
8192 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
8193 {"QTUnregisterAccessKey", (PyCFunction
)Qt_QTUnregisterAccessKey
, 1,
8194 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
8195 {"QTTextToNativeText", (PyCFunction
)Qt_QTTextToNativeText
, 1,
8196 "(Handle theText, long encoding, long flags) -> None"},
8197 {"VideoMediaResetStatistics", (PyCFunction
)Qt_VideoMediaResetStatistics
, 1,
8198 "(MediaHandler mh) -> (ComponentResult _rv)"},
8199 {"VideoMediaGetStatistics", (PyCFunction
)Qt_VideoMediaGetStatistics
, 1,
8200 "(MediaHandler mh) -> (ComponentResult _rv)"},
8201 {"VideoMediaGetStallCount", (PyCFunction
)Qt_VideoMediaGetStallCount
, 1,
8202 "(MediaHandler mh) -> (ComponentResult _rv, unsigned long stalls)"},
8203 {"VideoMediaSetCodecParameter", (PyCFunction
)Qt_VideoMediaSetCodecParameter
, 1,
8204 "(MediaHandler mh, CodecType cType, OSType parameterID, long parameterChangeSeed, void * dataPtr, long dataSize) -> (ComponentResult _rv)"},
8205 {"VideoMediaGetCodecParameter", (PyCFunction
)Qt_VideoMediaGetCodecParameter
, 1,
8206 "(MediaHandler mh, CodecType cType, OSType parameterID, Handle outParameterData) -> (ComponentResult _rv)"},
8207 {"TextMediaAddTextSample", (PyCFunction
)Qt_TextMediaAddTextSample
, 1,
8208 "(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)"},
8209 {"TextMediaAddTESample", (PyCFunction
)Qt_TextMediaAddTESample
, 1,
8210 "(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)"},
8211 {"TextMediaAddHiliteSample", (PyCFunction
)Qt_TextMediaAddHiliteSample
, 1,
8212 "(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
8213 {"TextMediaDrawRaw", (PyCFunction
)Qt_TextMediaDrawRaw
, 1,
8214 "(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh) -> (ComponentResult _rv)"},
8215 {"TextMediaSetTextProperty", (PyCFunction
)Qt_TextMediaSetTextProperty
, 1,
8216 "(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)"},
8217 {"TextMediaRawSetup", (PyCFunction
)Qt_TextMediaRawSetup
, 1,
8218 "(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)"},
8219 {"TextMediaRawIdle", (PyCFunction
)Qt_TextMediaRawIdle
, 1,
8220 "(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)"},
8221 {"TextMediaFindNextText", (PyCFunction
)Qt_TextMediaFindNextText
, 1,
8222 "(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)"},
8223 {"TextMediaHiliteTextSample", (PyCFunction
)Qt_TextMediaHiliteTextSample
, 1,
8224 "(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)"},
8225 {"TextMediaSetTextSampleData", (PyCFunction
)Qt_TextMediaSetTextSampleData
, 1,
8226 "(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)"},
8227 {"SpriteMediaSetProperty", (PyCFunction
)Qt_SpriteMediaSetProperty
, 1,
8228 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
8229 {"SpriteMediaGetProperty", (PyCFunction
)Qt_SpriteMediaGetProperty
, 1,
8230 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
8231 {"SpriteMediaHitTestSprites", (PyCFunction
)Qt_SpriteMediaHitTestSprites
, 1,
8232 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)"},
8233 {"SpriteMediaCountSprites", (PyCFunction
)Qt_SpriteMediaCountSprites
, 1,
8234 "(MediaHandler mh) -> (ComponentResult _rv, short numSprites)"},
8235 {"SpriteMediaCountImages", (PyCFunction
)Qt_SpriteMediaCountImages
, 1,
8236 "(MediaHandler mh) -> (ComponentResult _rv, short numImages)"},
8237 {"SpriteMediaGetIndImageDescription", (PyCFunction
)Qt_SpriteMediaGetIndImageDescription
, 1,
8238 "(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)"},
8239 {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction
)Qt_SpriteMediaGetDisplayedSampleNumber
, 1,
8240 "(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)"},
8241 {"SpriteMediaGetSpriteName", (PyCFunction
)Qt_SpriteMediaGetSpriteName
, 1,
8242 "(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)"},
8243 {"SpriteMediaGetImageName", (PyCFunction
)Qt_SpriteMediaGetImageName
, 1,
8244 "(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)"},
8245 {"SpriteMediaSetSpriteProperty", (PyCFunction
)Qt_SpriteMediaSetSpriteProperty
, 1,
8246 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
8247 {"SpriteMediaGetSpriteProperty", (PyCFunction
)Qt_SpriteMediaGetSpriteProperty
, 1,
8248 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
8249 {"SpriteMediaHitTestAllSprites", (PyCFunction
)Qt_SpriteMediaHitTestAllSprites
, 1,
8250 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)"},
8251 {"SpriteMediaHitTestOneSprite", (PyCFunction
)Qt_SpriteMediaHitTestOneSprite
, 1,
8252 "(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)"},
8253 {"SpriteMediaSpriteIndexToID", (PyCFunction
)Qt_SpriteMediaSpriteIndexToID
, 1,
8254 "(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)"},
8255 {"SpriteMediaSpriteIDToIndex", (PyCFunction
)Qt_SpriteMediaSpriteIDToIndex
, 1,
8256 "(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)"},
8257 {"SpriteMediaSetActionVariable", (PyCFunction
)Qt_SpriteMediaSetActionVariable
, 1,
8258 "(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)"},
8259 {"SpriteMediaGetActionVariable", (PyCFunction
)Qt_SpriteMediaGetActionVariable
, 1,
8260 "(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
8262 #if !TARGET_API_MAC_CARBON
8263 {"SpriteMediaGetIndImageProperty", (PyCFunction
)Qt_SpriteMediaGetIndImageProperty
, 1,
8264 "(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
8266 {"SpriteMediaDisposeSprite", (PyCFunction
)Qt_SpriteMediaDisposeSprite
, 1,
8267 "(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)"},
8268 {"SpriteMediaSetActionVariableToString", (PyCFunction
)Qt_SpriteMediaSetActionVariableToString
, 1,
8269 "(MediaHandler mh, QTAtomID variableID, Ptr theCString) -> (ComponentResult _rv)"},
8270 {"SpriteMediaGetActionVariableAsString", (PyCFunction
)Qt_SpriteMediaGetActionVariableAsString
, 1,
8271 "(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, Handle theCString)"},
8272 {"FlashMediaSetPan", (PyCFunction
)Qt_FlashMediaSetPan
, 1,
8273 "(MediaHandler mh, short xPercent, short yPercent) -> (ComponentResult _rv)"},
8274 {"FlashMediaSetZoom", (PyCFunction
)Qt_FlashMediaSetZoom
, 1,
8275 "(MediaHandler mh, short factor) -> (ComponentResult _rv)"},
8276 {"FlashMediaSetZoomRect", (PyCFunction
)Qt_FlashMediaSetZoomRect
, 1,
8277 "(MediaHandler mh, long left, long top, long right, long bottom) -> (ComponentResult _rv)"},
8278 {"FlashMediaGetRefConBounds", (PyCFunction
)Qt_FlashMediaGetRefConBounds
, 1,
8279 "(MediaHandler mh, long refCon) -> (ComponentResult _rv, long left, long top, long right, long bottom)"},
8280 {"FlashMediaGetRefConID", (PyCFunction
)Qt_FlashMediaGetRefConID
, 1,
8281 "(MediaHandler mh, long refCon) -> (ComponentResult _rv, long refConID)"},
8282 {"FlashMediaIDToRefCon", (PyCFunction
)Qt_FlashMediaIDToRefCon
, 1,
8283 "(MediaHandler mh, long refConID) -> (ComponentResult _rv, long refCon)"},
8284 {"FlashMediaGetDisplayedFrameNumber", (PyCFunction
)Qt_FlashMediaGetDisplayedFrameNumber
, 1,
8285 "(MediaHandler mh) -> (ComponentResult _rv, long flashFrameNumber)"},
8286 {"FlashMediaFrameNumberToMovieTime", (PyCFunction
)Qt_FlashMediaFrameNumberToMovieTime
, 1,
8287 "(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)"},
8288 {"FlashMediaFrameLabelToMovieTime", (PyCFunction
)Qt_FlashMediaFrameLabelToMovieTime
, 1,
8289 "(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)"},
8291 #if !TARGET_API_MAC_CARBON
8292 {"MovieMediaGetCurrentMovieProperty", (PyCFunction
)Qt_MovieMediaGetCurrentMovieProperty
, 1,
8293 "(MediaHandler mh, OSType whichProperty, void * value) -> (ComponentResult _rv)"},
8296 #if !TARGET_API_MAC_CARBON
8297 {"MovieMediaGetCurrentTrackProperty", (PyCFunction
)Qt_MovieMediaGetCurrentTrackProperty
, 1,
8298 "(MediaHandler mh, long trackID, OSType whichProperty, void * value) -> (ComponentResult _rv)"},
8301 #if !TARGET_API_MAC_CARBON
8302 {"MovieMediaGetChildMovieDataReference", (PyCFunction
)Qt_MovieMediaGetChildMovieDataReference
, 1,
8303 "(MediaHandler mh, QTAtomID dataRefID, short dataRefIndex) -> (ComponentResult _rv, OSType dataRefType, Handle dataRef, QTAtomID dataRefIDOut, short dataRefIndexOut)"},
8306 #if !TARGET_API_MAC_CARBON
8307 {"MovieMediaSetChildMovieDataReference", (PyCFunction
)Qt_MovieMediaSetChildMovieDataReference
, 1,
8308 "(MediaHandler mh, QTAtomID dataRefID, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)"},
8311 #if !TARGET_API_MAC_CARBON
8312 {"MovieMediaLoadChildMovieFromDataReference", (PyCFunction
)Qt_MovieMediaLoadChildMovieFromDataReference
, 1,
8313 "(MediaHandler mh, QTAtomID dataRefID) -> (ComponentResult _rv)"},
8315 {"Media3DGetCurrentGroup", (PyCFunction
)Qt_Media3DGetCurrentGroup
, 1,
8316 "(MediaHandler mh, void * group) -> (ComponentResult _rv)"},
8317 {"Media3DTranslateNamedObjectTo", (PyCFunction
)Qt_Media3DTranslateNamedObjectTo
, 1,
8318 "(MediaHandler mh, Fixed x, Fixed y, Fixed z) -> (ComponentResult _rv, char objectName)"},
8319 {"Media3DScaleNamedObjectTo", (PyCFunction
)Qt_Media3DScaleNamedObjectTo
, 1,
8320 "(MediaHandler mh, Fixed xScale, Fixed yScale, Fixed zScale) -> (ComponentResult _rv, char objectName)"},
8321 {"Media3DRotateNamedObjectTo", (PyCFunction
)Qt_Media3DRotateNamedObjectTo
, 1,
8322 "(MediaHandler mh, Fixed xDegrees, Fixed yDegrees, Fixed zDegrees) -> (ComponentResult _rv, char objectName)"},
8323 {"Media3DSetCameraData", (PyCFunction
)Qt_Media3DSetCameraData
, 1,
8324 "(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)"},
8325 {"Media3DGetCameraData", (PyCFunction
)Qt_Media3DGetCameraData
, 1,
8326 "(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)"},
8327 {"Media3DSetCameraAngleAspect", (PyCFunction
)Qt_Media3DSetCameraAngleAspect
, 1,
8328 "(MediaHandler mh, QTFloatSingle fov, QTFloatSingle aspectRatioXToY) -> (ComponentResult _rv)"},
8329 {"Media3DGetCameraAngleAspect", (PyCFunction
)Qt_Media3DGetCameraAngleAspect
, 1,
8330 "(MediaHandler mh) -> (ComponentResult _rv, QTFloatSingle fov, QTFloatSingle aspectRatioXToY)"},
8331 {"Media3DSetCameraRange", (PyCFunction
)Qt_Media3DSetCameraRange
, 1,
8332 "(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)"},
8333 {"Media3DGetCameraRange", (PyCFunction
)Qt_Media3DGetCameraRange
, 1,
8334 "(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)"},
8336 #if !TARGET_API_MAC_CARBON
8337 {"Media3DGetViewObject", (PyCFunction
)Qt_Media3DGetViewObject
, 1,
8338 "(MediaHandler mh, void * tq3viewObject) -> (ComponentResult _rv)"},
8340 {"NewTimeBase", (PyCFunction
)Qt_NewTimeBase
, 1,
8341 "() -> (TimeBase _rv)"},
8342 {"ConvertTime", (PyCFunction
)Qt_ConvertTime
, 1,
8343 "(TimeRecord inout, TimeBase newBase) -> (TimeRecord inout)"},
8344 {"ConvertTimeScale", (PyCFunction
)Qt_ConvertTimeScale
, 1,
8345 "(TimeRecord inout, TimeScale newScale) -> (TimeRecord inout)"},
8346 {"AddTime", (PyCFunction
)Qt_AddTime
, 1,
8347 "(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
8348 {"SubtractTime", (PyCFunction
)Qt_SubtractTime
, 1,
8349 "(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
8350 {"MusicMediaGetIndexedTunePlayer", (PyCFunction
)Qt_MusicMediaGetIndexedTunePlayer
, 1,
8351 "(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)"},
8352 {"AlignWindow", (PyCFunction
)Qt_AlignWindow
, 1,
8353 "(WindowPtr wp, Boolean front) -> None"},
8354 {"DragAlignedWindow", (PyCFunction
)Qt_DragAlignedWindow
, 1,
8355 "(WindowPtr wp, Point startPt, Rect boundsRect) -> None"},
8356 {"MoviesTask", (PyCFunction
)Qt_MoviesTask
, 1,
8357 "(long maxMilliSecToUse) -> None"},
8371 PyMac_INIT_TOOLBOX_OBJECT_NEW(Track
, TrackObj_New
);
8372 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track
, TrackObj_Convert
);
8373 PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie
, MovieObj_New
);
8374 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie
, MovieObj_Convert
);
8375 PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController
, MovieCtlObj_New
);
8376 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController
, MovieCtlObj_Convert
);
8377 PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase
, TimeBaseObj_New
);
8378 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase
, TimeBaseObj_Convert
);
8379 PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData
, UserDataObj_New
);
8380 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData
, UserDataObj_Convert
);
8381 PyMac_INIT_TOOLBOX_OBJECT_NEW(Media
, MediaObj_New
);
8382 PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media
, MediaObj_Convert
);
8385 m
= Py_InitModule("Qt", Qt_methods
);
8386 d
= PyModule_GetDict(m
);
8387 Qt_Error
= PyMac_GetOSErrException();
8388 if (Qt_Error
== NULL
||
8389 PyDict_SetItemString(d
, "Error", Qt_Error
) != 0)
8391 MovieController_Type
.ob_type
= &PyType_Type
;
8392 Py_INCREF(&MovieController_Type
);
8393 if (PyDict_SetItemString(d
, "MovieControllerType", (PyObject
*)&MovieController_Type
) != 0)
8394 Py_FatalError("can't initialize MovieControllerType");
8395 TimeBase_Type
.ob_type
= &PyType_Type
;
8396 Py_INCREF(&TimeBase_Type
);
8397 if (PyDict_SetItemString(d
, "TimeBaseType", (PyObject
*)&TimeBase_Type
) != 0)
8398 Py_FatalError("can't initialize TimeBaseType");
8399 UserData_Type
.ob_type
= &PyType_Type
;
8400 Py_INCREF(&UserData_Type
);
8401 if (PyDict_SetItemString(d
, "UserDataType", (PyObject
*)&UserData_Type
) != 0)
8402 Py_FatalError("can't initialize UserDataType");
8403 Media_Type
.ob_type
= &PyType_Type
;
8404 Py_INCREF(&Media_Type
);
8405 if (PyDict_SetItemString(d
, "MediaType", (PyObject
*)&Media_Type
) != 0)
8406 Py_FatalError("can't initialize MediaType");
8407 Track_Type
.ob_type
= &PyType_Type
;
8408 Py_INCREF(&Track_Type
);
8409 if (PyDict_SetItemString(d
, "TrackType", (PyObject
*)&Track_Type
) != 0)
8410 Py_FatalError("can't initialize TrackType");
8411 Movie_Type
.ob_type
= &PyType_Type
;
8412 Py_INCREF(&Movie_Type
);
8413 if (PyDict_SetItemString(d
, "MovieType", (PyObject
*)&Movie_Type
) != 0)
8414 Py_FatalError("can't initialize MovieType");
8417 /* ========================= End module Qt ========================== */