Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d81fc3c

Browse files
committed
- Added a function MoviesTask, which is the same as the method but
with a null movie (giving time to all active movies) - Made the graphics world parameter to SetMovieGWorld optional.
1 parent 2116bca commit d81fc3c

2 files changed

Lines changed: 29 additions & 3 deletions

File tree

Mac/Modules/qt/Qtmodule.c

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4300,7 +4300,7 @@ static PyObject *MovieObj_GetMovieGWorld(_self, _args)
43004300
&gdh);
43014301
_res = Py_BuildValue("O&O&",
43024302
GrafObj_New, port,
4303-
ResObj_New, gdh);
4303+
OptResObj_New, gdh);
43044304
return _res;
43054305
}
43064306

@@ -4313,7 +4313,7 @@ static PyObject *MovieObj_SetMovieGWorld(_self, _args)
43134313
GDHandle gdh;
43144314
if (!PyArg_ParseTuple(_args, "O&O&",
43154315
GrafObj_Convert, &port,
4316-
ResObj_Convert, &gdh))
4316+
OptResObj_Convert, &gdh))
43174317
return NULL;
43184318
SetMovieGWorld(_self->ob_itself,
43194319
port,
@@ -7650,6 +7650,22 @@ static PyObject *Qt_DragAlignedWindow(_self, _args)
76507650
return _res;
76517651
}
76527652

7653+
static PyObject *Qt_MoviesTask(_self, _args)
7654+
PyObject *_self;
7655+
PyObject *_args;
7656+
{
7657+
PyObject *_res = NULL;
7658+
long maxMilliSecToUse;
7659+
if (!PyArg_ParseTuple(_args, "l",
7660+
&maxMilliSecToUse))
7661+
return NULL;
7662+
MoviesTask((Movie)0,
7663+
maxMilliSecToUse);
7664+
Py_INCREF(Py_None);
7665+
_res = Py_None;
7666+
return _res;
7667+
}
7668+
76537669
static PyMethodDef Qt_methods[] = {
76547670
{"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
76557671
"() -> None"},
@@ -7787,6 +7803,8 @@ static PyMethodDef Qt_methods[] = {
77877803
"(WindowPtr wp, Boolean front) -> None"},
77887804
{"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1,
77897805
"(WindowPtr wp, Point startPt, Rect boundsRect) -> None"},
7806+
{"MoviesTask", (PyCFunction)Qt_MoviesTask, 1,
7807+
"(long maxMilliSecToUse) -> None"},
77907808
{NULL, NULL, 0}
77917809
};
77927810

Mac/Modules/qt/qtsupport.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676

7777
# Our (opaque) objects
7878
Movie = OpaqueByValueType('Movie', 'MovieObj')
79+
NullMovie = FakeType("(Movie)0")
7980
Track = OpaqueByValueType('Track', 'TrackObj')
8081
Media = OpaqueByValueType('Media', 'MediaObj')
8182
UserData = OpaqueByValueType('UserData', 'UserDataObj')
@@ -99,7 +100,7 @@
99100
ImageDescriptionHandle = OpaqueByValueType("ImageDescriptionHandle", "ResObj")
100101
TEHandle = OpaqueByValueType("TEHandle", "ResObj")
101102
CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
102-
GDHandle = OpaqueByValueType("GDHandle", "ResObj")
103+
GDHandle = OpaqueByValueType("GDHandle", "OptResObj")
103104
AliasHandle = OpaqueByValueType("AliasHandle", "ResObj")
104105
SoundDescriptionHandle = OpaqueByValueType("SoundDescriptionHandle", "ResObj")
105106
# Silly Apple, passing an OStype by reference...
@@ -245,6 +246,13 @@ def outputFreeIt(self, itselfname):
245246
)
246247
functions.append(f)
247248

249+
# And we want the version of MoviesTask without a movie argument
250+
f = Function(void, 'MoviesTask',
251+
(NullMovie, 'theMovie', InMode),
252+
(long, 'maxMilliSecToUse', InMode),
253+
)
254+
functions.append(f)
255+
248256

249257
# add the populated lists to the generator groups
250258
# (in a different wordl the scan program would generate this)

0 commit comments

Comments
 (0)