PageRenderTime 996ms CodeModel.GetById 161ms app.highlight 511ms RepoModel.GetById 133ms app.codeStats 7ms

/Mac/Modules/qt/_Qtmodule.c

http://unladen-swallow.googlecode.com/
C | 17503 lines | 16541 code | 929 blank | 33 comment | 1152 complexity | 22bb6d839073acbab8d527a7d47c5c11 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1
   2/* =========================== Module _Qt =========================== */
   3
   4#include "Python.h"
   5
   6
   7#ifndef __LP64__
   8
   9#include "pymactoolbox.h"
  10
  11/* Macro to test whether a weak-loaded CFM function exists */
  12#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
  13        PyErr_SetString(PyExc_NotImplementedError, \
  14        "Not available in this shared library/OS version"); \
  15        return NULL; \
  16    }} while(0)
  17
  18
  19#include <QuickTime/QuickTime.h>
  20
  21
  22#ifdef USE_TOOLBOX_OBJECT_GLUE
  23extern PyObject *_TrackObj_New(Track);
  24extern int _TrackObj_Convert(PyObject *, Track *);
  25extern PyObject *_MovieObj_New(Movie);
  26extern int _MovieObj_Convert(PyObject *, Movie *);
  27extern PyObject *_MovieCtlObj_New(MovieController);
  28extern int _MovieCtlObj_Convert(PyObject *, MovieController *);
  29extern PyObject *_TimeBaseObj_New(TimeBase);
  30extern int _TimeBaseObj_Convert(PyObject *, TimeBase *);
  31extern PyObject *_UserDataObj_New(UserData);
  32extern int _UserDataObj_Convert(PyObject *, UserData *);
  33extern PyObject *_MediaObj_New(Media);
  34extern int _MediaObj_Convert(PyObject *, Media *);
  35
  36#define TrackObj_New _TrackObj_New
  37#define TrackObj_Convert _TrackObj_Convert
  38#define MovieObj_New _MovieObj_New
  39#define MovieObj_Convert _MovieObj_Convert
  40#define MovieCtlObj_New _MovieCtlObj_New
  41#define MovieCtlObj_Convert _MovieCtlObj_Convert
  42#define TimeBaseObj_New _TimeBaseObj_New
  43#define TimeBaseObj_Convert _TimeBaseObj_Convert
  44#define UserDataObj_New _UserDataObj_New
  45#define UserDataObj_Convert _UserDataObj_Convert
  46#define MediaObj_New _MediaObj_New
  47#define MediaObj_Convert _MediaObj_Convert
  48#endif
  49
  50/* Macro to allow us to GetNextInterestingTime without duration */
  51#define GetMediaNextInterestingTimeOnly(media, flags, time, rate, rv)                         GetMediaNextInterestingTime(media, flags, time, rate, rv, NULL)
  52
  53/*
  54** Parse/generate time records
  55*/
  56static PyObject *
  57QtTimeRecord_New(TimeRecord *itself)
  58{
  59        if (itself->base)
  60                return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale,
  61                        TimeBaseObj_New, itself->base);
  62        else
  63                return  Py_BuildValue("O&lO", PyMac_Buildwide, &itself->value, itself->scale,
  64                        Py_None);
  65}
  66
  67static int
  68QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself)
  69{
  70        PyObject *base = NULL;
  71        if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale,
  72                        &base) )
  73                return 0;
  74        if ( base == NULL || base == Py_None )
  75                p_itself->base = NULL;
  76        else
  77                if ( !TimeBaseObj_Convert(base, &p_itself->base) )
  78                        return 0;
  79        return 1;
  80}
  81
  82static int
  83QtMusicMIDIPacket_Convert(PyObject *v, MusicMIDIPacket *p_itself)
  84{
  85        int dummy;
  86
  87        if( !PyArg_ParseTuple(v, "hls#", &p_itself->length, &p_itself->reserved, p_itself->data, dummy) )
  88                return 0;
  89        return 1;
  90}
  91
  92
  93
  94
  95static PyObject *Qt_Error;
  96
  97/* -------------------- Object type IdleManager --------------------- */
  98
  99PyTypeObject IdleManager_Type;
 100
 101#define IdleManagerObj_Check(x) ((x)->ob_type == &IdleManager_Type || PyObject_TypeCheck((x), &IdleManager_Type))
 102
 103typedef struct IdleManagerObject {
 104	PyObject_HEAD
 105	IdleManager ob_itself;
 106} IdleManagerObject;
 107
 108PyObject *IdleManagerObj_New(IdleManager itself)
 109{
 110	IdleManagerObject *it;
 111	if (itself == NULL) {
 112	                                PyErr_SetString(Qt_Error,"Cannot create IdleManager from NULL pointer");
 113	                                return NULL;
 114	                        }
 115	it = PyObject_NEW(IdleManagerObject, &IdleManager_Type);
 116	if (it == NULL) return NULL;
 117	it->ob_itself = itself;
 118	return (PyObject *)it;
 119}
 120
 121int IdleManagerObj_Convert(PyObject *v, IdleManager *p_itself)
 122{
 123	if (v == Py_None)
 124	{
 125		*p_itself = NULL;
 126		return 1;
 127	}
 128	if (!IdleManagerObj_Check(v))
 129	{
 130		PyErr_SetString(PyExc_TypeError, "IdleManager required");
 131		return 0;
 132	}
 133	*p_itself = ((IdleManagerObject *)v)->ob_itself;
 134	return 1;
 135}
 136
 137static void IdleManagerObj_dealloc(IdleManagerObject *self)
 138{
 139	/* Cleanup of self->ob_itself goes here */
 140	self->ob_type->tp_free((PyObject *)self);
 141}
 142
 143static PyMethodDef IdleManagerObj_methods[] = {
 144	{NULL, NULL, 0}
 145};
 146
 147#define IdleManagerObj_getsetlist NULL
 148
 149
 150#define IdleManagerObj_compare NULL
 151
 152#define IdleManagerObj_repr NULL
 153
 154#define IdleManagerObj_hash NULL
 155#define IdleManagerObj_tp_init 0
 156
 157#define IdleManagerObj_tp_alloc PyType_GenericAlloc
 158
 159static PyObject *IdleManagerObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
 160{
 161	PyObject *_self;
 162	IdleManager itself;
 163	char *kw[] = {"itself", 0};
 164
 165	if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IdleManagerObj_Convert, &itself)) return NULL;
 166	if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
 167	((IdleManagerObject *)_self)->ob_itself = itself;
 168	return _self;
 169}
 170
 171#define IdleManagerObj_tp_free PyObject_Del
 172
 173
 174PyTypeObject IdleManager_Type = {
 175	PyObject_HEAD_INIT(NULL)
 176	0, /*ob_size*/
 177	"_Qt.IdleManager", /*tp_name*/
 178	sizeof(IdleManagerObject), /*tp_basicsize*/
 179	0, /*tp_itemsize*/
 180	/* methods */
 181	(destructor) IdleManagerObj_dealloc, /*tp_dealloc*/
 182	0, /*tp_print*/
 183	(getattrfunc)0, /*tp_getattr*/
 184	(setattrfunc)0, /*tp_setattr*/
 185	(cmpfunc) IdleManagerObj_compare, /*tp_compare*/
 186	(reprfunc) IdleManagerObj_repr, /*tp_repr*/
 187	(PyNumberMethods *)0, /* tp_as_number */
 188	(PySequenceMethods *)0, /* tp_as_sequence */
 189	(PyMappingMethods *)0, /* tp_as_mapping */
 190	(hashfunc) IdleManagerObj_hash, /*tp_hash*/
 191	0, /*tp_call*/
 192	0, /*tp_str*/
 193	PyObject_GenericGetAttr, /*tp_getattro*/
 194	PyObject_GenericSetAttr, /*tp_setattro */
 195	0, /*tp_as_buffer*/
 196	Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
 197	0, /*tp_doc*/
 198	0, /*tp_traverse*/
 199	0, /*tp_clear*/
 200	0, /*tp_richcompare*/
 201	0, /*tp_weaklistoffset*/
 202	0, /*tp_iter*/
 203	0, /*tp_iternext*/
 204	IdleManagerObj_methods, /* tp_methods */
 205	0, /*tp_members*/
 206	IdleManagerObj_getsetlist, /*tp_getset*/
 207	0, /*tp_base*/
 208	0, /*tp_dict*/
 209	0, /*tp_descr_get*/
 210	0, /*tp_descr_set*/
 211	0, /*tp_dictoffset*/
 212	IdleManagerObj_tp_init, /* tp_init */
 213	IdleManagerObj_tp_alloc, /* tp_alloc */
 214	IdleManagerObj_tp_new, /* tp_new */
 215	IdleManagerObj_tp_free, /* tp_free */
 216};
 217
 218/* ------------------ End object type IdleManager ------------------- */
 219
 220
 221/* ------------------ Object type MovieController ------------------- */
 222
 223PyTypeObject MovieController_Type;
 224
 225#define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type || PyObject_TypeCheck((x), &MovieController_Type))
 226
 227typedef struct MovieControllerObject {
 228	PyObject_HEAD
 229	MovieController ob_itself;
 230} MovieControllerObject;
 231
 232PyObject *MovieCtlObj_New(MovieController itself)
 233{
 234	MovieControllerObject *it;
 235	if (itself == NULL) {
 236	                                PyErr_SetString(Qt_Error,"Cannot create MovieController from NULL pointer");
 237	                                return NULL;
 238	                        }
 239	it = PyObject_NEW(MovieControllerObject, &MovieController_Type);
 240	if (it == NULL) return NULL;
 241	it->ob_itself = itself;
 242	return (PyObject *)it;
 243}
 244
 245int MovieCtlObj_Convert(PyObject *v, MovieController *p_itself)
 246{
 247	if (v == Py_None)
 248	{
 249		*p_itself = NULL;
 250		return 1;
 251	}
 252	if (!MovieCtlObj_Check(v))
 253	{
 254		PyErr_SetString(PyExc_TypeError, "MovieController required");
 255		return 0;
 256	}
 257	*p_itself = ((MovieControllerObject *)v)->ob_itself;
 258	return 1;
 259}
 260
 261static void MovieCtlObj_dealloc(MovieControllerObject *self)
 262{
 263	if (self->ob_itself) DisposeMovieController(self->ob_itself);
 264	self->ob_type->tp_free((PyObject *)self);
 265}
 266
 267static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args)
 268{
 269	PyObject *_res = NULL;
 270	ComponentResult _rv;
 271	Movie theMovie;
 272	WindowPtr movieWindow;
 273	Point where;
 274#ifndef MCSetMovie
 275	PyMac_PRECHECK(MCSetMovie);
 276#endif
 277	if (!PyArg_ParseTuple(_args, "O&O&O&",
 278	                      MovieObj_Convert, &theMovie,
 279	                      WinObj_Convert, &movieWindow,
 280	                      PyMac_GetPoint, &where))
 281		return NULL;
 282	_rv = MCSetMovie(_self->ob_itself,
 283	                 theMovie,
 284	                 movieWindow,
 285	                 where);
 286	_res = Py_BuildValue("l",
 287	                     _rv);
 288	return _res;
 289}
 290
 291static PyObject *MovieCtlObj_MCGetIndMovie(MovieControllerObject *_self, PyObject *_args)
 292{
 293	PyObject *_res = NULL;
 294	Movie _rv;
 295	short index;
 296#ifndef MCGetIndMovie
 297	PyMac_PRECHECK(MCGetIndMovie);
 298#endif
 299	if (!PyArg_ParseTuple(_args, "h",
 300	                      &index))
 301		return NULL;
 302	_rv = MCGetIndMovie(_self->ob_itself,
 303	                    index);
 304	_res = Py_BuildValue("O&",
 305	                     MovieObj_New, _rv);
 306	return _res;
 307}
 308
 309static PyObject *MovieCtlObj_MCRemoveAllMovies(MovieControllerObject *_self, PyObject *_args)
 310{
 311	PyObject *_res = NULL;
 312	ComponentResult _rv;
 313#ifndef MCRemoveAllMovies
 314	PyMac_PRECHECK(MCRemoveAllMovies);
 315#endif
 316	if (!PyArg_ParseTuple(_args, ""))
 317		return NULL;
 318	_rv = MCRemoveAllMovies(_self->ob_itself);
 319	_res = Py_BuildValue("l",
 320	                     _rv);
 321	return _res;
 322}
 323
 324static PyObject *MovieCtlObj_MCRemoveAMovie(MovieControllerObject *_self, PyObject *_args)
 325{
 326	PyObject *_res = NULL;
 327	ComponentResult _rv;
 328	Movie m;
 329#ifndef MCRemoveAMovie
 330	PyMac_PRECHECK(MCRemoveAMovie);
 331#endif
 332	if (!PyArg_ParseTuple(_args, "O&",
 333	                      MovieObj_Convert, &m))
 334		return NULL;
 335	_rv = MCRemoveAMovie(_self->ob_itself,
 336	                     m);
 337	_res = Py_BuildValue("l",
 338	                     _rv);
 339	return _res;
 340}
 341
 342static PyObject *MovieCtlObj_MCRemoveMovie(MovieControllerObject *_self, PyObject *_args)
 343{
 344	PyObject *_res = NULL;
 345	ComponentResult _rv;
 346#ifndef MCRemoveMovie
 347	PyMac_PRECHECK(MCRemoveMovie);
 348#endif
 349	if (!PyArg_ParseTuple(_args, ""))
 350		return NULL;
 351	_rv = MCRemoveMovie(_self->ob_itself);
 352	_res = Py_BuildValue("l",
 353	                     _rv);
 354	return _res;
 355}
 356
 357static PyObject *MovieCtlObj_MCIsPlayerEvent(MovieControllerObject *_self, PyObject *_args)
 358{
 359	PyObject *_res = NULL;
 360	ComponentResult _rv;
 361	EventRecord e;
 362#ifndef MCIsPlayerEvent
 363	PyMac_PRECHECK(MCIsPlayerEvent);
 364#endif
 365	if (!PyArg_ParseTuple(_args, "O&",
 366	                      PyMac_GetEventRecord, &e))
 367		return NULL;
 368	_rv = MCIsPlayerEvent(_self->ob_itself,
 369	                      &e);
 370	_res = Py_BuildValue("l",
 371	                     _rv);
 372	return _res;
 373}
 374
 375static PyObject *MovieCtlObj_MCDoAction(MovieControllerObject *_self, PyObject *_args)
 376{
 377	PyObject *_res = NULL;
 378	ComponentResult _rv;
 379	short action;
 380	void * params;
 381#ifndef MCDoAction
 382	PyMac_PRECHECK(MCDoAction);
 383#endif
 384	if (!PyArg_ParseTuple(_args, "hs",
 385	                      &action,
 386	                      &params))
 387		return NULL;
 388	_rv = MCDoAction(_self->ob_itself,
 389	                 action,
 390	                 params);
 391	_res = Py_BuildValue("l",
 392	                     _rv);
 393	return _res;
 394}
 395
 396static PyObject *MovieCtlObj_MCSetControllerAttached(MovieControllerObject *_self, PyObject *_args)
 397{
 398	PyObject *_res = NULL;
 399	ComponentResult _rv;
 400	Boolean attach;
 401#ifndef MCSetControllerAttached
 402	PyMac_PRECHECK(MCSetControllerAttached);
 403#endif
 404	if (!PyArg_ParseTuple(_args, "b",
 405	                      &attach))
 406		return NULL;
 407	_rv = MCSetControllerAttached(_self->ob_itself,
 408	                              attach);
 409	_res = Py_BuildValue("l",
 410	                     _rv);
 411	return _res;
 412}
 413
 414static PyObject *MovieCtlObj_MCIsControllerAttached(MovieControllerObject *_self, PyObject *_args)
 415{
 416	PyObject *_res = NULL;
 417	ComponentResult _rv;
 418#ifndef MCIsControllerAttached
 419	PyMac_PRECHECK(MCIsControllerAttached);
 420#endif
 421	if (!PyArg_ParseTuple(_args, ""))
 422		return NULL;
 423	_rv = MCIsControllerAttached(_self->ob_itself);
 424	_res = Py_BuildValue("l",
 425	                     _rv);
 426	return _res;
 427}
 428
 429static PyObject *MovieCtlObj_MCSetControllerPort(MovieControllerObject *_self, PyObject *_args)
 430{
 431	PyObject *_res = NULL;
 432	ComponentResult _rv;
 433	CGrafPtr gp;
 434#ifndef MCSetControllerPort
 435	PyMac_PRECHECK(MCSetControllerPort);
 436#endif
 437	if (!PyArg_ParseTuple(_args, "O&",
 438	                      GrafObj_Convert, &gp))
 439		return NULL;
 440	_rv = MCSetControllerPort(_self->ob_itself,
 441	                          gp);
 442	_res = Py_BuildValue("l",
 443	                     _rv);
 444	return _res;
 445}
 446
 447static PyObject *MovieCtlObj_MCGetControllerPort(MovieControllerObject *_self, PyObject *_args)
 448{
 449	PyObject *_res = NULL;
 450	CGrafPtr _rv;
 451#ifndef MCGetControllerPort
 452	PyMac_PRECHECK(MCGetControllerPort);
 453#endif
 454	if (!PyArg_ParseTuple(_args, ""))
 455		return NULL;
 456	_rv = MCGetControllerPort(_self->ob_itself);
 457	_res = Py_BuildValue("O&",
 458	                     GrafObj_New, _rv);
 459	return _res;
 460}
 461
 462static PyObject *MovieCtlObj_MCSetVisible(MovieControllerObject *_self, PyObject *_args)
 463{
 464	PyObject *_res = NULL;
 465	ComponentResult _rv;
 466	Boolean visible;
 467#ifndef MCSetVisible
 468	PyMac_PRECHECK(MCSetVisible);
 469#endif
 470	if (!PyArg_ParseTuple(_args, "b",
 471	                      &visible))
 472		return NULL;
 473	_rv = MCSetVisible(_self->ob_itself,
 474	                   visible);
 475	_res = Py_BuildValue("l",
 476	                     _rv);
 477	return _res;
 478}
 479
 480static PyObject *MovieCtlObj_MCGetVisible(MovieControllerObject *_self, PyObject *_args)
 481{
 482	PyObject *_res = NULL;
 483	ComponentResult _rv;
 484#ifndef MCGetVisible
 485	PyMac_PRECHECK(MCGetVisible);
 486#endif
 487	if (!PyArg_ParseTuple(_args, ""))
 488		return NULL;
 489	_rv = MCGetVisible(_self->ob_itself);
 490	_res = Py_BuildValue("l",
 491	                     _rv);
 492	return _res;
 493}
 494
 495static PyObject *MovieCtlObj_MCGetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
 496{
 497	PyObject *_res = NULL;
 498	ComponentResult _rv;
 499	Rect bounds;
 500#ifndef MCGetControllerBoundsRect
 501	PyMac_PRECHECK(MCGetControllerBoundsRect);
 502#endif
 503	if (!PyArg_ParseTuple(_args, ""))
 504		return NULL;
 505	_rv = MCGetControllerBoundsRect(_self->ob_itself,
 506	                                &bounds);
 507	_res = Py_BuildValue("lO&",
 508	                     _rv,
 509	                     PyMac_BuildRect, &bounds);
 510	return _res;
 511}
 512
 513static PyObject *MovieCtlObj_MCSetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
 514{
 515	PyObject *_res = NULL;
 516	ComponentResult _rv;
 517	Rect bounds;
 518#ifndef MCSetControllerBoundsRect
 519	PyMac_PRECHECK(MCSetControllerBoundsRect);
 520#endif
 521	if (!PyArg_ParseTuple(_args, "O&",
 522	                      PyMac_GetRect, &bounds))
 523		return NULL;
 524	_rv = MCSetControllerBoundsRect(_self->ob_itself,
 525	                                &bounds);
 526	_res = Py_BuildValue("l",
 527	                     _rv);
 528	return _res;
 529}
 530
 531static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(MovieControllerObject *_self, PyObject *_args)
 532{
 533	PyObject *_res = NULL;
 534	RgnHandle _rv;
 535#ifndef MCGetControllerBoundsRgn
 536	PyMac_PRECHECK(MCGetControllerBoundsRgn);
 537#endif
 538	if (!PyArg_ParseTuple(_args, ""))
 539		return NULL;
 540	_rv = MCGetControllerBoundsRgn(_self->ob_itself);
 541	_res = Py_BuildValue("O&",
 542	                     ResObj_New, _rv);
 543	return _res;
 544}
 545
 546static PyObject *MovieCtlObj_MCGetWindowRgn(MovieControllerObject *_self, PyObject *_args)
 547{
 548	PyObject *_res = NULL;
 549	RgnHandle _rv;
 550	WindowPtr w;
 551#ifndef MCGetWindowRgn
 552	PyMac_PRECHECK(MCGetWindowRgn);
 553#endif
 554	if (!PyArg_ParseTuple(_args, "O&",
 555	                      WinObj_Convert, &w))
 556		return NULL;
 557	_rv = MCGetWindowRgn(_self->ob_itself,
 558	                     w);
 559	_res = Py_BuildValue("O&",
 560	                     ResObj_New, _rv);
 561	return _res;
 562}
 563
 564static PyObject *MovieCtlObj_MCMovieChanged(MovieControllerObject *_self, PyObject *_args)
 565{
 566	PyObject *_res = NULL;
 567	ComponentResult _rv;
 568	Movie m;
 569#ifndef MCMovieChanged
 570	PyMac_PRECHECK(MCMovieChanged);
 571#endif
 572	if (!PyArg_ParseTuple(_args, "O&",
 573	                      MovieObj_Convert, &m))
 574		return NULL;
 575	_rv = MCMovieChanged(_self->ob_itself,
 576	                     m);
 577	_res = Py_BuildValue("l",
 578	                     _rv);
 579	return _res;
 580}
 581
 582static PyObject *MovieCtlObj_MCSetDuration(MovieControllerObject *_self, PyObject *_args)
 583{
 584	PyObject *_res = NULL;
 585	ComponentResult _rv;
 586	TimeValue duration;
 587#ifndef MCSetDuration
 588	PyMac_PRECHECK(MCSetDuration);
 589#endif
 590	if (!PyArg_ParseTuple(_args, "l",
 591	                      &duration))
 592		return NULL;
 593	_rv = MCSetDuration(_self->ob_itself,
 594	                    duration);
 595	_res = Py_BuildValue("l",
 596	                     _rv);
 597	return _res;
 598}
 599
 600static PyObject *MovieCtlObj_MCGetCurrentTime(MovieControllerObject *_self, PyObject *_args)
 601{
 602	PyObject *_res = NULL;
 603	TimeValue _rv;
 604	TimeScale scale;
 605#ifndef MCGetCurrentTime
 606	PyMac_PRECHECK(MCGetCurrentTime);
 607#endif
 608	if (!PyArg_ParseTuple(_args, ""))
 609		return NULL;
 610	_rv = MCGetCurrentTime(_self->ob_itself,
 611	                       &scale);
 612	_res = Py_BuildValue("ll",
 613	                     _rv,
 614	                     scale);
 615	return _res;
 616}
 617
 618static PyObject *MovieCtlObj_MCNewAttachedController(MovieControllerObject *_self, PyObject *_args)
 619{
 620	PyObject *_res = NULL;
 621	ComponentResult _rv;
 622	Movie theMovie;
 623	WindowPtr w;
 624	Point where;
 625#ifndef MCNewAttachedController
 626	PyMac_PRECHECK(MCNewAttachedController);
 627#endif
 628	if (!PyArg_ParseTuple(_args, "O&O&O&",
 629	                      MovieObj_Convert, &theMovie,
 630	                      WinObj_Convert, &w,
 631	                      PyMac_GetPoint, &where))
 632		return NULL;
 633	_rv = MCNewAttachedController(_self->ob_itself,
 634	                              theMovie,
 635	                              w,
 636	                              where);
 637	_res = Py_BuildValue("l",
 638	                     _rv);
 639	return _res;
 640}
 641
 642static PyObject *MovieCtlObj_MCDraw(MovieControllerObject *_self, PyObject *_args)
 643{
 644	PyObject *_res = NULL;
 645	ComponentResult _rv;
 646	WindowPtr w;
 647#ifndef MCDraw
 648	PyMac_PRECHECK(MCDraw);
 649#endif
 650	if (!PyArg_ParseTuple(_args, "O&",
 651	                      WinObj_Convert, &w))
 652		return NULL;
 653	_rv = MCDraw(_self->ob_itself,
 654	             w);
 655	_res = Py_BuildValue("l",
 656	                     _rv);
 657	return _res;
 658}
 659
 660static PyObject *MovieCtlObj_MCActivate(MovieControllerObject *_self, PyObject *_args)
 661{
 662	PyObject *_res = NULL;
 663	ComponentResult _rv;
 664	WindowPtr w;
 665	Boolean activate;
 666#ifndef MCActivate
 667	PyMac_PRECHECK(MCActivate);
 668#endif
 669	if (!PyArg_ParseTuple(_args, "O&b",
 670	                      WinObj_Convert, &w,
 671	                      &activate))
 672		return NULL;
 673	_rv = MCActivate(_self->ob_itself,
 674	                 w,
 675	                 activate);
 676	_res = Py_BuildValue("l",
 677	                     _rv);
 678	return _res;
 679}
 680
 681static PyObject *MovieCtlObj_MCIdle(MovieControllerObject *_self, PyObject *_args)
 682{
 683	PyObject *_res = NULL;
 684	ComponentResult _rv;
 685#ifndef MCIdle
 686	PyMac_PRECHECK(MCIdle);
 687#endif
 688	if (!PyArg_ParseTuple(_args, ""))
 689		return NULL;
 690	_rv = MCIdle(_self->ob_itself);
 691	_res = Py_BuildValue("l",
 692	                     _rv);
 693	return _res;
 694}
 695
 696static PyObject *MovieCtlObj_MCKey(MovieControllerObject *_self, PyObject *_args)
 697{
 698	PyObject *_res = NULL;
 699	ComponentResult _rv;
 700	SInt8 key;
 701	long modifiers;
 702#ifndef MCKey
 703	PyMac_PRECHECK(MCKey);
 704#endif
 705	if (!PyArg_ParseTuple(_args, "bl",
 706	                      &key,
 707	                      &modifiers))
 708		return NULL;
 709	_rv = MCKey(_self->ob_itself,
 710	            key,
 711	            modifiers);
 712	_res = Py_BuildValue("l",
 713	                     _rv);
 714	return _res;
 715}
 716
 717static PyObject *MovieCtlObj_MCClick(MovieControllerObject *_self, PyObject *_args)
 718{
 719	PyObject *_res = NULL;
 720	ComponentResult _rv;
 721	WindowPtr w;
 722	Point where;
 723	long when;
 724	long modifiers;
 725#ifndef MCClick
 726	PyMac_PRECHECK(MCClick);
 727#endif
 728	if (!PyArg_ParseTuple(_args, "O&O&ll",
 729	                      WinObj_Convert, &w,
 730	                      PyMac_GetPoint, &where,
 731	                      &when,
 732	                      &modifiers))
 733		return NULL;
 734	_rv = MCClick(_self->ob_itself,
 735	              w,
 736	              where,
 737	              when,
 738	              modifiers);
 739	_res = Py_BuildValue("l",
 740	                     _rv);
 741	return _res;
 742}
 743
 744static PyObject *MovieCtlObj_MCEnableEditing(MovieControllerObject *_self, PyObject *_args)
 745{
 746	PyObject *_res = NULL;
 747	ComponentResult _rv;
 748	Boolean enabled;
 749#ifndef MCEnableEditing
 750	PyMac_PRECHECK(MCEnableEditing);
 751#endif
 752	if (!PyArg_ParseTuple(_args, "b",
 753	                      &enabled))
 754		return NULL;
 755	_rv = MCEnableEditing(_self->ob_itself,
 756	                      enabled);
 757	_res = Py_BuildValue("l",
 758	                     _rv);
 759	return _res;
 760}
 761
 762static PyObject *MovieCtlObj_MCIsEditingEnabled(MovieControllerObject *_self, PyObject *_args)
 763{
 764	PyObject *_res = NULL;
 765	long _rv;
 766#ifndef MCIsEditingEnabled
 767	PyMac_PRECHECK(MCIsEditingEnabled);
 768#endif
 769	if (!PyArg_ParseTuple(_args, ""))
 770		return NULL;
 771	_rv = MCIsEditingEnabled(_self->ob_itself);
 772	_res = Py_BuildValue("l",
 773	                     _rv);
 774	return _res;
 775}
 776
 777static PyObject *MovieCtlObj_MCCopy(MovieControllerObject *_self, PyObject *_args)
 778{
 779	PyObject *_res = NULL;
 780	Movie _rv;
 781#ifndef MCCopy
 782	PyMac_PRECHECK(MCCopy);
 783#endif
 784	if (!PyArg_ParseTuple(_args, ""))
 785		return NULL;
 786	_rv = MCCopy(_self->ob_itself);
 787	_res = Py_BuildValue("O&",
 788	                     MovieObj_New, _rv);
 789	return _res;
 790}
 791
 792static PyObject *MovieCtlObj_MCCut(MovieControllerObject *_self, PyObject *_args)
 793{
 794	PyObject *_res = NULL;
 795	Movie _rv;
 796#ifndef MCCut
 797	PyMac_PRECHECK(MCCut);
 798#endif
 799	if (!PyArg_ParseTuple(_args, ""))
 800		return NULL;
 801	_rv = MCCut(_self->ob_itself);
 802	_res = Py_BuildValue("O&",
 803	                     MovieObj_New, _rv);
 804	return _res;
 805}
 806
 807static PyObject *MovieCtlObj_MCPaste(MovieControllerObject *_self, PyObject *_args)
 808{
 809	PyObject *_res = NULL;
 810	ComponentResult _rv;
 811	Movie srcMovie;
 812#ifndef MCPaste
 813	PyMac_PRECHECK(MCPaste);
 814#endif
 815	if (!PyArg_ParseTuple(_args, "O&",
 816	                      MovieObj_Convert, &srcMovie))
 817		return NULL;
 818	_rv = MCPaste(_self->ob_itself,
 819	              srcMovie);
 820	_res = Py_BuildValue("l",
 821	                     _rv);
 822	return _res;
 823}
 824
 825static PyObject *MovieCtlObj_MCClear(MovieControllerObject *_self, PyObject *_args)
 826{
 827	PyObject *_res = NULL;
 828	ComponentResult _rv;
 829#ifndef MCClear
 830	PyMac_PRECHECK(MCClear);
 831#endif
 832	if (!PyArg_ParseTuple(_args, ""))
 833		return NULL;
 834	_rv = MCClear(_self->ob_itself);
 835	_res = Py_BuildValue("l",
 836	                     _rv);
 837	return _res;
 838}
 839
 840static PyObject *MovieCtlObj_MCUndo(MovieControllerObject *_self, PyObject *_args)
 841{
 842	PyObject *_res = NULL;
 843	ComponentResult _rv;
 844#ifndef MCUndo
 845	PyMac_PRECHECK(MCUndo);
 846#endif
 847	if (!PyArg_ParseTuple(_args, ""))
 848		return NULL;
 849	_rv = MCUndo(_self->ob_itself);
 850	_res = Py_BuildValue("l",
 851	                     _rv);
 852	return _res;
 853}
 854
 855static PyObject *MovieCtlObj_MCPositionController(MovieControllerObject *_self, PyObject *_args)
 856{
 857	PyObject *_res = NULL;
 858	ComponentResult _rv;
 859	Rect movieRect;
 860	Rect controllerRect;
 861	long someFlags;
 862#ifndef MCPositionController
 863	PyMac_PRECHECK(MCPositionController);
 864#endif
 865	if (!PyArg_ParseTuple(_args, "O&O&l",
 866	                      PyMac_GetRect, &movieRect,
 867	                      PyMac_GetRect, &controllerRect,
 868	                      &someFlags))
 869		return NULL;
 870	_rv = MCPositionController(_self->ob_itself,
 871	                           &movieRect,
 872	                           &controllerRect,
 873	                           someFlags);
 874	_res = Py_BuildValue("l",
 875	                     _rv);
 876	return _res;
 877}
 878
 879static PyObject *MovieCtlObj_MCGetControllerInfo(MovieControllerObject *_self, PyObject *_args)
 880{
 881	PyObject *_res = NULL;
 882	ComponentResult _rv;
 883	long someFlags;
 884#ifndef MCGetControllerInfo
 885	PyMac_PRECHECK(MCGetControllerInfo);
 886#endif
 887	if (!PyArg_ParseTuple(_args, ""))
 888		return NULL;
 889	_rv = MCGetControllerInfo(_self->ob_itself,
 890	                          &someFlags);
 891	_res = Py_BuildValue("ll",
 892	                     _rv,
 893	                     someFlags);
 894	return _res;
 895}
 896
 897static PyObject *MovieCtlObj_MCSetClip(MovieControllerObject *_self, PyObject *_args)
 898{
 899	PyObject *_res = NULL;
 900	ComponentResult _rv;
 901	RgnHandle theClip;
 902	RgnHandle movieClip;
 903#ifndef MCSetClip
 904	PyMac_PRECHECK(MCSetClip);
 905#endif
 906	if (!PyArg_ParseTuple(_args, "O&O&",
 907	                      ResObj_Convert, &theClip,
 908	                      ResObj_Convert, &movieClip))
 909		return NULL;
 910	_rv = MCSetClip(_self->ob_itself,
 911	                theClip,
 912	                movieClip);
 913	_res = Py_BuildValue("l",
 914	                     _rv);
 915	return _res;
 916}
 917
 918static PyObject *MovieCtlObj_MCGetClip(MovieControllerObject *_self, PyObject *_args)
 919{
 920	PyObject *_res = NULL;
 921	ComponentResult _rv;
 922	RgnHandle theClip;
 923	RgnHandle movieClip;
 924#ifndef MCGetClip
 925	PyMac_PRECHECK(MCGetClip);
 926#endif
 927	if (!PyArg_ParseTuple(_args, ""))
 928		return NULL;
 929	_rv = MCGetClip(_self->ob_itself,
 930	                &theClip,
 931	                &movieClip);
 932	_res = Py_BuildValue("lO&O&",
 933	                     _rv,
 934	                     ResObj_New, theClip,
 935	                     ResObj_New, movieClip);
 936	return _res;
 937}
 938
 939static PyObject *MovieCtlObj_MCDrawBadge(MovieControllerObject *_self, PyObject *_args)
 940{
 941	PyObject *_res = NULL;
 942	ComponentResult _rv;
 943	RgnHandle movieRgn;
 944	RgnHandle badgeRgn;
 945#ifndef MCDrawBadge
 946	PyMac_PRECHECK(MCDrawBadge);
 947#endif
 948	if (!PyArg_ParseTuple(_args, "O&",
 949	                      ResObj_Convert, &movieRgn))
 950		return NULL;
 951	_rv = MCDrawBadge(_self->ob_itself,
 952	                  movieRgn,
 953	                  &badgeRgn);
 954	_res = Py_BuildValue("lO&",
 955	                     _rv,
 956	                     ResObj_New, badgeRgn);
 957	return _res;
 958}
 959
 960static PyObject *MovieCtlObj_MCSetUpEditMenu(MovieControllerObject *_self, PyObject *_args)
 961{
 962	PyObject *_res = NULL;
 963	ComponentResult _rv;
 964	long modifiers;
 965	MenuHandle mh;
 966#ifndef MCSetUpEditMenu
 967	PyMac_PRECHECK(MCSetUpEditMenu);
 968#endif
 969	if (!PyArg_ParseTuple(_args, "lO&",
 970	                      &modifiers,
 971	                      MenuObj_Convert, &mh))
 972		return NULL;
 973	_rv = MCSetUpEditMenu(_self->ob_itself,
 974	                      modifiers,
 975	                      mh);
 976	_res = Py_BuildValue("l",
 977	                     _rv);
 978	return _res;
 979}
 980
 981static PyObject *MovieCtlObj_MCGetMenuString(MovieControllerObject *_self, PyObject *_args)
 982{
 983	PyObject *_res = NULL;
 984	ComponentResult _rv;
 985	long modifiers;
 986	short item;
 987	Str255 aString;
 988#ifndef MCGetMenuString
 989	PyMac_PRECHECK(MCGetMenuString);
 990#endif
 991	if (!PyArg_ParseTuple(_args, "lhO&",
 992	                      &modifiers,
 993	                      &item,
 994	                      PyMac_GetStr255, aString))
 995		return NULL;
 996	_rv = MCGetMenuString(_self->ob_itself,
 997	                      modifiers,
 998	                      item,
 999	                      aString);
1000	_res = Py_BuildValue("l",
1001	                     _rv);
1002	return _res;
1003}
1004
1005static PyObject *MovieCtlObj_MCPtInController(MovieControllerObject *_self, PyObject *_args)
1006{
1007	PyObject *_res = NULL;
1008	ComponentResult _rv;
1009	Point thePt;
1010	Boolean inController;
1011#ifndef MCPtInController
1012	PyMac_PRECHECK(MCPtInController);
1013#endif
1014	if (!PyArg_ParseTuple(_args, "O&",
1015	                      PyMac_GetPoint, &thePt))
1016		return NULL;
1017	_rv = MCPtInController(_self->ob_itself,
1018	                       thePt,
1019	                       &inController);
1020	_res = Py_BuildValue("lb",
1021	                     _rv,
1022	                     inController);
1023	return _res;
1024}
1025
1026static PyObject *MovieCtlObj_MCInvalidate(MovieControllerObject *_self, PyObject *_args)
1027{
1028	PyObject *_res = NULL;
1029	ComponentResult _rv;
1030	WindowPtr w;
1031	RgnHandle invalidRgn;
1032#ifndef MCInvalidate
1033	PyMac_PRECHECK(MCInvalidate);
1034#endif
1035	if (!PyArg_ParseTuple(_args, "O&O&",
1036	                      WinObj_Convert, &w,
1037	                      ResObj_Convert, &invalidRgn))
1038		return NULL;
1039	_rv = MCInvalidate(_self->ob_itself,
1040	                   w,
1041	                   invalidRgn);
1042	_res = Py_BuildValue("l",
1043	                     _rv);
1044	return _res;
1045}
1046
1047static PyObject *MovieCtlObj_MCAdjustCursor(MovieControllerObject *_self, PyObject *_args)
1048{
1049	PyObject *_res = NULL;
1050	ComponentResult _rv;
1051	WindowPtr w;
1052	Point where;
1053	long modifiers;
1054#ifndef MCAdjustCursor
1055	PyMac_PRECHECK(MCAdjustCursor);
1056#endif
1057	if (!PyArg_ParseTuple(_args, "O&O&l",
1058	                      WinObj_Convert, &w,
1059	                      PyMac_GetPoint, &where,
1060	                      &modifiers))
1061		return NULL;
1062	_rv = MCAdjustCursor(_self->ob_itself,
1063	                     w,
1064	                     where,
1065	                     modifiers);
1066	_res = Py_BuildValue("l",
1067	                     _rv);
1068	return _res;
1069}
1070
1071static PyObject *MovieCtlObj_MCGetInterfaceElement(MovieControllerObject *_self, PyObject *_args)
1072{
1073	PyObject *_res = NULL;
1074	ComponentResult _rv;
1075	MCInterfaceElement whichElement;
1076	void * element;
1077#ifndef MCGetInterfaceElement
1078	PyMac_PRECHECK(MCGetInterfaceElement);
1079#endif
1080	if (!PyArg_ParseTuple(_args, "ls",
1081	                      &whichElement,
1082	                      &element))
1083		return NULL;
1084	_rv = MCGetInterfaceElement(_self->ob_itself,
1085	                            whichElement,
1086	                            element);
1087	_res = Py_BuildValue("l",
1088	                     _rv);
1089	return _res;
1090}
1091
1092static PyObject *MovieCtlObj_MCAddMovieSegment(MovieControllerObject *_self, PyObject *_args)
1093{
1094	PyObject *_res = NULL;
1095	ComponentResult _rv;
1096	Movie srcMovie;
1097	Boolean scaled;
1098#ifndef MCAddMovieSegment
1099	PyMac_PRECHECK(MCAddMovieSegment);
1100#endif
1101	if (!PyArg_ParseTuple(_args, "O&b",
1102	                      MovieObj_Convert, &srcMovie,
1103	                      &scaled))
1104		return NULL;
1105	_rv = MCAddMovieSegment(_self->ob_itself,
1106	                        srcMovie,
1107	                        scaled);
1108	_res = Py_BuildValue("l",
1109	                     _rv);
1110	return _res;
1111}
1112
1113static PyObject *MovieCtlObj_MCTrimMovieSegment(MovieControllerObject *_self, PyObject *_args)
1114{
1115	PyObject *_res = NULL;
1116	ComponentResult _rv;
1117#ifndef MCTrimMovieSegment
1118	PyMac_PRECHECK(MCTrimMovieSegment);
1119#endif
1120	if (!PyArg_ParseTuple(_args, ""))
1121		return NULL;
1122	_rv = MCTrimMovieSegment(_self->ob_itself);
1123	_res = Py_BuildValue("l",
1124	                     _rv);
1125	return _res;
1126}
1127
1128static PyObject *MovieCtlObj_MCSetIdleManager(MovieControllerObject *_self, PyObject *_args)
1129{
1130	PyObject *_res = NULL;
1131	ComponentResult _rv;
1132	IdleManager im;
1133#ifndef MCSetIdleManager
1134	PyMac_PRECHECK(MCSetIdleManager);
1135#endif
1136	if (!PyArg_ParseTuple(_args, "O&",
1137	                      IdleManagerObj_Convert, &im))
1138		return NULL;
1139	_rv = MCSetIdleManager(_self->ob_itself,
1140	                       im);
1141	_res = Py_BuildValue("l",
1142	                     _rv);
1143	return _res;
1144}
1145
1146static PyObject *MovieCtlObj_MCSetControllerCapabilities(MovieControllerObject *_self, PyObject *_args)
1147{
1148	PyObject *_res = NULL;
1149	ComponentResult _rv;
1150	long flags;
1151	long flagsMask;
1152#ifndef MCSetControllerCapabilities
1153	PyMac_PRECHECK(MCSetControllerCapabilities);
1154#endif
1155	if (!PyArg_ParseTuple(_args, "ll",
1156	                      &flags,
1157	                      &flagsMask))
1158		return NULL;
1159	_rv = MCSetControllerCapabilities(_self->ob_itself,
1160	                                  flags,
1161	                                  flagsMask);
1162	_res = Py_BuildValue("l",
1163	                     _rv);
1164	return _res;
1165}
1166
1167static PyMethodDef MovieCtlObj_methods[] = {
1168	{"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
1169	 PyDoc_STR("(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)")},
1170	{"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1,
1171	 PyDoc_STR("(short index) -> (Movie _rv)")},
1172	{"MCRemoveAllMovies", (PyCFunction)MovieCtlObj_MCRemoveAllMovies, 1,
1173	 PyDoc_STR("() -> (ComponentResult _rv)")},
1174	{"MCRemoveAMovie", (PyCFunction)MovieCtlObj_MCRemoveAMovie, 1,
1175	 PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
1176	{"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1,
1177	 PyDoc_STR("() -> (ComponentResult _rv)")},
1178	{"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1,
1179	 PyDoc_STR("(EventRecord e) -> (ComponentResult _rv)")},
1180	{"MCDoAction", (PyCFunction)MovieCtlObj_MCDoAction, 1,
1181	 PyDoc_STR("(short action, void * params) -> (ComponentResult _rv)")},
1182	{"MCSetControllerAttached", (PyCFunction)MovieCtlObj_MCSetControllerAttached, 1,
1183	 PyDoc_STR("(Boolean attach) -> (ComponentResult _rv)")},
1184	{"MCIsControllerAttached", (PyCFunction)MovieCtlObj_MCIsControllerAttached, 1,
1185	 PyDoc_STR("() -> (ComponentResult _rv)")},
1186	{"MCSetControllerPort", (PyCFunction)MovieCtlObj_MCSetControllerPort, 1,
1187	 PyDoc_STR("(CGrafPtr gp) -> (ComponentResult _rv)")},
1188	{"MCGetControllerPort", (PyCFunction)MovieCtlObj_MCGetControllerPort, 1,
1189	 PyDoc_STR("() -> (CGrafPtr _rv)")},
1190	{"MCSetVisible", (PyCFunction)MovieCtlObj_MCSetVisible, 1,
1191	 PyDoc_STR("(Boolean visible) -> (ComponentResult _rv)")},
1192	{"MCGetVisible", (PyCFunction)MovieCtlObj_MCGetVisible, 1,
1193	 PyDoc_STR("() -> (ComponentResult _rv)")},
1194	{"MCGetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRect, 1,
1195	 PyDoc_STR("() -> (ComponentResult _rv, Rect bounds)")},
1196	{"MCSetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCSetControllerBoundsRect, 1,
1197	 PyDoc_STR("(Rect bounds) -> (ComponentResult _rv)")},
1198	{"MCGetControllerBoundsRgn", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRgn, 1,
1199	 PyDoc_STR("() -> (RgnHandle _rv)")},
1200	{"MCGetWindowRgn", (PyCFunction)MovieCtlObj_MCGetWindowRgn, 1,
1201	 PyDoc_STR("(WindowPtr w) -> (RgnHandle _rv)")},
1202	{"MCMovieChanged", (PyCFunction)MovieCtlObj_MCMovieChanged, 1,
1203	 PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
1204	{"MCSetDuration", (PyCFunction)MovieCtlObj_MCSetDuration, 1,
1205	 PyDoc_STR("(TimeValue duration) -> (ComponentResult _rv)")},
1206	{"MCGetCurrentTime", (PyCFunction)MovieCtlObj_MCGetCurrentTime, 1,
1207	 PyDoc_STR("() -> (TimeValue _rv, TimeScale scale)")},
1208	{"MCNewAttachedController", (PyCFunction)MovieCtlObj_MCNewAttachedController, 1,
1209	 PyDoc_STR("(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)")},
1210	{"MCDraw", (PyCFunction)MovieCtlObj_MCDraw, 1,
1211	 PyDoc_STR("(WindowPtr w) -> (ComponentResult _rv)")},
1212	{"MCActivate", (PyCFunction)MovieCtlObj_MCActivate, 1,
1213	 PyDoc_STR("(WindowPtr w, Boolean activate) -> (ComponentResult _rv)")},
1214	{"MCIdle", (PyCFunction)MovieCtlObj_MCIdle, 1,
1215	 PyDoc_STR("() -> (ComponentResult _rv)")},
1216	{"MCKey", (PyCFunction)MovieCtlObj_MCKey, 1,
1217	 PyDoc_STR("(SInt8 key, long modifiers) -> (ComponentResult _rv)")},
1218	{"MCClick", (PyCFunction)MovieCtlObj_MCClick, 1,
1219	 PyDoc_STR("(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)")},
1220	{"MCEnableEditing", (PyCFunction)MovieCtlObj_MCEnableEditing, 1,
1221	 PyDoc_STR("(Boolean enabled) -> (ComponentResult _rv)")},
1222	{"MCIsEditingEnabled", (PyCFunction)MovieCtlObj_MCIsEditingEnabled, 1,
1223	 PyDoc_STR("() -> (long _rv)")},
1224	{"MCCopy", (PyCFunction)MovieCtlObj_MCCopy, 1,
1225	 PyDoc_STR("() -> (Movie _rv)")},
1226	{"MCCut", (PyCFunction)MovieCtlObj_MCCut, 1,
1227	 PyDoc_STR("() -> (Movie _rv)")},
1228	{"MCPaste", (PyCFunction)MovieCtlObj_MCPaste, 1,
1229	 PyDoc_STR("(Movie srcMovie) -> (ComponentResult _rv)")},
1230	{"MCClear", (PyCFunction)MovieCtlObj_MCClear, 1,
1231	 PyDoc_STR("() -> (ComponentResult _rv)")},
1232	{"MCUndo", (PyCFunction)MovieCtlObj_MCUndo, 1,
1233	 PyDoc_STR("() -> (ComponentResult _rv)")},
1234	{"MCPositionController", (PyCFunction)MovieCtlObj_MCPositionController, 1,
1235	 PyDoc_STR("(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)")},
1236	{"MCGetControllerInfo", (PyCFunction)MovieCtlObj_MCGetControllerInfo, 1,
1237	 PyDoc_STR("() -> (ComponentResult _rv, long someFlags)")},
1238	{"MCSetClip", (PyCFunction)MovieCtlObj_MCSetClip, 1,
1239	 PyDoc_STR("(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)")},
1240	{"MCGetClip", (PyCFunction)MovieCtlObj_MCGetClip, 1,
1241	 PyDoc_STR("() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)")},
1242	{"MCDrawBadge", (PyCFunction)MovieCtlObj_MCDrawBadge, 1,
1243	 PyDoc_STR("(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)")},
1244	{"MCSetUpEditMenu", (PyCFunction)MovieCtlObj_MCSetUpEditMenu, 1,
1245	 PyDoc_STR("(long modifiers, MenuHandle mh) -> (ComponentResult _rv)")},
1246	{"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1,
1247	 PyDoc_STR("(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)")},
1248	{"MCPtInController", (PyCFunction)MovieCtlObj_MCPtInController, 1,
1249	 PyDoc_STR("(Point thePt) -> (ComponentResult _rv, Boolean inController)")},
1250	{"MCInvalidate", (PyCFunction)MovieCtlObj_MCInvalidate, 1,
1251	 PyDoc_STR("(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)")},
1252	{"MCAdjustCursor", (PyCFunction)MovieCtlObj_MCAdjustCursor, 1,
1253	 PyDoc_STR("(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)")},
1254	{"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
1255	 PyDoc_STR("(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)")},
1256	{"MCAddMovieSegment", (PyCFunction)MovieCtlObj_MCAddMovieSegment, 1,
1257	 PyDoc_STR("(Movie srcMovie, Boolean scaled) -> (ComponentResult _rv)")},
1258	{"MCTrimMovieSegment", (PyCFunction)MovieCtlObj_MCTrimMovieSegment, 1,
1259	 PyDoc_STR("() -> (ComponentResult _rv)")},
1260	{"MCSetIdleManager", (PyCFunction)MovieCtlObj_MCSetIdleManager, 1,
1261	 PyDoc_STR("(IdleManager im) -> (ComponentResult _rv)")},
1262	{"MCSetControllerCapabilities", (PyCFunction)MovieCtlObj_MCSetControllerCapabilities, 1,
1263	 PyDoc_STR("(long flags, long flagsMask) -> (ComponentResult _rv)")},
1264	{NULL, NULL, 0}
1265};
1266
1267#define MovieCtlObj_getsetlist NULL
1268
1269
1270#define MovieCtlObj_compare NULL
1271
1272#define MovieCtlObj_repr NULL
1273
1274#define MovieCtlObj_hash NULL
1275#define MovieCtlObj_tp_init 0
1276
1277#define MovieCtlObj_tp_alloc PyType_GenericAlloc
1278
1279static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
1280{
1281	PyObject *_self;
1282	MovieController itself;
1283	char *kw[] = {"itself", 0};
1284
1285	if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, MovieCtlObj_Convert, &itself)) return NULL;
1286	if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
1287	((MovieControllerObject *)_self)->ob_itself = itself;
1288	return _self;
1289}
1290
1291#define MovieCtlObj_tp_free PyObject_Del
1292
1293
1294PyTypeObject MovieController_Type = {
1295	PyObject_HEAD_INIT(NULL)
1296	0, /*ob_size*/
1297	"_Qt.MovieController", /*tp_name*/
1298	sizeof(MovieControllerObject), /*tp_basicsize*/
1299	0, /*tp_itemsize*/
1300	/* methods */
1301	(destructor) MovieCtlObj_dealloc, /*tp_dealloc*/
1302	0, /*tp_print*/
1303	(getattrfunc)0, /*tp_getattr*/
1304	(setattrfunc)0, /*tp_setattr*/
1305	(cmpfunc) MovieCtlObj_compare, /*tp_compare*/
1306	(reprfunc) MovieCtlObj_repr, /*tp_repr*/
1307	(PyNumberMethods *)0, /* tp_as_number */
1308	(PySequenceMethods *)0, /* tp_as_sequence */
1309	(PyMappingMethods *)0, /* tp_as_mapping */
1310	(hashfunc) MovieCtlObj_hash, /*tp_hash*/
1311	0, /*tp_call*/
1312	0, /*tp_str*/
1313	PyObject_GenericGetAttr, /*tp_getattro*/
1314	PyObject_GenericSetAttr, /*tp_setattro */
1315	0, /*tp_as_buffer*/
1316	Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
1317	0, /*tp_doc*/
1318	0, /*tp_traverse*/
1319	0, /*tp_clear*/
1320	0, /*tp_richcompare*/
1321	0, /*tp_weaklistoffset*/
1322	0, /*tp_iter*/
1323	0, /*tp_iternext*/
1324	MovieCtlObj_methods, /* tp_methods */
1325	0, /*tp_members*/
1326	MovieCtlObj_getsetlist, /*tp_getset*/
1327	0, /*tp_base*/
1328	0, /*tp_dict*/
1329	0, /*tp_descr_get*/
1330	0, /*tp_descr_set*/
1331	0, /*tp_dictoffset*/
1332	MovieCtlObj_tp_init, /* tp_init */
1333	MovieCtlObj_tp_alloc, /* tp_alloc */
1334	MovieCtlObj_tp_new, /* tp_new */
1335	MovieCtlObj_tp_free, /* tp_free */
1336};
1337
1338/* ---------------- End object type MovieController ----------------- */
1339
1340
1341/* ---------------------- Object type TimeBase ---------------------- */
1342
1343PyTypeObject TimeBase_Type;
1344
1345#define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type || PyObject_TypeCheck((x), &TimeBase_Type))
1346
1347typedef struct TimeBaseObject {
1348	PyObject_HEAD
1349	TimeBase ob_itself;
1350} TimeBaseObject;
1351
1352PyObject *TimeBaseObj_New(TimeBase itself)
1353{
1354	TimeBaseObject *it;
1355	if (itself == NULL) {
1356	                                PyErr_SetString(Qt_Error,"Cannot create TimeBase from NULL pointer");
1357	                                return NULL;
1358	                        }
1359	it = PyObject_NEW(TimeBaseObject, &TimeBase_Type);
1360	if (it == NULL) return NULL;
1361	it->ob_itself = itself;
1362	return (PyObject *)it;
1363}
1364
1365int TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself)
1366{
1367	if (v == Py_None)
1368	{
1369		*p_itself = NULL;
1370		return 1;
1371	}
1372	if (!TimeBaseObj_Check(v))
1373	{
1374		PyErr_SetString(PyExc_TypeError, "TimeBase required");
1375		return 0;
1376	}
1377	*p_itself = ((TimeBaseObject *)v)->ob_itself;
1378	return 1;
1379}
1380
1381static void TimeBaseObj_dealloc(TimeBaseObject *self)
1382{
1383	/* Cleanup of self->ob_itself goes here */
1384	self->ob_type->tp_free((PyObject *)self);
1385}
1386
1387static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args)
1388{
1389	PyObject *_res = NULL;
1390#ifndef DisposeTimeBase
1391	PyMac_PRECHECK(DisposeTimeBase);
1392#endif
1393	if (!PyArg_ParseTuple(_args, ""))
1394		return NULL;
1395	DisposeTimeBase(_self->ob_itself);
1396	Py_INCREF(Py_None);
1397	_res = Py_None;
1398	return _res;
1399}
1400
1401static PyObject *TimeBaseObj_GetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
1402{
1403	PyObject *_res = NULL;
1404	TimeValue _rv;
1405	TimeScale s;
1406	TimeRecord tr;
1407#ifndef GetTimeBaseTime
1408	PyMac_PRECHECK(GetTimeBaseTime);
1409#endif
1410	if (!PyArg_ParseTuple(_args, "l",
1411	                      &s))
1412		return NULL;
1413	_rv = GetTimeBaseTime(_self->ob_itself,
1414	                      s,
1415	                      &tr);
1416	_res = Py_BuildValue("lO&",
1417	                     _rv,
1418	                     QtTimeRecord_New, &tr);
1419	return _res;
1420}
1421
1422static PyObject *TimeBaseObj_SetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
1423{
1424	PyObject *_res = NULL;
1425	TimeRecord tr;
1426#ifndef SetTimeBaseTime
1427	PyMac_PRECHECK(SetTimeBaseTime);
1428#endif
1429	if (!PyArg_ParseTuple(_args, "O&",
1430	                      QtTimeRecord_Convert, &tr))
1431		return NULL;
1432	SetTimeBaseTime(_self->ob_itself,
1433	                &tr);
1434	Py_INCREF(Py_None);
1435	_res = Py_None;
1436	return _res;
1437}
1438
1439static PyObject *TimeBaseObj_SetTimeBaseValue(TimeBaseObject *_self, PyObject *_args)
1440{
1441	PyObject *_res = NULL;
1442	TimeValue t;
1443	TimeScale s;
1444#ifndef SetTimeBaseValue
1445	PyMac_PRECHECK(SetTimeBaseValue);
1446#endif
1447	if (!PyArg_ParseTuple(_args, "ll",
1448	                      &t,
1449	                      &s))
1450		return NULL;
1451	SetTimeBaseValue(_self->ob_itself,
1452	                 t,
1453	                 s);
1454	Py_INCREF(Py_None);
1455	_res = Py_None;
1456	return _res;
1457}
1458
1459static PyObject *TimeBaseObj_GetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
1460{
1461	PyObject *_res = NULL;
1462	Fixed _rv;
1463#ifndef GetTimeBaseRate
1464	PyMac_PRECHECK(GetTimeBaseRate);
1465#endif
1466	if (!PyArg_ParseTuple(_args, ""))
1467		return NULL;
1468	_rv = GetTimeBaseRate(_self->ob_itself);
1469	_res = Py_BuildValue("O&",
1470	                     PyMac_BuildFixed, _rv);
1471	return _res;
1472}
1473
1474static PyObject *TimeBaseObj_SetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
1475{
1476	PyObject *_res = NULL;
1477	Fixed r;
1478#ifndef SetTimeBaseRate
1479	PyMac_PRECHECK(SetTimeBaseRate);
1480#endif
1481	if (!PyArg_ParseTuple(_args, "O&",
1482	                      PyMac_GetFixed, &r))
1483		return NULL;
1484	SetTimeBaseRate(_self->ob_itself,
1485	                r);
1486	Py_INCREF(Py_None);
1487	_res = Py_None;
1488	return _res;
1489}
1490
1491static PyObject *TimeBaseObj_GetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
1492{
1493	PyObject *_res = NULL;
1494	TimeValue _rv;
1495	TimeScale s;
1496	TimeRecord tr;
1497#ifndef GetTimeBaseStartTime
1498	PyMac_PRECHECK(GetTimeBaseStartTime);
1499#endif
1500	if (!PyArg_ParseTuple(_args, "l",
1501	                      &s))
1502		return NULL;
1503	_rv = GetTimeBaseStartTime(_self->ob_itself,
1504	                           s,
1505	                           &tr);
1506	_res = Py_BuildValue("lO&",
1507	                     _rv,
1508	                     QtTimeRecord_New, &tr);
1509	return _res;
1510}
1511
1512static PyObject *TimeBaseObj_SetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
1513{
1514	PyObject *_res = NULL;
1515	TimeRecord tr;
1516#ifndef SetTimeBaseStartTime
1517	PyMac_PRECHECK(SetTimeBaseStartTime);
1518#endif
1519	if (!PyArg_ParseTuple(_args, "O&",
1520	                      QtTimeRecord_Convert, &tr))
1521		return NULL;
1522	SetTimeBaseStartTime(_self->ob_itself,
1523	                     &tr);
1524	Py_INCREF(Py_None);
1525	_res = Py_None;
1526	return _res;
1527}
1528
1529static PyObject *TimeBaseObj_GetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
1530{
1531	PyObject *_res = NULL;
1532	TimeValue _rv;
1533	TimeScale s;
1534	TimeRecord tr;
1535#ifndef GetTimeBaseStopTime
1536	PyMac_PRECHECK(GetTimeBaseStopTime);
1537#endif
1538	if (!PyArg_ParseTuple(_args, "l",
1539	                      &s))
1540		return NULL;
1541	_rv = GetTimeBaseStopTime(_self->ob_itself,
1542	                          s,
1543	                          &tr);
1544	_res = Py_BuildValue("lO&",
1545	                     _rv,
1546	                     QtTimeRecord_New, &tr);
1547	return _res;
1548}
1549
1550static PyObject *TimeBaseObj_SetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
1551{
1552	PyObject *_res = NULL;
1553	TimeRecord tr;
1554#ifndef SetTimeBaseStopTime
1555	PyMac_PRECHECK(SetTimeBaseStopTime);
1556#endif
1557	if (!PyArg_ParseTuple(_args, "O&",
1558	                      QtTimeRecord_Convert, &tr))
1559		return NULL;
1560	SetTimeBaseStopTime(_self->ob_itself,
1561	                    &tr);
1562	Py_INCREF(Py_None);
1563	_res = Py_None;
1564	return _res;
1565}
1566
1567static PyObject *TimeBaseObj_GetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
1568{
1569	PyObject *_res = NULL;
1570	long _rv;
1571#ifndef GetTimeBaseFlags
1572	PyMac_PRECHECK(GetTimeBaseFlags);
1573#endif
1574	if (!PyArg_ParseTuple(_args, ""))
1575		return NULL;
1576	_rv = GetTimeBaseFlags(_self->ob_itself);
1577	_res = Py_BuildValue("l",
1578	                     _rv);
1579	return _res;
1580}
1581
1582static PyObject *TimeBaseObj_SetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
1583{
1584	PyObject *_res = NULL;
1585	long timeBaseFlags;
1586#ifndef SetTimeBaseFlags
1587	PyMac_PRECHECK(SetTimeBaseFlags);
1588#endif
1589	if (!PyArg_ParseTuple(_args, "l",
1590	                      &timeBaseFlags))
1591		return NULL;
1592	SetTimeBaseFlags(_self->ob_itself,
1593	                 timeBaseFlags);
1594	Py_INCREF(Py_None);
1595	_res = Py_None;
1596	return _res;
1597}
1598
1599static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
1600{
1601	PyObject *_res = NULL;
1602	TimeBase master;
1603	TimeRecord slaveZero;
1604#ifndef SetTimeBaseMasterTimeBase
1605	PyMac_PRECHECK(SetTimeBaseMasterTimeBase);
1606#endif
1607	if (!PyArg_ParseTuple(_args, "O&O&",
1608	                      TimeBaseObj_Convert, &master,
1609	                      QtTimeRecord_Convert, &slaveZero))
1610		return NULL;
1611	SetTimeBaseMasterTimeBase(_self->ob_itself,
1612	                          master,
1613	                          &slaveZero);
1614	Py_INCREF(Py_None);
1615	_res = Py_None;
1616	return _res;
1617}
1618
1619static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
1620{
1621	PyObject *_res = NULL;
1622	TimeBase _rv;
1623#ifndef GetTimeBaseMasterTimeBase
1624	PyMac_PRECHECK(GetTimeBaseMasterTimeBase);
1625#endif
1626	if (!PyArg_ParseTuple(_args, ""))
1627		return NULL;
1628	_rv = GetTimeBaseMasterTimeBase(_self->ob_itself);
1629	_res = Py_BuildValue("O&",
1630	                     TimeBaseObj_New, _rv);
1631	return _res;
1632}
1633
1634static PyObject *TimeBaseObj_SetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
1635{
1636	PyObject *_res = NULL;
1637	Component clockMeister;
1638	TimeRecord slaveZero;
1639#ifndef SetTimeBaseMasterClock
1640	PyMac_PRECHECK(SetTimeBaseMasterClock);
1641#endif
1642	if (!PyArg_ParseTuple(_args, "O&O&",
1643	                      CmpObj_Convert, &clockMeister,
1644	                      QtTimeRecord_Convert, &slaveZero))
1645		return NULL;
1646	SetTimeBaseMasterClock(_self->ob_itself,
1647	                       clockMeister,
1648	                       &slaveZero);
1649	Py_INCREF(Py_None);
1650	_res = Py_None;
1651	return _res;
1652}
1653
1654static PyObject *TimeBaseObj_GetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
1655{
1656	PyObject *_res = NULL;
1657	ComponentInstance _rv;
1658#ifndef GetTimeBaseMasterClock
1659	PyMac_PRECHECK(GetTimeBaseMasterClock);
1660#endif
1661	if (!PyArg_ParseTuple(_args, ""))
1662		return NULL;
1663	_rv = GetTimeBaseMasterClock(_self->ob_itself);
1664	_res = Py_BuildValue("O&",
1665	                     CmpInstObj_New, _rv);
1666	return _res;
1667}
1668
1669static PyObject *TimeBaseObj_GetTimeBaseStatus(TimeBaseObject *_self, PyObject *_args)
1670{
1671	PyObject *_res = NULL;
1672	long _rv;
1673	TimeRecord unpinnedTime;
1674#ifndef GetTimeBaseStatus
1675	PyMac_PRECHECK(GetTimeBaseStatus);
1676#endif
1677	if (!PyArg_ParseTuple(_args, ""))
1678		return NULL;
1679	_rv = GetTimeBaseStatus(_self->ob_itself,
1680	                        &unpinnedTime);
1681	_res = Py_BuildValue("lO&",
1682	                     _rv,
1683	                     QtTimeRecord_New, &unpinnedTime);
1684	return _res;
1685}
1686
1687static PyObject *TimeBaseObj_SetTimeBaseZero(TimeBaseObject *_self, PyObject *_args)
1688{
1689	PyObject *_res = NULL;
1690	TimeRecord zero;
1691#ifndef SetTimeBaseZero
1692	PyMac_PRECHECK(SetTimeBaseZero);
1693#endif
1694	if (!PyArg_ParseTuple(_args, "O&",
1695	                      QtTimeRecord_Convert, &zero))
1696		return NULL;
1697	SetTimeBaseZero(_self->ob_itself,
1698	                &zero);
1699	Py_INCREF(Py_None);
1700	_res = Py_None;
1701	return _res;
1702}
1703
1704static PyObject *TimeBaseObj_GetTimeBaseEffectiveRate(TimeBaseObject *_self, PyObject *_args)
1705{
1706	PyObject *_res = NULL;
1707	Fixed _rv;
1708#ifndef GetTimeBaseEffectiveRate
1709	PyMac_PRECHECK(GetTimeBaseEffectiveRate);
1710#endif
1711	if (!PyArg_ParseTuple(_args, ""))
1712		return NULL;
1713	_rv = GetTimeBaseEffectiveRate(_self->ob_itself);
1714	_res = Py_BuildValue("O&",
1715	                     PyMac_BuildFixed, _rv);
1716	return _res;
1717}
1718
1719static PyMethodDef TimeBaseObj_methods[] = {
1720	{"DisposeTimeBase", (PyCFunction)TimeBaseObj_DisposeTimeBase, 1,
1721	 PyDoc_STR("() -> None")},
1722	{"GetTimeBaseTime", (PyCFunction)TimeBaseObj_GetTimeBaseTime, 1,
1723	 PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
1724	{"SetTimeBaseTime", (PyCFunction)TimeBaseObj_SetTimeBaseTime, 1,
1725	 PyDoc_STR("(TimeRecord tr) -> None")},
1726	{"SetTimeBaseValue", (PyCFunction)TimeBaseObj_SetTimeBaseValue, 1,
1727	 PyDoc_STR("(TimeValue t, TimeScale s) -> None")},
1728	{"GetTimeBaseRate", (PyCFunction)TimeBaseObj_GetTimeBaseRate, 1,
1729	 PyDoc_STR("() -> (Fixed _rv)")},
1730	{"SetTimeBaseRate", (PyCFunction)TimeBaseObj_SetTimeBaseRate, 1,
1731	 PyDoc_STR("(Fixed r) -> None")},
1732	{"GetTimeBaseStartTime", (PyCFunction)TimeBaseObj_GetTimeBaseStartTime, 1,
1733	 PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
1734	{"SetTimeBaseStartTime", (PyCFunction)TimeBaseObj_SetTimeBaseStartTime, 1,
1735	 PyDoc_STR("(TimeRecord tr) -> None")},
1736	{"GetTimeBaseStopTime", (PyCFunction)TimeBaseObj_GetTimeBaseStopTime, 1,
1737	 PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
1738	{"SetTimeBaseStopTime", (PyCFunction)TimeBaseObj_SetTimeBaseStopTime, 1,
1739	 PyDoc_STR("(TimeRecord tr) -> None")},
1740	{"GetTimeBaseFlags", (PyCFunction)TimeBaseObj_GetTimeBaseFlags, 1,
1741	 PyDoc_STR("() -> (long _rv)")},
1742	{"SetTimeBaseFlags", (PyCFunction)TimeBaseObj_SetTimeBaseFlags, 1,
1743	 PyDoc_STR("(long timeBaseFlags) -> None")},
1744	{"SetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_SetTimeBaseMasterTimeBase, 1,
1745	 PyDoc_STR("(TimeBase master, TimeRecord slaveZero) -> None")},
1746	{"GetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_GetTimeBaseMasterTimeBase, 1,
1747	 PyDoc_STR("() -> (TimeBase _rv)")},
1748	{"SetTimeBas…

Large files files are truncated, but you can click here to view the full file