2 /* =========================== Module Qt ============================ */
8 #define SystemSevenOrLater 1
16 extern PyObject
*ResObj_New(Handle
);
17 extern int ResObj_Convert(PyObject
*, Handle
*);
18 extern PyObject
*OptResObj_New(Handle
);
19 extern int OptResObj_Convert(PyObject
*, Handle
*);
21 extern PyObject
*WinObj_New(WindowPtr
);
22 extern int WinObj_Convert(PyObject
*, WindowPtr
*);
23 extern PyTypeObject Window_Type
;
24 #define WinObj_Check(x) ((x)->ob_type == &Window_Type)
26 extern PyObject
*DlgObj_New(DialogPtr
);
27 extern int DlgObj_Convert(PyObject
*, DialogPtr
*);
28 extern PyTypeObject Dialog_Type
;
29 #define DlgObj_Check(x) ((x)->ob_type == &Dialog_Type)
31 extern PyObject
*MenuObj_New(MenuHandle
);
32 extern int MenuObj_Convert(PyObject
*, MenuHandle
*);
34 extern PyObject
*CtlObj_New(ControlHandle
);
35 extern int CtlObj_Convert(PyObject
*, ControlHandle
*);
37 extern PyObject
*GrafObj_New(GrafPtr
);
38 extern int GrafObj_Convert(PyObject
*, GrafPtr
*);
40 extern PyObject
*BMObj_New(BitMapPtr
);
41 extern int BMObj_Convert(PyObject
*, BitMapPtr
*);
43 extern PyObject
*WinObj_WhichWindow(WindowPtr
);
47 /* Exported by Cmmodule.c: */
48 extern PyObject
*CmpObj_New(Component
);
49 extern int CmpObj_Convert(PyObject
*, Component
*);
50 extern PyObject
*CmpInstObj_New(ComponentInstance
);
51 extern int CmpInstObj_Convert(PyObject
*, ComponentInstance
*);
53 /* Exported by Qdmodule.c: */
54 extern PyObject
*QdRGB_New(RGBColor
*);
55 extern int QdRGB_Convert(PyObject
*, RGBColor
*);
57 /* Our own, used before defined: */
58 staticforward PyObject
*TrackObj_New(Track
);
59 staticforward
int TrackObj_Convert(PyObject
*, Track
*);
60 staticforward PyObject
*MovieObj_New(Movie
);
61 staticforward
int MovieObj_Convert(PyObject
*, Movie
*);
62 staticforward PyObject
*MovieCtlObj_New(MovieController
);
63 staticforward
int MovieCtlObj_Convert(PyObject
*, TimeBase
*);
64 staticforward PyObject
*TimeBaseObj_New(TimeBase
);
65 staticforward
int TimeBaseObj_Convert(PyObject
*, TimeBase
*);
68 ** Parse/generate time records
71 QtTimeRecord_New(itself
)
75 return Py_BuildValue("O&lO&", PyMac_Buildwide
, &itself
->value
, itself
->scale
,
76 TimeBaseObj_New
, itself
->base
);
80 QtTimeRecord_Convert(v
, p_itself
)
85 if( !PyArg_ParseTuple(v
, "O&lO&", PyMac_Getwide
, &p_itself
->value
, &p_itself
->scale
,
86 TimeBaseObj_Convert
, &p_itself
->base
) )
94 static PyObject
*Qt_Error
;
96 /* ------------------ Object type MovieController ------------------- */
98 PyTypeObject MovieController_Type
;
100 #define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type)
102 typedef struct MovieControllerObject
{
104 MovieController ob_itself
;
105 } MovieControllerObject
;
107 PyObject
*MovieCtlObj_New(itself
)
108 MovieController itself
;
110 MovieControllerObject
*it
;
111 if (itself
== NULL
) {
112 PyErr_SetString(Qt_Error
,"Cannot create null MovieController");
115 it
= PyObject_NEW(MovieControllerObject
, &MovieController_Type
);
116 if (it
== NULL
) return NULL
;
117 it
->ob_itself
= itself
;
118 return (PyObject
*)it
;
120 MovieCtlObj_Convert(v
, p_itself
)
122 MovieController
*p_itself
;
124 if (!MovieCtlObj_Check(v
))
126 PyErr_SetString(PyExc_TypeError
, "MovieController required");
129 *p_itself
= ((MovieControllerObject
*)v
)->ob_itself
;
133 static void MovieCtlObj_dealloc(self
)
134 MovieControllerObject
*self
;
136 DisposeMovieController(self
->ob_itself
);
140 static PyObject
*MovieCtlObj_MCSetMovie(_self
, _args
)
141 MovieControllerObject
*_self
;
144 PyObject
*_res
= NULL
;
147 WindowPtr movieWindow
;
149 if (!PyArg_ParseTuple(_args
, "O&O&O&",
150 MovieObj_Convert
, &theMovie
,
151 WinObj_Convert
, &movieWindow
,
152 PyMac_GetPoint
, &where
))
154 _rv
= MCSetMovie(_self
->ob_itself
,
158 _res
= Py_BuildValue("l",
163 static PyObject
*MovieCtlObj_MCGetIndMovie(_self
, _args
)
164 MovieControllerObject
*_self
;
167 PyObject
*_res
= NULL
;
170 if (!PyArg_ParseTuple(_args
, "h",
173 _rv
= MCGetIndMovie(_self
->ob_itself
,
175 _res
= Py_BuildValue("O&",
180 static PyObject
*MovieCtlObj_MCRemoveAllMovies(_self
, _args
)
181 MovieControllerObject
*_self
;
184 PyObject
*_res
= NULL
;
186 if (!PyArg_ParseTuple(_args
, ""))
188 _rv
= MCRemoveAllMovies(_self
->ob_itself
);
189 _res
= Py_BuildValue("l",
194 static PyObject
*MovieCtlObj_MCRemoveAMovie(_self
, _args
)
195 MovieControllerObject
*_self
;
198 PyObject
*_res
= NULL
;
201 if (!PyArg_ParseTuple(_args
, "O&",
202 MovieObj_Convert
, &m
))
204 _rv
= MCRemoveAMovie(_self
->ob_itself
,
206 _res
= Py_BuildValue("l",
211 static PyObject
*MovieCtlObj_MCRemoveMovie(_self
, _args
)
212 MovieControllerObject
*_self
;
215 PyObject
*_res
= NULL
;
217 if (!PyArg_ParseTuple(_args
, ""))
219 _rv
= MCRemoveMovie(_self
->ob_itself
);
220 _res
= Py_BuildValue("l",
225 static PyObject
*MovieCtlObj_MCIsPlayerEvent(_self
, _args
)
226 MovieControllerObject
*_self
;
229 PyObject
*_res
= NULL
;
232 if (!PyArg_ParseTuple(_args
, "O&",
233 PyMac_GetEventRecord
, &e
))
235 _rv
= MCIsPlayerEvent(_self
->ob_itself
,
237 _res
= Py_BuildValue("l",
242 static PyObject
*MovieCtlObj_MCDoAction(_self
, _args
)
243 MovieControllerObject
*_self
;
246 PyObject
*_res
= NULL
;
250 if (!PyArg_ParseTuple(_args
, "hs",
254 _rv
= MCDoAction(_self
->ob_itself
,
257 _res
= Py_BuildValue("l",
262 static PyObject
*MovieCtlObj_MCSetControllerAttached(_self
, _args
)
263 MovieControllerObject
*_self
;
266 PyObject
*_res
= NULL
;
269 if (!PyArg_ParseTuple(_args
, "b",
272 _rv
= MCSetControllerAttached(_self
->ob_itself
,
274 _res
= Py_BuildValue("l",
279 static PyObject
*MovieCtlObj_MCIsControllerAttached(_self
, _args
)
280 MovieControllerObject
*_self
;
283 PyObject
*_res
= NULL
;
285 if (!PyArg_ParseTuple(_args
, ""))
287 _rv
= MCIsControllerAttached(_self
->ob_itself
);
288 _res
= Py_BuildValue("l",
293 static PyObject
*MovieCtlObj_MCSetControllerPort(_self
, _args
)
294 MovieControllerObject
*_self
;
297 PyObject
*_res
= NULL
;
300 if (!PyArg_ParseTuple(_args
, "O&",
301 GrafObj_Convert
, &gp
))
303 _rv
= MCSetControllerPort(_self
->ob_itself
,
305 _res
= Py_BuildValue("l",
310 static PyObject
*MovieCtlObj_MCGetControllerPort(_self
, _args
)
311 MovieControllerObject
*_self
;
314 PyObject
*_res
= NULL
;
316 if (!PyArg_ParseTuple(_args
, ""))
318 _rv
= MCGetControllerPort(_self
->ob_itself
);
319 _res
= Py_BuildValue("O&",
324 static PyObject
*MovieCtlObj_MCSetVisible(_self
, _args
)
325 MovieControllerObject
*_self
;
328 PyObject
*_res
= NULL
;
331 if (!PyArg_ParseTuple(_args
, "b",
334 _rv
= MCSetVisible(_self
->ob_itself
,
336 _res
= Py_BuildValue("l",
341 static PyObject
*MovieCtlObj_MCGetVisible(_self
, _args
)
342 MovieControllerObject
*_self
;
345 PyObject
*_res
= NULL
;
347 if (!PyArg_ParseTuple(_args
, ""))
349 _rv
= MCGetVisible(_self
->ob_itself
);
350 _res
= Py_BuildValue("l",
355 static PyObject
*MovieCtlObj_MCGetControllerBoundsRect(_self
, _args
)
356 MovieControllerObject
*_self
;
359 PyObject
*_res
= NULL
;
362 if (!PyArg_ParseTuple(_args
, ""))
364 _rv
= MCGetControllerBoundsRect(_self
->ob_itself
,
366 _res
= Py_BuildValue("lO&",
368 PyMac_BuildRect
, &bounds
);
372 static PyObject
*MovieCtlObj_MCSetControllerBoundsRect(_self
, _args
)
373 MovieControllerObject
*_self
;
376 PyObject
*_res
= NULL
;
379 if (!PyArg_ParseTuple(_args
, "O&",
380 PyMac_GetRect
, &bounds
))
382 _rv
= MCSetControllerBoundsRect(_self
->ob_itself
,
384 _res
= Py_BuildValue("l",
389 static PyObject
*MovieCtlObj_MCGetControllerBoundsRgn(_self
, _args
)
390 MovieControllerObject
*_self
;
393 PyObject
*_res
= NULL
;
395 if (!PyArg_ParseTuple(_args
, ""))
397 _rv
= MCGetControllerBoundsRgn(_self
->ob_itself
);
398 _res
= Py_BuildValue("O&",
403 static PyObject
*MovieCtlObj_MCGetWindowRgn(_self
, _args
)
404 MovieControllerObject
*_self
;
407 PyObject
*_res
= NULL
;
410 if (!PyArg_ParseTuple(_args
, "O&",
413 _rv
= MCGetWindowRgn(_self
->ob_itself
,
415 _res
= Py_BuildValue("O&",
420 static PyObject
*MovieCtlObj_MCMovieChanged(_self
, _args
)
421 MovieControllerObject
*_self
;
424 PyObject
*_res
= NULL
;
427 if (!PyArg_ParseTuple(_args
, "O&",
428 MovieObj_Convert
, &m
))
430 _rv
= MCMovieChanged(_self
->ob_itself
,
432 _res
= Py_BuildValue("l",
437 static PyObject
*MovieCtlObj_MCSetDuration(_self
, _args
)
438 MovieControllerObject
*_self
;
441 PyObject
*_res
= NULL
;
444 if (!PyArg_ParseTuple(_args
, "l",
447 _rv
= MCSetDuration(_self
->ob_itself
,
449 _res
= Py_BuildValue("l",
454 static PyObject
*MovieCtlObj_MCGetCurrentTime(_self
, _args
)
455 MovieControllerObject
*_self
;
458 PyObject
*_res
= NULL
;
461 if (!PyArg_ParseTuple(_args
, ""))
463 _rv
= MCGetCurrentTime(_self
->ob_itself
,
465 _res
= Py_BuildValue("ll",
471 static PyObject
*MovieCtlObj_MCNewAttachedController(_self
, _args
)
472 MovieControllerObject
*_self
;
475 PyObject
*_res
= NULL
;
480 if (!PyArg_ParseTuple(_args
, "O&O&O&",
481 MovieObj_Convert
, &theMovie
,
483 PyMac_GetPoint
, &where
))
485 _rv
= MCNewAttachedController(_self
->ob_itself
,
489 _res
= Py_BuildValue("l",
494 static PyObject
*MovieCtlObj_MCDraw(_self
, _args
)
495 MovieControllerObject
*_self
;
498 PyObject
*_res
= NULL
;
501 if (!PyArg_ParseTuple(_args
, "O&",
504 _rv
= MCDraw(_self
->ob_itself
,
506 _res
= Py_BuildValue("l",
511 static PyObject
*MovieCtlObj_MCActivate(_self
, _args
)
512 MovieControllerObject
*_self
;
515 PyObject
*_res
= NULL
;
519 if (!PyArg_ParseTuple(_args
, "O&b",
523 _rv
= MCActivate(_self
->ob_itself
,
526 _res
= Py_BuildValue("l",
531 static PyObject
*MovieCtlObj_MCIdle(_self
, _args
)
532 MovieControllerObject
*_self
;
535 PyObject
*_res
= NULL
;
537 if (!PyArg_ParseTuple(_args
, ""))
539 _rv
= MCIdle(_self
->ob_itself
);
540 _res
= Py_BuildValue("l",
545 static PyObject
*MovieCtlObj_MCKey(_self
, _args
)
546 MovieControllerObject
*_self
;
549 PyObject
*_res
= NULL
;
553 if (!PyArg_ParseTuple(_args
, "bl",
557 _rv
= MCKey(_self
->ob_itself
,
560 _res
= Py_BuildValue("l",
565 static PyObject
*MovieCtlObj_MCClick(_self
, _args
)
566 MovieControllerObject
*_self
;
569 PyObject
*_res
= NULL
;
575 if (!PyArg_ParseTuple(_args
, "O&O&ll",
577 PyMac_GetPoint
, &where
,
581 _rv
= MCClick(_self
->ob_itself
,
586 _res
= Py_BuildValue("l",
591 static PyObject
*MovieCtlObj_MCEnableEditing(_self
, _args
)
592 MovieControllerObject
*_self
;
595 PyObject
*_res
= NULL
;
598 if (!PyArg_ParseTuple(_args
, "b",
601 _rv
= MCEnableEditing(_self
->ob_itself
,
603 _res
= Py_BuildValue("l",
608 static PyObject
*MovieCtlObj_MCIsEditingEnabled(_self
, _args
)
609 MovieControllerObject
*_self
;
612 PyObject
*_res
= NULL
;
614 if (!PyArg_ParseTuple(_args
, ""))
616 _rv
= MCIsEditingEnabled(_self
->ob_itself
);
617 _res
= Py_BuildValue("l",
622 static PyObject
*MovieCtlObj_MCCopy(_self
, _args
)
623 MovieControllerObject
*_self
;
626 PyObject
*_res
= NULL
;
628 if (!PyArg_ParseTuple(_args
, ""))
630 _rv
= MCCopy(_self
->ob_itself
);
631 _res
= Py_BuildValue("O&",
636 static PyObject
*MovieCtlObj_MCCut(_self
, _args
)
637 MovieControllerObject
*_self
;
640 PyObject
*_res
= NULL
;
642 if (!PyArg_ParseTuple(_args
, ""))
644 _rv
= MCCut(_self
->ob_itself
);
645 _res
= Py_BuildValue("O&",
650 static PyObject
*MovieCtlObj_MCPaste(_self
, _args
)
651 MovieControllerObject
*_self
;
654 PyObject
*_res
= NULL
;
657 if (!PyArg_ParseTuple(_args
, "O&",
658 MovieObj_Convert
, &srcMovie
))
660 _rv
= MCPaste(_self
->ob_itself
,
662 _res
= Py_BuildValue("l",
667 static PyObject
*MovieCtlObj_MCClear(_self
, _args
)
668 MovieControllerObject
*_self
;
671 PyObject
*_res
= NULL
;
673 if (!PyArg_ParseTuple(_args
, ""))
675 _rv
= MCClear(_self
->ob_itself
);
676 _res
= Py_BuildValue("l",
681 static PyObject
*MovieCtlObj_MCUndo(_self
, _args
)
682 MovieControllerObject
*_self
;
685 PyObject
*_res
= NULL
;
687 if (!PyArg_ParseTuple(_args
, ""))
689 _rv
= MCUndo(_self
->ob_itself
);
690 _res
= Py_BuildValue("l",
695 static PyObject
*MovieCtlObj_MCPositionController(_self
, _args
)
696 MovieControllerObject
*_self
;
699 PyObject
*_res
= NULL
;
704 if (!PyArg_ParseTuple(_args
, "O&O&l",
705 PyMac_GetRect
, &movieRect
,
706 PyMac_GetRect
, &controllerRect
,
709 _rv
= MCPositionController(_self
->ob_itself
,
713 _res
= Py_BuildValue("l",
718 static PyObject
*MovieCtlObj_MCGetControllerInfo(_self
, _args
)
719 MovieControllerObject
*_self
;
722 PyObject
*_res
= NULL
;
725 if (!PyArg_ParseTuple(_args
, ""))
727 _rv
= MCGetControllerInfo(_self
->ob_itself
,
729 _res
= Py_BuildValue("ll",
735 static PyObject
*MovieCtlObj_MCSetClip(_self
, _args
)
736 MovieControllerObject
*_self
;
739 PyObject
*_res
= NULL
;
743 if (!PyArg_ParseTuple(_args
, "O&O&",
744 ResObj_Convert
, &theClip
,
745 ResObj_Convert
, &movieClip
))
747 _rv
= MCSetClip(_self
->ob_itself
,
750 _res
= Py_BuildValue("l",
755 static PyObject
*MovieCtlObj_MCGetClip(_self
, _args
)
756 MovieControllerObject
*_self
;
759 PyObject
*_res
= NULL
;
763 if (!PyArg_ParseTuple(_args
, ""))
765 _rv
= MCGetClip(_self
->ob_itself
,
768 _res
= Py_BuildValue("lO&O&",
771 ResObj_New
, movieClip
);
775 static PyObject
*MovieCtlObj_MCDrawBadge(_self
, _args
)
776 MovieControllerObject
*_self
;
779 PyObject
*_res
= NULL
;
783 if (!PyArg_ParseTuple(_args
, "O&",
784 ResObj_Convert
, &movieRgn
))
786 _rv
= MCDrawBadge(_self
->ob_itself
,
789 _res
= Py_BuildValue("lO&",
791 ResObj_New
, badgeRgn
);
795 static PyObject
*MovieCtlObj_MCSetUpEditMenu(_self
, _args
)
796 MovieControllerObject
*_self
;
799 PyObject
*_res
= NULL
;
803 if (!PyArg_ParseTuple(_args
, "lO&",
805 MenuObj_Convert
, &mh
))
807 _rv
= MCSetUpEditMenu(_self
->ob_itself
,
810 _res
= Py_BuildValue("l",
815 static PyObject
*MovieCtlObj_MCGetMenuString(_self
, _args
)
816 MovieControllerObject
*_self
;
819 PyObject
*_res
= NULL
;
824 if (!PyArg_ParseTuple(_args
, "lhO&",
827 PyMac_GetStr255
, aString
))
829 _rv
= MCGetMenuString(_self
->ob_itself
,
833 _res
= Py_BuildValue("l",
838 static PyObject
*MovieCtlObj_MCPtInController(_self
, _args
)
839 MovieControllerObject
*_self
;
842 PyObject
*_res
= NULL
;
845 Boolean inController
;
846 if (!PyArg_ParseTuple(_args
, "O&",
847 PyMac_GetPoint
, &thePt
))
849 _rv
= MCPtInController(_self
->ob_itself
,
852 _res
= Py_BuildValue("lb",
858 static PyObject
*MovieCtlObj_MCInvalidate(_self
, _args
)
859 MovieControllerObject
*_self
;
862 PyObject
*_res
= NULL
;
865 RgnHandle invalidRgn
;
866 if (!PyArg_ParseTuple(_args
, "O&O&",
868 ResObj_Convert
, &invalidRgn
))
870 _rv
= MCInvalidate(_self
->ob_itself
,
873 _res
= Py_BuildValue("l",
878 static PyObject
*MovieCtlObj_MCAdjustCursor(_self
, _args
)
879 MovieControllerObject
*_self
;
882 PyObject
*_res
= NULL
;
887 if (!PyArg_ParseTuple(_args
, "O&O&l",
889 PyMac_GetPoint
, &where
,
892 _rv
= MCAdjustCursor(_self
->ob_itself
,
896 _res
= Py_BuildValue("l",
901 static PyObject
*MovieCtlObj_MCGetInterfaceElement(_self
, _args
)
902 MovieControllerObject
*_self
;
905 PyObject
*_res
= NULL
;
907 MCInterfaceElement whichElement
;
909 if (!PyArg_ParseTuple(_args
, "ls",
913 _rv
= MCGetInterfaceElement(_self
->ob_itself
,
916 _res
= Py_BuildValue("l",
921 static PyMethodDef MovieCtlObj_methods
[] = {
922 {"MCSetMovie", (PyCFunction
)MovieCtlObj_MCSetMovie
, 1,
923 "(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)"},
924 {"MCGetIndMovie", (PyCFunction
)MovieCtlObj_MCGetIndMovie
, 1,
925 "(short index) -> (Movie _rv)"},
926 {"MCRemoveAllMovies", (PyCFunction
)MovieCtlObj_MCRemoveAllMovies
, 1,
927 "() -> (ComponentResult _rv)"},
928 {"MCRemoveAMovie", (PyCFunction
)MovieCtlObj_MCRemoveAMovie
, 1,
929 "(Movie m) -> (ComponentResult _rv)"},
930 {"MCRemoveMovie", (PyCFunction
)MovieCtlObj_MCRemoveMovie
, 1,
931 "() -> (ComponentResult _rv)"},
932 {"MCIsPlayerEvent", (PyCFunction
)MovieCtlObj_MCIsPlayerEvent
, 1,
933 "(EventRecord e) -> (ComponentResult _rv)"},
934 {"MCDoAction", (PyCFunction
)MovieCtlObj_MCDoAction
, 1,
935 "(short action, void * params) -> (ComponentResult _rv)"},
936 {"MCSetControllerAttached", (PyCFunction
)MovieCtlObj_MCSetControllerAttached
, 1,
937 "(Boolean attach) -> (ComponentResult _rv)"},
938 {"MCIsControllerAttached", (PyCFunction
)MovieCtlObj_MCIsControllerAttached
, 1,
939 "() -> (ComponentResult _rv)"},
940 {"MCSetControllerPort", (PyCFunction
)MovieCtlObj_MCSetControllerPort
, 1,
941 "(CGrafPtr gp) -> (ComponentResult _rv)"},
942 {"MCGetControllerPort", (PyCFunction
)MovieCtlObj_MCGetControllerPort
, 1,
943 "() -> (CGrafPtr _rv)"},
944 {"MCSetVisible", (PyCFunction
)MovieCtlObj_MCSetVisible
, 1,
945 "(Boolean visible) -> (ComponentResult _rv)"},
946 {"MCGetVisible", (PyCFunction
)MovieCtlObj_MCGetVisible
, 1,
947 "() -> (ComponentResult _rv)"},
948 {"MCGetControllerBoundsRect", (PyCFunction
)MovieCtlObj_MCGetControllerBoundsRect
, 1,
949 "() -> (ComponentResult _rv, Rect bounds)"},
950 {"MCSetControllerBoundsRect", (PyCFunction
)MovieCtlObj_MCSetControllerBoundsRect
, 1,
951 "(Rect bounds) -> (ComponentResult _rv)"},
952 {"MCGetControllerBoundsRgn", (PyCFunction
)MovieCtlObj_MCGetControllerBoundsRgn
, 1,
953 "() -> (RgnHandle _rv)"},
954 {"MCGetWindowRgn", (PyCFunction
)MovieCtlObj_MCGetWindowRgn
, 1,
955 "(WindowPtr w) -> (RgnHandle _rv)"},
956 {"MCMovieChanged", (PyCFunction
)MovieCtlObj_MCMovieChanged
, 1,
957 "(Movie m) -> (ComponentResult _rv)"},
958 {"MCSetDuration", (PyCFunction
)MovieCtlObj_MCSetDuration
, 1,
959 "(TimeValue duration) -> (ComponentResult _rv)"},
960 {"MCGetCurrentTime", (PyCFunction
)MovieCtlObj_MCGetCurrentTime
, 1,
961 "() -> (TimeValue _rv, TimeScale scale)"},
962 {"MCNewAttachedController", (PyCFunction
)MovieCtlObj_MCNewAttachedController
, 1,
963 "(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)"},
964 {"MCDraw", (PyCFunction
)MovieCtlObj_MCDraw
, 1,
965 "(WindowPtr w) -> (ComponentResult _rv)"},
966 {"MCActivate", (PyCFunction
)MovieCtlObj_MCActivate
, 1,
967 "(WindowPtr w, Boolean activate) -> (ComponentResult _rv)"},
968 {"MCIdle", (PyCFunction
)MovieCtlObj_MCIdle
, 1,
969 "() -> (ComponentResult _rv)"},
970 {"MCKey", (PyCFunction
)MovieCtlObj_MCKey
, 1,
971 "(SInt8 key, long modifiers) -> (ComponentResult _rv)"},
972 {"MCClick", (PyCFunction
)MovieCtlObj_MCClick
, 1,
973 "(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)"},
974 {"MCEnableEditing", (PyCFunction
)MovieCtlObj_MCEnableEditing
, 1,
975 "(Boolean enabled) -> (ComponentResult _rv)"},
976 {"MCIsEditingEnabled", (PyCFunction
)MovieCtlObj_MCIsEditingEnabled
, 1,
978 {"MCCopy", (PyCFunction
)MovieCtlObj_MCCopy
, 1,
979 "() -> (Movie _rv)"},
980 {"MCCut", (PyCFunction
)MovieCtlObj_MCCut
, 1,
981 "() -> (Movie _rv)"},
982 {"MCPaste", (PyCFunction
)MovieCtlObj_MCPaste
, 1,
983 "(Movie srcMovie) -> (ComponentResult _rv)"},
984 {"MCClear", (PyCFunction
)MovieCtlObj_MCClear
, 1,
985 "() -> (ComponentResult _rv)"},
986 {"MCUndo", (PyCFunction
)MovieCtlObj_MCUndo
, 1,
987 "() -> (ComponentResult _rv)"},
988 {"MCPositionController", (PyCFunction
)MovieCtlObj_MCPositionController
, 1,
989 "(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)"},
990 {"MCGetControllerInfo", (PyCFunction
)MovieCtlObj_MCGetControllerInfo
, 1,
991 "() -> (ComponentResult _rv, long someFlags)"},
992 {"MCSetClip", (PyCFunction
)MovieCtlObj_MCSetClip
, 1,
993 "(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)"},
994 {"MCGetClip", (PyCFunction
)MovieCtlObj_MCGetClip
, 1,
995 "() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)"},
996 {"MCDrawBadge", (PyCFunction
)MovieCtlObj_MCDrawBadge
, 1,
997 "(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)"},
998 {"MCSetUpEditMenu", (PyCFunction
)MovieCtlObj_MCSetUpEditMenu
, 1,
999 "(long modifiers, MenuHandle mh) -> (ComponentResult _rv)"},
1000 {"MCGetMenuString", (PyCFunction
)MovieCtlObj_MCGetMenuString
, 1,
1001 "(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)"},
1002 {"MCPtInController", (PyCFunction
)MovieCtlObj_MCPtInController
, 1,
1003 "(Point thePt) -> (ComponentResult _rv, Boolean inController)"},
1004 {"MCInvalidate", (PyCFunction
)MovieCtlObj_MCInvalidate
, 1,
1005 "(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)"},
1006 {"MCAdjustCursor", (PyCFunction
)MovieCtlObj_MCAdjustCursor
, 1,
1007 "(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)"},
1008 {"MCGetInterfaceElement", (PyCFunction
)MovieCtlObj_MCGetInterfaceElement
, 1,
1009 "(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)"},
1013 PyMethodChain MovieCtlObj_chain
= { MovieCtlObj_methods
, NULL
};
1015 static PyObject
*MovieCtlObj_getattr(self
, name
)
1016 MovieControllerObject
*self
;
1019 return Py_FindMethodInChain(&MovieCtlObj_chain
, (PyObject
*)self
, name
);
1022 #define MovieCtlObj_setattr NULL
1024 #define MovieCtlObj_compare NULL
1026 #define MovieCtlObj_repr NULL
1028 #define MovieCtlObj_hash NULL
1030 PyTypeObject MovieController_Type
= {
1031 PyObject_HEAD_INIT(&PyType_Type
)
1033 "MovieController", /*tp_name*/
1034 sizeof(MovieControllerObject
), /*tp_basicsize*/
1037 (destructor
) MovieCtlObj_dealloc
, /*tp_dealloc*/
1039 (getattrfunc
) MovieCtlObj_getattr
, /*tp_getattr*/
1040 (setattrfunc
) MovieCtlObj_setattr
, /*tp_setattr*/
1041 (cmpfunc
) MovieCtlObj_compare
, /*tp_compare*/
1042 (reprfunc
) MovieCtlObj_repr
, /*tp_repr*/
1043 (PyNumberMethods
*)0, /* tp_as_number */
1044 (PySequenceMethods
*)0, /* tp_as_sequence */
1045 (PyMappingMethods
*)0, /* tp_as_mapping */
1046 (hashfunc
) MovieCtlObj_hash
, /*tp_hash*/
1049 /* ---------------- End object type MovieController ----------------- */
1052 /* ---------------------- Object type TimeBase ---------------------- */
1054 PyTypeObject TimeBase_Type
;
1056 #define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type)
1058 typedef struct TimeBaseObject
{
1063 PyObject
*TimeBaseObj_New(itself
)
1067 if (itself
== NULL
) {
1068 PyErr_SetString(Qt_Error
,"Cannot create null TimeBase");
1071 it
= PyObject_NEW(TimeBaseObject
, &TimeBase_Type
);
1072 if (it
== NULL
) return NULL
;
1073 it
->ob_itself
= itself
;
1074 return (PyObject
*)it
;
1076 TimeBaseObj_Convert(v
, p_itself
)
1080 if (!TimeBaseObj_Check(v
))
1082 PyErr_SetString(PyExc_TypeError
, "TimeBase required");
1085 *p_itself
= ((TimeBaseObject
*)v
)->ob_itself
;
1089 static void TimeBaseObj_dealloc(self
)
1090 TimeBaseObject
*self
;
1092 /* Cleanup of self->ob_itself goes here */
1096 static PyObject
*TimeBaseObj_DisposeTimeBase(_self
, _args
)
1097 TimeBaseObject
*_self
;
1100 PyObject
*_res
= NULL
;
1101 if (!PyArg_ParseTuple(_args
, ""))
1103 DisposeTimeBase(_self
->ob_itself
);
1109 static PyObject
*TimeBaseObj_GetTimeBaseTime(_self
, _args
)
1110 TimeBaseObject
*_self
;
1113 PyObject
*_res
= NULL
;
1117 if (!PyArg_ParseTuple(_args
, "l",
1120 _rv
= GetTimeBaseTime(_self
->ob_itself
,
1123 _res
= Py_BuildValue("lO&",
1125 QtTimeRecord_New
, &tr
);
1129 static PyObject
*TimeBaseObj_SetTimeBaseTime(_self
, _args
)
1130 TimeBaseObject
*_self
;
1133 PyObject
*_res
= NULL
;
1135 if (!PyArg_ParseTuple(_args
, "O&",
1136 QtTimeRecord_Convert
, &tr
))
1138 SetTimeBaseTime(_self
->ob_itself
,
1145 static PyObject
*TimeBaseObj_SetTimeBaseValue(_self
, _args
)
1146 TimeBaseObject
*_self
;
1149 PyObject
*_res
= NULL
;
1152 if (!PyArg_ParseTuple(_args
, "ll",
1156 SetTimeBaseValue(_self
->ob_itself
,
1164 static PyObject
*TimeBaseObj_GetTimeBaseRate(_self
, _args
)
1165 TimeBaseObject
*_self
;
1168 PyObject
*_res
= NULL
;
1170 if (!PyArg_ParseTuple(_args
, ""))
1172 _rv
= GetTimeBaseRate(_self
->ob_itself
);
1173 _res
= Py_BuildValue("O&",
1174 PyMac_BuildFixed
, _rv
);
1178 static PyObject
*TimeBaseObj_SetTimeBaseRate(_self
, _args
)
1179 TimeBaseObject
*_self
;
1182 PyObject
*_res
= NULL
;
1184 if (!PyArg_ParseTuple(_args
, "O&",
1185 PyMac_GetFixed
, &r
))
1187 SetTimeBaseRate(_self
->ob_itself
,
1194 static PyObject
*TimeBaseObj_GetTimeBaseStartTime(_self
, _args
)
1195 TimeBaseObject
*_self
;
1198 PyObject
*_res
= NULL
;
1202 if (!PyArg_ParseTuple(_args
, "l",
1205 _rv
= GetTimeBaseStartTime(_self
->ob_itself
,
1208 _res
= Py_BuildValue("lO&",
1210 QtTimeRecord_New
, &tr
);
1214 static PyObject
*TimeBaseObj_SetTimeBaseStartTime(_self
, _args
)
1215 TimeBaseObject
*_self
;
1218 PyObject
*_res
= NULL
;
1220 if (!PyArg_ParseTuple(_args
, "O&",
1221 QtTimeRecord_Convert
, &tr
))
1223 SetTimeBaseStartTime(_self
->ob_itself
,
1230 static PyObject
*TimeBaseObj_GetTimeBaseStopTime(_self
, _args
)
1231 TimeBaseObject
*_self
;
1234 PyObject
*_res
= NULL
;
1238 if (!PyArg_ParseTuple(_args
, "l",
1241 _rv
= GetTimeBaseStopTime(_self
->ob_itself
,
1244 _res
= Py_BuildValue("lO&",
1246 QtTimeRecord_New
, &tr
);
1250 static PyObject
*TimeBaseObj_SetTimeBaseStopTime(_self
, _args
)
1251 TimeBaseObject
*_self
;
1254 PyObject
*_res
= NULL
;
1256 if (!PyArg_ParseTuple(_args
, "O&",
1257 QtTimeRecord_Convert
, &tr
))
1259 SetTimeBaseStopTime(_self
->ob_itself
,
1266 static PyObject
*TimeBaseObj_GetTimeBaseFlags(_self
, _args
)
1267 TimeBaseObject
*_self
;
1270 PyObject
*_res
= NULL
;
1272 if (!PyArg_ParseTuple(_args
, ""))
1274 _rv
= GetTimeBaseFlags(_self
->ob_itself
);
1275 _res
= Py_BuildValue("l",
1280 static PyObject
*TimeBaseObj_SetTimeBaseFlags(_self
, _args
)
1281 TimeBaseObject
*_self
;
1284 PyObject
*_res
= NULL
;
1286 if (!PyArg_ParseTuple(_args
, "l",
1289 SetTimeBaseFlags(_self
->ob_itself
,
1296 static PyObject
*TimeBaseObj_SetTimeBaseMasterTimeBase(_self
, _args
)
1297 TimeBaseObject
*_self
;
1300 PyObject
*_res
= NULL
;
1302 TimeRecord slaveZero
;
1303 if (!PyArg_ParseTuple(_args
, "O&O&",
1304 TimeBaseObj_Convert
, &master
,
1305 QtTimeRecord_Convert
, &slaveZero
))
1307 SetTimeBaseMasterTimeBase(_self
->ob_itself
,
1315 static PyObject
*TimeBaseObj_GetTimeBaseMasterTimeBase(_self
, _args
)
1316 TimeBaseObject
*_self
;
1319 PyObject
*_res
= NULL
;
1321 if (!PyArg_ParseTuple(_args
, ""))
1323 _rv
= GetTimeBaseMasterTimeBase(_self
->ob_itself
);
1324 _res
= Py_BuildValue("O&",
1325 TimeBaseObj_New
, _rv
);
1329 static PyObject
*TimeBaseObj_SetTimeBaseMasterClock(_self
, _args
)
1330 TimeBaseObject
*_self
;
1333 PyObject
*_res
= NULL
;
1334 Component clockMeister
;
1335 TimeRecord slaveZero
;
1336 if (!PyArg_ParseTuple(_args
, "O&O&",
1337 CmpObj_Convert
, &clockMeister
,
1338 QtTimeRecord_Convert
, &slaveZero
))
1340 SetTimeBaseMasterClock(_self
->ob_itself
,
1348 static PyObject
*TimeBaseObj_GetTimeBaseMasterClock(_self
, _args
)
1349 TimeBaseObject
*_self
;
1352 PyObject
*_res
= NULL
;
1353 ComponentInstance _rv
;
1354 if (!PyArg_ParseTuple(_args
, ""))
1356 _rv
= GetTimeBaseMasterClock(_self
->ob_itself
);
1357 _res
= Py_BuildValue("O&",
1358 CmpInstObj_New
, _rv
);
1362 static PyObject
*TimeBaseObj_GetTimeBaseStatus(_self
, _args
)
1363 TimeBaseObject
*_self
;
1366 PyObject
*_res
= NULL
;
1368 TimeRecord unpinnedTime
;
1369 if (!PyArg_ParseTuple(_args
, ""))
1371 _rv
= GetTimeBaseStatus(_self
->ob_itself
,
1373 _res
= Py_BuildValue("lO&",
1375 QtTimeRecord_New
, &unpinnedTime
);
1379 static PyObject
*TimeBaseObj_SetTimeBaseZero(_self
, _args
)
1380 TimeBaseObject
*_self
;
1383 PyObject
*_res
= NULL
;
1385 if (!PyArg_ParseTuple(_args
, ""))
1387 SetTimeBaseZero(_self
->ob_itself
,
1389 _res
= Py_BuildValue("O&",
1390 QtTimeRecord_New
, &zero
);
1394 static PyObject
*TimeBaseObj_GetTimeBaseEffectiveRate(_self
, _args
)
1395 TimeBaseObject
*_self
;
1398 PyObject
*_res
= NULL
;
1400 if (!PyArg_ParseTuple(_args
, ""))
1402 _rv
= GetTimeBaseEffectiveRate(_self
->ob_itself
);
1403 _res
= Py_BuildValue("O&",
1404 PyMac_BuildFixed
, _rv
);
1408 static PyMethodDef TimeBaseObj_methods
[] = {
1409 {"DisposeTimeBase", (PyCFunction
)TimeBaseObj_DisposeTimeBase
, 1,
1411 {"GetTimeBaseTime", (PyCFunction
)TimeBaseObj_GetTimeBaseTime
, 1,
1412 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1413 {"SetTimeBaseTime", (PyCFunction
)TimeBaseObj_SetTimeBaseTime
, 1,
1414 "(TimeRecord tr) -> None"},
1415 {"SetTimeBaseValue", (PyCFunction
)TimeBaseObj_SetTimeBaseValue
, 1,
1416 "(TimeValue t, TimeScale s) -> None"},
1417 {"GetTimeBaseRate", (PyCFunction
)TimeBaseObj_GetTimeBaseRate
, 1,
1418 "() -> (Fixed _rv)"},
1419 {"SetTimeBaseRate", (PyCFunction
)TimeBaseObj_SetTimeBaseRate
, 1,
1420 "(Fixed r) -> None"},
1421 {"GetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStartTime
, 1,
1422 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1423 {"SetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStartTime
, 1,
1424 "(TimeRecord tr) -> None"},
1425 {"GetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStopTime
, 1,
1426 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1427 {"SetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStopTime
, 1,
1428 "(TimeRecord tr) -> None"},
1429 {"GetTimeBaseFlags", (PyCFunction
)TimeBaseObj_GetTimeBaseFlags
, 1,
1430 "() -> (long _rv)"},
1431 {"SetTimeBaseFlags", (PyCFunction
)TimeBaseObj_SetTimeBaseFlags
, 1,
1432 "(long timeBaseFlags) -> None"},
1433 {"SetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterTimeBase
, 1,
1434 "(TimeBase master, TimeRecord slaveZero) -> None"},
1435 {"GetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterTimeBase
, 1,
1436 "() -> (TimeBase _rv)"},
1437 {"SetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterClock
, 1,
1438 "(Component clockMeister, TimeRecord slaveZero) -> None"},
1439 {"GetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterClock
, 1,
1440 "() -> (ComponentInstance _rv)"},
1441 {"GetTimeBaseStatus", (PyCFunction
)TimeBaseObj_GetTimeBaseStatus
, 1,
1442 "() -> (long _rv, TimeRecord unpinnedTime)"},
1443 {"SetTimeBaseZero", (PyCFunction
)TimeBaseObj_SetTimeBaseZero
, 1,
1444 "() -> (TimeRecord zero)"},
1445 {"GetTimeBaseEffectiveRate", (PyCFunction
)TimeBaseObj_GetTimeBaseEffectiveRate
, 1,
1446 "() -> (Fixed _rv)"},
1450 PyMethodChain TimeBaseObj_chain
= { TimeBaseObj_methods
, NULL
};
1452 static PyObject
*TimeBaseObj_getattr(self
, name
)
1453 TimeBaseObject
*self
;
1456 return Py_FindMethodInChain(&TimeBaseObj_chain
, (PyObject
*)self
, name
);
1459 #define TimeBaseObj_setattr NULL
1461 #define TimeBaseObj_compare NULL
1463 #define TimeBaseObj_repr NULL
1465 #define TimeBaseObj_hash NULL
1467 PyTypeObject TimeBase_Type
= {
1468 PyObject_HEAD_INIT(&PyType_Type
)
1470 "TimeBase", /*tp_name*/
1471 sizeof(TimeBaseObject
), /*tp_basicsize*/
1474 (destructor
) TimeBaseObj_dealloc
, /*tp_dealloc*/
1476 (getattrfunc
) TimeBaseObj_getattr
, /*tp_getattr*/
1477 (setattrfunc
) TimeBaseObj_setattr
, /*tp_setattr*/
1478 (cmpfunc
) TimeBaseObj_compare
, /*tp_compare*/
1479 (reprfunc
) TimeBaseObj_repr
, /*tp_repr*/
1480 (PyNumberMethods
*)0, /* tp_as_number */
1481 (PySequenceMethods
*)0, /* tp_as_sequence */
1482 (PyMappingMethods
*)0, /* tp_as_mapping */
1483 (hashfunc
) TimeBaseObj_hash
, /*tp_hash*/
1486 /* -------------------- End object type TimeBase -------------------- */
1489 /* ---------------------- Object type UserData ---------------------- */
1491 PyTypeObject UserData_Type
;
1493 #define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type)
1495 typedef struct UserDataObject
{
1500 PyObject
*UserDataObj_New(itself
)
1504 if (itself
== NULL
) {
1505 PyErr_SetString(Qt_Error
,"Cannot create null UserData");
1508 it
= PyObject_NEW(UserDataObject
, &UserData_Type
);
1509 if (it
== NULL
) return NULL
;
1510 it
->ob_itself
= itself
;
1511 return (PyObject
*)it
;
1513 UserDataObj_Convert(v
, p_itself
)
1517 if (!UserDataObj_Check(v
))
1519 PyErr_SetString(PyExc_TypeError
, "UserData required");
1522 *p_itself
= ((UserDataObject
*)v
)->ob_itself
;
1526 static void UserDataObj_dealloc(self
)
1527 UserDataObject
*self
;
1529 DisposeUserData(self
->ob_itself
);
1533 static PyObject
*UserDataObj_GetUserData(_self
, _args
)
1534 UserDataObject
*_self
;
1537 PyObject
*_res
= NULL
;
1542 if (!PyArg_ParseTuple(_args
, "O&O&l",
1543 ResObj_Convert
, &data
,
1544 PyMac_GetOSType
, &udType
,
1547 _err
= GetUserData(_self
->ob_itself
,
1551 if (_err
!= noErr
) return PyMac_Error(_err
);
1557 static PyObject
*UserDataObj_AddUserData(_self
, _args
)
1558 UserDataObject
*_self
;
1561 PyObject
*_res
= NULL
;
1565 if (!PyArg_ParseTuple(_args
, "O&O&",
1566 ResObj_Convert
, &data
,
1567 PyMac_GetOSType
, &udType
))
1569 _err
= AddUserData(_self
->ob_itself
,
1572 if (_err
!= noErr
) return PyMac_Error(_err
);
1578 static PyObject
*UserDataObj_RemoveUserData(_self
, _args
)
1579 UserDataObject
*_self
;
1582 PyObject
*_res
= NULL
;
1586 if (!PyArg_ParseTuple(_args
, "O&l",
1587 PyMac_GetOSType
, &udType
,
1590 _err
= RemoveUserData(_self
->ob_itself
,
1593 if (_err
!= noErr
) return PyMac_Error(_err
);
1599 static PyObject
*UserDataObj_CountUserDataType(_self
, _args
)
1600 UserDataObject
*_self
;
1603 PyObject
*_res
= NULL
;
1606 if (!PyArg_ParseTuple(_args
, "O&",
1607 PyMac_GetOSType
, &udType
))
1609 _rv
= CountUserDataType(_self
->ob_itself
,
1611 _res
= Py_BuildValue("h",
1616 static PyObject
*UserDataObj_GetNextUserDataType(_self
, _args
)
1617 UserDataObject
*_self
;
1620 PyObject
*_res
= NULL
;
1623 if (!PyArg_ParseTuple(_args
, "O&",
1624 PyMac_GetOSType
, &udType
))
1626 _rv
= GetNextUserDataType(_self
->ob_itself
,
1628 _res
= Py_BuildValue("l",
1633 static PyObject
*UserDataObj_AddUserDataText(_self
, _args
)
1634 UserDataObject
*_self
;
1637 PyObject
*_res
= NULL
;
1643 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1644 ResObj_Convert
, &data
,
1645 PyMac_GetOSType
, &udType
,
1649 _err
= AddUserDataText(_self
->ob_itself
,
1654 if (_err
!= noErr
) return PyMac_Error(_err
);
1660 static PyObject
*UserDataObj_GetUserDataText(_self
, _args
)
1661 UserDataObject
*_self
;
1664 PyObject
*_res
= NULL
;
1670 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1671 ResObj_Convert
, &data
,
1672 PyMac_GetOSType
, &udType
,
1676 _err
= GetUserDataText(_self
->ob_itself
,
1681 if (_err
!= noErr
) return PyMac_Error(_err
);
1687 static PyObject
*UserDataObj_RemoveUserDataText(_self
, _args
)
1688 UserDataObject
*_self
;
1691 PyObject
*_res
= NULL
;
1696 if (!PyArg_ParseTuple(_args
, "O&lh",
1697 PyMac_GetOSType
, &udType
,
1701 _err
= RemoveUserDataText(_self
->ob_itself
,
1705 if (_err
!= noErr
) return PyMac_Error(_err
);
1711 static PyObject
*UserDataObj_PutUserDataIntoHandle(_self
, _args
)
1712 UserDataObject
*_self
;
1715 PyObject
*_res
= NULL
;
1718 if (!PyArg_ParseTuple(_args
, "O&",
1719 ResObj_Convert
, &h
))
1721 _err
= PutUserDataIntoHandle(_self
->ob_itself
,
1723 if (_err
!= noErr
) return PyMac_Error(_err
);
1729 static PyMethodDef UserDataObj_methods
[] = {
1730 {"GetUserData", (PyCFunction
)UserDataObj_GetUserData
, 1,
1731 "(Handle data, OSType udType, long index) -> None"},
1732 {"AddUserData", (PyCFunction
)UserDataObj_AddUserData
, 1,
1733 "(Handle data, OSType udType) -> None"},
1734 {"RemoveUserData", (PyCFunction
)UserDataObj_RemoveUserData
, 1,
1735 "(OSType udType, long index) -> None"},
1736 {"CountUserDataType", (PyCFunction
)UserDataObj_CountUserDataType
, 1,
1737 "(OSType udType) -> (short _rv)"},
1738 {"GetNextUserDataType", (PyCFunction
)UserDataObj_GetNextUserDataType
, 1,
1739 "(OSType udType) -> (long _rv)"},
1740 {"AddUserDataText", (PyCFunction
)UserDataObj_AddUserDataText
, 1,
1741 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1742 {"GetUserDataText", (PyCFunction
)UserDataObj_GetUserDataText
, 1,
1743 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1744 {"RemoveUserDataText", (PyCFunction
)UserDataObj_RemoveUserDataText
, 1,
1745 "(OSType udType, long index, short itlRegionTag) -> None"},
1746 {"PutUserDataIntoHandle", (PyCFunction
)UserDataObj_PutUserDataIntoHandle
, 1,
1747 "(Handle h) -> None"},
1751 PyMethodChain UserDataObj_chain
= { UserDataObj_methods
, NULL
};
1753 static PyObject
*UserDataObj_getattr(self
, name
)
1754 UserDataObject
*self
;
1757 return Py_FindMethodInChain(&UserDataObj_chain
, (PyObject
*)self
, name
);
1760 #define UserDataObj_setattr NULL
1762 #define UserDataObj_compare NULL
1764 #define UserDataObj_repr NULL
1766 #define UserDataObj_hash NULL
1768 PyTypeObject UserData_Type
= {
1769 PyObject_HEAD_INIT(&PyType_Type
)
1771 "UserData", /*tp_name*/
1772 sizeof(UserDataObject
), /*tp_basicsize*/
1775 (destructor
) UserDataObj_dealloc
, /*tp_dealloc*/
1777 (getattrfunc
) UserDataObj_getattr
, /*tp_getattr*/
1778 (setattrfunc
) UserDataObj_setattr
, /*tp_setattr*/
1779 (cmpfunc
) UserDataObj_compare
, /*tp_compare*/
1780 (reprfunc
) UserDataObj_repr
, /*tp_repr*/
1781 (PyNumberMethods
*)0, /* tp_as_number */
1782 (PySequenceMethods
*)0, /* tp_as_sequence */
1783 (PyMappingMethods
*)0, /* tp_as_mapping */
1784 (hashfunc
) UserDataObj_hash
, /*tp_hash*/
1787 /* -------------------- End object type UserData -------------------- */
1790 /* ----------------------- Object type Media ------------------------ */
1792 PyTypeObject Media_Type
;
1794 #define MediaObj_Check(x) ((x)->ob_type == &Media_Type)
1796 typedef struct MediaObject
{
1801 PyObject
*MediaObj_New(itself
)
1805 if (itself
== NULL
) {
1806 PyErr_SetString(Qt_Error
,"Cannot create null Media");
1809 it
= PyObject_NEW(MediaObject
, &Media_Type
);
1810 if (it
== NULL
) return NULL
;
1811 it
->ob_itself
= itself
;
1812 return (PyObject
*)it
;
1814 MediaObj_Convert(v
, p_itself
)
1818 if (!MediaObj_Check(v
))
1820 PyErr_SetString(PyExc_TypeError
, "Media required");
1823 *p_itself
= ((MediaObject
*)v
)->ob_itself
;
1827 static void MediaObj_dealloc(self
)
1830 DisposeTrackMedia(self
->ob_itself
);
1834 static PyObject
*MediaObj_LoadMediaIntoRam(_self
, _args
)
1838 PyObject
*_res
= NULL
;
1843 if (!PyArg_ParseTuple(_args
, "lll",
1848 _err
= LoadMediaIntoRam(_self
->ob_itself
,
1852 if (_err
!= noErr
) return PyMac_Error(_err
);
1858 static PyObject
*MediaObj_GetMediaTrack(_self
, _args
)
1862 PyObject
*_res
= NULL
;
1864 if (!PyArg_ParseTuple(_args
, ""))
1866 _rv
= GetMediaTrack(_self
->ob_itself
);
1867 _res
= Py_BuildValue("O&",
1872 static PyObject
*MediaObj_GetMediaCreationTime(_self
, _args
)
1876 PyObject
*_res
= NULL
;
1878 if (!PyArg_ParseTuple(_args
, ""))
1880 _rv
= GetMediaCreationTime(_self
->ob_itself
);
1881 _res
= Py_BuildValue("l",
1886 static PyObject
*MediaObj_GetMediaModificationTime(_self
, _args
)
1890 PyObject
*_res
= NULL
;
1892 if (!PyArg_ParseTuple(_args
, ""))
1894 _rv
= GetMediaModificationTime(_self
->ob_itself
);
1895 _res
= Py_BuildValue("l",
1900 static PyObject
*MediaObj_GetMediaTimeScale(_self
, _args
)
1904 PyObject
*_res
= NULL
;
1906 if (!PyArg_ParseTuple(_args
, ""))
1908 _rv
= GetMediaTimeScale(_self
->ob_itself
);
1909 _res
= Py_BuildValue("l",
1914 static PyObject
*MediaObj_SetMediaTimeScale(_self
, _args
)
1918 PyObject
*_res
= NULL
;
1919 TimeScale timeScale
;
1920 if (!PyArg_ParseTuple(_args
, "l",
1923 SetMediaTimeScale(_self
->ob_itself
,
1930 static PyObject
*MediaObj_GetMediaDuration(_self
, _args
)
1934 PyObject
*_res
= NULL
;
1936 if (!PyArg_ParseTuple(_args
, ""))
1938 _rv
= GetMediaDuration(_self
->ob_itself
);
1939 _res
= Py_BuildValue("l",
1944 static PyObject
*MediaObj_GetMediaLanguage(_self
, _args
)
1948 PyObject
*_res
= NULL
;
1950 if (!PyArg_ParseTuple(_args
, ""))
1952 _rv
= GetMediaLanguage(_self
->ob_itself
);
1953 _res
= Py_BuildValue("h",
1958 static PyObject
*MediaObj_SetMediaLanguage(_self
, _args
)
1962 PyObject
*_res
= NULL
;
1964 if (!PyArg_ParseTuple(_args
, "h",
1967 SetMediaLanguage(_self
->ob_itself
,
1974 static PyObject
*MediaObj_GetMediaQuality(_self
, _args
)
1978 PyObject
*_res
= NULL
;
1980 if (!PyArg_ParseTuple(_args
, ""))
1982 _rv
= GetMediaQuality(_self
->ob_itself
);
1983 _res
= Py_BuildValue("h",
1988 static PyObject
*MediaObj_SetMediaQuality(_self
, _args
)
1992 PyObject
*_res
= NULL
;
1994 if (!PyArg_ParseTuple(_args
, "h",
1997 SetMediaQuality(_self
->ob_itself
,
2004 static PyObject
*MediaObj_GetMediaHandlerDescription(_self
, _args
)
2008 PyObject
*_res
= NULL
;
2011 OSType creatorManufacturer
;
2012 if (!PyArg_ParseTuple(_args
, "O&",
2013 PyMac_GetStr255
, creatorName
))
2015 GetMediaHandlerDescription(_self
->ob_itself
,
2018 &creatorManufacturer
);
2019 _res
= Py_BuildValue("O&O&",
2020 PyMac_BuildOSType
, mediaType
,
2021 PyMac_BuildOSType
, creatorManufacturer
);
2025 static PyObject
*MediaObj_GetMediaUserData(_self
, _args
)
2029 PyObject
*_res
= NULL
;
2031 if (!PyArg_ParseTuple(_args
, ""))
2033 _rv
= GetMediaUserData(_self
->ob_itself
);
2034 _res
= Py_BuildValue("O&",
2035 UserDataObj_New
, _rv
);
2039 static PyObject
*MediaObj_GetMediaHandler(_self
, _args
)
2043 PyObject
*_res
= NULL
;
2045 if (!PyArg_ParseTuple(_args
, ""))
2047 _rv
= GetMediaHandler(_self
->ob_itself
);
2048 _res
= Py_BuildValue("O&",
2049 CmpInstObj_New
, _rv
);
2053 static PyObject
*MediaObj_SetMediaHandler(_self
, _args
)
2057 PyObject
*_res
= NULL
;
2059 MediaHandlerComponent mH
;
2060 if (!PyArg_ParseTuple(_args
, "O&",
2061 CmpObj_Convert
, &mH
))
2063 _err
= SetMediaHandler(_self
->ob_itself
,
2065 if (_err
!= noErr
) return PyMac_Error(_err
);
2071 static PyObject
*MediaObj_BeginMediaEdits(_self
, _args
)
2075 PyObject
*_res
= NULL
;
2077 if (!PyArg_ParseTuple(_args
, ""))
2079 _err
= BeginMediaEdits(_self
->ob_itself
);
2080 if (_err
!= noErr
) return PyMac_Error(_err
);
2086 static PyObject
*MediaObj_EndMediaEdits(_self
, _args
)
2090 PyObject
*_res
= NULL
;
2092 if (!PyArg_ParseTuple(_args
, ""))
2094 _err
= EndMediaEdits(_self
->ob_itself
);
2095 if (_err
!= noErr
) return PyMac_Error(_err
);
2101 static PyObject
*MediaObj_SetMediaDefaultDataRefIndex(_self
, _args
)
2105 PyObject
*_res
= NULL
;
2108 if (!PyArg_ParseTuple(_args
, "h",
2111 _err
= SetMediaDefaultDataRefIndex(_self
->ob_itself
,
2113 if (_err
!= noErr
) return PyMac_Error(_err
);
2119 static PyObject
*MediaObj_GetMediaDataHandlerDescription(_self
, _args
)
2123 PyObject
*_res
= NULL
;
2127 OSType creatorManufacturer
;
2128 if (!PyArg_ParseTuple(_args
, "hO&",
2130 PyMac_GetStr255
, creatorName
))
2132 GetMediaDataHandlerDescription(_self
->ob_itself
,
2136 &creatorManufacturer
);
2137 _res
= Py_BuildValue("O&O&",
2138 PyMac_BuildOSType
, dhType
,
2139 PyMac_BuildOSType
, creatorManufacturer
);
2143 static PyObject
*MediaObj_GetMediaDataHandler(_self
, _args
)
2147 PyObject
*_res
= NULL
;
2150 if (!PyArg_ParseTuple(_args
, "h",
2153 _rv
= GetMediaDataHandler(_self
->ob_itself
,
2155 _res
= Py_BuildValue("O&",
2156 CmpInstObj_New
, _rv
);
2160 static PyObject
*MediaObj_SetMediaDataHandler(_self
, _args
)
2164 PyObject
*_res
= NULL
;
2167 DataHandlerComponent dataHandler
;
2168 if (!PyArg_ParseTuple(_args
, "hO&",
2170 CmpObj_Convert
, &dataHandler
))
2172 _err
= SetMediaDataHandler(_self
->ob_itself
,
2175 if (_err
!= noErr
) return PyMac_Error(_err
);
2181 static PyObject
*MediaObj_GetMediaSampleDescriptionCount(_self
, _args
)
2185 PyObject
*_res
= NULL
;
2187 if (!PyArg_ParseTuple(_args
, ""))
2189 _rv
= GetMediaSampleDescriptionCount(_self
->ob_itself
);
2190 _res
= Py_BuildValue("l",
2195 static PyObject
*MediaObj_GetMediaSampleDescription(_self
, _args
)
2199 PyObject
*_res
= NULL
;
2201 SampleDescriptionHandle descH
;
2202 if (!PyArg_ParseTuple(_args
, "lO&",
2204 ResObj_Convert
, &descH
))
2206 GetMediaSampleDescription(_self
->ob_itself
,
2214 static PyObject
*MediaObj_SetMediaSampleDescription(_self
, _args
)
2218 PyObject
*_res
= NULL
;
2221 SampleDescriptionHandle descH
;
2222 if (!PyArg_ParseTuple(_args
, "lO&",
2224 ResObj_Convert
, &descH
))
2226 _err
= SetMediaSampleDescription(_self
->ob_itself
,
2229 if (_err
!= noErr
) return PyMac_Error(_err
);
2235 static PyObject
*MediaObj_GetMediaSampleCount(_self
, _args
)
2239 PyObject
*_res
= NULL
;
2241 if (!PyArg_ParseTuple(_args
, ""))
2243 _rv
= GetMediaSampleCount(_self
->ob_itself
);
2244 _res
= Py_BuildValue("l",
2249 static PyObject
*MediaObj_GetMediaSyncSampleCount(_self
, _args
)
2253 PyObject
*_res
= NULL
;
2255 if (!PyArg_ParseTuple(_args
, ""))
2257 _rv
= GetMediaSyncSampleCount(_self
->ob_itself
);
2258 _res
= Py_BuildValue("l",
2263 static PyObject
*MediaObj_SampleNumToMediaTime(_self
, _args
)
2267 PyObject
*_res
= NULL
;
2268 long logicalSampleNum
;
2269 TimeValue sampleTime
;
2270 TimeValue sampleDuration
;
2271 if (!PyArg_ParseTuple(_args
, "l",
2274 SampleNumToMediaTime(_self
->ob_itself
,
2278 _res
= Py_BuildValue("ll",
2284 static PyObject
*MediaObj_MediaTimeToSampleNum(_self
, _args
)
2288 PyObject
*_res
= NULL
;
2291 TimeValue sampleTime
;
2292 TimeValue sampleDuration
;
2293 if (!PyArg_ParseTuple(_args
, "l",
2296 MediaTimeToSampleNum(_self
->ob_itself
,
2301 _res
= Py_BuildValue("lll",
2308 static PyObject
*MediaObj_AddMediaSample(_self
, _args
)
2312 PyObject
*_res
= NULL
;
2317 TimeValue durationPerSample
;
2318 SampleDescriptionHandle sampleDescriptionH
;
2319 long numberOfSamples
;
2321 TimeValue sampleTime
;
2322 if (!PyArg_ParseTuple(_args
, "O&lllO&lh",
2323 ResObj_Convert
, &dataIn
,
2327 ResObj_Convert
, &sampleDescriptionH
,
2331 _err
= AddMediaSample(_self
->ob_itself
,
2340 if (_err
!= noErr
) return PyMac_Error(_err
);
2341 _res
= Py_BuildValue("l",
2346 static PyObject
*MediaObj_AddMediaSampleReference(_self
, _args
)
2350 PyObject
*_res
= NULL
;
2354 TimeValue durationPerSample
;
2355 SampleDescriptionHandle sampleDescriptionH
;
2356 long numberOfSamples
;
2358 TimeValue sampleTime
;
2359 if (!PyArg_ParseTuple(_args
, "lllO&lh",
2363 ResObj_Convert
, &sampleDescriptionH
,
2367 _err
= AddMediaSampleReference(_self
->ob_itself
,
2375 if (_err
!= noErr
) return PyMac_Error(_err
);
2376 _res
= Py_BuildValue("l",
2381 static PyObject
*MediaObj_GetMediaSample(_self
, _args
)
2385 PyObject
*_res
= NULL
;
2391 TimeValue sampleTime
;
2392 TimeValue durationPerSample
;
2393 SampleDescriptionHandle sampleDescriptionH
;
2394 long sampleDescriptionIndex
;
2395 long maxNumberOfSamples
;
2396 long numberOfSamples
;
2398 if (!PyArg_ParseTuple(_args
, "O&llO&l",
2399 ResObj_Convert
, &dataOut
,
2402 ResObj_Convert
, &sampleDescriptionH
,
2403 &maxNumberOfSamples
))
2405 _err
= GetMediaSample(_self
->ob_itself
,
2413 &sampleDescriptionIndex
,
2417 if (_err
!= noErr
) return PyMac_Error(_err
);
2418 _res
= Py_BuildValue("lllllh",
2422 sampleDescriptionIndex
,
2428 static PyObject
*MediaObj_GetMediaSampleReference(_self
, _args
)
2432 PyObject
*_res
= NULL
;
2437 TimeValue sampleTime
;
2438 TimeValue durationPerSample
;
2439 SampleDescriptionHandle sampleDescriptionH
;
2440 long sampleDescriptionIndex
;
2441 long maxNumberOfSamples
;
2442 long numberOfSamples
;
2444 if (!PyArg_ParseTuple(_args
, "lO&l",
2446 ResObj_Convert
, &sampleDescriptionH
,
2447 &maxNumberOfSamples
))
2449 _err
= GetMediaSampleReference(_self
->ob_itself
,
2456 &sampleDescriptionIndex
,
2460 if (_err
!= noErr
) return PyMac_Error(_err
);
2461 _res
= Py_BuildValue("llllllh",
2466 sampleDescriptionIndex
,
2472 static PyObject
*MediaObj_SetMediaPreferredChunkSize(_self
, _args
)
2476 PyObject
*_res
= NULL
;
2479 if (!PyArg_ParseTuple(_args
, "l",
2482 _err
= SetMediaPreferredChunkSize(_self
->ob_itself
,
2484 if (_err
!= noErr
) return PyMac_Error(_err
);
2490 static PyObject
*MediaObj_GetMediaPreferredChunkSize(_self
, _args
)
2494 PyObject
*_res
= NULL
;
2497 if (!PyArg_ParseTuple(_args
, ""))
2499 _err
= GetMediaPreferredChunkSize(_self
->ob_itself
,
2501 if (_err
!= noErr
) return PyMac_Error(_err
);
2502 _res
= Py_BuildValue("l",
2507 static PyObject
*MediaObj_SetMediaShadowSync(_self
, _args
)
2511 PyObject
*_res
= NULL
;
2513 long frameDiffSampleNum
;
2515 if (!PyArg_ParseTuple(_args
, "ll",
2516 &frameDiffSampleNum
,
2519 _err
= SetMediaShadowSync(_self
->ob_itself
,
2522 if (_err
!= noErr
) return PyMac_Error(_err
);
2528 static PyObject
*MediaObj_GetMediaShadowSync(_self
, _args
)
2532 PyObject
*_res
= NULL
;
2534 long frameDiffSampleNum
;
2536 if (!PyArg_ParseTuple(_args
, "l",
2537 &frameDiffSampleNum
))
2539 _err
= GetMediaShadowSync(_self
->ob_itself
,
2542 if (_err
!= noErr
) return PyMac_Error(_err
);
2543 _res
= Py_BuildValue("l",
2548 static PyObject
*MediaObj_GetMediaDataSize(_self
, _args
)
2552 PyObject
*_res
= NULL
;
2554 TimeValue startTime
;
2556 if (!PyArg_ParseTuple(_args
, "ll",
2560 _rv
= GetMediaDataSize(_self
->ob_itself
,
2563 _res
= Py_BuildValue("l",
2568 static PyObject
*MediaObj_GetMediaNextInterestingTime(_self
, _args
)
2572 PyObject
*_res
= NULL
;
2573 short interestingTimeFlags
;
2576 TimeValue interestingTime
;
2577 TimeValue interestingDuration
;
2578 if (!PyArg_ParseTuple(_args
, "hlO&",
2579 &interestingTimeFlags
,
2581 PyMac_GetFixed
, &rate
))
2583 GetMediaNextInterestingTime(_self
->ob_itself
,
2584 interestingTimeFlags
,
2588 &interestingDuration
);
2589 _res
= Py_BuildValue("ll",
2591 interestingDuration
);
2595 static PyObject
*MediaObj_GetMediaDataRef(_self
, _args
)
2599 PyObject
*_res
= NULL
;
2604 long dataRefAttributes
;
2605 if (!PyArg_ParseTuple(_args
, "h",
2608 _err
= GetMediaDataRef(_self
->ob_itself
,
2612 &dataRefAttributes
);
2613 if (_err
!= noErr
) return PyMac_Error(_err
);
2614 _res
= Py_BuildValue("O&O&l",
2615 ResObj_New
, dataRef
,
2616 PyMac_BuildOSType
, dataRefType
,
2621 static PyObject
*MediaObj_SetMediaDataRef(_self
, _args
)
2625 PyObject
*_res
= NULL
;
2630 if (!PyArg_ParseTuple(_args
, "hO&O&",
2632 ResObj_Convert
, &dataRef
,
2633 PyMac_GetOSType
, &dataRefType
))
2635 _err
= SetMediaDataRef(_self
->ob_itself
,
2639 if (_err
!= noErr
) return PyMac_Error(_err
);
2645 static PyObject
*MediaObj_SetMediaDataRefAttributes(_self
, _args
)
2649 PyObject
*_res
= NULL
;
2652 long dataRefAttributes
;
2653 if (!PyArg_ParseTuple(_args
, "hl",
2655 &dataRefAttributes
))
2657 _err
= SetMediaDataRefAttributes(_self
->ob_itself
,
2660 if (_err
!= noErr
) return PyMac_Error(_err
);
2666 static PyObject
*MediaObj_AddMediaDataRef(_self
, _args
)
2670 PyObject
*_res
= NULL
;
2675 if (!PyArg_ParseTuple(_args
, "O&O&",
2676 ResObj_Convert
, &dataRef
,
2677 PyMac_GetOSType
, &dataRefType
))
2679 _err
= AddMediaDataRef(_self
->ob_itself
,
2683 if (_err
!= noErr
) return PyMac_Error(_err
);
2684 _res
= Py_BuildValue("h",
2689 static PyObject
*MediaObj_GetMediaDataRefCount(_self
, _args
)
2693 PyObject
*_res
= NULL
;
2696 if (!PyArg_ParseTuple(_args
, ""))
2698 _err
= GetMediaDataRefCount(_self
->ob_itself
,
2700 if (_err
!= noErr
) return PyMac_Error(_err
);
2701 _res
= Py_BuildValue("h",
2706 static PyObject
*MediaObj_SetMediaPlayHints(_self
, _args
)
2710 PyObject
*_res
= NULL
;
2713 if (!PyArg_ParseTuple(_args
, "ll",
2717 SetMediaPlayHints(_self
->ob_itself
,
2725 static PyObject
*MediaObj_GetMediaPlayHints(_self
, _args
)
2729 PyObject
*_res
= NULL
;
2731 if (!PyArg_ParseTuple(_args
, ""))
2733 GetMediaPlayHints(_self
->ob_itself
,
2735 _res
= Py_BuildValue("l",
2740 static PyMethodDef MediaObj_methods
[] = {
2741 {"LoadMediaIntoRam", (PyCFunction
)MediaObj_LoadMediaIntoRam
, 1,
2742 "(TimeValue time, TimeValue duration, long flags) -> None"},
2743 {"GetMediaTrack", (PyCFunction
)MediaObj_GetMediaTrack
, 1,
2744 "() -> (Track _rv)"},
2745 {"GetMediaCreationTime", (PyCFunction
)MediaObj_GetMediaCreationTime
, 1,
2746 "() -> (unsigned long _rv)"},
2747 {"GetMediaModificationTime", (PyCFunction
)MediaObj_GetMediaModificationTime
, 1,
2748 "() -> (unsigned long _rv)"},
2749 {"GetMediaTimeScale", (PyCFunction
)MediaObj_GetMediaTimeScale
, 1,
2750 "() -> (TimeScale _rv)"},
2751 {"SetMediaTimeScale", (PyCFunction
)MediaObj_SetMediaTimeScale
, 1,
2752 "(TimeScale timeScale) -> None"},
2753 {"GetMediaDuration", (PyCFunction
)MediaObj_GetMediaDuration
, 1,
2754 "() -> (TimeValue _rv)"},
2755 {"GetMediaLanguage", (PyCFunction
)MediaObj_GetMediaLanguage
, 1,
2756 "() -> (short _rv)"},
2757 {"SetMediaLanguage", (PyCFunction
)MediaObj_SetMediaLanguage
, 1,
2758 "(short language) -> None"},
2759 {"GetMediaQuality", (PyCFunction
)MediaObj_GetMediaQuality
, 1,
2760 "() -> (short _rv)"},
2761 {"SetMediaQuality", (PyCFunction
)MediaObj_SetMediaQuality
, 1,
2762 "(short quality) -> None"},
2763 {"GetMediaHandlerDescription", (PyCFunction
)MediaObj_GetMediaHandlerDescription
, 1,
2764 "(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)"},
2765 {"GetMediaUserData", (PyCFunction
)MediaObj_GetMediaUserData
, 1,
2766 "() -> (UserData _rv)"},
2767 {"GetMediaHandler", (PyCFunction
)MediaObj_GetMediaHandler
, 1,
2768 "() -> (MediaHandler _rv)"},
2769 {"SetMediaHandler", (PyCFunction
)MediaObj_SetMediaHandler
, 1,
2770 "(MediaHandlerComponent mH) -> None"},
2771 {"BeginMediaEdits", (PyCFunction
)MediaObj_BeginMediaEdits
, 1,
2773 {"EndMediaEdits", (PyCFunction
)MediaObj_EndMediaEdits
, 1,
2775 {"SetMediaDefaultDataRefIndex", (PyCFunction
)MediaObj_SetMediaDefaultDataRefIndex
, 1,
2776 "(short index) -> None"},
2777 {"GetMediaDataHandlerDescription", (PyCFunction
)MediaObj_GetMediaDataHandlerDescription
, 1,
2778 "(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)"},
2779 {"GetMediaDataHandler", (PyCFunction
)MediaObj_GetMediaDataHandler
, 1,
2780 "(short index) -> (DataHandler _rv)"},
2781 {"SetMediaDataHandler", (PyCFunction
)MediaObj_SetMediaDataHandler
, 1,
2782 "(short index, DataHandlerComponent dataHandler) -> None"},
2783 {"GetMediaSampleDescriptionCount", (PyCFunction
)MediaObj_GetMediaSampleDescriptionCount
, 1,
2784 "() -> (long _rv)"},
2785 {"GetMediaSampleDescription", (PyCFunction
)MediaObj_GetMediaSampleDescription
, 1,
2786 "(long index, SampleDescriptionHandle descH) -> None"},
2787 {"SetMediaSampleDescription", (PyCFunction
)MediaObj_SetMediaSampleDescription
, 1,
2788 "(long index, SampleDescriptionHandle descH) -> None"},
2789 {"GetMediaSampleCount", (PyCFunction
)MediaObj_GetMediaSampleCount
, 1,
2790 "() -> (long _rv)"},
2791 {"GetMediaSyncSampleCount", (PyCFunction
)MediaObj_GetMediaSyncSampleCount
, 1,
2792 "() -> (long _rv)"},
2793 {"SampleNumToMediaTime", (PyCFunction
)MediaObj_SampleNumToMediaTime
, 1,
2794 "(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)"},
2795 {"MediaTimeToSampleNum", (PyCFunction
)MediaObj_MediaTimeToSampleNum
, 1,
2796 "(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)"},
2797 {"AddMediaSample", (PyCFunction
)MediaObj_AddMediaSample
, 1,
2798 "(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2799 {"AddMediaSampleReference", (PyCFunction
)MediaObj_AddMediaSampleReference
, 1,
2800 "(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2801 {"GetMediaSample", (PyCFunction
)MediaObj_GetMediaSample
, 1,
2802 "(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2803 {"GetMediaSampleReference", (PyCFunction
)MediaObj_GetMediaSampleReference
, 1,
2804 "(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2805 {"SetMediaPreferredChunkSize", (PyCFunction
)MediaObj_SetMediaPreferredChunkSize
, 1,
2806 "(long maxChunkSize) -> None"},
2807 {"GetMediaPreferredChunkSize", (PyCFunction
)MediaObj_GetMediaPreferredChunkSize
, 1,
2808 "() -> (long maxChunkSize)"},
2809 {"SetMediaShadowSync", (PyCFunction
)MediaObj_SetMediaShadowSync
, 1,
2810 "(long frameDiffSampleNum, long syncSampleNum) -> None"},
2811 {"GetMediaShadowSync", (PyCFunction
)MediaObj_GetMediaShadowSync
, 1,
2812 "(long frameDiffSampleNum) -> (long syncSampleNum)"},
2813 {"GetMediaDataSize", (PyCFunction
)MediaObj_GetMediaDataSize
, 1,
2814 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
2815 {"GetMediaNextInterestingTime", (PyCFunction
)MediaObj_GetMediaNextInterestingTime
, 1,
2816 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
2817 {"GetMediaDataRef", (PyCFunction
)MediaObj_GetMediaDataRef
, 1,
2818 "(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)"},
2819 {"SetMediaDataRef", (PyCFunction
)MediaObj_SetMediaDataRef
, 1,
2820 "(short index, Handle dataRef, OSType dataRefType) -> None"},
2821 {"SetMediaDataRefAttributes", (PyCFunction
)MediaObj_SetMediaDataRefAttributes
, 1,
2822 "(short index, long dataRefAttributes) -> None"},
2823 {"AddMediaDataRef", (PyCFunction
)MediaObj_AddMediaDataRef
, 1,
2824 "(Handle dataRef, OSType dataRefType) -> (short index)"},
2825 {"GetMediaDataRefCount", (PyCFunction
)MediaObj_GetMediaDataRefCount
, 1,
2826 "() -> (short count)"},
2827 {"SetMediaPlayHints", (PyCFunction
)MediaObj_SetMediaPlayHints
, 1,
2828 "(long flags, long flagsMask) -> None"},
2829 {"GetMediaPlayHints", (PyCFunction
)MediaObj_GetMediaPlayHints
, 1,
2830 "() -> (long flags)"},
2834 PyMethodChain MediaObj_chain
= { MediaObj_methods
, NULL
};
2836 static PyObject
*MediaObj_getattr(self
, name
)
2840 return Py_FindMethodInChain(&MediaObj_chain
, (PyObject
*)self
, name
);
2843 #define MediaObj_setattr NULL
2845 #define MediaObj_compare NULL
2847 #define MediaObj_repr NULL
2849 #define MediaObj_hash NULL
2851 PyTypeObject Media_Type
= {
2852 PyObject_HEAD_INIT(&PyType_Type
)
2854 "Media", /*tp_name*/
2855 sizeof(MediaObject
), /*tp_basicsize*/
2858 (destructor
) MediaObj_dealloc
, /*tp_dealloc*/
2860 (getattrfunc
) MediaObj_getattr
, /*tp_getattr*/
2861 (setattrfunc
) MediaObj_setattr
, /*tp_setattr*/
2862 (cmpfunc
) MediaObj_compare
, /*tp_compare*/
2863 (reprfunc
) MediaObj_repr
, /*tp_repr*/
2864 (PyNumberMethods
*)0, /* tp_as_number */
2865 (PySequenceMethods
*)0, /* tp_as_sequence */
2866 (PyMappingMethods
*)0, /* tp_as_mapping */
2867 (hashfunc
) MediaObj_hash
, /*tp_hash*/
2870 /* --------------------- End object type Media ---------------------- */
2873 /* ----------------------- Object type Track ------------------------ */
2875 PyTypeObject Track_Type
;
2877 #define TrackObj_Check(x) ((x)->ob_type == &Track_Type)
2879 typedef struct TrackObject
{
2884 PyObject
*TrackObj_New(itself
)
2888 if (itself
== NULL
) {
2889 PyErr_SetString(Qt_Error
,"Cannot create null Track");
2892 it
= PyObject_NEW(TrackObject
, &Track_Type
);
2893 if (it
== NULL
) return NULL
;
2894 it
->ob_itself
= itself
;
2895 return (PyObject
*)it
;
2897 TrackObj_Convert(v
, p_itself
)
2901 if (!TrackObj_Check(v
))
2903 PyErr_SetString(PyExc_TypeError
, "Track required");
2906 *p_itself
= ((TrackObject
*)v
)->ob_itself
;
2910 static void TrackObj_dealloc(self
)
2913 DisposeMovieTrack(self
->ob_itself
);
2917 static PyObject
*TrackObj_LoadTrackIntoRam(_self
, _args
)
2921 PyObject
*_res
= NULL
;
2926 if (!PyArg_ParseTuple(_args
, "lll",
2931 _err
= LoadTrackIntoRam(_self
->ob_itself
,
2935 if (_err
!= noErr
) return PyMac_Error(_err
);
2941 static PyObject
*TrackObj_GetTrackPict(_self
, _args
)
2945 PyObject
*_res
= NULL
;
2948 if (!PyArg_ParseTuple(_args
, "l",
2951 _rv
= GetTrackPict(_self
->ob_itself
,
2953 _res
= Py_BuildValue("O&",
2958 static PyObject
*TrackObj_GetTrackClipRgn(_self
, _args
)
2962 PyObject
*_res
= NULL
;
2964 if (!PyArg_ParseTuple(_args
, ""))
2966 _rv
= GetTrackClipRgn(_self
->ob_itself
);
2967 _res
= Py_BuildValue("O&",
2972 static PyObject
*TrackObj_SetTrackClipRgn(_self
, _args
)
2976 PyObject
*_res
= NULL
;
2978 if (!PyArg_ParseTuple(_args
, "O&",
2979 ResObj_Convert
, &theClip
))
2981 SetTrackClipRgn(_self
->ob_itself
,
2988 static PyObject
*TrackObj_GetTrackDisplayBoundsRgn(_self
, _args
)
2992 PyObject
*_res
= NULL
;
2994 if (!PyArg_ParseTuple(_args
, ""))
2996 _rv
= GetTrackDisplayBoundsRgn(_self
->ob_itself
);
2997 _res
= Py_BuildValue("O&",
3002 static PyObject
*TrackObj_GetTrackMovieBoundsRgn(_self
, _args
)
3006 PyObject
*_res
= NULL
;
3008 if (!PyArg_ParseTuple(_args
, ""))
3010 _rv
= GetTrackMovieBoundsRgn(_self
->ob_itself
);
3011 _res
= Py_BuildValue("O&",
3016 static PyObject
*TrackObj_GetTrackBoundsRgn(_self
, _args
)
3020 PyObject
*_res
= NULL
;
3022 if (!PyArg_ParseTuple(_args
, ""))
3024 _rv
= GetTrackBoundsRgn(_self
->ob_itself
);
3025 _res
= Py_BuildValue("O&",
3030 static PyObject
*TrackObj_GetTrackMatte(_self
, _args
)
3034 PyObject
*_res
= NULL
;
3036 if (!PyArg_ParseTuple(_args
, ""))
3038 _rv
= GetTrackMatte(_self
->ob_itself
);
3039 _res
= Py_BuildValue("O&",
3044 static PyObject
*TrackObj_SetTrackMatte(_self
, _args
)
3048 PyObject
*_res
= NULL
;
3049 PixMapHandle theMatte
;
3050 if (!PyArg_ParseTuple(_args
, "O&",
3051 ResObj_Convert
, &theMatte
))
3053 SetTrackMatte(_self
->ob_itself
,
3060 static PyObject
*TrackObj_GetTrackID(_self
, _args
)
3064 PyObject
*_res
= NULL
;
3066 if (!PyArg_ParseTuple(_args
, ""))
3068 _rv
= GetTrackID(_self
->ob_itself
);
3069 _res
= Py_BuildValue("l",
3074 static PyObject
*TrackObj_GetTrackMovie(_self
, _args
)
3078 PyObject
*_res
= NULL
;
3080 if (!PyArg_ParseTuple(_args
, ""))
3082 _rv
= GetTrackMovie(_self
->ob_itself
);
3083 _res
= Py_BuildValue("O&",
3088 static PyObject
*TrackObj_GetTrackCreationTime(_self
, _args
)
3092 PyObject
*_res
= NULL
;
3094 if (!PyArg_ParseTuple(_args
, ""))
3096 _rv
= GetTrackCreationTime(_self
->ob_itself
);
3097 _res
= Py_BuildValue("l",
3102 static PyObject
*TrackObj_GetTrackModificationTime(_self
, _args
)
3106 PyObject
*_res
= NULL
;
3108 if (!PyArg_ParseTuple(_args
, ""))
3110 _rv
= GetTrackModificationTime(_self
->ob_itself
);
3111 _res
= Py_BuildValue("l",
3116 static PyObject
*TrackObj_GetTrackEnabled(_self
, _args
)
3120 PyObject
*_res
= NULL
;
3122 if (!PyArg_ParseTuple(_args
, ""))
3124 _rv
= GetTrackEnabled(_self
->ob_itself
);
3125 _res
= Py_BuildValue("b",
3130 static PyObject
*TrackObj_SetTrackEnabled(_self
, _args
)
3134 PyObject
*_res
= NULL
;
3136 if (!PyArg_ParseTuple(_args
, "b",
3139 SetTrackEnabled(_self
->ob_itself
,
3146 static PyObject
*TrackObj_GetTrackUsage(_self
, _args
)
3150 PyObject
*_res
= NULL
;
3152 if (!PyArg_ParseTuple(_args
, ""))
3154 _rv
= GetTrackUsage(_self
->ob_itself
);
3155 _res
= Py_BuildValue("l",
3160 static PyObject
*TrackObj_SetTrackUsage(_self
, _args
)
3164 PyObject
*_res
= NULL
;
3166 if (!PyArg_ParseTuple(_args
, "l",
3169 SetTrackUsage(_self
->ob_itself
,
3176 static PyObject
*TrackObj_GetTrackDuration(_self
, _args
)
3180 PyObject
*_res
= NULL
;
3182 if (!PyArg_ParseTuple(_args
, ""))
3184 _rv
= GetTrackDuration(_self
->ob_itself
);
3185 _res
= Py_BuildValue("l",
3190 static PyObject
*TrackObj_GetTrackOffset(_self
, _args
)
3194 PyObject
*_res
= NULL
;
3196 if (!PyArg_ParseTuple(_args
, ""))
3198 _rv
= GetTrackOffset(_self
->ob_itself
);
3199 _res
= Py_BuildValue("l",
3204 static PyObject
*TrackObj_SetTrackOffset(_self
, _args
)
3208 PyObject
*_res
= NULL
;
3209 TimeValue movieOffsetTime
;
3210 if (!PyArg_ParseTuple(_args
, "l",
3213 SetTrackOffset(_self
->ob_itself
,
3220 static PyObject
*TrackObj_GetTrackLayer(_self
, _args
)
3224 PyObject
*_res
= NULL
;
3226 if (!PyArg_ParseTuple(_args
, ""))
3228 _rv
= GetTrackLayer(_self
->ob_itself
);
3229 _res
= Py_BuildValue("h",
3234 static PyObject
*TrackObj_SetTrackLayer(_self
, _args
)
3238 PyObject
*_res
= NULL
;
3240 if (!PyArg_ParseTuple(_args
, "h",
3243 SetTrackLayer(_self
->ob_itself
,
3250 static PyObject
*TrackObj_GetTrackAlternate(_self
, _args
)
3254 PyObject
*_res
= NULL
;
3256 if (!PyArg_ParseTuple(_args
, ""))
3258 _rv
= GetTrackAlternate(_self
->ob_itself
);
3259 _res
= Py_BuildValue("O&",
3264 static PyObject
*TrackObj_SetTrackAlternate(_self
, _args
)
3268 PyObject
*_res
= NULL
;
3270 if (!PyArg_ParseTuple(_args
, "O&",
3271 TrackObj_Convert
, &alternateT
))
3273 SetTrackAlternate(_self
->ob_itself
,
3280 static PyObject
*TrackObj_GetTrackVolume(_self
, _args
)
3284 PyObject
*_res
= NULL
;
3286 if (!PyArg_ParseTuple(_args
, ""))
3288 _rv
= GetTrackVolume(_self
->ob_itself
);
3289 _res
= Py_BuildValue("h",
3294 static PyObject
*TrackObj_SetTrackVolume(_self
, _args
)
3298 PyObject
*_res
= NULL
;
3300 if (!PyArg_ParseTuple(_args
, "h",
3303 SetTrackVolume(_self
->ob_itself
,
3310 static PyObject
*TrackObj_GetTrackDimensions(_self
, _args
)
3314 PyObject
*_res
= NULL
;
3317 if (!PyArg_ParseTuple(_args
, ""))
3319 GetTrackDimensions(_self
->ob_itself
,
3322 _res
= Py_BuildValue("O&O&",
3323 PyMac_BuildFixed
, width
,
3324 PyMac_BuildFixed
, height
);
3328 static PyObject
*TrackObj_SetTrackDimensions(_self
, _args
)
3332 PyObject
*_res
= NULL
;
3335 if (!PyArg_ParseTuple(_args
, "O&O&",
3336 PyMac_GetFixed
, &width
,
3337 PyMac_GetFixed
, &height
))
3339 SetTrackDimensions(_self
->ob_itself
,
3347 static PyObject
*TrackObj_GetTrackUserData(_self
, _args
)
3351 PyObject
*_res
= NULL
;
3353 if (!PyArg_ParseTuple(_args
, ""))
3355 _rv
= GetTrackUserData(_self
->ob_itself
);
3356 _res
= Py_BuildValue("O&",
3357 UserDataObj_New
, _rv
);
3361 static PyObject
*TrackObj_GetTrackSoundLocalizationSettings(_self
, _args
)
3365 PyObject
*_res
= NULL
;
3368 if (!PyArg_ParseTuple(_args
, ""))
3370 _err
= GetTrackSoundLocalizationSettings(_self
->ob_itself
,
3372 if (_err
!= noErr
) return PyMac_Error(_err
);
3373 _res
= Py_BuildValue("O&",
3374 ResObj_New
, settings
);
3378 static PyObject
*TrackObj_SetTrackSoundLocalizationSettings(_self
, _args
)
3382 PyObject
*_res
= NULL
;
3385 if (!PyArg_ParseTuple(_args
, "O&",
3386 ResObj_Convert
, &settings
))
3388 _err
= SetTrackSoundLocalizationSettings(_self
->ob_itself
,
3390 if (_err
!= noErr
) return PyMac_Error(_err
);
3396 static PyObject
*TrackObj_NewTrackMedia(_self
, _args
)
3400 PyObject
*_res
= NULL
;
3403 TimeScale timeScale
;
3406 if (!PyArg_ParseTuple(_args
, "O&lO&O&",
3407 PyMac_GetOSType
, &mediaType
,
3409 ResObj_Convert
, &dataRef
,
3410 PyMac_GetOSType
, &dataRefType
))
3412 _rv
= NewTrackMedia(_self
->ob_itself
,
3417 _res
= Py_BuildValue("O&",
3422 static PyObject
*TrackObj_GetTrackMedia(_self
, _args
)
3426 PyObject
*_res
= NULL
;
3428 if (!PyArg_ParseTuple(_args
, ""))
3430 _rv
= GetTrackMedia(_self
->ob_itself
);
3431 _res
= Py_BuildValue("O&",
3436 static PyObject
*TrackObj_InsertMediaIntoTrack(_self
, _args
)
3440 PyObject
*_res
= NULL
;
3442 TimeValue trackStart
;
3443 TimeValue mediaTime
;
3444 TimeValue mediaDuration
;
3446 if (!PyArg_ParseTuple(_args
, "lllO&",
3450 PyMac_GetFixed
, &mediaRate
))
3452 _err
= InsertMediaIntoTrack(_self
->ob_itself
,
3457 if (_err
!= noErr
) return PyMac_Error(_err
);
3463 static PyObject
*TrackObj_InsertTrackSegment(_self
, _args
)
3467 PyObject
*_res
= NULL
;
3471 TimeValue srcDuration
;
3473 if (!PyArg_ParseTuple(_args
, "O&lll",
3474 TrackObj_Convert
, &dstTrack
,
3479 _err
= InsertTrackSegment(_self
->ob_itself
,
3484 if (_err
!= noErr
) return PyMac_Error(_err
);
3490 static PyObject
*TrackObj_InsertEmptyTrackSegment(_self
, _args
)
3494 PyObject
*_res
= NULL
;
3497 TimeValue dstDuration
;
3498 if (!PyArg_ParseTuple(_args
, "ll",
3502 _err
= InsertEmptyTrackSegment(_self
->ob_itself
,
3505 if (_err
!= noErr
) return PyMac_Error(_err
);
3511 static PyObject
*TrackObj_DeleteTrackSegment(_self
, _args
)
3515 PyObject
*_res
= NULL
;
3517 TimeValue startTime
;
3519 if (!PyArg_ParseTuple(_args
, "ll",
3523 _err
= DeleteTrackSegment(_self
->ob_itself
,
3526 if (_err
!= noErr
) return PyMac_Error(_err
);
3532 static PyObject
*TrackObj_ScaleTrackSegment(_self
, _args
)
3536 PyObject
*_res
= NULL
;
3538 TimeValue startTime
;
3539 TimeValue oldDuration
;
3540 TimeValue newDuration
;
3541 if (!PyArg_ParseTuple(_args
, "lll",
3546 _err
= ScaleTrackSegment(_self
->ob_itself
,
3550 if (_err
!= noErr
) return PyMac_Error(_err
);
3556 static PyObject
*TrackObj_IsScrapMovie(_self
, _args
)
3560 PyObject
*_res
= NULL
;
3562 if (!PyArg_ParseTuple(_args
, ""))
3564 _rv
= IsScrapMovie(_self
->ob_itself
);
3565 _res
= Py_BuildValue("O&",
3570 static PyObject
*TrackObj_CopyTrackSettings(_self
, _args
)
3574 PyObject
*_res
= NULL
;
3577 if (!PyArg_ParseTuple(_args
, "O&",
3578 TrackObj_Convert
, &dstTrack
))
3580 _err
= CopyTrackSettings(_self
->ob_itself
,
3582 if (_err
!= noErr
) return PyMac_Error(_err
);
3588 static PyObject
*TrackObj_AddEmptyTrackToMovie(_self
, _args
)
3592 PyObject
*_res
= NULL
;
3598 if (!PyArg_ParseTuple(_args
, "O&O&O&",
3599 MovieObj_Convert
, &dstMovie
,
3600 ResObj_Convert
, &dataRef
,
3601 PyMac_GetOSType
, &dataRefType
))
3603 _err
= AddEmptyTrackToMovie(_self
->ob_itself
,
3608 if (_err
!= noErr
) return PyMac_Error(_err
);
3609 _res
= Py_BuildValue("O&",
3610 TrackObj_New
, dstTrack
);
3614 static PyObject
*TrackObj_AddTrackReference(_self
, _args
)
3618 PyObject
*_res
= NULL
;
3623 if (!PyArg_ParseTuple(_args
, "O&O&",
3624 TrackObj_Convert
, &refTrack
,
3625 PyMac_GetOSType
, &refType
))
3627 _err
= AddTrackReference(_self
->ob_itself
,
3631 if (_err
!= noErr
) return PyMac_Error(_err
);
3632 _res
= Py_BuildValue("l",
3637 static PyObject
*TrackObj_DeleteTrackReference(_self
, _args
)
3641 PyObject
*_res
= NULL
;
3645 if (!PyArg_ParseTuple(_args
, "O&l",
3646 PyMac_GetOSType
, &refType
,
3649 _err
= DeleteTrackReference(_self
->ob_itself
,
3652 if (_err
!= noErr
) return PyMac_Error(_err
);
3658 static PyObject
*TrackObj_SetTrackReference(_self
, _args
)
3662 PyObject
*_res
= NULL
;
3667 if (!PyArg_ParseTuple(_args
, "O&O&l",
3668 TrackObj_Convert
, &refTrack
,
3669 PyMac_GetOSType
, &refType
,
3672 _err
= SetTrackReference(_self
->ob_itself
,
3676 if (_err
!= noErr
) return PyMac_Error(_err
);
3682 static PyObject
*TrackObj_GetTrackReference(_self
, _args
)
3686 PyObject
*_res
= NULL
;
3690 if (!PyArg_ParseTuple(_args
, "O&l",
3691 PyMac_GetOSType
, &refType
,
3694 _rv
= GetTrackReference(_self
->ob_itself
,
3697 _res
= Py_BuildValue("O&",
3702 static PyObject
*TrackObj_GetNextTrackReferenceType(_self
, _args
)
3706 PyObject
*_res
= NULL
;
3709 if (!PyArg_ParseTuple(_args
, "O&",
3710 PyMac_GetOSType
, &refType
))
3712 _rv
= GetNextTrackReferenceType(_self
->ob_itself
,
3714 _res
= Py_BuildValue("O&",
3715 PyMac_BuildOSType
, _rv
);
3719 static PyObject
*TrackObj_GetTrackReferenceCount(_self
, _args
)
3723 PyObject
*_res
= NULL
;
3726 if (!PyArg_ParseTuple(_args
, "O&",
3727 PyMac_GetOSType
, &refType
))
3729 _rv
= GetTrackReferenceCount(_self
->ob_itself
,
3731 _res
= Py_BuildValue("l",
3736 static PyObject
*TrackObj_GetTrackEditRate(_self
, _args
)
3740 PyObject
*_res
= NULL
;
3743 if (!PyArg_ParseTuple(_args
, "l",
3746 _rv
= GetTrackEditRate(_self
->ob_itself
,
3748 _res
= Py_BuildValue("O&",
3749 PyMac_BuildFixed
, _rv
);
3753 static PyObject
*TrackObj_GetTrackDataSize(_self
, _args
)
3757 PyObject
*_res
= NULL
;
3759 TimeValue startTime
;
3761 if (!PyArg_ParseTuple(_args
, "ll",
3765 _rv
= GetTrackDataSize(_self
->ob_itself
,
3768 _res
= Py_BuildValue("l",
3773 static PyObject
*TrackObj_PtInTrack(_self
, _args
)
3777 PyObject
*_res
= NULL
;
3780 if (!PyArg_ParseTuple(_args
, "O&",
3781 PyMac_GetPoint
, &pt
))
3783 _rv
= PtInTrack(_self
->ob_itself
,
3785 _res
= Py_BuildValue("b",
3790 static PyObject
*TrackObj_GetTrackNextInterestingTime(_self
, _args
)
3794 PyObject
*_res
= NULL
;
3795 short interestingTimeFlags
;
3798 TimeValue interestingTime
;
3799 TimeValue interestingDuration
;
3800 if (!PyArg_ParseTuple(_args
, "hlO&",
3801 &interestingTimeFlags
,
3803 PyMac_GetFixed
, &rate
))
3805 GetTrackNextInterestingTime(_self
->ob_itself
,
3806 interestingTimeFlags
,
3810 &interestingDuration
);
3811 _res
= Py_BuildValue("ll",
3813 interestingDuration
);
3817 static PyObject
*TrackObj_GetTrackSegmentDisplayBoundsRgn(_self
, _args
)
3821 PyObject
*_res
= NULL
;
3825 if (!PyArg_ParseTuple(_args
, "ll",
3829 _rv
= GetTrackSegmentDisplayBoundsRgn(_self
->ob_itself
,
3832 _res
= Py_BuildValue("O&",
3837 static PyObject
*TrackObj_GetTrackStatus(_self
, _args
)
3841 PyObject
*_res
= NULL
;
3842 ComponentResult _rv
;
3843 if (!PyArg_ParseTuple(_args
, ""))
3845 _rv
= GetTrackStatus(_self
->ob_itself
);
3846 _res
= Py_BuildValue("l",
3851 static PyObject
*TrackObj_SetTrackLoadSettings(_self
, _args
)
3855 PyObject
*_res
= NULL
;
3856 TimeValue preloadTime
;
3857 TimeValue preloadDuration
;
3860 if (!PyArg_ParseTuple(_args
, "llll",
3866 SetTrackLoadSettings(_self
->ob_itself
,
3876 static PyObject
*TrackObj_GetTrackLoadSettings(_self
, _args
)
3880 PyObject
*_res
= NULL
;
3881 TimeValue preloadTime
;
3882 TimeValue preloadDuration
;
3885 if (!PyArg_ParseTuple(_args
, ""))
3887 GetTrackLoadSettings(_self
->ob_itself
,
3892 _res
= Py_BuildValue("llll",
3900 static PyMethodDef TrackObj_methods
[] = {
3901 {"LoadTrackIntoRam", (PyCFunction
)TrackObj_LoadTrackIntoRam
, 1,
3902 "(TimeValue time, TimeValue duration, long flags) -> None"},
3903 {"GetTrackPict", (PyCFunction
)TrackObj_GetTrackPict
, 1,
3904 "(TimeValue time) -> (PicHandle _rv)"},
3905 {"GetTrackClipRgn", (PyCFunction
)TrackObj_GetTrackClipRgn
, 1,
3906 "() -> (RgnHandle _rv)"},
3907 {"SetTrackClipRgn", (PyCFunction
)TrackObj_SetTrackClipRgn
, 1,
3908 "(RgnHandle theClip) -> None"},
3909 {"GetTrackDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackDisplayBoundsRgn
, 1,
3910 "() -> (RgnHandle _rv)"},
3911 {"GetTrackMovieBoundsRgn", (PyCFunction
)TrackObj_GetTrackMovieBoundsRgn
, 1,
3912 "() -> (RgnHandle _rv)"},
3913 {"GetTrackBoundsRgn", (PyCFunction
)TrackObj_GetTrackBoundsRgn
, 1,
3914 "() -> (RgnHandle _rv)"},
3915 {"GetTrackMatte", (PyCFunction
)TrackObj_GetTrackMatte
, 1,
3916 "() -> (PixMapHandle _rv)"},
3917 {"SetTrackMatte", (PyCFunction
)TrackObj_SetTrackMatte
, 1,
3918 "(PixMapHandle theMatte) -> None"},
3919 {"GetTrackID", (PyCFunction
)TrackObj_GetTrackID
, 1,
3920 "() -> (long _rv)"},
3921 {"GetTrackMovie", (PyCFunction
)TrackObj_GetTrackMovie
, 1,
3922 "() -> (Movie _rv)"},
3923 {"GetTrackCreationTime", (PyCFunction
)TrackObj_GetTrackCreationTime
, 1,
3924 "() -> (unsigned long _rv)"},
3925 {"GetTrackModificationTime", (PyCFunction
)TrackObj_GetTrackModificationTime
, 1,
3926 "() -> (unsigned long _rv)"},
3927 {"GetTrackEnabled", (PyCFunction
)TrackObj_GetTrackEnabled
, 1,
3928 "() -> (Boolean _rv)"},
3929 {"SetTrackEnabled", (PyCFunction
)TrackObj_SetTrackEnabled
, 1,
3930 "(Boolean isEnabled) -> None"},
3931 {"GetTrackUsage", (PyCFunction
)TrackObj_GetTrackUsage
, 1,
3932 "() -> (long _rv)"},
3933 {"SetTrackUsage", (PyCFunction
)TrackObj_SetTrackUsage
, 1,
3934 "(long usage) -> None"},
3935 {"GetTrackDuration", (PyCFunction
)TrackObj_GetTrackDuration
, 1,
3936 "() -> (TimeValue _rv)"},
3937 {"GetTrackOffset", (PyCFunction
)TrackObj_GetTrackOffset
, 1,
3938 "() -> (TimeValue _rv)"},
3939 {"SetTrackOffset", (PyCFunction
)TrackObj_SetTrackOffset
, 1,
3940 "(TimeValue movieOffsetTime) -> None"},
3941 {"GetTrackLayer", (PyCFunction
)TrackObj_GetTrackLayer
, 1,
3942 "() -> (short _rv)"},
3943 {"SetTrackLayer", (PyCFunction
)TrackObj_SetTrackLayer
, 1,
3944 "(short layer) -> None"},
3945 {"GetTrackAlternate", (PyCFunction
)TrackObj_GetTrackAlternate
, 1,
3946 "() -> (Track _rv)"},
3947 {"SetTrackAlternate", (PyCFunction
)TrackObj_SetTrackAlternate
, 1,
3948 "(Track alternateT) -> None"},
3949 {"GetTrackVolume", (PyCFunction
)TrackObj_GetTrackVolume
, 1,
3950 "() -> (short _rv)"},
3951 {"SetTrackVolume", (PyCFunction
)TrackObj_SetTrackVolume
, 1,
3952 "(short volume) -> None"},
3953 {"GetTrackDimensions", (PyCFunction
)TrackObj_GetTrackDimensions
, 1,
3954 "() -> (Fixed width, Fixed height)"},
3955 {"SetTrackDimensions", (PyCFunction
)TrackObj_SetTrackDimensions
, 1,
3956 "(Fixed width, Fixed height) -> None"},
3957 {"GetTrackUserData", (PyCFunction
)TrackObj_GetTrackUserData
, 1,
3958 "() -> (UserData _rv)"},
3959 {"GetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_GetTrackSoundLocalizationSettings
, 1,
3960 "() -> (Handle settings)"},
3961 {"SetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_SetTrackSoundLocalizationSettings
, 1,
3962 "(Handle settings) -> None"},
3963 {"NewTrackMedia", (PyCFunction
)TrackObj_NewTrackMedia
, 1,
3964 "(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)"},
3965 {"GetTrackMedia", (PyCFunction
)TrackObj_GetTrackMedia
, 1,
3966 "() -> (Media _rv)"},
3967 {"InsertMediaIntoTrack", (PyCFunction
)TrackObj_InsertMediaIntoTrack
, 1,
3968 "(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None"},
3969 {"InsertTrackSegment", (PyCFunction
)TrackObj_InsertTrackSegment
, 1,
3970 "(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
3971 {"InsertEmptyTrackSegment", (PyCFunction
)TrackObj_InsertEmptyTrackSegment
, 1,
3972 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
3973 {"DeleteTrackSegment", (PyCFunction
)TrackObj_DeleteTrackSegment
, 1,
3974 "(TimeValue startTime, TimeValue duration) -> None"},
3975 {"ScaleTrackSegment", (PyCFunction
)TrackObj_ScaleTrackSegment
, 1,
3976 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
3977 {"IsScrapMovie", (PyCFunction
)TrackObj_IsScrapMovie
, 1,
3978 "() -> (Component _rv)"},
3979 {"CopyTrackSettings", (PyCFunction
)TrackObj_CopyTrackSettings
, 1,
3980 "(Track dstTrack) -> None"},
3981 {"AddEmptyTrackToMovie", (PyCFunction
)TrackObj_AddEmptyTrackToMovie
, 1,
3982 "(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)"},
3983 {"AddTrackReference", (PyCFunction
)TrackObj_AddTrackReference
, 1,
3984 "(Track refTrack, OSType refType) -> (long addedIndex)"},
3985 {"DeleteTrackReference", (PyCFunction
)TrackObj_DeleteTrackReference
, 1,
3986 "(OSType refType, long index) -> None"},
3987 {"SetTrackReference", (PyCFunction
)TrackObj_SetTrackReference
, 1,
3988 "(Track refTrack, OSType refType, long index) -> None"},
3989 {"GetTrackReference", (PyCFunction
)TrackObj_GetTrackReference
, 1,
3990 "(OSType refType, long index) -> (Track _rv)"},
3991 {"GetNextTrackReferenceType", (PyCFunction
)TrackObj_GetNextTrackReferenceType
, 1,
3992 "(OSType refType) -> (OSType _rv)"},
3993 {"GetTrackReferenceCount", (PyCFunction
)TrackObj_GetTrackReferenceCount
, 1,
3994 "(OSType refType) -> (long _rv)"},
3995 {"GetTrackEditRate", (PyCFunction
)TrackObj_GetTrackEditRate
, 1,
3996 "(TimeValue atTime) -> (Fixed _rv)"},
3997 {"GetTrackDataSize", (PyCFunction
)TrackObj_GetTrackDataSize
, 1,
3998 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
3999 {"PtInTrack", (PyCFunction
)TrackObj_PtInTrack
, 1,
4000 "(Point pt) -> (Boolean _rv)"},
4001 {"GetTrackNextInterestingTime", (PyCFunction
)TrackObj_GetTrackNextInterestingTime
, 1,
4002 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
4003 {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackSegmentDisplayBoundsRgn
, 1,
4004 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
4005 {"GetTrackStatus", (PyCFunction
)TrackObj_GetTrackStatus
, 1,
4006 "() -> (ComponentResult _rv)"},
4007 {"SetTrackLoadSettings", (PyCFunction
)TrackObj_SetTrackLoadSettings
, 1,
4008 "(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None"},
4009 {"GetTrackLoadSettings", (PyCFunction
)TrackObj_GetTrackLoadSettings
, 1,
4010 "() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)"},
4014 PyMethodChain TrackObj_chain
= { TrackObj_methods
, NULL
};
4016 static PyObject
*TrackObj_getattr(self
, name
)
4020 return Py_FindMethodInChain(&TrackObj_chain
, (PyObject
*)self
, name
);
4023 #define TrackObj_setattr NULL
4025 #define TrackObj_compare NULL
4027 #define TrackObj_repr NULL
4029 #define TrackObj_hash NULL
4031 PyTypeObject Track_Type
= {
4032 PyObject_HEAD_INIT(&PyType_Type
)
4034 "Track", /*tp_name*/
4035 sizeof(TrackObject
), /*tp_basicsize*/
4038 (destructor
) TrackObj_dealloc
, /*tp_dealloc*/
4040 (getattrfunc
) TrackObj_getattr
, /*tp_getattr*/
4041 (setattrfunc
) TrackObj_setattr
, /*tp_setattr*/
4042 (cmpfunc
) TrackObj_compare
, /*tp_compare*/
4043 (reprfunc
) TrackObj_repr
, /*tp_repr*/
4044 (PyNumberMethods
*)0, /* tp_as_number */
4045 (PySequenceMethods
*)0, /* tp_as_sequence */
4046 (PyMappingMethods
*)0, /* tp_as_mapping */
4047 (hashfunc
) TrackObj_hash
, /*tp_hash*/
4050 /* --------------------- End object type Track ---------------------- */
4053 /* ----------------------- Object type Movie ------------------------ */
4055 PyTypeObject Movie_Type
;
4057 #define MovieObj_Check(x) ((x)->ob_type == &Movie_Type)
4059 typedef struct MovieObject
{
4064 PyObject
*MovieObj_New(itself
)
4068 if (itself
== NULL
) {
4069 PyErr_SetString(Qt_Error
,"Cannot create null Movie");
4072 it
= PyObject_NEW(MovieObject
, &Movie_Type
);
4073 if (it
== NULL
) return NULL
;
4074 it
->ob_itself
= itself
;
4075 return (PyObject
*)it
;
4077 MovieObj_Convert(v
, p_itself
)
4081 if (!MovieObj_Check(v
))
4083 PyErr_SetString(PyExc_TypeError
, "Movie required");
4086 *p_itself
= ((MovieObject
*)v
)->ob_itself
;
4090 static void MovieObj_dealloc(self
)
4093 DisposeMovie(self
->ob_itself
);
4097 static PyObject
*MovieObj_MoviesTask(_self
, _args
)
4101 PyObject
*_res
= NULL
;
4102 long maxMilliSecToUse
;
4103 if (!PyArg_ParseTuple(_args
, "l",
4106 MoviesTask(_self
->ob_itself
,
4113 static PyObject
*MovieObj_PrerollMovie(_self
, _args
)
4117 PyObject
*_res
= NULL
;
4121 if (!PyArg_ParseTuple(_args
, "lO&",
4123 PyMac_GetFixed
, &Rate
))
4125 _err
= PrerollMovie(_self
->ob_itself
,
4128 if (_err
!= noErr
) return PyMac_Error(_err
);
4134 static PyObject
*MovieObj_LoadMovieIntoRam(_self
, _args
)
4138 PyObject
*_res
= NULL
;
4143 if (!PyArg_ParseTuple(_args
, "lll",
4148 _err
= LoadMovieIntoRam(_self
->ob_itself
,
4152 if (_err
!= noErr
) return PyMac_Error(_err
);
4158 static PyObject
*MovieObj_SetMovieActive(_self
, _args
)
4162 PyObject
*_res
= NULL
;
4164 if (!PyArg_ParseTuple(_args
, "b",
4167 SetMovieActive(_self
->ob_itself
,
4174 static PyObject
*MovieObj_GetMovieActive(_self
, _args
)
4178 PyObject
*_res
= NULL
;
4180 if (!PyArg_ParseTuple(_args
, ""))
4182 _rv
= GetMovieActive(_self
->ob_itself
);
4183 _res
= Py_BuildValue("b",
4188 static PyObject
*MovieObj_StartMovie(_self
, _args
)
4192 PyObject
*_res
= NULL
;
4193 if (!PyArg_ParseTuple(_args
, ""))
4195 StartMovie(_self
->ob_itself
);
4201 static PyObject
*MovieObj_StopMovie(_self
, _args
)
4205 PyObject
*_res
= NULL
;
4206 if (!PyArg_ParseTuple(_args
, ""))
4208 StopMovie(_self
->ob_itself
);
4214 static PyObject
*MovieObj_GoToBeginningOfMovie(_self
, _args
)
4218 PyObject
*_res
= NULL
;
4219 if (!PyArg_ParseTuple(_args
, ""))
4221 GoToBeginningOfMovie(_self
->ob_itself
);
4227 static PyObject
*MovieObj_GoToEndOfMovie(_self
, _args
)
4231 PyObject
*_res
= NULL
;
4232 if (!PyArg_ParseTuple(_args
, ""))
4234 GoToEndOfMovie(_self
->ob_itself
);
4240 static PyObject
*MovieObj_IsMovieDone(_self
, _args
)
4244 PyObject
*_res
= NULL
;
4246 if (!PyArg_ParseTuple(_args
, ""))
4248 _rv
= IsMovieDone(_self
->ob_itself
);
4249 _res
= Py_BuildValue("b",
4254 static PyObject
*MovieObj_GetMoviePreviewMode(_self
, _args
)
4258 PyObject
*_res
= NULL
;
4260 if (!PyArg_ParseTuple(_args
, ""))
4262 _rv
= GetMoviePreviewMode(_self
->ob_itself
);
4263 _res
= Py_BuildValue("b",
4268 static PyObject
*MovieObj_SetMoviePreviewMode(_self
, _args
)
4272 PyObject
*_res
= NULL
;
4274 if (!PyArg_ParseTuple(_args
, "b",
4277 SetMoviePreviewMode(_self
->ob_itself
,
4284 static PyObject
*MovieObj_ShowMoviePoster(_self
, _args
)
4288 PyObject
*_res
= NULL
;
4289 if (!PyArg_ParseTuple(_args
, ""))
4291 ShowMoviePoster(_self
->ob_itself
);
4297 static PyObject
*MovieObj_GetMovieTimeBase(_self
, _args
)
4301 PyObject
*_res
= NULL
;
4303 if (!PyArg_ParseTuple(_args
, ""))
4305 _rv
= GetMovieTimeBase(_self
->ob_itself
);
4306 _res
= Py_BuildValue("O&",
4307 TimeBaseObj_New
, _rv
);
4311 static PyObject
*MovieObj_SetMovieMasterTimeBase(_self
, _args
)
4315 PyObject
*_res
= NULL
;
4317 TimeRecord slaveZero
;
4318 if (!PyArg_ParseTuple(_args
, "O&O&",
4319 TimeBaseObj_Convert
, &tb
,
4320 QtTimeRecord_Convert
, &slaveZero
))
4322 SetMovieMasterTimeBase(_self
->ob_itself
,
4330 static PyObject
*MovieObj_SetMovieMasterClock(_self
, _args
)
4334 PyObject
*_res
= NULL
;
4335 Component clockMeister
;
4336 TimeRecord slaveZero
;
4337 if (!PyArg_ParseTuple(_args
, "O&O&",
4338 CmpObj_Convert
, &clockMeister
,
4339 QtTimeRecord_Convert
, &slaveZero
))
4341 SetMovieMasterClock(_self
->ob_itself
,
4349 static PyObject
*MovieObj_GetMovieGWorld(_self
, _args
)
4353 PyObject
*_res
= NULL
;
4356 if (!PyArg_ParseTuple(_args
, ""))
4358 GetMovieGWorld(_self
->ob_itself
,
4361 _res
= Py_BuildValue("O&O&",
4363 OptResObj_New
, gdh
);
4367 static PyObject
*MovieObj_SetMovieGWorld(_self
, _args
)
4371 PyObject
*_res
= NULL
;
4374 if (!PyArg_ParseTuple(_args
, "O&O&",
4375 GrafObj_Convert
, &port
,
4376 OptResObj_Convert
, &gdh
))
4378 SetMovieGWorld(_self
->ob_itself
,
4386 static PyObject
*MovieObj_GetMovieNaturalBoundsRect(_self
, _args
)
4390 PyObject
*_res
= NULL
;
4392 if (!PyArg_ParseTuple(_args
, ""))
4394 GetMovieNaturalBoundsRect(_self
->ob_itself
,
4396 _res
= Py_BuildValue("O&",
4397 PyMac_BuildRect
, &naturalBounds
);
4401 static PyObject
*MovieObj_GetNextTrackForCompositing(_self
, _args
)
4405 PyObject
*_res
= NULL
;
4408 if (!PyArg_ParseTuple(_args
, "O&",
4409 TrackObj_Convert
, &theTrack
))
4411 _rv
= GetNextTrackForCompositing(_self
->ob_itself
,
4413 _res
= Py_BuildValue("O&",
4418 static PyObject
*MovieObj_GetPrevTrackForCompositing(_self
, _args
)
4422 PyObject
*_res
= NULL
;
4425 if (!PyArg_ParseTuple(_args
, "O&",
4426 TrackObj_Convert
, &theTrack
))
4428 _rv
= GetPrevTrackForCompositing(_self
->ob_itself
,
4430 _res
= Py_BuildValue("O&",
4435 static PyObject
*MovieObj_GetMoviePict(_self
, _args
)
4439 PyObject
*_res
= NULL
;
4442 if (!PyArg_ParseTuple(_args
, "l",
4445 _rv
= GetMoviePict(_self
->ob_itself
,
4447 _res
= Py_BuildValue("O&",
4452 static PyObject
*MovieObj_GetMoviePosterPict(_self
, _args
)
4456 PyObject
*_res
= NULL
;
4458 if (!PyArg_ParseTuple(_args
, ""))
4460 _rv
= GetMoviePosterPict(_self
->ob_itself
);
4461 _res
= Py_BuildValue("O&",
4466 static PyObject
*MovieObj_UpdateMovie(_self
, _args
)
4470 PyObject
*_res
= NULL
;
4472 if (!PyArg_ParseTuple(_args
, ""))
4474 _err
= UpdateMovie(_self
->ob_itself
);
4475 if (_err
!= noErr
) return PyMac_Error(_err
);
4481 static PyObject
*MovieObj_InvalidateMovieRegion(_self
, _args
)
4485 PyObject
*_res
= NULL
;
4487 RgnHandle invalidRgn
;
4488 if (!PyArg_ParseTuple(_args
, "O&",
4489 ResObj_Convert
, &invalidRgn
))
4491 _err
= InvalidateMovieRegion(_self
->ob_itself
,
4493 if (_err
!= noErr
) return PyMac_Error(_err
);
4499 static PyObject
*MovieObj_GetMovieBox(_self
, _args
)
4503 PyObject
*_res
= NULL
;
4505 if (!PyArg_ParseTuple(_args
, ""))
4507 GetMovieBox(_self
->ob_itself
,
4509 _res
= Py_BuildValue("O&",
4510 PyMac_BuildRect
, &boxRect
);
4514 static PyObject
*MovieObj_SetMovieBox(_self
, _args
)
4518 PyObject
*_res
= NULL
;
4520 if (!PyArg_ParseTuple(_args
, "O&",
4521 PyMac_GetRect
, &boxRect
))
4523 SetMovieBox(_self
->ob_itself
,
4530 static PyObject
*MovieObj_GetMovieDisplayClipRgn(_self
, _args
)
4534 PyObject
*_res
= NULL
;
4536 if (!PyArg_ParseTuple(_args
, ""))
4538 _rv
= GetMovieDisplayClipRgn(_self
->ob_itself
);
4539 _res
= Py_BuildValue("O&",
4544 static PyObject
*MovieObj_SetMovieDisplayClipRgn(_self
, _args
)
4548 PyObject
*_res
= NULL
;
4550 if (!PyArg_ParseTuple(_args
, "O&",
4551 ResObj_Convert
, &theClip
))
4553 SetMovieDisplayClipRgn(_self
->ob_itself
,
4560 static PyObject
*MovieObj_GetMovieClipRgn(_self
, _args
)
4564 PyObject
*_res
= NULL
;
4566 if (!PyArg_ParseTuple(_args
, ""))
4568 _rv
= GetMovieClipRgn(_self
->ob_itself
);
4569 _res
= Py_BuildValue("O&",
4574 static PyObject
*MovieObj_SetMovieClipRgn(_self
, _args
)
4578 PyObject
*_res
= NULL
;
4580 if (!PyArg_ParseTuple(_args
, "O&",
4581 ResObj_Convert
, &theClip
))
4583 SetMovieClipRgn(_self
->ob_itself
,
4590 static PyObject
*MovieObj_GetMovieDisplayBoundsRgn(_self
, _args
)
4594 PyObject
*_res
= NULL
;
4596 if (!PyArg_ParseTuple(_args
, ""))
4598 _rv
= GetMovieDisplayBoundsRgn(_self
->ob_itself
);
4599 _res
= Py_BuildValue("O&",
4604 static PyObject
*MovieObj_GetMovieBoundsRgn(_self
, _args
)
4608 PyObject
*_res
= NULL
;
4610 if (!PyArg_ParseTuple(_args
, ""))
4612 _rv
= GetMovieBoundsRgn(_self
->ob_itself
);
4613 _res
= Py_BuildValue("O&",
4618 static PyObject
*MovieObj_PutMovieIntoHandle(_self
, _args
)
4622 PyObject
*_res
= NULL
;
4625 if (!PyArg_ParseTuple(_args
, "O&",
4626 ResObj_Convert
, &publicMovie
))
4628 _err
= PutMovieIntoHandle(_self
->ob_itself
,
4630 if (_err
!= noErr
) return PyMac_Error(_err
);
4636 static PyObject
*MovieObj_PutMovieIntoDataFork(_self
, _args
)
4640 PyObject
*_res
= NULL
;
4645 if (!PyArg_ParseTuple(_args
, "hll",
4650 _err
= PutMovieIntoDataFork(_self
->ob_itself
,
4654 if (_err
!= noErr
) return PyMac_Error(_err
);
4660 static PyObject
*MovieObj_GetMovieCreationTime(_self
, _args
)
4664 PyObject
*_res
= NULL
;
4666 if (!PyArg_ParseTuple(_args
, ""))
4668 _rv
= GetMovieCreationTime(_self
->ob_itself
);
4669 _res
= Py_BuildValue("l",
4674 static PyObject
*MovieObj_GetMovieModificationTime(_self
, _args
)
4678 PyObject
*_res
= NULL
;
4680 if (!PyArg_ParseTuple(_args
, ""))
4682 _rv
= GetMovieModificationTime(_self
->ob_itself
);
4683 _res
= Py_BuildValue("l",
4688 static PyObject
*MovieObj_GetMovieTimeScale(_self
, _args
)
4692 PyObject
*_res
= NULL
;
4694 if (!PyArg_ParseTuple(_args
, ""))
4696 _rv
= GetMovieTimeScale(_self
->ob_itself
);
4697 _res
= Py_BuildValue("l",
4702 static PyObject
*MovieObj_SetMovieTimeScale(_self
, _args
)
4706 PyObject
*_res
= NULL
;
4707 TimeScale timeScale
;
4708 if (!PyArg_ParseTuple(_args
, "l",
4711 SetMovieTimeScale(_self
->ob_itself
,
4718 static PyObject
*MovieObj_GetMovieDuration(_self
, _args
)
4722 PyObject
*_res
= NULL
;
4724 if (!PyArg_ParseTuple(_args
, ""))
4726 _rv
= GetMovieDuration(_self
->ob_itself
);
4727 _res
= Py_BuildValue("l",
4732 static PyObject
*MovieObj_GetMovieRate(_self
, _args
)
4736 PyObject
*_res
= NULL
;
4738 if (!PyArg_ParseTuple(_args
, ""))
4740 _rv
= GetMovieRate(_self
->ob_itself
);
4741 _res
= Py_BuildValue("O&",
4742 PyMac_BuildFixed
, _rv
);
4746 static PyObject
*MovieObj_SetMovieRate(_self
, _args
)
4750 PyObject
*_res
= NULL
;
4752 if (!PyArg_ParseTuple(_args
, "O&",
4753 PyMac_GetFixed
, &rate
))
4755 SetMovieRate(_self
->ob_itself
,
4762 static PyObject
*MovieObj_GetMoviePreferredRate(_self
, _args
)
4766 PyObject
*_res
= NULL
;
4768 if (!PyArg_ParseTuple(_args
, ""))
4770 _rv
= GetMoviePreferredRate(_self
->ob_itself
);
4771 _res
= Py_BuildValue("O&",
4772 PyMac_BuildFixed
, _rv
);
4776 static PyObject
*MovieObj_SetMoviePreferredRate(_self
, _args
)
4780 PyObject
*_res
= NULL
;
4782 if (!PyArg_ParseTuple(_args
, "O&",
4783 PyMac_GetFixed
, &rate
))
4785 SetMoviePreferredRate(_self
->ob_itself
,
4792 static PyObject
*MovieObj_GetMoviePreferredVolume(_self
, _args
)
4796 PyObject
*_res
= NULL
;
4798 if (!PyArg_ParseTuple(_args
, ""))
4800 _rv
= GetMoviePreferredVolume(_self
->ob_itself
);
4801 _res
= Py_BuildValue("h",
4806 static PyObject
*MovieObj_SetMoviePreferredVolume(_self
, _args
)
4810 PyObject
*_res
= NULL
;
4812 if (!PyArg_ParseTuple(_args
, "h",
4815 SetMoviePreferredVolume(_self
->ob_itself
,
4822 static PyObject
*MovieObj_GetMovieVolume(_self
, _args
)
4826 PyObject
*_res
= NULL
;
4828 if (!PyArg_ParseTuple(_args
, ""))
4830 _rv
= GetMovieVolume(_self
->ob_itself
);
4831 _res
= Py_BuildValue("h",
4836 static PyObject
*MovieObj_SetMovieVolume(_self
, _args
)
4840 PyObject
*_res
= NULL
;
4842 if (!PyArg_ParseTuple(_args
, "h",
4845 SetMovieVolume(_self
->ob_itself
,
4852 static PyObject
*MovieObj_GetMoviePreviewTime(_self
, _args
)
4856 PyObject
*_res
= NULL
;
4857 TimeValue previewTime
;
4858 TimeValue previewDuration
;
4859 if (!PyArg_ParseTuple(_args
, ""))
4861 GetMoviePreviewTime(_self
->ob_itself
,
4864 _res
= Py_BuildValue("ll",
4870 static PyObject
*MovieObj_SetMoviePreviewTime(_self
, _args
)
4874 PyObject
*_res
= NULL
;
4875 TimeValue previewTime
;
4876 TimeValue previewDuration
;
4877 if (!PyArg_ParseTuple(_args
, "ll",
4881 SetMoviePreviewTime(_self
->ob_itself
,
4889 static PyObject
*MovieObj_GetMoviePosterTime(_self
, _args
)
4893 PyObject
*_res
= NULL
;
4895 if (!PyArg_ParseTuple(_args
, ""))
4897 _rv
= GetMoviePosterTime(_self
->ob_itself
);
4898 _res
= Py_BuildValue("l",
4903 static PyObject
*MovieObj_SetMoviePosterTime(_self
, _args
)
4907 PyObject
*_res
= NULL
;
4908 TimeValue posterTime
;
4909 if (!PyArg_ParseTuple(_args
, "l",
4912 SetMoviePosterTime(_self
->ob_itself
,
4919 static PyObject
*MovieObj_GetMovieSelection(_self
, _args
)
4923 PyObject
*_res
= NULL
;
4924 TimeValue selectionTime
;
4925 TimeValue selectionDuration
;
4926 if (!PyArg_ParseTuple(_args
, ""))
4928 GetMovieSelection(_self
->ob_itself
,
4930 &selectionDuration
);
4931 _res
= Py_BuildValue("ll",
4937 static PyObject
*MovieObj_SetMovieSelection(_self
, _args
)
4941 PyObject
*_res
= NULL
;
4942 TimeValue selectionTime
;
4943 TimeValue selectionDuration
;
4944 if (!PyArg_ParseTuple(_args
, "ll",
4946 &selectionDuration
))
4948 SetMovieSelection(_self
->ob_itself
,
4956 static PyObject
*MovieObj_SetMovieActiveSegment(_self
, _args
)
4960 PyObject
*_res
= NULL
;
4961 TimeValue startTime
;
4963 if (!PyArg_ParseTuple(_args
, "ll",
4967 SetMovieActiveSegment(_self
->ob_itself
,
4975 static PyObject
*MovieObj_GetMovieActiveSegment(_self
, _args
)
4979 PyObject
*_res
= NULL
;
4980 TimeValue startTime
;
4982 if (!PyArg_ParseTuple(_args
, ""))
4984 GetMovieActiveSegment(_self
->ob_itself
,
4987 _res
= Py_BuildValue("ll",
4993 static PyObject
*MovieObj_GetMovieTime(_self
, _args
)
4997 PyObject
*_res
= NULL
;
4999 TimeRecord currentTime
;
5000 if (!PyArg_ParseTuple(_args
, ""))
5002 _rv
= GetMovieTime(_self
->ob_itself
,
5004 _res
= Py_BuildValue("lO&",
5006 QtTimeRecord_New
, ¤tTime
);
5010 static PyObject
*MovieObj_SetMovieTime(_self
, _args
)
5014 PyObject
*_res
= NULL
;
5016 if (!PyArg_ParseTuple(_args
, "O&",
5017 QtTimeRecord_Convert
, &newtime
))
5019 SetMovieTime(_self
->ob_itself
,
5026 static PyObject
*MovieObj_SetMovieTimeValue(_self
, _args
)
5030 PyObject
*_res
= NULL
;
5032 if (!PyArg_ParseTuple(_args
, "l",
5035 SetMovieTimeValue(_self
->ob_itself
,
5042 static PyObject
*MovieObj_GetMovieUserData(_self
, _args
)
5046 PyObject
*_res
= NULL
;
5048 if (!PyArg_ParseTuple(_args
, ""))
5050 _rv
= GetMovieUserData(_self
->ob_itself
);
5051 _res
= Py_BuildValue("O&",
5052 UserDataObj_New
, _rv
);
5056 static PyObject
*MovieObj_GetMovieTrackCount(_self
, _args
)
5060 PyObject
*_res
= NULL
;
5062 if (!PyArg_ParseTuple(_args
, ""))
5064 _rv
= GetMovieTrackCount(_self
->ob_itself
);
5065 _res
= Py_BuildValue("l",
5070 static PyObject
*MovieObj_GetMovieTrack(_self
, _args
)
5074 PyObject
*_res
= NULL
;
5077 if (!PyArg_ParseTuple(_args
, "l",
5080 _rv
= GetMovieTrack(_self
->ob_itself
,
5082 _res
= Py_BuildValue("O&",
5087 static PyObject
*MovieObj_GetMovieIndTrack(_self
, _args
)
5091 PyObject
*_res
= NULL
;
5094 if (!PyArg_ParseTuple(_args
, "l",
5097 _rv
= GetMovieIndTrack(_self
->ob_itself
,
5099 _res
= Py_BuildValue("O&",
5104 static PyObject
*MovieObj_GetMovieIndTrackType(_self
, _args
)
5108 PyObject
*_res
= NULL
;
5113 if (!PyArg_ParseTuple(_args
, "lO&l",
5115 PyMac_GetOSType
, &trackType
,
5118 _rv
= GetMovieIndTrackType(_self
->ob_itself
,
5122 _res
= Py_BuildValue("O&",
5127 static PyObject
*MovieObj_NewMovieTrack(_self
, _args
)
5131 PyObject
*_res
= NULL
;
5136 if (!PyArg_ParseTuple(_args
, "O&O&h",
5137 PyMac_GetFixed
, &width
,
5138 PyMac_GetFixed
, &height
,
5141 _rv
= NewMovieTrack(_self
->ob_itself
,
5145 _res
= Py_BuildValue("O&",
5150 static PyObject
*MovieObj_SetAutoTrackAlternatesEnabled(_self
, _args
)
5154 PyObject
*_res
= NULL
;
5156 if (!PyArg_ParseTuple(_args
, "b",
5159 SetAutoTrackAlternatesEnabled(_self
->ob_itself
,
5166 static PyObject
*MovieObj_SelectMovieAlternates(_self
, _args
)
5170 PyObject
*_res
= NULL
;
5171 if (!PyArg_ParseTuple(_args
, ""))
5173 SelectMovieAlternates(_self
->ob_itself
);
5179 static PyObject
*MovieObj_InsertMovieSegment(_self
, _args
)
5183 PyObject
*_res
= NULL
;
5187 TimeValue srcDuration
;
5189 if (!PyArg_ParseTuple(_args
, "O&lll",
5190 MovieObj_Convert
, &dstMovie
,
5195 _err
= InsertMovieSegment(_self
->ob_itself
,
5200 if (_err
!= noErr
) return PyMac_Error(_err
);
5206 static PyObject
*MovieObj_InsertEmptyMovieSegment(_self
, _args
)
5210 PyObject
*_res
= NULL
;
5213 TimeValue dstDuration
;
5214 if (!PyArg_ParseTuple(_args
, "ll",
5218 _err
= InsertEmptyMovieSegment(_self
->ob_itself
,
5221 if (_err
!= noErr
) return PyMac_Error(_err
);
5227 static PyObject
*MovieObj_DeleteMovieSegment(_self
, _args
)
5231 PyObject
*_res
= NULL
;
5233 TimeValue startTime
;
5235 if (!PyArg_ParseTuple(_args
, "ll",
5239 _err
= DeleteMovieSegment(_self
->ob_itself
,
5242 if (_err
!= noErr
) return PyMac_Error(_err
);
5248 static PyObject
*MovieObj_ScaleMovieSegment(_self
, _args
)
5252 PyObject
*_res
= NULL
;
5254 TimeValue startTime
;
5255 TimeValue oldDuration
;
5256 TimeValue newDuration
;
5257 if (!PyArg_ParseTuple(_args
, "lll",
5262 _err
= ScaleMovieSegment(_self
->ob_itself
,
5266 if (_err
!= noErr
) return PyMac_Error(_err
);
5272 static PyObject
*MovieObj_CutMovieSelection(_self
, _args
)
5276 PyObject
*_res
= NULL
;
5278 if (!PyArg_ParseTuple(_args
, ""))
5280 _rv
= CutMovieSelection(_self
->ob_itself
);
5281 _res
= Py_BuildValue("O&",
5286 static PyObject
*MovieObj_CopyMovieSelection(_self
, _args
)
5290 PyObject
*_res
= NULL
;
5292 if (!PyArg_ParseTuple(_args
, ""))
5294 _rv
= CopyMovieSelection(_self
->ob_itself
);
5295 _res
= Py_BuildValue("O&",
5300 static PyObject
*MovieObj_PasteMovieSelection(_self
, _args
)
5304 PyObject
*_res
= NULL
;
5306 if (!PyArg_ParseTuple(_args
, "O&",
5307 MovieObj_Convert
, &src
))
5309 PasteMovieSelection(_self
->ob_itself
,
5316 static PyObject
*MovieObj_AddMovieSelection(_self
, _args
)
5320 PyObject
*_res
= NULL
;
5322 if (!PyArg_ParseTuple(_args
, "O&",
5323 MovieObj_Convert
, &src
))
5325 AddMovieSelection(_self
->ob_itself
,
5332 static PyObject
*MovieObj_ClearMovieSelection(_self
, _args
)
5336 PyObject
*_res
= NULL
;
5337 if (!PyArg_ParseTuple(_args
, ""))
5339 ClearMovieSelection(_self
->ob_itself
);
5345 static PyObject
*MovieObj_PutMovieIntoTypedHandle(_self
, _args
)
5349 PyObject
*_res
= NULL
;
5357 ComponentInstance userComp
;
5358 if (!PyArg_ParseTuple(_args
, "O&O&O&lllO&",
5359 TrackObj_Convert
, &targetTrack
,
5360 PyMac_GetOSType
, &handleType
,
5361 ResObj_Convert
, &publicMovie
,
5365 CmpInstObj_Convert
, &userComp
))
5367 _err
= PutMovieIntoTypedHandle(_self
->ob_itself
,
5375 if (_err
!= noErr
) return PyMac_Error(_err
);
5381 static PyObject
*MovieObj_CopyMovieSettings(_self
, _args
)
5385 PyObject
*_res
= NULL
;
5388 if (!PyArg_ParseTuple(_args
, "O&",
5389 MovieObj_Convert
, &dstMovie
))
5391 _err
= CopyMovieSettings(_self
->ob_itself
,
5393 if (_err
!= noErr
) return PyMac_Error(_err
);
5399 static PyObject
*MovieObj_ConvertMovieToFile(_self
, _args
)
5403 PyObject
*_res
= NULL
;
5409 ScriptCode scriptTag
;
5412 ComponentInstance userComp
;
5413 if (!PyArg_ParseTuple(_args
, "O&O&O&O&hlO&",
5414 TrackObj_Convert
, &onlyTrack
,
5415 PyMac_GetFSSpec
, &outputFile
,
5416 PyMac_GetOSType
, &fileType
,
5417 PyMac_GetOSType
, &creator
,
5420 CmpInstObj_Convert
, &userComp
))
5422 _err
= ConvertMovieToFile(_self
->ob_itself
,
5431 if (_err
!= noErr
) return PyMac_Error(_err
);
5432 _res
= Py_BuildValue("h",
5437 static PyObject
*MovieObj_GetMovieDataSize(_self
, _args
)
5441 PyObject
*_res
= NULL
;
5443 TimeValue startTime
;
5445 if (!PyArg_ParseTuple(_args
, "ll",
5449 _rv
= GetMovieDataSize(_self
->ob_itself
,
5452 _res
= Py_BuildValue("l",
5457 static PyObject
*MovieObj_PtInMovie(_self
, _args
)
5461 PyObject
*_res
= NULL
;
5464 if (!PyArg_ParseTuple(_args
, "O&",
5465 PyMac_GetPoint
, &pt
))
5467 _rv
= PtInMovie(_self
->ob_itself
,
5469 _res
= Py_BuildValue("b",
5474 static PyObject
*MovieObj_SetMovieLanguage(_self
, _args
)
5478 PyObject
*_res
= NULL
;
5480 if (!PyArg_ParseTuple(_args
, "l",
5483 SetMovieLanguage(_self
->ob_itself
,
5490 static PyObject
*MovieObj_GetMovieNextInterestingTime(_self
, _args
)
5494 PyObject
*_res
= NULL
;
5495 short interestingTimeFlags
;
5496 short numMediaTypes
;
5497 OSType whichMediaTypes
;
5500 TimeValue interestingTime
;
5501 TimeValue interestingDuration
;
5502 if (!PyArg_ParseTuple(_args
, "hhO&lO&",
5503 &interestingTimeFlags
,
5505 PyMac_GetOSType
, &whichMediaTypes
,
5507 PyMac_GetFixed
, &rate
))
5509 GetMovieNextInterestingTime(_self
->ob_itself
,
5510 interestingTimeFlags
,
5516 &interestingDuration
);
5517 _res
= Py_BuildValue("ll",
5519 interestingDuration
);
5523 static PyObject
*MovieObj_AddMovieResource(_self
, _args
)
5527 PyObject
*_res
= NULL
;
5532 if (!PyArg_ParseTuple(_args
, "hO&",
5534 PyMac_GetStr255
, resName
))
5536 _err
= AddMovieResource(_self
->ob_itself
,
5540 if (_err
!= noErr
) return PyMac_Error(_err
);
5541 _res
= Py_BuildValue("h",
5546 static PyObject
*MovieObj_UpdateMovieResource(_self
, _args
)
5550 PyObject
*_res
= NULL
;
5555 if (!PyArg_ParseTuple(_args
, "hhO&",
5558 PyMac_GetStr255
, resName
))
5560 _err
= UpdateMovieResource(_self
->ob_itself
,
5564 if (_err
!= noErr
) return PyMac_Error(_err
);
5570 static PyObject
*MovieObj_HasMovieChanged(_self
, _args
)
5574 PyObject
*_res
= NULL
;
5576 if (!PyArg_ParseTuple(_args
, ""))
5578 _rv
= HasMovieChanged(_self
->ob_itself
);
5579 _res
= Py_BuildValue("b",
5584 static PyObject
*MovieObj_ClearMovieChanged(_self
, _args
)
5588 PyObject
*_res
= NULL
;
5589 if (!PyArg_ParseTuple(_args
, ""))
5591 ClearMovieChanged(_self
->ob_itself
);
5597 static PyObject
*MovieObj_SetMovieDefaultDataRef(_self
, _args
)
5601 PyObject
*_res
= NULL
;
5605 if (!PyArg_ParseTuple(_args
, "O&O&",
5606 ResObj_Convert
, &dataRef
,
5607 PyMac_GetOSType
, &dataRefType
))
5609 _err
= SetMovieDefaultDataRef(_self
->ob_itself
,
5612 if (_err
!= noErr
) return PyMac_Error(_err
);
5618 static PyObject
*MovieObj_GetMovieDefaultDataRef(_self
, _args
)
5622 PyObject
*_res
= NULL
;
5626 if (!PyArg_ParseTuple(_args
, ""))
5628 _err
= GetMovieDefaultDataRef(_self
->ob_itself
,
5631 if (_err
!= noErr
) return PyMac_Error(_err
);
5632 _res
= Py_BuildValue("O&O&",
5633 ResObj_New
, dataRef
,
5634 PyMac_BuildOSType
, dataRefType
);
5638 static PyObject
*MovieObj_SetMovieColorTable(_self
, _args
)
5642 PyObject
*_res
= NULL
;
5645 if (!PyArg_ParseTuple(_args
, "O&",
5646 ResObj_Convert
, &ctab
))
5648 _err
= SetMovieColorTable(_self
->ob_itself
,
5650 if (_err
!= noErr
) return PyMac_Error(_err
);
5656 static PyObject
*MovieObj_GetMovieColorTable(_self
, _args
)
5660 PyObject
*_res
= NULL
;
5663 if (!PyArg_ParseTuple(_args
, ""))
5665 _err
= GetMovieColorTable(_self
->ob_itself
,
5667 if (_err
!= noErr
) return PyMac_Error(_err
);
5668 _res
= Py_BuildValue("O&",
5673 static PyObject
*MovieObj_FlattenMovie(_self
, _args
)
5677 PyObject
*_res
= NULL
;
5678 long movieFlattenFlags
;
5681 ScriptCode scriptTag
;
5682 long createMovieFileFlags
;
5685 if (!PyArg_ParseTuple(_args
, "lO&O&hlO&",
5687 PyMac_GetFSSpec
, &theFile
,
5688 PyMac_GetOSType
, &creator
,
5690 &createMovieFileFlags
,
5691 PyMac_GetStr255
, resName
))
5693 FlattenMovie(_self
->ob_itself
,
5698 createMovieFileFlags
,
5701 _res
= Py_BuildValue("h",
5706 static PyObject
*MovieObj_FlattenMovieData(_self
, _args
)
5710 PyObject
*_res
= NULL
;
5712 long movieFlattenFlags
;
5715 ScriptCode scriptTag
;
5716 long createMovieFileFlags
;
5717 if (!PyArg_ParseTuple(_args
, "lO&O&hl",
5719 PyMac_GetFSSpec
, &theFile
,
5720 PyMac_GetOSType
, &creator
,
5722 &createMovieFileFlags
))
5724 _rv
= FlattenMovieData(_self
->ob_itself
,
5729 createMovieFileFlags
);
5730 _res
= Py_BuildValue("O&",
5735 static PyObject
*MovieObj_MovieSearchText(_self
, _args
)
5739 PyObject
*_res
= NULL
;
5745 TimeValue searchTime
;
5747 if (!PyArg_ParseTuple(_args
, "sll",
5752 _err
= MovieSearchText(_self
->ob_itself
,
5759 if (_err
!= noErr
) return PyMac_Error(_err
);
5760 _res
= Py_BuildValue("O&ll",
5761 TrackObj_New
, searchTrack
,
5767 static PyObject
*MovieObj_GetPosterBox(_self
, _args
)
5771 PyObject
*_res
= NULL
;
5773 if (!PyArg_ParseTuple(_args
, ""))
5775 GetPosterBox(_self
->ob_itself
,
5777 _res
= Py_BuildValue("O&",
5778 PyMac_BuildRect
, &boxRect
);
5782 static PyObject
*MovieObj_SetPosterBox(_self
, _args
)
5786 PyObject
*_res
= NULL
;
5788 if (!PyArg_ParseTuple(_args
, "O&",
5789 PyMac_GetRect
, &boxRect
))
5791 SetPosterBox(_self
->ob_itself
,
5798 static PyObject
*MovieObj_GetMovieSegmentDisplayBoundsRgn(_self
, _args
)
5802 PyObject
*_res
= NULL
;
5806 if (!PyArg_ParseTuple(_args
, "ll",
5810 _rv
= GetMovieSegmentDisplayBoundsRgn(_self
->ob_itself
,
5813 _res
= Py_BuildValue("O&",
5818 static PyObject
*MovieObj_GetMovieStatus(_self
, _args
)
5822 PyObject
*_res
= NULL
;
5823 ComponentResult _rv
;
5824 Track firstProblemTrack
;
5825 if (!PyArg_ParseTuple(_args
, ""))
5827 _rv
= GetMovieStatus(_self
->ob_itself
,
5828 &firstProblemTrack
);
5829 _res
= Py_BuildValue("lO&",
5831 TrackObj_New
, firstProblemTrack
);
5835 static PyObject
*MovieObj_NewMovieController(_self
, _args
)
5839 PyObject
*_res
= NULL
;
5840 MovieController _rv
;
5843 if (!PyArg_ParseTuple(_args
, "O&l",
5844 PyMac_GetRect
, &movieRect
,
5847 _rv
= NewMovieController(_self
->ob_itself
,
5850 _res
= Py_BuildValue("O&",
5851 MovieCtlObj_New
, _rv
);
5855 static PyObject
*MovieObj_PutMovieOnScrap(_self
, _args
)
5859 PyObject
*_res
= NULL
;
5861 long movieScrapFlags
;
5862 if (!PyArg_ParseTuple(_args
, "l",
5865 _err
= PutMovieOnScrap(_self
->ob_itself
,
5867 if (_err
!= noErr
) return PyMac_Error(_err
);
5873 static PyObject
*MovieObj_SetMoviePlayHints(_self
, _args
)
5877 PyObject
*_res
= NULL
;
5880 if (!PyArg_ParseTuple(_args
, "ll",
5884 SetMoviePlayHints(_self
->ob_itself
,
5892 static PyObject
*MovieObj_GetMaxLoadedTimeInMovie(_self
, _args
)
5896 PyObject
*_res
= NULL
;
5899 if (!PyArg_ParseTuple(_args
, ""))
5901 _err
= GetMaxLoadedTimeInMovie(_self
->ob_itself
,
5903 if (_err
!= noErr
) return PyMac_Error(_err
);
5904 _res
= Py_BuildValue("l",
5909 static PyObject
*MovieObj_QTMovieNeedsTimeTable(_self
, _args
)
5913 PyObject
*_res
= NULL
;
5915 Boolean needsTimeTable
;
5916 if (!PyArg_ParseTuple(_args
, ""))
5918 _err
= QTMovieNeedsTimeTable(_self
->ob_itself
,
5920 if (_err
!= noErr
) return PyMac_Error(_err
);
5921 _res
= Py_BuildValue("b",
5926 static PyObject
*MovieObj_QTGetDataRefMaxFileOffset(_self
, _args
)
5930 PyObject
*_res
= NULL
;
5935 if (!PyArg_ParseTuple(_args
, "O&O&",
5936 PyMac_GetOSType
, &dataRefType
,
5937 ResObj_Convert
, &dataRef
))
5939 _err
= QTGetDataRefMaxFileOffset(_self
->ob_itself
,
5943 if (_err
!= noErr
) return PyMac_Error(_err
);
5944 _res
= Py_BuildValue("l",
5949 static PyMethodDef MovieObj_methods
[] = {
5950 {"MoviesTask", (PyCFunction
)MovieObj_MoviesTask
, 1,
5951 "(long maxMilliSecToUse) -> None"},
5952 {"PrerollMovie", (PyCFunction
)MovieObj_PrerollMovie
, 1,
5953 "(TimeValue time, Fixed Rate) -> None"},
5954 {"LoadMovieIntoRam", (PyCFunction
)MovieObj_LoadMovieIntoRam
, 1,
5955 "(TimeValue time, TimeValue duration, long flags) -> None"},
5956 {"SetMovieActive", (PyCFunction
)MovieObj_SetMovieActive
, 1,
5957 "(Boolean active) -> None"},
5958 {"GetMovieActive", (PyCFunction
)MovieObj_GetMovieActive
, 1,
5959 "() -> (Boolean _rv)"},
5960 {"StartMovie", (PyCFunction
)MovieObj_StartMovie
, 1,
5962 {"StopMovie", (PyCFunction
)MovieObj_StopMovie
, 1,
5964 {"GoToBeginningOfMovie", (PyCFunction
)MovieObj_GoToBeginningOfMovie
, 1,
5966 {"GoToEndOfMovie", (PyCFunction
)MovieObj_GoToEndOfMovie
, 1,
5968 {"IsMovieDone", (PyCFunction
)MovieObj_IsMovieDone
, 1,
5969 "() -> (Boolean _rv)"},
5970 {"GetMoviePreviewMode", (PyCFunction
)MovieObj_GetMoviePreviewMode
, 1,
5971 "() -> (Boolean _rv)"},
5972 {"SetMoviePreviewMode", (PyCFunction
)MovieObj_SetMoviePreviewMode
, 1,
5973 "(Boolean usePreview) -> None"},
5974 {"ShowMoviePoster", (PyCFunction
)MovieObj_ShowMoviePoster
, 1,
5976 {"GetMovieTimeBase", (PyCFunction
)MovieObj_GetMovieTimeBase
, 1,
5977 "() -> (TimeBase _rv)"},
5978 {"SetMovieMasterTimeBase", (PyCFunction
)MovieObj_SetMovieMasterTimeBase
, 1,
5979 "(TimeBase tb, TimeRecord slaveZero) -> None"},
5980 {"SetMovieMasterClock", (PyCFunction
)MovieObj_SetMovieMasterClock
, 1,
5981 "(Component clockMeister, TimeRecord slaveZero) -> None"},
5982 {"GetMovieGWorld", (PyCFunction
)MovieObj_GetMovieGWorld
, 1,
5983 "() -> (CGrafPtr port, GDHandle gdh)"},
5984 {"SetMovieGWorld", (PyCFunction
)MovieObj_SetMovieGWorld
, 1,
5985 "(CGrafPtr port, GDHandle gdh) -> None"},
5986 {"GetMovieNaturalBoundsRect", (PyCFunction
)MovieObj_GetMovieNaturalBoundsRect
, 1,
5987 "() -> (Rect naturalBounds)"},
5988 {"GetNextTrackForCompositing", (PyCFunction
)MovieObj_GetNextTrackForCompositing
, 1,
5989 "(Track theTrack) -> (Track _rv)"},
5990 {"GetPrevTrackForCompositing", (PyCFunction
)MovieObj_GetPrevTrackForCompositing
, 1,
5991 "(Track theTrack) -> (Track _rv)"},
5992 {"GetMoviePict", (PyCFunction
)MovieObj_GetMoviePict
, 1,
5993 "(TimeValue time) -> (PicHandle _rv)"},
5994 {"GetMoviePosterPict", (PyCFunction
)MovieObj_GetMoviePosterPict
, 1,
5995 "() -> (PicHandle _rv)"},
5996 {"UpdateMovie", (PyCFunction
)MovieObj_UpdateMovie
, 1,
5998 {"InvalidateMovieRegion", (PyCFunction
)MovieObj_InvalidateMovieRegion
, 1,
5999 "(RgnHandle invalidRgn) -> None"},
6000 {"GetMovieBox", (PyCFunction
)MovieObj_GetMovieBox
, 1,
6001 "() -> (Rect boxRect)"},
6002 {"SetMovieBox", (PyCFunction
)MovieObj_SetMovieBox
, 1,
6003 "(Rect boxRect) -> None"},
6004 {"GetMovieDisplayClipRgn", (PyCFunction
)MovieObj_GetMovieDisplayClipRgn
, 1,
6005 "() -> (RgnHandle _rv)"},
6006 {"SetMovieDisplayClipRgn", (PyCFunction
)MovieObj_SetMovieDisplayClipRgn
, 1,
6007 "(RgnHandle theClip) -> None"},
6008 {"GetMovieClipRgn", (PyCFunction
)MovieObj_GetMovieClipRgn
, 1,
6009 "() -> (RgnHandle _rv)"},
6010 {"SetMovieClipRgn", (PyCFunction
)MovieObj_SetMovieClipRgn
, 1,
6011 "(RgnHandle theClip) -> None"},
6012 {"GetMovieDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieDisplayBoundsRgn
, 1,
6013 "() -> (RgnHandle _rv)"},
6014 {"GetMovieBoundsRgn", (PyCFunction
)MovieObj_GetMovieBoundsRgn
, 1,
6015 "() -> (RgnHandle _rv)"},
6016 {"PutMovieIntoHandle", (PyCFunction
)MovieObj_PutMovieIntoHandle
, 1,
6017 "(Handle publicMovie) -> None"},
6018 {"PutMovieIntoDataFork", (PyCFunction
)MovieObj_PutMovieIntoDataFork
, 1,
6019 "(short fRefNum, long offset, long maxSize) -> None"},
6020 {"GetMovieCreationTime", (PyCFunction
)MovieObj_GetMovieCreationTime
, 1,
6021 "() -> (unsigned long _rv)"},
6022 {"GetMovieModificationTime", (PyCFunction
)MovieObj_GetMovieModificationTime
, 1,
6023 "() -> (unsigned long _rv)"},
6024 {"GetMovieTimeScale", (PyCFunction
)MovieObj_GetMovieTimeScale
, 1,
6025 "() -> (TimeScale _rv)"},
6026 {"SetMovieTimeScale", (PyCFunction
)MovieObj_SetMovieTimeScale
, 1,
6027 "(TimeScale timeScale) -> None"},
6028 {"GetMovieDuration", (PyCFunction
)MovieObj_GetMovieDuration
, 1,
6029 "() -> (TimeValue _rv)"},
6030 {"GetMovieRate", (PyCFunction
)MovieObj_GetMovieRate
, 1,
6031 "() -> (Fixed _rv)"},
6032 {"SetMovieRate", (PyCFunction
)MovieObj_SetMovieRate
, 1,
6033 "(Fixed rate) -> None"},
6034 {"GetMoviePreferredRate", (PyCFunction
)MovieObj_GetMoviePreferredRate
, 1,
6035 "() -> (Fixed _rv)"},
6036 {"SetMoviePreferredRate", (PyCFunction
)MovieObj_SetMoviePreferredRate
, 1,
6037 "(Fixed rate) -> None"},
6038 {"GetMoviePreferredVolume", (PyCFunction
)MovieObj_GetMoviePreferredVolume
, 1,
6039 "() -> (short _rv)"},
6040 {"SetMoviePreferredVolume", (PyCFunction
)MovieObj_SetMoviePreferredVolume
, 1,
6041 "(short volume) -> None"},
6042 {"GetMovieVolume", (PyCFunction
)MovieObj_GetMovieVolume
, 1,
6043 "() -> (short _rv)"},
6044 {"SetMovieVolume", (PyCFunction
)MovieObj_SetMovieVolume
, 1,
6045 "(short volume) -> None"},
6046 {"GetMoviePreviewTime", (PyCFunction
)MovieObj_GetMoviePreviewTime
, 1,
6047 "() -> (TimeValue previewTime, TimeValue previewDuration)"},
6048 {"SetMoviePreviewTime", (PyCFunction
)MovieObj_SetMoviePreviewTime
, 1,
6049 "(TimeValue previewTime, TimeValue previewDuration) -> None"},
6050 {"GetMoviePosterTime", (PyCFunction
)MovieObj_GetMoviePosterTime
, 1,
6051 "() -> (TimeValue _rv)"},
6052 {"SetMoviePosterTime", (PyCFunction
)MovieObj_SetMoviePosterTime
, 1,
6053 "(TimeValue posterTime) -> None"},
6054 {"GetMovieSelection", (PyCFunction
)MovieObj_GetMovieSelection
, 1,
6055 "() -> (TimeValue selectionTime, TimeValue selectionDuration)"},
6056 {"SetMovieSelection", (PyCFunction
)MovieObj_SetMovieSelection
, 1,
6057 "(TimeValue selectionTime, TimeValue selectionDuration) -> None"},
6058 {"SetMovieActiveSegment", (PyCFunction
)MovieObj_SetMovieActiveSegment
, 1,
6059 "(TimeValue startTime, TimeValue duration) -> None"},
6060 {"GetMovieActiveSegment", (PyCFunction
)MovieObj_GetMovieActiveSegment
, 1,
6061 "() -> (TimeValue startTime, TimeValue duration)"},
6062 {"GetMovieTime", (PyCFunction
)MovieObj_GetMovieTime
, 1,
6063 "() -> (TimeValue _rv, TimeRecord currentTime)"},
6064 {"SetMovieTime", (PyCFunction
)MovieObj_SetMovieTime
, 1,
6065 "(TimeRecord newtime) -> None"},
6066 {"SetMovieTimeValue", (PyCFunction
)MovieObj_SetMovieTimeValue
, 1,
6067 "(TimeValue newtime) -> None"},
6068 {"GetMovieUserData", (PyCFunction
)MovieObj_GetMovieUserData
, 1,
6069 "() -> (UserData _rv)"},
6070 {"GetMovieTrackCount", (PyCFunction
)MovieObj_GetMovieTrackCount
, 1,
6071 "() -> (long _rv)"},
6072 {"GetMovieTrack", (PyCFunction
)MovieObj_GetMovieTrack
, 1,
6073 "(long trackID) -> (Track _rv)"},
6074 {"GetMovieIndTrack", (PyCFunction
)MovieObj_GetMovieIndTrack
, 1,
6075 "(long index) -> (Track _rv)"},
6076 {"GetMovieIndTrackType", (PyCFunction
)MovieObj_GetMovieIndTrackType
, 1,
6077 "(long index, OSType trackType, long flags) -> (Track _rv)"},
6078 {"NewMovieTrack", (PyCFunction
)MovieObj_NewMovieTrack
, 1,
6079 "(Fixed width, Fixed height, short trackVolume) -> (Track _rv)"},
6080 {"SetAutoTrackAlternatesEnabled", (PyCFunction
)MovieObj_SetAutoTrackAlternatesEnabled
, 1,
6081 "(Boolean enable) -> None"},
6082 {"SelectMovieAlternates", (PyCFunction
)MovieObj_SelectMovieAlternates
, 1,
6084 {"InsertMovieSegment", (PyCFunction
)MovieObj_InsertMovieSegment
, 1,
6085 "(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
6086 {"InsertEmptyMovieSegment", (PyCFunction
)MovieObj_InsertEmptyMovieSegment
, 1,
6087 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
6088 {"DeleteMovieSegment", (PyCFunction
)MovieObj_DeleteMovieSegment
, 1,
6089 "(TimeValue startTime, TimeValue duration) -> None"},
6090 {"ScaleMovieSegment", (PyCFunction
)MovieObj_ScaleMovieSegment
, 1,
6091 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
6092 {"CutMovieSelection", (PyCFunction
)MovieObj_CutMovieSelection
, 1,
6093 "() -> (Movie _rv)"},
6094 {"CopyMovieSelection", (PyCFunction
)MovieObj_CopyMovieSelection
, 1,
6095 "() -> (Movie _rv)"},
6096 {"PasteMovieSelection", (PyCFunction
)MovieObj_PasteMovieSelection
, 1,
6097 "(Movie src) -> None"},
6098 {"AddMovieSelection", (PyCFunction
)MovieObj_AddMovieSelection
, 1,
6099 "(Movie src) -> None"},
6100 {"ClearMovieSelection", (PyCFunction
)MovieObj_ClearMovieSelection
, 1,
6102 {"PutMovieIntoTypedHandle", (PyCFunction
)MovieObj_PutMovieIntoTypedHandle
, 1,
6103 "(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None"},
6104 {"CopyMovieSettings", (PyCFunction
)MovieObj_CopyMovieSettings
, 1,
6105 "(Movie dstMovie) -> None"},
6106 {"ConvertMovieToFile", (PyCFunction
)MovieObj_ConvertMovieToFile
, 1,
6107 "(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)"},
6108 {"GetMovieDataSize", (PyCFunction
)MovieObj_GetMovieDataSize
, 1,
6109 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
6110 {"PtInMovie", (PyCFunction
)MovieObj_PtInMovie
, 1,
6111 "(Point pt) -> (Boolean _rv)"},
6112 {"SetMovieLanguage", (PyCFunction
)MovieObj_SetMovieLanguage
, 1,
6113 "(long language) -> None"},
6114 {"GetMovieNextInterestingTime", (PyCFunction
)MovieObj_GetMovieNextInterestingTime
, 1,
6115 "(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
6116 {"AddMovieResource", (PyCFunction
)MovieObj_AddMovieResource
, 1,
6117 "(short resRefNum, Str255 resName) -> (short resId)"},
6118 {"UpdateMovieResource", (PyCFunction
)MovieObj_UpdateMovieResource
, 1,
6119 "(short resRefNum, short resId, Str255 resName) -> None"},
6120 {"HasMovieChanged", (PyCFunction
)MovieObj_HasMovieChanged
, 1,
6121 "() -> (Boolean _rv)"},
6122 {"ClearMovieChanged", (PyCFunction
)MovieObj_ClearMovieChanged
, 1,
6124 {"SetMovieDefaultDataRef", (PyCFunction
)MovieObj_SetMovieDefaultDataRef
, 1,
6125 "(Handle dataRef, OSType dataRefType) -> None"},
6126 {"GetMovieDefaultDataRef", (PyCFunction
)MovieObj_GetMovieDefaultDataRef
, 1,
6127 "() -> (Handle dataRef, OSType dataRefType)"},
6128 {"SetMovieColorTable", (PyCFunction
)MovieObj_SetMovieColorTable
, 1,
6129 "(CTabHandle ctab) -> None"},
6130 {"GetMovieColorTable", (PyCFunction
)MovieObj_GetMovieColorTable
, 1,
6131 "() -> (CTabHandle ctab)"},
6132 {"FlattenMovie", (PyCFunction
)MovieObj_FlattenMovie
, 1,
6133 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)"},
6134 {"FlattenMovieData", (PyCFunction
)MovieObj_FlattenMovieData
, 1,
6135 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)"},
6136 {"MovieSearchText", (PyCFunction
)MovieObj_MovieSearchText
, 1,
6137 "(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)"},
6138 {"GetPosterBox", (PyCFunction
)MovieObj_GetPosterBox
, 1,
6139 "() -> (Rect boxRect)"},
6140 {"SetPosterBox", (PyCFunction
)MovieObj_SetPosterBox
, 1,
6141 "(Rect boxRect) -> None"},
6142 {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieSegmentDisplayBoundsRgn
, 1,
6143 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
6144 {"GetMovieStatus", (PyCFunction
)MovieObj_GetMovieStatus
, 1,
6145 "() -> (ComponentResult _rv, Track firstProblemTrack)"},
6146 {"NewMovieController", (PyCFunction
)MovieObj_NewMovieController
, 1,
6147 "(Rect movieRect, long someFlags) -> (MovieController _rv)"},
6148 {"PutMovieOnScrap", (PyCFunction
)MovieObj_PutMovieOnScrap
, 1,
6149 "(long movieScrapFlags) -> None"},
6150 {"SetMoviePlayHints", (PyCFunction
)MovieObj_SetMoviePlayHints
, 1,
6151 "(long flags, long flagsMask) -> None"},
6152 {"GetMaxLoadedTimeInMovie", (PyCFunction
)MovieObj_GetMaxLoadedTimeInMovie
, 1,
6153 "() -> (TimeValue time)"},
6154 {"QTMovieNeedsTimeTable", (PyCFunction
)MovieObj_QTMovieNeedsTimeTable
, 1,
6155 "() -> (Boolean needsTimeTable)"},
6156 {"QTGetDataRefMaxFileOffset", (PyCFunction
)MovieObj_QTGetDataRefMaxFileOffset
, 1,
6157 "(OSType dataRefType, Handle dataRef) -> (long offset)"},
6161 PyMethodChain MovieObj_chain
= { MovieObj_methods
, NULL
};
6163 static PyObject
*MovieObj_getattr(self
, name
)
6167 return Py_FindMethodInChain(&MovieObj_chain
, (PyObject
*)self
, name
);
6170 #define MovieObj_setattr NULL
6172 #define MovieObj_compare NULL
6174 #define MovieObj_repr NULL
6176 #define MovieObj_hash NULL
6178 PyTypeObject Movie_Type
= {
6179 PyObject_HEAD_INIT(&PyType_Type
)
6181 "Movie", /*tp_name*/
6182 sizeof(MovieObject
), /*tp_basicsize*/
6185 (destructor
) MovieObj_dealloc
, /*tp_dealloc*/
6187 (getattrfunc
) MovieObj_getattr
, /*tp_getattr*/
6188 (setattrfunc
) MovieObj_setattr
, /*tp_setattr*/
6189 (cmpfunc
) MovieObj_compare
, /*tp_compare*/
6190 (reprfunc
) MovieObj_repr
, /*tp_repr*/
6191 (PyNumberMethods
*)0, /* tp_as_number */
6192 (PySequenceMethods
*)0, /* tp_as_sequence */
6193 (PyMappingMethods
*)0, /* tp_as_mapping */
6194 (hashfunc
) MovieObj_hash
, /*tp_hash*/
6197 /* --------------------- End object type Movie ---------------------- */
6200 static PyObject
*Qt_EnterMovies(_self
, _args
)
6204 PyObject
*_res
= NULL
;
6206 if (!PyArg_ParseTuple(_args
, ""))
6208 _err
= EnterMovies();
6209 if (_err
!= noErr
) return PyMac_Error(_err
);
6215 static PyObject
*Qt_ExitMovies(_self
, _args
)
6219 PyObject
*_res
= NULL
;
6220 if (!PyArg_ParseTuple(_args
, ""))
6228 static PyObject
*Qt_GetMoviesError(_self
, _args
)
6232 PyObject
*_res
= NULL
;
6234 if (!PyArg_ParseTuple(_args
, ""))
6236 _err
= GetMoviesError();
6237 if (_err
!= noErr
) return PyMac_Error(_err
);
6243 static PyObject
*Qt_ClearMoviesStickyError(_self
, _args
)
6247 PyObject
*_res
= NULL
;
6248 if (!PyArg_ParseTuple(_args
, ""))
6250 ClearMoviesStickyError();
6256 static PyObject
*Qt_GetMoviesStickyError(_self
, _args
)
6260 PyObject
*_res
= NULL
;
6262 if (!PyArg_ParseTuple(_args
, ""))
6264 _err
= GetMoviesStickyError();
6265 if (_err
!= noErr
) return PyMac_Error(_err
);
6271 static PyObject
*Qt_DisposeMatte(_self
, _args
)
6275 PyObject
*_res
= NULL
;
6276 PixMapHandle theMatte
;
6277 if (!PyArg_ParseTuple(_args
, "O&",
6278 ResObj_Convert
, &theMatte
))
6280 DisposeMatte(theMatte
);
6286 static PyObject
*Qt_NewMovie(_self
, _args
)
6290 PyObject
*_res
= NULL
;
6293 if (!PyArg_ParseTuple(_args
, "l",
6296 _rv
= NewMovie(flags
);
6297 _res
= Py_BuildValue("O&",
6302 static PyObject
*Qt_GetDataHandler(_self
, _args
)
6306 PyObject
*_res
= NULL
;
6309 OSType dataHandlerSubType
;
6311 if (!PyArg_ParseTuple(_args
, "O&O&l",
6312 ResObj_Convert
, &dataRef
,
6313 PyMac_GetOSType
, &dataHandlerSubType
,
6316 _rv
= GetDataHandler(dataRef
,
6319 _res
= Py_BuildValue("O&",
6324 static PyObject
*Qt_PasteHandleIntoMovie(_self
, _args
)
6328 PyObject
*_res
= NULL
;
6334 ComponentInstance userComp
;
6335 if (!PyArg_ParseTuple(_args
, "O&O&O&lO&",
6337 PyMac_GetOSType
, &handleType
,
6338 MovieObj_Convert
, &theMovie
,
6340 CmpInstObj_Convert
, &userComp
))
6342 _err
= PasteHandleIntoMovie(h
,
6347 if (_err
!= noErr
) return PyMac_Error(_err
);
6353 static PyObject
*Qt_GetMovieImporterForDataRef(_self
, _args
)
6357 PyObject
*_res
= NULL
;
6363 if (!PyArg_ParseTuple(_args
, "O&O&l",
6364 PyMac_GetOSType
, &dataRefType
,
6365 ResObj_Convert
, &dataRef
,
6368 _err
= GetMovieImporterForDataRef(dataRefType
,
6372 if (_err
!= noErr
) return PyMac_Error(_err
);
6373 _res
= Py_BuildValue("O&",
6374 CmpObj_New
, importer
);
6378 static PyObject
*Qt_TrackTimeToMediaTime(_self
, _args
)
6382 PyObject
*_res
= NULL
;
6386 if (!PyArg_ParseTuple(_args
, "lO&",
6388 TrackObj_Convert
, &theTrack
))
6390 _rv
= TrackTimeToMediaTime(value
,
6392 _res
= Py_BuildValue("l",
6397 static PyObject
*Qt_NewUserData(_self
, _args
)
6401 PyObject
*_res
= NULL
;
6403 UserData theUserData
;
6404 if (!PyArg_ParseTuple(_args
, ""))
6406 _err
= NewUserData(&theUserData
);
6407 if (_err
!= noErr
) return PyMac_Error(_err
);
6408 _res
= Py_BuildValue("O&",
6409 UserDataObj_New
, theUserData
);
6413 static PyObject
*Qt_NewUserDataFromHandle(_self
, _args
)
6417 PyObject
*_res
= NULL
;
6420 UserData theUserData
;
6421 if (!PyArg_ParseTuple(_args
, "O&",
6422 ResObj_Convert
, &h
))
6424 _err
= NewUserDataFromHandle(h
,
6426 if (_err
!= noErr
) return PyMac_Error(_err
);
6427 _res
= Py_BuildValue("O&",
6428 UserDataObj_New
, theUserData
);
6432 static PyObject
*Qt_CreateMovieFile(_self
, _args
)
6436 PyObject
*_res
= NULL
;
6440 ScriptCode scriptTag
;
6441 long createMovieFileFlags
;
6444 if (!PyArg_ParseTuple(_args
, "O&O&hl",
6445 PyMac_GetFSSpec
, &fileSpec
,
6446 PyMac_GetOSType
, &creator
,
6448 &createMovieFileFlags
))
6450 _err
= CreateMovieFile(&fileSpec
,
6453 createMovieFileFlags
,
6456 if (_err
!= noErr
) return PyMac_Error(_err
);
6457 _res
= Py_BuildValue("hO&",
6459 MovieObj_New
, newmovie
);
6463 static PyObject
*Qt_OpenMovieFile(_self
, _args
)
6467 PyObject
*_res
= NULL
;
6472 if (!PyArg_ParseTuple(_args
, "O&b",
6473 PyMac_GetFSSpec
, &fileSpec
,
6476 _err
= OpenMovieFile(&fileSpec
,
6479 if (_err
!= noErr
) return PyMac_Error(_err
);
6480 _res
= Py_BuildValue("h",
6485 static PyObject
*Qt_CloseMovieFile(_self
, _args
)
6489 PyObject
*_res
= NULL
;
6492 if (!PyArg_ParseTuple(_args
, "h",
6495 _err
= CloseMovieFile(resRefNum
);
6496 if (_err
!= noErr
) return PyMac_Error(_err
);
6502 static PyObject
*Qt_DeleteMovieFile(_self
, _args
)
6506 PyObject
*_res
= NULL
;
6509 if (!PyArg_ParseTuple(_args
, "O&",
6510 PyMac_GetFSSpec
, &fileSpec
))
6512 _err
= DeleteMovieFile(&fileSpec
);
6513 if (_err
!= noErr
) return PyMac_Error(_err
);
6519 static PyObject
*Qt_NewMovieFromFile(_self
, _args
)
6523 PyObject
*_res
= NULL
;
6528 short newMovieFlags
;
6529 Boolean dataRefWasChanged
;
6530 if (!PyArg_ParseTuple(_args
, "hhh",
6535 _err
= NewMovieFromFile(&theMovie
,
6540 &dataRefWasChanged
);
6541 if (_err
!= noErr
) return PyMac_Error(_err
);
6542 _res
= Py_BuildValue("O&hb",
6543 MovieObj_New
, theMovie
,
6549 static PyObject
*Qt_NewMovieFromHandle(_self
, _args
)
6553 PyObject
*_res
= NULL
;
6557 short newMovieFlags
;
6558 Boolean dataRefWasChanged
;
6559 if (!PyArg_ParseTuple(_args
, "O&h",
6563 _err
= NewMovieFromHandle(&theMovie
,
6566 &dataRefWasChanged
);
6567 if (_err
!= noErr
) return PyMac_Error(_err
);
6568 _res
= Py_BuildValue("O&b",
6569 MovieObj_New
, theMovie
,
6574 static PyObject
*Qt_NewMovieFromDataFork(_self
, _args
)
6578 PyObject
*_res
= NULL
;
6583 short newMovieFlags
;
6584 Boolean dataRefWasChanged
;
6585 if (!PyArg_ParseTuple(_args
, "hlh",
6590 _err
= NewMovieFromDataFork(&theMovie
,
6594 &dataRefWasChanged
);
6595 if (_err
!= noErr
) return PyMac_Error(_err
);
6596 _res
= Py_BuildValue("O&b",
6597 MovieObj_New
, theMovie
,
6602 static PyObject
*Qt_NewMovieFromDataRef(_self
, _args
)
6606 PyObject
*_res
= NULL
;
6613 if (!PyArg_ParseTuple(_args
, "hO&O&",
6615 ResObj_Convert
, &dataRef
,
6616 PyMac_GetOSType
, &dataRefType
))
6618 _err
= NewMovieFromDataRef(&m
,
6623 if (_err
!= noErr
) return PyMac_Error(_err
);
6624 _res
= Py_BuildValue("O&h",
6630 static PyObject
*Qt_RemoveMovieResource(_self
, _args
)
6634 PyObject
*_res
= NULL
;
6638 if (!PyArg_ParseTuple(_args
, "hh",
6642 _err
= RemoveMovieResource(resRefNum
,
6644 if (_err
!= noErr
) return PyMac_Error(_err
);
6650 static PyObject
*Qt_NewMovieFromScrap(_self
, _args
)
6654 PyObject
*_res
= NULL
;
6657 if (!PyArg_ParseTuple(_args
, "l",
6660 _rv
= NewMovieFromScrap(newMovieFlags
);
6661 _res
= Py_BuildValue("O&",
6666 static PyObject
*Qt_QTNewAlias(_self
, _args
)
6670 PyObject
*_res
= NULL
;
6675 if (!PyArg_ParseTuple(_args
, "O&b",
6676 PyMac_GetFSSpec
, &fss
,
6679 _err
= QTNewAlias(&fss
,
6682 if (_err
!= noErr
) return PyMac_Error(_err
);
6683 _res
= Py_BuildValue("O&",
6688 static PyObject
*Qt_EndFullScreen(_self
, _args
)
6692 PyObject
*_res
= NULL
;
6696 if (!PyArg_ParseTuple(_args
, "sl",
6700 _err
= EndFullScreen(fullState
,
6702 if (_err
!= noErr
) return PyMac_Error(_err
);
6708 static PyObject
*Qt_AddSoundDescriptionExtension(_self
, _args
)
6712 PyObject
*_res
= NULL
;
6714 SoundDescriptionHandle desc
;
6717 if (!PyArg_ParseTuple(_args
, "O&O&O&",
6718 ResObj_Convert
, &desc
,
6719 ResObj_Convert
, &extension
,
6720 PyMac_GetOSType
, &idType
))
6722 _err
= AddSoundDescriptionExtension(desc
,
6725 if (_err
!= noErr
) return PyMac_Error(_err
);
6731 static PyObject
*Qt_GetSoundDescriptionExtension(_self
, _args
)
6735 PyObject
*_res
= NULL
;
6737 SoundDescriptionHandle desc
;
6740 if (!PyArg_ParseTuple(_args
, "O&O&",
6741 ResObj_Convert
, &desc
,
6742 PyMac_GetOSType
, &idType
))
6744 _err
= GetSoundDescriptionExtension(desc
,
6747 if (_err
!= noErr
) return PyMac_Error(_err
);
6748 _res
= Py_BuildValue("O&",
6749 ResObj_New
, extension
);
6753 static PyObject
*Qt_RemoveSoundDescriptionExtension(_self
, _args
)
6757 PyObject
*_res
= NULL
;
6759 SoundDescriptionHandle desc
;
6761 if (!PyArg_ParseTuple(_args
, "O&O&",
6762 ResObj_Convert
, &desc
,
6763 PyMac_GetOSType
, &idType
))
6765 _err
= RemoveSoundDescriptionExtension(desc
,
6767 if (_err
!= noErr
) return PyMac_Error(_err
);
6773 static PyObject
*Qt_QTIsStandardParameterDialogEvent(_self
, _args
)
6777 PyObject
*_res
= NULL
;
6780 QTParameterDialog createdDialog
;
6781 if (!PyArg_ParseTuple(_args
, "l",
6784 _err
= QTIsStandardParameterDialogEvent(&pEvent
,
6786 if (_err
!= noErr
) return PyMac_Error(_err
);
6787 _res
= Py_BuildValue("O&",
6788 PyMac_BuildEventRecord
, &pEvent
);
6792 static PyObject
*Qt_QTDismissStandardParameterDialog(_self
, _args
)
6796 PyObject
*_res
= NULL
;
6798 QTParameterDialog createdDialog
;
6799 if (!PyArg_ParseTuple(_args
, "l",
6802 _err
= QTDismissStandardParameterDialog(createdDialog
);
6803 if (_err
!= noErr
) return PyMac_Error(_err
);
6809 static PyObject
*Qt_QTStandardParameterDialogDoAction(_self
, _args
)
6813 PyObject
*_res
= NULL
;
6815 QTParameterDialog createdDialog
;
6818 if (!PyArg_ParseTuple(_args
, "lls",
6823 _err
= QTStandardParameterDialogDoAction(createdDialog
,
6826 if (_err
!= noErr
) return PyMac_Error(_err
);
6832 static PyObject
*Qt_QTRegisterAccessKey(_self
, _args
)
6836 PyObject
*_res
= NULL
;
6838 Str255 accessKeyType
;
6841 if (!PyArg_ParseTuple(_args
, "O&lO&",
6842 PyMac_GetStr255
, accessKeyType
,
6844 ResObj_Convert
, &accessKey
))
6846 _err
= QTRegisterAccessKey(accessKeyType
,
6849 if (_err
!= noErr
) return PyMac_Error(_err
);
6855 static PyObject
*Qt_QTUnregisterAccessKey(_self
, _args
)
6859 PyObject
*_res
= NULL
;
6861 Str255 accessKeyType
;
6864 if (!PyArg_ParseTuple(_args
, "O&lO&",
6865 PyMac_GetStr255
, accessKeyType
,
6867 ResObj_Convert
, &accessKey
))
6869 _err
= QTUnregisterAccessKey(accessKeyType
,
6872 if (_err
!= noErr
) return PyMac_Error(_err
);
6878 static PyObject
*Qt_QTTextToNativeText(_self
, _args
)
6882 PyObject
*_res
= NULL
;
6887 if (!PyArg_ParseTuple(_args
, "O&ll",
6888 ResObj_Convert
, &theText
,
6892 _err
= QTTextToNativeText(theText
,
6895 if (_err
!= noErr
) return PyMac_Error(_err
);
6901 static PyObject
*Qt_VideoMediaResetStatistics(_self
, _args
)
6905 PyObject
*_res
= NULL
;
6906 ComponentResult _rv
;
6908 if (!PyArg_ParseTuple(_args
, "O&",
6909 CmpInstObj_Convert
, &mh
))
6911 _rv
= VideoMediaResetStatistics(mh
);
6912 _res
= Py_BuildValue("l",
6917 static PyObject
*Qt_VideoMediaGetStatistics(_self
, _args
)
6921 PyObject
*_res
= NULL
;
6922 ComponentResult _rv
;
6924 if (!PyArg_ParseTuple(_args
, "O&",
6925 CmpInstObj_Convert
, &mh
))
6927 _rv
= VideoMediaGetStatistics(mh
);
6928 _res
= Py_BuildValue("l",
6933 static PyObject
*Qt_TextMediaAddTextSample(_self
, _args
)
6937 PyObject
*_res
= NULL
;
6938 ComponentResult _rv
;
6947 short textJustification
;
6950 TimeValue scrollDelay
;
6953 RGBColor rgbHiliteColor
;
6955 TimeValue sampleTime
;
6956 if (!PyArg_ParseTuple(_args
, "O&slhhbhllhhl",
6957 CmpInstObj_Convert
, &mh
,
6970 _rv
= TextMediaAddTextSample(mh
,
6987 _res
= Py_BuildValue("lO&O&O&O&l",
6989 QdRGB_New
, &textColor
,
6990 QdRGB_New
, &backColor
,
6991 PyMac_BuildRect
, &textBox
,
6992 QdRGB_New
, &rgbHiliteColor
,
6997 static PyObject
*Qt_TextMediaAddTESample(_self
, _args
)
7001 PyObject
*_res
= NULL
;
7002 ComponentResult _rv
;
7006 short textJustification
;
7009 TimeValue scrollDelay
;
7012 RGBColor rgbHiliteColor
;
7014 TimeValue sampleTime
;
7015 if (!PyArg_ParseTuple(_args
, "O&O&hllhhl",
7016 CmpInstObj_Convert
, &mh
,
7017 ResObj_Convert
, &hTE
,
7025 _rv
= TextMediaAddTESample(mh
,
7037 _res
= Py_BuildValue("lO&O&O&l",
7039 QdRGB_New
, &backColor
,
7040 PyMac_BuildRect
, &textBox
,
7041 QdRGB_New
, &rgbHiliteColor
,
7046 static PyObject
*Qt_TextMediaAddHiliteSample(_self
, _args
)
7050 PyObject
*_res
= NULL
;
7051 ComponentResult _rv
;
7055 RGBColor rgbHiliteColor
;
7057 TimeValue sampleTime
;
7058 if (!PyArg_ParseTuple(_args
, "O&hhl",
7059 CmpInstObj_Convert
, &mh
,
7064 _rv
= TextMediaAddHiliteSample(mh
,
7070 _res
= Py_BuildValue("lO&l",
7072 QdRGB_New
, &rgbHiliteColor
,
7077 static PyObject
*Qt_TextMediaFindNextText(_self
, _args
)
7081 PyObject
*_res
= NULL
;
7082 ComponentResult _rv
;
7087 TimeValue startTime
;
7088 TimeValue foundTime
;
7089 TimeValue foundDuration
;
7091 if (!PyArg_ParseTuple(_args
, "O&slhl",
7092 CmpInstObj_Convert
, &mh
,
7098 _rv
= TextMediaFindNextText(mh
,
7106 _res
= Py_BuildValue("llll",
7114 static PyObject
*Qt_TextMediaHiliteTextSample(_self
, _args
)
7118 PyObject
*_res
= NULL
;
7119 ComponentResult _rv
;
7121 TimeValue sampleTime
;
7124 RGBColor rgbHiliteColor
;
7125 if (!PyArg_ParseTuple(_args
, "O&lhh",
7126 CmpInstObj_Convert
, &mh
,
7131 _rv
= TextMediaHiliteTextSample(mh
,
7136 _res
= Py_BuildValue("lO&",
7138 QdRGB_New
, &rgbHiliteColor
);
7142 static PyObject
*Qt_TextMediaSetTextSampleData(_self
, _args
)
7146 PyObject
*_res
= NULL
;
7147 ComponentResult _rv
;
7151 if (!PyArg_ParseTuple(_args
, "O&sO&",
7152 CmpInstObj_Convert
, &mh
,
7154 PyMac_GetOSType
, &dataType
))
7156 _rv
= TextMediaSetTextSampleData(mh
,
7159 _res
= Py_BuildValue("l",
7164 static PyObject
*Qt_SpriteMediaSetProperty(_self
, _args
)
7168 PyObject
*_res
= NULL
;
7169 ComponentResult _rv
;
7173 void * propertyValue
;
7174 if (!PyArg_ParseTuple(_args
, "O&hls",
7175 CmpInstObj_Convert
, &mh
,
7180 _rv
= SpriteMediaSetProperty(mh
,
7184 _res
= Py_BuildValue("l",
7189 static PyObject
*Qt_SpriteMediaGetProperty(_self
, _args
)
7193 PyObject
*_res
= NULL
;
7194 ComponentResult _rv
;
7198 void * propertyValue
;
7199 if (!PyArg_ParseTuple(_args
, "O&hls",
7200 CmpInstObj_Convert
, &mh
,
7205 _rv
= SpriteMediaGetProperty(mh
,
7209 _res
= Py_BuildValue("l",
7214 static PyObject
*Qt_SpriteMediaHitTestSprites(_self
, _args
)
7218 PyObject
*_res
= NULL
;
7219 ComponentResult _rv
;
7223 short spriteHitIndex
;
7224 if (!PyArg_ParseTuple(_args
, "O&lO&",
7225 CmpInstObj_Convert
, &mh
,
7227 PyMac_GetPoint
, &loc
))
7229 _rv
= SpriteMediaHitTestSprites(mh
,
7233 _res
= Py_BuildValue("lh",
7239 static PyObject
*Qt_SpriteMediaCountSprites(_self
, _args
)
7243 PyObject
*_res
= NULL
;
7244 ComponentResult _rv
;
7247 if (!PyArg_ParseTuple(_args
, "O&",
7248 CmpInstObj_Convert
, &mh
))
7250 _rv
= SpriteMediaCountSprites(mh
,
7252 _res
= Py_BuildValue("lh",
7258 static PyObject
*Qt_SpriteMediaCountImages(_self
, _args
)
7262 PyObject
*_res
= NULL
;
7263 ComponentResult _rv
;
7266 if (!PyArg_ParseTuple(_args
, "O&",
7267 CmpInstObj_Convert
, &mh
))
7269 _rv
= SpriteMediaCountImages(mh
,
7271 _res
= Py_BuildValue("lh",
7277 static PyObject
*Qt_SpriteMediaGetIndImageDescription(_self
, _args
)
7281 PyObject
*_res
= NULL
;
7282 ComponentResult _rv
;
7285 ImageDescriptionHandle imageDescription
;
7286 if (!PyArg_ParseTuple(_args
, "O&hO&",
7287 CmpInstObj_Convert
, &mh
,
7289 ResObj_Convert
, &imageDescription
))
7291 _rv
= SpriteMediaGetIndImageDescription(mh
,
7294 _res
= Py_BuildValue("l",
7299 static PyObject
*Qt_SpriteMediaGetDisplayedSampleNumber(_self
, _args
)
7303 PyObject
*_res
= NULL
;
7304 ComponentResult _rv
;
7307 if (!PyArg_ParseTuple(_args
, "O&",
7308 CmpInstObj_Convert
, &mh
))
7310 _rv
= SpriteMediaGetDisplayedSampleNumber(mh
,
7312 _res
= Py_BuildValue("ll",
7318 static PyObject
*Qt_SpriteMediaGetSpriteName(_self
, _args
)
7322 PyObject
*_res
= NULL
;
7323 ComponentResult _rv
;
7327 if (!PyArg_ParseTuple(_args
, "O&lO&",
7328 CmpInstObj_Convert
, &mh
,
7330 PyMac_GetStr255
, spriteName
))
7332 _rv
= SpriteMediaGetSpriteName(mh
,
7335 _res
= Py_BuildValue("l",
7340 static PyObject
*Qt_SpriteMediaGetImageName(_self
, _args
)
7344 PyObject
*_res
= NULL
;
7345 ComponentResult _rv
;
7349 if (!PyArg_ParseTuple(_args
, "O&hO&",
7350 CmpInstObj_Convert
, &mh
,
7352 PyMac_GetStr255
, imageName
))
7354 _rv
= SpriteMediaGetImageName(mh
,
7357 _res
= Py_BuildValue("l",
7362 static PyObject
*Qt_SpriteMediaSetSpriteProperty(_self
, _args
)
7366 PyObject
*_res
= NULL
;
7367 ComponentResult _rv
;
7371 void * propertyValue
;
7372 if (!PyArg_ParseTuple(_args
, "O&lls",
7373 CmpInstObj_Convert
, &mh
,
7378 _rv
= SpriteMediaSetSpriteProperty(mh
,
7382 _res
= Py_BuildValue("l",
7387 static PyObject
*Qt_SpriteMediaGetSpriteProperty(_self
, _args
)
7391 PyObject
*_res
= NULL
;
7392 ComponentResult _rv
;
7396 void * propertyValue
;
7397 if (!PyArg_ParseTuple(_args
, "O&lls",
7398 CmpInstObj_Convert
, &mh
,
7403 _rv
= SpriteMediaGetSpriteProperty(mh
,
7407 _res
= Py_BuildValue("l",
7412 static PyObject
*Qt_SpriteMediaHitTestAllSprites(_self
, _args
)
7416 PyObject
*_res
= NULL
;
7417 ComponentResult _rv
;
7421 QTAtomID spriteHitID
;
7422 if (!PyArg_ParseTuple(_args
, "O&lO&",
7423 CmpInstObj_Convert
, &mh
,
7425 PyMac_GetPoint
, &loc
))
7427 _rv
= SpriteMediaHitTestAllSprites(mh
,
7431 _res
= Py_BuildValue("ll",
7437 static PyObject
*Qt_SpriteMediaHitTestOneSprite(_self
, _args
)
7441 PyObject
*_res
= NULL
;
7442 ComponentResult _rv
;
7448 if (!PyArg_ParseTuple(_args
, "O&llO&",
7449 CmpInstObj_Convert
, &mh
,
7452 PyMac_GetPoint
, &loc
))
7454 _rv
= SpriteMediaHitTestOneSprite(mh
,
7459 _res
= Py_BuildValue("lb",
7465 static PyObject
*Qt_SpriteMediaSpriteIndexToID(_self
, _args
)
7469 PyObject
*_res
= NULL
;
7470 ComponentResult _rv
;
7474 if (!PyArg_ParseTuple(_args
, "O&h",
7475 CmpInstObj_Convert
, &mh
,
7478 _rv
= SpriteMediaSpriteIndexToID(mh
,
7481 _res
= Py_BuildValue("ll",
7487 static PyObject
*Qt_SpriteMediaSpriteIDToIndex(_self
, _args
)
7491 PyObject
*_res
= NULL
;
7492 ComponentResult _rv
;
7496 if (!PyArg_ParseTuple(_args
, "O&l",
7497 CmpInstObj_Convert
, &mh
,
7500 _rv
= SpriteMediaSpriteIDToIndex(mh
,
7503 _res
= Py_BuildValue("lh",
7509 static PyObject
*Qt_SpriteMediaSetActionVariable(_self
, _args
)
7513 PyObject
*_res
= NULL
;
7514 ComponentResult _rv
;
7516 QTAtomID variableID
;
7518 if (!PyArg_ParseTuple(_args
, "O&lf",
7519 CmpInstObj_Convert
, &mh
,
7523 _rv
= SpriteMediaSetActionVariable(mh
,
7526 _res
= Py_BuildValue("l",
7531 static PyObject
*Qt_SpriteMediaGetActionVariable(_self
, _args
)
7535 PyObject
*_res
= NULL
;
7536 ComponentResult _rv
;
7538 QTAtomID variableID
;
7540 if (!PyArg_ParseTuple(_args
, "O&l",
7541 CmpInstObj_Convert
, &mh
,
7544 _rv
= SpriteMediaGetActionVariable(mh
,
7547 _res
= Py_BuildValue("lf",
7553 static PyObject
*Qt_SpriteMediaGetIndImageProperty(_self
, _args
)
7557 PyObject
*_res
= NULL
;
7558 ComponentResult _rv
;
7561 long imagePropertyType
;
7562 void * imagePropertyValue
;
7563 if (!PyArg_ParseTuple(_args
, "O&hls",
7564 CmpInstObj_Convert
, &mh
,
7567 &imagePropertyValue
))
7569 _rv
= SpriteMediaGetIndImageProperty(mh
,
7572 imagePropertyValue
);
7573 _res
= Py_BuildValue("l",
7578 static PyObject
*Qt_NewTimeBase(_self
, _args
)
7582 PyObject
*_res
= NULL
;
7584 if (!PyArg_ParseTuple(_args
, ""))
7586 _rv
= NewTimeBase();
7587 _res
= Py_BuildValue("O&",
7588 TimeBaseObj_New
, _rv
);
7592 static PyObject
*Qt_ConvertTime(_self
, _args
)
7596 PyObject
*_res
= NULL
;
7599 if (!PyArg_ParseTuple(_args
, "O&",
7600 TimeBaseObj_Convert
, &newBase
))
7604 _res
= Py_BuildValue("O&",
7605 QtTimeRecord_New
, &inout
);
7609 static PyObject
*Qt_ConvertTimeScale(_self
, _args
)
7613 PyObject
*_res
= NULL
;
7616 if (!PyArg_ParseTuple(_args
, "l",
7619 ConvertTimeScale(&inout
,
7621 _res
= Py_BuildValue("O&",
7622 QtTimeRecord_New
, &inout
);
7626 static PyObject
*Qt_AddTime(_self
, _args
)
7630 PyObject
*_res
= NULL
;
7633 if (!PyArg_ParseTuple(_args
, "O&",
7634 QtTimeRecord_Convert
, &src
))
7638 _res
= Py_BuildValue("O&",
7639 QtTimeRecord_New
, &dst
);
7643 static PyObject
*Qt_SubtractTime(_self
, _args
)
7647 PyObject
*_res
= NULL
;
7650 if (!PyArg_ParseTuple(_args
, "O&",
7651 QtTimeRecord_Convert
, &src
))
7655 _res
= Py_BuildValue("O&",
7656 QtTimeRecord_New
, &dst
);
7660 static PyObject
*Qt_MusicMediaGetIndexedTunePlayer(_self
, _args
)
7664 PyObject
*_res
= NULL
;
7665 ComponentResult _rv
;
7666 ComponentInstance ti
;
7667 long sampleDescIndex
;
7668 ComponentInstance tp
;
7669 if (!PyArg_ParseTuple(_args
, "O&l",
7670 CmpInstObj_Convert
, &ti
,
7673 _rv
= MusicMediaGetIndexedTunePlayer(ti
,
7676 _res
= Py_BuildValue("lO&",
7678 CmpInstObj_New
, tp
);
7682 static PyObject
*Qt_AlignWindow(_self
, _args
)
7686 PyObject
*_res
= NULL
;
7689 if (!PyArg_ParseTuple(_args
, "O&b",
7690 WinObj_Convert
, &wp
,
7696 (ICMAlignmentProcRecordPtr
)0);
7702 static PyObject
*Qt_DragAlignedWindow(_self
, _args
)
7706 PyObject
*_res
= NULL
;
7710 if (!PyArg_ParseTuple(_args
, "O&O&O&",
7711 WinObj_Convert
, &wp
,
7712 PyMac_GetPoint
, &startPt
,
7713 PyMac_GetRect
, &boundsRect
))
7715 DragAlignedWindow(wp
,
7719 (ICMAlignmentProcRecordPtr
)0);
7725 static PyObject
*Qt_MoviesTask(_self
, _args
)
7729 PyObject
*_res
= NULL
;
7730 long maxMilliSecToUse
;
7731 if (!PyArg_ParseTuple(_args
, "l",
7734 MoviesTask((Movie
)0,
7741 static PyObject
*Qt_available(_self
, _args
)
7745 PyObject
*_res
= NULL
;
7749 if ( !PyArg_ParseTuple(_args
, "") )
7751 ptr
= (void *)&EnterMovies
;
7752 return Py_BuildValue("i", ((long)ptr
!= 0));
7756 static PyMethodDef Qt_methods
[] = {
7757 {"EnterMovies", (PyCFunction
)Qt_EnterMovies
, 1,
7759 {"ExitMovies", (PyCFunction
)Qt_ExitMovies
, 1,
7761 {"GetMoviesError", (PyCFunction
)Qt_GetMoviesError
, 1,
7763 {"ClearMoviesStickyError", (PyCFunction
)Qt_ClearMoviesStickyError
, 1,
7765 {"GetMoviesStickyError", (PyCFunction
)Qt_GetMoviesStickyError
, 1,
7767 {"DisposeMatte", (PyCFunction
)Qt_DisposeMatte
, 1,
7768 "(PixMapHandle theMatte) -> None"},
7769 {"NewMovie", (PyCFunction
)Qt_NewMovie
, 1,
7770 "(long flags) -> (Movie _rv)"},
7771 {"GetDataHandler", (PyCFunction
)Qt_GetDataHandler
, 1,
7772 "(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)"},
7773 {"PasteHandleIntoMovie", (PyCFunction
)Qt_PasteHandleIntoMovie
, 1,
7774 "(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
7775 {"GetMovieImporterForDataRef", (PyCFunction
)Qt_GetMovieImporterForDataRef
, 1,
7776 "(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)"},
7777 {"TrackTimeToMediaTime", (PyCFunction
)Qt_TrackTimeToMediaTime
, 1,
7778 "(TimeValue value, Track theTrack) -> (TimeValue _rv)"},
7779 {"NewUserData", (PyCFunction
)Qt_NewUserData
, 1,
7780 "() -> (UserData theUserData)"},
7781 {"NewUserDataFromHandle", (PyCFunction
)Qt_NewUserDataFromHandle
, 1,
7782 "(Handle h) -> (UserData theUserData)"},
7783 {"CreateMovieFile", (PyCFunction
)Qt_CreateMovieFile
, 1,
7784 "(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)"},
7785 {"OpenMovieFile", (PyCFunction
)Qt_OpenMovieFile
, 1,
7786 "(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)"},
7787 {"CloseMovieFile", (PyCFunction
)Qt_CloseMovieFile
, 1,
7788 "(short resRefNum) -> None"},
7789 {"DeleteMovieFile", (PyCFunction
)Qt_DeleteMovieFile
, 1,
7790 "(FSSpec fileSpec) -> None"},
7791 {"NewMovieFromFile", (PyCFunction
)Qt_NewMovieFromFile
, 1,
7792 "(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)"},
7793 {"NewMovieFromHandle", (PyCFunction
)Qt_NewMovieFromHandle
, 1,
7794 "(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
7795 {"NewMovieFromDataFork", (PyCFunction
)Qt_NewMovieFromDataFork
, 1,
7796 "(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
7797 {"NewMovieFromDataRef", (PyCFunction
)Qt_NewMovieFromDataRef
, 1,
7798 "(short flags, Handle dataRef, OSType dataRefType) -> (Movie m, short id)"},
7799 {"RemoveMovieResource", (PyCFunction
)Qt_RemoveMovieResource
, 1,
7800 "(short resRefNum, short resId) -> None"},
7801 {"NewMovieFromScrap", (PyCFunction
)Qt_NewMovieFromScrap
, 1,
7802 "(long newMovieFlags) -> (Movie _rv)"},
7803 {"QTNewAlias", (PyCFunction
)Qt_QTNewAlias
, 1,
7804 "(FSSpec fss, Boolean minimal) -> (AliasHandle alias)"},
7805 {"EndFullScreen", (PyCFunction
)Qt_EndFullScreen
, 1,
7806 "(Ptr fullState, long flags) -> None"},
7807 {"AddSoundDescriptionExtension", (PyCFunction
)Qt_AddSoundDescriptionExtension
, 1,
7808 "(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None"},
7809 {"GetSoundDescriptionExtension", (PyCFunction
)Qt_GetSoundDescriptionExtension
, 1,
7810 "(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)"},
7811 {"RemoveSoundDescriptionExtension", (PyCFunction
)Qt_RemoveSoundDescriptionExtension
, 1,
7812 "(SoundDescriptionHandle desc, OSType idType) -> None"},
7813 {"QTIsStandardParameterDialogEvent", (PyCFunction
)Qt_QTIsStandardParameterDialogEvent
, 1,
7814 "(QTParameterDialog createdDialog) -> (EventRecord pEvent)"},
7815 {"QTDismissStandardParameterDialog", (PyCFunction
)Qt_QTDismissStandardParameterDialog
, 1,
7816 "(QTParameterDialog createdDialog) -> None"},
7817 {"QTStandardParameterDialogDoAction", (PyCFunction
)Qt_QTStandardParameterDialogDoAction
, 1,
7818 "(QTParameterDialog createdDialog, long action, void * params) -> None"},
7819 {"QTRegisterAccessKey", (PyCFunction
)Qt_QTRegisterAccessKey
, 1,
7820 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
7821 {"QTUnregisterAccessKey", (PyCFunction
)Qt_QTUnregisterAccessKey
, 1,
7822 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
7823 {"QTTextToNativeText", (PyCFunction
)Qt_QTTextToNativeText
, 1,
7824 "(Handle theText, long encoding, long flags) -> None"},
7825 {"VideoMediaResetStatistics", (PyCFunction
)Qt_VideoMediaResetStatistics
, 1,
7826 "(MediaHandler mh) -> (ComponentResult _rv)"},
7827 {"VideoMediaGetStatistics", (PyCFunction
)Qt_VideoMediaGetStatistics
, 1,
7828 "(MediaHandler mh) -> (ComponentResult _rv)"},
7829 {"TextMediaAddTextSample", (PyCFunction
)Qt_TextMediaAddTextSample
, 1,
7830 "(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)"},
7831 {"TextMediaAddTESample", (PyCFunction
)Qt_TextMediaAddTESample
, 1,
7832 "(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)"},
7833 {"TextMediaAddHiliteSample", (PyCFunction
)Qt_TextMediaAddHiliteSample
, 1,
7834 "(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
7835 {"TextMediaFindNextText", (PyCFunction
)Qt_TextMediaFindNextText
, 1,
7836 "(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)"},
7837 {"TextMediaHiliteTextSample", (PyCFunction
)Qt_TextMediaHiliteTextSample
, 1,
7838 "(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)"},
7839 {"TextMediaSetTextSampleData", (PyCFunction
)Qt_TextMediaSetTextSampleData
, 1,
7840 "(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)"},
7841 {"SpriteMediaSetProperty", (PyCFunction
)Qt_SpriteMediaSetProperty
, 1,
7842 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7843 {"SpriteMediaGetProperty", (PyCFunction
)Qt_SpriteMediaGetProperty
, 1,
7844 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7845 {"SpriteMediaHitTestSprites", (PyCFunction
)Qt_SpriteMediaHitTestSprites
, 1,
7846 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)"},
7847 {"SpriteMediaCountSprites", (PyCFunction
)Qt_SpriteMediaCountSprites
, 1,
7848 "(MediaHandler mh) -> (ComponentResult _rv, short numSprites)"},
7849 {"SpriteMediaCountImages", (PyCFunction
)Qt_SpriteMediaCountImages
, 1,
7850 "(MediaHandler mh) -> (ComponentResult _rv, short numImages)"},
7851 {"SpriteMediaGetIndImageDescription", (PyCFunction
)Qt_SpriteMediaGetIndImageDescription
, 1,
7852 "(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)"},
7853 {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction
)Qt_SpriteMediaGetDisplayedSampleNumber
, 1,
7854 "(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)"},
7855 {"SpriteMediaGetSpriteName", (PyCFunction
)Qt_SpriteMediaGetSpriteName
, 1,
7856 "(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)"},
7857 {"SpriteMediaGetImageName", (PyCFunction
)Qt_SpriteMediaGetImageName
, 1,
7858 "(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)"},
7859 {"SpriteMediaSetSpriteProperty", (PyCFunction
)Qt_SpriteMediaSetSpriteProperty
, 1,
7860 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7861 {"SpriteMediaGetSpriteProperty", (PyCFunction
)Qt_SpriteMediaGetSpriteProperty
, 1,
7862 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7863 {"SpriteMediaHitTestAllSprites", (PyCFunction
)Qt_SpriteMediaHitTestAllSprites
, 1,
7864 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)"},
7865 {"SpriteMediaHitTestOneSprite", (PyCFunction
)Qt_SpriteMediaHitTestOneSprite
, 1,
7866 "(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)"},
7867 {"SpriteMediaSpriteIndexToID", (PyCFunction
)Qt_SpriteMediaSpriteIndexToID
, 1,
7868 "(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)"},
7869 {"SpriteMediaSpriteIDToIndex", (PyCFunction
)Qt_SpriteMediaSpriteIDToIndex
, 1,
7870 "(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)"},
7871 {"SpriteMediaSetActionVariable", (PyCFunction
)Qt_SpriteMediaSetActionVariable
, 1,
7872 "(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)"},
7873 {"SpriteMediaGetActionVariable", (PyCFunction
)Qt_SpriteMediaGetActionVariable
, 1,
7874 "(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
7875 {"SpriteMediaGetIndImageProperty", (PyCFunction
)Qt_SpriteMediaGetIndImageProperty
, 1,
7876 "(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
7877 {"NewTimeBase", (PyCFunction
)Qt_NewTimeBase
, 1,
7878 "() -> (TimeBase _rv)"},
7879 {"ConvertTime", (PyCFunction
)Qt_ConvertTime
, 1,
7880 "(TimeBase newBase) -> (TimeRecord inout)"},
7881 {"ConvertTimeScale", (PyCFunction
)Qt_ConvertTimeScale
, 1,
7882 "(TimeScale newScale) -> (TimeRecord inout)"},
7883 {"AddTime", (PyCFunction
)Qt_AddTime
, 1,
7884 "(TimeRecord src) -> (TimeRecord dst)"},
7885 {"SubtractTime", (PyCFunction
)Qt_SubtractTime
, 1,
7886 "(TimeRecord src) -> (TimeRecord dst)"},
7887 {"MusicMediaGetIndexedTunePlayer", (PyCFunction
)Qt_MusicMediaGetIndexedTunePlayer
, 1,
7888 "(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)"},
7889 {"AlignWindow", (PyCFunction
)Qt_AlignWindow
, 1,
7890 "(WindowPtr wp, Boolean front) -> None"},
7891 {"DragAlignedWindow", (PyCFunction
)Qt_DragAlignedWindow
, 1,
7892 "(WindowPtr wp, Point startPt, Rect boundsRect) -> None"},
7893 {"MoviesTask", (PyCFunction
)Qt_MoviesTask
, 1,
7894 "(long maxMilliSecToUse) -> None"},
7895 {"available", (PyCFunction
)Qt_available
, 1,
7896 "Return true if Quicktime is available"},
7911 m
= Py_InitModule("Qt", Qt_methods
);
7912 d
= PyModule_GetDict(m
);
7913 Qt_Error
= PyMac_GetOSErrException();
7914 if (Qt_Error
== NULL
||
7915 PyDict_SetItemString(d
, "Error", Qt_Error
) != 0)
7916 Py_FatalError("can't initialize Qt.Error");
7917 MovieController_Type
.ob_type
= &PyType_Type
;
7918 Py_INCREF(&MovieController_Type
);
7919 if (PyDict_SetItemString(d
, "MovieControllerType", (PyObject
*)&MovieController_Type
) != 0)
7920 Py_FatalError("can't initialize MovieControllerType");
7921 TimeBase_Type
.ob_type
= &PyType_Type
;
7922 Py_INCREF(&TimeBase_Type
);
7923 if (PyDict_SetItemString(d
, "TimeBaseType", (PyObject
*)&TimeBase_Type
) != 0)
7924 Py_FatalError("can't initialize TimeBaseType");
7925 UserData_Type
.ob_type
= &PyType_Type
;
7926 Py_INCREF(&UserData_Type
);
7927 if (PyDict_SetItemString(d
, "UserDataType", (PyObject
*)&UserData_Type
) != 0)
7928 Py_FatalError("can't initialize UserDataType");
7929 Media_Type
.ob_type
= &PyType_Type
;
7930 Py_INCREF(&Media_Type
);
7931 if (PyDict_SetItemString(d
, "MediaType", (PyObject
*)&Media_Type
) != 0)
7932 Py_FatalError("can't initialize MediaType");
7933 Track_Type
.ob_type
= &PyType_Type
;
7934 Py_INCREF(&Track_Type
);
7935 if (PyDict_SetItemString(d
, "TrackType", (PyObject
*)&Track_Type
) != 0)
7936 Py_FatalError("can't initialize TrackType");
7937 Movie_Type
.ob_type
= &PyType_Type
;
7938 Py_INCREF(&Movie_Type
);
7939 if (PyDict_SetItemString(d
, "MovieType", (PyObject
*)&Movie_Type
) != 0)
7940 Py_FatalError("can't initialize MovieType");
7943 /* ========================= End module Qt ========================== */