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 PyTypeObject MovieController_Type
= {
1025 PyObject_HEAD_INIT(&PyType_Type
)
1027 "MovieController", /*tp_name*/
1028 sizeof(MovieControllerObject
), /*tp_basicsize*/
1031 (destructor
) MovieCtlObj_dealloc
, /*tp_dealloc*/
1033 (getattrfunc
) MovieCtlObj_getattr
, /*tp_getattr*/
1034 (setattrfunc
) MovieCtlObj_setattr
, /*tp_setattr*/
1037 /* ---------------- End object type MovieController ----------------- */
1040 /* ---------------------- Object type TimeBase ---------------------- */
1042 PyTypeObject TimeBase_Type
;
1044 #define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type)
1046 typedef struct TimeBaseObject
{
1051 PyObject
*TimeBaseObj_New(itself
)
1055 if (itself
== NULL
) {
1056 PyErr_SetString(Qt_Error
,"Cannot create null TimeBase");
1059 it
= PyObject_NEW(TimeBaseObject
, &TimeBase_Type
);
1060 if (it
== NULL
) return NULL
;
1061 it
->ob_itself
= itself
;
1062 return (PyObject
*)it
;
1064 TimeBaseObj_Convert(v
, p_itself
)
1068 if (!TimeBaseObj_Check(v
))
1070 PyErr_SetString(PyExc_TypeError
, "TimeBase required");
1073 *p_itself
= ((TimeBaseObject
*)v
)->ob_itself
;
1077 static void TimeBaseObj_dealloc(self
)
1078 TimeBaseObject
*self
;
1080 /* Cleanup of self->ob_itself goes here */
1084 static PyObject
*TimeBaseObj_DisposeTimeBase(_self
, _args
)
1085 TimeBaseObject
*_self
;
1088 PyObject
*_res
= NULL
;
1089 if (!PyArg_ParseTuple(_args
, ""))
1091 DisposeTimeBase(_self
->ob_itself
);
1097 static PyObject
*TimeBaseObj_GetTimeBaseTime(_self
, _args
)
1098 TimeBaseObject
*_self
;
1101 PyObject
*_res
= NULL
;
1105 if (!PyArg_ParseTuple(_args
, "l",
1108 _rv
= GetTimeBaseTime(_self
->ob_itself
,
1111 _res
= Py_BuildValue("lO&",
1113 QtTimeRecord_New
, &tr
);
1117 static PyObject
*TimeBaseObj_SetTimeBaseTime(_self
, _args
)
1118 TimeBaseObject
*_self
;
1121 PyObject
*_res
= NULL
;
1123 if (!PyArg_ParseTuple(_args
, "O&",
1124 QtTimeRecord_Convert
, &tr
))
1126 SetTimeBaseTime(_self
->ob_itself
,
1133 static PyObject
*TimeBaseObj_SetTimeBaseValue(_self
, _args
)
1134 TimeBaseObject
*_self
;
1137 PyObject
*_res
= NULL
;
1140 if (!PyArg_ParseTuple(_args
, "ll",
1144 SetTimeBaseValue(_self
->ob_itself
,
1152 static PyObject
*TimeBaseObj_GetTimeBaseRate(_self
, _args
)
1153 TimeBaseObject
*_self
;
1156 PyObject
*_res
= NULL
;
1158 if (!PyArg_ParseTuple(_args
, ""))
1160 _rv
= GetTimeBaseRate(_self
->ob_itself
);
1161 _res
= Py_BuildValue("O&",
1162 PyMac_BuildFixed
, _rv
);
1166 static PyObject
*TimeBaseObj_SetTimeBaseRate(_self
, _args
)
1167 TimeBaseObject
*_self
;
1170 PyObject
*_res
= NULL
;
1172 if (!PyArg_ParseTuple(_args
, "O&",
1173 PyMac_GetFixed
, &r
))
1175 SetTimeBaseRate(_self
->ob_itself
,
1182 static PyObject
*TimeBaseObj_GetTimeBaseStartTime(_self
, _args
)
1183 TimeBaseObject
*_self
;
1186 PyObject
*_res
= NULL
;
1190 if (!PyArg_ParseTuple(_args
, "l",
1193 _rv
= GetTimeBaseStartTime(_self
->ob_itself
,
1196 _res
= Py_BuildValue("lO&",
1198 QtTimeRecord_New
, &tr
);
1202 static PyObject
*TimeBaseObj_SetTimeBaseStartTime(_self
, _args
)
1203 TimeBaseObject
*_self
;
1206 PyObject
*_res
= NULL
;
1208 if (!PyArg_ParseTuple(_args
, "O&",
1209 QtTimeRecord_Convert
, &tr
))
1211 SetTimeBaseStartTime(_self
->ob_itself
,
1218 static PyObject
*TimeBaseObj_GetTimeBaseStopTime(_self
, _args
)
1219 TimeBaseObject
*_self
;
1222 PyObject
*_res
= NULL
;
1226 if (!PyArg_ParseTuple(_args
, "l",
1229 _rv
= GetTimeBaseStopTime(_self
->ob_itself
,
1232 _res
= Py_BuildValue("lO&",
1234 QtTimeRecord_New
, &tr
);
1238 static PyObject
*TimeBaseObj_SetTimeBaseStopTime(_self
, _args
)
1239 TimeBaseObject
*_self
;
1242 PyObject
*_res
= NULL
;
1244 if (!PyArg_ParseTuple(_args
, "O&",
1245 QtTimeRecord_Convert
, &tr
))
1247 SetTimeBaseStopTime(_self
->ob_itself
,
1254 static PyObject
*TimeBaseObj_GetTimeBaseFlags(_self
, _args
)
1255 TimeBaseObject
*_self
;
1258 PyObject
*_res
= NULL
;
1260 if (!PyArg_ParseTuple(_args
, ""))
1262 _rv
= GetTimeBaseFlags(_self
->ob_itself
);
1263 _res
= Py_BuildValue("l",
1268 static PyObject
*TimeBaseObj_SetTimeBaseFlags(_self
, _args
)
1269 TimeBaseObject
*_self
;
1272 PyObject
*_res
= NULL
;
1274 if (!PyArg_ParseTuple(_args
, "l",
1277 SetTimeBaseFlags(_self
->ob_itself
,
1284 static PyObject
*TimeBaseObj_SetTimeBaseMasterTimeBase(_self
, _args
)
1285 TimeBaseObject
*_self
;
1288 PyObject
*_res
= NULL
;
1290 TimeRecord slaveZero
;
1291 if (!PyArg_ParseTuple(_args
, "O&O&",
1292 TimeBaseObj_Convert
, &master
,
1293 QtTimeRecord_Convert
, &slaveZero
))
1295 SetTimeBaseMasterTimeBase(_self
->ob_itself
,
1303 static PyObject
*TimeBaseObj_GetTimeBaseMasterTimeBase(_self
, _args
)
1304 TimeBaseObject
*_self
;
1307 PyObject
*_res
= NULL
;
1309 if (!PyArg_ParseTuple(_args
, ""))
1311 _rv
= GetTimeBaseMasterTimeBase(_self
->ob_itself
);
1312 _res
= Py_BuildValue("O&",
1313 TimeBaseObj_New
, _rv
);
1317 static PyObject
*TimeBaseObj_SetTimeBaseMasterClock(_self
, _args
)
1318 TimeBaseObject
*_self
;
1321 PyObject
*_res
= NULL
;
1322 Component clockMeister
;
1323 TimeRecord slaveZero
;
1324 if (!PyArg_ParseTuple(_args
, "O&O&",
1325 CmpObj_Convert
, &clockMeister
,
1326 QtTimeRecord_Convert
, &slaveZero
))
1328 SetTimeBaseMasterClock(_self
->ob_itself
,
1336 static PyObject
*TimeBaseObj_GetTimeBaseMasterClock(_self
, _args
)
1337 TimeBaseObject
*_self
;
1340 PyObject
*_res
= NULL
;
1341 ComponentInstance _rv
;
1342 if (!PyArg_ParseTuple(_args
, ""))
1344 _rv
= GetTimeBaseMasterClock(_self
->ob_itself
);
1345 _res
= Py_BuildValue("O&",
1346 CmpInstObj_New
, _rv
);
1350 static PyObject
*TimeBaseObj_GetTimeBaseStatus(_self
, _args
)
1351 TimeBaseObject
*_self
;
1354 PyObject
*_res
= NULL
;
1356 TimeRecord unpinnedTime
;
1357 if (!PyArg_ParseTuple(_args
, ""))
1359 _rv
= GetTimeBaseStatus(_self
->ob_itself
,
1361 _res
= Py_BuildValue("lO&",
1363 QtTimeRecord_New
, &unpinnedTime
);
1367 static PyObject
*TimeBaseObj_SetTimeBaseZero(_self
, _args
)
1368 TimeBaseObject
*_self
;
1371 PyObject
*_res
= NULL
;
1373 if (!PyArg_ParseTuple(_args
, ""))
1375 SetTimeBaseZero(_self
->ob_itself
,
1377 _res
= Py_BuildValue("O&",
1378 QtTimeRecord_New
, &zero
);
1382 static PyObject
*TimeBaseObj_GetTimeBaseEffectiveRate(_self
, _args
)
1383 TimeBaseObject
*_self
;
1386 PyObject
*_res
= NULL
;
1388 if (!PyArg_ParseTuple(_args
, ""))
1390 _rv
= GetTimeBaseEffectiveRate(_self
->ob_itself
);
1391 _res
= Py_BuildValue("O&",
1392 PyMac_BuildFixed
, _rv
);
1396 static PyMethodDef TimeBaseObj_methods
[] = {
1397 {"DisposeTimeBase", (PyCFunction
)TimeBaseObj_DisposeTimeBase
, 1,
1399 {"GetTimeBaseTime", (PyCFunction
)TimeBaseObj_GetTimeBaseTime
, 1,
1400 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1401 {"SetTimeBaseTime", (PyCFunction
)TimeBaseObj_SetTimeBaseTime
, 1,
1402 "(TimeRecord tr) -> None"},
1403 {"SetTimeBaseValue", (PyCFunction
)TimeBaseObj_SetTimeBaseValue
, 1,
1404 "(TimeValue t, TimeScale s) -> None"},
1405 {"GetTimeBaseRate", (PyCFunction
)TimeBaseObj_GetTimeBaseRate
, 1,
1406 "() -> (Fixed _rv)"},
1407 {"SetTimeBaseRate", (PyCFunction
)TimeBaseObj_SetTimeBaseRate
, 1,
1408 "(Fixed r) -> None"},
1409 {"GetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStartTime
, 1,
1410 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1411 {"SetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStartTime
, 1,
1412 "(TimeRecord tr) -> None"},
1413 {"GetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStopTime
, 1,
1414 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1415 {"SetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStopTime
, 1,
1416 "(TimeRecord tr) -> None"},
1417 {"GetTimeBaseFlags", (PyCFunction
)TimeBaseObj_GetTimeBaseFlags
, 1,
1418 "() -> (long _rv)"},
1419 {"SetTimeBaseFlags", (PyCFunction
)TimeBaseObj_SetTimeBaseFlags
, 1,
1420 "(long timeBaseFlags) -> None"},
1421 {"SetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterTimeBase
, 1,
1422 "(TimeBase master, TimeRecord slaveZero) -> None"},
1423 {"GetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterTimeBase
, 1,
1424 "() -> (TimeBase _rv)"},
1425 {"SetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterClock
, 1,
1426 "(Component clockMeister, TimeRecord slaveZero) -> None"},
1427 {"GetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterClock
, 1,
1428 "() -> (ComponentInstance _rv)"},
1429 {"GetTimeBaseStatus", (PyCFunction
)TimeBaseObj_GetTimeBaseStatus
, 1,
1430 "() -> (long _rv, TimeRecord unpinnedTime)"},
1431 {"SetTimeBaseZero", (PyCFunction
)TimeBaseObj_SetTimeBaseZero
, 1,
1432 "() -> (TimeRecord zero)"},
1433 {"GetTimeBaseEffectiveRate", (PyCFunction
)TimeBaseObj_GetTimeBaseEffectiveRate
, 1,
1434 "() -> (Fixed _rv)"},
1438 PyMethodChain TimeBaseObj_chain
= { TimeBaseObj_methods
, NULL
};
1440 static PyObject
*TimeBaseObj_getattr(self
, name
)
1441 TimeBaseObject
*self
;
1444 return Py_FindMethodInChain(&TimeBaseObj_chain
, (PyObject
*)self
, name
);
1447 #define TimeBaseObj_setattr NULL
1449 PyTypeObject TimeBase_Type
= {
1450 PyObject_HEAD_INIT(&PyType_Type
)
1452 "TimeBase", /*tp_name*/
1453 sizeof(TimeBaseObject
), /*tp_basicsize*/
1456 (destructor
) TimeBaseObj_dealloc
, /*tp_dealloc*/
1458 (getattrfunc
) TimeBaseObj_getattr
, /*tp_getattr*/
1459 (setattrfunc
) TimeBaseObj_setattr
, /*tp_setattr*/
1462 /* -------------------- End object type TimeBase -------------------- */
1465 /* ---------------------- Object type UserData ---------------------- */
1467 PyTypeObject UserData_Type
;
1469 #define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type)
1471 typedef struct UserDataObject
{
1476 PyObject
*UserDataObj_New(itself
)
1480 if (itself
== NULL
) {
1481 PyErr_SetString(Qt_Error
,"Cannot create null UserData");
1484 it
= PyObject_NEW(UserDataObject
, &UserData_Type
);
1485 if (it
== NULL
) return NULL
;
1486 it
->ob_itself
= itself
;
1487 return (PyObject
*)it
;
1489 UserDataObj_Convert(v
, p_itself
)
1493 if (!UserDataObj_Check(v
))
1495 PyErr_SetString(PyExc_TypeError
, "UserData required");
1498 *p_itself
= ((UserDataObject
*)v
)->ob_itself
;
1502 static void UserDataObj_dealloc(self
)
1503 UserDataObject
*self
;
1505 DisposeUserData(self
->ob_itself
);
1509 static PyObject
*UserDataObj_GetUserData(_self
, _args
)
1510 UserDataObject
*_self
;
1513 PyObject
*_res
= NULL
;
1518 if (!PyArg_ParseTuple(_args
, "O&O&l",
1519 ResObj_Convert
, &data
,
1520 PyMac_GetOSType
, &udType
,
1523 _err
= GetUserData(_self
->ob_itself
,
1527 if (_err
!= noErr
) return PyMac_Error(_err
);
1533 static PyObject
*UserDataObj_AddUserData(_self
, _args
)
1534 UserDataObject
*_self
;
1537 PyObject
*_res
= NULL
;
1541 if (!PyArg_ParseTuple(_args
, "O&O&",
1542 ResObj_Convert
, &data
,
1543 PyMac_GetOSType
, &udType
))
1545 _err
= AddUserData(_self
->ob_itself
,
1548 if (_err
!= noErr
) return PyMac_Error(_err
);
1554 static PyObject
*UserDataObj_RemoveUserData(_self
, _args
)
1555 UserDataObject
*_self
;
1558 PyObject
*_res
= NULL
;
1562 if (!PyArg_ParseTuple(_args
, "O&l",
1563 PyMac_GetOSType
, &udType
,
1566 _err
= RemoveUserData(_self
->ob_itself
,
1569 if (_err
!= noErr
) return PyMac_Error(_err
);
1575 static PyObject
*UserDataObj_CountUserDataType(_self
, _args
)
1576 UserDataObject
*_self
;
1579 PyObject
*_res
= NULL
;
1582 if (!PyArg_ParseTuple(_args
, "O&",
1583 PyMac_GetOSType
, &udType
))
1585 _rv
= CountUserDataType(_self
->ob_itself
,
1587 _res
= Py_BuildValue("h",
1592 static PyObject
*UserDataObj_GetNextUserDataType(_self
, _args
)
1593 UserDataObject
*_self
;
1596 PyObject
*_res
= NULL
;
1599 if (!PyArg_ParseTuple(_args
, "O&",
1600 PyMac_GetOSType
, &udType
))
1602 _rv
= GetNextUserDataType(_self
->ob_itself
,
1604 _res
= Py_BuildValue("l",
1609 static PyObject
*UserDataObj_AddUserDataText(_self
, _args
)
1610 UserDataObject
*_self
;
1613 PyObject
*_res
= NULL
;
1619 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1620 ResObj_Convert
, &data
,
1621 PyMac_GetOSType
, &udType
,
1625 _err
= AddUserDataText(_self
->ob_itself
,
1630 if (_err
!= noErr
) return PyMac_Error(_err
);
1636 static PyObject
*UserDataObj_GetUserDataText(_self
, _args
)
1637 UserDataObject
*_self
;
1640 PyObject
*_res
= NULL
;
1646 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1647 ResObj_Convert
, &data
,
1648 PyMac_GetOSType
, &udType
,
1652 _err
= GetUserDataText(_self
->ob_itself
,
1657 if (_err
!= noErr
) return PyMac_Error(_err
);
1663 static PyObject
*UserDataObj_RemoveUserDataText(_self
, _args
)
1664 UserDataObject
*_self
;
1667 PyObject
*_res
= NULL
;
1672 if (!PyArg_ParseTuple(_args
, "O&lh",
1673 PyMac_GetOSType
, &udType
,
1677 _err
= RemoveUserDataText(_self
->ob_itself
,
1681 if (_err
!= noErr
) return PyMac_Error(_err
);
1687 static PyObject
*UserDataObj_PutUserDataIntoHandle(_self
, _args
)
1688 UserDataObject
*_self
;
1691 PyObject
*_res
= NULL
;
1694 if (!PyArg_ParseTuple(_args
, "O&",
1695 ResObj_Convert
, &h
))
1697 _err
= PutUserDataIntoHandle(_self
->ob_itself
,
1699 if (_err
!= noErr
) return PyMac_Error(_err
);
1705 static PyMethodDef UserDataObj_methods
[] = {
1706 {"GetUserData", (PyCFunction
)UserDataObj_GetUserData
, 1,
1707 "(Handle data, OSType udType, long index) -> None"},
1708 {"AddUserData", (PyCFunction
)UserDataObj_AddUserData
, 1,
1709 "(Handle data, OSType udType) -> None"},
1710 {"RemoveUserData", (PyCFunction
)UserDataObj_RemoveUserData
, 1,
1711 "(OSType udType, long index) -> None"},
1712 {"CountUserDataType", (PyCFunction
)UserDataObj_CountUserDataType
, 1,
1713 "(OSType udType) -> (short _rv)"},
1714 {"GetNextUserDataType", (PyCFunction
)UserDataObj_GetNextUserDataType
, 1,
1715 "(OSType udType) -> (long _rv)"},
1716 {"AddUserDataText", (PyCFunction
)UserDataObj_AddUserDataText
, 1,
1717 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1718 {"GetUserDataText", (PyCFunction
)UserDataObj_GetUserDataText
, 1,
1719 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1720 {"RemoveUserDataText", (PyCFunction
)UserDataObj_RemoveUserDataText
, 1,
1721 "(OSType udType, long index, short itlRegionTag) -> None"},
1722 {"PutUserDataIntoHandle", (PyCFunction
)UserDataObj_PutUserDataIntoHandle
, 1,
1723 "(Handle h) -> None"},
1727 PyMethodChain UserDataObj_chain
= { UserDataObj_methods
, NULL
};
1729 static PyObject
*UserDataObj_getattr(self
, name
)
1730 UserDataObject
*self
;
1733 return Py_FindMethodInChain(&UserDataObj_chain
, (PyObject
*)self
, name
);
1736 #define UserDataObj_setattr NULL
1738 PyTypeObject UserData_Type
= {
1739 PyObject_HEAD_INIT(&PyType_Type
)
1741 "UserData", /*tp_name*/
1742 sizeof(UserDataObject
), /*tp_basicsize*/
1745 (destructor
) UserDataObj_dealloc
, /*tp_dealloc*/
1747 (getattrfunc
) UserDataObj_getattr
, /*tp_getattr*/
1748 (setattrfunc
) UserDataObj_setattr
, /*tp_setattr*/
1751 /* -------------------- End object type UserData -------------------- */
1754 /* ----------------------- Object type Media ------------------------ */
1756 PyTypeObject Media_Type
;
1758 #define MediaObj_Check(x) ((x)->ob_type == &Media_Type)
1760 typedef struct MediaObject
{
1765 PyObject
*MediaObj_New(itself
)
1769 if (itself
== NULL
) {
1770 PyErr_SetString(Qt_Error
,"Cannot create null Media");
1773 it
= PyObject_NEW(MediaObject
, &Media_Type
);
1774 if (it
== NULL
) return NULL
;
1775 it
->ob_itself
= itself
;
1776 return (PyObject
*)it
;
1778 MediaObj_Convert(v
, p_itself
)
1782 if (!MediaObj_Check(v
))
1784 PyErr_SetString(PyExc_TypeError
, "Media required");
1787 *p_itself
= ((MediaObject
*)v
)->ob_itself
;
1791 static void MediaObj_dealloc(self
)
1794 DisposeTrackMedia(self
->ob_itself
);
1798 static PyObject
*MediaObj_LoadMediaIntoRam(_self
, _args
)
1802 PyObject
*_res
= NULL
;
1807 if (!PyArg_ParseTuple(_args
, "lll",
1812 _err
= LoadMediaIntoRam(_self
->ob_itself
,
1816 if (_err
!= noErr
) return PyMac_Error(_err
);
1822 static PyObject
*MediaObj_GetMediaTrack(_self
, _args
)
1826 PyObject
*_res
= NULL
;
1828 if (!PyArg_ParseTuple(_args
, ""))
1830 _rv
= GetMediaTrack(_self
->ob_itself
);
1831 _res
= Py_BuildValue("O&",
1836 static PyObject
*MediaObj_GetMediaCreationTime(_self
, _args
)
1840 PyObject
*_res
= NULL
;
1842 if (!PyArg_ParseTuple(_args
, ""))
1844 _rv
= GetMediaCreationTime(_self
->ob_itself
);
1845 _res
= Py_BuildValue("l",
1850 static PyObject
*MediaObj_GetMediaModificationTime(_self
, _args
)
1854 PyObject
*_res
= NULL
;
1856 if (!PyArg_ParseTuple(_args
, ""))
1858 _rv
= GetMediaModificationTime(_self
->ob_itself
);
1859 _res
= Py_BuildValue("l",
1864 static PyObject
*MediaObj_GetMediaTimeScale(_self
, _args
)
1868 PyObject
*_res
= NULL
;
1870 if (!PyArg_ParseTuple(_args
, ""))
1872 _rv
= GetMediaTimeScale(_self
->ob_itself
);
1873 _res
= Py_BuildValue("l",
1878 static PyObject
*MediaObj_SetMediaTimeScale(_self
, _args
)
1882 PyObject
*_res
= NULL
;
1883 TimeScale timeScale
;
1884 if (!PyArg_ParseTuple(_args
, "l",
1887 SetMediaTimeScale(_self
->ob_itself
,
1894 static PyObject
*MediaObj_GetMediaDuration(_self
, _args
)
1898 PyObject
*_res
= NULL
;
1900 if (!PyArg_ParseTuple(_args
, ""))
1902 _rv
= GetMediaDuration(_self
->ob_itself
);
1903 _res
= Py_BuildValue("l",
1908 static PyObject
*MediaObj_GetMediaLanguage(_self
, _args
)
1912 PyObject
*_res
= NULL
;
1914 if (!PyArg_ParseTuple(_args
, ""))
1916 _rv
= GetMediaLanguage(_self
->ob_itself
);
1917 _res
= Py_BuildValue("h",
1922 static PyObject
*MediaObj_SetMediaLanguage(_self
, _args
)
1926 PyObject
*_res
= NULL
;
1928 if (!PyArg_ParseTuple(_args
, "h",
1931 SetMediaLanguage(_self
->ob_itself
,
1938 static PyObject
*MediaObj_GetMediaQuality(_self
, _args
)
1942 PyObject
*_res
= NULL
;
1944 if (!PyArg_ParseTuple(_args
, ""))
1946 _rv
= GetMediaQuality(_self
->ob_itself
);
1947 _res
= Py_BuildValue("h",
1952 static PyObject
*MediaObj_SetMediaQuality(_self
, _args
)
1956 PyObject
*_res
= NULL
;
1958 if (!PyArg_ParseTuple(_args
, "h",
1961 SetMediaQuality(_self
->ob_itself
,
1968 static PyObject
*MediaObj_GetMediaHandlerDescription(_self
, _args
)
1972 PyObject
*_res
= NULL
;
1975 OSType creatorManufacturer
;
1976 if (!PyArg_ParseTuple(_args
, "O&",
1977 PyMac_GetStr255
, creatorName
))
1979 GetMediaHandlerDescription(_self
->ob_itself
,
1982 &creatorManufacturer
);
1983 _res
= Py_BuildValue("O&O&",
1984 PyMac_BuildOSType
, mediaType
,
1985 PyMac_BuildOSType
, creatorManufacturer
);
1989 static PyObject
*MediaObj_GetMediaUserData(_self
, _args
)
1993 PyObject
*_res
= NULL
;
1995 if (!PyArg_ParseTuple(_args
, ""))
1997 _rv
= GetMediaUserData(_self
->ob_itself
);
1998 _res
= Py_BuildValue("O&",
1999 UserDataObj_New
, _rv
);
2003 static PyObject
*MediaObj_GetMediaHandler(_self
, _args
)
2007 PyObject
*_res
= NULL
;
2009 if (!PyArg_ParseTuple(_args
, ""))
2011 _rv
= GetMediaHandler(_self
->ob_itself
);
2012 _res
= Py_BuildValue("O&",
2013 CmpInstObj_New
, _rv
);
2017 static PyObject
*MediaObj_SetMediaHandler(_self
, _args
)
2021 PyObject
*_res
= NULL
;
2023 MediaHandlerComponent mH
;
2024 if (!PyArg_ParseTuple(_args
, "O&",
2025 CmpObj_Convert
, &mH
))
2027 _err
= SetMediaHandler(_self
->ob_itself
,
2029 if (_err
!= noErr
) return PyMac_Error(_err
);
2035 static PyObject
*MediaObj_BeginMediaEdits(_self
, _args
)
2039 PyObject
*_res
= NULL
;
2041 if (!PyArg_ParseTuple(_args
, ""))
2043 _err
= BeginMediaEdits(_self
->ob_itself
);
2044 if (_err
!= noErr
) return PyMac_Error(_err
);
2050 static PyObject
*MediaObj_EndMediaEdits(_self
, _args
)
2054 PyObject
*_res
= NULL
;
2056 if (!PyArg_ParseTuple(_args
, ""))
2058 _err
= EndMediaEdits(_self
->ob_itself
);
2059 if (_err
!= noErr
) return PyMac_Error(_err
);
2065 static PyObject
*MediaObj_SetMediaDefaultDataRefIndex(_self
, _args
)
2069 PyObject
*_res
= NULL
;
2072 if (!PyArg_ParseTuple(_args
, "h",
2075 _err
= SetMediaDefaultDataRefIndex(_self
->ob_itself
,
2077 if (_err
!= noErr
) return PyMac_Error(_err
);
2083 static PyObject
*MediaObj_GetMediaDataHandlerDescription(_self
, _args
)
2087 PyObject
*_res
= NULL
;
2091 OSType creatorManufacturer
;
2092 if (!PyArg_ParseTuple(_args
, "hO&",
2094 PyMac_GetStr255
, creatorName
))
2096 GetMediaDataHandlerDescription(_self
->ob_itself
,
2100 &creatorManufacturer
);
2101 _res
= Py_BuildValue("O&O&",
2102 PyMac_BuildOSType
, dhType
,
2103 PyMac_BuildOSType
, creatorManufacturer
);
2107 static PyObject
*MediaObj_GetMediaDataHandler(_self
, _args
)
2111 PyObject
*_res
= NULL
;
2114 if (!PyArg_ParseTuple(_args
, "h",
2117 _rv
= GetMediaDataHandler(_self
->ob_itself
,
2119 _res
= Py_BuildValue("O&",
2120 CmpInstObj_New
, _rv
);
2124 static PyObject
*MediaObj_SetMediaDataHandler(_self
, _args
)
2128 PyObject
*_res
= NULL
;
2131 DataHandlerComponent dataHandler
;
2132 if (!PyArg_ParseTuple(_args
, "hO&",
2134 CmpObj_Convert
, &dataHandler
))
2136 _err
= SetMediaDataHandler(_self
->ob_itself
,
2139 if (_err
!= noErr
) return PyMac_Error(_err
);
2145 static PyObject
*MediaObj_GetMediaSampleDescriptionCount(_self
, _args
)
2149 PyObject
*_res
= NULL
;
2151 if (!PyArg_ParseTuple(_args
, ""))
2153 _rv
= GetMediaSampleDescriptionCount(_self
->ob_itself
);
2154 _res
= Py_BuildValue("l",
2159 static PyObject
*MediaObj_GetMediaSampleDescription(_self
, _args
)
2163 PyObject
*_res
= NULL
;
2165 SampleDescriptionHandle descH
;
2166 if (!PyArg_ParseTuple(_args
, "lO&",
2168 ResObj_Convert
, &descH
))
2170 GetMediaSampleDescription(_self
->ob_itself
,
2178 static PyObject
*MediaObj_SetMediaSampleDescription(_self
, _args
)
2182 PyObject
*_res
= NULL
;
2185 SampleDescriptionHandle descH
;
2186 if (!PyArg_ParseTuple(_args
, "lO&",
2188 ResObj_Convert
, &descH
))
2190 _err
= SetMediaSampleDescription(_self
->ob_itself
,
2193 if (_err
!= noErr
) return PyMac_Error(_err
);
2199 static PyObject
*MediaObj_GetMediaSampleCount(_self
, _args
)
2203 PyObject
*_res
= NULL
;
2205 if (!PyArg_ParseTuple(_args
, ""))
2207 _rv
= GetMediaSampleCount(_self
->ob_itself
);
2208 _res
= Py_BuildValue("l",
2213 static PyObject
*MediaObj_GetMediaSyncSampleCount(_self
, _args
)
2217 PyObject
*_res
= NULL
;
2219 if (!PyArg_ParseTuple(_args
, ""))
2221 _rv
= GetMediaSyncSampleCount(_self
->ob_itself
);
2222 _res
= Py_BuildValue("l",
2227 static PyObject
*MediaObj_SampleNumToMediaTime(_self
, _args
)
2231 PyObject
*_res
= NULL
;
2232 long logicalSampleNum
;
2233 TimeValue sampleTime
;
2234 TimeValue sampleDuration
;
2235 if (!PyArg_ParseTuple(_args
, "l",
2238 SampleNumToMediaTime(_self
->ob_itself
,
2242 _res
= Py_BuildValue("ll",
2248 static PyObject
*MediaObj_MediaTimeToSampleNum(_self
, _args
)
2252 PyObject
*_res
= NULL
;
2255 TimeValue sampleTime
;
2256 TimeValue sampleDuration
;
2257 if (!PyArg_ParseTuple(_args
, "l",
2260 MediaTimeToSampleNum(_self
->ob_itself
,
2265 _res
= Py_BuildValue("lll",
2272 static PyObject
*MediaObj_AddMediaSample(_self
, _args
)
2276 PyObject
*_res
= NULL
;
2281 TimeValue durationPerSample
;
2282 SampleDescriptionHandle sampleDescriptionH
;
2283 long numberOfSamples
;
2285 TimeValue sampleTime
;
2286 if (!PyArg_ParseTuple(_args
, "O&lllO&lh",
2287 ResObj_Convert
, &dataIn
,
2291 ResObj_Convert
, &sampleDescriptionH
,
2295 _err
= AddMediaSample(_self
->ob_itself
,
2304 if (_err
!= noErr
) return PyMac_Error(_err
);
2305 _res
= Py_BuildValue("l",
2310 static PyObject
*MediaObj_AddMediaSampleReference(_self
, _args
)
2314 PyObject
*_res
= NULL
;
2318 TimeValue durationPerSample
;
2319 SampleDescriptionHandle sampleDescriptionH
;
2320 long numberOfSamples
;
2322 TimeValue sampleTime
;
2323 if (!PyArg_ParseTuple(_args
, "lllO&lh",
2327 ResObj_Convert
, &sampleDescriptionH
,
2331 _err
= AddMediaSampleReference(_self
->ob_itself
,
2339 if (_err
!= noErr
) return PyMac_Error(_err
);
2340 _res
= Py_BuildValue("l",
2345 static PyObject
*MediaObj_GetMediaSample(_self
, _args
)
2349 PyObject
*_res
= NULL
;
2355 TimeValue sampleTime
;
2356 TimeValue durationPerSample
;
2357 SampleDescriptionHandle sampleDescriptionH
;
2358 long sampleDescriptionIndex
;
2359 long maxNumberOfSamples
;
2360 long numberOfSamples
;
2362 if (!PyArg_ParseTuple(_args
, "O&llO&l",
2363 ResObj_Convert
, &dataOut
,
2366 ResObj_Convert
, &sampleDescriptionH
,
2367 &maxNumberOfSamples
))
2369 _err
= GetMediaSample(_self
->ob_itself
,
2377 &sampleDescriptionIndex
,
2381 if (_err
!= noErr
) return PyMac_Error(_err
);
2382 _res
= Py_BuildValue("lllllh",
2386 sampleDescriptionIndex
,
2392 static PyObject
*MediaObj_GetMediaSampleReference(_self
, _args
)
2396 PyObject
*_res
= NULL
;
2401 TimeValue sampleTime
;
2402 TimeValue durationPerSample
;
2403 SampleDescriptionHandle sampleDescriptionH
;
2404 long sampleDescriptionIndex
;
2405 long maxNumberOfSamples
;
2406 long numberOfSamples
;
2408 if (!PyArg_ParseTuple(_args
, "lO&l",
2410 ResObj_Convert
, &sampleDescriptionH
,
2411 &maxNumberOfSamples
))
2413 _err
= GetMediaSampleReference(_self
->ob_itself
,
2420 &sampleDescriptionIndex
,
2424 if (_err
!= noErr
) return PyMac_Error(_err
);
2425 _res
= Py_BuildValue("llllllh",
2430 sampleDescriptionIndex
,
2436 static PyObject
*MediaObj_SetMediaPreferredChunkSize(_self
, _args
)
2440 PyObject
*_res
= NULL
;
2443 if (!PyArg_ParseTuple(_args
, "l",
2446 _err
= SetMediaPreferredChunkSize(_self
->ob_itself
,
2448 if (_err
!= noErr
) return PyMac_Error(_err
);
2454 static PyObject
*MediaObj_GetMediaPreferredChunkSize(_self
, _args
)
2458 PyObject
*_res
= NULL
;
2461 if (!PyArg_ParseTuple(_args
, ""))
2463 _err
= GetMediaPreferredChunkSize(_self
->ob_itself
,
2465 if (_err
!= noErr
) return PyMac_Error(_err
);
2466 _res
= Py_BuildValue("l",
2471 static PyObject
*MediaObj_SetMediaShadowSync(_self
, _args
)
2475 PyObject
*_res
= NULL
;
2477 long frameDiffSampleNum
;
2479 if (!PyArg_ParseTuple(_args
, "ll",
2480 &frameDiffSampleNum
,
2483 _err
= SetMediaShadowSync(_self
->ob_itself
,
2486 if (_err
!= noErr
) return PyMac_Error(_err
);
2492 static PyObject
*MediaObj_GetMediaShadowSync(_self
, _args
)
2496 PyObject
*_res
= NULL
;
2498 long frameDiffSampleNum
;
2500 if (!PyArg_ParseTuple(_args
, "l",
2501 &frameDiffSampleNum
))
2503 _err
= GetMediaShadowSync(_self
->ob_itself
,
2506 if (_err
!= noErr
) return PyMac_Error(_err
);
2507 _res
= Py_BuildValue("l",
2512 static PyObject
*MediaObj_GetMediaDataSize(_self
, _args
)
2516 PyObject
*_res
= NULL
;
2518 TimeValue startTime
;
2520 if (!PyArg_ParseTuple(_args
, "ll",
2524 _rv
= GetMediaDataSize(_self
->ob_itself
,
2527 _res
= Py_BuildValue("l",
2532 static PyObject
*MediaObj_GetMediaNextInterestingTime(_self
, _args
)
2536 PyObject
*_res
= NULL
;
2537 short interestingTimeFlags
;
2540 TimeValue interestingTime
;
2541 TimeValue interestingDuration
;
2542 if (!PyArg_ParseTuple(_args
, "hlO&",
2543 &interestingTimeFlags
,
2545 PyMac_GetFixed
, &rate
))
2547 GetMediaNextInterestingTime(_self
->ob_itself
,
2548 interestingTimeFlags
,
2552 &interestingDuration
);
2553 _res
= Py_BuildValue("ll",
2555 interestingDuration
);
2559 static PyObject
*MediaObj_GetMediaDataRef(_self
, _args
)
2563 PyObject
*_res
= NULL
;
2568 long dataRefAttributes
;
2569 if (!PyArg_ParseTuple(_args
, "h",
2572 _err
= GetMediaDataRef(_self
->ob_itself
,
2576 &dataRefAttributes
);
2577 if (_err
!= noErr
) return PyMac_Error(_err
);
2578 _res
= Py_BuildValue("O&O&l",
2579 ResObj_New
, dataRef
,
2580 PyMac_BuildOSType
, dataRefType
,
2585 static PyObject
*MediaObj_SetMediaDataRef(_self
, _args
)
2589 PyObject
*_res
= NULL
;
2594 if (!PyArg_ParseTuple(_args
, "hO&O&",
2596 ResObj_Convert
, &dataRef
,
2597 PyMac_GetOSType
, &dataRefType
))
2599 _err
= SetMediaDataRef(_self
->ob_itself
,
2603 if (_err
!= noErr
) return PyMac_Error(_err
);
2609 static PyObject
*MediaObj_SetMediaDataRefAttributes(_self
, _args
)
2613 PyObject
*_res
= NULL
;
2616 long dataRefAttributes
;
2617 if (!PyArg_ParseTuple(_args
, "hl",
2619 &dataRefAttributes
))
2621 _err
= SetMediaDataRefAttributes(_self
->ob_itself
,
2624 if (_err
!= noErr
) return PyMac_Error(_err
);
2630 static PyObject
*MediaObj_AddMediaDataRef(_self
, _args
)
2634 PyObject
*_res
= NULL
;
2639 if (!PyArg_ParseTuple(_args
, "O&O&",
2640 ResObj_Convert
, &dataRef
,
2641 PyMac_GetOSType
, &dataRefType
))
2643 _err
= AddMediaDataRef(_self
->ob_itself
,
2647 if (_err
!= noErr
) return PyMac_Error(_err
);
2648 _res
= Py_BuildValue("h",
2653 static PyObject
*MediaObj_GetMediaDataRefCount(_self
, _args
)
2657 PyObject
*_res
= NULL
;
2660 if (!PyArg_ParseTuple(_args
, ""))
2662 _err
= GetMediaDataRefCount(_self
->ob_itself
,
2664 if (_err
!= noErr
) return PyMac_Error(_err
);
2665 _res
= Py_BuildValue("h",
2670 static PyObject
*MediaObj_SetMediaPlayHints(_self
, _args
)
2674 PyObject
*_res
= NULL
;
2677 if (!PyArg_ParseTuple(_args
, "ll",
2681 SetMediaPlayHints(_self
->ob_itself
,
2689 static PyObject
*MediaObj_GetMediaPlayHints(_self
, _args
)
2693 PyObject
*_res
= NULL
;
2695 if (!PyArg_ParseTuple(_args
, ""))
2697 GetMediaPlayHints(_self
->ob_itself
,
2699 _res
= Py_BuildValue("l",
2704 static PyMethodDef MediaObj_methods
[] = {
2705 {"LoadMediaIntoRam", (PyCFunction
)MediaObj_LoadMediaIntoRam
, 1,
2706 "(TimeValue time, TimeValue duration, long flags) -> None"},
2707 {"GetMediaTrack", (PyCFunction
)MediaObj_GetMediaTrack
, 1,
2708 "() -> (Track _rv)"},
2709 {"GetMediaCreationTime", (PyCFunction
)MediaObj_GetMediaCreationTime
, 1,
2710 "() -> (unsigned long _rv)"},
2711 {"GetMediaModificationTime", (PyCFunction
)MediaObj_GetMediaModificationTime
, 1,
2712 "() -> (unsigned long _rv)"},
2713 {"GetMediaTimeScale", (PyCFunction
)MediaObj_GetMediaTimeScale
, 1,
2714 "() -> (TimeScale _rv)"},
2715 {"SetMediaTimeScale", (PyCFunction
)MediaObj_SetMediaTimeScale
, 1,
2716 "(TimeScale timeScale) -> None"},
2717 {"GetMediaDuration", (PyCFunction
)MediaObj_GetMediaDuration
, 1,
2718 "() -> (TimeValue _rv)"},
2719 {"GetMediaLanguage", (PyCFunction
)MediaObj_GetMediaLanguage
, 1,
2720 "() -> (short _rv)"},
2721 {"SetMediaLanguage", (PyCFunction
)MediaObj_SetMediaLanguage
, 1,
2722 "(short language) -> None"},
2723 {"GetMediaQuality", (PyCFunction
)MediaObj_GetMediaQuality
, 1,
2724 "() -> (short _rv)"},
2725 {"SetMediaQuality", (PyCFunction
)MediaObj_SetMediaQuality
, 1,
2726 "(short quality) -> None"},
2727 {"GetMediaHandlerDescription", (PyCFunction
)MediaObj_GetMediaHandlerDescription
, 1,
2728 "(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)"},
2729 {"GetMediaUserData", (PyCFunction
)MediaObj_GetMediaUserData
, 1,
2730 "() -> (UserData _rv)"},
2731 {"GetMediaHandler", (PyCFunction
)MediaObj_GetMediaHandler
, 1,
2732 "() -> (MediaHandler _rv)"},
2733 {"SetMediaHandler", (PyCFunction
)MediaObj_SetMediaHandler
, 1,
2734 "(MediaHandlerComponent mH) -> None"},
2735 {"BeginMediaEdits", (PyCFunction
)MediaObj_BeginMediaEdits
, 1,
2737 {"EndMediaEdits", (PyCFunction
)MediaObj_EndMediaEdits
, 1,
2739 {"SetMediaDefaultDataRefIndex", (PyCFunction
)MediaObj_SetMediaDefaultDataRefIndex
, 1,
2740 "(short index) -> None"},
2741 {"GetMediaDataHandlerDescription", (PyCFunction
)MediaObj_GetMediaDataHandlerDescription
, 1,
2742 "(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)"},
2743 {"GetMediaDataHandler", (PyCFunction
)MediaObj_GetMediaDataHandler
, 1,
2744 "(short index) -> (DataHandler _rv)"},
2745 {"SetMediaDataHandler", (PyCFunction
)MediaObj_SetMediaDataHandler
, 1,
2746 "(short index, DataHandlerComponent dataHandler) -> None"},
2747 {"GetMediaSampleDescriptionCount", (PyCFunction
)MediaObj_GetMediaSampleDescriptionCount
, 1,
2748 "() -> (long _rv)"},
2749 {"GetMediaSampleDescription", (PyCFunction
)MediaObj_GetMediaSampleDescription
, 1,
2750 "(long index, SampleDescriptionHandle descH) -> None"},
2751 {"SetMediaSampleDescription", (PyCFunction
)MediaObj_SetMediaSampleDescription
, 1,
2752 "(long index, SampleDescriptionHandle descH) -> None"},
2753 {"GetMediaSampleCount", (PyCFunction
)MediaObj_GetMediaSampleCount
, 1,
2754 "() -> (long _rv)"},
2755 {"GetMediaSyncSampleCount", (PyCFunction
)MediaObj_GetMediaSyncSampleCount
, 1,
2756 "() -> (long _rv)"},
2757 {"SampleNumToMediaTime", (PyCFunction
)MediaObj_SampleNumToMediaTime
, 1,
2758 "(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)"},
2759 {"MediaTimeToSampleNum", (PyCFunction
)MediaObj_MediaTimeToSampleNum
, 1,
2760 "(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)"},
2761 {"AddMediaSample", (PyCFunction
)MediaObj_AddMediaSample
, 1,
2762 "(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2763 {"AddMediaSampleReference", (PyCFunction
)MediaObj_AddMediaSampleReference
, 1,
2764 "(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2765 {"GetMediaSample", (PyCFunction
)MediaObj_GetMediaSample
, 1,
2766 "(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2767 {"GetMediaSampleReference", (PyCFunction
)MediaObj_GetMediaSampleReference
, 1,
2768 "(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2769 {"SetMediaPreferredChunkSize", (PyCFunction
)MediaObj_SetMediaPreferredChunkSize
, 1,
2770 "(long maxChunkSize) -> None"},
2771 {"GetMediaPreferredChunkSize", (PyCFunction
)MediaObj_GetMediaPreferredChunkSize
, 1,
2772 "() -> (long maxChunkSize)"},
2773 {"SetMediaShadowSync", (PyCFunction
)MediaObj_SetMediaShadowSync
, 1,
2774 "(long frameDiffSampleNum, long syncSampleNum) -> None"},
2775 {"GetMediaShadowSync", (PyCFunction
)MediaObj_GetMediaShadowSync
, 1,
2776 "(long frameDiffSampleNum) -> (long syncSampleNum)"},
2777 {"GetMediaDataSize", (PyCFunction
)MediaObj_GetMediaDataSize
, 1,
2778 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
2779 {"GetMediaNextInterestingTime", (PyCFunction
)MediaObj_GetMediaNextInterestingTime
, 1,
2780 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
2781 {"GetMediaDataRef", (PyCFunction
)MediaObj_GetMediaDataRef
, 1,
2782 "(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)"},
2783 {"SetMediaDataRef", (PyCFunction
)MediaObj_SetMediaDataRef
, 1,
2784 "(short index, Handle dataRef, OSType dataRefType) -> None"},
2785 {"SetMediaDataRefAttributes", (PyCFunction
)MediaObj_SetMediaDataRefAttributes
, 1,
2786 "(short index, long dataRefAttributes) -> None"},
2787 {"AddMediaDataRef", (PyCFunction
)MediaObj_AddMediaDataRef
, 1,
2788 "(Handle dataRef, OSType dataRefType) -> (short index)"},
2789 {"GetMediaDataRefCount", (PyCFunction
)MediaObj_GetMediaDataRefCount
, 1,
2790 "() -> (short count)"},
2791 {"SetMediaPlayHints", (PyCFunction
)MediaObj_SetMediaPlayHints
, 1,
2792 "(long flags, long flagsMask) -> None"},
2793 {"GetMediaPlayHints", (PyCFunction
)MediaObj_GetMediaPlayHints
, 1,
2794 "() -> (long flags)"},
2798 PyMethodChain MediaObj_chain
= { MediaObj_methods
, NULL
};
2800 static PyObject
*MediaObj_getattr(self
, name
)
2804 return Py_FindMethodInChain(&MediaObj_chain
, (PyObject
*)self
, name
);
2807 #define MediaObj_setattr NULL
2809 PyTypeObject Media_Type
= {
2810 PyObject_HEAD_INIT(&PyType_Type
)
2812 "Media", /*tp_name*/
2813 sizeof(MediaObject
), /*tp_basicsize*/
2816 (destructor
) MediaObj_dealloc
, /*tp_dealloc*/
2818 (getattrfunc
) MediaObj_getattr
, /*tp_getattr*/
2819 (setattrfunc
) MediaObj_setattr
, /*tp_setattr*/
2822 /* --------------------- End object type Media ---------------------- */
2825 /* ----------------------- Object type Track ------------------------ */
2827 PyTypeObject Track_Type
;
2829 #define TrackObj_Check(x) ((x)->ob_type == &Track_Type)
2831 typedef struct TrackObject
{
2836 PyObject
*TrackObj_New(itself
)
2840 if (itself
== NULL
) {
2841 PyErr_SetString(Qt_Error
,"Cannot create null Track");
2844 it
= PyObject_NEW(TrackObject
, &Track_Type
);
2845 if (it
== NULL
) return NULL
;
2846 it
->ob_itself
= itself
;
2847 return (PyObject
*)it
;
2849 TrackObj_Convert(v
, p_itself
)
2853 if (!TrackObj_Check(v
))
2855 PyErr_SetString(PyExc_TypeError
, "Track required");
2858 *p_itself
= ((TrackObject
*)v
)->ob_itself
;
2862 static void TrackObj_dealloc(self
)
2865 DisposeMovieTrack(self
->ob_itself
);
2869 static PyObject
*TrackObj_LoadTrackIntoRam(_self
, _args
)
2873 PyObject
*_res
= NULL
;
2878 if (!PyArg_ParseTuple(_args
, "lll",
2883 _err
= LoadTrackIntoRam(_self
->ob_itself
,
2887 if (_err
!= noErr
) return PyMac_Error(_err
);
2893 static PyObject
*TrackObj_GetTrackPict(_self
, _args
)
2897 PyObject
*_res
= NULL
;
2900 if (!PyArg_ParseTuple(_args
, "l",
2903 _rv
= GetTrackPict(_self
->ob_itself
,
2905 _res
= Py_BuildValue("O&",
2910 static PyObject
*TrackObj_GetTrackClipRgn(_self
, _args
)
2914 PyObject
*_res
= NULL
;
2916 if (!PyArg_ParseTuple(_args
, ""))
2918 _rv
= GetTrackClipRgn(_self
->ob_itself
);
2919 _res
= Py_BuildValue("O&",
2924 static PyObject
*TrackObj_SetTrackClipRgn(_self
, _args
)
2928 PyObject
*_res
= NULL
;
2930 if (!PyArg_ParseTuple(_args
, "O&",
2931 ResObj_Convert
, &theClip
))
2933 SetTrackClipRgn(_self
->ob_itself
,
2940 static PyObject
*TrackObj_GetTrackDisplayBoundsRgn(_self
, _args
)
2944 PyObject
*_res
= NULL
;
2946 if (!PyArg_ParseTuple(_args
, ""))
2948 _rv
= GetTrackDisplayBoundsRgn(_self
->ob_itself
);
2949 _res
= Py_BuildValue("O&",
2954 static PyObject
*TrackObj_GetTrackMovieBoundsRgn(_self
, _args
)
2958 PyObject
*_res
= NULL
;
2960 if (!PyArg_ParseTuple(_args
, ""))
2962 _rv
= GetTrackMovieBoundsRgn(_self
->ob_itself
);
2963 _res
= Py_BuildValue("O&",
2968 static PyObject
*TrackObj_GetTrackBoundsRgn(_self
, _args
)
2972 PyObject
*_res
= NULL
;
2974 if (!PyArg_ParseTuple(_args
, ""))
2976 _rv
= GetTrackBoundsRgn(_self
->ob_itself
);
2977 _res
= Py_BuildValue("O&",
2982 static PyObject
*TrackObj_GetTrackMatte(_self
, _args
)
2986 PyObject
*_res
= NULL
;
2988 if (!PyArg_ParseTuple(_args
, ""))
2990 _rv
= GetTrackMatte(_self
->ob_itself
);
2991 _res
= Py_BuildValue("O&",
2996 static PyObject
*TrackObj_SetTrackMatte(_self
, _args
)
3000 PyObject
*_res
= NULL
;
3001 PixMapHandle theMatte
;
3002 if (!PyArg_ParseTuple(_args
, "O&",
3003 ResObj_Convert
, &theMatte
))
3005 SetTrackMatte(_self
->ob_itself
,
3012 static PyObject
*TrackObj_GetTrackID(_self
, _args
)
3016 PyObject
*_res
= NULL
;
3018 if (!PyArg_ParseTuple(_args
, ""))
3020 _rv
= GetTrackID(_self
->ob_itself
);
3021 _res
= Py_BuildValue("l",
3026 static PyObject
*TrackObj_GetTrackMovie(_self
, _args
)
3030 PyObject
*_res
= NULL
;
3032 if (!PyArg_ParseTuple(_args
, ""))
3034 _rv
= GetTrackMovie(_self
->ob_itself
);
3035 _res
= Py_BuildValue("O&",
3040 static PyObject
*TrackObj_GetTrackCreationTime(_self
, _args
)
3044 PyObject
*_res
= NULL
;
3046 if (!PyArg_ParseTuple(_args
, ""))
3048 _rv
= GetTrackCreationTime(_self
->ob_itself
);
3049 _res
= Py_BuildValue("l",
3054 static PyObject
*TrackObj_GetTrackModificationTime(_self
, _args
)
3058 PyObject
*_res
= NULL
;
3060 if (!PyArg_ParseTuple(_args
, ""))
3062 _rv
= GetTrackModificationTime(_self
->ob_itself
);
3063 _res
= Py_BuildValue("l",
3068 static PyObject
*TrackObj_GetTrackEnabled(_self
, _args
)
3072 PyObject
*_res
= NULL
;
3074 if (!PyArg_ParseTuple(_args
, ""))
3076 _rv
= GetTrackEnabled(_self
->ob_itself
);
3077 _res
= Py_BuildValue("b",
3082 static PyObject
*TrackObj_SetTrackEnabled(_self
, _args
)
3086 PyObject
*_res
= NULL
;
3088 if (!PyArg_ParseTuple(_args
, "b",
3091 SetTrackEnabled(_self
->ob_itself
,
3098 static PyObject
*TrackObj_GetTrackUsage(_self
, _args
)
3102 PyObject
*_res
= NULL
;
3104 if (!PyArg_ParseTuple(_args
, ""))
3106 _rv
= GetTrackUsage(_self
->ob_itself
);
3107 _res
= Py_BuildValue("l",
3112 static PyObject
*TrackObj_SetTrackUsage(_self
, _args
)
3116 PyObject
*_res
= NULL
;
3118 if (!PyArg_ParseTuple(_args
, "l",
3121 SetTrackUsage(_self
->ob_itself
,
3128 static PyObject
*TrackObj_GetTrackDuration(_self
, _args
)
3132 PyObject
*_res
= NULL
;
3134 if (!PyArg_ParseTuple(_args
, ""))
3136 _rv
= GetTrackDuration(_self
->ob_itself
);
3137 _res
= Py_BuildValue("l",
3142 static PyObject
*TrackObj_GetTrackOffset(_self
, _args
)
3146 PyObject
*_res
= NULL
;
3148 if (!PyArg_ParseTuple(_args
, ""))
3150 _rv
= GetTrackOffset(_self
->ob_itself
);
3151 _res
= Py_BuildValue("l",
3156 static PyObject
*TrackObj_SetTrackOffset(_self
, _args
)
3160 PyObject
*_res
= NULL
;
3161 TimeValue movieOffsetTime
;
3162 if (!PyArg_ParseTuple(_args
, "l",
3165 SetTrackOffset(_self
->ob_itself
,
3172 static PyObject
*TrackObj_GetTrackLayer(_self
, _args
)
3176 PyObject
*_res
= NULL
;
3178 if (!PyArg_ParseTuple(_args
, ""))
3180 _rv
= GetTrackLayer(_self
->ob_itself
);
3181 _res
= Py_BuildValue("h",
3186 static PyObject
*TrackObj_SetTrackLayer(_self
, _args
)
3190 PyObject
*_res
= NULL
;
3192 if (!PyArg_ParseTuple(_args
, "h",
3195 SetTrackLayer(_self
->ob_itself
,
3202 static PyObject
*TrackObj_GetTrackAlternate(_self
, _args
)
3206 PyObject
*_res
= NULL
;
3208 if (!PyArg_ParseTuple(_args
, ""))
3210 _rv
= GetTrackAlternate(_self
->ob_itself
);
3211 _res
= Py_BuildValue("O&",
3216 static PyObject
*TrackObj_SetTrackAlternate(_self
, _args
)
3220 PyObject
*_res
= NULL
;
3222 if (!PyArg_ParseTuple(_args
, "O&",
3223 TrackObj_Convert
, &alternateT
))
3225 SetTrackAlternate(_self
->ob_itself
,
3232 static PyObject
*TrackObj_GetTrackVolume(_self
, _args
)
3236 PyObject
*_res
= NULL
;
3238 if (!PyArg_ParseTuple(_args
, ""))
3240 _rv
= GetTrackVolume(_self
->ob_itself
);
3241 _res
= Py_BuildValue("h",
3246 static PyObject
*TrackObj_SetTrackVolume(_self
, _args
)
3250 PyObject
*_res
= NULL
;
3252 if (!PyArg_ParseTuple(_args
, "h",
3255 SetTrackVolume(_self
->ob_itself
,
3262 static PyObject
*TrackObj_GetTrackDimensions(_self
, _args
)
3266 PyObject
*_res
= NULL
;
3269 if (!PyArg_ParseTuple(_args
, ""))
3271 GetTrackDimensions(_self
->ob_itself
,
3274 _res
= Py_BuildValue("O&O&",
3275 PyMac_BuildFixed
, width
,
3276 PyMac_BuildFixed
, height
);
3280 static PyObject
*TrackObj_SetTrackDimensions(_self
, _args
)
3284 PyObject
*_res
= NULL
;
3287 if (!PyArg_ParseTuple(_args
, "O&O&",
3288 PyMac_GetFixed
, &width
,
3289 PyMac_GetFixed
, &height
))
3291 SetTrackDimensions(_self
->ob_itself
,
3299 static PyObject
*TrackObj_GetTrackUserData(_self
, _args
)
3303 PyObject
*_res
= NULL
;
3305 if (!PyArg_ParseTuple(_args
, ""))
3307 _rv
= GetTrackUserData(_self
->ob_itself
);
3308 _res
= Py_BuildValue("O&",
3309 UserDataObj_New
, _rv
);
3313 static PyObject
*TrackObj_GetTrackSoundLocalizationSettings(_self
, _args
)
3317 PyObject
*_res
= NULL
;
3320 if (!PyArg_ParseTuple(_args
, ""))
3322 _err
= GetTrackSoundLocalizationSettings(_self
->ob_itself
,
3324 if (_err
!= noErr
) return PyMac_Error(_err
);
3325 _res
= Py_BuildValue("O&",
3326 ResObj_New
, settings
);
3330 static PyObject
*TrackObj_SetTrackSoundLocalizationSettings(_self
, _args
)
3334 PyObject
*_res
= NULL
;
3337 if (!PyArg_ParseTuple(_args
, "O&",
3338 ResObj_Convert
, &settings
))
3340 _err
= SetTrackSoundLocalizationSettings(_self
->ob_itself
,
3342 if (_err
!= noErr
) return PyMac_Error(_err
);
3348 static PyObject
*TrackObj_NewTrackMedia(_self
, _args
)
3352 PyObject
*_res
= NULL
;
3355 TimeScale timeScale
;
3358 if (!PyArg_ParseTuple(_args
, "O&lO&O&",
3359 PyMac_GetOSType
, &mediaType
,
3361 ResObj_Convert
, &dataRef
,
3362 PyMac_GetOSType
, &dataRefType
))
3364 _rv
= NewTrackMedia(_self
->ob_itself
,
3369 _res
= Py_BuildValue("O&",
3374 static PyObject
*TrackObj_GetTrackMedia(_self
, _args
)
3378 PyObject
*_res
= NULL
;
3380 if (!PyArg_ParseTuple(_args
, ""))
3382 _rv
= GetTrackMedia(_self
->ob_itself
);
3383 _res
= Py_BuildValue("O&",
3388 static PyObject
*TrackObj_InsertMediaIntoTrack(_self
, _args
)
3392 PyObject
*_res
= NULL
;
3394 TimeValue trackStart
;
3395 TimeValue mediaTime
;
3396 TimeValue mediaDuration
;
3398 if (!PyArg_ParseTuple(_args
, "lllO&",
3402 PyMac_GetFixed
, &mediaRate
))
3404 _err
= InsertMediaIntoTrack(_self
->ob_itself
,
3409 if (_err
!= noErr
) return PyMac_Error(_err
);
3415 static PyObject
*TrackObj_InsertTrackSegment(_self
, _args
)
3419 PyObject
*_res
= NULL
;
3423 TimeValue srcDuration
;
3425 if (!PyArg_ParseTuple(_args
, "O&lll",
3426 TrackObj_Convert
, &dstTrack
,
3431 _err
= InsertTrackSegment(_self
->ob_itself
,
3436 if (_err
!= noErr
) return PyMac_Error(_err
);
3442 static PyObject
*TrackObj_InsertEmptyTrackSegment(_self
, _args
)
3446 PyObject
*_res
= NULL
;
3449 TimeValue dstDuration
;
3450 if (!PyArg_ParseTuple(_args
, "ll",
3454 _err
= InsertEmptyTrackSegment(_self
->ob_itself
,
3457 if (_err
!= noErr
) return PyMac_Error(_err
);
3463 static PyObject
*TrackObj_DeleteTrackSegment(_self
, _args
)
3467 PyObject
*_res
= NULL
;
3469 TimeValue startTime
;
3471 if (!PyArg_ParseTuple(_args
, "ll",
3475 _err
= DeleteTrackSegment(_self
->ob_itself
,
3478 if (_err
!= noErr
) return PyMac_Error(_err
);
3484 static PyObject
*TrackObj_ScaleTrackSegment(_self
, _args
)
3488 PyObject
*_res
= NULL
;
3490 TimeValue startTime
;
3491 TimeValue oldDuration
;
3492 TimeValue newDuration
;
3493 if (!PyArg_ParseTuple(_args
, "lll",
3498 _err
= ScaleTrackSegment(_self
->ob_itself
,
3502 if (_err
!= noErr
) return PyMac_Error(_err
);
3508 static PyObject
*TrackObj_IsScrapMovie(_self
, _args
)
3512 PyObject
*_res
= NULL
;
3514 if (!PyArg_ParseTuple(_args
, ""))
3516 _rv
= IsScrapMovie(_self
->ob_itself
);
3517 _res
= Py_BuildValue("O&",
3522 static PyObject
*TrackObj_CopyTrackSettings(_self
, _args
)
3526 PyObject
*_res
= NULL
;
3529 if (!PyArg_ParseTuple(_args
, "O&",
3530 TrackObj_Convert
, &dstTrack
))
3532 _err
= CopyTrackSettings(_self
->ob_itself
,
3534 if (_err
!= noErr
) return PyMac_Error(_err
);
3540 static PyObject
*TrackObj_AddEmptyTrackToMovie(_self
, _args
)
3544 PyObject
*_res
= NULL
;
3550 if (!PyArg_ParseTuple(_args
, "O&O&O&",
3551 MovieObj_Convert
, &dstMovie
,
3552 ResObj_Convert
, &dataRef
,
3553 PyMac_GetOSType
, &dataRefType
))
3555 _err
= AddEmptyTrackToMovie(_self
->ob_itself
,
3560 if (_err
!= noErr
) return PyMac_Error(_err
);
3561 _res
= Py_BuildValue("O&",
3562 TrackObj_New
, dstTrack
);
3566 static PyObject
*TrackObj_AddTrackReference(_self
, _args
)
3570 PyObject
*_res
= NULL
;
3575 if (!PyArg_ParseTuple(_args
, "O&O&",
3576 TrackObj_Convert
, &refTrack
,
3577 PyMac_GetOSType
, &refType
))
3579 _err
= AddTrackReference(_self
->ob_itself
,
3583 if (_err
!= noErr
) return PyMac_Error(_err
);
3584 _res
= Py_BuildValue("l",
3589 static PyObject
*TrackObj_DeleteTrackReference(_self
, _args
)
3593 PyObject
*_res
= NULL
;
3597 if (!PyArg_ParseTuple(_args
, "O&l",
3598 PyMac_GetOSType
, &refType
,
3601 _err
= DeleteTrackReference(_self
->ob_itself
,
3604 if (_err
!= noErr
) return PyMac_Error(_err
);
3610 static PyObject
*TrackObj_SetTrackReference(_self
, _args
)
3614 PyObject
*_res
= NULL
;
3619 if (!PyArg_ParseTuple(_args
, "O&O&l",
3620 TrackObj_Convert
, &refTrack
,
3621 PyMac_GetOSType
, &refType
,
3624 _err
= SetTrackReference(_self
->ob_itself
,
3628 if (_err
!= noErr
) return PyMac_Error(_err
);
3634 static PyObject
*TrackObj_GetTrackReference(_self
, _args
)
3638 PyObject
*_res
= NULL
;
3642 if (!PyArg_ParseTuple(_args
, "O&l",
3643 PyMac_GetOSType
, &refType
,
3646 _rv
= GetTrackReference(_self
->ob_itself
,
3649 _res
= Py_BuildValue("O&",
3654 static PyObject
*TrackObj_GetNextTrackReferenceType(_self
, _args
)
3658 PyObject
*_res
= NULL
;
3661 if (!PyArg_ParseTuple(_args
, "O&",
3662 PyMac_GetOSType
, &refType
))
3664 _rv
= GetNextTrackReferenceType(_self
->ob_itself
,
3666 _res
= Py_BuildValue("O&",
3667 PyMac_BuildOSType
, _rv
);
3671 static PyObject
*TrackObj_GetTrackReferenceCount(_self
, _args
)
3675 PyObject
*_res
= NULL
;
3678 if (!PyArg_ParseTuple(_args
, "O&",
3679 PyMac_GetOSType
, &refType
))
3681 _rv
= GetTrackReferenceCount(_self
->ob_itself
,
3683 _res
= Py_BuildValue("l",
3688 static PyObject
*TrackObj_GetTrackEditRate(_self
, _args
)
3692 PyObject
*_res
= NULL
;
3695 if (!PyArg_ParseTuple(_args
, "l",
3698 _rv
= GetTrackEditRate(_self
->ob_itself
,
3700 _res
= Py_BuildValue("O&",
3701 PyMac_BuildFixed
, _rv
);
3705 static PyObject
*TrackObj_GetTrackDataSize(_self
, _args
)
3709 PyObject
*_res
= NULL
;
3711 TimeValue startTime
;
3713 if (!PyArg_ParseTuple(_args
, "ll",
3717 _rv
= GetTrackDataSize(_self
->ob_itself
,
3720 _res
= Py_BuildValue("l",
3725 static PyObject
*TrackObj_PtInTrack(_self
, _args
)
3729 PyObject
*_res
= NULL
;
3732 if (!PyArg_ParseTuple(_args
, "O&",
3733 PyMac_GetPoint
, &pt
))
3735 _rv
= PtInTrack(_self
->ob_itself
,
3737 _res
= Py_BuildValue("b",
3742 static PyObject
*TrackObj_GetTrackNextInterestingTime(_self
, _args
)
3746 PyObject
*_res
= NULL
;
3747 short interestingTimeFlags
;
3750 TimeValue interestingTime
;
3751 TimeValue interestingDuration
;
3752 if (!PyArg_ParseTuple(_args
, "hlO&",
3753 &interestingTimeFlags
,
3755 PyMac_GetFixed
, &rate
))
3757 GetTrackNextInterestingTime(_self
->ob_itself
,
3758 interestingTimeFlags
,
3762 &interestingDuration
);
3763 _res
= Py_BuildValue("ll",
3765 interestingDuration
);
3769 static PyObject
*TrackObj_GetTrackSegmentDisplayBoundsRgn(_self
, _args
)
3773 PyObject
*_res
= NULL
;
3777 if (!PyArg_ParseTuple(_args
, "ll",
3781 _rv
= GetTrackSegmentDisplayBoundsRgn(_self
->ob_itself
,
3784 _res
= Py_BuildValue("O&",
3789 static PyObject
*TrackObj_GetTrackStatus(_self
, _args
)
3793 PyObject
*_res
= NULL
;
3794 ComponentResult _rv
;
3795 if (!PyArg_ParseTuple(_args
, ""))
3797 _rv
= GetTrackStatus(_self
->ob_itself
);
3798 _res
= Py_BuildValue("l",
3803 static PyObject
*TrackObj_SetTrackLoadSettings(_self
, _args
)
3807 PyObject
*_res
= NULL
;
3808 TimeValue preloadTime
;
3809 TimeValue preloadDuration
;
3812 if (!PyArg_ParseTuple(_args
, "llll",
3818 SetTrackLoadSettings(_self
->ob_itself
,
3828 static PyObject
*TrackObj_GetTrackLoadSettings(_self
, _args
)
3832 PyObject
*_res
= NULL
;
3833 TimeValue preloadTime
;
3834 TimeValue preloadDuration
;
3837 if (!PyArg_ParseTuple(_args
, ""))
3839 GetTrackLoadSettings(_self
->ob_itself
,
3844 _res
= Py_BuildValue("llll",
3852 static PyMethodDef TrackObj_methods
[] = {
3853 {"LoadTrackIntoRam", (PyCFunction
)TrackObj_LoadTrackIntoRam
, 1,
3854 "(TimeValue time, TimeValue duration, long flags) -> None"},
3855 {"GetTrackPict", (PyCFunction
)TrackObj_GetTrackPict
, 1,
3856 "(TimeValue time) -> (PicHandle _rv)"},
3857 {"GetTrackClipRgn", (PyCFunction
)TrackObj_GetTrackClipRgn
, 1,
3858 "() -> (RgnHandle _rv)"},
3859 {"SetTrackClipRgn", (PyCFunction
)TrackObj_SetTrackClipRgn
, 1,
3860 "(RgnHandle theClip) -> None"},
3861 {"GetTrackDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackDisplayBoundsRgn
, 1,
3862 "() -> (RgnHandle _rv)"},
3863 {"GetTrackMovieBoundsRgn", (PyCFunction
)TrackObj_GetTrackMovieBoundsRgn
, 1,
3864 "() -> (RgnHandle _rv)"},
3865 {"GetTrackBoundsRgn", (PyCFunction
)TrackObj_GetTrackBoundsRgn
, 1,
3866 "() -> (RgnHandle _rv)"},
3867 {"GetTrackMatte", (PyCFunction
)TrackObj_GetTrackMatte
, 1,
3868 "() -> (PixMapHandle _rv)"},
3869 {"SetTrackMatte", (PyCFunction
)TrackObj_SetTrackMatte
, 1,
3870 "(PixMapHandle theMatte) -> None"},
3871 {"GetTrackID", (PyCFunction
)TrackObj_GetTrackID
, 1,
3872 "() -> (long _rv)"},
3873 {"GetTrackMovie", (PyCFunction
)TrackObj_GetTrackMovie
, 1,
3874 "() -> (Movie _rv)"},
3875 {"GetTrackCreationTime", (PyCFunction
)TrackObj_GetTrackCreationTime
, 1,
3876 "() -> (unsigned long _rv)"},
3877 {"GetTrackModificationTime", (PyCFunction
)TrackObj_GetTrackModificationTime
, 1,
3878 "() -> (unsigned long _rv)"},
3879 {"GetTrackEnabled", (PyCFunction
)TrackObj_GetTrackEnabled
, 1,
3880 "() -> (Boolean _rv)"},
3881 {"SetTrackEnabled", (PyCFunction
)TrackObj_SetTrackEnabled
, 1,
3882 "(Boolean isEnabled) -> None"},
3883 {"GetTrackUsage", (PyCFunction
)TrackObj_GetTrackUsage
, 1,
3884 "() -> (long _rv)"},
3885 {"SetTrackUsage", (PyCFunction
)TrackObj_SetTrackUsage
, 1,
3886 "(long usage) -> None"},
3887 {"GetTrackDuration", (PyCFunction
)TrackObj_GetTrackDuration
, 1,
3888 "() -> (TimeValue _rv)"},
3889 {"GetTrackOffset", (PyCFunction
)TrackObj_GetTrackOffset
, 1,
3890 "() -> (TimeValue _rv)"},
3891 {"SetTrackOffset", (PyCFunction
)TrackObj_SetTrackOffset
, 1,
3892 "(TimeValue movieOffsetTime) -> None"},
3893 {"GetTrackLayer", (PyCFunction
)TrackObj_GetTrackLayer
, 1,
3894 "() -> (short _rv)"},
3895 {"SetTrackLayer", (PyCFunction
)TrackObj_SetTrackLayer
, 1,
3896 "(short layer) -> None"},
3897 {"GetTrackAlternate", (PyCFunction
)TrackObj_GetTrackAlternate
, 1,
3898 "() -> (Track _rv)"},
3899 {"SetTrackAlternate", (PyCFunction
)TrackObj_SetTrackAlternate
, 1,
3900 "(Track alternateT) -> None"},
3901 {"GetTrackVolume", (PyCFunction
)TrackObj_GetTrackVolume
, 1,
3902 "() -> (short _rv)"},
3903 {"SetTrackVolume", (PyCFunction
)TrackObj_SetTrackVolume
, 1,
3904 "(short volume) -> None"},
3905 {"GetTrackDimensions", (PyCFunction
)TrackObj_GetTrackDimensions
, 1,
3906 "() -> (Fixed width, Fixed height)"},
3907 {"SetTrackDimensions", (PyCFunction
)TrackObj_SetTrackDimensions
, 1,
3908 "(Fixed width, Fixed height) -> None"},
3909 {"GetTrackUserData", (PyCFunction
)TrackObj_GetTrackUserData
, 1,
3910 "() -> (UserData _rv)"},
3911 {"GetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_GetTrackSoundLocalizationSettings
, 1,
3912 "() -> (Handle settings)"},
3913 {"SetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_SetTrackSoundLocalizationSettings
, 1,
3914 "(Handle settings) -> None"},
3915 {"NewTrackMedia", (PyCFunction
)TrackObj_NewTrackMedia
, 1,
3916 "(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)"},
3917 {"GetTrackMedia", (PyCFunction
)TrackObj_GetTrackMedia
, 1,
3918 "() -> (Media _rv)"},
3919 {"InsertMediaIntoTrack", (PyCFunction
)TrackObj_InsertMediaIntoTrack
, 1,
3920 "(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None"},
3921 {"InsertTrackSegment", (PyCFunction
)TrackObj_InsertTrackSegment
, 1,
3922 "(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
3923 {"InsertEmptyTrackSegment", (PyCFunction
)TrackObj_InsertEmptyTrackSegment
, 1,
3924 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
3925 {"DeleteTrackSegment", (PyCFunction
)TrackObj_DeleteTrackSegment
, 1,
3926 "(TimeValue startTime, TimeValue duration) -> None"},
3927 {"ScaleTrackSegment", (PyCFunction
)TrackObj_ScaleTrackSegment
, 1,
3928 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
3929 {"IsScrapMovie", (PyCFunction
)TrackObj_IsScrapMovie
, 1,
3930 "() -> (Component _rv)"},
3931 {"CopyTrackSettings", (PyCFunction
)TrackObj_CopyTrackSettings
, 1,
3932 "(Track dstTrack) -> None"},
3933 {"AddEmptyTrackToMovie", (PyCFunction
)TrackObj_AddEmptyTrackToMovie
, 1,
3934 "(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)"},
3935 {"AddTrackReference", (PyCFunction
)TrackObj_AddTrackReference
, 1,
3936 "(Track refTrack, OSType refType) -> (long addedIndex)"},
3937 {"DeleteTrackReference", (PyCFunction
)TrackObj_DeleteTrackReference
, 1,
3938 "(OSType refType, long index) -> None"},
3939 {"SetTrackReference", (PyCFunction
)TrackObj_SetTrackReference
, 1,
3940 "(Track refTrack, OSType refType, long index) -> None"},
3941 {"GetTrackReference", (PyCFunction
)TrackObj_GetTrackReference
, 1,
3942 "(OSType refType, long index) -> (Track _rv)"},
3943 {"GetNextTrackReferenceType", (PyCFunction
)TrackObj_GetNextTrackReferenceType
, 1,
3944 "(OSType refType) -> (OSType _rv)"},
3945 {"GetTrackReferenceCount", (PyCFunction
)TrackObj_GetTrackReferenceCount
, 1,
3946 "(OSType refType) -> (long _rv)"},
3947 {"GetTrackEditRate", (PyCFunction
)TrackObj_GetTrackEditRate
, 1,
3948 "(TimeValue atTime) -> (Fixed _rv)"},
3949 {"GetTrackDataSize", (PyCFunction
)TrackObj_GetTrackDataSize
, 1,
3950 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
3951 {"PtInTrack", (PyCFunction
)TrackObj_PtInTrack
, 1,
3952 "(Point pt) -> (Boolean _rv)"},
3953 {"GetTrackNextInterestingTime", (PyCFunction
)TrackObj_GetTrackNextInterestingTime
, 1,
3954 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
3955 {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackSegmentDisplayBoundsRgn
, 1,
3956 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
3957 {"GetTrackStatus", (PyCFunction
)TrackObj_GetTrackStatus
, 1,
3958 "() -> (ComponentResult _rv)"},
3959 {"SetTrackLoadSettings", (PyCFunction
)TrackObj_SetTrackLoadSettings
, 1,
3960 "(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None"},
3961 {"GetTrackLoadSettings", (PyCFunction
)TrackObj_GetTrackLoadSettings
, 1,
3962 "() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)"},
3966 PyMethodChain TrackObj_chain
= { TrackObj_methods
, NULL
};
3968 static PyObject
*TrackObj_getattr(self
, name
)
3972 return Py_FindMethodInChain(&TrackObj_chain
, (PyObject
*)self
, name
);
3975 #define TrackObj_setattr NULL
3977 PyTypeObject Track_Type
= {
3978 PyObject_HEAD_INIT(&PyType_Type
)
3980 "Track", /*tp_name*/
3981 sizeof(TrackObject
), /*tp_basicsize*/
3984 (destructor
) TrackObj_dealloc
, /*tp_dealloc*/
3986 (getattrfunc
) TrackObj_getattr
, /*tp_getattr*/
3987 (setattrfunc
) TrackObj_setattr
, /*tp_setattr*/
3990 /* --------------------- End object type Track ---------------------- */
3993 /* ----------------------- Object type Movie ------------------------ */
3995 PyTypeObject Movie_Type
;
3997 #define MovieObj_Check(x) ((x)->ob_type == &Movie_Type)
3999 typedef struct MovieObject
{
4004 PyObject
*MovieObj_New(itself
)
4008 if (itself
== NULL
) {
4009 PyErr_SetString(Qt_Error
,"Cannot create null Movie");
4012 it
= PyObject_NEW(MovieObject
, &Movie_Type
);
4013 if (it
== NULL
) return NULL
;
4014 it
->ob_itself
= itself
;
4015 return (PyObject
*)it
;
4017 MovieObj_Convert(v
, p_itself
)
4021 if (!MovieObj_Check(v
))
4023 PyErr_SetString(PyExc_TypeError
, "Movie required");
4026 *p_itself
= ((MovieObject
*)v
)->ob_itself
;
4030 static void MovieObj_dealloc(self
)
4033 DisposeMovie(self
->ob_itself
);
4037 static PyObject
*MovieObj_MoviesTask(_self
, _args
)
4041 PyObject
*_res
= NULL
;
4042 long maxMilliSecToUse
;
4043 if (!PyArg_ParseTuple(_args
, "l",
4046 MoviesTask(_self
->ob_itself
,
4053 static PyObject
*MovieObj_PrerollMovie(_self
, _args
)
4057 PyObject
*_res
= NULL
;
4061 if (!PyArg_ParseTuple(_args
, "lO&",
4063 PyMac_GetFixed
, &Rate
))
4065 _err
= PrerollMovie(_self
->ob_itself
,
4068 if (_err
!= noErr
) return PyMac_Error(_err
);
4074 static PyObject
*MovieObj_LoadMovieIntoRam(_self
, _args
)
4078 PyObject
*_res
= NULL
;
4083 if (!PyArg_ParseTuple(_args
, "lll",
4088 _err
= LoadMovieIntoRam(_self
->ob_itself
,
4092 if (_err
!= noErr
) return PyMac_Error(_err
);
4098 static PyObject
*MovieObj_SetMovieActive(_self
, _args
)
4102 PyObject
*_res
= NULL
;
4104 if (!PyArg_ParseTuple(_args
, "b",
4107 SetMovieActive(_self
->ob_itself
,
4114 static PyObject
*MovieObj_GetMovieActive(_self
, _args
)
4118 PyObject
*_res
= NULL
;
4120 if (!PyArg_ParseTuple(_args
, ""))
4122 _rv
= GetMovieActive(_self
->ob_itself
);
4123 _res
= Py_BuildValue("b",
4128 static PyObject
*MovieObj_StartMovie(_self
, _args
)
4132 PyObject
*_res
= NULL
;
4133 if (!PyArg_ParseTuple(_args
, ""))
4135 StartMovie(_self
->ob_itself
);
4141 static PyObject
*MovieObj_StopMovie(_self
, _args
)
4145 PyObject
*_res
= NULL
;
4146 if (!PyArg_ParseTuple(_args
, ""))
4148 StopMovie(_self
->ob_itself
);
4154 static PyObject
*MovieObj_GoToBeginningOfMovie(_self
, _args
)
4158 PyObject
*_res
= NULL
;
4159 if (!PyArg_ParseTuple(_args
, ""))
4161 GoToBeginningOfMovie(_self
->ob_itself
);
4167 static PyObject
*MovieObj_GoToEndOfMovie(_self
, _args
)
4171 PyObject
*_res
= NULL
;
4172 if (!PyArg_ParseTuple(_args
, ""))
4174 GoToEndOfMovie(_self
->ob_itself
);
4180 static PyObject
*MovieObj_IsMovieDone(_self
, _args
)
4184 PyObject
*_res
= NULL
;
4186 if (!PyArg_ParseTuple(_args
, ""))
4188 _rv
= IsMovieDone(_self
->ob_itself
);
4189 _res
= Py_BuildValue("b",
4194 static PyObject
*MovieObj_GetMoviePreviewMode(_self
, _args
)
4198 PyObject
*_res
= NULL
;
4200 if (!PyArg_ParseTuple(_args
, ""))
4202 _rv
= GetMoviePreviewMode(_self
->ob_itself
);
4203 _res
= Py_BuildValue("b",
4208 static PyObject
*MovieObj_SetMoviePreviewMode(_self
, _args
)
4212 PyObject
*_res
= NULL
;
4214 if (!PyArg_ParseTuple(_args
, "b",
4217 SetMoviePreviewMode(_self
->ob_itself
,
4224 static PyObject
*MovieObj_ShowMoviePoster(_self
, _args
)
4228 PyObject
*_res
= NULL
;
4229 if (!PyArg_ParseTuple(_args
, ""))
4231 ShowMoviePoster(_self
->ob_itself
);
4237 static PyObject
*MovieObj_GetMovieTimeBase(_self
, _args
)
4241 PyObject
*_res
= NULL
;
4243 if (!PyArg_ParseTuple(_args
, ""))
4245 _rv
= GetMovieTimeBase(_self
->ob_itself
);
4246 _res
= Py_BuildValue("O&",
4247 TimeBaseObj_New
, _rv
);
4251 static PyObject
*MovieObj_SetMovieMasterTimeBase(_self
, _args
)
4255 PyObject
*_res
= NULL
;
4257 TimeRecord slaveZero
;
4258 if (!PyArg_ParseTuple(_args
, "O&O&",
4259 TimeBaseObj_Convert
, &tb
,
4260 QtTimeRecord_Convert
, &slaveZero
))
4262 SetMovieMasterTimeBase(_self
->ob_itself
,
4270 static PyObject
*MovieObj_SetMovieMasterClock(_self
, _args
)
4274 PyObject
*_res
= NULL
;
4275 Component clockMeister
;
4276 TimeRecord slaveZero
;
4277 if (!PyArg_ParseTuple(_args
, "O&O&",
4278 CmpObj_Convert
, &clockMeister
,
4279 QtTimeRecord_Convert
, &slaveZero
))
4281 SetMovieMasterClock(_self
->ob_itself
,
4289 static PyObject
*MovieObj_GetMovieGWorld(_self
, _args
)
4293 PyObject
*_res
= NULL
;
4296 if (!PyArg_ParseTuple(_args
, ""))
4298 GetMovieGWorld(_self
->ob_itself
,
4301 _res
= Py_BuildValue("O&O&",
4303 OptResObj_New
, gdh
);
4307 static PyObject
*MovieObj_SetMovieGWorld(_self
, _args
)
4311 PyObject
*_res
= NULL
;
4314 if (!PyArg_ParseTuple(_args
, "O&O&",
4315 GrafObj_Convert
, &port
,
4316 OptResObj_Convert
, &gdh
))
4318 SetMovieGWorld(_self
->ob_itself
,
4326 static PyObject
*MovieObj_GetMovieNaturalBoundsRect(_self
, _args
)
4330 PyObject
*_res
= NULL
;
4332 if (!PyArg_ParseTuple(_args
, ""))
4334 GetMovieNaturalBoundsRect(_self
->ob_itself
,
4336 _res
= Py_BuildValue("O&",
4337 PyMac_BuildRect
, &naturalBounds
);
4341 static PyObject
*MovieObj_GetNextTrackForCompositing(_self
, _args
)
4345 PyObject
*_res
= NULL
;
4348 if (!PyArg_ParseTuple(_args
, "O&",
4349 TrackObj_Convert
, &theTrack
))
4351 _rv
= GetNextTrackForCompositing(_self
->ob_itself
,
4353 _res
= Py_BuildValue("O&",
4358 static PyObject
*MovieObj_GetPrevTrackForCompositing(_self
, _args
)
4362 PyObject
*_res
= NULL
;
4365 if (!PyArg_ParseTuple(_args
, "O&",
4366 TrackObj_Convert
, &theTrack
))
4368 _rv
= GetPrevTrackForCompositing(_self
->ob_itself
,
4370 _res
= Py_BuildValue("O&",
4375 static PyObject
*MovieObj_GetMoviePict(_self
, _args
)
4379 PyObject
*_res
= NULL
;
4382 if (!PyArg_ParseTuple(_args
, "l",
4385 _rv
= GetMoviePict(_self
->ob_itself
,
4387 _res
= Py_BuildValue("O&",
4392 static PyObject
*MovieObj_GetMoviePosterPict(_self
, _args
)
4396 PyObject
*_res
= NULL
;
4398 if (!PyArg_ParseTuple(_args
, ""))
4400 _rv
= GetMoviePosterPict(_self
->ob_itself
);
4401 _res
= Py_BuildValue("O&",
4406 static PyObject
*MovieObj_UpdateMovie(_self
, _args
)
4410 PyObject
*_res
= NULL
;
4412 if (!PyArg_ParseTuple(_args
, ""))
4414 _err
= UpdateMovie(_self
->ob_itself
);
4415 if (_err
!= noErr
) return PyMac_Error(_err
);
4421 static PyObject
*MovieObj_InvalidateMovieRegion(_self
, _args
)
4425 PyObject
*_res
= NULL
;
4427 RgnHandle invalidRgn
;
4428 if (!PyArg_ParseTuple(_args
, "O&",
4429 ResObj_Convert
, &invalidRgn
))
4431 _err
= InvalidateMovieRegion(_self
->ob_itself
,
4433 if (_err
!= noErr
) return PyMac_Error(_err
);
4439 static PyObject
*MovieObj_GetMovieBox(_self
, _args
)
4443 PyObject
*_res
= NULL
;
4445 if (!PyArg_ParseTuple(_args
, ""))
4447 GetMovieBox(_self
->ob_itself
,
4449 _res
= Py_BuildValue("O&",
4450 PyMac_BuildRect
, &boxRect
);
4454 static PyObject
*MovieObj_SetMovieBox(_self
, _args
)
4458 PyObject
*_res
= NULL
;
4460 if (!PyArg_ParseTuple(_args
, "O&",
4461 PyMac_GetRect
, &boxRect
))
4463 SetMovieBox(_self
->ob_itself
,
4470 static PyObject
*MovieObj_GetMovieDisplayClipRgn(_self
, _args
)
4474 PyObject
*_res
= NULL
;
4476 if (!PyArg_ParseTuple(_args
, ""))
4478 _rv
= GetMovieDisplayClipRgn(_self
->ob_itself
);
4479 _res
= Py_BuildValue("O&",
4484 static PyObject
*MovieObj_SetMovieDisplayClipRgn(_self
, _args
)
4488 PyObject
*_res
= NULL
;
4490 if (!PyArg_ParseTuple(_args
, "O&",
4491 ResObj_Convert
, &theClip
))
4493 SetMovieDisplayClipRgn(_self
->ob_itself
,
4500 static PyObject
*MovieObj_GetMovieClipRgn(_self
, _args
)
4504 PyObject
*_res
= NULL
;
4506 if (!PyArg_ParseTuple(_args
, ""))
4508 _rv
= GetMovieClipRgn(_self
->ob_itself
);
4509 _res
= Py_BuildValue("O&",
4514 static PyObject
*MovieObj_SetMovieClipRgn(_self
, _args
)
4518 PyObject
*_res
= NULL
;
4520 if (!PyArg_ParseTuple(_args
, "O&",
4521 ResObj_Convert
, &theClip
))
4523 SetMovieClipRgn(_self
->ob_itself
,
4530 static PyObject
*MovieObj_GetMovieDisplayBoundsRgn(_self
, _args
)
4534 PyObject
*_res
= NULL
;
4536 if (!PyArg_ParseTuple(_args
, ""))
4538 _rv
= GetMovieDisplayBoundsRgn(_self
->ob_itself
);
4539 _res
= Py_BuildValue("O&",
4544 static PyObject
*MovieObj_GetMovieBoundsRgn(_self
, _args
)
4548 PyObject
*_res
= NULL
;
4550 if (!PyArg_ParseTuple(_args
, ""))
4552 _rv
= GetMovieBoundsRgn(_self
->ob_itself
);
4553 _res
= Py_BuildValue("O&",
4558 static PyObject
*MovieObj_PutMovieIntoHandle(_self
, _args
)
4562 PyObject
*_res
= NULL
;
4565 if (!PyArg_ParseTuple(_args
, "O&",
4566 ResObj_Convert
, &publicMovie
))
4568 _err
= PutMovieIntoHandle(_self
->ob_itself
,
4570 if (_err
!= noErr
) return PyMac_Error(_err
);
4576 static PyObject
*MovieObj_PutMovieIntoDataFork(_self
, _args
)
4580 PyObject
*_res
= NULL
;
4585 if (!PyArg_ParseTuple(_args
, "hll",
4590 _err
= PutMovieIntoDataFork(_self
->ob_itself
,
4594 if (_err
!= noErr
) return PyMac_Error(_err
);
4600 static PyObject
*MovieObj_GetMovieCreationTime(_self
, _args
)
4604 PyObject
*_res
= NULL
;
4606 if (!PyArg_ParseTuple(_args
, ""))
4608 _rv
= GetMovieCreationTime(_self
->ob_itself
);
4609 _res
= Py_BuildValue("l",
4614 static PyObject
*MovieObj_GetMovieModificationTime(_self
, _args
)
4618 PyObject
*_res
= NULL
;
4620 if (!PyArg_ParseTuple(_args
, ""))
4622 _rv
= GetMovieModificationTime(_self
->ob_itself
);
4623 _res
= Py_BuildValue("l",
4628 static PyObject
*MovieObj_GetMovieTimeScale(_self
, _args
)
4632 PyObject
*_res
= NULL
;
4634 if (!PyArg_ParseTuple(_args
, ""))
4636 _rv
= GetMovieTimeScale(_self
->ob_itself
);
4637 _res
= Py_BuildValue("l",
4642 static PyObject
*MovieObj_SetMovieTimeScale(_self
, _args
)
4646 PyObject
*_res
= NULL
;
4647 TimeScale timeScale
;
4648 if (!PyArg_ParseTuple(_args
, "l",
4651 SetMovieTimeScale(_self
->ob_itself
,
4658 static PyObject
*MovieObj_GetMovieDuration(_self
, _args
)
4662 PyObject
*_res
= NULL
;
4664 if (!PyArg_ParseTuple(_args
, ""))
4666 _rv
= GetMovieDuration(_self
->ob_itself
);
4667 _res
= Py_BuildValue("l",
4672 static PyObject
*MovieObj_GetMovieRate(_self
, _args
)
4676 PyObject
*_res
= NULL
;
4678 if (!PyArg_ParseTuple(_args
, ""))
4680 _rv
= GetMovieRate(_self
->ob_itself
);
4681 _res
= Py_BuildValue("O&",
4682 PyMac_BuildFixed
, _rv
);
4686 static PyObject
*MovieObj_SetMovieRate(_self
, _args
)
4690 PyObject
*_res
= NULL
;
4692 if (!PyArg_ParseTuple(_args
, "O&",
4693 PyMac_GetFixed
, &rate
))
4695 SetMovieRate(_self
->ob_itself
,
4702 static PyObject
*MovieObj_GetMoviePreferredRate(_self
, _args
)
4706 PyObject
*_res
= NULL
;
4708 if (!PyArg_ParseTuple(_args
, ""))
4710 _rv
= GetMoviePreferredRate(_self
->ob_itself
);
4711 _res
= Py_BuildValue("O&",
4712 PyMac_BuildFixed
, _rv
);
4716 static PyObject
*MovieObj_SetMoviePreferredRate(_self
, _args
)
4720 PyObject
*_res
= NULL
;
4722 if (!PyArg_ParseTuple(_args
, "O&",
4723 PyMac_GetFixed
, &rate
))
4725 SetMoviePreferredRate(_self
->ob_itself
,
4732 static PyObject
*MovieObj_GetMoviePreferredVolume(_self
, _args
)
4736 PyObject
*_res
= NULL
;
4738 if (!PyArg_ParseTuple(_args
, ""))
4740 _rv
= GetMoviePreferredVolume(_self
->ob_itself
);
4741 _res
= Py_BuildValue("h",
4746 static PyObject
*MovieObj_SetMoviePreferredVolume(_self
, _args
)
4750 PyObject
*_res
= NULL
;
4752 if (!PyArg_ParseTuple(_args
, "h",
4755 SetMoviePreferredVolume(_self
->ob_itself
,
4762 static PyObject
*MovieObj_GetMovieVolume(_self
, _args
)
4766 PyObject
*_res
= NULL
;
4768 if (!PyArg_ParseTuple(_args
, ""))
4770 _rv
= GetMovieVolume(_self
->ob_itself
);
4771 _res
= Py_BuildValue("h",
4776 static PyObject
*MovieObj_SetMovieVolume(_self
, _args
)
4780 PyObject
*_res
= NULL
;
4782 if (!PyArg_ParseTuple(_args
, "h",
4785 SetMovieVolume(_self
->ob_itself
,
4792 static PyObject
*MovieObj_GetMoviePreviewTime(_self
, _args
)
4796 PyObject
*_res
= NULL
;
4797 TimeValue previewTime
;
4798 TimeValue previewDuration
;
4799 if (!PyArg_ParseTuple(_args
, ""))
4801 GetMoviePreviewTime(_self
->ob_itself
,
4804 _res
= Py_BuildValue("ll",
4810 static PyObject
*MovieObj_SetMoviePreviewTime(_self
, _args
)
4814 PyObject
*_res
= NULL
;
4815 TimeValue previewTime
;
4816 TimeValue previewDuration
;
4817 if (!PyArg_ParseTuple(_args
, "ll",
4821 SetMoviePreviewTime(_self
->ob_itself
,
4829 static PyObject
*MovieObj_GetMoviePosterTime(_self
, _args
)
4833 PyObject
*_res
= NULL
;
4835 if (!PyArg_ParseTuple(_args
, ""))
4837 _rv
= GetMoviePosterTime(_self
->ob_itself
);
4838 _res
= Py_BuildValue("l",
4843 static PyObject
*MovieObj_SetMoviePosterTime(_self
, _args
)
4847 PyObject
*_res
= NULL
;
4848 TimeValue posterTime
;
4849 if (!PyArg_ParseTuple(_args
, "l",
4852 SetMoviePosterTime(_self
->ob_itself
,
4859 static PyObject
*MovieObj_GetMovieSelection(_self
, _args
)
4863 PyObject
*_res
= NULL
;
4864 TimeValue selectionTime
;
4865 TimeValue selectionDuration
;
4866 if (!PyArg_ParseTuple(_args
, ""))
4868 GetMovieSelection(_self
->ob_itself
,
4870 &selectionDuration
);
4871 _res
= Py_BuildValue("ll",
4877 static PyObject
*MovieObj_SetMovieSelection(_self
, _args
)
4881 PyObject
*_res
= NULL
;
4882 TimeValue selectionTime
;
4883 TimeValue selectionDuration
;
4884 if (!PyArg_ParseTuple(_args
, "ll",
4886 &selectionDuration
))
4888 SetMovieSelection(_self
->ob_itself
,
4896 static PyObject
*MovieObj_SetMovieActiveSegment(_self
, _args
)
4900 PyObject
*_res
= NULL
;
4901 TimeValue startTime
;
4903 if (!PyArg_ParseTuple(_args
, "ll",
4907 SetMovieActiveSegment(_self
->ob_itself
,
4915 static PyObject
*MovieObj_GetMovieActiveSegment(_self
, _args
)
4919 PyObject
*_res
= NULL
;
4920 TimeValue startTime
;
4922 if (!PyArg_ParseTuple(_args
, ""))
4924 GetMovieActiveSegment(_self
->ob_itself
,
4927 _res
= Py_BuildValue("ll",
4933 static PyObject
*MovieObj_GetMovieTime(_self
, _args
)
4937 PyObject
*_res
= NULL
;
4939 TimeRecord currentTime
;
4940 if (!PyArg_ParseTuple(_args
, ""))
4942 _rv
= GetMovieTime(_self
->ob_itself
,
4944 _res
= Py_BuildValue("lO&",
4946 QtTimeRecord_New
, ¤tTime
);
4950 static PyObject
*MovieObj_SetMovieTime(_self
, _args
)
4954 PyObject
*_res
= NULL
;
4956 if (!PyArg_ParseTuple(_args
, "O&",
4957 QtTimeRecord_Convert
, &newtime
))
4959 SetMovieTime(_self
->ob_itself
,
4966 static PyObject
*MovieObj_SetMovieTimeValue(_self
, _args
)
4970 PyObject
*_res
= NULL
;
4972 if (!PyArg_ParseTuple(_args
, "l",
4975 SetMovieTimeValue(_self
->ob_itself
,
4982 static PyObject
*MovieObj_GetMovieUserData(_self
, _args
)
4986 PyObject
*_res
= NULL
;
4988 if (!PyArg_ParseTuple(_args
, ""))
4990 _rv
= GetMovieUserData(_self
->ob_itself
);
4991 _res
= Py_BuildValue("O&",
4992 UserDataObj_New
, _rv
);
4996 static PyObject
*MovieObj_GetMovieTrackCount(_self
, _args
)
5000 PyObject
*_res
= NULL
;
5002 if (!PyArg_ParseTuple(_args
, ""))
5004 _rv
= GetMovieTrackCount(_self
->ob_itself
);
5005 _res
= Py_BuildValue("l",
5010 static PyObject
*MovieObj_GetMovieTrack(_self
, _args
)
5014 PyObject
*_res
= NULL
;
5017 if (!PyArg_ParseTuple(_args
, "l",
5020 _rv
= GetMovieTrack(_self
->ob_itself
,
5022 _res
= Py_BuildValue("O&",
5027 static PyObject
*MovieObj_GetMovieIndTrack(_self
, _args
)
5031 PyObject
*_res
= NULL
;
5034 if (!PyArg_ParseTuple(_args
, "l",
5037 _rv
= GetMovieIndTrack(_self
->ob_itself
,
5039 _res
= Py_BuildValue("O&",
5044 static PyObject
*MovieObj_GetMovieIndTrackType(_self
, _args
)
5048 PyObject
*_res
= NULL
;
5053 if (!PyArg_ParseTuple(_args
, "lO&l",
5055 PyMac_GetOSType
, &trackType
,
5058 _rv
= GetMovieIndTrackType(_self
->ob_itself
,
5062 _res
= Py_BuildValue("O&",
5067 static PyObject
*MovieObj_NewMovieTrack(_self
, _args
)
5071 PyObject
*_res
= NULL
;
5076 if (!PyArg_ParseTuple(_args
, "O&O&h",
5077 PyMac_GetFixed
, &width
,
5078 PyMac_GetFixed
, &height
,
5081 _rv
= NewMovieTrack(_self
->ob_itself
,
5085 _res
= Py_BuildValue("O&",
5090 static PyObject
*MovieObj_SetAutoTrackAlternatesEnabled(_self
, _args
)
5094 PyObject
*_res
= NULL
;
5096 if (!PyArg_ParseTuple(_args
, "b",
5099 SetAutoTrackAlternatesEnabled(_self
->ob_itself
,
5106 static PyObject
*MovieObj_SelectMovieAlternates(_self
, _args
)
5110 PyObject
*_res
= NULL
;
5111 if (!PyArg_ParseTuple(_args
, ""))
5113 SelectMovieAlternates(_self
->ob_itself
);
5119 static PyObject
*MovieObj_InsertMovieSegment(_self
, _args
)
5123 PyObject
*_res
= NULL
;
5127 TimeValue srcDuration
;
5129 if (!PyArg_ParseTuple(_args
, "O&lll",
5130 MovieObj_Convert
, &dstMovie
,
5135 _err
= InsertMovieSegment(_self
->ob_itself
,
5140 if (_err
!= noErr
) return PyMac_Error(_err
);
5146 static PyObject
*MovieObj_InsertEmptyMovieSegment(_self
, _args
)
5150 PyObject
*_res
= NULL
;
5153 TimeValue dstDuration
;
5154 if (!PyArg_ParseTuple(_args
, "ll",
5158 _err
= InsertEmptyMovieSegment(_self
->ob_itself
,
5161 if (_err
!= noErr
) return PyMac_Error(_err
);
5167 static PyObject
*MovieObj_DeleteMovieSegment(_self
, _args
)
5171 PyObject
*_res
= NULL
;
5173 TimeValue startTime
;
5175 if (!PyArg_ParseTuple(_args
, "ll",
5179 _err
= DeleteMovieSegment(_self
->ob_itself
,
5182 if (_err
!= noErr
) return PyMac_Error(_err
);
5188 static PyObject
*MovieObj_ScaleMovieSegment(_self
, _args
)
5192 PyObject
*_res
= NULL
;
5194 TimeValue startTime
;
5195 TimeValue oldDuration
;
5196 TimeValue newDuration
;
5197 if (!PyArg_ParseTuple(_args
, "lll",
5202 _err
= ScaleMovieSegment(_self
->ob_itself
,
5206 if (_err
!= noErr
) return PyMac_Error(_err
);
5212 static PyObject
*MovieObj_CutMovieSelection(_self
, _args
)
5216 PyObject
*_res
= NULL
;
5218 if (!PyArg_ParseTuple(_args
, ""))
5220 _rv
= CutMovieSelection(_self
->ob_itself
);
5221 _res
= Py_BuildValue("O&",
5226 static PyObject
*MovieObj_CopyMovieSelection(_self
, _args
)
5230 PyObject
*_res
= NULL
;
5232 if (!PyArg_ParseTuple(_args
, ""))
5234 _rv
= CopyMovieSelection(_self
->ob_itself
);
5235 _res
= Py_BuildValue("O&",
5240 static PyObject
*MovieObj_PasteMovieSelection(_self
, _args
)
5244 PyObject
*_res
= NULL
;
5246 if (!PyArg_ParseTuple(_args
, "O&",
5247 MovieObj_Convert
, &src
))
5249 PasteMovieSelection(_self
->ob_itself
,
5256 static PyObject
*MovieObj_AddMovieSelection(_self
, _args
)
5260 PyObject
*_res
= NULL
;
5262 if (!PyArg_ParseTuple(_args
, "O&",
5263 MovieObj_Convert
, &src
))
5265 AddMovieSelection(_self
->ob_itself
,
5272 static PyObject
*MovieObj_ClearMovieSelection(_self
, _args
)
5276 PyObject
*_res
= NULL
;
5277 if (!PyArg_ParseTuple(_args
, ""))
5279 ClearMovieSelection(_self
->ob_itself
);
5285 static PyObject
*MovieObj_PutMovieIntoTypedHandle(_self
, _args
)
5289 PyObject
*_res
= NULL
;
5297 ComponentInstance userComp
;
5298 if (!PyArg_ParseTuple(_args
, "O&O&O&lllO&",
5299 TrackObj_Convert
, &targetTrack
,
5300 PyMac_GetOSType
, &handleType
,
5301 ResObj_Convert
, &publicMovie
,
5305 CmpInstObj_Convert
, &userComp
))
5307 _err
= PutMovieIntoTypedHandle(_self
->ob_itself
,
5315 if (_err
!= noErr
) return PyMac_Error(_err
);
5321 static PyObject
*MovieObj_CopyMovieSettings(_self
, _args
)
5325 PyObject
*_res
= NULL
;
5328 if (!PyArg_ParseTuple(_args
, "O&",
5329 MovieObj_Convert
, &dstMovie
))
5331 _err
= CopyMovieSettings(_self
->ob_itself
,
5333 if (_err
!= noErr
) return PyMac_Error(_err
);
5339 static PyObject
*MovieObj_ConvertMovieToFile(_self
, _args
)
5343 PyObject
*_res
= NULL
;
5349 ScriptCode scriptTag
;
5352 ComponentInstance userComp
;
5353 if (!PyArg_ParseTuple(_args
, "O&O&O&O&hlO&",
5354 TrackObj_Convert
, &onlyTrack
,
5355 PyMac_GetFSSpec
, &outputFile
,
5356 PyMac_GetOSType
, &fileType
,
5357 PyMac_GetOSType
, &creator
,
5360 CmpInstObj_Convert
, &userComp
))
5362 _err
= ConvertMovieToFile(_self
->ob_itself
,
5371 if (_err
!= noErr
) return PyMac_Error(_err
);
5372 _res
= Py_BuildValue("h",
5377 static PyObject
*MovieObj_GetMovieDataSize(_self
, _args
)
5381 PyObject
*_res
= NULL
;
5383 TimeValue startTime
;
5385 if (!PyArg_ParseTuple(_args
, "ll",
5389 _rv
= GetMovieDataSize(_self
->ob_itself
,
5392 _res
= Py_BuildValue("l",
5397 static PyObject
*MovieObj_PtInMovie(_self
, _args
)
5401 PyObject
*_res
= NULL
;
5404 if (!PyArg_ParseTuple(_args
, "O&",
5405 PyMac_GetPoint
, &pt
))
5407 _rv
= PtInMovie(_self
->ob_itself
,
5409 _res
= Py_BuildValue("b",
5414 static PyObject
*MovieObj_SetMovieLanguage(_self
, _args
)
5418 PyObject
*_res
= NULL
;
5420 if (!PyArg_ParseTuple(_args
, "l",
5423 SetMovieLanguage(_self
->ob_itself
,
5430 static PyObject
*MovieObj_GetMovieNextInterestingTime(_self
, _args
)
5434 PyObject
*_res
= NULL
;
5435 short interestingTimeFlags
;
5436 short numMediaTypes
;
5437 OSType whichMediaTypes
;
5440 TimeValue interestingTime
;
5441 TimeValue interestingDuration
;
5442 if (!PyArg_ParseTuple(_args
, "hhO&lO&",
5443 &interestingTimeFlags
,
5445 PyMac_GetOSType
, &whichMediaTypes
,
5447 PyMac_GetFixed
, &rate
))
5449 GetMovieNextInterestingTime(_self
->ob_itself
,
5450 interestingTimeFlags
,
5456 &interestingDuration
);
5457 _res
= Py_BuildValue("ll",
5459 interestingDuration
);
5463 static PyObject
*MovieObj_AddMovieResource(_self
, _args
)
5467 PyObject
*_res
= NULL
;
5472 if (!PyArg_ParseTuple(_args
, "hO&",
5474 PyMac_GetStr255
, resName
))
5476 _err
= AddMovieResource(_self
->ob_itself
,
5480 if (_err
!= noErr
) return PyMac_Error(_err
);
5481 _res
= Py_BuildValue("h",
5486 static PyObject
*MovieObj_UpdateMovieResource(_self
, _args
)
5490 PyObject
*_res
= NULL
;
5495 if (!PyArg_ParseTuple(_args
, "hhO&",
5498 PyMac_GetStr255
, resName
))
5500 _err
= UpdateMovieResource(_self
->ob_itself
,
5504 if (_err
!= noErr
) return PyMac_Error(_err
);
5510 static PyObject
*MovieObj_HasMovieChanged(_self
, _args
)
5514 PyObject
*_res
= NULL
;
5516 if (!PyArg_ParseTuple(_args
, ""))
5518 _rv
= HasMovieChanged(_self
->ob_itself
);
5519 _res
= Py_BuildValue("b",
5524 static PyObject
*MovieObj_ClearMovieChanged(_self
, _args
)
5528 PyObject
*_res
= NULL
;
5529 if (!PyArg_ParseTuple(_args
, ""))
5531 ClearMovieChanged(_self
->ob_itself
);
5537 static PyObject
*MovieObj_SetMovieDefaultDataRef(_self
, _args
)
5541 PyObject
*_res
= NULL
;
5545 if (!PyArg_ParseTuple(_args
, "O&O&",
5546 ResObj_Convert
, &dataRef
,
5547 PyMac_GetOSType
, &dataRefType
))
5549 _err
= SetMovieDefaultDataRef(_self
->ob_itself
,
5552 if (_err
!= noErr
) return PyMac_Error(_err
);
5558 static PyObject
*MovieObj_GetMovieDefaultDataRef(_self
, _args
)
5562 PyObject
*_res
= NULL
;
5566 if (!PyArg_ParseTuple(_args
, ""))
5568 _err
= GetMovieDefaultDataRef(_self
->ob_itself
,
5571 if (_err
!= noErr
) return PyMac_Error(_err
);
5572 _res
= Py_BuildValue("O&O&",
5573 ResObj_New
, dataRef
,
5574 PyMac_BuildOSType
, dataRefType
);
5578 static PyObject
*MovieObj_SetMovieColorTable(_self
, _args
)
5582 PyObject
*_res
= NULL
;
5585 if (!PyArg_ParseTuple(_args
, "O&",
5586 ResObj_Convert
, &ctab
))
5588 _err
= SetMovieColorTable(_self
->ob_itself
,
5590 if (_err
!= noErr
) return PyMac_Error(_err
);
5596 static PyObject
*MovieObj_GetMovieColorTable(_self
, _args
)
5600 PyObject
*_res
= NULL
;
5603 if (!PyArg_ParseTuple(_args
, ""))
5605 _err
= GetMovieColorTable(_self
->ob_itself
,
5607 if (_err
!= noErr
) return PyMac_Error(_err
);
5608 _res
= Py_BuildValue("O&",
5613 static PyObject
*MovieObj_FlattenMovie(_self
, _args
)
5617 PyObject
*_res
= NULL
;
5618 long movieFlattenFlags
;
5621 ScriptCode scriptTag
;
5622 long createMovieFileFlags
;
5625 if (!PyArg_ParseTuple(_args
, "lO&O&hlO&",
5627 PyMac_GetFSSpec
, &theFile
,
5628 PyMac_GetOSType
, &creator
,
5630 &createMovieFileFlags
,
5631 PyMac_GetStr255
, resName
))
5633 FlattenMovie(_self
->ob_itself
,
5638 createMovieFileFlags
,
5641 _res
= Py_BuildValue("h",
5646 static PyObject
*MovieObj_FlattenMovieData(_self
, _args
)
5650 PyObject
*_res
= NULL
;
5652 long movieFlattenFlags
;
5655 ScriptCode scriptTag
;
5656 long createMovieFileFlags
;
5657 if (!PyArg_ParseTuple(_args
, "lO&O&hl",
5659 PyMac_GetFSSpec
, &theFile
,
5660 PyMac_GetOSType
, &creator
,
5662 &createMovieFileFlags
))
5664 _rv
= FlattenMovieData(_self
->ob_itself
,
5669 createMovieFileFlags
);
5670 _res
= Py_BuildValue("O&",
5675 static PyObject
*MovieObj_MovieSearchText(_self
, _args
)
5679 PyObject
*_res
= NULL
;
5685 TimeValue searchTime
;
5687 if (!PyArg_ParseTuple(_args
, "sll",
5692 _err
= MovieSearchText(_self
->ob_itself
,
5699 if (_err
!= noErr
) return PyMac_Error(_err
);
5700 _res
= Py_BuildValue("O&ll",
5701 TrackObj_New
, searchTrack
,
5707 static PyObject
*MovieObj_GetPosterBox(_self
, _args
)
5711 PyObject
*_res
= NULL
;
5713 if (!PyArg_ParseTuple(_args
, ""))
5715 GetPosterBox(_self
->ob_itself
,
5717 _res
= Py_BuildValue("O&",
5718 PyMac_BuildRect
, &boxRect
);
5722 static PyObject
*MovieObj_SetPosterBox(_self
, _args
)
5726 PyObject
*_res
= NULL
;
5728 if (!PyArg_ParseTuple(_args
, "O&",
5729 PyMac_GetRect
, &boxRect
))
5731 SetPosterBox(_self
->ob_itself
,
5738 static PyObject
*MovieObj_GetMovieSegmentDisplayBoundsRgn(_self
, _args
)
5742 PyObject
*_res
= NULL
;
5746 if (!PyArg_ParseTuple(_args
, "ll",
5750 _rv
= GetMovieSegmentDisplayBoundsRgn(_self
->ob_itself
,
5753 _res
= Py_BuildValue("O&",
5758 static PyObject
*MovieObj_GetMovieStatus(_self
, _args
)
5762 PyObject
*_res
= NULL
;
5763 ComponentResult _rv
;
5764 Track firstProblemTrack
;
5765 if (!PyArg_ParseTuple(_args
, ""))
5767 _rv
= GetMovieStatus(_self
->ob_itself
,
5768 &firstProblemTrack
);
5769 _res
= Py_BuildValue("lO&",
5771 TrackObj_New
, firstProblemTrack
);
5775 static PyObject
*MovieObj_NewMovieController(_self
, _args
)
5779 PyObject
*_res
= NULL
;
5780 MovieController _rv
;
5783 if (!PyArg_ParseTuple(_args
, "O&l",
5784 PyMac_GetRect
, &movieRect
,
5787 _rv
= NewMovieController(_self
->ob_itself
,
5790 _res
= Py_BuildValue("O&",
5791 MovieCtlObj_New
, _rv
);
5795 static PyObject
*MovieObj_PutMovieOnScrap(_self
, _args
)
5799 PyObject
*_res
= NULL
;
5801 long movieScrapFlags
;
5802 if (!PyArg_ParseTuple(_args
, "l",
5805 _err
= PutMovieOnScrap(_self
->ob_itself
,
5807 if (_err
!= noErr
) return PyMac_Error(_err
);
5813 static PyObject
*MovieObj_SetMoviePlayHints(_self
, _args
)
5817 PyObject
*_res
= NULL
;
5820 if (!PyArg_ParseTuple(_args
, "ll",
5824 SetMoviePlayHints(_self
->ob_itself
,
5832 static PyObject
*MovieObj_GetMaxLoadedTimeInMovie(_self
, _args
)
5836 PyObject
*_res
= NULL
;
5839 if (!PyArg_ParseTuple(_args
, ""))
5841 _err
= GetMaxLoadedTimeInMovie(_self
->ob_itself
,
5843 if (_err
!= noErr
) return PyMac_Error(_err
);
5844 _res
= Py_BuildValue("l",
5849 static PyObject
*MovieObj_QTMovieNeedsTimeTable(_self
, _args
)
5853 PyObject
*_res
= NULL
;
5855 Boolean needsTimeTable
;
5856 if (!PyArg_ParseTuple(_args
, ""))
5858 _err
= QTMovieNeedsTimeTable(_self
->ob_itself
,
5860 if (_err
!= noErr
) return PyMac_Error(_err
);
5861 _res
= Py_BuildValue("b",
5866 static PyObject
*MovieObj_QTGetDataRefMaxFileOffset(_self
, _args
)
5870 PyObject
*_res
= NULL
;
5875 if (!PyArg_ParseTuple(_args
, "O&O&",
5876 PyMac_GetOSType
, &dataRefType
,
5877 ResObj_Convert
, &dataRef
))
5879 _err
= QTGetDataRefMaxFileOffset(_self
->ob_itself
,
5883 if (_err
!= noErr
) return PyMac_Error(_err
);
5884 _res
= Py_BuildValue("l",
5889 static PyMethodDef MovieObj_methods
[] = {
5890 {"MoviesTask", (PyCFunction
)MovieObj_MoviesTask
, 1,
5891 "(long maxMilliSecToUse) -> None"},
5892 {"PrerollMovie", (PyCFunction
)MovieObj_PrerollMovie
, 1,
5893 "(TimeValue time, Fixed Rate) -> None"},
5894 {"LoadMovieIntoRam", (PyCFunction
)MovieObj_LoadMovieIntoRam
, 1,
5895 "(TimeValue time, TimeValue duration, long flags) -> None"},
5896 {"SetMovieActive", (PyCFunction
)MovieObj_SetMovieActive
, 1,
5897 "(Boolean active) -> None"},
5898 {"GetMovieActive", (PyCFunction
)MovieObj_GetMovieActive
, 1,
5899 "() -> (Boolean _rv)"},
5900 {"StartMovie", (PyCFunction
)MovieObj_StartMovie
, 1,
5902 {"StopMovie", (PyCFunction
)MovieObj_StopMovie
, 1,
5904 {"GoToBeginningOfMovie", (PyCFunction
)MovieObj_GoToBeginningOfMovie
, 1,
5906 {"GoToEndOfMovie", (PyCFunction
)MovieObj_GoToEndOfMovie
, 1,
5908 {"IsMovieDone", (PyCFunction
)MovieObj_IsMovieDone
, 1,
5909 "() -> (Boolean _rv)"},
5910 {"GetMoviePreviewMode", (PyCFunction
)MovieObj_GetMoviePreviewMode
, 1,
5911 "() -> (Boolean _rv)"},
5912 {"SetMoviePreviewMode", (PyCFunction
)MovieObj_SetMoviePreviewMode
, 1,
5913 "(Boolean usePreview) -> None"},
5914 {"ShowMoviePoster", (PyCFunction
)MovieObj_ShowMoviePoster
, 1,
5916 {"GetMovieTimeBase", (PyCFunction
)MovieObj_GetMovieTimeBase
, 1,
5917 "() -> (TimeBase _rv)"},
5918 {"SetMovieMasterTimeBase", (PyCFunction
)MovieObj_SetMovieMasterTimeBase
, 1,
5919 "(TimeBase tb, TimeRecord slaveZero) -> None"},
5920 {"SetMovieMasterClock", (PyCFunction
)MovieObj_SetMovieMasterClock
, 1,
5921 "(Component clockMeister, TimeRecord slaveZero) -> None"},
5922 {"GetMovieGWorld", (PyCFunction
)MovieObj_GetMovieGWorld
, 1,
5923 "() -> (CGrafPtr port, GDHandle gdh)"},
5924 {"SetMovieGWorld", (PyCFunction
)MovieObj_SetMovieGWorld
, 1,
5925 "(CGrafPtr port, GDHandle gdh) -> None"},
5926 {"GetMovieNaturalBoundsRect", (PyCFunction
)MovieObj_GetMovieNaturalBoundsRect
, 1,
5927 "() -> (Rect naturalBounds)"},
5928 {"GetNextTrackForCompositing", (PyCFunction
)MovieObj_GetNextTrackForCompositing
, 1,
5929 "(Track theTrack) -> (Track _rv)"},
5930 {"GetPrevTrackForCompositing", (PyCFunction
)MovieObj_GetPrevTrackForCompositing
, 1,
5931 "(Track theTrack) -> (Track _rv)"},
5932 {"GetMoviePict", (PyCFunction
)MovieObj_GetMoviePict
, 1,
5933 "(TimeValue time) -> (PicHandle _rv)"},
5934 {"GetMoviePosterPict", (PyCFunction
)MovieObj_GetMoviePosterPict
, 1,
5935 "() -> (PicHandle _rv)"},
5936 {"UpdateMovie", (PyCFunction
)MovieObj_UpdateMovie
, 1,
5938 {"InvalidateMovieRegion", (PyCFunction
)MovieObj_InvalidateMovieRegion
, 1,
5939 "(RgnHandle invalidRgn) -> None"},
5940 {"GetMovieBox", (PyCFunction
)MovieObj_GetMovieBox
, 1,
5941 "() -> (Rect boxRect)"},
5942 {"SetMovieBox", (PyCFunction
)MovieObj_SetMovieBox
, 1,
5943 "(Rect boxRect) -> None"},
5944 {"GetMovieDisplayClipRgn", (PyCFunction
)MovieObj_GetMovieDisplayClipRgn
, 1,
5945 "() -> (RgnHandle _rv)"},
5946 {"SetMovieDisplayClipRgn", (PyCFunction
)MovieObj_SetMovieDisplayClipRgn
, 1,
5947 "(RgnHandle theClip) -> None"},
5948 {"GetMovieClipRgn", (PyCFunction
)MovieObj_GetMovieClipRgn
, 1,
5949 "() -> (RgnHandle _rv)"},
5950 {"SetMovieClipRgn", (PyCFunction
)MovieObj_SetMovieClipRgn
, 1,
5951 "(RgnHandle theClip) -> None"},
5952 {"GetMovieDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieDisplayBoundsRgn
, 1,
5953 "() -> (RgnHandle _rv)"},
5954 {"GetMovieBoundsRgn", (PyCFunction
)MovieObj_GetMovieBoundsRgn
, 1,
5955 "() -> (RgnHandle _rv)"},
5956 {"PutMovieIntoHandle", (PyCFunction
)MovieObj_PutMovieIntoHandle
, 1,
5957 "(Handle publicMovie) -> None"},
5958 {"PutMovieIntoDataFork", (PyCFunction
)MovieObj_PutMovieIntoDataFork
, 1,
5959 "(short fRefNum, long offset, long maxSize) -> None"},
5960 {"GetMovieCreationTime", (PyCFunction
)MovieObj_GetMovieCreationTime
, 1,
5961 "() -> (unsigned long _rv)"},
5962 {"GetMovieModificationTime", (PyCFunction
)MovieObj_GetMovieModificationTime
, 1,
5963 "() -> (unsigned long _rv)"},
5964 {"GetMovieTimeScale", (PyCFunction
)MovieObj_GetMovieTimeScale
, 1,
5965 "() -> (TimeScale _rv)"},
5966 {"SetMovieTimeScale", (PyCFunction
)MovieObj_SetMovieTimeScale
, 1,
5967 "(TimeScale timeScale) -> None"},
5968 {"GetMovieDuration", (PyCFunction
)MovieObj_GetMovieDuration
, 1,
5969 "() -> (TimeValue _rv)"},
5970 {"GetMovieRate", (PyCFunction
)MovieObj_GetMovieRate
, 1,
5971 "() -> (Fixed _rv)"},
5972 {"SetMovieRate", (PyCFunction
)MovieObj_SetMovieRate
, 1,
5973 "(Fixed rate) -> None"},
5974 {"GetMoviePreferredRate", (PyCFunction
)MovieObj_GetMoviePreferredRate
, 1,
5975 "() -> (Fixed _rv)"},
5976 {"SetMoviePreferredRate", (PyCFunction
)MovieObj_SetMoviePreferredRate
, 1,
5977 "(Fixed rate) -> None"},
5978 {"GetMoviePreferredVolume", (PyCFunction
)MovieObj_GetMoviePreferredVolume
, 1,
5979 "() -> (short _rv)"},
5980 {"SetMoviePreferredVolume", (PyCFunction
)MovieObj_SetMoviePreferredVolume
, 1,
5981 "(short volume) -> None"},
5982 {"GetMovieVolume", (PyCFunction
)MovieObj_GetMovieVolume
, 1,
5983 "() -> (short _rv)"},
5984 {"SetMovieVolume", (PyCFunction
)MovieObj_SetMovieVolume
, 1,
5985 "(short volume) -> None"},
5986 {"GetMoviePreviewTime", (PyCFunction
)MovieObj_GetMoviePreviewTime
, 1,
5987 "() -> (TimeValue previewTime, TimeValue previewDuration)"},
5988 {"SetMoviePreviewTime", (PyCFunction
)MovieObj_SetMoviePreviewTime
, 1,
5989 "(TimeValue previewTime, TimeValue previewDuration) -> None"},
5990 {"GetMoviePosterTime", (PyCFunction
)MovieObj_GetMoviePosterTime
, 1,
5991 "() -> (TimeValue _rv)"},
5992 {"SetMoviePosterTime", (PyCFunction
)MovieObj_SetMoviePosterTime
, 1,
5993 "(TimeValue posterTime) -> None"},
5994 {"GetMovieSelection", (PyCFunction
)MovieObj_GetMovieSelection
, 1,
5995 "() -> (TimeValue selectionTime, TimeValue selectionDuration)"},
5996 {"SetMovieSelection", (PyCFunction
)MovieObj_SetMovieSelection
, 1,
5997 "(TimeValue selectionTime, TimeValue selectionDuration) -> None"},
5998 {"SetMovieActiveSegment", (PyCFunction
)MovieObj_SetMovieActiveSegment
, 1,
5999 "(TimeValue startTime, TimeValue duration) -> None"},
6000 {"GetMovieActiveSegment", (PyCFunction
)MovieObj_GetMovieActiveSegment
, 1,
6001 "() -> (TimeValue startTime, TimeValue duration)"},
6002 {"GetMovieTime", (PyCFunction
)MovieObj_GetMovieTime
, 1,
6003 "() -> (TimeValue _rv, TimeRecord currentTime)"},
6004 {"SetMovieTime", (PyCFunction
)MovieObj_SetMovieTime
, 1,
6005 "(TimeRecord newtime) -> None"},
6006 {"SetMovieTimeValue", (PyCFunction
)MovieObj_SetMovieTimeValue
, 1,
6007 "(TimeValue newtime) -> None"},
6008 {"GetMovieUserData", (PyCFunction
)MovieObj_GetMovieUserData
, 1,
6009 "() -> (UserData _rv)"},
6010 {"GetMovieTrackCount", (PyCFunction
)MovieObj_GetMovieTrackCount
, 1,
6011 "() -> (long _rv)"},
6012 {"GetMovieTrack", (PyCFunction
)MovieObj_GetMovieTrack
, 1,
6013 "(long trackID) -> (Track _rv)"},
6014 {"GetMovieIndTrack", (PyCFunction
)MovieObj_GetMovieIndTrack
, 1,
6015 "(long index) -> (Track _rv)"},
6016 {"GetMovieIndTrackType", (PyCFunction
)MovieObj_GetMovieIndTrackType
, 1,
6017 "(long index, OSType trackType, long flags) -> (Track _rv)"},
6018 {"NewMovieTrack", (PyCFunction
)MovieObj_NewMovieTrack
, 1,
6019 "(Fixed width, Fixed height, short trackVolume) -> (Track _rv)"},
6020 {"SetAutoTrackAlternatesEnabled", (PyCFunction
)MovieObj_SetAutoTrackAlternatesEnabled
, 1,
6021 "(Boolean enable) -> None"},
6022 {"SelectMovieAlternates", (PyCFunction
)MovieObj_SelectMovieAlternates
, 1,
6024 {"InsertMovieSegment", (PyCFunction
)MovieObj_InsertMovieSegment
, 1,
6025 "(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
6026 {"InsertEmptyMovieSegment", (PyCFunction
)MovieObj_InsertEmptyMovieSegment
, 1,
6027 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
6028 {"DeleteMovieSegment", (PyCFunction
)MovieObj_DeleteMovieSegment
, 1,
6029 "(TimeValue startTime, TimeValue duration) -> None"},
6030 {"ScaleMovieSegment", (PyCFunction
)MovieObj_ScaleMovieSegment
, 1,
6031 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
6032 {"CutMovieSelection", (PyCFunction
)MovieObj_CutMovieSelection
, 1,
6033 "() -> (Movie _rv)"},
6034 {"CopyMovieSelection", (PyCFunction
)MovieObj_CopyMovieSelection
, 1,
6035 "() -> (Movie _rv)"},
6036 {"PasteMovieSelection", (PyCFunction
)MovieObj_PasteMovieSelection
, 1,
6037 "(Movie src) -> None"},
6038 {"AddMovieSelection", (PyCFunction
)MovieObj_AddMovieSelection
, 1,
6039 "(Movie src) -> None"},
6040 {"ClearMovieSelection", (PyCFunction
)MovieObj_ClearMovieSelection
, 1,
6042 {"PutMovieIntoTypedHandle", (PyCFunction
)MovieObj_PutMovieIntoTypedHandle
, 1,
6043 "(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None"},
6044 {"CopyMovieSettings", (PyCFunction
)MovieObj_CopyMovieSettings
, 1,
6045 "(Movie dstMovie) -> None"},
6046 {"ConvertMovieToFile", (PyCFunction
)MovieObj_ConvertMovieToFile
, 1,
6047 "(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)"},
6048 {"GetMovieDataSize", (PyCFunction
)MovieObj_GetMovieDataSize
, 1,
6049 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
6050 {"PtInMovie", (PyCFunction
)MovieObj_PtInMovie
, 1,
6051 "(Point pt) -> (Boolean _rv)"},
6052 {"SetMovieLanguage", (PyCFunction
)MovieObj_SetMovieLanguage
, 1,
6053 "(long language) -> None"},
6054 {"GetMovieNextInterestingTime", (PyCFunction
)MovieObj_GetMovieNextInterestingTime
, 1,
6055 "(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
6056 {"AddMovieResource", (PyCFunction
)MovieObj_AddMovieResource
, 1,
6057 "(short resRefNum, Str255 resName) -> (short resId)"},
6058 {"UpdateMovieResource", (PyCFunction
)MovieObj_UpdateMovieResource
, 1,
6059 "(short resRefNum, short resId, Str255 resName) -> None"},
6060 {"HasMovieChanged", (PyCFunction
)MovieObj_HasMovieChanged
, 1,
6061 "() -> (Boolean _rv)"},
6062 {"ClearMovieChanged", (PyCFunction
)MovieObj_ClearMovieChanged
, 1,
6064 {"SetMovieDefaultDataRef", (PyCFunction
)MovieObj_SetMovieDefaultDataRef
, 1,
6065 "(Handle dataRef, OSType dataRefType) -> None"},
6066 {"GetMovieDefaultDataRef", (PyCFunction
)MovieObj_GetMovieDefaultDataRef
, 1,
6067 "() -> (Handle dataRef, OSType dataRefType)"},
6068 {"SetMovieColorTable", (PyCFunction
)MovieObj_SetMovieColorTable
, 1,
6069 "(CTabHandle ctab) -> None"},
6070 {"GetMovieColorTable", (PyCFunction
)MovieObj_GetMovieColorTable
, 1,
6071 "() -> (CTabHandle ctab)"},
6072 {"FlattenMovie", (PyCFunction
)MovieObj_FlattenMovie
, 1,
6073 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)"},
6074 {"FlattenMovieData", (PyCFunction
)MovieObj_FlattenMovieData
, 1,
6075 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)"},
6076 {"MovieSearchText", (PyCFunction
)MovieObj_MovieSearchText
, 1,
6077 "(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)"},
6078 {"GetPosterBox", (PyCFunction
)MovieObj_GetPosterBox
, 1,
6079 "() -> (Rect boxRect)"},
6080 {"SetPosterBox", (PyCFunction
)MovieObj_SetPosterBox
, 1,
6081 "(Rect boxRect) -> None"},
6082 {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieSegmentDisplayBoundsRgn
, 1,
6083 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
6084 {"GetMovieStatus", (PyCFunction
)MovieObj_GetMovieStatus
, 1,
6085 "() -> (ComponentResult _rv, Track firstProblemTrack)"},
6086 {"NewMovieController", (PyCFunction
)MovieObj_NewMovieController
, 1,
6087 "(Rect movieRect, long someFlags) -> (MovieController _rv)"},
6088 {"PutMovieOnScrap", (PyCFunction
)MovieObj_PutMovieOnScrap
, 1,
6089 "(long movieScrapFlags) -> None"},
6090 {"SetMoviePlayHints", (PyCFunction
)MovieObj_SetMoviePlayHints
, 1,
6091 "(long flags, long flagsMask) -> None"},
6092 {"GetMaxLoadedTimeInMovie", (PyCFunction
)MovieObj_GetMaxLoadedTimeInMovie
, 1,
6093 "() -> (TimeValue time)"},
6094 {"QTMovieNeedsTimeTable", (PyCFunction
)MovieObj_QTMovieNeedsTimeTable
, 1,
6095 "() -> (Boolean needsTimeTable)"},
6096 {"QTGetDataRefMaxFileOffset", (PyCFunction
)MovieObj_QTGetDataRefMaxFileOffset
, 1,
6097 "(OSType dataRefType, Handle dataRef) -> (long offset)"},
6101 PyMethodChain MovieObj_chain
= { MovieObj_methods
, NULL
};
6103 static PyObject
*MovieObj_getattr(self
, name
)
6107 return Py_FindMethodInChain(&MovieObj_chain
, (PyObject
*)self
, name
);
6110 #define MovieObj_setattr NULL
6112 PyTypeObject Movie_Type
= {
6113 PyObject_HEAD_INIT(&PyType_Type
)
6115 "Movie", /*tp_name*/
6116 sizeof(MovieObject
), /*tp_basicsize*/
6119 (destructor
) MovieObj_dealloc
, /*tp_dealloc*/
6121 (getattrfunc
) MovieObj_getattr
, /*tp_getattr*/
6122 (setattrfunc
) MovieObj_setattr
, /*tp_setattr*/
6125 /* --------------------- End object type Movie ---------------------- */
6128 static PyObject
*Qt_EnterMovies(_self
, _args
)
6132 PyObject
*_res
= NULL
;
6134 if (!PyArg_ParseTuple(_args
, ""))
6136 _err
= EnterMovies();
6137 if (_err
!= noErr
) return PyMac_Error(_err
);
6143 static PyObject
*Qt_ExitMovies(_self
, _args
)
6147 PyObject
*_res
= NULL
;
6148 if (!PyArg_ParseTuple(_args
, ""))
6156 static PyObject
*Qt_GetMoviesError(_self
, _args
)
6160 PyObject
*_res
= NULL
;
6162 if (!PyArg_ParseTuple(_args
, ""))
6164 _err
= GetMoviesError();
6165 if (_err
!= noErr
) return PyMac_Error(_err
);
6171 static PyObject
*Qt_ClearMoviesStickyError(_self
, _args
)
6175 PyObject
*_res
= NULL
;
6176 if (!PyArg_ParseTuple(_args
, ""))
6178 ClearMoviesStickyError();
6184 static PyObject
*Qt_GetMoviesStickyError(_self
, _args
)
6188 PyObject
*_res
= NULL
;
6190 if (!PyArg_ParseTuple(_args
, ""))
6192 _err
= GetMoviesStickyError();
6193 if (_err
!= noErr
) return PyMac_Error(_err
);
6199 static PyObject
*Qt_DisposeMatte(_self
, _args
)
6203 PyObject
*_res
= NULL
;
6204 PixMapHandle theMatte
;
6205 if (!PyArg_ParseTuple(_args
, "O&",
6206 ResObj_Convert
, &theMatte
))
6208 DisposeMatte(theMatte
);
6214 static PyObject
*Qt_NewMovie(_self
, _args
)
6218 PyObject
*_res
= NULL
;
6221 if (!PyArg_ParseTuple(_args
, "l",
6224 _rv
= NewMovie(flags
);
6225 _res
= Py_BuildValue("O&",
6230 static PyObject
*Qt_GetDataHandler(_self
, _args
)
6234 PyObject
*_res
= NULL
;
6237 OSType dataHandlerSubType
;
6239 if (!PyArg_ParseTuple(_args
, "O&O&l",
6240 ResObj_Convert
, &dataRef
,
6241 PyMac_GetOSType
, &dataHandlerSubType
,
6244 _rv
= GetDataHandler(dataRef
,
6247 _res
= Py_BuildValue("O&",
6252 static PyObject
*Qt_PasteHandleIntoMovie(_self
, _args
)
6256 PyObject
*_res
= NULL
;
6262 ComponentInstance userComp
;
6263 if (!PyArg_ParseTuple(_args
, "O&O&O&lO&",
6265 PyMac_GetOSType
, &handleType
,
6266 MovieObj_Convert
, &theMovie
,
6268 CmpInstObj_Convert
, &userComp
))
6270 _err
= PasteHandleIntoMovie(h
,
6275 if (_err
!= noErr
) return PyMac_Error(_err
);
6281 static PyObject
*Qt_GetMovieImporterForDataRef(_self
, _args
)
6285 PyObject
*_res
= NULL
;
6291 if (!PyArg_ParseTuple(_args
, "O&O&l",
6292 PyMac_GetOSType
, &dataRefType
,
6293 ResObj_Convert
, &dataRef
,
6296 _err
= GetMovieImporterForDataRef(dataRefType
,
6300 if (_err
!= noErr
) return PyMac_Error(_err
);
6301 _res
= Py_BuildValue("O&",
6302 CmpObj_New
, importer
);
6306 static PyObject
*Qt_TrackTimeToMediaTime(_self
, _args
)
6310 PyObject
*_res
= NULL
;
6314 if (!PyArg_ParseTuple(_args
, "lO&",
6316 TrackObj_Convert
, &theTrack
))
6318 _rv
= TrackTimeToMediaTime(value
,
6320 _res
= Py_BuildValue("l",
6325 static PyObject
*Qt_NewUserData(_self
, _args
)
6329 PyObject
*_res
= NULL
;
6331 UserData theUserData
;
6332 if (!PyArg_ParseTuple(_args
, ""))
6334 _err
= NewUserData(&theUserData
);
6335 if (_err
!= noErr
) return PyMac_Error(_err
);
6336 _res
= Py_BuildValue("O&",
6337 UserDataObj_New
, theUserData
);
6341 static PyObject
*Qt_NewUserDataFromHandle(_self
, _args
)
6345 PyObject
*_res
= NULL
;
6348 UserData theUserData
;
6349 if (!PyArg_ParseTuple(_args
, "O&",
6350 ResObj_Convert
, &h
))
6352 _err
= NewUserDataFromHandle(h
,
6354 if (_err
!= noErr
) return PyMac_Error(_err
);
6355 _res
= Py_BuildValue("O&",
6356 UserDataObj_New
, theUserData
);
6360 static PyObject
*Qt_CreateMovieFile(_self
, _args
)
6364 PyObject
*_res
= NULL
;
6368 ScriptCode scriptTag
;
6369 long createMovieFileFlags
;
6372 if (!PyArg_ParseTuple(_args
, "O&O&hl",
6373 PyMac_GetFSSpec
, &fileSpec
,
6374 PyMac_GetOSType
, &creator
,
6376 &createMovieFileFlags
))
6378 _err
= CreateMovieFile(&fileSpec
,
6381 createMovieFileFlags
,
6384 if (_err
!= noErr
) return PyMac_Error(_err
);
6385 _res
= Py_BuildValue("hO&",
6387 MovieObj_New
, newmovie
);
6391 static PyObject
*Qt_OpenMovieFile(_self
, _args
)
6395 PyObject
*_res
= NULL
;
6400 if (!PyArg_ParseTuple(_args
, "O&b",
6401 PyMac_GetFSSpec
, &fileSpec
,
6404 _err
= OpenMovieFile(&fileSpec
,
6407 if (_err
!= noErr
) return PyMac_Error(_err
);
6408 _res
= Py_BuildValue("h",
6413 static PyObject
*Qt_CloseMovieFile(_self
, _args
)
6417 PyObject
*_res
= NULL
;
6420 if (!PyArg_ParseTuple(_args
, "h",
6423 _err
= CloseMovieFile(resRefNum
);
6424 if (_err
!= noErr
) return PyMac_Error(_err
);
6430 static PyObject
*Qt_DeleteMovieFile(_self
, _args
)
6434 PyObject
*_res
= NULL
;
6437 if (!PyArg_ParseTuple(_args
, "O&",
6438 PyMac_GetFSSpec
, &fileSpec
))
6440 _err
= DeleteMovieFile(&fileSpec
);
6441 if (_err
!= noErr
) return PyMac_Error(_err
);
6447 static PyObject
*Qt_NewMovieFromFile(_self
, _args
)
6451 PyObject
*_res
= NULL
;
6456 short newMovieFlags
;
6457 Boolean dataRefWasChanged
;
6458 if (!PyArg_ParseTuple(_args
, "hhh",
6463 _err
= NewMovieFromFile(&theMovie
,
6468 &dataRefWasChanged
);
6469 if (_err
!= noErr
) return PyMac_Error(_err
);
6470 _res
= Py_BuildValue("O&hb",
6471 MovieObj_New
, theMovie
,
6477 static PyObject
*Qt_NewMovieFromHandle(_self
, _args
)
6481 PyObject
*_res
= NULL
;
6485 short newMovieFlags
;
6486 Boolean dataRefWasChanged
;
6487 if (!PyArg_ParseTuple(_args
, "O&h",
6491 _err
= NewMovieFromHandle(&theMovie
,
6494 &dataRefWasChanged
);
6495 if (_err
!= noErr
) return PyMac_Error(_err
);
6496 _res
= Py_BuildValue("O&b",
6497 MovieObj_New
, theMovie
,
6502 static PyObject
*Qt_NewMovieFromDataFork(_self
, _args
)
6506 PyObject
*_res
= NULL
;
6511 short newMovieFlags
;
6512 Boolean dataRefWasChanged
;
6513 if (!PyArg_ParseTuple(_args
, "hlh",
6518 _err
= NewMovieFromDataFork(&theMovie
,
6522 &dataRefWasChanged
);
6523 if (_err
!= noErr
) return PyMac_Error(_err
);
6524 _res
= Py_BuildValue("O&b",
6525 MovieObj_New
, theMovie
,
6530 static PyObject
*Qt_NewMovieFromDataRef(_self
, _args
)
6534 PyObject
*_res
= NULL
;
6541 if (!PyArg_ParseTuple(_args
, "hO&O&",
6543 ResObj_Convert
, &dataRef
,
6544 PyMac_GetOSType
, &dataRefType
))
6546 _err
= NewMovieFromDataRef(&m
,
6551 if (_err
!= noErr
) return PyMac_Error(_err
);
6552 _res
= Py_BuildValue("O&h",
6558 static PyObject
*Qt_RemoveMovieResource(_self
, _args
)
6562 PyObject
*_res
= NULL
;
6566 if (!PyArg_ParseTuple(_args
, "hh",
6570 _err
= RemoveMovieResource(resRefNum
,
6572 if (_err
!= noErr
) return PyMac_Error(_err
);
6578 static PyObject
*Qt_NewMovieFromScrap(_self
, _args
)
6582 PyObject
*_res
= NULL
;
6585 if (!PyArg_ParseTuple(_args
, "l",
6588 _rv
= NewMovieFromScrap(newMovieFlags
);
6589 _res
= Py_BuildValue("O&",
6594 static PyObject
*Qt_QTNewAlias(_self
, _args
)
6598 PyObject
*_res
= NULL
;
6603 if (!PyArg_ParseTuple(_args
, "O&b",
6604 PyMac_GetFSSpec
, &fss
,
6607 _err
= QTNewAlias(&fss
,
6610 if (_err
!= noErr
) return PyMac_Error(_err
);
6611 _res
= Py_BuildValue("O&",
6616 static PyObject
*Qt_EndFullScreen(_self
, _args
)
6620 PyObject
*_res
= NULL
;
6624 if (!PyArg_ParseTuple(_args
, "sl",
6628 _err
= EndFullScreen(fullState
,
6630 if (_err
!= noErr
) return PyMac_Error(_err
);
6636 static PyObject
*Qt_AddSoundDescriptionExtension(_self
, _args
)
6640 PyObject
*_res
= NULL
;
6642 SoundDescriptionHandle desc
;
6645 if (!PyArg_ParseTuple(_args
, "O&O&O&",
6646 ResObj_Convert
, &desc
,
6647 ResObj_Convert
, &extension
,
6648 PyMac_GetOSType
, &idType
))
6650 _err
= AddSoundDescriptionExtension(desc
,
6653 if (_err
!= noErr
) return PyMac_Error(_err
);
6659 static PyObject
*Qt_GetSoundDescriptionExtension(_self
, _args
)
6663 PyObject
*_res
= NULL
;
6665 SoundDescriptionHandle desc
;
6668 if (!PyArg_ParseTuple(_args
, "O&O&",
6669 ResObj_Convert
, &desc
,
6670 PyMac_GetOSType
, &idType
))
6672 _err
= GetSoundDescriptionExtension(desc
,
6675 if (_err
!= noErr
) return PyMac_Error(_err
);
6676 _res
= Py_BuildValue("O&",
6677 ResObj_New
, extension
);
6681 static PyObject
*Qt_RemoveSoundDescriptionExtension(_self
, _args
)
6685 PyObject
*_res
= NULL
;
6687 SoundDescriptionHandle desc
;
6689 if (!PyArg_ParseTuple(_args
, "O&O&",
6690 ResObj_Convert
, &desc
,
6691 PyMac_GetOSType
, &idType
))
6693 _err
= RemoveSoundDescriptionExtension(desc
,
6695 if (_err
!= noErr
) return PyMac_Error(_err
);
6701 static PyObject
*Qt_QTIsStandardParameterDialogEvent(_self
, _args
)
6705 PyObject
*_res
= NULL
;
6708 QTParameterDialog createdDialog
;
6709 if (!PyArg_ParseTuple(_args
, "l",
6712 _err
= QTIsStandardParameterDialogEvent(&pEvent
,
6714 if (_err
!= noErr
) return PyMac_Error(_err
);
6715 _res
= Py_BuildValue("O&",
6716 PyMac_BuildEventRecord
, &pEvent
);
6720 static PyObject
*Qt_QTDismissStandardParameterDialog(_self
, _args
)
6724 PyObject
*_res
= NULL
;
6726 QTParameterDialog createdDialog
;
6727 if (!PyArg_ParseTuple(_args
, "l",
6730 _err
= QTDismissStandardParameterDialog(createdDialog
);
6731 if (_err
!= noErr
) return PyMac_Error(_err
);
6737 static PyObject
*Qt_QTStandardParameterDialogDoAction(_self
, _args
)
6741 PyObject
*_res
= NULL
;
6743 QTParameterDialog createdDialog
;
6746 if (!PyArg_ParseTuple(_args
, "lls",
6751 _err
= QTStandardParameterDialogDoAction(createdDialog
,
6754 if (_err
!= noErr
) return PyMac_Error(_err
);
6760 static PyObject
*Qt_QTRegisterAccessKey(_self
, _args
)
6764 PyObject
*_res
= NULL
;
6766 Str255 accessKeyType
;
6769 if (!PyArg_ParseTuple(_args
, "O&lO&",
6770 PyMac_GetStr255
, accessKeyType
,
6772 ResObj_Convert
, &accessKey
))
6774 _err
= QTRegisterAccessKey(accessKeyType
,
6777 if (_err
!= noErr
) return PyMac_Error(_err
);
6783 static PyObject
*Qt_QTUnregisterAccessKey(_self
, _args
)
6787 PyObject
*_res
= NULL
;
6789 Str255 accessKeyType
;
6792 if (!PyArg_ParseTuple(_args
, "O&lO&",
6793 PyMac_GetStr255
, accessKeyType
,
6795 ResObj_Convert
, &accessKey
))
6797 _err
= QTUnregisterAccessKey(accessKeyType
,
6800 if (_err
!= noErr
) return PyMac_Error(_err
);
6806 static PyObject
*Qt_QTTextToNativeText(_self
, _args
)
6810 PyObject
*_res
= NULL
;
6815 if (!PyArg_ParseTuple(_args
, "O&ll",
6816 ResObj_Convert
, &theText
,
6820 _err
= QTTextToNativeText(theText
,
6823 if (_err
!= noErr
) return PyMac_Error(_err
);
6829 static PyObject
*Qt_VideoMediaResetStatistics(_self
, _args
)
6833 PyObject
*_res
= NULL
;
6834 ComponentResult _rv
;
6836 if (!PyArg_ParseTuple(_args
, "O&",
6837 CmpInstObj_Convert
, &mh
))
6839 _rv
= VideoMediaResetStatistics(mh
);
6840 _res
= Py_BuildValue("l",
6845 static PyObject
*Qt_VideoMediaGetStatistics(_self
, _args
)
6849 PyObject
*_res
= NULL
;
6850 ComponentResult _rv
;
6852 if (!PyArg_ParseTuple(_args
, "O&",
6853 CmpInstObj_Convert
, &mh
))
6855 _rv
= VideoMediaGetStatistics(mh
);
6856 _res
= Py_BuildValue("l",
6861 static PyObject
*Qt_TextMediaAddTextSample(_self
, _args
)
6865 PyObject
*_res
= NULL
;
6866 ComponentResult _rv
;
6875 short textJustification
;
6878 TimeValue scrollDelay
;
6881 RGBColor rgbHiliteColor
;
6883 TimeValue sampleTime
;
6884 if (!PyArg_ParseTuple(_args
, "O&slhhbhllhhl",
6885 CmpInstObj_Convert
, &mh
,
6898 _rv
= TextMediaAddTextSample(mh
,
6915 _res
= Py_BuildValue("lO&O&O&O&l",
6917 QdRGB_New
, &textColor
,
6918 QdRGB_New
, &backColor
,
6919 PyMac_BuildRect
, &textBox
,
6920 QdRGB_New
, &rgbHiliteColor
,
6925 static PyObject
*Qt_TextMediaAddTESample(_self
, _args
)
6929 PyObject
*_res
= NULL
;
6930 ComponentResult _rv
;
6934 short textJustification
;
6937 TimeValue scrollDelay
;
6940 RGBColor rgbHiliteColor
;
6942 TimeValue sampleTime
;
6943 if (!PyArg_ParseTuple(_args
, "O&O&hllhhl",
6944 CmpInstObj_Convert
, &mh
,
6945 ResObj_Convert
, &hTE
,
6953 _rv
= TextMediaAddTESample(mh
,
6965 _res
= Py_BuildValue("lO&O&O&l",
6967 QdRGB_New
, &backColor
,
6968 PyMac_BuildRect
, &textBox
,
6969 QdRGB_New
, &rgbHiliteColor
,
6974 static PyObject
*Qt_TextMediaAddHiliteSample(_self
, _args
)
6978 PyObject
*_res
= NULL
;
6979 ComponentResult _rv
;
6983 RGBColor rgbHiliteColor
;
6985 TimeValue sampleTime
;
6986 if (!PyArg_ParseTuple(_args
, "O&hhl",
6987 CmpInstObj_Convert
, &mh
,
6992 _rv
= TextMediaAddHiliteSample(mh
,
6998 _res
= Py_BuildValue("lO&l",
7000 QdRGB_New
, &rgbHiliteColor
,
7005 static PyObject
*Qt_TextMediaFindNextText(_self
, _args
)
7009 PyObject
*_res
= NULL
;
7010 ComponentResult _rv
;
7015 TimeValue startTime
;
7016 TimeValue foundTime
;
7017 TimeValue foundDuration
;
7019 if (!PyArg_ParseTuple(_args
, "O&slhl",
7020 CmpInstObj_Convert
, &mh
,
7026 _rv
= TextMediaFindNextText(mh
,
7034 _res
= Py_BuildValue("llll",
7042 static PyObject
*Qt_TextMediaHiliteTextSample(_self
, _args
)
7046 PyObject
*_res
= NULL
;
7047 ComponentResult _rv
;
7049 TimeValue sampleTime
;
7052 RGBColor rgbHiliteColor
;
7053 if (!PyArg_ParseTuple(_args
, "O&lhh",
7054 CmpInstObj_Convert
, &mh
,
7059 _rv
= TextMediaHiliteTextSample(mh
,
7064 _res
= Py_BuildValue("lO&",
7066 QdRGB_New
, &rgbHiliteColor
);
7070 static PyObject
*Qt_TextMediaSetTextSampleData(_self
, _args
)
7074 PyObject
*_res
= NULL
;
7075 ComponentResult _rv
;
7079 if (!PyArg_ParseTuple(_args
, "O&sO&",
7080 CmpInstObj_Convert
, &mh
,
7082 PyMac_GetOSType
, &dataType
))
7084 _rv
= TextMediaSetTextSampleData(mh
,
7087 _res
= Py_BuildValue("l",
7092 static PyObject
*Qt_SpriteMediaSetProperty(_self
, _args
)
7096 PyObject
*_res
= NULL
;
7097 ComponentResult _rv
;
7101 void * propertyValue
;
7102 if (!PyArg_ParseTuple(_args
, "O&hls",
7103 CmpInstObj_Convert
, &mh
,
7108 _rv
= SpriteMediaSetProperty(mh
,
7112 _res
= Py_BuildValue("l",
7117 static PyObject
*Qt_SpriteMediaGetProperty(_self
, _args
)
7121 PyObject
*_res
= NULL
;
7122 ComponentResult _rv
;
7126 void * propertyValue
;
7127 if (!PyArg_ParseTuple(_args
, "O&hls",
7128 CmpInstObj_Convert
, &mh
,
7133 _rv
= SpriteMediaGetProperty(mh
,
7137 _res
= Py_BuildValue("l",
7142 static PyObject
*Qt_SpriteMediaHitTestSprites(_self
, _args
)
7146 PyObject
*_res
= NULL
;
7147 ComponentResult _rv
;
7151 short spriteHitIndex
;
7152 if (!PyArg_ParseTuple(_args
, "O&lO&",
7153 CmpInstObj_Convert
, &mh
,
7155 PyMac_GetPoint
, &loc
))
7157 _rv
= SpriteMediaHitTestSprites(mh
,
7161 _res
= Py_BuildValue("lh",
7167 static PyObject
*Qt_SpriteMediaCountSprites(_self
, _args
)
7171 PyObject
*_res
= NULL
;
7172 ComponentResult _rv
;
7175 if (!PyArg_ParseTuple(_args
, "O&",
7176 CmpInstObj_Convert
, &mh
))
7178 _rv
= SpriteMediaCountSprites(mh
,
7180 _res
= Py_BuildValue("lh",
7186 static PyObject
*Qt_SpriteMediaCountImages(_self
, _args
)
7190 PyObject
*_res
= NULL
;
7191 ComponentResult _rv
;
7194 if (!PyArg_ParseTuple(_args
, "O&",
7195 CmpInstObj_Convert
, &mh
))
7197 _rv
= SpriteMediaCountImages(mh
,
7199 _res
= Py_BuildValue("lh",
7205 static PyObject
*Qt_SpriteMediaGetIndImageDescription(_self
, _args
)
7209 PyObject
*_res
= NULL
;
7210 ComponentResult _rv
;
7213 ImageDescriptionHandle imageDescription
;
7214 if (!PyArg_ParseTuple(_args
, "O&hO&",
7215 CmpInstObj_Convert
, &mh
,
7217 ResObj_Convert
, &imageDescription
))
7219 _rv
= SpriteMediaGetIndImageDescription(mh
,
7222 _res
= Py_BuildValue("l",
7227 static PyObject
*Qt_SpriteMediaGetDisplayedSampleNumber(_self
, _args
)
7231 PyObject
*_res
= NULL
;
7232 ComponentResult _rv
;
7235 if (!PyArg_ParseTuple(_args
, "O&",
7236 CmpInstObj_Convert
, &mh
))
7238 _rv
= SpriteMediaGetDisplayedSampleNumber(mh
,
7240 _res
= Py_BuildValue("ll",
7246 static PyObject
*Qt_SpriteMediaGetSpriteName(_self
, _args
)
7250 PyObject
*_res
= NULL
;
7251 ComponentResult _rv
;
7255 if (!PyArg_ParseTuple(_args
, "O&lO&",
7256 CmpInstObj_Convert
, &mh
,
7258 PyMac_GetStr255
, spriteName
))
7260 _rv
= SpriteMediaGetSpriteName(mh
,
7263 _res
= Py_BuildValue("l",
7268 static PyObject
*Qt_SpriteMediaGetImageName(_self
, _args
)
7272 PyObject
*_res
= NULL
;
7273 ComponentResult _rv
;
7277 if (!PyArg_ParseTuple(_args
, "O&hO&",
7278 CmpInstObj_Convert
, &mh
,
7280 PyMac_GetStr255
, imageName
))
7282 _rv
= SpriteMediaGetImageName(mh
,
7285 _res
= Py_BuildValue("l",
7290 static PyObject
*Qt_SpriteMediaSetSpriteProperty(_self
, _args
)
7294 PyObject
*_res
= NULL
;
7295 ComponentResult _rv
;
7299 void * propertyValue
;
7300 if (!PyArg_ParseTuple(_args
, "O&lls",
7301 CmpInstObj_Convert
, &mh
,
7306 _rv
= SpriteMediaSetSpriteProperty(mh
,
7310 _res
= Py_BuildValue("l",
7315 static PyObject
*Qt_SpriteMediaGetSpriteProperty(_self
, _args
)
7319 PyObject
*_res
= NULL
;
7320 ComponentResult _rv
;
7324 void * propertyValue
;
7325 if (!PyArg_ParseTuple(_args
, "O&lls",
7326 CmpInstObj_Convert
, &mh
,
7331 _rv
= SpriteMediaGetSpriteProperty(mh
,
7335 _res
= Py_BuildValue("l",
7340 static PyObject
*Qt_SpriteMediaHitTestAllSprites(_self
, _args
)
7344 PyObject
*_res
= NULL
;
7345 ComponentResult _rv
;
7349 QTAtomID spriteHitID
;
7350 if (!PyArg_ParseTuple(_args
, "O&lO&",
7351 CmpInstObj_Convert
, &mh
,
7353 PyMac_GetPoint
, &loc
))
7355 _rv
= SpriteMediaHitTestAllSprites(mh
,
7359 _res
= Py_BuildValue("ll",
7365 static PyObject
*Qt_SpriteMediaHitTestOneSprite(_self
, _args
)
7369 PyObject
*_res
= NULL
;
7370 ComponentResult _rv
;
7376 if (!PyArg_ParseTuple(_args
, "O&llO&",
7377 CmpInstObj_Convert
, &mh
,
7380 PyMac_GetPoint
, &loc
))
7382 _rv
= SpriteMediaHitTestOneSprite(mh
,
7387 _res
= Py_BuildValue("lb",
7393 static PyObject
*Qt_SpriteMediaSpriteIndexToID(_self
, _args
)
7397 PyObject
*_res
= NULL
;
7398 ComponentResult _rv
;
7402 if (!PyArg_ParseTuple(_args
, "O&h",
7403 CmpInstObj_Convert
, &mh
,
7406 _rv
= SpriteMediaSpriteIndexToID(mh
,
7409 _res
= Py_BuildValue("ll",
7415 static PyObject
*Qt_SpriteMediaSpriteIDToIndex(_self
, _args
)
7419 PyObject
*_res
= NULL
;
7420 ComponentResult _rv
;
7424 if (!PyArg_ParseTuple(_args
, "O&l",
7425 CmpInstObj_Convert
, &mh
,
7428 _rv
= SpriteMediaSpriteIDToIndex(mh
,
7431 _res
= Py_BuildValue("lh",
7437 static PyObject
*Qt_SpriteMediaSetActionVariable(_self
, _args
)
7441 PyObject
*_res
= NULL
;
7442 ComponentResult _rv
;
7444 QTAtomID variableID
;
7446 if (!PyArg_ParseTuple(_args
, "O&lf",
7447 CmpInstObj_Convert
, &mh
,
7451 _rv
= SpriteMediaSetActionVariable(mh
,
7454 _res
= Py_BuildValue("l",
7459 static PyObject
*Qt_SpriteMediaGetActionVariable(_self
, _args
)
7463 PyObject
*_res
= NULL
;
7464 ComponentResult _rv
;
7466 QTAtomID variableID
;
7468 if (!PyArg_ParseTuple(_args
, "O&l",
7469 CmpInstObj_Convert
, &mh
,
7472 _rv
= SpriteMediaGetActionVariable(mh
,
7475 _res
= Py_BuildValue("lf",
7481 static PyObject
*Qt_SpriteMediaGetIndImageProperty(_self
, _args
)
7485 PyObject
*_res
= NULL
;
7486 ComponentResult _rv
;
7489 long imagePropertyType
;
7490 void * imagePropertyValue
;
7491 if (!PyArg_ParseTuple(_args
, "O&hls",
7492 CmpInstObj_Convert
, &mh
,
7495 &imagePropertyValue
))
7497 _rv
= SpriteMediaGetIndImageProperty(mh
,
7500 imagePropertyValue
);
7501 _res
= Py_BuildValue("l",
7506 static PyObject
*Qt_NewTimeBase(_self
, _args
)
7510 PyObject
*_res
= NULL
;
7512 if (!PyArg_ParseTuple(_args
, ""))
7514 _rv
= NewTimeBase();
7515 _res
= Py_BuildValue("O&",
7516 TimeBaseObj_New
, _rv
);
7520 static PyObject
*Qt_ConvertTime(_self
, _args
)
7524 PyObject
*_res
= NULL
;
7527 if (!PyArg_ParseTuple(_args
, "O&",
7528 TimeBaseObj_Convert
, &newBase
))
7532 _res
= Py_BuildValue("O&",
7533 QtTimeRecord_New
, &inout
);
7537 static PyObject
*Qt_ConvertTimeScale(_self
, _args
)
7541 PyObject
*_res
= NULL
;
7544 if (!PyArg_ParseTuple(_args
, "l",
7547 ConvertTimeScale(&inout
,
7549 _res
= Py_BuildValue("O&",
7550 QtTimeRecord_New
, &inout
);
7554 static PyObject
*Qt_AddTime(_self
, _args
)
7558 PyObject
*_res
= NULL
;
7561 if (!PyArg_ParseTuple(_args
, "O&",
7562 QtTimeRecord_Convert
, &src
))
7566 _res
= Py_BuildValue("O&",
7567 QtTimeRecord_New
, &dst
);
7571 static PyObject
*Qt_SubtractTime(_self
, _args
)
7575 PyObject
*_res
= NULL
;
7578 if (!PyArg_ParseTuple(_args
, "O&",
7579 QtTimeRecord_Convert
, &src
))
7583 _res
= Py_BuildValue("O&",
7584 QtTimeRecord_New
, &dst
);
7588 static PyObject
*Qt_MusicMediaGetIndexedTunePlayer(_self
, _args
)
7592 PyObject
*_res
= NULL
;
7593 ComponentResult _rv
;
7594 ComponentInstance ti
;
7595 long sampleDescIndex
;
7596 ComponentInstance tp
;
7597 if (!PyArg_ParseTuple(_args
, "O&l",
7598 CmpInstObj_Convert
, &ti
,
7601 _rv
= MusicMediaGetIndexedTunePlayer(ti
,
7604 _res
= Py_BuildValue("lO&",
7606 CmpInstObj_New
, tp
);
7610 static PyObject
*Qt_AlignWindow(_self
, _args
)
7614 PyObject
*_res
= NULL
;
7617 if (!PyArg_ParseTuple(_args
, "O&b",
7618 WinObj_Convert
, &wp
,
7624 (ICMAlignmentProcRecordPtr
)0);
7630 static PyObject
*Qt_DragAlignedWindow(_self
, _args
)
7634 PyObject
*_res
= NULL
;
7638 if (!PyArg_ParseTuple(_args
, "O&O&O&",
7639 WinObj_Convert
, &wp
,
7640 PyMac_GetPoint
, &startPt
,
7641 PyMac_GetRect
, &boundsRect
))
7643 DragAlignedWindow(wp
,
7647 (ICMAlignmentProcRecordPtr
)0);
7653 static PyObject
*Qt_MoviesTask(_self
, _args
)
7657 PyObject
*_res
= NULL
;
7658 long maxMilliSecToUse
;
7659 if (!PyArg_ParseTuple(_args
, "l",
7662 MoviesTask((Movie
)0,
7669 static PyMethodDef Qt_methods
[] = {
7670 {"EnterMovies", (PyCFunction
)Qt_EnterMovies
, 1,
7672 {"ExitMovies", (PyCFunction
)Qt_ExitMovies
, 1,
7674 {"GetMoviesError", (PyCFunction
)Qt_GetMoviesError
, 1,
7676 {"ClearMoviesStickyError", (PyCFunction
)Qt_ClearMoviesStickyError
, 1,
7678 {"GetMoviesStickyError", (PyCFunction
)Qt_GetMoviesStickyError
, 1,
7680 {"DisposeMatte", (PyCFunction
)Qt_DisposeMatte
, 1,
7681 "(PixMapHandle theMatte) -> None"},
7682 {"NewMovie", (PyCFunction
)Qt_NewMovie
, 1,
7683 "(long flags) -> (Movie _rv)"},
7684 {"GetDataHandler", (PyCFunction
)Qt_GetDataHandler
, 1,
7685 "(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)"},
7686 {"PasteHandleIntoMovie", (PyCFunction
)Qt_PasteHandleIntoMovie
, 1,
7687 "(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
7688 {"GetMovieImporterForDataRef", (PyCFunction
)Qt_GetMovieImporterForDataRef
, 1,
7689 "(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)"},
7690 {"TrackTimeToMediaTime", (PyCFunction
)Qt_TrackTimeToMediaTime
, 1,
7691 "(TimeValue value, Track theTrack) -> (TimeValue _rv)"},
7692 {"NewUserData", (PyCFunction
)Qt_NewUserData
, 1,
7693 "() -> (UserData theUserData)"},
7694 {"NewUserDataFromHandle", (PyCFunction
)Qt_NewUserDataFromHandle
, 1,
7695 "(Handle h) -> (UserData theUserData)"},
7696 {"CreateMovieFile", (PyCFunction
)Qt_CreateMovieFile
, 1,
7697 "(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)"},
7698 {"OpenMovieFile", (PyCFunction
)Qt_OpenMovieFile
, 1,
7699 "(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)"},
7700 {"CloseMovieFile", (PyCFunction
)Qt_CloseMovieFile
, 1,
7701 "(short resRefNum) -> None"},
7702 {"DeleteMovieFile", (PyCFunction
)Qt_DeleteMovieFile
, 1,
7703 "(FSSpec fileSpec) -> None"},
7704 {"NewMovieFromFile", (PyCFunction
)Qt_NewMovieFromFile
, 1,
7705 "(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)"},
7706 {"NewMovieFromHandle", (PyCFunction
)Qt_NewMovieFromHandle
, 1,
7707 "(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
7708 {"NewMovieFromDataFork", (PyCFunction
)Qt_NewMovieFromDataFork
, 1,
7709 "(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
7710 {"NewMovieFromDataRef", (PyCFunction
)Qt_NewMovieFromDataRef
, 1,
7711 "(short flags, Handle dataRef, OSType dataRefType) -> (Movie m, short id)"},
7712 {"RemoveMovieResource", (PyCFunction
)Qt_RemoveMovieResource
, 1,
7713 "(short resRefNum, short resId) -> None"},
7714 {"NewMovieFromScrap", (PyCFunction
)Qt_NewMovieFromScrap
, 1,
7715 "(long newMovieFlags) -> (Movie _rv)"},
7716 {"QTNewAlias", (PyCFunction
)Qt_QTNewAlias
, 1,
7717 "(FSSpec fss, Boolean minimal) -> (AliasHandle alias)"},
7718 {"EndFullScreen", (PyCFunction
)Qt_EndFullScreen
, 1,
7719 "(Ptr fullState, long flags) -> None"},
7720 {"AddSoundDescriptionExtension", (PyCFunction
)Qt_AddSoundDescriptionExtension
, 1,
7721 "(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None"},
7722 {"GetSoundDescriptionExtension", (PyCFunction
)Qt_GetSoundDescriptionExtension
, 1,
7723 "(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)"},
7724 {"RemoveSoundDescriptionExtension", (PyCFunction
)Qt_RemoveSoundDescriptionExtension
, 1,
7725 "(SoundDescriptionHandle desc, OSType idType) -> None"},
7726 {"QTIsStandardParameterDialogEvent", (PyCFunction
)Qt_QTIsStandardParameterDialogEvent
, 1,
7727 "(QTParameterDialog createdDialog) -> (EventRecord pEvent)"},
7728 {"QTDismissStandardParameterDialog", (PyCFunction
)Qt_QTDismissStandardParameterDialog
, 1,
7729 "(QTParameterDialog createdDialog) -> None"},
7730 {"QTStandardParameterDialogDoAction", (PyCFunction
)Qt_QTStandardParameterDialogDoAction
, 1,
7731 "(QTParameterDialog createdDialog, long action, void * params) -> None"},
7732 {"QTRegisterAccessKey", (PyCFunction
)Qt_QTRegisterAccessKey
, 1,
7733 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
7734 {"QTUnregisterAccessKey", (PyCFunction
)Qt_QTUnregisterAccessKey
, 1,
7735 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
7736 {"QTTextToNativeText", (PyCFunction
)Qt_QTTextToNativeText
, 1,
7737 "(Handle theText, long encoding, long flags) -> None"},
7738 {"VideoMediaResetStatistics", (PyCFunction
)Qt_VideoMediaResetStatistics
, 1,
7739 "(MediaHandler mh) -> (ComponentResult _rv)"},
7740 {"VideoMediaGetStatistics", (PyCFunction
)Qt_VideoMediaGetStatistics
, 1,
7741 "(MediaHandler mh) -> (ComponentResult _rv)"},
7742 {"TextMediaAddTextSample", (PyCFunction
)Qt_TextMediaAddTextSample
, 1,
7743 "(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)"},
7744 {"TextMediaAddTESample", (PyCFunction
)Qt_TextMediaAddTESample
, 1,
7745 "(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)"},
7746 {"TextMediaAddHiliteSample", (PyCFunction
)Qt_TextMediaAddHiliteSample
, 1,
7747 "(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
7748 {"TextMediaFindNextText", (PyCFunction
)Qt_TextMediaFindNextText
, 1,
7749 "(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)"},
7750 {"TextMediaHiliteTextSample", (PyCFunction
)Qt_TextMediaHiliteTextSample
, 1,
7751 "(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)"},
7752 {"TextMediaSetTextSampleData", (PyCFunction
)Qt_TextMediaSetTextSampleData
, 1,
7753 "(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)"},
7754 {"SpriteMediaSetProperty", (PyCFunction
)Qt_SpriteMediaSetProperty
, 1,
7755 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7756 {"SpriteMediaGetProperty", (PyCFunction
)Qt_SpriteMediaGetProperty
, 1,
7757 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7758 {"SpriteMediaHitTestSprites", (PyCFunction
)Qt_SpriteMediaHitTestSprites
, 1,
7759 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)"},
7760 {"SpriteMediaCountSprites", (PyCFunction
)Qt_SpriteMediaCountSprites
, 1,
7761 "(MediaHandler mh) -> (ComponentResult _rv, short numSprites)"},
7762 {"SpriteMediaCountImages", (PyCFunction
)Qt_SpriteMediaCountImages
, 1,
7763 "(MediaHandler mh) -> (ComponentResult _rv, short numImages)"},
7764 {"SpriteMediaGetIndImageDescription", (PyCFunction
)Qt_SpriteMediaGetIndImageDescription
, 1,
7765 "(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)"},
7766 {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction
)Qt_SpriteMediaGetDisplayedSampleNumber
, 1,
7767 "(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)"},
7768 {"SpriteMediaGetSpriteName", (PyCFunction
)Qt_SpriteMediaGetSpriteName
, 1,
7769 "(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)"},
7770 {"SpriteMediaGetImageName", (PyCFunction
)Qt_SpriteMediaGetImageName
, 1,
7771 "(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)"},
7772 {"SpriteMediaSetSpriteProperty", (PyCFunction
)Qt_SpriteMediaSetSpriteProperty
, 1,
7773 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7774 {"SpriteMediaGetSpriteProperty", (PyCFunction
)Qt_SpriteMediaGetSpriteProperty
, 1,
7775 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
7776 {"SpriteMediaHitTestAllSprites", (PyCFunction
)Qt_SpriteMediaHitTestAllSprites
, 1,
7777 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)"},
7778 {"SpriteMediaHitTestOneSprite", (PyCFunction
)Qt_SpriteMediaHitTestOneSprite
, 1,
7779 "(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)"},
7780 {"SpriteMediaSpriteIndexToID", (PyCFunction
)Qt_SpriteMediaSpriteIndexToID
, 1,
7781 "(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)"},
7782 {"SpriteMediaSpriteIDToIndex", (PyCFunction
)Qt_SpriteMediaSpriteIDToIndex
, 1,
7783 "(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)"},
7784 {"SpriteMediaSetActionVariable", (PyCFunction
)Qt_SpriteMediaSetActionVariable
, 1,
7785 "(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)"},
7786 {"SpriteMediaGetActionVariable", (PyCFunction
)Qt_SpriteMediaGetActionVariable
, 1,
7787 "(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
7788 {"SpriteMediaGetIndImageProperty", (PyCFunction
)Qt_SpriteMediaGetIndImageProperty
, 1,
7789 "(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
7790 {"NewTimeBase", (PyCFunction
)Qt_NewTimeBase
, 1,
7791 "() -> (TimeBase _rv)"},
7792 {"ConvertTime", (PyCFunction
)Qt_ConvertTime
, 1,
7793 "(TimeBase newBase) -> (TimeRecord inout)"},
7794 {"ConvertTimeScale", (PyCFunction
)Qt_ConvertTimeScale
, 1,
7795 "(TimeScale newScale) -> (TimeRecord inout)"},
7796 {"AddTime", (PyCFunction
)Qt_AddTime
, 1,
7797 "(TimeRecord src) -> (TimeRecord dst)"},
7798 {"SubtractTime", (PyCFunction
)Qt_SubtractTime
, 1,
7799 "(TimeRecord src) -> (TimeRecord dst)"},
7800 {"MusicMediaGetIndexedTunePlayer", (PyCFunction
)Qt_MusicMediaGetIndexedTunePlayer
, 1,
7801 "(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)"},
7802 {"AlignWindow", (PyCFunction
)Qt_AlignWindow
, 1,
7803 "(WindowPtr wp, Boolean front) -> None"},
7804 {"DragAlignedWindow", (PyCFunction
)Qt_DragAlignedWindow
, 1,
7805 "(WindowPtr wp, Point startPt, Rect boundsRect) -> None"},
7806 {"MoviesTask", (PyCFunction
)Qt_MoviesTask
, 1,
7807 "(long maxMilliSecToUse) -> None"},
7822 m
= Py_InitModule("Qt", Qt_methods
);
7823 d
= PyModule_GetDict(m
);
7824 Qt_Error
= PyMac_GetOSErrException();
7825 if (Qt_Error
== NULL
||
7826 PyDict_SetItemString(d
, "Error", Qt_Error
) != 0)
7827 Py_FatalError("can't initialize Qt.Error");
7828 MovieController_Type
.ob_type
= &PyType_Type
;
7829 Py_INCREF(&MovieController_Type
);
7830 if (PyDict_SetItemString(d
, "MovieControllerType", (PyObject
*)&MovieController_Type
) != 0)
7831 Py_FatalError("can't initialize MovieControllerType");
7832 TimeBase_Type
.ob_type
= &PyType_Type
;
7833 Py_INCREF(&TimeBase_Type
);
7834 if (PyDict_SetItemString(d
, "TimeBaseType", (PyObject
*)&TimeBase_Type
) != 0)
7835 Py_FatalError("can't initialize TimeBaseType");
7836 UserData_Type
.ob_type
= &PyType_Type
;
7837 Py_INCREF(&UserData_Type
);
7838 if (PyDict_SetItemString(d
, "UserDataType", (PyObject
*)&UserData_Type
) != 0)
7839 Py_FatalError("can't initialize UserDataType");
7840 Media_Type
.ob_type
= &PyType_Type
;
7841 Py_INCREF(&Media_Type
);
7842 if (PyDict_SetItemString(d
, "MediaType", (PyObject
*)&Media_Type
) != 0)
7843 Py_FatalError("can't initialize MediaType");
7844 Track_Type
.ob_type
= &PyType_Type
;
7845 Py_INCREF(&Track_Type
);
7846 if (PyDict_SetItemString(d
, "TrackType", (PyObject
*)&Track_Type
) != 0)
7847 Py_FatalError("can't initialize TrackType");
7848 Movie_Type
.ob_type
= &PyType_Type
;
7849 Py_INCREF(&Movie_Type
);
7850 if (PyDict_SetItemString(d
, "MovieType", (PyObject
*)&Movie_Type
) != 0)
7851 Py_FatalError("can't initialize MovieType");
7854 /* ========================= End module Qt ========================== */