2 /* =========================== Module Qt ============================ */
9 #include "pymactoolbox.h"
14 /* Macro to allow us to GetNextInterestingTime without duration */
15 #define GetMediaNextInterestingTimeOnly(media, flags, time, rate, rv) GetMediaNextInterestingTime(media, flags, time, rate, rv, NULL)
18 ** Parse/generate time records
21 QtTimeRecord_New(itself
)
25 return Py_BuildValue("O&lO&", PyMac_Buildwide
, &itself
->value
, itself
->scale
,
26 TimeBaseObj_New
, itself
->base
);
28 return Py_BuildValue("O&lO", PyMac_Buildwide
, &itself
->value
, itself
->scale
,
33 QtTimeRecord_Convert(v
, p_itself
)
37 PyObject
*base
= NULL
;
38 if( !PyArg_ParseTuple(v
, "O&l|O", PyMac_Getwide
, &p_itself
->value
, &p_itself
->scale
,
41 if ( base
== NULL
|| base
== Py_None
)
42 p_itself
->base
= NULL
;
44 if ( !TimeBaseObj_Convert(base
, &p_itself
->base
) )
52 static PyObject
*Qt_Error
;
54 /* ------------------ Object type MovieController ------------------- */
56 PyTypeObject MovieController_Type
;
58 #define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type)
60 typedef struct MovieControllerObject
{
62 MovieController ob_itself
;
63 } MovieControllerObject
;
65 PyObject
*MovieCtlObj_New(itself
)
66 MovieController itself
;
68 MovieControllerObject
*it
;
70 PyErr_SetString(Qt_Error
,"Cannot create null MovieController");
73 it
= PyObject_NEW(MovieControllerObject
, &MovieController_Type
);
74 if (it
== NULL
) return NULL
;
75 it
->ob_itself
= itself
;
76 return (PyObject
*)it
;
78 MovieCtlObj_Convert(v
, p_itself
)
80 MovieController
*p_itself
;
82 if (!MovieCtlObj_Check(v
))
84 PyErr_SetString(PyExc_TypeError
, "MovieController required");
87 *p_itself
= ((MovieControllerObject
*)v
)->ob_itself
;
91 static void MovieCtlObj_dealloc(self
)
92 MovieControllerObject
*self
;
94 DisposeMovieController(self
->ob_itself
);
98 static PyObject
*MovieCtlObj_MCSetMovie(_self
, _args
)
99 MovieControllerObject
*_self
;
102 PyObject
*_res
= NULL
;
105 WindowPtr movieWindow
;
107 if (!PyArg_ParseTuple(_args
, "O&O&O&",
108 MovieObj_Convert
, &theMovie
,
109 WinObj_Convert
, &movieWindow
,
110 PyMac_GetPoint
, &where
))
112 _rv
= MCSetMovie(_self
->ob_itself
,
116 _res
= Py_BuildValue("l",
121 static PyObject
*MovieCtlObj_MCGetIndMovie(_self
, _args
)
122 MovieControllerObject
*_self
;
125 PyObject
*_res
= NULL
;
128 if (!PyArg_ParseTuple(_args
, "h",
131 _rv
= MCGetIndMovie(_self
->ob_itself
,
133 _res
= Py_BuildValue("O&",
138 static PyObject
*MovieCtlObj_MCRemoveAllMovies(_self
, _args
)
139 MovieControllerObject
*_self
;
142 PyObject
*_res
= NULL
;
144 if (!PyArg_ParseTuple(_args
, ""))
146 _rv
= MCRemoveAllMovies(_self
->ob_itself
);
147 _res
= Py_BuildValue("l",
152 static PyObject
*MovieCtlObj_MCRemoveAMovie(_self
, _args
)
153 MovieControllerObject
*_self
;
156 PyObject
*_res
= NULL
;
159 if (!PyArg_ParseTuple(_args
, "O&",
160 MovieObj_Convert
, &m
))
162 _rv
= MCRemoveAMovie(_self
->ob_itself
,
164 _res
= Py_BuildValue("l",
169 static PyObject
*MovieCtlObj_MCRemoveMovie(_self
, _args
)
170 MovieControllerObject
*_self
;
173 PyObject
*_res
= NULL
;
175 if (!PyArg_ParseTuple(_args
, ""))
177 _rv
= MCRemoveMovie(_self
->ob_itself
);
178 _res
= Py_BuildValue("l",
183 static PyObject
*MovieCtlObj_MCIsPlayerEvent(_self
, _args
)
184 MovieControllerObject
*_self
;
187 PyObject
*_res
= NULL
;
190 if (!PyArg_ParseTuple(_args
, "O&",
191 PyMac_GetEventRecord
, &e
))
193 _rv
= MCIsPlayerEvent(_self
->ob_itself
,
195 _res
= Py_BuildValue("l",
200 static PyObject
*MovieCtlObj_MCDoAction(_self
, _args
)
201 MovieControllerObject
*_self
;
204 PyObject
*_res
= NULL
;
208 if (!PyArg_ParseTuple(_args
, "hs",
212 _rv
= MCDoAction(_self
->ob_itself
,
215 _res
= Py_BuildValue("l",
220 static PyObject
*MovieCtlObj_MCSetControllerAttached(_self
, _args
)
221 MovieControllerObject
*_self
;
224 PyObject
*_res
= NULL
;
227 if (!PyArg_ParseTuple(_args
, "b",
230 _rv
= MCSetControllerAttached(_self
->ob_itself
,
232 _res
= Py_BuildValue("l",
237 static PyObject
*MovieCtlObj_MCIsControllerAttached(_self
, _args
)
238 MovieControllerObject
*_self
;
241 PyObject
*_res
= NULL
;
243 if (!PyArg_ParseTuple(_args
, ""))
245 _rv
= MCIsControllerAttached(_self
->ob_itself
);
246 _res
= Py_BuildValue("l",
251 static PyObject
*MovieCtlObj_MCSetControllerPort(_self
, _args
)
252 MovieControllerObject
*_self
;
255 PyObject
*_res
= NULL
;
258 if (!PyArg_ParseTuple(_args
, "O&",
259 GrafObj_Convert
, &gp
))
261 _rv
= MCSetControllerPort(_self
->ob_itself
,
263 _res
= Py_BuildValue("l",
268 static PyObject
*MovieCtlObj_MCGetControllerPort(_self
, _args
)
269 MovieControllerObject
*_self
;
272 PyObject
*_res
= NULL
;
274 if (!PyArg_ParseTuple(_args
, ""))
276 _rv
= MCGetControllerPort(_self
->ob_itself
);
277 _res
= Py_BuildValue("O&",
282 static PyObject
*MovieCtlObj_MCSetVisible(_self
, _args
)
283 MovieControllerObject
*_self
;
286 PyObject
*_res
= NULL
;
289 if (!PyArg_ParseTuple(_args
, "b",
292 _rv
= MCSetVisible(_self
->ob_itself
,
294 _res
= Py_BuildValue("l",
299 static PyObject
*MovieCtlObj_MCGetVisible(_self
, _args
)
300 MovieControllerObject
*_self
;
303 PyObject
*_res
= NULL
;
305 if (!PyArg_ParseTuple(_args
, ""))
307 _rv
= MCGetVisible(_self
->ob_itself
);
308 _res
= Py_BuildValue("l",
313 static PyObject
*MovieCtlObj_MCGetControllerBoundsRect(_self
, _args
)
314 MovieControllerObject
*_self
;
317 PyObject
*_res
= NULL
;
320 if (!PyArg_ParseTuple(_args
, ""))
322 _rv
= MCGetControllerBoundsRect(_self
->ob_itself
,
324 _res
= Py_BuildValue("lO&",
326 PyMac_BuildRect
, &bounds
);
330 static PyObject
*MovieCtlObj_MCSetControllerBoundsRect(_self
, _args
)
331 MovieControllerObject
*_self
;
334 PyObject
*_res
= NULL
;
337 if (!PyArg_ParseTuple(_args
, "O&",
338 PyMac_GetRect
, &bounds
))
340 _rv
= MCSetControllerBoundsRect(_self
->ob_itself
,
342 _res
= Py_BuildValue("l",
347 static PyObject
*MovieCtlObj_MCGetControllerBoundsRgn(_self
, _args
)
348 MovieControllerObject
*_self
;
351 PyObject
*_res
= NULL
;
353 if (!PyArg_ParseTuple(_args
, ""))
355 _rv
= MCGetControllerBoundsRgn(_self
->ob_itself
);
356 _res
= Py_BuildValue("O&",
361 static PyObject
*MovieCtlObj_MCGetWindowRgn(_self
, _args
)
362 MovieControllerObject
*_self
;
365 PyObject
*_res
= NULL
;
368 if (!PyArg_ParseTuple(_args
, "O&",
371 _rv
= MCGetWindowRgn(_self
->ob_itself
,
373 _res
= Py_BuildValue("O&",
378 static PyObject
*MovieCtlObj_MCMovieChanged(_self
, _args
)
379 MovieControllerObject
*_self
;
382 PyObject
*_res
= NULL
;
385 if (!PyArg_ParseTuple(_args
, "O&",
386 MovieObj_Convert
, &m
))
388 _rv
= MCMovieChanged(_self
->ob_itself
,
390 _res
= Py_BuildValue("l",
395 static PyObject
*MovieCtlObj_MCSetDuration(_self
, _args
)
396 MovieControllerObject
*_self
;
399 PyObject
*_res
= NULL
;
402 if (!PyArg_ParseTuple(_args
, "l",
405 _rv
= MCSetDuration(_self
->ob_itself
,
407 _res
= Py_BuildValue("l",
412 static PyObject
*MovieCtlObj_MCGetCurrentTime(_self
, _args
)
413 MovieControllerObject
*_self
;
416 PyObject
*_res
= NULL
;
419 if (!PyArg_ParseTuple(_args
, ""))
421 _rv
= MCGetCurrentTime(_self
->ob_itself
,
423 _res
= Py_BuildValue("ll",
429 static PyObject
*MovieCtlObj_MCNewAttachedController(_self
, _args
)
430 MovieControllerObject
*_self
;
433 PyObject
*_res
= NULL
;
438 if (!PyArg_ParseTuple(_args
, "O&O&O&",
439 MovieObj_Convert
, &theMovie
,
441 PyMac_GetPoint
, &where
))
443 _rv
= MCNewAttachedController(_self
->ob_itself
,
447 _res
= Py_BuildValue("l",
452 static PyObject
*MovieCtlObj_MCDraw(_self
, _args
)
453 MovieControllerObject
*_self
;
456 PyObject
*_res
= NULL
;
459 if (!PyArg_ParseTuple(_args
, "O&",
462 _rv
= MCDraw(_self
->ob_itself
,
464 _res
= Py_BuildValue("l",
469 static PyObject
*MovieCtlObj_MCActivate(_self
, _args
)
470 MovieControllerObject
*_self
;
473 PyObject
*_res
= NULL
;
477 if (!PyArg_ParseTuple(_args
, "O&b",
481 _rv
= MCActivate(_self
->ob_itself
,
484 _res
= Py_BuildValue("l",
489 static PyObject
*MovieCtlObj_MCIdle(_self
, _args
)
490 MovieControllerObject
*_self
;
493 PyObject
*_res
= NULL
;
495 if (!PyArg_ParseTuple(_args
, ""))
497 _rv
= MCIdle(_self
->ob_itself
);
498 _res
= Py_BuildValue("l",
503 static PyObject
*MovieCtlObj_MCKey(_self
, _args
)
504 MovieControllerObject
*_self
;
507 PyObject
*_res
= NULL
;
511 if (!PyArg_ParseTuple(_args
, "bl",
515 _rv
= MCKey(_self
->ob_itself
,
518 _res
= Py_BuildValue("l",
523 static PyObject
*MovieCtlObj_MCClick(_self
, _args
)
524 MovieControllerObject
*_self
;
527 PyObject
*_res
= NULL
;
533 if (!PyArg_ParseTuple(_args
, "O&O&ll",
535 PyMac_GetPoint
, &where
,
539 _rv
= MCClick(_self
->ob_itself
,
544 _res
= Py_BuildValue("l",
549 static PyObject
*MovieCtlObj_MCEnableEditing(_self
, _args
)
550 MovieControllerObject
*_self
;
553 PyObject
*_res
= NULL
;
556 if (!PyArg_ParseTuple(_args
, "b",
559 _rv
= MCEnableEditing(_self
->ob_itself
,
561 _res
= Py_BuildValue("l",
566 static PyObject
*MovieCtlObj_MCIsEditingEnabled(_self
, _args
)
567 MovieControllerObject
*_self
;
570 PyObject
*_res
= NULL
;
572 if (!PyArg_ParseTuple(_args
, ""))
574 _rv
= MCIsEditingEnabled(_self
->ob_itself
);
575 _res
= Py_BuildValue("l",
580 static PyObject
*MovieCtlObj_MCCopy(_self
, _args
)
581 MovieControllerObject
*_self
;
584 PyObject
*_res
= NULL
;
586 if (!PyArg_ParseTuple(_args
, ""))
588 _rv
= MCCopy(_self
->ob_itself
);
589 _res
= Py_BuildValue("O&",
594 static PyObject
*MovieCtlObj_MCCut(_self
, _args
)
595 MovieControllerObject
*_self
;
598 PyObject
*_res
= NULL
;
600 if (!PyArg_ParseTuple(_args
, ""))
602 _rv
= MCCut(_self
->ob_itself
);
603 _res
= Py_BuildValue("O&",
608 static PyObject
*MovieCtlObj_MCPaste(_self
, _args
)
609 MovieControllerObject
*_self
;
612 PyObject
*_res
= NULL
;
615 if (!PyArg_ParseTuple(_args
, "O&",
616 MovieObj_Convert
, &srcMovie
))
618 _rv
= MCPaste(_self
->ob_itself
,
620 _res
= Py_BuildValue("l",
625 static PyObject
*MovieCtlObj_MCClear(_self
, _args
)
626 MovieControllerObject
*_self
;
629 PyObject
*_res
= NULL
;
631 if (!PyArg_ParseTuple(_args
, ""))
633 _rv
= MCClear(_self
->ob_itself
);
634 _res
= Py_BuildValue("l",
639 static PyObject
*MovieCtlObj_MCUndo(_self
, _args
)
640 MovieControllerObject
*_self
;
643 PyObject
*_res
= NULL
;
645 if (!PyArg_ParseTuple(_args
, ""))
647 _rv
= MCUndo(_self
->ob_itself
);
648 _res
= Py_BuildValue("l",
653 static PyObject
*MovieCtlObj_MCPositionController(_self
, _args
)
654 MovieControllerObject
*_self
;
657 PyObject
*_res
= NULL
;
662 if (!PyArg_ParseTuple(_args
, "O&O&l",
663 PyMac_GetRect
, &movieRect
,
664 PyMac_GetRect
, &controllerRect
,
667 _rv
= MCPositionController(_self
->ob_itself
,
671 _res
= Py_BuildValue("l",
676 static PyObject
*MovieCtlObj_MCGetControllerInfo(_self
, _args
)
677 MovieControllerObject
*_self
;
680 PyObject
*_res
= NULL
;
683 if (!PyArg_ParseTuple(_args
, ""))
685 _rv
= MCGetControllerInfo(_self
->ob_itself
,
687 _res
= Py_BuildValue("ll",
693 static PyObject
*MovieCtlObj_MCSetClip(_self
, _args
)
694 MovieControllerObject
*_self
;
697 PyObject
*_res
= NULL
;
701 if (!PyArg_ParseTuple(_args
, "O&O&",
702 ResObj_Convert
, &theClip
,
703 ResObj_Convert
, &movieClip
))
705 _rv
= MCSetClip(_self
->ob_itself
,
708 _res
= Py_BuildValue("l",
713 static PyObject
*MovieCtlObj_MCGetClip(_self
, _args
)
714 MovieControllerObject
*_self
;
717 PyObject
*_res
= NULL
;
721 if (!PyArg_ParseTuple(_args
, ""))
723 _rv
= MCGetClip(_self
->ob_itself
,
726 _res
= Py_BuildValue("lO&O&",
729 ResObj_New
, movieClip
);
733 static PyObject
*MovieCtlObj_MCDrawBadge(_self
, _args
)
734 MovieControllerObject
*_self
;
737 PyObject
*_res
= NULL
;
741 if (!PyArg_ParseTuple(_args
, "O&",
742 ResObj_Convert
, &movieRgn
))
744 _rv
= MCDrawBadge(_self
->ob_itself
,
747 _res
= Py_BuildValue("lO&",
749 ResObj_New
, badgeRgn
);
753 static PyObject
*MovieCtlObj_MCSetUpEditMenu(_self
, _args
)
754 MovieControllerObject
*_self
;
757 PyObject
*_res
= NULL
;
761 if (!PyArg_ParseTuple(_args
, "lO&",
763 MenuObj_Convert
, &mh
))
765 _rv
= MCSetUpEditMenu(_self
->ob_itself
,
768 _res
= Py_BuildValue("l",
773 static PyObject
*MovieCtlObj_MCGetMenuString(_self
, _args
)
774 MovieControllerObject
*_self
;
777 PyObject
*_res
= NULL
;
782 if (!PyArg_ParseTuple(_args
, "lhO&",
785 PyMac_GetStr255
, aString
))
787 _rv
= MCGetMenuString(_self
->ob_itself
,
791 _res
= Py_BuildValue("l",
796 static PyObject
*MovieCtlObj_MCPtInController(_self
, _args
)
797 MovieControllerObject
*_self
;
800 PyObject
*_res
= NULL
;
803 Boolean inController
;
804 if (!PyArg_ParseTuple(_args
, "O&",
805 PyMac_GetPoint
, &thePt
))
807 _rv
= MCPtInController(_self
->ob_itself
,
810 _res
= Py_BuildValue("lb",
816 static PyObject
*MovieCtlObj_MCInvalidate(_self
, _args
)
817 MovieControllerObject
*_self
;
820 PyObject
*_res
= NULL
;
823 RgnHandle invalidRgn
;
824 if (!PyArg_ParseTuple(_args
, "O&O&",
826 ResObj_Convert
, &invalidRgn
))
828 _rv
= MCInvalidate(_self
->ob_itself
,
831 _res
= Py_BuildValue("l",
836 static PyObject
*MovieCtlObj_MCAdjustCursor(_self
, _args
)
837 MovieControllerObject
*_self
;
840 PyObject
*_res
= NULL
;
845 if (!PyArg_ParseTuple(_args
, "O&O&l",
847 PyMac_GetPoint
, &where
,
850 _rv
= MCAdjustCursor(_self
->ob_itself
,
854 _res
= Py_BuildValue("l",
859 static PyObject
*MovieCtlObj_MCGetInterfaceElement(_self
, _args
)
860 MovieControllerObject
*_self
;
863 PyObject
*_res
= NULL
;
865 MCInterfaceElement whichElement
;
867 if (!PyArg_ParseTuple(_args
, "ls",
871 _rv
= MCGetInterfaceElement(_self
->ob_itself
,
874 _res
= Py_BuildValue("l",
879 static PyMethodDef MovieCtlObj_methods
[] = {
880 {"MCSetMovie", (PyCFunction
)MovieCtlObj_MCSetMovie
, 1,
881 "(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)"},
882 {"MCGetIndMovie", (PyCFunction
)MovieCtlObj_MCGetIndMovie
, 1,
883 "(short index) -> (Movie _rv)"},
884 {"MCRemoveAllMovies", (PyCFunction
)MovieCtlObj_MCRemoveAllMovies
, 1,
885 "() -> (ComponentResult _rv)"},
886 {"MCRemoveAMovie", (PyCFunction
)MovieCtlObj_MCRemoveAMovie
, 1,
887 "(Movie m) -> (ComponentResult _rv)"},
888 {"MCRemoveMovie", (PyCFunction
)MovieCtlObj_MCRemoveMovie
, 1,
889 "() -> (ComponentResult _rv)"},
890 {"MCIsPlayerEvent", (PyCFunction
)MovieCtlObj_MCIsPlayerEvent
, 1,
891 "(EventRecord e) -> (ComponentResult _rv)"},
892 {"MCDoAction", (PyCFunction
)MovieCtlObj_MCDoAction
, 1,
893 "(short action, void * params) -> (ComponentResult _rv)"},
894 {"MCSetControllerAttached", (PyCFunction
)MovieCtlObj_MCSetControllerAttached
, 1,
895 "(Boolean attach) -> (ComponentResult _rv)"},
896 {"MCIsControllerAttached", (PyCFunction
)MovieCtlObj_MCIsControllerAttached
, 1,
897 "() -> (ComponentResult _rv)"},
898 {"MCSetControllerPort", (PyCFunction
)MovieCtlObj_MCSetControllerPort
, 1,
899 "(CGrafPtr gp) -> (ComponentResult _rv)"},
900 {"MCGetControllerPort", (PyCFunction
)MovieCtlObj_MCGetControllerPort
, 1,
901 "() -> (CGrafPtr _rv)"},
902 {"MCSetVisible", (PyCFunction
)MovieCtlObj_MCSetVisible
, 1,
903 "(Boolean visible) -> (ComponentResult _rv)"},
904 {"MCGetVisible", (PyCFunction
)MovieCtlObj_MCGetVisible
, 1,
905 "() -> (ComponentResult _rv)"},
906 {"MCGetControllerBoundsRect", (PyCFunction
)MovieCtlObj_MCGetControllerBoundsRect
, 1,
907 "() -> (ComponentResult _rv, Rect bounds)"},
908 {"MCSetControllerBoundsRect", (PyCFunction
)MovieCtlObj_MCSetControllerBoundsRect
, 1,
909 "(Rect bounds) -> (ComponentResult _rv)"},
910 {"MCGetControllerBoundsRgn", (PyCFunction
)MovieCtlObj_MCGetControllerBoundsRgn
, 1,
911 "() -> (RgnHandle _rv)"},
912 {"MCGetWindowRgn", (PyCFunction
)MovieCtlObj_MCGetWindowRgn
, 1,
913 "(WindowPtr w) -> (RgnHandle _rv)"},
914 {"MCMovieChanged", (PyCFunction
)MovieCtlObj_MCMovieChanged
, 1,
915 "(Movie m) -> (ComponentResult _rv)"},
916 {"MCSetDuration", (PyCFunction
)MovieCtlObj_MCSetDuration
, 1,
917 "(TimeValue duration) -> (ComponentResult _rv)"},
918 {"MCGetCurrentTime", (PyCFunction
)MovieCtlObj_MCGetCurrentTime
, 1,
919 "() -> (TimeValue _rv, TimeScale scale)"},
920 {"MCNewAttachedController", (PyCFunction
)MovieCtlObj_MCNewAttachedController
, 1,
921 "(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)"},
922 {"MCDraw", (PyCFunction
)MovieCtlObj_MCDraw
, 1,
923 "(WindowPtr w) -> (ComponentResult _rv)"},
924 {"MCActivate", (PyCFunction
)MovieCtlObj_MCActivate
, 1,
925 "(WindowPtr w, Boolean activate) -> (ComponentResult _rv)"},
926 {"MCIdle", (PyCFunction
)MovieCtlObj_MCIdle
, 1,
927 "() -> (ComponentResult _rv)"},
928 {"MCKey", (PyCFunction
)MovieCtlObj_MCKey
, 1,
929 "(SInt8 key, long modifiers) -> (ComponentResult _rv)"},
930 {"MCClick", (PyCFunction
)MovieCtlObj_MCClick
, 1,
931 "(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)"},
932 {"MCEnableEditing", (PyCFunction
)MovieCtlObj_MCEnableEditing
, 1,
933 "(Boolean enabled) -> (ComponentResult _rv)"},
934 {"MCIsEditingEnabled", (PyCFunction
)MovieCtlObj_MCIsEditingEnabled
, 1,
936 {"MCCopy", (PyCFunction
)MovieCtlObj_MCCopy
, 1,
937 "() -> (Movie _rv)"},
938 {"MCCut", (PyCFunction
)MovieCtlObj_MCCut
, 1,
939 "() -> (Movie _rv)"},
940 {"MCPaste", (PyCFunction
)MovieCtlObj_MCPaste
, 1,
941 "(Movie srcMovie) -> (ComponentResult _rv)"},
942 {"MCClear", (PyCFunction
)MovieCtlObj_MCClear
, 1,
943 "() -> (ComponentResult _rv)"},
944 {"MCUndo", (PyCFunction
)MovieCtlObj_MCUndo
, 1,
945 "() -> (ComponentResult _rv)"},
946 {"MCPositionController", (PyCFunction
)MovieCtlObj_MCPositionController
, 1,
947 "(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)"},
948 {"MCGetControllerInfo", (PyCFunction
)MovieCtlObj_MCGetControllerInfo
, 1,
949 "() -> (ComponentResult _rv, long someFlags)"},
950 {"MCSetClip", (PyCFunction
)MovieCtlObj_MCSetClip
, 1,
951 "(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)"},
952 {"MCGetClip", (PyCFunction
)MovieCtlObj_MCGetClip
, 1,
953 "() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)"},
954 {"MCDrawBadge", (PyCFunction
)MovieCtlObj_MCDrawBadge
, 1,
955 "(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)"},
956 {"MCSetUpEditMenu", (PyCFunction
)MovieCtlObj_MCSetUpEditMenu
, 1,
957 "(long modifiers, MenuHandle mh) -> (ComponentResult _rv)"},
958 {"MCGetMenuString", (PyCFunction
)MovieCtlObj_MCGetMenuString
, 1,
959 "(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)"},
960 {"MCPtInController", (PyCFunction
)MovieCtlObj_MCPtInController
, 1,
961 "(Point thePt) -> (ComponentResult _rv, Boolean inController)"},
962 {"MCInvalidate", (PyCFunction
)MovieCtlObj_MCInvalidate
, 1,
963 "(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)"},
964 {"MCAdjustCursor", (PyCFunction
)MovieCtlObj_MCAdjustCursor
, 1,
965 "(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)"},
966 {"MCGetInterfaceElement", (PyCFunction
)MovieCtlObj_MCGetInterfaceElement
, 1,
967 "(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)"},
971 PyMethodChain MovieCtlObj_chain
= { MovieCtlObj_methods
, NULL
};
973 static PyObject
*MovieCtlObj_getattr(self
, name
)
974 MovieControllerObject
*self
;
977 return Py_FindMethodInChain(&MovieCtlObj_chain
, (PyObject
*)self
, name
);
980 #define MovieCtlObj_setattr NULL
982 #define MovieCtlObj_compare NULL
984 #define MovieCtlObj_repr NULL
986 #define MovieCtlObj_hash NULL
988 PyTypeObject MovieController_Type
= {
989 PyObject_HEAD_INIT(&PyType_Type
)
991 "MovieController", /*tp_name*/
992 sizeof(MovieControllerObject
), /*tp_basicsize*/
995 (destructor
) MovieCtlObj_dealloc
, /*tp_dealloc*/
997 (getattrfunc
) MovieCtlObj_getattr
, /*tp_getattr*/
998 (setattrfunc
) MovieCtlObj_setattr
, /*tp_setattr*/
999 (cmpfunc
) MovieCtlObj_compare
, /*tp_compare*/
1000 (reprfunc
) MovieCtlObj_repr
, /*tp_repr*/
1001 (PyNumberMethods
*)0, /* tp_as_number */
1002 (PySequenceMethods
*)0, /* tp_as_sequence */
1003 (PyMappingMethods
*)0, /* tp_as_mapping */
1004 (hashfunc
) MovieCtlObj_hash
, /*tp_hash*/
1007 /* ---------------- End object type MovieController ----------------- */
1010 /* ---------------------- Object type TimeBase ---------------------- */
1012 PyTypeObject TimeBase_Type
;
1014 #define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type)
1016 typedef struct TimeBaseObject
{
1021 PyObject
*TimeBaseObj_New(itself
)
1025 if (itself
== NULL
) {
1026 PyErr_SetString(Qt_Error
,"Cannot create null TimeBase");
1029 it
= PyObject_NEW(TimeBaseObject
, &TimeBase_Type
);
1030 if (it
== NULL
) return NULL
;
1031 it
->ob_itself
= itself
;
1032 return (PyObject
*)it
;
1034 TimeBaseObj_Convert(v
, p_itself
)
1038 if (!TimeBaseObj_Check(v
))
1040 PyErr_SetString(PyExc_TypeError
, "TimeBase required");
1043 *p_itself
= ((TimeBaseObject
*)v
)->ob_itself
;
1047 static void TimeBaseObj_dealloc(self
)
1048 TimeBaseObject
*self
;
1050 /* Cleanup of self->ob_itself goes here */
1054 static PyObject
*TimeBaseObj_DisposeTimeBase(_self
, _args
)
1055 TimeBaseObject
*_self
;
1058 PyObject
*_res
= NULL
;
1059 if (!PyArg_ParseTuple(_args
, ""))
1061 DisposeTimeBase(_self
->ob_itself
);
1067 static PyObject
*TimeBaseObj_GetTimeBaseTime(_self
, _args
)
1068 TimeBaseObject
*_self
;
1071 PyObject
*_res
= NULL
;
1075 if (!PyArg_ParseTuple(_args
, "l",
1078 _rv
= GetTimeBaseTime(_self
->ob_itself
,
1081 _res
= Py_BuildValue("lO&",
1083 QtTimeRecord_New
, &tr
);
1087 static PyObject
*TimeBaseObj_SetTimeBaseTime(_self
, _args
)
1088 TimeBaseObject
*_self
;
1091 PyObject
*_res
= NULL
;
1093 if (!PyArg_ParseTuple(_args
, "O&",
1094 QtTimeRecord_Convert
, &tr
))
1096 SetTimeBaseTime(_self
->ob_itself
,
1103 static PyObject
*TimeBaseObj_SetTimeBaseValue(_self
, _args
)
1104 TimeBaseObject
*_self
;
1107 PyObject
*_res
= NULL
;
1110 if (!PyArg_ParseTuple(_args
, "ll",
1114 SetTimeBaseValue(_self
->ob_itself
,
1122 static PyObject
*TimeBaseObj_GetTimeBaseRate(_self
, _args
)
1123 TimeBaseObject
*_self
;
1126 PyObject
*_res
= NULL
;
1128 if (!PyArg_ParseTuple(_args
, ""))
1130 _rv
= GetTimeBaseRate(_self
->ob_itself
);
1131 _res
= Py_BuildValue("O&",
1132 PyMac_BuildFixed
, _rv
);
1136 static PyObject
*TimeBaseObj_SetTimeBaseRate(_self
, _args
)
1137 TimeBaseObject
*_self
;
1140 PyObject
*_res
= NULL
;
1142 if (!PyArg_ParseTuple(_args
, "O&",
1143 PyMac_GetFixed
, &r
))
1145 SetTimeBaseRate(_self
->ob_itself
,
1152 static PyObject
*TimeBaseObj_GetTimeBaseStartTime(_self
, _args
)
1153 TimeBaseObject
*_self
;
1156 PyObject
*_res
= NULL
;
1160 if (!PyArg_ParseTuple(_args
, "l",
1163 _rv
= GetTimeBaseStartTime(_self
->ob_itself
,
1166 _res
= Py_BuildValue("lO&",
1168 QtTimeRecord_New
, &tr
);
1172 static PyObject
*TimeBaseObj_SetTimeBaseStartTime(_self
, _args
)
1173 TimeBaseObject
*_self
;
1176 PyObject
*_res
= NULL
;
1178 if (!PyArg_ParseTuple(_args
, "O&",
1179 QtTimeRecord_Convert
, &tr
))
1181 SetTimeBaseStartTime(_self
->ob_itself
,
1188 static PyObject
*TimeBaseObj_GetTimeBaseStopTime(_self
, _args
)
1189 TimeBaseObject
*_self
;
1192 PyObject
*_res
= NULL
;
1196 if (!PyArg_ParseTuple(_args
, "l",
1199 _rv
= GetTimeBaseStopTime(_self
->ob_itself
,
1202 _res
= Py_BuildValue("lO&",
1204 QtTimeRecord_New
, &tr
);
1208 static PyObject
*TimeBaseObj_SetTimeBaseStopTime(_self
, _args
)
1209 TimeBaseObject
*_self
;
1212 PyObject
*_res
= NULL
;
1214 if (!PyArg_ParseTuple(_args
, "O&",
1215 QtTimeRecord_Convert
, &tr
))
1217 SetTimeBaseStopTime(_self
->ob_itself
,
1224 static PyObject
*TimeBaseObj_GetTimeBaseFlags(_self
, _args
)
1225 TimeBaseObject
*_self
;
1228 PyObject
*_res
= NULL
;
1230 if (!PyArg_ParseTuple(_args
, ""))
1232 _rv
= GetTimeBaseFlags(_self
->ob_itself
);
1233 _res
= Py_BuildValue("l",
1238 static PyObject
*TimeBaseObj_SetTimeBaseFlags(_self
, _args
)
1239 TimeBaseObject
*_self
;
1242 PyObject
*_res
= NULL
;
1244 if (!PyArg_ParseTuple(_args
, "l",
1247 SetTimeBaseFlags(_self
->ob_itself
,
1254 static PyObject
*TimeBaseObj_SetTimeBaseMasterTimeBase(_self
, _args
)
1255 TimeBaseObject
*_self
;
1258 PyObject
*_res
= NULL
;
1260 TimeRecord slaveZero
;
1261 if (!PyArg_ParseTuple(_args
, "O&O&",
1262 TimeBaseObj_Convert
, &master
,
1263 QtTimeRecord_Convert
, &slaveZero
))
1265 SetTimeBaseMasterTimeBase(_self
->ob_itself
,
1273 static PyObject
*TimeBaseObj_GetTimeBaseMasterTimeBase(_self
, _args
)
1274 TimeBaseObject
*_self
;
1277 PyObject
*_res
= NULL
;
1279 if (!PyArg_ParseTuple(_args
, ""))
1281 _rv
= GetTimeBaseMasterTimeBase(_self
->ob_itself
);
1282 _res
= Py_BuildValue("O&",
1283 TimeBaseObj_New
, _rv
);
1287 static PyObject
*TimeBaseObj_SetTimeBaseMasterClock(_self
, _args
)
1288 TimeBaseObject
*_self
;
1291 PyObject
*_res
= NULL
;
1292 Component clockMeister
;
1293 TimeRecord slaveZero
;
1294 if (!PyArg_ParseTuple(_args
, "O&O&",
1295 CmpObj_Convert
, &clockMeister
,
1296 QtTimeRecord_Convert
, &slaveZero
))
1298 SetTimeBaseMasterClock(_self
->ob_itself
,
1306 static PyObject
*TimeBaseObj_GetTimeBaseMasterClock(_self
, _args
)
1307 TimeBaseObject
*_self
;
1310 PyObject
*_res
= NULL
;
1311 ComponentInstance _rv
;
1312 if (!PyArg_ParseTuple(_args
, ""))
1314 _rv
= GetTimeBaseMasterClock(_self
->ob_itself
);
1315 _res
= Py_BuildValue("O&",
1316 CmpInstObj_New
, _rv
);
1320 static PyObject
*TimeBaseObj_GetTimeBaseStatus(_self
, _args
)
1321 TimeBaseObject
*_self
;
1324 PyObject
*_res
= NULL
;
1326 TimeRecord unpinnedTime
;
1327 if (!PyArg_ParseTuple(_args
, ""))
1329 _rv
= GetTimeBaseStatus(_self
->ob_itself
,
1331 _res
= Py_BuildValue("lO&",
1333 QtTimeRecord_New
, &unpinnedTime
);
1337 static PyObject
*TimeBaseObj_SetTimeBaseZero(_self
, _args
)
1338 TimeBaseObject
*_self
;
1341 PyObject
*_res
= NULL
;
1343 if (!PyArg_ParseTuple(_args
, "O&",
1344 QtTimeRecord_Convert
, &zero
))
1346 SetTimeBaseZero(_self
->ob_itself
,
1353 static PyObject
*TimeBaseObj_GetTimeBaseEffectiveRate(_self
, _args
)
1354 TimeBaseObject
*_self
;
1357 PyObject
*_res
= NULL
;
1359 if (!PyArg_ParseTuple(_args
, ""))
1361 _rv
= GetTimeBaseEffectiveRate(_self
->ob_itself
);
1362 _res
= Py_BuildValue("O&",
1363 PyMac_BuildFixed
, _rv
);
1367 static PyMethodDef TimeBaseObj_methods
[] = {
1368 {"DisposeTimeBase", (PyCFunction
)TimeBaseObj_DisposeTimeBase
, 1,
1370 {"GetTimeBaseTime", (PyCFunction
)TimeBaseObj_GetTimeBaseTime
, 1,
1371 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1372 {"SetTimeBaseTime", (PyCFunction
)TimeBaseObj_SetTimeBaseTime
, 1,
1373 "(TimeRecord tr) -> None"},
1374 {"SetTimeBaseValue", (PyCFunction
)TimeBaseObj_SetTimeBaseValue
, 1,
1375 "(TimeValue t, TimeScale s) -> None"},
1376 {"GetTimeBaseRate", (PyCFunction
)TimeBaseObj_GetTimeBaseRate
, 1,
1377 "() -> (Fixed _rv)"},
1378 {"SetTimeBaseRate", (PyCFunction
)TimeBaseObj_SetTimeBaseRate
, 1,
1379 "(Fixed r) -> None"},
1380 {"GetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStartTime
, 1,
1381 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1382 {"SetTimeBaseStartTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStartTime
, 1,
1383 "(TimeRecord tr) -> None"},
1384 {"GetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_GetTimeBaseStopTime
, 1,
1385 "(TimeScale s) -> (TimeValue _rv, TimeRecord tr)"},
1386 {"SetTimeBaseStopTime", (PyCFunction
)TimeBaseObj_SetTimeBaseStopTime
, 1,
1387 "(TimeRecord tr) -> None"},
1388 {"GetTimeBaseFlags", (PyCFunction
)TimeBaseObj_GetTimeBaseFlags
, 1,
1389 "() -> (long _rv)"},
1390 {"SetTimeBaseFlags", (PyCFunction
)TimeBaseObj_SetTimeBaseFlags
, 1,
1391 "(long timeBaseFlags) -> None"},
1392 {"SetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterTimeBase
, 1,
1393 "(TimeBase master, TimeRecord slaveZero) -> None"},
1394 {"GetTimeBaseMasterTimeBase", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterTimeBase
, 1,
1395 "() -> (TimeBase _rv)"},
1396 {"SetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_SetTimeBaseMasterClock
, 1,
1397 "(Component clockMeister, TimeRecord slaveZero) -> None"},
1398 {"GetTimeBaseMasterClock", (PyCFunction
)TimeBaseObj_GetTimeBaseMasterClock
, 1,
1399 "() -> (ComponentInstance _rv)"},
1400 {"GetTimeBaseStatus", (PyCFunction
)TimeBaseObj_GetTimeBaseStatus
, 1,
1401 "() -> (long _rv, TimeRecord unpinnedTime)"},
1402 {"SetTimeBaseZero", (PyCFunction
)TimeBaseObj_SetTimeBaseZero
, 1,
1403 "(TimeRecord zero) -> None"},
1404 {"GetTimeBaseEffectiveRate", (PyCFunction
)TimeBaseObj_GetTimeBaseEffectiveRate
, 1,
1405 "() -> (Fixed _rv)"},
1409 PyMethodChain TimeBaseObj_chain
= { TimeBaseObj_methods
, NULL
};
1411 static PyObject
*TimeBaseObj_getattr(self
, name
)
1412 TimeBaseObject
*self
;
1415 return Py_FindMethodInChain(&TimeBaseObj_chain
, (PyObject
*)self
, name
);
1418 #define TimeBaseObj_setattr NULL
1420 #define TimeBaseObj_compare NULL
1422 #define TimeBaseObj_repr NULL
1424 #define TimeBaseObj_hash NULL
1426 PyTypeObject TimeBase_Type
= {
1427 PyObject_HEAD_INIT(&PyType_Type
)
1429 "TimeBase", /*tp_name*/
1430 sizeof(TimeBaseObject
), /*tp_basicsize*/
1433 (destructor
) TimeBaseObj_dealloc
, /*tp_dealloc*/
1435 (getattrfunc
) TimeBaseObj_getattr
, /*tp_getattr*/
1436 (setattrfunc
) TimeBaseObj_setattr
, /*tp_setattr*/
1437 (cmpfunc
) TimeBaseObj_compare
, /*tp_compare*/
1438 (reprfunc
) TimeBaseObj_repr
, /*tp_repr*/
1439 (PyNumberMethods
*)0, /* tp_as_number */
1440 (PySequenceMethods
*)0, /* tp_as_sequence */
1441 (PyMappingMethods
*)0, /* tp_as_mapping */
1442 (hashfunc
) TimeBaseObj_hash
, /*tp_hash*/
1445 /* -------------------- End object type TimeBase -------------------- */
1448 /* ---------------------- Object type UserData ---------------------- */
1450 PyTypeObject UserData_Type
;
1452 #define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type)
1454 typedef struct UserDataObject
{
1459 PyObject
*UserDataObj_New(itself
)
1463 if (itself
== NULL
) {
1464 PyErr_SetString(Qt_Error
,"Cannot create null UserData");
1467 it
= PyObject_NEW(UserDataObject
, &UserData_Type
);
1468 if (it
== NULL
) return NULL
;
1469 it
->ob_itself
= itself
;
1470 return (PyObject
*)it
;
1472 UserDataObj_Convert(v
, p_itself
)
1476 if (!UserDataObj_Check(v
))
1478 PyErr_SetString(PyExc_TypeError
, "UserData required");
1481 *p_itself
= ((UserDataObject
*)v
)->ob_itself
;
1485 static void UserDataObj_dealloc(self
)
1486 UserDataObject
*self
;
1488 DisposeUserData(self
->ob_itself
);
1492 static PyObject
*UserDataObj_GetUserData(_self
, _args
)
1493 UserDataObject
*_self
;
1496 PyObject
*_res
= NULL
;
1501 if (!PyArg_ParseTuple(_args
, "O&O&l",
1502 ResObj_Convert
, &data
,
1503 PyMac_GetOSType
, &udType
,
1506 _err
= GetUserData(_self
->ob_itself
,
1510 if (_err
!= noErr
) return PyMac_Error(_err
);
1516 static PyObject
*UserDataObj_AddUserData(_self
, _args
)
1517 UserDataObject
*_self
;
1520 PyObject
*_res
= NULL
;
1524 if (!PyArg_ParseTuple(_args
, "O&O&",
1525 ResObj_Convert
, &data
,
1526 PyMac_GetOSType
, &udType
))
1528 _err
= AddUserData(_self
->ob_itself
,
1531 if (_err
!= noErr
) return PyMac_Error(_err
);
1537 static PyObject
*UserDataObj_RemoveUserData(_self
, _args
)
1538 UserDataObject
*_self
;
1541 PyObject
*_res
= NULL
;
1545 if (!PyArg_ParseTuple(_args
, "O&l",
1546 PyMac_GetOSType
, &udType
,
1549 _err
= RemoveUserData(_self
->ob_itself
,
1552 if (_err
!= noErr
) return PyMac_Error(_err
);
1558 static PyObject
*UserDataObj_CountUserDataType(_self
, _args
)
1559 UserDataObject
*_self
;
1562 PyObject
*_res
= NULL
;
1565 if (!PyArg_ParseTuple(_args
, "O&",
1566 PyMac_GetOSType
, &udType
))
1568 _rv
= CountUserDataType(_self
->ob_itself
,
1570 _res
= Py_BuildValue("h",
1575 static PyObject
*UserDataObj_GetNextUserDataType(_self
, _args
)
1576 UserDataObject
*_self
;
1579 PyObject
*_res
= NULL
;
1582 if (!PyArg_ParseTuple(_args
, "O&",
1583 PyMac_GetOSType
, &udType
))
1585 _rv
= GetNextUserDataType(_self
->ob_itself
,
1587 _res
= Py_BuildValue("l",
1592 static PyObject
*UserDataObj_AddUserDataText(_self
, _args
)
1593 UserDataObject
*_self
;
1596 PyObject
*_res
= NULL
;
1602 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1603 ResObj_Convert
, &data
,
1604 PyMac_GetOSType
, &udType
,
1608 _err
= AddUserDataText(_self
->ob_itself
,
1613 if (_err
!= noErr
) return PyMac_Error(_err
);
1619 static PyObject
*UserDataObj_GetUserDataText(_self
, _args
)
1620 UserDataObject
*_self
;
1623 PyObject
*_res
= NULL
;
1629 if (!PyArg_ParseTuple(_args
, "O&O&lh",
1630 ResObj_Convert
, &data
,
1631 PyMac_GetOSType
, &udType
,
1635 _err
= GetUserDataText(_self
->ob_itself
,
1640 if (_err
!= noErr
) return PyMac_Error(_err
);
1646 static PyObject
*UserDataObj_RemoveUserDataText(_self
, _args
)
1647 UserDataObject
*_self
;
1650 PyObject
*_res
= NULL
;
1655 if (!PyArg_ParseTuple(_args
, "O&lh",
1656 PyMac_GetOSType
, &udType
,
1660 _err
= RemoveUserDataText(_self
->ob_itself
,
1664 if (_err
!= noErr
) return PyMac_Error(_err
);
1670 static PyObject
*UserDataObj_PutUserDataIntoHandle(_self
, _args
)
1671 UserDataObject
*_self
;
1674 PyObject
*_res
= NULL
;
1677 if (!PyArg_ParseTuple(_args
, "O&",
1678 ResObj_Convert
, &h
))
1680 _err
= PutUserDataIntoHandle(_self
->ob_itself
,
1682 if (_err
!= noErr
) return PyMac_Error(_err
);
1688 static PyMethodDef UserDataObj_methods
[] = {
1689 {"GetUserData", (PyCFunction
)UserDataObj_GetUserData
, 1,
1690 "(Handle data, OSType udType, long index) -> None"},
1691 {"AddUserData", (PyCFunction
)UserDataObj_AddUserData
, 1,
1692 "(Handle data, OSType udType) -> None"},
1693 {"RemoveUserData", (PyCFunction
)UserDataObj_RemoveUserData
, 1,
1694 "(OSType udType, long index) -> None"},
1695 {"CountUserDataType", (PyCFunction
)UserDataObj_CountUserDataType
, 1,
1696 "(OSType udType) -> (short _rv)"},
1697 {"GetNextUserDataType", (PyCFunction
)UserDataObj_GetNextUserDataType
, 1,
1698 "(OSType udType) -> (long _rv)"},
1699 {"AddUserDataText", (PyCFunction
)UserDataObj_AddUserDataText
, 1,
1700 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1701 {"GetUserDataText", (PyCFunction
)UserDataObj_GetUserDataText
, 1,
1702 "(Handle data, OSType udType, long index, short itlRegionTag) -> None"},
1703 {"RemoveUserDataText", (PyCFunction
)UserDataObj_RemoveUserDataText
, 1,
1704 "(OSType udType, long index, short itlRegionTag) -> None"},
1705 {"PutUserDataIntoHandle", (PyCFunction
)UserDataObj_PutUserDataIntoHandle
, 1,
1706 "(Handle h) -> None"},
1710 PyMethodChain UserDataObj_chain
= { UserDataObj_methods
, NULL
};
1712 static PyObject
*UserDataObj_getattr(self
, name
)
1713 UserDataObject
*self
;
1716 return Py_FindMethodInChain(&UserDataObj_chain
, (PyObject
*)self
, name
);
1719 #define UserDataObj_setattr NULL
1721 #define UserDataObj_compare NULL
1723 #define UserDataObj_repr NULL
1725 #define UserDataObj_hash NULL
1727 PyTypeObject UserData_Type
= {
1728 PyObject_HEAD_INIT(&PyType_Type
)
1730 "UserData", /*tp_name*/
1731 sizeof(UserDataObject
), /*tp_basicsize*/
1734 (destructor
) UserDataObj_dealloc
, /*tp_dealloc*/
1736 (getattrfunc
) UserDataObj_getattr
, /*tp_getattr*/
1737 (setattrfunc
) UserDataObj_setattr
, /*tp_setattr*/
1738 (cmpfunc
) UserDataObj_compare
, /*tp_compare*/
1739 (reprfunc
) UserDataObj_repr
, /*tp_repr*/
1740 (PyNumberMethods
*)0, /* tp_as_number */
1741 (PySequenceMethods
*)0, /* tp_as_sequence */
1742 (PyMappingMethods
*)0, /* tp_as_mapping */
1743 (hashfunc
) UserDataObj_hash
, /*tp_hash*/
1746 /* -------------------- End object type UserData -------------------- */
1749 /* ----------------------- Object type Media ------------------------ */
1751 PyTypeObject Media_Type
;
1753 #define MediaObj_Check(x) ((x)->ob_type == &Media_Type)
1755 typedef struct MediaObject
{
1760 PyObject
*MediaObj_New(itself
)
1764 if (itself
== NULL
) {
1765 PyErr_SetString(Qt_Error
,"Cannot create null Media");
1768 it
= PyObject_NEW(MediaObject
, &Media_Type
);
1769 if (it
== NULL
) return NULL
;
1770 it
->ob_itself
= itself
;
1771 return (PyObject
*)it
;
1773 MediaObj_Convert(v
, p_itself
)
1777 if (!MediaObj_Check(v
))
1779 PyErr_SetString(PyExc_TypeError
, "Media required");
1782 *p_itself
= ((MediaObject
*)v
)->ob_itself
;
1786 static void MediaObj_dealloc(self
)
1789 DisposeTrackMedia(self
->ob_itself
);
1793 static PyObject
*MediaObj_LoadMediaIntoRam(_self
, _args
)
1797 PyObject
*_res
= NULL
;
1802 if (!PyArg_ParseTuple(_args
, "lll",
1807 _err
= LoadMediaIntoRam(_self
->ob_itself
,
1811 if (_err
!= noErr
) return PyMac_Error(_err
);
1817 static PyObject
*MediaObj_GetMediaTrack(_self
, _args
)
1821 PyObject
*_res
= NULL
;
1823 if (!PyArg_ParseTuple(_args
, ""))
1825 _rv
= GetMediaTrack(_self
->ob_itself
);
1826 _res
= Py_BuildValue("O&",
1831 static PyObject
*MediaObj_GetMediaCreationTime(_self
, _args
)
1835 PyObject
*_res
= NULL
;
1837 if (!PyArg_ParseTuple(_args
, ""))
1839 _rv
= GetMediaCreationTime(_self
->ob_itself
);
1840 _res
= Py_BuildValue("l",
1845 static PyObject
*MediaObj_GetMediaModificationTime(_self
, _args
)
1849 PyObject
*_res
= NULL
;
1851 if (!PyArg_ParseTuple(_args
, ""))
1853 _rv
= GetMediaModificationTime(_self
->ob_itself
);
1854 _res
= Py_BuildValue("l",
1859 static PyObject
*MediaObj_GetMediaTimeScale(_self
, _args
)
1863 PyObject
*_res
= NULL
;
1865 if (!PyArg_ParseTuple(_args
, ""))
1867 _rv
= GetMediaTimeScale(_self
->ob_itself
);
1868 _res
= Py_BuildValue("l",
1873 static PyObject
*MediaObj_SetMediaTimeScale(_self
, _args
)
1877 PyObject
*_res
= NULL
;
1878 TimeScale timeScale
;
1879 if (!PyArg_ParseTuple(_args
, "l",
1882 SetMediaTimeScale(_self
->ob_itself
,
1889 static PyObject
*MediaObj_GetMediaDuration(_self
, _args
)
1893 PyObject
*_res
= NULL
;
1895 if (!PyArg_ParseTuple(_args
, ""))
1897 _rv
= GetMediaDuration(_self
->ob_itself
);
1898 _res
= Py_BuildValue("l",
1903 static PyObject
*MediaObj_GetMediaLanguage(_self
, _args
)
1907 PyObject
*_res
= NULL
;
1909 if (!PyArg_ParseTuple(_args
, ""))
1911 _rv
= GetMediaLanguage(_self
->ob_itself
);
1912 _res
= Py_BuildValue("h",
1917 static PyObject
*MediaObj_SetMediaLanguage(_self
, _args
)
1921 PyObject
*_res
= NULL
;
1923 if (!PyArg_ParseTuple(_args
, "h",
1926 SetMediaLanguage(_self
->ob_itself
,
1933 static PyObject
*MediaObj_GetMediaQuality(_self
, _args
)
1937 PyObject
*_res
= NULL
;
1939 if (!PyArg_ParseTuple(_args
, ""))
1941 _rv
= GetMediaQuality(_self
->ob_itself
);
1942 _res
= Py_BuildValue("h",
1947 static PyObject
*MediaObj_SetMediaQuality(_self
, _args
)
1951 PyObject
*_res
= NULL
;
1953 if (!PyArg_ParseTuple(_args
, "h",
1956 SetMediaQuality(_self
->ob_itself
,
1963 static PyObject
*MediaObj_GetMediaHandlerDescription(_self
, _args
)
1967 PyObject
*_res
= NULL
;
1970 OSType creatorManufacturer
;
1971 if (!PyArg_ParseTuple(_args
, "O&",
1972 PyMac_GetStr255
, creatorName
))
1974 GetMediaHandlerDescription(_self
->ob_itself
,
1977 &creatorManufacturer
);
1978 _res
= Py_BuildValue("O&O&",
1979 PyMac_BuildOSType
, mediaType
,
1980 PyMac_BuildOSType
, creatorManufacturer
);
1984 static PyObject
*MediaObj_GetMediaUserData(_self
, _args
)
1988 PyObject
*_res
= NULL
;
1990 if (!PyArg_ParseTuple(_args
, ""))
1992 _rv
= GetMediaUserData(_self
->ob_itself
);
1993 _res
= Py_BuildValue("O&",
1994 UserDataObj_New
, _rv
);
1998 static PyObject
*MediaObj_GetMediaHandler(_self
, _args
)
2002 PyObject
*_res
= NULL
;
2004 if (!PyArg_ParseTuple(_args
, ""))
2006 _rv
= GetMediaHandler(_self
->ob_itself
);
2007 _res
= Py_BuildValue("O&",
2008 CmpInstObj_New
, _rv
);
2012 static PyObject
*MediaObj_SetMediaHandler(_self
, _args
)
2016 PyObject
*_res
= NULL
;
2018 MediaHandlerComponent mH
;
2019 if (!PyArg_ParseTuple(_args
, "O&",
2020 CmpObj_Convert
, &mH
))
2022 _err
= SetMediaHandler(_self
->ob_itself
,
2024 if (_err
!= noErr
) return PyMac_Error(_err
);
2030 static PyObject
*MediaObj_BeginMediaEdits(_self
, _args
)
2034 PyObject
*_res
= NULL
;
2036 if (!PyArg_ParseTuple(_args
, ""))
2038 _err
= BeginMediaEdits(_self
->ob_itself
);
2039 if (_err
!= noErr
) return PyMac_Error(_err
);
2045 static PyObject
*MediaObj_EndMediaEdits(_self
, _args
)
2049 PyObject
*_res
= NULL
;
2051 if (!PyArg_ParseTuple(_args
, ""))
2053 _err
= EndMediaEdits(_self
->ob_itself
);
2054 if (_err
!= noErr
) return PyMac_Error(_err
);
2060 static PyObject
*MediaObj_SetMediaDefaultDataRefIndex(_self
, _args
)
2064 PyObject
*_res
= NULL
;
2067 if (!PyArg_ParseTuple(_args
, "h",
2070 _err
= SetMediaDefaultDataRefIndex(_self
->ob_itself
,
2072 if (_err
!= noErr
) return PyMac_Error(_err
);
2078 static PyObject
*MediaObj_GetMediaDataHandlerDescription(_self
, _args
)
2082 PyObject
*_res
= NULL
;
2086 OSType creatorManufacturer
;
2087 if (!PyArg_ParseTuple(_args
, "hO&",
2089 PyMac_GetStr255
, creatorName
))
2091 GetMediaDataHandlerDescription(_self
->ob_itself
,
2095 &creatorManufacturer
);
2096 _res
= Py_BuildValue("O&O&",
2097 PyMac_BuildOSType
, dhType
,
2098 PyMac_BuildOSType
, creatorManufacturer
);
2102 static PyObject
*MediaObj_GetMediaDataHandler(_self
, _args
)
2106 PyObject
*_res
= NULL
;
2109 if (!PyArg_ParseTuple(_args
, "h",
2112 _rv
= GetMediaDataHandler(_self
->ob_itself
,
2114 _res
= Py_BuildValue("O&",
2115 CmpInstObj_New
, _rv
);
2119 static PyObject
*MediaObj_SetMediaDataHandler(_self
, _args
)
2123 PyObject
*_res
= NULL
;
2126 DataHandlerComponent dataHandler
;
2127 if (!PyArg_ParseTuple(_args
, "hO&",
2129 CmpObj_Convert
, &dataHandler
))
2131 _err
= SetMediaDataHandler(_self
->ob_itself
,
2134 if (_err
!= noErr
) return PyMac_Error(_err
);
2140 static PyObject
*MediaObj_GetMediaSampleDescriptionCount(_self
, _args
)
2144 PyObject
*_res
= NULL
;
2146 if (!PyArg_ParseTuple(_args
, ""))
2148 _rv
= GetMediaSampleDescriptionCount(_self
->ob_itself
);
2149 _res
= Py_BuildValue("l",
2154 static PyObject
*MediaObj_GetMediaSampleDescription(_self
, _args
)
2158 PyObject
*_res
= NULL
;
2160 SampleDescriptionHandle descH
;
2161 if (!PyArg_ParseTuple(_args
, "lO&",
2163 ResObj_Convert
, &descH
))
2165 GetMediaSampleDescription(_self
->ob_itself
,
2173 static PyObject
*MediaObj_SetMediaSampleDescription(_self
, _args
)
2177 PyObject
*_res
= NULL
;
2180 SampleDescriptionHandle descH
;
2181 if (!PyArg_ParseTuple(_args
, "lO&",
2183 ResObj_Convert
, &descH
))
2185 _err
= SetMediaSampleDescription(_self
->ob_itself
,
2188 if (_err
!= noErr
) return PyMac_Error(_err
);
2194 static PyObject
*MediaObj_GetMediaSampleCount(_self
, _args
)
2198 PyObject
*_res
= NULL
;
2200 if (!PyArg_ParseTuple(_args
, ""))
2202 _rv
= GetMediaSampleCount(_self
->ob_itself
);
2203 _res
= Py_BuildValue("l",
2208 static PyObject
*MediaObj_GetMediaSyncSampleCount(_self
, _args
)
2212 PyObject
*_res
= NULL
;
2214 if (!PyArg_ParseTuple(_args
, ""))
2216 _rv
= GetMediaSyncSampleCount(_self
->ob_itself
);
2217 _res
= Py_BuildValue("l",
2222 static PyObject
*MediaObj_SampleNumToMediaTime(_self
, _args
)
2226 PyObject
*_res
= NULL
;
2227 long logicalSampleNum
;
2228 TimeValue sampleTime
;
2229 TimeValue sampleDuration
;
2230 if (!PyArg_ParseTuple(_args
, "l",
2233 SampleNumToMediaTime(_self
->ob_itself
,
2237 _res
= Py_BuildValue("ll",
2243 static PyObject
*MediaObj_MediaTimeToSampleNum(_self
, _args
)
2247 PyObject
*_res
= NULL
;
2250 TimeValue sampleTime
;
2251 TimeValue sampleDuration
;
2252 if (!PyArg_ParseTuple(_args
, "l",
2255 MediaTimeToSampleNum(_self
->ob_itself
,
2260 _res
= Py_BuildValue("lll",
2267 static PyObject
*MediaObj_AddMediaSample(_self
, _args
)
2271 PyObject
*_res
= NULL
;
2276 TimeValue durationPerSample
;
2277 SampleDescriptionHandle sampleDescriptionH
;
2278 long numberOfSamples
;
2280 TimeValue sampleTime
;
2281 if (!PyArg_ParseTuple(_args
, "O&lllO&lh",
2282 ResObj_Convert
, &dataIn
,
2286 ResObj_Convert
, &sampleDescriptionH
,
2290 _err
= AddMediaSample(_self
->ob_itself
,
2299 if (_err
!= noErr
) return PyMac_Error(_err
);
2300 _res
= Py_BuildValue("l",
2305 static PyObject
*MediaObj_AddMediaSampleReference(_self
, _args
)
2309 PyObject
*_res
= NULL
;
2313 TimeValue durationPerSample
;
2314 SampleDescriptionHandle sampleDescriptionH
;
2315 long numberOfSamples
;
2317 TimeValue sampleTime
;
2318 if (!PyArg_ParseTuple(_args
, "lllO&lh",
2322 ResObj_Convert
, &sampleDescriptionH
,
2326 _err
= AddMediaSampleReference(_self
->ob_itself
,
2334 if (_err
!= noErr
) return PyMac_Error(_err
);
2335 _res
= Py_BuildValue("l",
2340 static PyObject
*MediaObj_GetMediaSample(_self
, _args
)
2344 PyObject
*_res
= NULL
;
2350 TimeValue sampleTime
;
2351 TimeValue durationPerSample
;
2352 SampleDescriptionHandle sampleDescriptionH
;
2353 long sampleDescriptionIndex
;
2354 long maxNumberOfSamples
;
2355 long numberOfSamples
;
2357 if (!PyArg_ParseTuple(_args
, "O&llO&l",
2358 ResObj_Convert
, &dataOut
,
2361 ResObj_Convert
, &sampleDescriptionH
,
2362 &maxNumberOfSamples
))
2364 _err
= GetMediaSample(_self
->ob_itself
,
2372 &sampleDescriptionIndex
,
2376 if (_err
!= noErr
) return PyMac_Error(_err
);
2377 _res
= Py_BuildValue("lllllh",
2381 sampleDescriptionIndex
,
2387 static PyObject
*MediaObj_GetMediaSampleReference(_self
, _args
)
2391 PyObject
*_res
= NULL
;
2396 TimeValue sampleTime
;
2397 TimeValue durationPerSample
;
2398 SampleDescriptionHandle sampleDescriptionH
;
2399 long sampleDescriptionIndex
;
2400 long maxNumberOfSamples
;
2401 long numberOfSamples
;
2403 if (!PyArg_ParseTuple(_args
, "lO&l",
2405 ResObj_Convert
, &sampleDescriptionH
,
2406 &maxNumberOfSamples
))
2408 _err
= GetMediaSampleReference(_self
->ob_itself
,
2415 &sampleDescriptionIndex
,
2419 if (_err
!= noErr
) return PyMac_Error(_err
);
2420 _res
= Py_BuildValue("llllllh",
2425 sampleDescriptionIndex
,
2431 static PyObject
*MediaObj_SetMediaPreferredChunkSize(_self
, _args
)
2435 PyObject
*_res
= NULL
;
2438 if (!PyArg_ParseTuple(_args
, "l",
2441 _err
= SetMediaPreferredChunkSize(_self
->ob_itself
,
2443 if (_err
!= noErr
) return PyMac_Error(_err
);
2449 static PyObject
*MediaObj_GetMediaPreferredChunkSize(_self
, _args
)
2453 PyObject
*_res
= NULL
;
2456 if (!PyArg_ParseTuple(_args
, ""))
2458 _err
= GetMediaPreferredChunkSize(_self
->ob_itself
,
2460 if (_err
!= noErr
) return PyMac_Error(_err
);
2461 _res
= Py_BuildValue("l",
2466 static PyObject
*MediaObj_SetMediaShadowSync(_self
, _args
)
2470 PyObject
*_res
= NULL
;
2472 long frameDiffSampleNum
;
2474 if (!PyArg_ParseTuple(_args
, "ll",
2475 &frameDiffSampleNum
,
2478 _err
= SetMediaShadowSync(_self
->ob_itself
,
2481 if (_err
!= noErr
) return PyMac_Error(_err
);
2487 static PyObject
*MediaObj_GetMediaShadowSync(_self
, _args
)
2491 PyObject
*_res
= NULL
;
2493 long frameDiffSampleNum
;
2495 if (!PyArg_ParseTuple(_args
, "l",
2496 &frameDiffSampleNum
))
2498 _err
= GetMediaShadowSync(_self
->ob_itself
,
2501 if (_err
!= noErr
) return PyMac_Error(_err
);
2502 _res
= Py_BuildValue("l",
2507 static PyObject
*MediaObj_GetMediaDataSize(_self
, _args
)
2511 PyObject
*_res
= NULL
;
2513 TimeValue startTime
;
2515 if (!PyArg_ParseTuple(_args
, "ll",
2519 _rv
= GetMediaDataSize(_self
->ob_itself
,
2522 _res
= Py_BuildValue("l",
2527 static PyObject
*MediaObj_GetMediaDataSize64(_self
, _args
)
2531 PyObject
*_res
= NULL
;
2533 TimeValue startTime
;
2536 if (!PyArg_ParseTuple(_args
, "ll",
2540 _err
= GetMediaDataSize64(_self
->ob_itself
,
2544 if (_err
!= noErr
) return PyMac_Error(_err
);
2545 _res
= Py_BuildValue("O&",
2546 PyMac_Buildwide
, dataSize
);
2550 static PyObject
*MediaObj_GetMediaNextInterestingTime(_self
, _args
)
2554 PyObject
*_res
= NULL
;
2555 short interestingTimeFlags
;
2558 TimeValue interestingTime
;
2559 TimeValue interestingDuration
;
2560 if (!PyArg_ParseTuple(_args
, "hlO&",
2561 &interestingTimeFlags
,
2563 PyMac_GetFixed
, &rate
))
2565 GetMediaNextInterestingTime(_self
->ob_itself
,
2566 interestingTimeFlags
,
2570 &interestingDuration
);
2571 _res
= Py_BuildValue("ll",
2573 interestingDuration
);
2577 static PyObject
*MediaObj_GetMediaDataRef(_self
, _args
)
2581 PyObject
*_res
= NULL
;
2586 long dataRefAttributes
;
2587 if (!PyArg_ParseTuple(_args
, "h",
2590 _err
= GetMediaDataRef(_self
->ob_itself
,
2594 &dataRefAttributes
);
2595 if (_err
!= noErr
) return PyMac_Error(_err
);
2596 _res
= Py_BuildValue("O&O&l",
2597 ResObj_New
, dataRef
,
2598 PyMac_BuildOSType
, dataRefType
,
2603 static PyObject
*MediaObj_SetMediaDataRef(_self
, _args
)
2607 PyObject
*_res
= NULL
;
2612 if (!PyArg_ParseTuple(_args
, "hO&O&",
2614 ResObj_Convert
, &dataRef
,
2615 PyMac_GetOSType
, &dataRefType
))
2617 _err
= SetMediaDataRef(_self
->ob_itself
,
2621 if (_err
!= noErr
) return PyMac_Error(_err
);
2627 static PyObject
*MediaObj_SetMediaDataRefAttributes(_self
, _args
)
2631 PyObject
*_res
= NULL
;
2634 long dataRefAttributes
;
2635 if (!PyArg_ParseTuple(_args
, "hl",
2637 &dataRefAttributes
))
2639 _err
= SetMediaDataRefAttributes(_self
->ob_itself
,
2642 if (_err
!= noErr
) return PyMac_Error(_err
);
2648 static PyObject
*MediaObj_AddMediaDataRef(_self
, _args
)
2652 PyObject
*_res
= NULL
;
2657 if (!PyArg_ParseTuple(_args
, "O&O&",
2658 ResObj_Convert
, &dataRef
,
2659 PyMac_GetOSType
, &dataRefType
))
2661 _err
= AddMediaDataRef(_self
->ob_itself
,
2665 if (_err
!= noErr
) return PyMac_Error(_err
);
2666 _res
= Py_BuildValue("h",
2671 static PyObject
*MediaObj_GetMediaDataRefCount(_self
, _args
)
2675 PyObject
*_res
= NULL
;
2678 if (!PyArg_ParseTuple(_args
, ""))
2680 _err
= GetMediaDataRefCount(_self
->ob_itself
,
2682 if (_err
!= noErr
) return PyMac_Error(_err
);
2683 _res
= Py_BuildValue("h",
2688 static PyObject
*MediaObj_SetMediaPlayHints(_self
, _args
)
2692 PyObject
*_res
= NULL
;
2695 if (!PyArg_ParseTuple(_args
, "ll",
2699 SetMediaPlayHints(_self
->ob_itself
,
2707 static PyObject
*MediaObj_GetMediaPlayHints(_self
, _args
)
2711 PyObject
*_res
= NULL
;
2713 if (!PyArg_ParseTuple(_args
, ""))
2715 GetMediaPlayHints(_self
->ob_itself
,
2717 _res
= Py_BuildValue("l",
2722 static PyObject
*MediaObj_GetMediaNextInterestingTimeOnly(_self
, _args
)
2726 PyObject
*_res
= NULL
;
2727 short interestingTimeFlags
;
2730 TimeValue interestingTime
;
2731 if (!PyArg_ParseTuple(_args
, "hlO&",
2732 &interestingTimeFlags
,
2734 PyMac_GetFixed
, &rate
))
2736 GetMediaNextInterestingTimeOnly(_self
->ob_itself
,
2737 interestingTimeFlags
,
2741 _res
= Py_BuildValue("l",
2746 static PyMethodDef MediaObj_methods
[] = {
2747 {"LoadMediaIntoRam", (PyCFunction
)MediaObj_LoadMediaIntoRam
, 1,
2748 "(TimeValue time, TimeValue duration, long flags) -> None"},
2749 {"GetMediaTrack", (PyCFunction
)MediaObj_GetMediaTrack
, 1,
2750 "() -> (Track _rv)"},
2751 {"GetMediaCreationTime", (PyCFunction
)MediaObj_GetMediaCreationTime
, 1,
2752 "() -> (unsigned long _rv)"},
2753 {"GetMediaModificationTime", (PyCFunction
)MediaObj_GetMediaModificationTime
, 1,
2754 "() -> (unsigned long _rv)"},
2755 {"GetMediaTimeScale", (PyCFunction
)MediaObj_GetMediaTimeScale
, 1,
2756 "() -> (TimeScale _rv)"},
2757 {"SetMediaTimeScale", (PyCFunction
)MediaObj_SetMediaTimeScale
, 1,
2758 "(TimeScale timeScale) -> None"},
2759 {"GetMediaDuration", (PyCFunction
)MediaObj_GetMediaDuration
, 1,
2760 "() -> (TimeValue _rv)"},
2761 {"GetMediaLanguage", (PyCFunction
)MediaObj_GetMediaLanguage
, 1,
2762 "() -> (short _rv)"},
2763 {"SetMediaLanguage", (PyCFunction
)MediaObj_SetMediaLanguage
, 1,
2764 "(short language) -> None"},
2765 {"GetMediaQuality", (PyCFunction
)MediaObj_GetMediaQuality
, 1,
2766 "() -> (short _rv)"},
2767 {"SetMediaQuality", (PyCFunction
)MediaObj_SetMediaQuality
, 1,
2768 "(short quality) -> None"},
2769 {"GetMediaHandlerDescription", (PyCFunction
)MediaObj_GetMediaHandlerDescription
, 1,
2770 "(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)"},
2771 {"GetMediaUserData", (PyCFunction
)MediaObj_GetMediaUserData
, 1,
2772 "() -> (UserData _rv)"},
2773 {"GetMediaHandler", (PyCFunction
)MediaObj_GetMediaHandler
, 1,
2774 "() -> (MediaHandler _rv)"},
2775 {"SetMediaHandler", (PyCFunction
)MediaObj_SetMediaHandler
, 1,
2776 "(MediaHandlerComponent mH) -> None"},
2777 {"BeginMediaEdits", (PyCFunction
)MediaObj_BeginMediaEdits
, 1,
2779 {"EndMediaEdits", (PyCFunction
)MediaObj_EndMediaEdits
, 1,
2781 {"SetMediaDefaultDataRefIndex", (PyCFunction
)MediaObj_SetMediaDefaultDataRefIndex
, 1,
2782 "(short index) -> None"},
2783 {"GetMediaDataHandlerDescription", (PyCFunction
)MediaObj_GetMediaDataHandlerDescription
, 1,
2784 "(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)"},
2785 {"GetMediaDataHandler", (PyCFunction
)MediaObj_GetMediaDataHandler
, 1,
2786 "(short index) -> (DataHandler _rv)"},
2787 {"SetMediaDataHandler", (PyCFunction
)MediaObj_SetMediaDataHandler
, 1,
2788 "(short index, DataHandlerComponent dataHandler) -> None"},
2789 {"GetMediaSampleDescriptionCount", (PyCFunction
)MediaObj_GetMediaSampleDescriptionCount
, 1,
2790 "() -> (long _rv)"},
2791 {"GetMediaSampleDescription", (PyCFunction
)MediaObj_GetMediaSampleDescription
, 1,
2792 "(long index, SampleDescriptionHandle descH) -> None"},
2793 {"SetMediaSampleDescription", (PyCFunction
)MediaObj_SetMediaSampleDescription
, 1,
2794 "(long index, SampleDescriptionHandle descH) -> None"},
2795 {"GetMediaSampleCount", (PyCFunction
)MediaObj_GetMediaSampleCount
, 1,
2796 "() -> (long _rv)"},
2797 {"GetMediaSyncSampleCount", (PyCFunction
)MediaObj_GetMediaSyncSampleCount
, 1,
2798 "() -> (long _rv)"},
2799 {"SampleNumToMediaTime", (PyCFunction
)MediaObj_SampleNumToMediaTime
, 1,
2800 "(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)"},
2801 {"MediaTimeToSampleNum", (PyCFunction
)MediaObj_MediaTimeToSampleNum
, 1,
2802 "(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)"},
2803 {"AddMediaSample", (PyCFunction
)MediaObj_AddMediaSample
, 1,
2804 "(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2805 {"AddMediaSampleReference", (PyCFunction
)MediaObj_AddMediaSampleReference
, 1,
2806 "(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)"},
2807 {"GetMediaSample", (PyCFunction
)MediaObj_GetMediaSample
, 1,
2808 "(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2809 {"GetMediaSampleReference", (PyCFunction
)MediaObj_GetMediaSampleReference
, 1,
2810 "(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)"},
2811 {"SetMediaPreferredChunkSize", (PyCFunction
)MediaObj_SetMediaPreferredChunkSize
, 1,
2812 "(long maxChunkSize) -> None"},
2813 {"GetMediaPreferredChunkSize", (PyCFunction
)MediaObj_GetMediaPreferredChunkSize
, 1,
2814 "() -> (long maxChunkSize)"},
2815 {"SetMediaShadowSync", (PyCFunction
)MediaObj_SetMediaShadowSync
, 1,
2816 "(long frameDiffSampleNum, long syncSampleNum) -> None"},
2817 {"GetMediaShadowSync", (PyCFunction
)MediaObj_GetMediaShadowSync
, 1,
2818 "(long frameDiffSampleNum) -> (long syncSampleNum)"},
2819 {"GetMediaDataSize", (PyCFunction
)MediaObj_GetMediaDataSize
, 1,
2820 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
2821 {"GetMediaDataSize64", (PyCFunction
)MediaObj_GetMediaDataSize64
, 1,
2822 "(TimeValue startTime, TimeValue duration) -> (wide dataSize)"},
2823 {"GetMediaNextInterestingTime", (PyCFunction
)MediaObj_GetMediaNextInterestingTime
, 1,
2824 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
2825 {"GetMediaDataRef", (PyCFunction
)MediaObj_GetMediaDataRef
, 1,
2826 "(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)"},
2827 {"SetMediaDataRef", (PyCFunction
)MediaObj_SetMediaDataRef
, 1,
2828 "(short index, Handle dataRef, OSType dataRefType) -> None"},
2829 {"SetMediaDataRefAttributes", (PyCFunction
)MediaObj_SetMediaDataRefAttributes
, 1,
2830 "(short index, long dataRefAttributes) -> None"},
2831 {"AddMediaDataRef", (PyCFunction
)MediaObj_AddMediaDataRef
, 1,
2832 "(Handle dataRef, OSType dataRefType) -> (short index)"},
2833 {"GetMediaDataRefCount", (PyCFunction
)MediaObj_GetMediaDataRefCount
, 1,
2834 "() -> (short count)"},
2835 {"SetMediaPlayHints", (PyCFunction
)MediaObj_SetMediaPlayHints
, 1,
2836 "(long flags, long flagsMask) -> None"},
2837 {"GetMediaPlayHints", (PyCFunction
)MediaObj_GetMediaPlayHints
, 1,
2838 "() -> (long flags)"},
2839 {"GetMediaNextInterestingTimeOnly", (PyCFunction
)MediaObj_GetMediaNextInterestingTimeOnly
, 1,
2840 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime)"},
2844 PyMethodChain MediaObj_chain
= { MediaObj_methods
, NULL
};
2846 static PyObject
*MediaObj_getattr(self
, name
)
2850 return Py_FindMethodInChain(&MediaObj_chain
, (PyObject
*)self
, name
);
2853 #define MediaObj_setattr NULL
2855 #define MediaObj_compare NULL
2857 #define MediaObj_repr NULL
2859 #define MediaObj_hash NULL
2861 PyTypeObject Media_Type
= {
2862 PyObject_HEAD_INIT(&PyType_Type
)
2864 "Media", /*tp_name*/
2865 sizeof(MediaObject
), /*tp_basicsize*/
2868 (destructor
) MediaObj_dealloc
, /*tp_dealloc*/
2870 (getattrfunc
) MediaObj_getattr
, /*tp_getattr*/
2871 (setattrfunc
) MediaObj_setattr
, /*tp_setattr*/
2872 (cmpfunc
) MediaObj_compare
, /*tp_compare*/
2873 (reprfunc
) MediaObj_repr
, /*tp_repr*/
2874 (PyNumberMethods
*)0, /* tp_as_number */
2875 (PySequenceMethods
*)0, /* tp_as_sequence */
2876 (PyMappingMethods
*)0, /* tp_as_mapping */
2877 (hashfunc
) MediaObj_hash
, /*tp_hash*/
2880 /* --------------------- End object type Media ---------------------- */
2883 /* ----------------------- Object type Track ------------------------ */
2885 PyTypeObject Track_Type
;
2887 #define TrackObj_Check(x) ((x)->ob_type == &Track_Type)
2889 typedef struct TrackObject
{
2894 PyObject
*TrackObj_New(itself
)
2898 if (itself
== NULL
) {
2899 PyErr_SetString(Qt_Error
,"Cannot create null Track");
2902 it
= PyObject_NEW(TrackObject
, &Track_Type
);
2903 if (it
== NULL
) return NULL
;
2904 it
->ob_itself
= itself
;
2905 return (PyObject
*)it
;
2907 TrackObj_Convert(v
, p_itself
)
2911 if (!TrackObj_Check(v
))
2913 PyErr_SetString(PyExc_TypeError
, "Track required");
2916 *p_itself
= ((TrackObject
*)v
)->ob_itself
;
2920 static void TrackObj_dealloc(self
)
2923 DisposeMovieTrack(self
->ob_itself
);
2927 static PyObject
*TrackObj_LoadTrackIntoRam(_self
, _args
)
2931 PyObject
*_res
= NULL
;
2936 if (!PyArg_ParseTuple(_args
, "lll",
2941 _err
= LoadTrackIntoRam(_self
->ob_itself
,
2945 if (_err
!= noErr
) return PyMac_Error(_err
);
2951 static PyObject
*TrackObj_GetTrackPict(_self
, _args
)
2955 PyObject
*_res
= NULL
;
2958 if (!PyArg_ParseTuple(_args
, "l",
2961 _rv
= GetTrackPict(_self
->ob_itself
,
2963 _res
= Py_BuildValue("O&",
2968 static PyObject
*TrackObj_GetTrackClipRgn(_self
, _args
)
2972 PyObject
*_res
= NULL
;
2974 if (!PyArg_ParseTuple(_args
, ""))
2976 _rv
= GetTrackClipRgn(_self
->ob_itself
);
2977 _res
= Py_BuildValue("O&",
2982 static PyObject
*TrackObj_SetTrackClipRgn(_self
, _args
)
2986 PyObject
*_res
= NULL
;
2988 if (!PyArg_ParseTuple(_args
, "O&",
2989 ResObj_Convert
, &theClip
))
2991 SetTrackClipRgn(_self
->ob_itself
,
2998 static PyObject
*TrackObj_GetTrackDisplayBoundsRgn(_self
, _args
)
3002 PyObject
*_res
= NULL
;
3004 if (!PyArg_ParseTuple(_args
, ""))
3006 _rv
= GetTrackDisplayBoundsRgn(_self
->ob_itself
);
3007 _res
= Py_BuildValue("O&",
3012 static PyObject
*TrackObj_GetTrackMovieBoundsRgn(_self
, _args
)
3016 PyObject
*_res
= NULL
;
3018 if (!PyArg_ParseTuple(_args
, ""))
3020 _rv
= GetTrackMovieBoundsRgn(_self
->ob_itself
);
3021 _res
= Py_BuildValue("O&",
3026 static PyObject
*TrackObj_GetTrackBoundsRgn(_self
, _args
)
3030 PyObject
*_res
= NULL
;
3032 if (!PyArg_ParseTuple(_args
, ""))
3034 _rv
= GetTrackBoundsRgn(_self
->ob_itself
);
3035 _res
= Py_BuildValue("O&",
3040 static PyObject
*TrackObj_GetTrackMatte(_self
, _args
)
3044 PyObject
*_res
= NULL
;
3046 if (!PyArg_ParseTuple(_args
, ""))
3048 _rv
= GetTrackMatte(_self
->ob_itself
);
3049 _res
= Py_BuildValue("O&",
3054 static PyObject
*TrackObj_SetTrackMatte(_self
, _args
)
3058 PyObject
*_res
= NULL
;
3059 PixMapHandle theMatte
;
3060 if (!PyArg_ParseTuple(_args
, "O&",
3061 ResObj_Convert
, &theMatte
))
3063 SetTrackMatte(_self
->ob_itself
,
3070 static PyObject
*TrackObj_GetTrackID(_self
, _args
)
3074 PyObject
*_res
= NULL
;
3076 if (!PyArg_ParseTuple(_args
, ""))
3078 _rv
= GetTrackID(_self
->ob_itself
);
3079 _res
= Py_BuildValue("l",
3084 static PyObject
*TrackObj_GetTrackMovie(_self
, _args
)
3088 PyObject
*_res
= NULL
;
3090 if (!PyArg_ParseTuple(_args
, ""))
3092 _rv
= GetTrackMovie(_self
->ob_itself
);
3093 _res
= Py_BuildValue("O&",
3098 static PyObject
*TrackObj_GetTrackCreationTime(_self
, _args
)
3102 PyObject
*_res
= NULL
;
3104 if (!PyArg_ParseTuple(_args
, ""))
3106 _rv
= GetTrackCreationTime(_self
->ob_itself
);
3107 _res
= Py_BuildValue("l",
3112 static PyObject
*TrackObj_GetTrackModificationTime(_self
, _args
)
3116 PyObject
*_res
= NULL
;
3118 if (!PyArg_ParseTuple(_args
, ""))
3120 _rv
= GetTrackModificationTime(_self
->ob_itself
);
3121 _res
= Py_BuildValue("l",
3126 static PyObject
*TrackObj_GetTrackEnabled(_self
, _args
)
3130 PyObject
*_res
= NULL
;
3132 if (!PyArg_ParseTuple(_args
, ""))
3134 _rv
= GetTrackEnabled(_self
->ob_itself
);
3135 _res
= Py_BuildValue("b",
3140 static PyObject
*TrackObj_SetTrackEnabled(_self
, _args
)
3144 PyObject
*_res
= NULL
;
3146 if (!PyArg_ParseTuple(_args
, "b",
3149 SetTrackEnabled(_self
->ob_itself
,
3156 static PyObject
*TrackObj_GetTrackUsage(_self
, _args
)
3160 PyObject
*_res
= NULL
;
3162 if (!PyArg_ParseTuple(_args
, ""))
3164 _rv
= GetTrackUsage(_self
->ob_itself
);
3165 _res
= Py_BuildValue("l",
3170 static PyObject
*TrackObj_SetTrackUsage(_self
, _args
)
3174 PyObject
*_res
= NULL
;
3176 if (!PyArg_ParseTuple(_args
, "l",
3179 SetTrackUsage(_self
->ob_itself
,
3186 static PyObject
*TrackObj_GetTrackDuration(_self
, _args
)
3190 PyObject
*_res
= NULL
;
3192 if (!PyArg_ParseTuple(_args
, ""))
3194 _rv
= GetTrackDuration(_self
->ob_itself
);
3195 _res
= Py_BuildValue("l",
3200 static PyObject
*TrackObj_GetTrackOffset(_self
, _args
)
3204 PyObject
*_res
= NULL
;
3206 if (!PyArg_ParseTuple(_args
, ""))
3208 _rv
= GetTrackOffset(_self
->ob_itself
);
3209 _res
= Py_BuildValue("l",
3214 static PyObject
*TrackObj_SetTrackOffset(_self
, _args
)
3218 PyObject
*_res
= NULL
;
3219 TimeValue movieOffsetTime
;
3220 if (!PyArg_ParseTuple(_args
, "l",
3223 SetTrackOffset(_self
->ob_itself
,
3230 static PyObject
*TrackObj_GetTrackLayer(_self
, _args
)
3234 PyObject
*_res
= NULL
;
3236 if (!PyArg_ParseTuple(_args
, ""))
3238 _rv
= GetTrackLayer(_self
->ob_itself
);
3239 _res
= Py_BuildValue("h",
3244 static PyObject
*TrackObj_SetTrackLayer(_self
, _args
)
3248 PyObject
*_res
= NULL
;
3250 if (!PyArg_ParseTuple(_args
, "h",
3253 SetTrackLayer(_self
->ob_itself
,
3260 static PyObject
*TrackObj_GetTrackAlternate(_self
, _args
)
3264 PyObject
*_res
= NULL
;
3266 if (!PyArg_ParseTuple(_args
, ""))
3268 _rv
= GetTrackAlternate(_self
->ob_itself
);
3269 _res
= Py_BuildValue("O&",
3274 static PyObject
*TrackObj_SetTrackAlternate(_self
, _args
)
3278 PyObject
*_res
= NULL
;
3280 if (!PyArg_ParseTuple(_args
, "O&",
3281 TrackObj_Convert
, &alternateT
))
3283 SetTrackAlternate(_self
->ob_itself
,
3290 static PyObject
*TrackObj_GetTrackVolume(_self
, _args
)
3294 PyObject
*_res
= NULL
;
3296 if (!PyArg_ParseTuple(_args
, ""))
3298 _rv
= GetTrackVolume(_self
->ob_itself
);
3299 _res
= Py_BuildValue("h",
3304 static PyObject
*TrackObj_SetTrackVolume(_self
, _args
)
3308 PyObject
*_res
= NULL
;
3310 if (!PyArg_ParseTuple(_args
, "h",
3313 SetTrackVolume(_self
->ob_itself
,
3320 static PyObject
*TrackObj_GetTrackDimensions(_self
, _args
)
3324 PyObject
*_res
= NULL
;
3327 if (!PyArg_ParseTuple(_args
, ""))
3329 GetTrackDimensions(_self
->ob_itself
,
3332 _res
= Py_BuildValue("O&O&",
3333 PyMac_BuildFixed
, width
,
3334 PyMac_BuildFixed
, height
);
3338 static PyObject
*TrackObj_SetTrackDimensions(_self
, _args
)
3342 PyObject
*_res
= NULL
;
3345 if (!PyArg_ParseTuple(_args
, "O&O&",
3346 PyMac_GetFixed
, &width
,
3347 PyMac_GetFixed
, &height
))
3349 SetTrackDimensions(_self
->ob_itself
,
3357 static PyObject
*TrackObj_GetTrackUserData(_self
, _args
)
3361 PyObject
*_res
= NULL
;
3363 if (!PyArg_ParseTuple(_args
, ""))
3365 _rv
= GetTrackUserData(_self
->ob_itself
);
3366 _res
= Py_BuildValue("O&",
3367 UserDataObj_New
, _rv
);
3371 static PyObject
*TrackObj_GetTrackSoundLocalizationSettings(_self
, _args
)
3375 PyObject
*_res
= NULL
;
3378 if (!PyArg_ParseTuple(_args
, ""))
3380 _err
= GetTrackSoundLocalizationSettings(_self
->ob_itself
,
3382 if (_err
!= noErr
) return PyMac_Error(_err
);
3383 _res
= Py_BuildValue("O&",
3384 ResObj_New
, settings
);
3388 static PyObject
*TrackObj_SetTrackSoundLocalizationSettings(_self
, _args
)
3392 PyObject
*_res
= NULL
;
3395 if (!PyArg_ParseTuple(_args
, "O&",
3396 ResObj_Convert
, &settings
))
3398 _err
= SetTrackSoundLocalizationSettings(_self
->ob_itself
,
3400 if (_err
!= noErr
) return PyMac_Error(_err
);
3406 static PyObject
*TrackObj_NewTrackMedia(_self
, _args
)
3410 PyObject
*_res
= NULL
;
3413 TimeScale timeScale
;
3416 if (!PyArg_ParseTuple(_args
, "O&lO&O&",
3417 PyMac_GetOSType
, &mediaType
,
3419 ResObj_Convert
, &dataRef
,
3420 PyMac_GetOSType
, &dataRefType
))
3422 _rv
= NewTrackMedia(_self
->ob_itself
,
3427 _res
= Py_BuildValue("O&",
3432 static PyObject
*TrackObj_GetTrackMedia(_self
, _args
)
3436 PyObject
*_res
= NULL
;
3438 if (!PyArg_ParseTuple(_args
, ""))
3440 _rv
= GetTrackMedia(_self
->ob_itself
);
3441 _res
= Py_BuildValue("O&",
3446 static PyObject
*TrackObj_InsertMediaIntoTrack(_self
, _args
)
3450 PyObject
*_res
= NULL
;
3452 TimeValue trackStart
;
3453 TimeValue mediaTime
;
3454 TimeValue mediaDuration
;
3456 if (!PyArg_ParseTuple(_args
, "lllO&",
3460 PyMac_GetFixed
, &mediaRate
))
3462 _err
= InsertMediaIntoTrack(_self
->ob_itself
,
3467 if (_err
!= noErr
) return PyMac_Error(_err
);
3473 static PyObject
*TrackObj_InsertTrackSegment(_self
, _args
)
3477 PyObject
*_res
= NULL
;
3481 TimeValue srcDuration
;
3483 if (!PyArg_ParseTuple(_args
, "O&lll",
3484 TrackObj_Convert
, &dstTrack
,
3489 _err
= InsertTrackSegment(_self
->ob_itself
,
3494 if (_err
!= noErr
) return PyMac_Error(_err
);
3500 static PyObject
*TrackObj_InsertEmptyTrackSegment(_self
, _args
)
3504 PyObject
*_res
= NULL
;
3507 TimeValue dstDuration
;
3508 if (!PyArg_ParseTuple(_args
, "ll",
3512 _err
= InsertEmptyTrackSegment(_self
->ob_itself
,
3515 if (_err
!= noErr
) return PyMac_Error(_err
);
3521 static PyObject
*TrackObj_DeleteTrackSegment(_self
, _args
)
3525 PyObject
*_res
= NULL
;
3527 TimeValue startTime
;
3529 if (!PyArg_ParseTuple(_args
, "ll",
3533 _err
= DeleteTrackSegment(_self
->ob_itself
,
3536 if (_err
!= noErr
) return PyMac_Error(_err
);
3542 static PyObject
*TrackObj_ScaleTrackSegment(_self
, _args
)
3546 PyObject
*_res
= NULL
;
3548 TimeValue startTime
;
3549 TimeValue oldDuration
;
3550 TimeValue newDuration
;
3551 if (!PyArg_ParseTuple(_args
, "lll",
3556 _err
= ScaleTrackSegment(_self
->ob_itself
,
3560 if (_err
!= noErr
) return PyMac_Error(_err
);
3566 static PyObject
*TrackObj_IsScrapMovie(_self
, _args
)
3570 PyObject
*_res
= NULL
;
3572 if (!PyArg_ParseTuple(_args
, ""))
3574 _rv
= IsScrapMovie(_self
->ob_itself
);
3575 _res
= Py_BuildValue("O&",
3580 static PyObject
*TrackObj_CopyTrackSettings(_self
, _args
)
3584 PyObject
*_res
= NULL
;
3587 if (!PyArg_ParseTuple(_args
, "O&",
3588 TrackObj_Convert
, &dstTrack
))
3590 _err
= CopyTrackSettings(_self
->ob_itself
,
3592 if (_err
!= noErr
) return PyMac_Error(_err
);
3598 static PyObject
*TrackObj_AddEmptyTrackToMovie(_self
, _args
)
3602 PyObject
*_res
= NULL
;
3608 if (!PyArg_ParseTuple(_args
, "O&O&O&",
3609 MovieObj_Convert
, &dstMovie
,
3610 ResObj_Convert
, &dataRef
,
3611 PyMac_GetOSType
, &dataRefType
))
3613 _err
= AddEmptyTrackToMovie(_self
->ob_itself
,
3618 if (_err
!= noErr
) return PyMac_Error(_err
);
3619 _res
= Py_BuildValue("O&",
3620 TrackObj_New
, dstTrack
);
3624 static PyObject
*TrackObj_AddTrackReference(_self
, _args
)
3628 PyObject
*_res
= NULL
;
3633 if (!PyArg_ParseTuple(_args
, "O&O&",
3634 TrackObj_Convert
, &refTrack
,
3635 PyMac_GetOSType
, &refType
))
3637 _err
= AddTrackReference(_self
->ob_itself
,
3641 if (_err
!= noErr
) return PyMac_Error(_err
);
3642 _res
= Py_BuildValue("l",
3647 static PyObject
*TrackObj_DeleteTrackReference(_self
, _args
)
3651 PyObject
*_res
= NULL
;
3655 if (!PyArg_ParseTuple(_args
, "O&l",
3656 PyMac_GetOSType
, &refType
,
3659 _err
= DeleteTrackReference(_self
->ob_itself
,
3662 if (_err
!= noErr
) return PyMac_Error(_err
);
3668 static PyObject
*TrackObj_SetTrackReference(_self
, _args
)
3672 PyObject
*_res
= NULL
;
3677 if (!PyArg_ParseTuple(_args
, "O&O&l",
3678 TrackObj_Convert
, &refTrack
,
3679 PyMac_GetOSType
, &refType
,
3682 _err
= SetTrackReference(_self
->ob_itself
,
3686 if (_err
!= noErr
) return PyMac_Error(_err
);
3692 static PyObject
*TrackObj_GetTrackReference(_self
, _args
)
3696 PyObject
*_res
= NULL
;
3700 if (!PyArg_ParseTuple(_args
, "O&l",
3701 PyMac_GetOSType
, &refType
,
3704 _rv
= GetTrackReference(_self
->ob_itself
,
3707 _res
= Py_BuildValue("O&",
3712 static PyObject
*TrackObj_GetNextTrackReferenceType(_self
, _args
)
3716 PyObject
*_res
= NULL
;
3719 if (!PyArg_ParseTuple(_args
, "O&",
3720 PyMac_GetOSType
, &refType
))
3722 _rv
= GetNextTrackReferenceType(_self
->ob_itself
,
3724 _res
= Py_BuildValue("O&",
3725 PyMac_BuildOSType
, _rv
);
3729 static PyObject
*TrackObj_GetTrackReferenceCount(_self
, _args
)
3733 PyObject
*_res
= NULL
;
3736 if (!PyArg_ParseTuple(_args
, "O&",
3737 PyMac_GetOSType
, &refType
))
3739 _rv
= GetTrackReferenceCount(_self
->ob_itself
,
3741 _res
= Py_BuildValue("l",
3746 static PyObject
*TrackObj_GetTrackEditRate(_self
, _args
)
3750 PyObject
*_res
= NULL
;
3753 if (!PyArg_ParseTuple(_args
, "l",
3756 _rv
= GetTrackEditRate(_self
->ob_itself
,
3758 _res
= Py_BuildValue("O&",
3759 PyMac_BuildFixed
, _rv
);
3763 static PyObject
*TrackObj_GetTrackDataSize(_self
, _args
)
3767 PyObject
*_res
= NULL
;
3769 TimeValue startTime
;
3771 if (!PyArg_ParseTuple(_args
, "ll",
3775 _rv
= GetTrackDataSize(_self
->ob_itself
,
3778 _res
= Py_BuildValue("l",
3783 static PyObject
*TrackObj_GetTrackDataSize64(_self
, _args
)
3787 PyObject
*_res
= NULL
;
3789 TimeValue startTime
;
3792 if (!PyArg_ParseTuple(_args
, "ll",
3796 _err
= GetTrackDataSize64(_self
->ob_itself
,
3800 if (_err
!= noErr
) return PyMac_Error(_err
);
3801 _res
= Py_BuildValue("O&",
3802 PyMac_Buildwide
, dataSize
);
3806 static PyObject
*TrackObj_PtInTrack(_self
, _args
)
3810 PyObject
*_res
= NULL
;
3813 if (!PyArg_ParseTuple(_args
, "O&",
3814 PyMac_GetPoint
, &pt
))
3816 _rv
= PtInTrack(_self
->ob_itself
,
3818 _res
= Py_BuildValue("b",
3823 static PyObject
*TrackObj_GetTrackNextInterestingTime(_self
, _args
)
3827 PyObject
*_res
= NULL
;
3828 short interestingTimeFlags
;
3831 TimeValue interestingTime
;
3832 TimeValue interestingDuration
;
3833 if (!PyArg_ParseTuple(_args
, "hlO&",
3834 &interestingTimeFlags
,
3836 PyMac_GetFixed
, &rate
))
3838 GetTrackNextInterestingTime(_self
->ob_itself
,
3839 interestingTimeFlags
,
3843 &interestingDuration
);
3844 _res
= Py_BuildValue("ll",
3846 interestingDuration
);
3850 static PyObject
*TrackObj_GetTrackSegmentDisplayBoundsRgn(_self
, _args
)
3854 PyObject
*_res
= NULL
;
3858 if (!PyArg_ParseTuple(_args
, "ll",
3862 _rv
= GetTrackSegmentDisplayBoundsRgn(_self
->ob_itself
,
3865 _res
= Py_BuildValue("O&",
3870 static PyObject
*TrackObj_GetTrackStatus(_self
, _args
)
3874 PyObject
*_res
= NULL
;
3875 ComponentResult _rv
;
3876 if (!PyArg_ParseTuple(_args
, ""))
3878 _rv
= GetTrackStatus(_self
->ob_itself
);
3879 _res
= Py_BuildValue("l",
3884 static PyObject
*TrackObj_SetTrackLoadSettings(_self
, _args
)
3888 PyObject
*_res
= NULL
;
3889 TimeValue preloadTime
;
3890 TimeValue preloadDuration
;
3893 if (!PyArg_ParseTuple(_args
, "llll",
3899 SetTrackLoadSettings(_self
->ob_itself
,
3909 static PyObject
*TrackObj_GetTrackLoadSettings(_self
, _args
)
3913 PyObject
*_res
= NULL
;
3914 TimeValue preloadTime
;
3915 TimeValue preloadDuration
;
3918 if (!PyArg_ParseTuple(_args
, ""))
3920 GetTrackLoadSettings(_self
->ob_itself
,
3925 _res
= Py_BuildValue("llll",
3933 static PyMethodDef TrackObj_methods
[] = {
3934 {"LoadTrackIntoRam", (PyCFunction
)TrackObj_LoadTrackIntoRam
, 1,
3935 "(TimeValue time, TimeValue duration, long flags) -> None"},
3936 {"GetTrackPict", (PyCFunction
)TrackObj_GetTrackPict
, 1,
3937 "(TimeValue time) -> (PicHandle _rv)"},
3938 {"GetTrackClipRgn", (PyCFunction
)TrackObj_GetTrackClipRgn
, 1,
3939 "() -> (RgnHandle _rv)"},
3940 {"SetTrackClipRgn", (PyCFunction
)TrackObj_SetTrackClipRgn
, 1,
3941 "(RgnHandle theClip) -> None"},
3942 {"GetTrackDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackDisplayBoundsRgn
, 1,
3943 "() -> (RgnHandle _rv)"},
3944 {"GetTrackMovieBoundsRgn", (PyCFunction
)TrackObj_GetTrackMovieBoundsRgn
, 1,
3945 "() -> (RgnHandle _rv)"},
3946 {"GetTrackBoundsRgn", (PyCFunction
)TrackObj_GetTrackBoundsRgn
, 1,
3947 "() -> (RgnHandle _rv)"},
3948 {"GetTrackMatte", (PyCFunction
)TrackObj_GetTrackMatte
, 1,
3949 "() -> (PixMapHandle _rv)"},
3950 {"SetTrackMatte", (PyCFunction
)TrackObj_SetTrackMatte
, 1,
3951 "(PixMapHandle theMatte) -> None"},
3952 {"GetTrackID", (PyCFunction
)TrackObj_GetTrackID
, 1,
3953 "() -> (long _rv)"},
3954 {"GetTrackMovie", (PyCFunction
)TrackObj_GetTrackMovie
, 1,
3955 "() -> (Movie _rv)"},
3956 {"GetTrackCreationTime", (PyCFunction
)TrackObj_GetTrackCreationTime
, 1,
3957 "() -> (unsigned long _rv)"},
3958 {"GetTrackModificationTime", (PyCFunction
)TrackObj_GetTrackModificationTime
, 1,
3959 "() -> (unsigned long _rv)"},
3960 {"GetTrackEnabled", (PyCFunction
)TrackObj_GetTrackEnabled
, 1,
3961 "() -> (Boolean _rv)"},
3962 {"SetTrackEnabled", (PyCFunction
)TrackObj_SetTrackEnabled
, 1,
3963 "(Boolean isEnabled) -> None"},
3964 {"GetTrackUsage", (PyCFunction
)TrackObj_GetTrackUsage
, 1,
3965 "() -> (long _rv)"},
3966 {"SetTrackUsage", (PyCFunction
)TrackObj_SetTrackUsage
, 1,
3967 "(long usage) -> None"},
3968 {"GetTrackDuration", (PyCFunction
)TrackObj_GetTrackDuration
, 1,
3969 "() -> (TimeValue _rv)"},
3970 {"GetTrackOffset", (PyCFunction
)TrackObj_GetTrackOffset
, 1,
3971 "() -> (TimeValue _rv)"},
3972 {"SetTrackOffset", (PyCFunction
)TrackObj_SetTrackOffset
, 1,
3973 "(TimeValue movieOffsetTime) -> None"},
3974 {"GetTrackLayer", (PyCFunction
)TrackObj_GetTrackLayer
, 1,
3975 "() -> (short _rv)"},
3976 {"SetTrackLayer", (PyCFunction
)TrackObj_SetTrackLayer
, 1,
3977 "(short layer) -> None"},
3978 {"GetTrackAlternate", (PyCFunction
)TrackObj_GetTrackAlternate
, 1,
3979 "() -> (Track _rv)"},
3980 {"SetTrackAlternate", (PyCFunction
)TrackObj_SetTrackAlternate
, 1,
3981 "(Track alternateT) -> None"},
3982 {"GetTrackVolume", (PyCFunction
)TrackObj_GetTrackVolume
, 1,
3983 "() -> (short _rv)"},
3984 {"SetTrackVolume", (PyCFunction
)TrackObj_SetTrackVolume
, 1,
3985 "(short volume) -> None"},
3986 {"GetTrackDimensions", (PyCFunction
)TrackObj_GetTrackDimensions
, 1,
3987 "() -> (Fixed width, Fixed height)"},
3988 {"SetTrackDimensions", (PyCFunction
)TrackObj_SetTrackDimensions
, 1,
3989 "(Fixed width, Fixed height) -> None"},
3990 {"GetTrackUserData", (PyCFunction
)TrackObj_GetTrackUserData
, 1,
3991 "() -> (UserData _rv)"},
3992 {"GetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_GetTrackSoundLocalizationSettings
, 1,
3993 "() -> (Handle settings)"},
3994 {"SetTrackSoundLocalizationSettings", (PyCFunction
)TrackObj_SetTrackSoundLocalizationSettings
, 1,
3995 "(Handle settings) -> None"},
3996 {"NewTrackMedia", (PyCFunction
)TrackObj_NewTrackMedia
, 1,
3997 "(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)"},
3998 {"GetTrackMedia", (PyCFunction
)TrackObj_GetTrackMedia
, 1,
3999 "() -> (Media _rv)"},
4000 {"InsertMediaIntoTrack", (PyCFunction
)TrackObj_InsertMediaIntoTrack
, 1,
4001 "(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None"},
4002 {"InsertTrackSegment", (PyCFunction
)TrackObj_InsertTrackSegment
, 1,
4003 "(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
4004 {"InsertEmptyTrackSegment", (PyCFunction
)TrackObj_InsertEmptyTrackSegment
, 1,
4005 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
4006 {"DeleteTrackSegment", (PyCFunction
)TrackObj_DeleteTrackSegment
, 1,
4007 "(TimeValue startTime, TimeValue duration) -> None"},
4008 {"ScaleTrackSegment", (PyCFunction
)TrackObj_ScaleTrackSegment
, 1,
4009 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
4010 {"IsScrapMovie", (PyCFunction
)TrackObj_IsScrapMovie
, 1,
4011 "() -> (Component _rv)"},
4012 {"CopyTrackSettings", (PyCFunction
)TrackObj_CopyTrackSettings
, 1,
4013 "(Track dstTrack) -> None"},
4014 {"AddEmptyTrackToMovie", (PyCFunction
)TrackObj_AddEmptyTrackToMovie
, 1,
4015 "(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)"},
4016 {"AddTrackReference", (PyCFunction
)TrackObj_AddTrackReference
, 1,
4017 "(Track refTrack, OSType refType) -> (long addedIndex)"},
4018 {"DeleteTrackReference", (PyCFunction
)TrackObj_DeleteTrackReference
, 1,
4019 "(OSType refType, long index) -> None"},
4020 {"SetTrackReference", (PyCFunction
)TrackObj_SetTrackReference
, 1,
4021 "(Track refTrack, OSType refType, long index) -> None"},
4022 {"GetTrackReference", (PyCFunction
)TrackObj_GetTrackReference
, 1,
4023 "(OSType refType, long index) -> (Track _rv)"},
4024 {"GetNextTrackReferenceType", (PyCFunction
)TrackObj_GetNextTrackReferenceType
, 1,
4025 "(OSType refType) -> (OSType _rv)"},
4026 {"GetTrackReferenceCount", (PyCFunction
)TrackObj_GetTrackReferenceCount
, 1,
4027 "(OSType refType) -> (long _rv)"},
4028 {"GetTrackEditRate", (PyCFunction
)TrackObj_GetTrackEditRate
, 1,
4029 "(TimeValue atTime) -> (Fixed _rv)"},
4030 {"GetTrackDataSize", (PyCFunction
)TrackObj_GetTrackDataSize
, 1,
4031 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
4032 {"GetTrackDataSize64", (PyCFunction
)TrackObj_GetTrackDataSize64
, 1,
4033 "(TimeValue startTime, TimeValue duration) -> (wide dataSize)"},
4034 {"PtInTrack", (PyCFunction
)TrackObj_PtInTrack
, 1,
4035 "(Point pt) -> (Boolean _rv)"},
4036 {"GetTrackNextInterestingTime", (PyCFunction
)TrackObj_GetTrackNextInterestingTime
, 1,
4037 "(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
4038 {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction
)TrackObj_GetTrackSegmentDisplayBoundsRgn
, 1,
4039 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
4040 {"GetTrackStatus", (PyCFunction
)TrackObj_GetTrackStatus
, 1,
4041 "() -> (ComponentResult _rv)"},
4042 {"SetTrackLoadSettings", (PyCFunction
)TrackObj_SetTrackLoadSettings
, 1,
4043 "(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None"},
4044 {"GetTrackLoadSettings", (PyCFunction
)TrackObj_GetTrackLoadSettings
, 1,
4045 "() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)"},
4049 PyMethodChain TrackObj_chain
= { TrackObj_methods
, NULL
};
4051 static PyObject
*TrackObj_getattr(self
, name
)
4055 return Py_FindMethodInChain(&TrackObj_chain
, (PyObject
*)self
, name
);
4058 #define TrackObj_setattr NULL
4060 #define TrackObj_compare NULL
4062 #define TrackObj_repr NULL
4064 #define TrackObj_hash NULL
4066 PyTypeObject Track_Type
= {
4067 PyObject_HEAD_INIT(&PyType_Type
)
4069 "Track", /*tp_name*/
4070 sizeof(TrackObject
), /*tp_basicsize*/
4073 (destructor
) TrackObj_dealloc
, /*tp_dealloc*/
4075 (getattrfunc
) TrackObj_getattr
, /*tp_getattr*/
4076 (setattrfunc
) TrackObj_setattr
, /*tp_setattr*/
4077 (cmpfunc
) TrackObj_compare
, /*tp_compare*/
4078 (reprfunc
) TrackObj_repr
, /*tp_repr*/
4079 (PyNumberMethods
*)0, /* tp_as_number */
4080 (PySequenceMethods
*)0, /* tp_as_sequence */
4081 (PyMappingMethods
*)0, /* tp_as_mapping */
4082 (hashfunc
) TrackObj_hash
, /*tp_hash*/
4085 /* --------------------- End object type Track ---------------------- */
4088 /* ----------------------- Object type Movie ------------------------ */
4090 PyTypeObject Movie_Type
;
4092 #define MovieObj_Check(x) ((x)->ob_type == &Movie_Type)
4094 typedef struct MovieObject
{
4099 PyObject
*MovieObj_New(itself
)
4103 if (itself
== NULL
) {
4104 PyErr_SetString(Qt_Error
,"Cannot create null Movie");
4107 it
= PyObject_NEW(MovieObject
, &Movie_Type
);
4108 if (it
== NULL
) return NULL
;
4109 it
->ob_itself
= itself
;
4110 return (PyObject
*)it
;
4112 MovieObj_Convert(v
, p_itself
)
4116 if (!MovieObj_Check(v
))
4118 PyErr_SetString(PyExc_TypeError
, "Movie required");
4121 *p_itself
= ((MovieObject
*)v
)->ob_itself
;
4125 static void MovieObj_dealloc(self
)
4128 DisposeMovie(self
->ob_itself
);
4132 static PyObject
*MovieObj_MoviesTask(_self
, _args
)
4136 PyObject
*_res
= NULL
;
4137 long maxMilliSecToUse
;
4138 if (!PyArg_ParseTuple(_args
, "l",
4141 MoviesTask(_self
->ob_itself
,
4148 static PyObject
*MovieObj_PrerollMovie(_self
, _args
)
4152 PyObject
*_res
= NULL
;
4156 if (!PyArg_ParseTuple(_args
, "lO&",
4158 PyMac_GetFixed
, &Rate
))
4160 _err
= PrerollMovie(_self
->ob_itself
,
4163 if (_err
!= noErr
) return PyMac_Error(_err
);
4169 static PyObject
*MovieObj_AbortPrePrerollMovie(_self
, _args
)
4173 PyObject
*_res
= NULL
;
4175 if (!PyArg_ParseTuple(_args
, "h",
4178 AbortPrePrerollMovie(_self
->ob_itself
,
4185 static PyObject
*MovieObj_LoadMovieIntoRam(_self
, _args
)
4189 PyObject
*_res
= NULL
;
4194 if (!PyArg_ParseTuple(_args
, "lll",
4199 _err
= LoadMovieIntoRam(_self
->ob_itself
,
4203 if (_err
!= noErr
) return PyMac_Error(_err
);
4209 static PyObject
*MovieObj_SetMovieActive(_self
, _args
)
4213 PyObject
*_res
= NULL
;
4215 if (!PyArg_ParseTuple(_args
, "b",
4218 SetMovieActive(_self
->ob_itself
,
4225 static PyObject
*MovieObj_GetMovieActive(_self
, _args
)
4229 PyObject
*_res
= NULL
;
4231 if (!PyArg_ParseTuple(_args
, ""))
4233 _rv
= GetMovieActive(_self
->ob_itself
);
4234 _res
= Py_BuildValue("b",
4239 static PyObject
*MovieObj_StartMovie(_self
, _args
)
4243 PyObject
*_res
= NULL
;
4244 if (!PyArg_ParseTuple(_args
, ""))
4246 StartMovie(_self
->ob_itself
);
4252 static PyObject
*MovieObj_StopMovie(_self
, _args
)
4256 PyObject
*_res
= NULL
;
4257 if (!PyArg_ParseTuple(_args
, ""))
4259 StopMovie(_self
->ob_itself
);
4265 static PyObject
*MovieObj_GoToBeginningOfMovie(_self
, _args
)
4269 PyObject
*_res
= NULL
;
4270 if (!PyArg_ParseTuple(_args
, ""))
4272 GoToBeginningOfMovie(_self
->ob_itself
);
4278 static PyObject
*MovieObj_GoToEndOfMovie(_self
, _args
)
4282 PyObject
*_res
= NULL
;
4283 if (!PyArg_ParseTuple(_args
, ""))
4285 GoToEndOfMovie(_self
->ob_itself
);
4291 static PyObject
*MovieObj_IsMovieDone(_self
, _args
)
4295 PyObject
*_res
= NULL
;
4297 if (!PyArg_ParseTuple(_args
, ""))
4299 _rv
= IsMovieDone(_self
->ob_itself
);
4300 _res
= Py_BuildValue("b",
4305 static PyObject
*MovieObj_GetMoviePreviewMode(_self
, _args
)
4309 PyObject
*_res
= NULL
;
4311 if (!PyArg_ParseTuple(_args
, ""))
4313 _rv
= GetMoviePreviewMode(_self
->ob_itself
);
4314 _res
= Py_BuildValue("b",
4319 static PyObject
*MovieObj_SetMoviePreviewMode(_self
, _args
)
4323 PyObject
*_res
= NULL
;
4325 if (!PyArg_ParseTuple(_args
, "b",
4328 SetMoviePreviewMode(_self
->ob_itself
,
4335 static PyObject
*MovieObj_ShowMoviePoster(_self
, _args
)
4339 PyObject
*_res
= NULL
;
4340 if (!PyArg_ParseTuple(_args
, ""))
4342 ShowMoviePoster(_self
->ob_itself
);
4348 static PyObject
*MovieObj_GetMovieTimeBase(_self
, _args
)
4352 PyObject
*_res
= NULL
;
4354 if (!PyArg_ParseTuple(_args
, ""))
4356 _rv
= GetMovieTimeBase(_self
->ob_itself
);
4357 _res
= Py_BuildValue("O&",
4358 TimeBaseObj_New
, _rv
);
4362 static PyObject
*MovieObj_SetMovieMasterTimeBase(_self
, _args
)
4366 PyObject
*_res
= NULL
;
4368 TimeRecord slaveZero
;
4369 if (!PyArg_ParseTuple(_args
, "O&O&",
4370 TimeBaseObj_Convert
, &tb
,
4371 QtTimeRecord_Convert
, &slaveZero
))
4373 SetMovieMasterTimeBase(_self
->ob_itself
,
4381 static PyObject
*MovieObj_SetMovieMasterClock(_self
, _args
)
4385 PyObject
*_res
= NULL
;
4386 Component clockMeister
;
4387 TimeRecord slaveZero
;
4388 if (!PyArg_ParseTuple(_args
, "O&O&",
4389 CmpObj_Convert
, &clockMeister
,
4390 QtTimeRecord_Convert
, &slaveZero
))
4392 SetMovieMasterClock(_self
->ob_itself
,
4400 static PyObject
*MovieObj_GetMovieGWorld(_self
, _args
)
4404 PyObject
*_res
= NULL
;
4407 if (!PyArg_ParseTuple(_args
, ""))
4409 GetMovieGWorld(_self
->ob_itself
,
4412 _res
= Py_BuildValue("O&O&",
4414 OptResObj_New
, gdh
);
4418 static PyObject
*MovieObj_SetMovieGWorld(_self
, _args
)
4422 PyObject
*_res
= NULL
;
4425 if (!PyArg_ParseTuple(_args
, "O&O&",
4426 GrafObj_Convert
, &port
,
4427 OptResObj_Convert
, &gdh
))
4429 SetMovieGWorld(_self
->ob_itself
,
4437 static PyObject
*MovieObj_GetMovieNaturalBoundsRect(_self
, _args
)
4441 PyObject
*_res
= NULL
;
4443 if (!PyArg_ParseTuple(_args
, ""))
4445 GetMovieNaturalBoundsRect(_self
->ob_itself
,
4447 _res
= Py_BuildValue("O&",
4448 PyMac_BuildRect
, &naturalBounds
);
4452 static PyObject
*MovieObj_GetNextTrackForCompositing(_self
, _args
)
4456 PyObject
*_res
= NULL
;
4459 if (!PyArg_ParseTuple(_args
, "O&",
4460 TrackObj_Convert
, &theTrack
))
4462 _rv
= GetNextTrackForCompositing(_self
->ob_itself
,
4464 _res
= Py_BuildValue("O&",
4469 static PyObject
*MovieObj_GetPrevTrackForCompositing(_self
, _args
)
4473 PyObject
*_res
= NULL
;
4476 if (!PyArg_ParseTuple(_args
, "O&",
4477 TrackObj_Convert
, &theTrack
))
4479 _rv
= GetPrevTrackForCompositing(_self
->ob_itself
,
4481 _res
= Py_BuildValue("O&",
4486 static PyObject
*MovieObj_GetMoviePict(_self
, _args
)
4490 PyObject
*_res
= NULL
;
4493 if (!PyArg_ParseTuple(_args
, "l",
4496 _rv
= GetMoviePict(_self
->ob_itself
,
4498 _res
= Py_BuildValue("O&",
4503 static PyObject
*MovieObj_GetMoviePosterPict(_self
, _args
)
4507 PyObject
*_res
= NULL
;
4509 if (!PyArg_ParseTuple(_args
, ""))
4511 _rv
= GetMoviePosterPict(_self
->ob_itself
);
4512 _res
= Py_BuildValue("O&",
4517 static PyObject
*MovieObj_UpdateMovie(_self
, _args
)
4521 PyObject
*_res
= NULL
;
4523 if (!PyArg_ParseTuple(_args
, ""))
4525 _err
= UpdateMovie(_self
->ob_itself
);
4526 if (_err
!= noErr
) return PyMac_Error(_err
);
4532 static PyObject
*MovieObj_InvalidateMovieRegion(_self
, _args
)
4536 PyObject
*_res
= NULL
;
4538 RgnHandle invalidRgn
;
4539 if (!PyArg_ParseTuple(_args
, "O&",
4540 ResObj_Convert
, &invalidRgn
))
4542 _err
= InvalidateMovieRegion(_self
->ob_itself
,
4544 if (_err
!= noErr
) return PyMac_Error(_err
);
4550 static PyObject
*MovieObj_GetMovieBox(_self
, _args
)
4554 PyObject
*_res
= NULL
;
4556 if (!PyArg_ParseTuple(_args
, ""))
4558 GetMovieBox(_self
->ob_itself
,
4560 _res
= Py_BuildValue("O&",
4561 PyMac_BuildRect
, &boxRect
);
4565 static PyObject
*MovieObj_SetMovieBox(_self
, _args
)
4569 PyObject
*_res
= NULL
;
4571 if (!PyArg_ParseTuple(_args
, "O&",
4572 PyMac_GetRect
, &boxRect
))
4574 SetMovieBox(_self
->ob_itself
,
4581 static PyObject
*MovieObj_GetMovieDisplayClipRgn(_self
, _args
)
4585 PyObject
*_res
= NULL
;
4587 if (!PyArg_ParseTuple(_args
, ""))
4589 _rv
= GetMovieDisplayClipRgn(_self
->ob_itself
);
4590 _res
= Py_BuildValue("O&",
4595 static PyObject
*MovieObj_SetMovieDisplayClipRgn(_self
, _args
)
4599 PyObject
*_res
= NULL
;
4601 if (!PyArg_ParseTuple(_args
, "O&",
4602 ResObj_Convert
, &theClip
))
4604 SetMovieDisplayClipRgn(_self
->ob_itself
,
4611 static PyObject
*MovieObj_GetMovieClipRgn(_self
, _args
)
4615 PyObject
*_res
= NULL
;
4617 if (!PyArg_ParseTuple(_args
, ""))
4619 _rv
= GetMovieClipRgn(_self
->ob_itself
);
4620 _res
= Py_BuildValue("O&",
4625 static PyObject
*MovieObj_SetMovieClipRgn(_self
, _args
)
4629 PyObject
*_res
= NULL
;
4631 if (!PyArg_ParseTuple(_args
, "O&",
4632 ResObj_Convert
, &theClip
))
4634 SetMovieClipRgn(_self
->ob_itself
,
4641 static PyObject
*MovieObj_GetMovieDisplayBoundsRgn(_self
, _args
)
4645 PyObject
*_res
= NULL
;
4647 if (!PyArg_ParseTuple(_args
, ""))
4649 _rv
= GetMovieDisplayBoundsRgn(_self
->ob_itself
);
4650 _res
= Py_BuildValue("O&",
4655 static PyObject
*MovieObj_GetMovieBoundsRgn(_self
, _args
)
4659 PyObject
*_res
= NULL
;
4661 if (!PyArg_ParseTuple(_args
, ""))
4663 _rv
= GetMovieBoundsRgn(_self
->ob_itself
);
4664 _res
= Py_BuildValue("O&",
4669 static PyObject
*MovieObj_PutMovieIntoHandle(_self
, _args
)
4673 PyObject
*_res
= NULL
;
4676 if (!PyArg_ParseTuple(_args
, "O&",
4677 ResObj_Convert
, &publicMovie
))
4679 _err
= PutMovieIntoHandle(_self
->ob_itself
,
4681 if (_err
!= noErr
) return PyMac_Error(_err
);
4687 static PyObject
*MovieObj_PutMovieIntoDataFork(_self
, _args
)
4691 PyObject
*_res
= NULL
;
4696 if (!PyArg_ParseTuple(_args
, "hll",
4701 _err
= PutMovieIntoDataFork(_self
->ob_itself
,
4705 if (_err
!= noErr
) return PyMac_Error(_err
);
4711 static PyObject
*MovieObj_PutMovieIntoDataFork64(_self
, _args
)
4715 PyObject
*_res
= NULL
;
4719 unsigned long maxSize
;
4720 if (!PyArg_ParseTuple(_args
, "lO&l",
4722 PyMac_Getwide
, &offset
,
4725 _err
= PutMovieIntoDataFork64(_self
->ob_itself
,
4729 if (_err
!= noErr
) return PyMac_Error(_err
);
4735 static PyObject
*MovieObj_GetMovieCreationTime(_self
, _args
)
4739 PyObject
*_res
= NULL
;
4741 if (!PyArg_ParseTuple(_args
, ""))
4743 _rv
= GetMovieCreationTime(_self
->ob_itself
);
4744 _res
= Py_BuildValue("l",
4749 static PyObject
*MovieObj_GetMovieModificationTime(_self
, _args
)
4753 PyObject
*_res
= NULL
;
4755 if (!PyArg_ParseTuple(_args
, ""))
4757 _rv
= GetMovieModificationTime(_self
->ob_itself
);
4758 _res
= Py_BuildValue("l",
4763 static PyObject
*MovieObj_GetMovieTimeScale(_self
, _args
)
4767 PyObject
*_res
= NULL
;
4769 if (!PyArg_ParseTuple(_args
, ""))
4771 _rv
= GetMovieTimeScale(_self
->ob_itself
);
4772 _res
= Py_BuildValue("l",
4777 static PyObject
*MovieObj_SetMovieTimeScale(_self
, _args
)
4781 PyObject
*_res
= NULL
;
4782 TimeScale timeScale
;
4783 if (!PyArg_ParseTuple(_args
, "l",
4786 SetMovieTimeScale(_self
->ob_itself
,
4793 static PyObject
*MovieObj_GetMovieDuration(_self
, _args
)
4797 PyObject
*_res
= NULL
;
4799 if (!PyArg_ParseTuple(_args
, ""))
4801 _rv
= GetMovieDuration(_self
->ob_itself
);
4802 _res
= Py_BuildValue("l",
4807 static PyObject
*MovieObj_GetMovieRate(_self
, _args
)
4811 PyObject
*_res
= NULL
;
4813 if (!PyArg_ParseTuple(_args
, ""))
4815 _rv
= GetMovieRate(_self
->ob_itself
);
4816 _res
= Py_BuildValue("O&",
4817 PyMac_BuildFixed
, _rv
);
4821 static PyObject
*MovieObj_SetMovieRate(_self
, _args
)
4825 PyObject
*_res
= NULL
;
4827 if (!PyArg_ParseTuple(_args
, "O&",
4828 PyMac_GetFixed
, &rate
))
4830 SetMovieRate(_self
->ob_itself
,
4837 static PyObject
*MovieObj_GetMoviePreferredRate(_self
, _args
)
4841 PyObject
*_res
= NULL
;
4843 if (!PyArg_ParseTuple(_args
, ""))
4845 _rv
= GetMoviePreferredRate(_self
->ob_itself
);
4846 _res
= Py_BuildValue("O&",
4847 PyMac_BuildFixed
, _rv
);
4851 static PyObject
*MovieObj_SetMoviePreferredRate(_self
, _args
)
4855 PyObject
*_res
= NULL
;
4857 if (!PyArg_ParseTuple(_args
, "O&",
4858 PyMac_GetFixed
, &rate
))
4860 SetMoviePreferredRate(_self
->ob_itself
,
4867 static PyObject
*MovieObj_GetMoviePreferredVolume(_self
, _args
)
4871 PyObject
*_res
= NULL
;
4873 if (!PyArg_ParseTuple(_args
, ""))
4875 _rv
= GetMoviePreferredVolume(_self
->ob_itself
);
4876 _res
= Py_BuildValue("h",
4881 static PyObject
*MovieObj_SetMoviePreferredVolume(_self
, _args
)
4885 PyObject
*_res
= NULL
;
4887 if (!PyArg_ParseTuple(_args
, "h",
4890 SetMoviePreferredVolume(_self
->ob_itself
,
4897 static PyObject
*MovieObj_GetMovieVolume(_self
, _args
)
4901 PyObject
*_res
= NULL
;
4903 if (!PyArg_ParseTuple(_args
, ""))
4905 _rv
= GetMovieVolume(_self
->ob_itself
);
4906 _res
= Py_BuildValue("h",
4911 static PyObject
*MovieObj_SetMovieVolume(_self
, _args
)
4915 PyObject
*_res
= NULL
;
4917 if (!PyArg_ParseTuple(_args
, "h",
4920 SetMovieVolume(_self
->ob_itself
,
4927 static PyObject
*MovieObj_GetMoviePreviewTime(_self
, _args
)
4931 PyObject
*_res
= NULL
;
4932 TimeValue previewTime
;
4933 TimeValue previewDuration
;
4934 if (!PyArg_ParseTuple(_args
, ""))
4936 GetMoviePreviewTime(_self
->ob_itself
,
4939 _res
= Py_BuildValue("ll",
4945 static PyObject
*MovieObj_SetMoviePreviewTime(_self
, _args
)
4949 PyObject
*_res
= NULL
;
4950 TimeValue previewTime
;
4951 TimeValue previewDuration
;
4952 if (!PyArg_ParseTuple(_args
, "ll",
4956 SetMoviePreviewTime(_self
->ob_itself
,
4964 static PyObject
*MovieObj_GetMoviePosterTime(_self
, _args
)
4968 PyObject
*_res
= NULL
;
4970 if (!PyArg_ParseTuple(_args
, ""))
4972 _rv
= GetMoviePosterTime(_self
->ob_itself
);
4973 _res
= Py_BuildValue("l",
4978 static PyObject
*MovieObj_SetMoviePosterTime(_self
, _args
)
4982 PyObject
*_res
= NULL
;
4983 TimeValue posterTime
;
4984 if (!PyArg_ParseTuple(_args
, "l",
4987 SetMoviePosterTime(_self
->ob_itself
,
4994 static PyObject
*MovieObj_GetMovieSelection(_self
, _args
)
4998 PyObject
*_res
= NULL
;
4999 TimeValue selectionTime
;
5000 TimeValue selectionDuration
;
5001 if (!PyArg_ParseTuple(_args
, ""))
5003 GetMovieSelection(_self
->ob_itself
,
5005 &selectionDuration
);
5006 _res
= Py_BuildValue("ll",
5012 static PyObject
*MovieObj_SetMovieSelection(_self
, _args
)
5016 PyObject
*_res
= NULL
;
5017 TimeValue selectionTime
;
5018 TimeValue selectionDuration
;
5019 if (!PyArg_ParseTuple(_args
, "ll",
5021 &selectionDuration
))
5023 SetMovieSelection(_self
->ob_itself
,
5031 static PyObject
*MovieObj_SetMovieActiveSegment(_self
, _args
)
5035 PyObject
*_res
= NULL
;
5036 TimeValue startTime
;
5038 if (!PyArg_ParseTuple(_args
, "ll",
5042 SetMovieActiveSegment(_self
->ob_itself
,
5050 static PyObject
*MovieObj_GetMovieActiveSegment(_self
, _args
)
5054 PyObject
*_res
= NULL
;
5055 TimeValue startTime
;
5057 if (!PyArg_ParseTuple(_args
, ""))
5059 GetMovieActiveSegment(_self
->ob_itself
,
5062 _res
= Py_BuildValue("ll",
5068 static PyObject
*MovieObj_GetMovieTime(_self
, _args
)
5072 PyObject
*_res
= NULL
;
5074 TimeRecord currentTime
;
5075 if (!PyArg_ParseTuple(_args
, ""))
5077 _rv
= GetMovieTime(_self
->ob_itself
,
5079 _res
= Py_BuildValue("lO&",
5081 QtTimeRecord_New
, ¤tTime
);
5085 static PyObject
*MovieObj_SetMovieTime(_self
, _args
)
5089 PyObject
*_res
= NULL
;
5091 if (!PyArg_ParseTuple(_args
, "O&",
5092 QtTimeRecord_Convert
, &newtime
))
5094 SetMovieTime(_self
->ob_itself
,
5101 static PyObject
*MovieObj_SetMovieTimeValue(_self
, _args
)
5105 PyObject
*_res
= NULL
;
5107 if (!PyArg_ParseTuple(_args
, "l",
5110 SetMovieTimeValue(_self
->ob_itself
,
5117 static PyObject
*MovieObj_GetMovieUserData(_self
, _args
)
5121 PyObject
*_res
= NULL
;
5123 if (!PyArg_ParseTuple(_args
, ""))
5125 _rv
= GetMovieUserData(_self
->ob_itself
);
5126 _res
= Py_BuildValue("O&",
5127 UserDataObj_New
, _rv
);
5131 static PyObject
*MovieObj_GetMovieTrackCount(_self
, _args
)
5135 PyObject
*_res
= NULL
;
5137 if (!PyArg_ParseTuple(_args
, ""))
5139 _rv
= GetMovieTrackCount(_self
->ob_itself
);
5140 _res
= Py_BuildValue("l",
5145 static PyObject
*MovieObj_GetMovieTrack(_self
, _args
)
5149 PyObject
*_res
= NULL
;
5152 if (!PyArg_ParseTuple(_args
, "l",
5155 _rv
= GetMovieTrack(_self
->ob_itself
,
5157 _res
= Py_BuildValue("O&",
5162 static PyObject
*MovieObj_GetMovieIndTrack(_self
, _args
)
5166 PyObject
*_res
= NULL
;
5169 if (!PyArg_ParseTuple(_args
, "l",
5172 _rv
= GetMovieIndTrack(_self
->ob_itself
,
5174 _res
= Py_BuildValue("O&",
5179 static PyObject
*MovieObj_GetMovieIndTrackType(_self
, _args
)
5183 PyObject
*_res
= NULL
;
5188 if (!PyArg_ParseTuple(_args
, "lO&l",
5190 PyMac_GetOSType
, &trackType
,
5193 _rv
= GetMovieIndTrackType(_self
->ob_itself
,
5197 _res
= Py_BuildValue("O&",
5202 static PyObject
*MovieObj_NewMovieTrack(_self
, _args
)
5206 PyObject
*_res
= NULL
;
5211 if (!PyArg_ParseTuple(_args
, "O&O&h",
5212 PyMac_GetFixed
, &width
,
5213 PyMac_GetFixed
, &height
,
5216 _rv
= NewMovieTrack(_self
->ob_itself
,
5220 _res
= Py_BuildValue("O&",
5225 static PyObject
*MovieObj_SetAutoTrackAlternatesEnabled(_self
, _args
)
5229 PyObject
*_res
= NULL
;
5231 if (!PyArg_ParseTuple(_args
, "b",
5234 SetAutoTrackAlternatesEnabled(_self
->ob_itself
,
5241 static PyObject
*MovieObj_SelectMovieAlternates(_self
, _args
)
5245 PyObject
*_res
= NULL
;
5246 if (!PyArg_ParseTuple(_args
, ""))
5248 SelectMovieAlternates(_self
->ob_itself
);
5254 static PyObject
*MovieObj_InsertMovieSegment(_self
, _args
)
5258 PyObject
*_res
= NULL
;
5262 TimeValue srcDuration
;
5264 if (!PyArg_ParseTuple(_args
, "O&lll",
5265 MovieObj_Convert
, &dstMovie
,
5270 _err
= InsertMovieSegment(_self
->ob_itself
,
5275 if (_err
!= noErr
) return PyMac_Error(_err
);
5281 static PyObject
*MovieObj_InsertEmptyMovieSegment(_self
, _args
)
5285 PyObject
*_res
= NULL
;
5288 TimeValue dstDuration
;
5289 if (!PyArg_ParseTuple(_args
, "ll",
5293 _err
= InsertEmptyMovieSegment(_self
->ob_itself
,
5296 if (_err
!= noErr
) return PyMac_Error(_err
);
5302 static PyObject
*MovieObj_DeleteMovieSegment(_self
, _args
)
5306 PyObject
*_res
= NULL
;
5308 TimeValue startTime
;
5310 if (!PyArg_ParseTuple(_args
, "ll",
5314 _err
= DeleteMovieSegment(_self
->ob_itself
,
5317 if (_err
!= noErr
) return PyMac_Error(_err
);
5323 static PyObject
*MovieObj_ScaleMovieSegment(_self
, _args
)
5327 PyObject
*_res
= NULL
;
5329 TimeValue startTime
;
5330 TimeValue oldDuration
;
5331 TimeValue newDuration
;
5332 if (!PyArg_ParseTuple(_args
, "lll",
5337 _err
= ScaleMovieSegment(_self
->ob_itself
,
5341 if (_err
!= noErr
) return PyMac_Error(_err
);
5347 static PyObject
*MovieObj_CutMovieSelection(_self
, _args
)
5351 PyObject
*_res
= NULL
;
5353 if (!PyArg_ParseTuple(_args
, ""))
5355 _rv
= CutMovieSelection(_self
->ob_itself
);
5356 _res
= Py_BuildValue("O&",
5361 static PyObject
*MovieObj_CopyMovieSelection(_self
, _args
)
5365 PyObject
*_res
= NULL
;
5367 if (!PyArg_ParseTuple(_args
, ""))
5369 _rv
= CopyMovieSelection(_self
->ob_itself
);
5370 _res
= Py_BuildValue("O&",
5375 static PyObject
*MovieObj_PasteMovieSelection(_self
, _args
)
5379 PyObject
*_res
= NULL
;
5381 if (!PyArg_ParseTuple(_args
, "O&",
5382 MovieObj_Convert
, &src
))
5384 PasteMovieSelection(_self
->ob_itself
,
5391 static PyObject
*MovieObj_AddMovieSelection(_self
, _args
)
5395 PyObject
*_res
= NULL
;
5397 if (!PyArg_ParseTuple(_args
, "O&",
5398 MovieObj_Convert
, &src
))
5400 AddMovieSelection(_self
->ob_itself
,
5407 static PyObject
*MovieObj_ClearMovieSelection(_self
, _args
)
5411 PyObject
*_res
= NULL
;
5412 if (!PyArg_ParseTuple(_args
, ""))
5414 ClearMovieSelection(_self
->ob_itself
);
5420 static PyObject
*MovieObj_PutMovieIntoTypedHandle(_self
, _args
)
5424 PyObject
*_res
= NULL
;
5432 ComponentInstance userComp
;
5433 if (!PyArg_ParseTuple(_args
, "O&O&O&lllO&",
5434 TrackObj_Convert
, &targetTrack
,
5435 PyMac_GetOSType
, &handleType
,
5436 ResObj_Convert
, &publicMovie
,
5440 CmpInstObj_Convert
, &userComp
))
5442 _err
= PutMovieIntoTypedHandle(_self
->ob_itself
,
5450 if (_err
!= noErr
) return PyMac_Error(_err
);
5456 static PyObject
*MovieObj_CopyMovieSettings(_self
, _args
)
5460 PyObject
*_res
= NULL
;
5463 if (!PyArg_ParseTuple(_args
, "O&",
5464 MovieObj_Convert
, &dstMovie
))
5466 _err
= CopyMovieSettings(_self
->ob_itself
,
5468 if (_err
!= noErr
) return PyMac_Error(_err
);
5474 static PyObject
*MovieObj_ConvertMovieToFile(_self
, _args
)
5478 PyObject
*_res
= NULL
;
5484 ScriptCode scriptTag
;
5487 ComponentInstance userComp
;
5488 if (!PyArg_ParseTuple(_args
, "O&O&O&O&hlO&",
5489 TrackObj_Convert
, &onlyTrack
,
5490 PyMac_GetFSSpec
, &outputFile
,
5491 PyMac_GetOSType
, &fileType
,
5492 PyMac_GetOSType
, &creator
,
5495 CmpInstObj_Convert
, &userComp
))
5497 _err
= ConvertMovieToFile(_self
->ob_itself
,
5506 if (_err
!= noErr
) return PyMac_Error(_err
);
5507 _res
= Py_BuildValue("h",
5512 static PyObject
*MovieObj_GetMovieDataSize(_self
, _args
)
5516 PyObject
*_res
= NULL
;
5518 TimeValue startTime
;
5520 if (!PyArg_ParseTuple(_args
, "ll",
5524 _rv
= GetMovieDataSize(_self
->ob_itself
,
5527 _res
= Py_BuildValue("l",
5532 static PyObject
*MovieObj_GetMovieDataSize64(_self
, _args
)
5536 PyObject
*_res
= NULL
;
5538 TimeValue startTime
;
5541 if (!PyArg_ParseTuple(_args
, "ll",
5545 _err
= GetMovieDataSize64(_self
->ob_itself
,
5549 if (_err
!= noErr
) return PyMac_Error(_err
);
5550 _res
= Py_BuildValue("O&",
5551 PyMac_Buildwide
, dataSize
);
5555 static PyObject
*MovieObj_PtInMovie(_self
, _args
)
5559 PyObject
*_res
= NULL
;
5562 if (!PyArg_ParseTuple(_args
, "O&",
5563 PyMac_GetPoint
, &pt
))
5565 _rv
= PtInMovie(_self
->ob_itself
,
5567 _res
= Py_BuildValue("b",
5572 static PyObject
*MovieObj_SetMovieLanguage(_self
, _args
)
5576 PyObject
*_res
= NULL
;
5578 if (!PyArg_ParseTuple(_args
, "l",
5581 SetMovieLanguage(_self
->ob_itself
,
5588 static PyObject
*MovieObj_GetMovieNextInterestingTime(_self
, _args
)
5592 PyObject
*_res
= NULL
;
5593 short interestingTimeFlags
;
5594 short numMediaTypes
;
5595 OSType whichMediaTypes
;
5598 TimeValue interestingTime
;
5599 TimeValue interestingDuration
;
5600 if (!PyArg_ParseTuple(_args
, "hhO&lO&",
5601 &interestingTimeFlags
,
5603 PyMac_GetOSType
, &whichMediaTypes
,
5605 PyMac_GetFixed
, &rate
))
5607 GetMovieNextInterestingTime(_self
->ob_itself
,
5608 interestingTimeFlags
,
5614 &interestingDuration
);
5615 _res
= Py_BuildValue("ll",
5617 interestingDuration
);
5621 static PyObject
*MovieObj_AddMovieResource(_self
, _args
)
5625 PyObject
*_res
= NULL
;
5630 if (!PyArg_ParseTuple(_args
, "hO&",
5632 PyMac_GetStr255
, resName
))
5634 _err
= AddMovieResource(_self
->ob_itself
,
5638 if (_err
!= noErr
) return PyMac_Error(_err
);
5639 _res
= Py_BuildValue("h",
5644 static PyObject
*MovieObj_UpdateMovieResource(_self
, _args
)
5648 PyObject
*_res
= NULL
;
5653 if (!PyArg_ParseTuple(_args
, "hhO&",
5656 PyMac_GetStr255
, resName
))
5658 _err
= UpdateMovieResource(_self
->ob_itself
,
5662 if (_err
!= noErr
) return PyMac_Error(_err
);
5668 static PyObject
*MovieObj_HasMovieChanged(_self
, _args
)
5672 PyObject
*_res
= NULL
;
5674 if (!PyArg_ParseTuple(_args
, ""))
5676 _rv
= HasMovieChanged(_self
->ob_itself
);
5677 _res
= Py_BuildValue("b",
5682 static PyObject
*MovieObj_ClearMovieChanged(_self
, _args
)
5686 PyObject
*_res
= NULL
;
5687 if (!PyArg_ParseTuple(_args
, ""))
5689 ClearMovieChanged(_self
->ob_itself
);
5695 static PyObject
*MovieObj_SetMovieDefaultDataRef(_self
, _args
)
5699 PyObject
*_res
= NULL
;
5703 if (!PyArg_ParseTuple(_args
, "O&O&",
5704 ResObj_Convert
, &dataRef
,
5705 PyMac_GetOSType
, &dataRefType
))
5707 _err
= SetMovieDefaultDataRef(_self
->ob_itself
,
5710 if (_err
!= noErr
) return PyMac_Error(_err
);
5716 static PyObject
*MovieObj_GetMovieDefaultDataRef(_self
, _args
)
5720 PyObject
*_res
= NULL
;
5724 if (!PyArg_ParseTuple(_args
, ""))
5726 _err
= GetMovieDefaultDataRef(_self
->ob_itself
,
5729 if (_err
!= noErr
) return PyMac_Error(_err
);
5730 _res
= Py_BuildValue("O&O&",
5731 ResObj_New
, dataRef
,
5732 PyMac_BuildOSType
, dataRefType
);
5736 #if !TARGET_API_MAC_CARBON
5738 static PyObject
*MovieObj_SetMovieAnchorDataRef(_self
, _args
)
5742 PyObject
*_res
= NULL
;
5746 if (!PyArg_ParseTuple(_args
, "O&O&",
5747 ResObj_Convert
, &dataRef
,
5748 PyMac_GetOSType
, &dataRefType
))
5750 _err
= SetMovieAnchorDataRef(_self
->ob_itself
,
5753 if (_err
!= noErr
) return PyMac_Error(_err
);
5760 #if !TARGET_API_MAC_CARBON
5762 static PyObject
*MovieObj_GetMovieAnchorDataRef(_self
, _args
)
5766 PyObject
*_res
= NULL
;
5771 if (!PyArg_ParseTuple(_args
, ""))
5773 _err
= GetMovieAnchorDataRef(_self
->ob_itself
,
5777 if (_err
!= noErr
) return PyMac_Error(_err
);
5778 _res
= Py_BuildValue("O&O&l",
5779 ResObj_New
, dataRef
,
5780 PyMac_BuildOSType
, dataRefType
,
5786 static PyObject
*MovieObj_SetMovieColorTable(_self
, _args
)
5790 PyObject
*_res
= NULL
;
5793 if (!PyArg_ParseTuple(_args
, "O&",
5794 ResObj_Convert
, &ctab
))
5796 _err
= SetMovieColorTable(_self
->ob_itself
,
5798 if (_err
!= noErr
) return PyMac_Error(_err
);
5804 static PyObject
*MovieObj_GetMovieColorTable(_self
, _args
)
5808 PyObject
*_res
= NULL
;
5811 if (!PyArg_ParseTuple(_args
, ""))
5813 _err
= GetMovieColorTable(_self
->ob_itself
,
5815 if (_err
!= noErr
) return PyMac_Error(_err
);
5816 _res
= Py_BuildValue("O&",
5821 static PyObject
*MovieObj_FlattenMovie(_self
, _args
)
5825 PyObject
*_res
= NULL
;
5826 long movieFlattenFlags
;
5829 ScriptCode scriptTag
;
5830 long createMovieFileFlags
;
5833 if (!PyArg_ParseTuple(_args
, "lO&O&hlO&",
5835 PyMac_GetFSSpec
, &theFile
,
5836 PyMac_GetOSType
, &creator
,
5838 &createMovieFileFlags
,
5839 PyMac_GetStr255
, resName
))
5841 FlattenMovie(_self
->ob_itself
,
5846 createMovieFileFlags
,
5849 _res
= Py_BuildValue("h",
5854 static PyObject
*MovieObj_FlattenMovieData(_self
, _args
)
5858 PyObject
*_res
= NULL
;
5860 long movieFlattenFlags
;
5863 ScriptCode scriptTag
;
5864 long createMovieFileFlags
;
5865 if (!PyArg_ParseTuple(_args
, "lO&O&hl",
5867 PyMac_GetFSSpec
, &theFile
,
5868 PyMac_GetOSType
, &creator
,
5870 &createMovieFileFlags
))
5872 _rv
= FlattenMovieData(_self
->ob_itself
,
5877 createMovieFileFlags
);
5878 _res
= Py_BuildValue("O&",
5883 static PyObject
*MovieObj_MovieSearchText(_self
, _args
)
5887 PyObject
*_res
= NULL
;
5893 TimeValue searchTime
;
5895 if (!PyArg_ParseTuple(_args
, "sll",
5900 _err
= MovieSearchText(_self
->ob_itself
,
5907 if (_err
!= noErr
) return PyMac_Error(_err
);
5908 _res
= Py_BuildValue("O&ll",
5909 TrackObj_New
, searchTrack
,
5915 static PyObject
*MovieObj_GetPosterBox(_self
, _args
)
5919 PyObject
*_res
= NULL
;
5921 if (!PyArg_ParseTuple(_args
, ""))
5923 GetPosterBox(_self
->ob_itself
,
5925 _res
= Py_BuildValue("O&",
5926 PyMac_BuildRect
, &boxRect
);
5930 static PyObject
*MovieObj_SetPosterBox(_self
, _args
)
5934 PyObject
*_res
= NULL
;
5936 if (!PyArg_ParseTuple(_args
, "O&",
5937 PyMac_GetRect
, &boxRect
))
5939 SetPosterBox(_self
->ob_itself
,
5946 static PyObject
*MovieObj_GetMovieSegmentDisplayBoundsRgn(_self
, _args
)
5950 PyObject
*_res
= NULL
;
5954 if (!PyArg_ParseTuple(_args
, "ll",
5958 _rv
= GetMovieSegmentDisplayBoundsRgn(_self
->ob_itself
,
5961 _res
= Py_BuildValue("O&",
5966 static PyObject
*MovieObj_GetMovieStatus(_self
, _args
)
5970 PyObject
*_res
= NULL
;
5971 ComponentResult _rv
;
5972 Track firstProblemTrack
;
5973 if (!PyArg_ParseTuple(_args
, ""))
5975 _rv
= GetMovieStatus(_self
->ob_itself
,
5976 &firstProblemTrack
);
5977 _res
= Py_BuildValue("lO&",
5979 TrackObj_New
, firstProblemTrack
);
5983 #if !TARGET_API_MAC_CARBON
5985 static PyObject
*MovieObj_GetMovieLoadState(_self
, _args
)
5989 PyObject
*_res
= NULL
;
5991 if (!PyArg_ParseTuple(_args
, ""))
5993 _rv
= GetMovieLoadState(_self
->ob_itself
);
5994 _res
= Py_BuildValue("l",
6000 static PyObject
*MovieObj_NewMovieController(_self
, _args
)
6004 PyObject
*_res
= NULL
;
6005 MovieController _rv
;
6008 if (!PyArg_ParseTuple(_args
, "O&l",
6009 PyMac_GetRect
, &movieRect
,
6012 _rv
= NewMovieController(_self
->ob_itself
,
6015 _res
= Py_BuildValue("O&",
6016 MovieCtlObj_New
, _rv
);
6020 static PyObject
*MovieObj_PutMovieOnScrap(_self
, _args
)
6024 PyObject
*_res
= NULL
;
6026 long movieScrapFlags
;
6027 if (!PyArg_ParseTuple(_args
, "l",
6030 _err
= PutMovieOnScrap(_self
->ob_itself
,
6032 if (_err
!= noErr
) return PyMac_Error(_err
);
6038 static PyObject
*MovieObj_SetMoviePlayHints(_self
, _args
)
6042 PyObject
*_res
= NULL
;
6045 if (!PyArg_ParseTuple(_args
, "ll",
6049 SetMoviePlayHints(_self
->ob_itself
,
6057 static PyObject
*MovieObj_GetMaxLoadedTimeInMovie(_self
, _args
)
6061 PyObject
*_res
= NULL
;
6064 if (!PyArg_ParseTuple(_args
, ""))
6066 _err
= GetMaxLoadedTimeInMovie(_self
->ob_itself
,
6068 if (_err
!= noErr
) return PyMac_Error(_err
);
6069 _res
= Py_BuildValue("l",
6074 static PyObject
*MovieObj_QTMovieNeedsTimeTable(_self
, _args
)
6078 PyObject
*_res
= NULL
;
6080 Boolean needsTimeTable
;
6081 if (!PyArg_ParseTuple(_args
, ""))
6083 _err
= QTMovieNeedsTimeTable(_self
->ob_itself
,
6085 if (_err
!= noErr
) return PyMac_Error(_err
);
6086 _res
= Py_BuildValue("b",
6091 static PyObject
*MovieObj_QTGetDataRefMaxFileOffset(_self
, _args
)
6095 PyObject
*_res
= NULL
;
6100 if (!PyArg_ParseTuple(_args
, "O&O&",
6101 PyMac_GetOSType
, &dataRefType
,
6102 ResObj_Convert
, &dataRef
))
6104 _err
= QTGetDataRefMaxFileOffset(_self
->ob_itself
,
6108 if (_err
!= noErr
) return PyMac_Error(_err
);
6109 _res
= Py_BuildValue("l",
6114 static PyMethodDef MovieObj_methods
[] = {
6115 {"MoviesTask", (PyCFunction
)MovieObj_MoviesTask
, 1,
6116 "(long maxMilliSecToUse) -> None"},
6117 {"PrerollMovie", (PyCFunction
)MovieObj_PrerollMovie
, 1,
6118 "(TimeValue time, Fixed Rate) -> None"},
6119 {"AbortPrePrerollMovie", (PyCFunction
)MovieObj_AbortPrePrerollMovie
, 1,
6120 "(OSErr err) -> None"},
6121 {"LoadMovieIntoRam", (PyCFunction
)MovieObj_LoadMovieIntoRam
, 1,
6122 "(TimeValue time, TimeValue duration, long flags) -> None"},
6123 {"SetMovieActive", (PyCFunction
)MovieObj_SetMovieActive
, 1,
6124 "(Boolean active) -> None"},
6125 {"GetMovieActive", (PyCFunction
)MovieObj_GetMovieActive
, 1,
6126 "() -> (Boolean _rv)"},
6127 {"StartMovie", (PyCFunction
)MovieObj_StartMovie
, 1,
6129 {"StopMovie", (PyCFunction
)MovieObj_StopMovie
, 1,
6131 {"GoToBeginningOfMovie", (PyCFunction
)MovieObj_GoToBeginningOfMovie
, 1,
6133 {"GoToEndOfMovie", (PyCFunction
)MovieObj_GoToEndOfMovie
, 1,
6135 {"IsMovieDone", (PyCFunction
)MovieObj_IsMovieDone
, 1,
6136 "() -> (Boolean _rv)"},
6137 {"GetMoviePreviewMode", (PyCFunction
)MovieObj_GetMoviePreviewMode
, 1,
6138 "() -> (Boolean _rv)"},
6139 {"SetMoviePreviewMode", (PyCFunction
)MovieObj_SetMoviePreviewMode
, 1,
6140 "(Boolean usePreview) -> None"},
6141 {"ShowMoviePoster", (PyCFunction
)MovieObj_ShowMoviePoster
, 1,
6143 {"GetMovieTimeBase", (PyCFunction
)MovieObj_GetMovieTimeBase
, 1,
6144 "() -> (TimeBase _rv)"},
6145 {"SetMovieMasterTimeBase", (PyCFunction
)MovieObj_SetMovieMasterTimeBase
, 1,
6146 "(TimeBase tb, TimeRecord slaveZero) -> None"},
6147 {"SetMovieMasterClock", (PyCFunction
)MovieObj_SetMovieMasterClock
, 1,
6148 "(Component clockMeister, TimeRecord slaveZero) -> None"},
6149 {"GetMovieGWorld", (PyCFunction
)MovieObj_GetMovieGWorld
, 1,
6150 "() -> (CGrafPtr port, GDHandle gdh)"},
6151 {"SetMovieGWorld", (PyCFunction
)MovieObj_SetMovieGWorld
, 1,
6152 "(CGrafPtr port, GDHandle gdh) -> None"},
6153 {"GetMovieNaturalBoundsRect", (PyCFunction
)MovieObj_GetMovieNaturalBoundsRect
, 1,
6154 "() -> (Rect naturalBounds)"},
6155 {"GetNextTrackForCompositing", (PyCFunction
)MovieObj_GetNextTrackForCompositing
, 1,
6156 "(Track theTrack) -> (Track _rv)"},
6157 {"GetPrevTrackForCompositing", (PyCFunction
)MovieObj_GetPrevTrackForCompositing
, 1,
6158 "(Track theTrack) -> (Track _rv)"},
6159 {"GetMoviePict", (PyCFunction
)MovieObj_GetMoviePict
, 1,
6160 "(TimeValue time) -> (PicHandle _rv)"},
6161 {"GetMoviePosterPict", (PyCFunction
)MovieObj_GetMoviePosterPict
, 1,
6162 "() -> (PicHandle _rv)"},
6163 {"UpdateMovie", (PyCFunction
)MovieObj_UpdateMovie
, 1,
6165 {"InvalidateMovieRegion", (PyCFunction
)MovieObj_InvalidateMovieRegion
, 1,
6166 "(RgnHandle invalidRgn) -> None"},
6167 {"GetMovieBox", (PyCFunction
)MovieObj_GetMovieBox
, 1,
6168 "() -> (Rect boxRect)"},
6169 {"SetMovieBox", (PyCFunction
)MovieObj_SetMovieBox
, 1,
6170 "(Rect boxRect) -> None"},
6171 {"GetMovieDisplayClipRgn", (PyCFunction
)MovieObj_GetMovieDisplayClipRgn
, 1,
6172 "() -> (RgnHandle _rv)"},
6173 {"SetMovieDisplayClipRgn", (PyCFunction
)MovieObj_SetMovieDisplayClipRgn
, 1,
6174 "(RgnHandle theClip) -> None"},
6175 {"GetMovieClipRgn", (PyCFunction
)MovieObj_GetMovieClipRgn
, 1,
6176 "() -> (RgnHandle _rv)"},
6177 {"SetMovieClipRgn", (PyCFunction
)MovieObj_SetMovieClipRgn
, 1,
6178 "(RgnHandle theClip) -> None"},
6179 {"GetMovieDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieDisplayBoundsRgn
, 1,
6180 "() -> (RgnHandle _rv)"},
6181 {"GetMovieBoundsRgn", (PyCFunction
)MovieObj_GetMovieBoundsRgn
, 1,
6182 "() -> (RgnHandle _rv)"},
6183 {"PutMovieIntoHandle", (PyCFunction
)MovieObj_PutMovieIntoHandle
, 1,
6184 "(Handle publicMovie) -> None"},
6185 {"PutMovieIntoDataFork", (PyCFunction
)MovieObj_PutMovieIntoDataFork
, 1,
6186 "(short fRefNum, long offset, long maxSize) -> None"},
6187 {"PutMovieIntoDataFork64", (PyCFunction
)MovieObj_PutMovieIntoDataFork64
, 1,
6188 "(long fRefNum, wide offset, unsigned long maxSize) -> None"},
6189 {"GetMovieCreationTime", (PyCFunction
)MovieObj_GetMovieCreationTime
, 1,
6190 "() -> (unsigned long _rv)"},
6191 {"GetMovieModificationTime", (PyCFunction
)MovieObj_GetMovieModificationTime
, 1,
6192 "() -> (unsigned long _rv)"},
6193 {"GetMovieTimeScale", (PyCFunction
)MovieObj_GetMovieTimeScale
, 1,
6194 "() -> (TimeScale _rv)"},
6195 {"SetMovieTimeScale", (PyCFunction
)MovieObj_SetMovieTimeScale
, 1,
6196 "(TimeScale timeScale) -> None"},
6197 {"GetMovieDuration", (PyCFunction
)MovieObj_GetMovieDuration
, 1,
6198 "() -> (TimeValue _rv)"},
6199 {"GetMovieRate", (PyCFunction
)MovieObj_GetMovieRate
, 1,
6200 "() -> (Fixed _rv)"},
6201 {"SetMovieRate", (PyCFunction
)MovieObj_SetMovieRate
, 1,
6202 "(Fixed rate) -> None"},
6203 {"GetMoviePreferredRate", (PyCFunction
)MovieObj_GetMoviePreferredRate
, 1,
6204 "() -> (Fixed _rv)"},
6205 {"SetMoviePreferredRate", (PyCFunction
)MovieObj_SetMoviePreferredRate
, 1,
6206 "(Fixed rate) -> None"},
6207 {"GetMoviePreferredVolume", (PyCFunction
)MovieObj_GetMoviePreferredVolume
, 1,
6208 "() -> (short _rv)"},
6209 {"SetMoviePreferredVolume", (PyCFunction
)MovieObj_SetMoviePreferredVolume
, 1,
6210 "(short volume) -> None"},
6211 {"GetMovieVolume", (PyCFunction
)MovieObj_GetMovieVolume
, 1,
6212 "() -> (short _rv)"},
6213 {"SetMovieVolume", (PyCFunction
)MovieObj_SetMovieVolume
, 1,
6214 "(short volume) -> None"},
6215 {"GetMoviePreviewTime", (PyCFunction
)MovieObj_GetMoviePreviewTime
, 1,
6216 "() -> (TimeValue previewTime, TimeValue previewDuration)"},
6217 {"SetMoviePreviewTime", (PyCFunction
)MovieObj_SetMoviePreviewTime
, 1,
6218 "(TimeValue previewTime, TimeValue previewDuration) -> None"},
6219 {"GetMoviePosterTime", (PyCFunction
)MovieObj_GetMoviePosterTime
, 1,
6220 "() -> (TimeValue _rv)"},
6221 {"SetMoviePosterTime", (PyCFunction
)MovieObj_SetMoviePosterTime
, 1,
6222 "(TimeValue posterTime) -> None"},
6223 {"GetMovieSelection", (PyCFunction
)MovieObj_GetMovieSelection
, 1,
6224 "() -> (TimeValue selectionTime, TimeValue selectionDuration)"},
6225 {"SetMovieSelection", (PyCFunction
)MovieObj_SetMovieSelection
, 1,
6226 "(TimeValue selectionTime, TimeValue selectionDuration) -> None"},
6227 {"SetMovieActiveSegment", (PyCFunction
)MovieObj_SetMovieActiveSegment
, 1,
6228 "(TimeValue startTime, TimeValue duration) -> None"},
6229 {"GetMovieActiveSegment", (PyCFunction
)MovieObj_GetMovieActiveSegment
, 1,
6230 "() -> (TimeValue startTime, TimeValue duration)"},
6231 {"GetMovieTime", (PyCFunction
)MovieObj_GetMovieTime
, 1,
6232 "() -> (TimeValue _rv, TimeRecord currentTime)"},
6233 {"SetMovieTime", (PyCFunction
)MovieObj_SetMovieTime
, 1,
6234 "(TimeRecord newtime) -> None"},
6235 {"SetMovieTimeValue", (PyCFunction
)MovieObj_SetMovieTimeValue
, 1,
6236 "(TimeValue newtime) -> None"},
6237 {"GetMovieUserData", (PyCFunction
)MovieObj_GetMovieUserData
, 1,
6238 "() -> (UserData _rv)"},
6239 {"GetMovieTrackCount", (PyCFunction
)MovieObj_GetMovieTrackCount
, 1,
6240 "() -> (long _rv)"},
6241 {"GetMovieTrack", (PyCFunction
)MovieObj_GetMovieTrack
, 1,
6242 "(long trackID) -> (Track _rv)"},
6243 {"GetMovieIndTrack", (PyCFunction
)MovieObj_GetMovieIndTrack
, 1,
6244 "(long index) -> (Track _rv)"},
6245 {"GetMovieIndTrackType", (PyCFunction
)MovieObj_GetMovieIndTrackType
, 1,
6246 "(long index, OSType trackType, long flags) -> (Track _rv)"},
6247 {"NewMovieTrack", (PyCFunction
)MovieObj_NewMovieTrack
, 1,
6248 "(Fixed width, Fixed height, short trackVolume) -> (Track _rv)"},
6249 {"SetAutoTrackAlternatesEnabled", (PyCFunction
)MovieObj_SetAutoTrackAlternatesEnabled
, 1,
6250 "(Boolean enable) -> None"},
6251 {"SelectMovieAlternates", (PyCFunction
)MovieObj_SelectMovieAlternates
, 1,
6253 {"InsertMovieSegment", (PyCFunction
)MovieObj_InsertMovieSegment
, 1,
6254 "(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None"},
6255 {"InsertEmptyMovieSegment", (PyCFunction
)MovieObj_InsertEmptyMovieSegment
, 1,
6256 "(TimeValue dstIn, TimeValue dstDuration) -> None"},
6257 {"DeleteMovieSegment", (PyCFunction
)MovieObj_DeleteMovieSegment
, 1,
6258 "(TimeValue startTime, TimeValue duration) -> None"},
6259 {"ScaleMovieSegment", (PyCFunction
)MovieObj_ScaleMovieSegment
, 1,
6260 "(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None"},
6261 {"CutMovieSelection", (PyCFunction
)MovieObj_CutMovieSelection
, 1,
6262 "() -> (Movie _rv)"},
6263 {"CopyMovieSelection", (PyCFunction
)MovieObj_CopyMovieSelection
, 1,
6264 "() -> (Movie _rv)"},
6265 {"PasteMovieSelection", (PyCFunction
)MovieObj_PasteMovieSelection
, 1,
6266 "(Movie src) -> None"},
6267 {"AddMovieSelection", (PyCFunction
)MovieObj_AddMovieSelection
, 1,
6268 "(Movie src) -> None"},
6269 {"ClearMovieSelection", (PyCFunction
)MovieObj_ClearMovieSelection
, 1,
6271 {"PutMovieIntoTypedHandle", (PyCFunction
)MovieObj_PutMovieIntoTypedHandle
, 1,
6272 "(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None"},
6273 {"CopyMovieSettings", (PyCFunction
)MovieObj_CopyMovieSettings
, 1,
6274 "(Movie dstMovie) -> None"},
6275 {"ConvertMovieToFile", (PyCFunction
)MovieObj_ConvertMovieToFile
, 1,
6276 "(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)"},
6277 {"GetMovieDataSize", (PyCFunction
)MovieObj_GetMovieDataSize
, 1,
6278 "(TimeValue startTime, TimeValue duration) -> (long _rv)"},
6279 {"GetMovieDataSize64", (PyCFunction
)MovieObj_GetMovieDataSize64
, 1,
6280 "(TimeValue startTime, TimeValue duration) -> (wide dataSize)"},
6281 {"PtInMovie", (PyCFunction
)MovieObj_PtInMovie
, 1,
6282 "(Point pt) -> (Boolean _rv)"},
6283 {"SetMovieLanguage", (PyCFunction
)MovieObj_SetMovieLanguage
, 1,
6284 "(long language) -> None"},
6285 {"GetMovieNextInterestingTime", (PyCFunction
)MovieObj_GetMovieNextInterestingTime
, 1,
6286 "(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)"},
6287 {"AddMovieResource", (PyCFunction
)MovieObj_AddMovieResource
, 1,
6288 "(short resRefNum, Str255 resName) -> (short resId)"},
6289 {"UpdateMovieResource", (PyCFunction
)MovieObj_UpdateMovieResource
, 1,
6290 "(short resRefNum, short resId, Str255 resName) -> None"},
6291 {"HasMovieChanged", (PyCFunction
)MovieObj_HasMovieChanged
, 1,
6292 "() -> (Boolean _rv)"},
6293 {"ClearMovieChanged", (PyCFunction
)MovieObj_ClearMovieChanged
, 1,
6295 {"SetMovieDefaultDataRef", (PyCFunction
)MovieObj_SetMovieDefaultDataRef
, 1,
6296 "(Handle dataRef, OSType dataRefType) -> None"},
6297 {"GetMovieDefaultDataRef", (PyCFunction
)MovieObj_GetMovieDefaultDataRef
, 1,
6298 "() -> (Handle dataRef, OSType dataRefType)"},
6300 #if !TARGET_API_MAC_CARBON
6301 {"SetMovieAnchorDataRef", (PyCFunction
)MovieObj_SetMovieAnchorDataRef
, 1,
6302 "(Handle dataRef, OSType dataRefType) -> None"},
6305 #if !TARGET_API_MAC_CARBON
6306 {"GetMovieAnchorDataRef", (PyCFunction
)MovieObj_GetMovieAnchorDataRef
, 1,
6307 "() -> (Handle dataRef, OSType dataRefType, long outFlags)"},
6309 {"SetMovieColorTable", (PyCFunction
)MovieObj_SetMovieColorTable
, 1,
6310 "(CTabHandle ctab) -> None"},
6311 {"GetMovieColorTable", (PyCFunction
)MovieObj_GetMovieColorTable
, 1,
6312 "() -> (CTabHandle ctab)"},
6313 {"FlattenMovie", (PyCFunction
)MovieObj_FlattenMovie
, 1,
6314 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)"},
6315 {"FlattenMovieData", (PyCFunction
)MovieObj_FlattenMovieData
, 1,
6316 "(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)"},
6317 {"MovieSearchText", (PyCFunction
)MovieObj_MovieSearchText
, 1,
6318 "(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)"},
6319 {"GetPosterBox", (PyCFunction
)MovieObj_GetPosterBox
, 1,
6320 "() -> (Rect boxRect)"},
6321 {"SetPosterBox", (PyCFunction
)MovieObj_SetPosterBox
, 1,
6322 "(Rect boxRect) -> None"},
6323 {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction
)MovieObj_GetMovieSegmentDisplayBoundsRgn
, 1,
6324 "(TimeValue time, TimeValue duration) -> (RgnHandle _rv)"},
6325 {"GetMovieStatus", (PyCFunction
)MovieObj_GetMovieStatus
, 1,
6326 "() -> (ComponentResult _rv, Track firstProblemTrack)"},
6328 #if !TARGET_API_MAC_CARBON
6329 {"GetMovieLoadState", (PyCFunction
)MovieObj_GetMovieLoadState
, 1,
6330 "() -> (long _rv)"},
6332 {"NewMovieController", (PyCFunction
)MovieObj_NewMovieController
, 1,
6333 "(Rect movieRect, long someFlags) -> (MovieController _rv)"},
6334 {"PutMovieOnScrap", (PyCFunction
)MovieObj_PutMovieOnScrap
, 1,
6335 "(long movieScrapFlags) -> None"},
6336 {"SetMoviePlayHints", (PyCFunction
)MovieObj_SetMoviePlayHints
, 1,
6337 "(long flags, long flagsMask) -> None"},
6338 {"GetMaxLoadedTimeInMovie", (PyCFunction
)MovieObj_GetMaxLoadedTimeInMovie
, 1,
6339 "() -> (TimeValue time)"},
6340 {"QTMovieNeedsTimeTable", (PyCFunction
)MovieObj_QTMovieNeedsTimeTable
, 1,
6341 "() -> (Boolean needsTimeTable)"},
6342 {"QTGetDataRefMaxFileOffset", (PyCFunction
)MovieObj_QTGetDataRefMaxFileOffset
, 1,
6343 "(OSType dataRefType, Handle dataRef) -> (long offset)"},
6347 PyMethodChain MovieObj_chain
= { MovieObj_methods
, NULL
};
6349 static PyObject
*MovieObj_getattr(self
, name
)
6353 return Py_FindMethodInChain(&MovieObj_chain
, (PyObject
*)self
, name
);
6356 #define MovieObj_setattr NULL
6358 #define MovieObj_compare NULL
6360 #define MovieObj_repr NULL
6362 #define MovieObj_hash NULL
6364 PyTypeObject Movie_Type
= {
6365 PyObject_HEAD_INIT(&PyType_Type
)
6367 "Movie", /*tp_name*/
6368 sizeof(MovieObject
), /*tp_basicsize*/
6371 (destructor
) MovieObj_dealloc
, /*tp_dealloc*/
6373 (getattrfunc
) MovieObj_getattr
, /*tp_getattr*/
6374 (setattrfunc
) MovieObj_setattr
, /*tp_setattr*/
6375 (cmpfunc
) MovieObj_compare
, /*tp_compare*/
6376 (reprfunc
) MovieObj_repr
, /*tp_repr*/
6377 (PyNumberMethods
*)0, /* tp_as_number */
6378 (PySequenceMethods
*)0, /* tp_as_sequence */
6379 (PyMappingMethods
*)0, /* tp_as_mapping */
6380 (hashfunc
) MovieObj_hash
, /*tp_hash*/
6383 /* --------------------- End object type Movie ---------------------- */
6386 #if !TARGET_API_MAC_CARBON
6388 static PyObject
*Qt_CheckQuickTimeRegistration(_self
, _args
)
6392 PyObject
*_res
= NULL
;
6393 void * registrationKey
;
6395 if (!PyArg_ParseTuple(_args
, "sl",
6399 CheckQuickTimeRegistration(registrationKey
,
6407 static PyObject
*Qt_EnterMovies(_self
, _args
)
6411 PyObject
*_res
= NULL
;
6413 if (!PyArg_ParseTuple(_args
, ""))
6415 _err
= EnterMovies();
6416 if (_err
!= noErr
) return PyMac_Error(_err
);
6422 static PyObject
*Qt_ExitMovies(_self
, _args
)
6426 PyObject
*_res
= NULL
;
6427 if (!PyArg_ParseTuple(_args
, ""))
6435 static PyObject
*Qt_GetMoviesError(_self
, _args
)
6439 PyObject
*_res
= NULL
;
6441 if (!PyArg_ParseTuple(_args
, ""))
6443 _err
= GetMoviesError();
6444 if (_err
!= noErr
) return PyMac_Error(_err
);
6450 static PyObject
*Qt_ClearMoviesStickyError(_self
, _args
)
6454 PyObject
*_res
= NULL
;
6455 if (!PyArg_ParseTuple(_args
, ""))
6457 ClearMoviesStickyError();
6463 static PyObject
*Qt_GetMoviesStickyError(_self
, _args
)
6467 PyObject
*_res
= NULL
;
6469 if (!PyArg_ParseTuple(_args
, ""))
6471 _err
= GetMoviesStickyError();
6472 if (_err
!= noErr
) return PyMac_Error(_err
);
6478 static PyObject
*Qt_DisposeMatte(_self
, _args
)
6482 PyObject
*_res
= NULL
;
6483 PixMapHandle theMatte
;
6484 if (!PyArg_ParseTuple(_args
, "O&",
6485 ResObj_Convert
, &theMatte
))
6487 DisposeMatte(theMatte
);
6493 static PyObject
*Qt_NewMovie(_self
, _args
)
6497 PyObject
*_res
= NULL
;
6500 if (!PyArg_ParseTuple(_args
, "l",
6503 _rv
= NewMovie(flags
);
6504 _res
= Py_BuildValue("O&",
6509 static PyObject
*Qt_GetDataHandler(_self
, _args
)
6513 PyObject
*_res
= NULL
;
6516 OSType dataHandlerSubType
;
6518 if (!PyArg_ParseTuple(_args
, "O&O&l",
6519 ResObj_Convert
, &dataRef
,
6520 PyMac_GetOSType
, &dataHandlerSubType
,
6523 _rv
= GetDataHandler(dataRef
,
6526 _res
= Py_BuildValue("O&",
6531 #if !TARGET_API_MAC_CARBON
6533 static PyObject
*Qt_OpenADataHandler(_self
, _args
)
6537 PyObject
*_res
= NULL
;
6540 OSType dataHandlerSubType
;
6541 Handle anchorDataRef
;
6542 OSType anchorDataRefType
;
6545 ComponentInstance dh
;
6546 if (!PyArg_ParseTuple(_args
, "O&O&O&O&O&l",
6547 ResObj_Convert
, &dataRef
,
6548 PyMac_GetOSType
, &dataHandlerSubType
,
6549 ResObj_Convert
, &anchorDataRef
,
6550 PyMac_GetOSType
, &anchorDataRefType
,
6551 TimeBaseObj_Convert
, &tb
,
6554 _err
= OpenADataHandler(dataRef
,
6561 if (_err
!= noErr
) return PyMac_Error(_err
);
6562 _res
= Py_BuildValue("O&",
6563 CmpInstObj_New
, dh
);
6568 static PyObject
*Qt_PasteHandleIntoMovie(_self
, _args
)
6572 PyObject
*_res
= NULL
;
6578 ComponentInstance userComp
;
6579 if (!PyArg_ParseTuple(_args
, "O&O&O&lO&",
6581 PyMac_GetOSType
, &handleType
,
6582 MovieObj_Convert
, &theMovie
,
6584 CmpInstObj_Convert
, &userComp
))
6586 _err
= PasteHandleIntoMovie(h
,
6591 if (_err
!= noErr
) return PyMac_Error(_err
);
6597 static PyObject
*Qt_GetMovieImporterForDataRef(_self
, _args
)
6601 PyObject
*_res
= NULL
;
6607 if (!PyArg_ParseTuple(_args
, "O&O&l",
6608 PyMac_GetOSType
, &dataRefType
,
6609 ResObj_Convert
, &dataRef
,
6612 _err
= GetMovieImporterForDataRef(dataRefType
,
6616 if (_err
!= noErr
) return PyMac_Error(_err
);
6617 _res
= Py_BuildValue("O&",
6618 CmpObj_New
, importer
);
6622 static PyObject
*Qt_TrackTimeToMediaTime(_self
, _args
)
6626 PyObject
*_res
= NULL
;
6630 if (!PyArg_ParseTuple(_args
, "lO&",
6632 TrackObj_Convert
, &theTrack
))
6634 _rv
= TrackTimeToMediaTime(value
,
6636 _res
= Py_BuildValue("l",
6641 static PyObject
*Qt_NewUserData(_self
, _args
)
6645 PyObject
*_res
= NULL
;
6647 UserData theUserData
;
6648 if (!PyArg_ParseTuple(_args
, ""))
6650 _err
= NewUserData(&theUserData
);
6651 if (_err
!= noErr
) return PyMac_Error(_err
);
6652 _res
= Py_BuildValue("O&",
6653 UserDataObj_New
, theUserData
);
6657 static PyObject
*Qt_NewUserDataFromHandle(_self
, _args
)
6661 PyObject
*_res
= NULL
;
6664 UserData theUserData
;
6665 if (!PyArg_ParseTuple(_args
, "O&",
6666 ResObj_Convert
, &h
))
6668 _err
= NewUserDataFromHandle(h
,
6670 if (_err
!= noErr
) return PyMac_Error(_err
);
6671 _res
= Py_BuildValue("O&",
6672 UserDataObj_New
, theUserData
);
6676 static PyObject
*Qt_CreateMovieFile(_self
, _args
)
6680 PyObject
*_res
= NULL
;
6684 ScriptCode scriptTag
;
6685 long createMovieFileFlags
;
6688 if (!PyArg_ParseTuple(_args
, "O&O&hl",
6689 PyMac_GetFSSpec
, &fileSpec
,
6690 PyMac_GetOSType
, &creator
,
6692 &createMovieFileFlags
))
6694 _err
= CreateMovieFile(&fileSpec
,
6697 createMovieFileFlags
,
6700 if (_err
!= noErr
) return PyMac_Error(_err
);
6701 _res
= Py_BuildValue("hO&",
6703 MovieObj_New
, newmovie
);
6707 static PyObject
*Qt_OpenMovieFile(_self
, _args
)
6711 PyObject
*_res
= NULL
;
6716 if (!PyArg_ParseTuple(_args
, "O&b",
6717 PyMac_GetFSSpec
, &fileSpec
,
6720 _err
= OpenMovieFile(&fileSpec
,
6723 if (_err
!= noErr
) return PyMac_Error(_err
);
6724 _res
= Py_BuildValue("h",
6729 static PyObject
*Qt_CloseMovieFile(_self
, _args
)
6733 PyObject
*_res
= NULL
;
6736 if (!PyArg_ParseTuple(_args
, "h",
6739 _err
= CloseMovieFile(resRefNum
);
6740 if (_err
!= noErr
) return PyMac_Error(_err
);
6746 static PyObject
*Qt_DeleteMovieFile(_self
, _args
)
6750 PyObject
*_res
= NULL
;
6753 if (!PyArg_ParseTuple(_args
, "O&",
6754 PyMac_GetFSSpec
, &fileSpec
))
6756 _err
= DeleteMovieFile(&fileSpec
);
6757 if (_err
!= noErr
) return PyMac_Error(_err
);
6763 static PyObject
*Qt_NewMovieFromFile(_self
, _args
)
6767 PyObject
*_res
= NULL
;
6772 short newMovieFlags
;
6773 Boolean dataRefWasChanged
;
6774 if (!PyArg_ParseTuple(_args
, "hhh",
6779 _err
= NewMovieFromFile(&theMovie
,
6784 &dataRefWasChanged
);
6785 if (_err
!= noErr
) return PyMac_Error(_err
);
6786 _res
= Py_BuildValue("O&hb",
6787 MovieObj_New
, theMovie
,
6793 static PyObject
*Qt_NewMovieFromHandle(_self
, _args
)
6797 PyObject
*_res
= NULL
;
6801 short newMovieFlags
;
6802 Boolean dataRefWasChanged
;
6803 if (!PyArg_ParseTuple(_args
, "O&h",
6807 _err
= NewMovieFromHandle(&theMovie
,
6810 &dataRefWasChanged
);
6811 if (_err
!= noErr
) return PyMac_Error(_err
);
6812 _res
= Py_BuildValue("O&b",
6813 MovieObj_New
, theMovie
,
6818 static PyObject
*Qt_NewMovieFromDataFork(_self
, _args
)
6822 PyObject
*_res
= NULL
;
6827 short newMovieFlags
;
6828 Boolean dataRefWasChanged
;
6829 if (!PyArg_ParseTuple(_args
, "hlh",
6834 _err
= NewMovieFromDataFork(&theMovie
,
6838 &dataRefWasChanged
);
6839 if (_err
!= noErr
) return PyMac_Error(_err
);
6840 _res
= Py_BuildValue("O&b",
6841 MovieObj_New
, theMovie
,
6846 static PyObject
*Qt_NewMovieFromDataFork64(_self
, _args
)
6850 PyObject
*_res
= NULL
;
6855 short newMovieFlags
;
6856 Boolean dataRefWasChanged
;
6857 if (!PyArg_ParseTuple(_args
, "lO&h",
6859 PyMac_Getwide
, &fileOffset
,
6862 _err
= NewMovieFromDataFork64(&theMovie
,
6866 &dataRefWasChanged
);
6867 if (_err
!= noErr
) return PyMac_Error(_err
);
6868 _res
= Py_BuildValue("O&b",
6869 MovieObj_New
, theMovie
,
6874 static PyObject
*Qt_NewMovieFromDataRef(_self
, _args
)
6878 PyObject
*_res
= NULL
;
6885 if (!PyArg_ParseTuple(_args
, "hO&O&",
6887 ResObj_Convert
, &dataRef
,
6888 PyMac_GetOSType
, &dataRefType
))
6890 _err
= NewMovieFromDataRef(&m
,
6895 if (_err
!= noErr
) return PyMac_Error(_err
);
6896 _res
= Py_BuildValue("O&h",
6902 static PyObject
*Qt_RemoveMovieResource(_self
, _args
)
6906 PyObject
*_res
= NULL
;
6910 if (!PyArg_ParseTuple(_args
, "hh",
6914 _err
= RemoveMovieResource(resRefNum
,
6916 if (_err
!= noErr
) return PyMac_Error(_err
);
6922 static PyObject
*Qt_CreateShortcutMovieFile(_self
, _args
)
6926 PyObject
*_res
= NULL
;
6930 ScriptCode scriptTag
;
6931 long createMovieFileFlags
;
6932 Handle targetDataRef
;
6933 OSType targetDataRefType
;
6934 if (!PyArg_ParseTuple(_args
, "O&O&hlO&O&",
6935 PyMac_GetFSSpec
, &fileSpec
,
6936 PyMac_GetOSType
, &creator
,
6938 &createMovieFileFlags
,
6939 ResObj_Convert
, &targetDataRef
,
6940 PyMac_GetOSType
, &targetDataRefType
))
6942 _err
= CreateShortcutMovieFile(&fileSpec
,
6945 createMovieFileFlags
,
6948 if (_err
!= noErr
) return PyMac_Error(_err
);
6954 static PyObject
*Qt_NewMovieFromScrap(_self
, _args
)
6958 PyObject
*_res
= NULL
;
6961 if (!PyArg_ParseTuple(_args
, "l",
6964 _rv
= NewMovieFromScrap(newMovieFlags
);
6965 _res
= Py_BuildValue("O&",
6970 static PyObject
*Qt_QTNewAlias(_self
, _args
)
6974 PyObject
*_res
= NULL
;
6979 if (!PyArg_ParseTuple(_args
, "O&b",
6980 PyMac_GetFSSpec
, &fss
,
6983 _err
= QTNewAlias(&fss
,
6986 if (_err
!= noErr
) return PyMac_Error(_err
);
6987 _res
= Py_BuildValue("O&",
6992 static PyObject
*Qt_EndFullScreen(_self
, _args
)
6996 PyObject
*_res
= NULL
;
7000 if (!PyArg_ParseTuple(_args
, "sl",
7004 _err
= EndFullScreen(fullState
,
7006 if (_err
!= noErr
) return PyMac_Error(_err
);
7012 static PyObject
*Qt_AddSoundDescriptionExtension(_self
, _args
)
7016 PyObject
*_res
= NULL
;
7018 SoundDescriptionHandle desc
;
7021 if (!PyArg_ParseTuple(_args
, "O&O&O&",
7022 ResObj_Convert
, &desc
,
7023 ResObj_Convert
, &extension
,
7024 PyMac_GetOSType
, &idType
))
7026 _err
= AddSoundDescriptionExtension(desc
,
7029 if (_err
!= noErr
) return PyMac_Error(_err
);
7035 static PyObject
*Qt_GetSoundDescriptionExtension(_self
, _args
)
7039 PyObject
*_res
= NULL
;
7041 SoundDescriptionHandle desc
;
7044 if (!PyArg_ParseTuple(_args
, "O&O&",
7045 ResObj_Convert
, &desc
,
7046 PyMac_GetOSType
, &idType
))
7048 _err
= GetSoundDescriptionExtension(desc
,
7051 if (_err
!= noErr
) return PyMac_Error(_err
);
7052 _res
= Py_BuildValue("O&",
7053 ResObj_New
, extension
);
7057 static PyObject
*Qt_RemoveSoundDescriptionExtension(_self
, _args
)
7061 PyObject
*_res
= NULL
;
7063 SoundDescriptionHandle desc
;
7065 if (!PyArg_ParseTuple(_args
, "O&O&",
7066 ResObj_Convert
, &desc
,
7067 PyMac_GetOSType
, &idType
))
7069 _err
= RemoveSoundDescriptionExtension(desc
,
7071 if (_err
!= noErr
) return PyMac_Error(_err
);
7077 static PyObject
*Qt_QTIsStandardParameterDialogEvent(_self
, _args
)
7081 PyObject
*_res
= NULL
;
7084 QTParameterDialog createdDialog
;
7085 if (!PyArg_ParseTuple(_args
, "l",
7088 _err
= QTIsStandardParameterDialogEvent(&pEvent
,
7090 if (_err
!= noErr
) return PyMac_Error(_err
);
7091 _res
= Py_BuildValue("O&",
7092 PyMac_BuildEventRecord
, &pEvent
);
7096 static PyObject
*Qt_QTDismissStandardParameterDialog(_self
, _args
)
7100 PyObject
*_res
= NULL
;
7102 QTParameterDialog createdDialog
;
7103 if (!PyArg_ParseTuple(_args
, "l",
7106 _err
= QTDismissStandardParameterDialog(createdDialog
);
7107 if (_err
!= noErr
) return PyMac_Error(_err
);
7113 static PyObject
*Qt_QTStandardParameterDialogDoAction(_self
, _args
)
7117 PyObject
*_res
= NULL
;
7119 QTParameterDialog createdDialog
;
7122 if (!PyArg_ParseTuple(_args
, "lls",
7127 _err
= QTStandardParameterDialogDoAction(createdDialog
,
7130 if (_err
!= noErr
) return PyMac_Error(_err
);
7136 static PyObject
*Qt_QTRegisterAccessKey(_self
, _args
)
7140 PyObject
*_res
= NULL
;
7142 Str255 accessKeyType
;
7145 if (!PyArg_ParseTuple(_args
, "O&lO&",
7146 PyMac_GetStr255
, accessKeyType
,
7148 ResObj_Convert
, &accessKey
))
7150 _err
= QTRegisterAccessKey(accessKeyType
,
7153 if (_err
!= noErr
) return PyMac_Error(_err
);
7159 static PyObject
*Qt_QTUnregisterAccessKey(_self
, _args
)
7163 PyObject
*_res
= NULL
;
7165 Str255 accessKeyType
;
7168 if (!PyArg_ParseTuple(_args
, "O&lO&",
7169 PyMac_GetStr255
, accessKeyType
,
7171 ResObj_Convert
, &accessKey
))
7173 _err
= QTUnregisterAccessKey(accessKeyType
,
7176 if (_err
!= noErr
) return PyMac_Error(_err
);
7182 static PyObject
*Qt_QTTextToNativeText(_self
, _args
)
7186 PyObject
*_res
= NULL
;
7191 if (!PyArg_ParseTuple(_args
, "O&ll",
7192 ResObj_Convert
, &theText
,
7196 _err
= QTTextToNativeText(theText
,
7199 if (_err
!= noErr
) return PyMac_Error(_err
);
7205 static PyObject
*Qt_VideoMediaResetStatistics(_self
, _args
)
7209 PyObject
*_res
= NULL
;
7210 ComponentResult _rv
;
7212 if (!PyArg_ParseTuple(_args
, "O&",
7213 CmpInstObj_Convert
, &mh
))
7215 _rv
= VideoMediaResetStatistics(mh
);
7216 _res
= Py_BuildValue("l",
7221 static PyObject
*Qt_VideoMediaGetStatistics(_self
, _args
)
7225 PyObject
*_res
= NULL
;
7226 ComponentResult _rv
;
7228 if (!PyArg_ParseTuple(_args
, "O&",
7229 CmpInstObj_Convert
, &mh
))
7231 _rv
= VideoMediaGetStatistics(mh
);
7232 _res
= Py_BuildValue("l",
7237 static PyObject
*Qt_VideoMediaGetStallCount(_self
, _args
)
7241 PyObject
*_res
= NULL
;
7242 ComponentResult _rv
;
7244 unsigned long stalls
;
7245 if (!PyArg_ParseTuple(_args
, "O&",
7246 CmpInstObj_Convert
, &mh
))
7248 _rv
= VideoMediaGetStallCount(mh
,
7250 _res
= Py_BuildValue("ll",
7256 static PyObject
*Qt_VideoMediaSetCodecParameter(_self
, _args
)
7260 PyObject
*_res
= NULL
;
7261 ComponentResult _rv
;
7265 long parameterChangeSeed
;
7268 if (!PyArg_ParseTuple(_args
, "O&O&O&lsl",
7269 CmpInstObj_Convert
, &mh
,
7270 PyMac_GetOSType
, &cType
,
7271 PyMac_GetOSType
, ¶meterID
,
7272 ¶meterChangeSeed
,
7276 _rv
= VideoMediaSetCodecParameter(mh
,
7279 parameterChangeSeed
,
7282 _res
= Py_BuildValue("l",
7287 static PyObject
*Qt_VideoMediaGetCodecParameter(_self
, _args
)
7291 PyObject
*_res
= NULL
;
7292 ComponentResult _rv
;
7296 Handle outParameterData
;
7297 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
7298 CmpInstObj_Convert
, &mh
,
7299 PyMac_GetOSType
, &cType
,
7300 PyMac_GetOSType
, ¶meterID
,
7301 ResObj_Convert
, &outParameterData
))
7303 _rv
= VideoMediaGetCodecParameter(mh
,
7307 _res
= Py_BuildValue("l",
7312 static PyObject
*Qt_TextMediaAddTextSample(_self
, _args
)
7316 PyObject
*_res
= NULL
;
7317 ComponentResult _rv
;
7326 short textJustification
;
7329 TimeValue scrollDelay
;
7332 RGBColor rgbHiliteColor
;
7334 TimeValue sampleTime
;
7335 if (!PyArg_ParseTuple(_args
, "O&slhhbhllhhl",
7336 CmpInstObj_Convert
, &mh
,
7349 _rv
= TextMediaAddTextSample(mh
,
7366 _res
= Py_BuildValue("lO&O&O&O&l",
7368 QdRGB_New
, &textColor
,
7369 QdRGB_New
, &backColor
,
7370 PyMac_BuildRect
, &textBox
,
7371 QdRGB_New
, &rgbHiliteColor
,
7376 static PyObject
*Qt_TextMediaAddTESample(_self
, _args
)
7380 PyObject
*_res
= NULL
;
7381 ComponentResult _rv
;
7385 short textJustification
;
7388 TimeValue scrollDelay
;
7391 RGBColor rgbHiliteColor
;
7393 TimeValue sampleTime
;
7394 if (!PyArg_ParseTuple(_args
, "O&O&hllhhl",
7395 CmpInstObj_Convert
, &mh
,
7396 ResObj_Convert
, &hTE
,
7404 _rv
= TextMediaAddTESample(mh
,
7416 _res
= Py_BuildValue("lO&O&O&l",
7418 QdRGB_New
, &backColor
,
7419 PyMac_BuildRect
, &textBox
,
7420 QdRGB_New
, &rgbHiliteColor
,
7425 static PyObject
*Qt_TextMediaAddHiliteSample(_self
, _args
)
7429 PyObject
*_res
= NULL
;
7430 ComponentResult _rv
;
7434 RGBColor rgbHiliteColor
;
7436 TimeValue sampleTime
;
7437 if (!PyArg_ParseTuple(_args
, "O&hhl",
7438 CmpInstObj_Convert
, &mh
,
7443 _rv
= TextMediaAddHiliteSample(mh
,
7449 _res
= Py_BuildValue("lO&l",
7451 QdRGB_New
, &rgbHiliteColor
,
7456 static PyObject
*Qt_TextMediaDrawRaw(_self
, _args
)
7460 PyObject
*_res
= NULL
;
7461 ComponentResult _rv
;
7467 TextDescriptionHandle tdh
;
7468 if (!PyArg_ParseTuple(_args
, "O&O&O&slO&",
7469 CmpInstObj_Convert
, &mh
,
7470 GWorldObj_Convert
, &gw
,
7471 OptResObj_Convert
, &gd
,
7474 ResObj_Convert
, &tdh
))
7476 _rv
= TextMediaDrawRaw(mh
,
7482 _res
= Py_BuildValue("l",
7487 static PyObject
*Qt_TextMediaSetTextProperty(_self
, _args
)
7491 PyObject
*_res
= NULL
;
7492 ComponentResult _rv
;
7494 TimeValue atMediaTime
;
7498 if (!PyArg_ParseTuple(_args
, "O&llsl",
7499 CmpInstObj_Convert
, &mh
,
7505 _rv
= TextMediaSetTextProperty(mh
,
7510 _res
= Py_BuildValue("l",
7515 static PyObject
*Qt_TextMediaRawSetup(_self
, _args
)
7519 PyObject
*_res
= NULL
;
7520 ComponentResult _rv
;
7526 TextDescriptionHandle tdh
;
7527 TimeValue sampleDuration
;
7528 if (!PyArg_ParseTuple(_args
, "O&O&O&slO&l",
7529 CmpInstObj_Convert
, &mh
,
7530 GWorldObj_Convert
, &gw
,
7531 OptResObj_Convert
, &gd
,
7534 ResObj_Convert
, &tdh
,
7537 _rv
= TextMediaRawSetup(mh
,
7544 _res
= Py_BuildValue("l",
7549 static PyObject
*Qt_TextMediaRawIdle(_self
, _args
)
7553 PyObject
*_res
= NULL
;
7554 ComponentResult _rv
;
7558 TimeValue sampleTime
;
7561 if (!PyArg_ParseTuple(_args
, "O&O&O&ll",
7562 CmpInstObj_Convert
, &mh
,
7563 GWorldObj_Convert
, &gw
,
7564 OptResObj_Convert
, &gd
,
7568 _rv
= TextMediaRawIdle(mh
,
7574 _res
= Py_BuildValue("ll",
7580 static PyObject
*Qt_TextMediaFindNextText(_self
, _args
)
7584 PyObject
*_res
= NULL
;
7585 ComponentResult _rv
;
7590 TimeValue startTime
;
7591 TimeValue foundTime
;
7592 TimeValue foundDuration
;
7594 if (!PyArg_ParseTuple(_args
, "O&slhl",
7595 CmpInstObj_Convert
, &mh
,
7601 _rv
= TextMediaFindNextText(mh
,
7609 _res
= Py_BuildValue("llll",
7617 static PyObject
*Qt_TextMediaHiliteTextSample(_self
, _args
)
7621 PyObject
*_res
= NULL
;
7622 ComponentResult _rv
;
7624 TimeValue sampleTime
;
7627 RGBColor rgbHiliteColor
;
7628 if (!PyArg_ParseTuple(_args
, "O&lhh",
7629 CmpInstObj_Convert
, &mh
,
7634 _rv
= TextMediaHiliteTextSample(mh
,
7639 _res
= Py_BuildValue("lO&",
7641 QdRGB_New
, &rgbHiliteColor
);
7645 static PyObject
*Qt_TextMediaSetTextSampleData(_self
, _args
)
7649 PyObject
*_res
= NULL
;
7650 ComponentResult _rv
;
7654 if (!PyArg_ParseTuple(_args
, "O&sO&",
7655 CmpInstObj_Convert
, &mh
,
7657 PyMac_GetOSType
, &dataType
))
7659 _rv
= TextMediaSetTextSampleData(mh
,
7662 _res
= Py_BuildValue("l",
7667 static PyObject
*Qt_SpriteMediaSetProperty(_self
, _args
)
7671 PyObject
*_res
= NULL
;
7672 ComponentResult _rv
;
7676 void * propertyValue
;
7677 if (!PyArg_ParseTuple(_args
, "O&hls",
7678 CmpInstObj_Convert
, &mh
,
7683 _rv
= SpriteMediaSetProperty(mh
,
7687 _res
= Py_BuildValue("l",
7692 static PyObject
*Qt_SpriteMediaGetProperty(_self
, _args
)
7696 PyObject
*_res
= NULL
;
7697 ComponentResult _rv
;
7701 void * propertyValue
;
7702 if (!PyArg_ParseTuple(_args
, "O&hls",
7703 CmpInstObj_Convert
, &mh
,
7708 _rv
= SpriteMediaGetProperty(mh
,
7712 _res
= Py_BuildValue("l",
7717 static PyObject
*Qt_SpriteMediaHitTestSprites(_self
, _args
)
7721 PyObject
*_res
= NULL
;
7722 ComponentResult _rv
;
7726 short spriteHitIndex
;
7727 if (!PyArg_ParseTuple(_args
, "O&lO&",
7728 CmpInstObj_Convert
, &mh
,
7730 PyMac_GetPoint
, &loc
))
7732 _rv
= SpriteMediaHitTestSprites(mh
,
7736 _res
= Py_BuildValue("lh",
7742 static PyObject
*Qt_SpriteMediaCountSprites(_self
, _args
)
7746 PyObject
*_res
= NULL
;
7747 ComponentResult _rv
;
7750 if (!PyArg_ParseTuple(_args
, "O&",
7751 CmpInstObj_Convert
, &mh
))
7753 _rv
= SpriteMediaCountSprites(mh
,
7755 _res
= Py_BuildValue("lh",
7761 static PyObject
*Qt_SpriteMediaCountImages(_self
, _args
)
7765 PyObject
*_res
= NULL
;
7766 ComponentResult _rv
;
7769 if (!PyArg_ParseTuple(_args
, "O&",
7770 CmpInstObj_Convert
, &mh
))
7772 _rv
= SpriteMediaCountImages(mh
,
7774 _res
= Py_BuildValue("lh",
7780 static PyObject
*Qt_SpriteMediaGetIndImageDescription(_self
, _args
)
7784 PyObject
*_res
= NULL
;
7785 ComponentResult _rv
;
7788 ImageDescriptionHandle imageDescription
;
7789 if (!PyArg_ParseTuple(_args
, "O&hO&",
7790 CmpInstObj_Convert
, &mh
,
7792 ResObj_Convert
, &imageDescription
))
7794 _rv
= SpriteMediaGetIndImageDescription(mh
,
7797 _res
= Py_BuildValue("l",
7802 static PyObject
*Qt_SpriteMediaGetDisplayedSampleNumber(_self
, _args
)
7806 PyObject
*_res
= NULL
;
7807 ComponentResult _rv
;
7810 if (!PyArg_ParseTuple(_args
, "O&",
7811 CmpInstObj_Convert
, &mh
))
7813 _rv
= SpriteMediaGetDisplayedSampleNumber(mh
,
7815 _res
= Py_BuildValue("ll",
7821 static PyObject
*Qt_SpriteMediaGetSpriteName(_self
, _args
)
7825 PyObject
*_res
= NULL
;
7826 ComponentResult _rv
;
7830 if (!PyArg_ParseTuple(_args
, "O&lO&",
7831 CmpInstObj_Convert
, &mh
,
7833 PyMac_GetStr255
, spriteName
))
7835 _rv
= SpriteMediaGetSpriteName(mh
,
7838 _res
= Py_BuildValue("l",
7843 static PyObject
*Qt_SpriteMediaGetImageName(_self
, _args
)
7847 PyObject
*_res
= NULL
;
7848 ComponentResult _rv
;
7852 if (!PyArg_ParseTuple(_args
, "O&hO&",
7853 CmpInstObj_Convert
, &mh
,
7855 PyMac_GetStr255
, imageName
))
7857 _rv
= SpriteMediaGetImageName(mh
,
7860 _res
= Py_BuildValue("l",
7865 static PyObject
*Qt_SpriteMediaSetSpriteProperty(_self
, _args
)
7869 PyObject
*_res
= NULL
;
7870 ComponentResult _rv
;
7874 void * propertyValue
;
7875 if (!PyArg_ParseTuple(_args
, "O&lls",
7876 CmpInstObj_Convert
, &mh
,
7881 _rv
= SpriteMediaSetSpriteProperty(mh
,
7885 _res
= Py_BuildValue("l",
7890 static PyObject
*Qt_SpriteMediaGetSpriteProperty(_self
, _args
)
7894 PyObject
*_res
= NULL
;
7895 ComponentResult _rv
;
7899 void * propertyValue
;
7900 if (!PyArg_ParseTuple(_args
, "O&lls",
7901 CmpInstObj_Convert
, &mh
,
7906 _rv
= SpriteMediaGetSpriteProperty(mh
,
7910 _res
= Py_BuildValue("l",
7915 static PyObject
*Qt_SpriteMediaHitTestAllSprites(_self
, _args
)
7919 PyObject
*_res
= NULL
;
7920 ComponentResult _rv
;
7924 QTAtomID spriteHitID
;
7925 if (!PyArg_ParseTuple(_args
, "O&lO&",
7926 CmpInstObj_Convert
, &mh
,
7928 PyMac_GetPoint
, &loc
))
7930 _rv
= SpriteMediaHitTestAllSprites(mh
,
7934 _res
= Py_BuildValue("ll",
7940 static PyObject
*Qt_SpriteMediaHitTestOneSprite(_self
, _args
)
7944 PyObject
*_res
= NULL
;
7945 ComponentResult _rv
;
7951 if (!PyArg_ParseTuple(_args
, "O&llO&",
7952 CmpInstObj_Convert
, &mh
,
7955 PyMac_GetPoint
, &loc
))
7957 _rv
= SpriteMediaHitTestOneSprite(mh
,
7962 _res
= Py_BuildValue("lb",
7968 static PyObject
*Qt_SpriteMediaSpriteIndexToID(_self
, _args
)
7972 PyObject
*_res
= NULL
;
7973 ComponentResult _rv
;
7977 if (!PyArg_ParseTuple(_args
, "O&h",
7978 CmpInstObj_Convert
, &mh
,
7981 _rv
= SpriteMediaSpriteIndexToID(mh
,
7984 _res
= Py_BuildValue("ll",
7990 static PyObject
*Qt_SpriteMediaSpriteIDToIndex(_self
, _args
)
7994 PyObject
*_res
= NULL
;
7995 ComponentResult _rv
;
7999 if (!PyArg_ParseTuple(_args
, "O&l",
8000 CmpInstObj_Convert
, &mh
,
8003 _rv
= SpriteMediaSpriteIDToIndex(mh
,
8006 _res
= Py_BuildValue("lh",
8012 static PyObject
*Qt_SpriteMediaSetActionVariable(_self
, _args
)
8016 PyObject
*_res
= NULL
;
8017 ComponentResult _rv
;
8019 QTAtomID variableID
;
8021 if (!PyArg_ParseTuple(_args
, "O&lf",
8022 CmpInstObj_Convert
, &mh
,
8026 _rv
= SpriteMediaSetActionVariable(mh
,
8029 _res
= Py_BuildValue("l",
8034 static PyObject
*Qt_SpriteMediaGetActionVariable(_self
, _args
)
8038 PyObject
*_res
= NULL
;
8039 ComponentResult _rv
;
8041 QTAtomID variableID
;
8043 if (!PyArg_ParseTuple(_args
, "O&l",
8044 CmpInstObj_Convert
, &mh
,
8047 _rv
= SpriteMediaGetActionVariable(mh
,
8050 _res
= Py_BuildValue("lf",
8056 #if !TARGET_API_MAC_CARBON
8058 static PyObject
*Qt_SpriteMediaGetIndImageProperty(_self
, _args
)
8062 PyObject
*_res
= NULL
;
8063 ComponentResult _rv
;
8066 long imagePropertyType
;
8067 void * imagePropertyValue
;
8068 if (!PyArg_ParseTuple(_args
, "O&hls",
8069 CmpInstObj_Convert
, &mh
,
8072 &imagePropertyValue
))
8074 _rv
= SpriteMediaGetIndImageProperty(mh
,
8077 imagePropertyValue
);
8078 _res
= Py_BuildValue("l",
8084 static PyObject
*Qt_SpriteMediaDisposeSprite(_self
, _args
)
8088 PyObject
*_res
= NULL
;
8089 ComponentResult _rv
;
8092 if (!PyArg_ParseTuple(_args
, "O&l",
8093 CmpInstObj_Convert
, &mh
,
8096 _rv
= SpriteMediaDisposeSprite(mh
,
8098 _res
= Py_BuildValue("l",
8103 static PyObject
*Qt_SpriteMediaSetActionVariableToString(_self
, _args
)
8107 PyObject
*_res
= NULL
;
8108 ComponentResult _rv
;
8110 QTAtomID variableID
;
8112 if (!PyArg_ParseTuple(_args
, "O&ls",
8113 CmpInstObj_Convert
, &mh
,
8117 _rv
= SpriteMediaSetActionVariableToString(mh
,
8120 _res
= Py_BuildValue("l",
8125 static PyObject
*Qt_SpriteMediaGetActionVariableAsString(_self
, _args
)
8129 PyObject
*_res
= NULL
;
8130 ComponentResult _rv
;
8132 QTAtomID variableID
;
8134 if (!PyArg_ParseTuple(_args
, "O&l",
8135 CmpInstObj_Convert
, &mh
,
8138 _rv
= SpriteMediaGetActionVariableAsString(mh
,
8141 _res
= Py_BuildValue("lO&",
8143 ResObj_New
, theCString
);
8147 static PyObject
*Qt_FlashMediaSetPan(_self
, _args
)
8151 PyObject
*_res
= NULL
;
8152 ComponentResult _rv
;
8156 if (!PyArg_ParseTuple(_args
, "O&hh",
8157 CmpInstObj_Convert
, &mh
,
8161 _rv
= FlashMediaSetPan(mh
,
8164 _res
= Py_BuildValue("l",
8169 static PyObject
*Qt_FlashMediaSetZoom(_self
, _args
)
8173 PyObject
*_res
= NULL
;
8174 ComponentResult _rv
;
8177 if (!PyArg_ParseTuple(_args
, "O&h",
8178 CmpInstObj_Convert
, &mh
,
8181 _rv
= FlashMediaSetZoom(mh
,
8183 _res
= Py_BuildValue("l",
8188 static PyObject
*Qt_FlashMediaSetZoomRect(_self
, _args
)
8192 PyObject
*_res
= NULL
;
8193 ComponentResult _rv
;
8199 if (!PyArg_ParseTuple(_args
, "O&llll",
8200 CmpInstObj_Convert
, &mh
,
8206 _rv
= FlashMediaSetZoomRect(mh
,
8211 _res
= Py_BuildValue("l",
8216 static PyObject
*Qt_FlashMediaGetRefConBounds(_self
, _args
)
8220 PyObject
*_res
= NULL
;
8221 ComponentResult _rv
;
8228 if (!PyArg_ParseTuple(_args
, "O&l",
8229 CmpInstObj_Convert
, &mh
,
8232 _rv
= FlashMediaGetRefConBounds(mh
,
8238 _res
= Py_BuildValue("lllll",
8247 static PyObject
*Qt_FlashMediaGetRefConID(_self
, _args
)
8251 PyObject
*_res
= NULL
;
8252 ComponentResult _rv
;
8256 if (!PyArg_ParseTuple(_args
, "O&l",
8257 CmpInstObj_Convert
, &mh
,
8260 _rv
= FlashMediaGetRefConID(mh
,
8263 _res
= Py_BuildValue("ll",
8269 static PyObject
*Qt_FlashMediaIDToRefCon(_self
, _args
)
8273 PyObject
*_res
= NULL
;
8274 ComponentResult _rv
;
8278 if (!PyArg_ParseTuple(_args
, "O&l",
8279 CmpInstObj_Convert
, &mh
,
8282 _rv
= FlashMediaIDToRefCon(mh
,
8285 _res
= Py_BuildValue("ll",
8291 static PyObject
*Qt_FlashMediaGetDisplayedFrameNumber(_self
, _args
)
8295 PyObject
*_res
= NULL
;
8296 ComponentResult _rv
;
8298 long flashFrameNumber
;
8299 if (!PyArg_ParseTuple(_args
, "O&",
8300 CmpInstObj_Convert
, &mh
))
8302 _rv
= FlashMediaGetDisplayedFrameNumber(mh
,
8304 _res
= Py_BuildValue("ll",
8310 static PyObject
*Qt_FlashMediaFrameNumberToMovieTime(_self
, _args
)
8314 PyObject
*_res
= NULL
;
8315 ComponentResult _rv
;
8317 long flashFrameNumber
;
8318 TimeValue movieTime
;
8319 if (!PyArg_ParseTuple(_args
, "O&l",
8320 CmpInstObj_Convert
, &mh
,
8323 _rv
= FlashMediaFrameNumberToMovieTime(mh
,
8326 _res
= Py_BuildValue("ll",
8332 static PyObject
*Qt_FlashMediaFrameLabelToMovieTime(_self
, _args
)
8336 PyObject
*_res
= NULL
;
8337 ComponentResult _rv
;
8340 TimeValue movieTime
;
8341 if (!PyArg_ParseTuple(_args
, "O&s",
8342 CmpInstObj_Convert
, &mh
,
8345 _rv
= FlashMediaFrameLabelToMovieTime(mh
,
8348 _res
= Py_BuildValue("ll",
8354 #if !TARGET_API_MAC_CARBON
8356 static PyObject
*Qt_MovieMediaGetCurrentMovieProperty(_self
, _args
)
8360 PyObject
*_res
= NULL
;
8361 ComponentResult _rv
;
8363 OSType whichProperty
;
8365 if (!PyArg_ParseTuple(_args
, "O&O&s",
8366 CmpInstObj_Convert
, &mh
,
8367 PyMac_GetOSType
, &whichProperty
,
8370 _rv
= MovieMediaGetCurrentMovieProperty(mh
,
8373 _res
= Py_BuildValue("l",
8379 #if !TARGET_API_MAC_CARBON
8381 static PyObject
*Qt_MovieMediaGetCurrentTrackProperty(_self
, _args
)
8385 PyObject
*_res
= NULL
;
8386 ComponentResult _rv
;
8389 OSType whichProperty
;
8391 if (!PyArg_ParseTuple(_args
, "O&lO&s",
8392 CmpInstObj_Convert
, &mh
,
8394 PyMac_GetOSType
, &whichProperty
,
8397 _rv
= MovieMediaGetCurrentTrackProperty(mh
,
8401 _res
= Py_BuildValue("l",
8407 #if !TARGET_API_MAC_CARBON
8409 static PyObject
*Qt_MovieMediaGetChildMovieDataReference(_self
, _args
)
8413 PyObject
*_res
= NULL
;
8414 ComponentResult _rv
;
8420 QTAtomID dataRefIDOut
;
8421 short dataRefIndexOut
;
8422 if (!PyArg_ParseTuple(_args
, "O&lh",
8423 CmpInstObj_Convert
, &mh
,
8427 _rv
= MovieMediaGetChildMovieDataReference(mh
,
8434 _res
= Py_BuildValue("lO&O&lh",
8436 PyMac_BuildOSType
, dataRefType
,
8437 ResObj_New
, dataRef
,
8444 #if !TARGET_API_MAC_CARBON
8446 static PyObject
*Qt_MovieMediaSetChildMovieDataReference(_self
, _args
)
8450 PyObject
*_res
= NULL
;
8451 ComponentResult _rv
;
8456 if (!PyArg_ParseTuple(_args
, "O&lO&O&",
8457 CmpInstObj_Convert
, &mh
,
8459 PyMac_GetOSType
, &dataRefType
,
8460 ResObj_Convert
, &dataRef
))
8462 _rv
= MovieMediaSetChildMovieDataReference(mh
,
8466 _res
= Py_BuildValue("l",
8472 #if !TARGET_API_MAC_CARBON
8474 static PyObject
*Qt_MovieMediaLoadChildMovieFromDataReference(_self
, _args
)
8478 PyObject
*_res
= NULL
;
8479 ComponentResult _rv
;
8482 if (!PyArg_ParseTuple(_args
, "O&l",
8483 CmpInstObj_Convert
, &mh
,
8486 _rv
= MovieMediaLoadChildMovieFromDataReference(mh
,
8488 _res
= Py_BuildValue("l",
8494 static PyObject
*Qt_Media3DGetCurrentGroup(_self
, _args
)
8498 PyObject
*_res
= NULL
;
8499 ComponentResult _rv
;
8502 if (!PyArg_ParseTuple(_args
, "O&s",
8503 CmpInstObj_Convert
, &mh
,
8506 _rv
= Media3DGetCurrentGroup(mh
,
8508 _res
= Py_BuildValue("l",
8513 static PyObject
*Qt_Media3DTranslateNamedObjectTo(_self
, _args
)
8517 PyObject
*_res
= NULL
;
8518 ComponentResult _rv
;
8524 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
8525 CmpInstObj_Convert
, &mh
,
8528 PyMac_GetFixed
, &z
))
8530 _rv
= Media3DTranslateNamedObjectTo(mh
,
8535 _res
= Py_BuildValue("lc",
8541 static PyObject
*Qt_Media3DScaleNamedObjectTo(_self
, _args
)
8545 PyObject
*_res
= NULL
;
8546 ComponentResult _rv
;
8552 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
8553 CmpInstObj_Convert
, &mh
,
8554 PyMac_GetFixed
, &xScale
,
8555 PyMac_GetFixed
, &yScale
,
8556 PyMac_GetFixed
, &zScale
))
8558 _rv
= Media3DScaleNamedObjectTo(mh
,
8563 _res
= Py_BuildValue("lc",
8569 static PyObject
*Qt_Media3DRotateNamedObjectTo(_self
, _args
)
8573 PyObject
*_res
= NULL
;
8574 ComponentResult _rv
;
8580 if (!PyArg_ParseTuple(_args
, "O&O&O&O&",
8581 CmpInstObj_Convert
, &mh
,
8582 PyMac_GetFixed
, &xDegrees
,
8583 PyMac_GetFixed
, &yDegrees
,
8584 PyMac_GetFixed
, &zDegrees
))
8586 _rv
= Media3DRotateNamedObjectTo(mh
,
8591 _res
= Py_BuildValue("lc",
8597 static PyObject
*Qt_Media3DSetCameraData(_self
, _args
)
8601 PyObject
*_res
= NULL
;
8602 ComponentResult _rv
;
8605 if (!PyArg_ParseTuple(_args
, "O&s",
8606 CmpInstObj_Convert
, &mh
,
8609 _rv
= Media3DSetCameraData(mh
,
8611 _res
= Py_BuildValue("l",
8616 static PyObject
*Qt_Media3DGetCameraData(_self
, _args
)
8620 PyObject
*_res
= NULL
;
8621 ComponentResult _rv
;
8624 if (!PyArg_ParseTuple(_args
, "O&s",
8625 CmpInstObj_Convert
, &mh
,
8628 _rv
= Media3DGetCameraData(mh
,
8630 _res
= Py_BuildValue("l",
8635 static PyObject
*Qt_Media3DSetCameraAngleAspect(_self
, _args
)
8639 PyObject
*_res
= NULL
;
8640 ComponentResult _rv
;
8643 QTFloatSingle aspectRatioXToY
;
8644 if (!PyArg_ParseTuple(_args
, "O&ff",
8645 CmpInstObj_Convert
, &mh
,
8649 _rv
= Media3DSetCameraAngleAspect(mh
,
8652 _res
= Py_BuildValue("l",
8657 static PyObject
*Qt_Media3DGetCameraAngleAspect(_self
, _args
)
8661 PyObject
*_res
= NULL
;
8662 ComponentResult _rv
;
8665 QTFloatSingle aspectRatioXToY
;
8666 if (!PyArg_ParseTuple(_args
, "O&",
8667 CmpInstObj_Convert
, &mh
))
8669 _rv
= Media3DGetCameraAngleAspect(mh
,
8672 _res
= Py_BuildValue("lff",
8679 static PyObject
*Qt_Media3DSetCameraRange(_self
, _args
)
8683 PyObject
*_res
= NULL
;
8684 ComponentResult _rv
;
8686 void * tQ3CameraRange
;
8687 if (!PyArg_ParseTuple(_args
, "O&s",
8688 CmpInstObj_Convert
, &mh
,
8691 _rv
= Media3DSetCameraRange(mh
,
8693 _res
= Py_BuildValue("l",
8698 static PyObject
*Qt_Media3DGetCameraRange(_self
, _args
)
8702 PyObject
*_res
= NULL
;
8703 ComponentResult _rv
;
8705 void * tQ3CameraRange
;
8706 if (!PyArg_ParseTuple(_args
, "O&s",
8707 CmpInstObj_Convert
, &mh
,
8710 _rv
= Media3DGetCameraRange(mh
,
8712 _res
= Py_BuildValue("l",
8717 #if !TARGET_API_MAC_CARBON
8719 static PyObject
*Qt_Media3DGetViewObject(_self
, _args
)
8723 PyObject
*_res
= NULL
;
8724 ComponentResult _rv
;
8726 void * tq3viewObject
;
8727 if (!PyArg_ParseTuple(_args
, "O&s",
8728 CmpInstObj_Convert
, &mh
,
8731 _rv
= Media3DGetViewObject(mh
,
8733 _res
= Py_BuildValue("l",
8739 static PyObject
*Qt_NewTimeBase(_self
, _args
)
8743 PyObject
*_res
= NULL
;
8745 if (!PyArg_ParseTuple(_args
, ""))
8747 _rv
= NewTimeBase();
8748 _res
= Py_BuildValue("O&",
8749 TimeBaseObj_New
, _rv
);
8753 static PyObject
*Qt_ConvertTime(_self
, _args
)
8757 PyObject
*_res
= NULL
;
8760 if (!PyArg_ParseTuple(_args
, "O&O&",
8761 QtTimeRecord_Convert
, &inout
,
8762 TimeBaseObj_Convert
, &newBase
))
8766 _res
= Py_BuildValue("O&",
8767 QtTimeRecord_New
, &inout
);
8771 static PyObject
*Qt_ConvertTimeScale(_self
, _args
)
8775 PyObject
*_res
= NULL
;
8778 if (!PyArg_ParseTuple(_args
, "O&l",
8779 QtTimeRecord_Convert
, &inout
,
8782 ConvertTimeScale(&inout
,
8784 _res
= Py_BuildValue("O&",
8785 QtTimeRecord_New
, &inout
);
8789 static PyObject
*Qt_AddTime(_self
, _args
)
8793 PyObject
*_res
= NULL
;
8796 if (!PyArg_ParseTuple(_args
, "O&O&",
8797 QtTimeRecord_Convert
, &dst
,
8798 QtTimeRecord_Convert
, &src
))
8802 _res
= Py_BuildValue("O&",
8803 QtTimeRecord_New
, &dst
);
8807 static PyObject
*Qt_SubtractTime(_self
, _args
)
8811 PyObject
*_res
= NULL
;
8814 if (!PyArg_ParseTuple(_args
, "O&O&",
8815 QtTimeRecord_Convert
, &dst
,
8816 QtTimeRecord_Convert
, &src
))
8820 _res
= Py_BuildValue("O&",
8821 QtTimeRecord_New
, &dst
);
8825 static PyObject
*Qt_MusicMediaGetIndexedTunePlayer(_self
, _args
)
8829 PyObject
*_res
= NULL
;
8830 ComponentResult _rv
;
8831 ComponentInstance ti
;
8832 long sampleDescIndex
;
8833 ComponentInstance tp
;
8834 if (!PyArg_ParseTuple(_args
, "O&l",
8835 CmpInstObj_Convert
, &ti
,
8838 _rv
= MusicMediaGetIndexedTunePlayer(ti
,
8841 _res
= Py_BuildValue("lO&",
8843 CmpInstObj_New
, tp
);
8847 static PyObject
*Qt_AlignWindow(_self
, _args
)
8851 PyObject
*_res
= NULL
;
8854 if (!PyArg_ParseTuple(_args
, "O&b",
8855 WinObj_Convert
, &wp
,
8861 (ICMAlignmentProcRecordPtr
)0);
8867 static PyObject
*Qt_DragAlignedWindow(_self
, _args
)
8871 PyObject
*_res
= NULL
;
8875 if (!PyArg_ParseTuple(_args
, "O&O&O&",
8876 WinObj_Convert
, &wp
,
8877 PyMac_GetPoint
, &startPt
,
8878 PyMac_GetRect
, &boundsRect
))
8880 DragAlignedWindow(wp
,
8884 (ICMAlignmentProcRecordPtr
)0);
8890 static PyObject
*Qt_MoviesTask(_self
, _args
)
8894 PyObject
*_res
= NULL
;
8895 long maxMilliSecToUse
;
8896 if (!PyArg_ParseTuple(_args
, "l",
8899 MoviesTask((Movie
)0,
8906 static PyMethodDef Qt_methods
[] = {
8908 #if !TARGET_API_MAC_CARBON
8909 {"CheckQuickTimeRegistration", (PyCFunction
)Qt_CheckQuickTimeRegistration
, 1,
8910 "(void * registrationKey, long flags) -> None"},
8912 {"EnterMovies", (PyCFunction
)Qt_EnterMovies
, 1,
8914 {"ExitMovies", (PyCFunction
)Qt_ExitMovies
, 1,
8916 {"GetMoviesError", (PyCFunction
)Qt_GetMoviesError
, 1,
8918 {"ClearMoviesStickyError", (PyCFunction
)Qt_ClearMoviesStickyError
, 1,
8920 {"GetMoviesStickyError", (PyCFunction
)Qt_GetMoviesStickyError
, 1,
8922 {"DisposeMatte", (PyCFunction
)Qt_DisposeMatte
, 1,
8923 "(PixMapHandle theMatte) -> None"},
8924 {"NewMovie", (PyCFunction
)Qt_NewMovie
, 1,
8925 "(long flags) -> (Movie _rv)"},
8926 {"GetDataHandler", (PyCFunction
)Qt_GetDataHandler
, 1,
8927 "(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)"},
8929 #if !TARGET_API_MAC_CARBON
8930 {"OpenADataHandler", (PyCFunction
)Qt_OpenADataHandler
, 1,
8931 "(Handle dataRef, OSType dataHandlerSubType, Handle anchorDataRef, OSType anchorDataRefType, TimeBase tb, long flags) -> (ComponentInstance dh)"},
8933 {"PasteHandleIntoMovie", (PyCFunction
)Qt_PasteHandleIntoMovie
, 1,
8934 "(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None"},
8935 {"GetMovieImporterForDataRef", (PyCFunction
)Qt_GetMovieImporterForDataRef
, 1,
8936 "(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)"},
8937 {"TrackTimeToMediaTime", (PyCFunction
)Qt_TrackTimeToMediaTime
, 1,
8938 "(TimeValue value, Track theTrack) -> (TimeValue _rv)"},
8939 {"NewUserData", (PyCFunction
)Qt_NewUserData
, 1,
8940 "() -> (UserData theUserData)"},
8941 {"NewUserDataFromHandle", (PyCFunction
)Qt_NewUserDataFromHandle
, 1,
8942 "(Handle h) -> (UserData theUserData)"},
8943 {"CreateMovieFile", (PyCFunction
)Qt_CreateMovieFile
, 1,
8944 "(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)"},
8945 {"OpenMovieFile", (PyCFunction
)Qt_OpenMovieFile
, 1,
8946 "(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)"},
8947 {"CloseMovieFile", (PyCFunction
)Qt_CloseMovieFile
, 1,
8948 "(short resRefNum) -> None"},
8949 {"DeleteMovieFile", (PyCFunction
)Qt_DeleteMovieFile
, 1,
8950 "(FSSpec fileSpec) -> None"},
8951 {"NewMovieFromFile", (PyCFunction
)Qt_NewMovieFromFile
, 1,
8952 "(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)"},
8953 {"NewMovieFromHandle", (PyCFunction
)Qt_NewMovieFromHandle
, 1,
8954 "(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
8955 {"NewMovieFromDataFork", (PyCFunction
)Qt_NewMovieFromDataFork
, 1,
8956 "(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
8957 {"NewMovieFromDataFork64", (PyCFunction
)Qt_NewMovieFromDataFork64
, 1,
8958 "(long fRefNum, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)"},
8959 {"NewMovieFromDataRef", (PyCFunction
)Qt_NewMovieFromDataRef
, 1,
8960 "(short flags, Handle dataRef, OSType dataRefType) -> (Movie m, short id)"},
8961 {"RemoveMovieResource", (PyCFunction
)Qt_RemoveMovieResource
, 1,
8962 "(short resRefNum, short resId) -> None"},
8963 {"CreateShortcutMovieFile", (PyCFunction
)Qt_CreateShortcutMovieFile
, 1,
8964 "(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None"},
8965 {"NewMovieFromScrap", (PyCFunction
)Qt_NewMovieFromScrap
, 1,
8966 "(long newMovieFlags) -> (Movie _rv)"},
8967 {"QTNewAlias", (PyCFunction
)Qt_QTNewAlias
, 1,
8968 "(FSSpec fss, Boolean minimal) -> (AliasHandle alias)"},
8969 {"EndFullScreen", (PyCFunction
)Qt_EndFullScreen
, 1,
8970 "(Ptr fullState, long flags) -> None"},
8971 {"AddSoundDescriptionExtension", (PyCFunction
)Qt_AddSoundDescriptionExtension
, 1,
8972 "(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None"},
8973 {"GetSoundDescriptionExtension", (PyCFunction
)Qt_GetSoundDescriptionExtension
, 1,
8974 "(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)"},
8975 {"RemoveSoundDescriptionExtension", (PyCFunction
)Qt_RemoveSoundDescriptionExtension
, 1,
8976 "(SoundDescriptionHandle desc, OSType idType) -> None"},
8977 {"QTIsStandardParameterDialogEvent", (PyCFunction
)Qt_QTIsStandardParameterDialogEvent
, 1,
8978 "(QTParameterDialog createdDialog) -> (EventRecord pEvent)"},
8979 {"QTDismissStandardParameterDialog", (PyCFunction
)Qt_QTDismissStandardParameterDialog
, 1,
8980 "(QTParameterDialog createdDialog) -> None"},
8981 {"QTStandardParameterDialogDoAction", (PyCFunction
)Qt_QTStandardParameterDialogDoAction
, 1,
8982 "(QTParameterDialog createdDialog, long action, void * params) -> None"},
8983 {"QTRegisterAccessKey", (PyCFunction
)Qt_QTRegisterAccessKey
, 1,
8984 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
8985 {"QTUnregisterAccessKey", (PyCFunction
)Qt_QTUnregisterAccessKey
, 1,
8986 "(Str255 accessKeyType, long flags, Handle accessKey) -> None"},
8987 {"QTTextToNativeText", (PyCFunction
)Qt_QTTextToNativeText
, 1,
8988 "(Handle theText, long encoding, long flags) -> None"},
8989 {"VideoMediaResetStatistics", (PyCFunction
)Qt_VideoMediaResetStatistics
, 1,
8990 "(MediaHandler mh) -> (ComponentResult _rv)"},
8991 {"VideoMediaGetStatistics", (PyCFunction
)Qt_VideoMediaGetStatistics
, 1,
8992 "(MediaHandler mh) -> (ComponentResult _rv)"},
8993 {"VideoMediaGetStallCount", (PyCFunction
)Qt_VideoMediaGetStallCount
, 1,
8994 "(MediaHandler mh) -> (ComponentResult _rv, unsigned long stalls)"},
8995 {"VideoMediaSetCodecParameter", (PyCFunction
)Qt_VideoMediaSetCodecParameter
, 1,
8996 "(MediaHandler mh, CodecType cType, OSType parameterID, long parameterChangeSeed, void * dataPtr, long dataSize) -> (ComponentResult _rv)"},
8997 {"VideoMediaGetCodecParameter", (PyCFunction
)Qt_VideoMediaGetCodecParameter
, 1,
8998 "(MediaHandler mh, CodecType cType, OSType parameterID, Handle outParameterData) -> (ComponentResult _rv)"},
8999 {"TextMediaAddTextSample", (PyCFunction
)Qt_TextMediaAddTextSample
, 1,
9000 "(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)"},
9001 {"TextMediaAddTESample", (PyCFunction
)Qt_TextMediaAddTESample
, 1,
9002 "(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)"},
9003 {"TextMediaAddHiliteSample", (PyCFunction
)Qt_TextMediaAddHiliteSample
, 1,
9004 "(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)"},
9005 {"TextMediaDrawRaw", (PyCFunction
)Qt_TextMediaDrawRaw
, 1,
9006 "(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh) -> (ComponentResult _rv)"},
9007 {"TextMediaSetTextProperty", (PyCFunction
)Qt_TextMediaSetTextProperty
, 1,
9008 "(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)"},
9009 {"TextMediaRawSetup", (PyCFunction
)Qt_TextMediaRawSetup
, 1,
9010 "(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)"},
9011 {"TextMediaRawIdle", (PyCFunction
)Qt_TextMediaRawIdle
, 1,
9012 "(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)"},
9013 {"TextMediaFindNextText", (PyCFunction
)Qt_TextMediaFindNextText
, 1,
9014 "(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)"},
9015 {"TextMediaHiliteTextSample", (PyCFunction
)Qt_TextMediaHiliteTextSample
, 1,
9016 "(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)"},
9017 {"TextMediaSetTextSampleData", (PyCFunction
)Qt_TextMediaSetTextSampleData
, 1,
9018 "(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)"},
9019 {"SpriteMediaSetProperty", (PyCFunction
)Qt_SpriteMediaSetProperty
, 1,
9020 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
9021 {"SpriteMediaGetProperty", (PyCFunction
)Qt_SpriteMediaGetProperty
, 1,
9022 "(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
9023 {"SpriteMediaHitTestSprites", (PyCFunction
)Qt_SpriteMediaHitTestSprites
, 1,
9024 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)"},
9025 {"SpriteMediaCountSprites", (PyCFunction
)Qt_SpriteMediaCountSprites
, 1,
9026 "(MediaHandler mh) -> (ComponentResult _rv, short numSprites)"},
9027 {"SpriteMediaCountImages", (PyCFunction
)Qt_SpriteMediaCountImages
, 1,
9028 "(MediaHandler mh) -> (ComponentResult _rv, short numImages)"},
9029 {"SpriteMediaGetIndImageDescription", (PyCFunction
)Qt_SpriteMediaGetIndImageDescription
, 1,
9030 "(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)"},
9031 {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction
)Qt_SpriteMediaGetDisplayedSampleNumber
, 1,
9032 "(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)"},
9033 {"SpriteMediaGetSpriteName", (PyCFunction
)Qt_SpriteMediaGetSpriteName
, 1,
9034 "(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)"},
9035 {"SpriteMediaGetImageName", (PyCFunction
)Qt_SpriteMediaGetImageName
, 1,
9036 "(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)"},
9037 {"SpriteMediaSetSpriteProperty", (PyCFunction
)Qt_SpriteMediaSetSpriteProperty
, 1,
9038 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
9039 {"SpriteMediaGetSpriteProperty", (PyCFunction
)Qt_SpriteMediaGetSpriteProperty
, 1,
9040 "(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)"},
9041 {"SpriteMediaHitTestAllSprites", (PyCFunction
)Qt_SpriteMediaHitTestAllSprites
, 1,
9042 "(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)"},
9043 {"SpriteMediaHitTestOneSprite", (PyCFunction
)Qt_SpriteMediaHitTestOneSprite
, 1,
9044 "(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)"},
9045 {"SpriteMediaSpriteIndexToID", (PyCFunction
)Qt_SpriteMediaSpriteIndexToID
, 1,
9046 "(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)"},
9047 {"SpriteMediaSpriteIDToIndex", (PyCFunction
)Qt_SpriteMediaSpriteIDToIndex
, 1,
9048 "(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)"},
9049 {"SpriteMediaSetActionVariable", (PyCFunction
)Qt_SpriteMediaSetActionVariable
, 1,
9050 "(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)"},
9051 {"SpriteMediaGetActionVariable", (PyCFunction
)Qt_SpriteMediaGetActionVariable
, 1,
9052 "(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
9054 #if !TARGET_API_MAC_CARBON
9055 {"SpriteMediaGetIndImageProperty", (PyCFunction
)Qt_SpriteMediaGetIndImageProperty
, 1,
9056 "(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
9058 {"SpriteMediaDisposeSprite", (PyCFunction
)Qt_SpriteMediaDisposeSprite
, 1,
9059 "(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)"},
9060 {"SpriteMediaSetActionVariableToString", (PyCFunction
)Qt_SpriteMediaSetActionVariableToString
, 1,
9061 "(MediaHandler mh, QTAtomID variableID, Ptr theCString) -> (ComponentResult _rv)"},
9062 {"SpriteMediaGetActionVariableAsString", (PyCFunction
)Qt_SpriteMediaGetActionVariableAsString
, 1,
9063 "(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, Handle theCString)"},
9064 {"FlashMediaSetPan", (PyCFunction
)Qt_FlashMediaSetPan
, 1,
9065 "(MediaHandler mh, short xPercent, short yPercent) -> (ComponentResult _rv)"},
9066 {"FlashMediaSetZoom", (PyCFunction
)Qt_FlashMediaSetZoom
, 1,
9067 "(MediaHandler mh, short factor) -> (ComponentResult _rv)"},
9068 {"FlashMediaSetZoomRect", (PyCFunction
)Qt_FlashMediaSetZoomRect
, 1,
9069 "(MediaHandler mh, long left, long top, long right, long bottom) -> (ComponentResult _rv)"},
9070 {"FlashMediaGetRefConBounds", (PyCFunction
)Qt_FlashMediaGetRefConBounds
, 1,
9071 "(MediaHandler mh, long refCon) -> (ComponentResult _rv, long left, long top, long right, long bottom)"},
9072 {"FlashMediaGetRefConID", (PyCFunction
)Qt_FlashMediaGetRefConID
, 1,
9073 "(MediaHandler mh, long refCon) -> (ComponentResult _rv, long refConID)"},
9074 {"FlashMediaIDToRefCon", (PyCFunction
)Qt_FlashMediaIDToRefCon
, 1,
9075 "(MediaHandler mh, long refConID) -> (ComponentResult _rv, long refCon)"},
9076 {"FlashMediaGetDisplayedFrameNumber", (PyCFunction
)Qt_FlashMediaGetDisplayedFrameNumber
, 1,
9077 "(MediaHandler mh) -> (ComponentResult _rv, long flashFrameNumber)"},
9078 {"FlashMediaFrameNumberToMovieTime", (PyCFunction
)Qt_FlashMediaFrameNumberToMovieTime
, 1,
9079 "(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)"},
9080 {"FlashMediaFrameLabelToMovieTime", (PyCFunction
)Qt_FlashMediaFrameLabelToMovieTime
, 1,
9081 "(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)"},
9083 #if !TARGET_API_MAC_CARBON
9084 {"MovieMediaGetCurrentMovieProperty", (PyCFunction
)Qt_MovieMediaGetCurrentMovieProperty
, 1,
9085 "(MediaHandler mh, OSType whichProperty, void * value) -> (ComponentResult _rv)"},
9088 #if !TARGET_API_MAC_CARBON
9089 {"MovieMediaGetCurrentTrackProperty", (PyCFunction
)Qt_MovieMediaGetCurrentTrackProperty
, 1,
9090 "(MediaHandler mh, long trackID, OSType whichProperty, void * value) -> (ComponentResult _rv)"},
9093 #if !TARGET_API_MAC_CARBON
9094 {"MovieMediaGetChildMovieDataReference", (PyCFunction
)Qt_MovieMediaGetChildMovieDataReference
, 1,
9095 "(MediaHandler mh, QTAtomID dataRefID, short dataRefIndex) -> (ComponentResult _rv, OSType dataRefType, Handle dataRef, QTAtomID dataRefIDOut, short dataRefIndexOut)"},
9098 #if !TARGET_API_MAC_CARBON
9099 {"MovieMediaSetChildMovieDataReference", (PyCFunction
)Qt_MovieMediaSetChildMovieDataReference
, 1,
9100 "(MediaHandler mh, QTAtomID dataRefID, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)"},
9103 #if !TARGET_API_MAC_CARBON
9104 {"MovieMediaLoadChildMovieFromDataReference", (PyCFunction
)Qt_MovieMediaLoadChildMovieFromDataReference
, 1,
9105 "(MediaHandler mh, QTAtomID dataRefID) -> (ComponentResult _rv)"},
9107 {"Media3DGetCurrentGroup", (PyCFunction
)Qt_Media3DGetCurrentGroup
, 1,
9108 "(MediaHandler mh, void * group) -> (ComponentResult _rv)"},
9109 {"Media3DTranslateNamedObjectTo", (PyCFunction
)Qt_Media3DTranslateNamedObjectTo
, 1,
9110 "(MediaHandler mh, Fixed x, Fixed y, Fixed z) -> (ComponentResult _rv, char objectName)"},
9111 {"Media3DScaleNamedObjectTo", (PyCFunction
)Qt_Media3DScaleNamedObjectTo
, 1,
9112 "(MediaHandler mh, Fixed xScale, Fixed yScale, Fixed zScale) -> (ComponentResult _rv, char objectName)"},
9113 {"Media3DRotateNamedObjectTo", (PyCFunction
)Qt_Media3DRotateNamedObjectTo
, 1,
9114 "(MediaHandler mh, Fixed xDegrees, Fixed yDegrees, Fixed zDegrees) -> (ComponentResult _rv, char objectName)"},
9115 {"Media3DSetCameraData", (PyCFunction
)Qt_Media3DSetCameraData
, 1,
9116 "(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)"},
9117 {"Media3DGetCameraData", (PyCFunction
)Qt_Media3DGetCameraData
, 1,
9118 "(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)"},
9119 {"Media3DSetCameraAngleAspect", (PyCFunction
)Qt_Media3DSetCameraAngleAspect
, 1,
9120 "(MediaHandler mh, QTFloatSingle fov, QTFloatSingle aspectRatioXToY) -> (ComponentResult _rv)"},
9121 {"Media3DGetCameraAngleAspect", (PyCFunction
)Qt_Media3DGetCameraAngleAspect
, 1,
9122 "(MediaHandler mh) -> (ComponentResult _rv, QTFloatSingle fov, QTFloatSingle aspectRatioXToY)"},
9123 {"Media3DSetCameraRange", (PyCFunction
)Qt_Media3DSetCameraRange
, 1,
9124 "(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)"},
9125 {"Media3DGetCameraRange", (PyCFunction
)Qt_Media3DGetCameraRange
, 1,
9126 "(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)"},
9128 #if !TARGET_API_MAC_CARBON
9129 {"Media3DGetViewObject", (PyCFunction
)Qt_Media3DGetViewObject
, 1,
9130 "(MediaHandler mh, void * tq3viewObject) -> (ComponentResult _rv)"},
9132 {"NewTimeBase", (PyCFunction
)Qt_NewTimeBase
, 1,
9133 "() -> (TimeBase _rv)"},
9134 {"ConvertTime", (PyCFunction
)Qt_ConvertTime
, 1,
9135 "(TimeRecord inout, TimeBase newBase) -> (TimeRecord inout)"},
9136 {"ConvertTimeScale", (PyCFunction
)Qt_ConvertTimeScale
, 1,
9137 "(TimeRecord inout, TimeScale newScale) -> (TimeRecord inout)"},
9138 {"AddTime", (PyCFunction
)Qt_AddTime
, 1,
9139 "(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
9140 {"SubtractTime", (PyCFunction
)Qt_SubtractTime
, 1,
9141 "(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
9142 {"MusicMediaGetIndexedTunePlayer", (PyCFunction
)Qt_MusicMediaGetIndexedTunePlayer
, 1,
9143 "(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)"},
9144 {"AlignWindow", (PyCFunction
)Qt_AlignWindow
, 1,
9145 "(WindowPtr wp, Boolean front) -> None"},
9146 {"DragAlignedWindow", (PyCFunction
)Qt_DragAlignedWindow
, 1,
9147 "(WindowPtr wp, Point startPt, Rect boundsRect) -> None"},
9148 {"MoviesTask", (PyCFunction
)Qt_MoviesTask
, 1,
9149 "(long maxMilliSecToUse) -> None"},
9164 m
= Py_InitModule("Qt", Qt_methods
);
9165 d
= PyModule_GetDict(m
);
9166 Qt_Error
= PyMac_GetOSErrException();
9167 if (Qt_Error
== NULL
||
9168 PyDict_SetItemString(d
, "Error", Qt_Error
) != 0)
9170 MovieController_Type
.ob_type
= &PyType_Type
;
9171 Py_INCREF(&MovieController_Type
);
9172 if (PyDict_SetItemString(d
, "MovieControllerType", (PyObject
*)&MovieController_Type
) != 0)
9173 Py_FatalError("can't initialize MovieControllerType");
9174 TimeBase_Type
.ob_type
= &PyType_Type
;
9175 Py_INCREF(&TimeBase_Type
);
9176 if (PyDict_SetItemString(d
, "TimeBaseType", (PyObject
*)&TimeBase_Type
) != 0)
9177 Py_FatalError("can't initialize TimeBaseType");
9178 UserData_Type
.ob_type
= &PyType_Type
;
9179 Py_INCREF(&UserData_Type
);
9180 if (PyDict_SetItemString(d
, "UserDataType", (PyObject
*)&UserData_Type
) != 0)
9181 Py_FatalError("can't initialize UserDataType");
9182 Media_Type
.ob_type
= &PyType_Type
;
9183 Py_INCREF(&Media_Type
);
9184 if (PyDict_SetItemString(d
, "MediaType", (PyObject
*)&Media_Type
) != 0)
9185 Py_FatalError("can't initialize MediaType");
9186 Track_Type
.ob_type
= &PyType_Type
;
9187 Py_INCREF(&Track_Type
);
9188 if (PyDict_SetItemString(d
, "TrackType", (PyObject
*)&Track_Type
) != 0)
9189 Py_FatalError("can't initialize TrackType");
9190 Movie_Type
.ob_type
= &PyType_Type
;
9191 Py_INCREF(&Movie_Type
);
9192 if (PyDict_SetItemString(d
, "MovieType", (PyObject
*)&Movie_Type
) != 0)
9193 Py_FatalError("can't initialize MovieType");
9196 /* ========================= End module Qt ========================== */