]> granicus.if.org Git - python/commitdiff
- Added a function MoviesTask, which is the same as the method but
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 22 Jul 1998 13:37:37 +0000 (13:37 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 22 Jul 1998 13:37:37 +0000 (13:37 +0000)
with a null movie (giving time to all active movies)
- Made the graphics world parameter to SetMovieGWorld optional.

Mac/Modules/qt/Qtmodule.c
Mac/Modules/qt/qtsupport.py

index 51f12279ea43368801a40a6d185c63f9eb2d82ff..540915eb23523c76c915ce913d62e0f9dc53e9ca 100644 (file)
@@ -4300,7 +4300,7 @@ static PyObject *MovieObj_GetMovieGWorld(_self, _args)
                       &gdh);
        _res = Py_BuildValue("O&O&",
                             GrafObj_New, port,
-                            ResObj_New, gdh);
+                            OptResObj_New, gdh);
        return _res;
 }
 
@@ -4313,7 +4313,7 @@ static PyObject *MovieObj_SetMovieGWorld(_self, _args)
        GDHandle gdh;
        if (!PyArg_ParseTuple(_args, "O&O&",
                              GrafObj_Convert, &port,
-                             ResObj_Convert, &gdh))
+                             OptResObj_Convert, &gdh))
                return NULL;
        SetMovieGWorld(_self->ob_itself,
                       port,
@@ -7650,6 +7650,22 @@ static PyObject *Qt_DragAlignedWindow(_self, _args)
        return _res;
 }
 
+static PyObject *Qt_MoviesTask(_self, _args)
+       PyObject *_self;
+       PyObject *_args;
+{
+       PyObject *_res = NULL;
+       long maxMilliSecToUse;
+       if (!PyArg_ParseTuple(_args, "l",
+                             &maxMilliSecToUse))
+               return NULL;
+       MoviesTask((Movie)0,
+                  maxMilliSecToUse);
+       Py_INCREF(Py_None);
+       _res = Py_None;
+       return _res;
+}
+
 static PyMethodDef Qt_methods[] = {
        {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
         "() -> None"},
@@ -7787,6 +7803,8 @@ static PyMethodDef Qt_methods[] = {
         "(WindowPtr wp, Boolean front) -> None"},
        {"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1,
         "(WindowPtr wp, Point startPt, Rect boundsRect) -> None"},
+       {"MoviesTask", (PyCFunction)Qt_MoviesTask, 1,
+        "(long maxMilliSecToUse) -> None"},
        {NULL, NULL, 0}
 };
 
index d90a24652b3cd29793aaf346e6256f4b33c1473c..2e26888bfc5428740a8363ae1dd28810102e8565 100644 (file)
@@ -76,6 +76,7 @@ QtTimeRecord_Convert(v, p_itself)
 
 # Our (opaque) objects
 Movie = OpaqueByValueType('Movie', 'MovieObj')
+NullMovie = FakeType("(Movie)0")
 Track = OpaqueByValueType('Track', 'TrackObj')
 Media = OpaqueByValueType('Media', 'MediaObj')
 UserData = OpaqueByValueType('UserData', 'UserDataObj')
@@ -99,7 +100,7 @@ SampleDescriptionHandle = OpaqueByValueType("SampleDescriptionHandle", "ResObj")
 ImageDescriptionHandle = OpaqueByValueType("ImageDescriptionHandle", "ResObj")
 TEHandle = OpaqueByValueType("TEHandle", "ResObj")
 CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
-GDHandle = OpaqueByValueType("GDHandle", "ResObj")
+GDHandle = OpaqueByValueType("GDHandle", "OptResObj")
 AliasHandle = OpaqueByValueType("AliasHandle", "ResObj")
 SoundDescriptionHandle = OpaqueByValueType("SoundDescriptionHandle", "ResObj")
 # Silly Apple, passing an OStype by reference...
@@ -245,6 +246,13 @@ f = Function(void, 'DragAlignedWindow',
 )
 functions.append(f)
 
+# And we want the version of MoviesTask without a movie argument
+f = Function(void, 'MoviesTask',
+    (NullMovie, 'theMovie', InMode),
+    (long, 'maxMilliSecToUse', InMode),
+)
+functions.append(f)
+
 
 # add the populated lists to the generator groups
 # (in a different wordl the scan program would generate this)