[Python-checkins] python/dist/src/Mac/Modules/qt _Qtmodule.c,1.11,1.12 qtscan.py,1.20,1.21

jackjansen@users.sourceforge.net jackjansen@users.sourceforge.net
Thu, 12 Dec 2002 02:31:54 -0800


Update of /cvsroot/python/python/dist/src/Mac/Modules/qt
In directory sc8-pr-cvs1:/tmp/cvs-serv21368/Modules/qt

Modified Files:
	_Qtmodule.c qtscan.py 
Log Message:
Getting rid of pre-Carbon (MacOS8) support. All code depending on
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some
TARGET_API_MAC_OSX conditional code is gone, because it is no longer
used on OSX-only Python (only in MacPython-OS9).


Index: _Qtmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qt/_Qtmodule.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** _Qtmodule.c	3 Dec 2002 23:40:21 -0000	1.11
--- _Qtmodule.c	12 Dec 2002 10:31:52 -0000	1.12
***************
*** 6277,6332 ****
  }
  
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *MovieObj_SetMovieAnchorDataRef(MovieObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	OSErr _err;
- 	Handle dataRef;
- 	OSType dataRefType;
- #ifndef SetMovieAnchorDataRef
- 	PyMac_PRECHECK(SetMovieAnchorDataRef);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&O&",
- 	                      ResObj_Convert, &dataRef,
- 	                      PyMac_GetOSType, &dataRefType))
- 		return NULL;
- 	_err = SetMovieAnchorDataRef(_self->ob_itself,
- 	                             dataRef,
- 	                             dataRefType);
- 	if (_err != noErr) return PyMac_Error(_err);
- 	Py_INCREF(Py_None);
- 	_res = Py_None;
- 	return _res;
- }
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *MovieObj_GetMovieAnchorDataRef(MovieObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	OSErr _err;
- 	Handle dataRef;
- 	OSType dataRefType;
- 	long outFlags;
- #ifndef GetMovieAnchorDataRef
- 	PyMac_PRECHECK(GetMovieAnchorDataRef);
- #endif
- 	if (!PyArg_ParseTuple(_args, ""))
- 		return NULL;
- 	_err = GetMovieAnchorDataRef(_self->ob_itself,
- 	                             &dataRef,
- 	                             &dataRefType,
- 	                             &outFlags);
- 	if (_err != noErr) return PyMac_Error(_err);
- 	_res = Py_BuildValue("O&O&l",
- 	                     ResObj_New, dataRef,
- 	                     PyMac_BuildOSType, dataRefType,
- 	                     outFlags);
- 	return _res;
- }
- #endif
- 
  static PyObject *MovieObj_SetMovieColorTable(MovieObject *_self, PyObject *_args)
  {
--- 6277,6280 ----
***************
*** 6535,6556 ****
  }
  
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *MovieObj_GetMovieLoadState(MovieObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	long _rv;
- #ifndef GetMovieLoadState
- 	PyMac_PRECHECK(GetMovieLoadState);
- #endif
- 	if (!PyArg_ParseTuple(_args, ""))
- 		return NULL;
- 	_rv = GetMovieLoadState(_self->ob_itself);
- 	_res = Py_BuildValue("l",
- 	                     _rv);
- 	return _res;
- }
- #endif
- 
  static PyObject *MovieObj_NewMovieController(MovieObject *_self, PyObject *_args)
  {
--- 6483,6486 ----
***************
*** 6860,6873 ****
  	{"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
  	 PyDoc_STR("() -> (Handle dataRef, OSType dataRefType)")},
- 
- #if !TARGET_API_MAC_CARBON
- 	{"SetMovieAnchorDataRef", (PyCFunction)MovieObj_SetMovieAnchorDataRef, 1,
- 	 PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 	{"GetMovieAnchorDataRef", (PyCFunction)MovieObj_GetMovieAnchorDataRef, 1,
- 	 PyDoc_STR("() -> (Handle dataRef, OSType dataRefType, long outFlags)")},
- #endif
  	{"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
  	 PyDoc_STR("(CTabHandle ctab) -> None")},
--- 6790,6793 ----
***************
*** 6888,6896 ****
  	{"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
  	 PyDoc_STR("() -> (ComponentResult _rv, Track firstProblemTrack)")},
- 
- #if !TARGET_API_MAC_CARBON
- 	{"GetMovieLoadState", (PyCFunction)MovieObj_GetMovieLoadState, 1,
- 	 PyDoc_STR("() -> (long _rv)")},
- #endif
  	{"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
  	 PyDoc_STR("(Rect movieRect, long someFlags) -> (MovieController _rv)")},
--- 6808,6811 ----
***************
*** 6982,7007 ****
  
  
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_CheckQuickTimeRegistration(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	void * registrationKey;
- 	long flags;
- #ifndef CheckQuickTimeRegistration
- 	PyMac_PRECHECK(CheckQuickTimeRegistration);
- #endif
- 	if (!PyArg_ParseTuple(_args, "sl",
- 	                      &registrationKey,
- 	                      &flags))
- 		return NULL;
- 	CheckQuickTimeRegistration(registrationKey,
- 	                           flags);
- 	Py_INCREF(Py_None);
- 	_res = Py_None;
- 	return _res;
- }
- #endif
- 
  static PyObject *Qt_EnterMovies(PyObject *_self, PyObject *_args)
  {
--- 6897,6900 ----
***************
*** 7136,7177 ****
  }
  
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_OpenADataHandler(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	OSErr _err;
- 	Handle dataRef;
- 	OSType dataHandlerSubType;
- 	Handle anchorDataRef;
- 	OSType anchorDataRefType;
- 	TimeBase tb;
- 	long flags;
- 	ComponentInstance dh;
- #ifndef OpenADataHandler
- 	PyMac_PRECHECK(OpenADataHandler);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&O&O&O&O&l",
- 	                      ResObj_Convert, &dataRef,
- 	                      PyMac_GetOSType, &dataHandlerSubType,
- 	                      ResObj_Convert, &anchorDataRef,
- 	                      PyMac_GetOSType, &anchorDataRefType,
- 	                      TimeBaseObj_Convert, &tb,
- 	                      &flags))
- 		return NULL;
- 	_err = OpenADataHandler(dataRef,
- 	                        dataHandlerSubType,
- 	                        anchorDataRef,
- 	                        anchorDataRefType,
- 	                        tb,
- 	                        flags,
- 	                        &dh);
- 	if (_err != noErr) return PyMac_Error(_err);
- 	_res = Py_BuildValue("O&",
- 	                     CmpInstObj_New, dh);
- 	return _res;
- }
- #endif
- 
  static PyObject *Qt_PasteHandleIntoMovie(PyObject *_self, PyObject *_args)
  {
--- 7029,7032 ----
***************
*** 8847,8879 ****
  }
  
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_SpriteMediaGetIndImageProperty(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	ComponentResult _rv;
- 	MediaHandler mh;
- 	short imageIndex;
- 	long imagePropertyType;
- 	void * imagePropertyValue;
- #ifndef SpriteMediaGetIndImageProperty
- 	PyMac_PRECHECK(SpriteMediaGetIndImageProperty);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&hls",
- 	                      CmpInstObj_Convert, &mh,
- 	                      &imageIndex,
- 	                      &imagePropertyType,
- 	                      &imagePropertyValue))
- 		return NULL;
- 	_rv = SpriteMediaGetIndImageProperty(mh,
- 	                                     imageIndex,
- 	                                     imagePropertyType,
- 	                                     imagePropertyValue);
- 	_res = Py_BuildValue("l",
- 	                     _rv);
- 	return _res;
- }
- #endif
- 
  static PyObject *Qt_SpriteMediaDisposeSprite(PyObject *_self, PyObject *_args)
  {
--- 8702,8705 ----
***************
*** 9259,9407 ****
  }
  
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_MovieMediaGetCurrentMovieProperty(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	ComponentResult _rv;
- 	MediaHandler mh;
- 	OSType whichProperty;
- 	void * value;
- #ifndef MovieMediaGetCurrentMovieProperty
- 	PyMac_PRECHECK(MovieMediaGetCurrentMovieProperty);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&O&s",
- 	                      CmpInstObj_Convert, &mh,
- 	                      PyMac_GetOSType, &whichProperty,
- 	                      &value))
- 		return NULL;
- 	_rv = MovieMediaGetCurrentMovieProperty(mh,
- 	                                        whichProperty,
- 	                                        value);
- 	_res = Py_BuildValue("l",
- 	                     _rv);
- 	return _res;
- }
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_MovieMediaGetCurrentTrackProperty(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	ComponentResult _rv;
- 	MediaHandler mh;
- 	long trackID;
- 	OSType whichProperty;
- 	void * value;
- #ifndef MovieMediaGetCurrentTrackProperty
- 	PyMac_PRECHECK(MovieMediaGetCurrentTrackProperty);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&lO&s",
- 	                      CmpInstObj_Convert, &mh,
- 	                      &trackID,
- 	                      PyMac_GetOSType, &whichProperty,
- 	                      &value))
- 		return NULL;
- 	_rv = MovieMediaGetCurrentTrackProperty(mh,
- 	                                        trackID,
- 	                                        whichProperty,
- 	                                        value);
- 	_res = Py_BuildValue("l",
- 	                     _rv);
- 	return _res;
- }
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_MovieMediaGetChildMovieDataReference(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	ComponentResult _rv;
- 	MediaHandler mh;
- 	QTAtomID dataRefID;
- 	short dataRefIndex;
- 	OSType dataRefType;
- 	Handle dataRef;
- 	QTAtomID dataRefIDOut;
- 	short dataRefIndexOut;
- #ifndef MovieMediaGetChildMovieDataReference
- 	PyMac_PRECHECK(MovieMediaGetChildMovieDataReference);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&lh",
- 	                      CmpInstObj_Convert, &mh,
- 	                      &dataRefID,
- 	                      &dataRefIndex))
- 		return NULL;
- 	_rv = MovieMediaGetChildMovieDataReference(mh,
- 	                                           dataRefID,
- 	                                           dataRefIndex,
- 	                                           &dataRefType,
- 	                                           &dataRef,
- 	                                           &dataRefIDOut,
- 	                                           &dataRefIndexOut);
- 	_res = Py_BuildValue("lO&O&lh",
- 	                     _rv,
- 	                     PyMac_BuildOSType, dataRefType,
- 	                     ResObj_New, dataRef,
- 	                     dataRefIDOut,
- 	                     dataRefIndexOut);
- 	return _res;
- }
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_MovieMediaSetChildMovieDataReference(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	ComponentResult _rv;
- 	MediaHandler mh;
- 	QTAtomID dataRefID;
- 	OSType dataRefType;
- 	Handle dataRef;
- #ifndef MovieMediaSetChildMovieDataReference
- 	PyMac_PRECHECK(MovieMediaSetChildMovieDataReference);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&lO&O&",
- 	                      CmpInstObj_Convert, &mh,
- 	                      &dataRefID,
- 	                      PyMac_GetOSType, &dataRefType,
- 	                      ResObj_Convert, &dataRef))
- 		return NULL;
- 	_rv = MovieMediaSetChildMovieDataReference(mh,
- 	                                           dataRefID,
- 	                                           dataRefType,
- 	                                           dataRef);
- 	_res = Py_BuildValue("l",
- 	                     _rv);
- 	return _res;
- }
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_MovieMediaLoadChildMovieFromDataReference(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	ComponentResult _rv;
- 	MediaHandler mh;
- 	QTAtomID dataRefID;
- #ifndef MovieMediaLoadChildMovieFromDataReference
- 	PyMac_PRECHECK(MovieMediaLoadChildMovieFromDataReference);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&l",
- 	                      CmpInstObj_Convert, &mh,
- 	                      &dataRefID))
- 		return NULL;
- 	_rv = MovieMediaLoadChildMovieFromDataReference(mh,
- 	                                                dataRefID);
- 	_res = Py_BuildValue("l",
- 	                     _rv);
- 	return _res;
- }
- #endif
- 
  static PyObject *Qt_Media3DGetCurrentGroup(PyObject *_self, PyObject *_args)
  {
--- 9085,9088 ----
***************
*** 9637,9663 ****
  }
  
- #if !TARGET_API_MAC_CARBON
- 
- static PyObject *Qt_Media3DGetViewObject(PyObject *_self, PyObject *_args)
- {
- 	PyObject *_res = NULL;
- 	ComponentResult _rv;
- 	MediaHandler mh;
- 	void * tq3viewObject;
- #ifndef Media3DGetViewObject
- 	PyMac_PRECHECK(Media3DGetViewObject);
- #endif
- 	if (!PyArg_ParseTuple(_args, "O&s",
- 	                      CmpInstObj_Convert, &mh,
- 	                      &tq3viewObject))
- 		return NULL;
- 	_rv = Media3DGetViewObject(mh,
- 	                           tq3viewObject);
- 	_res = Py_BuildValue("l",
- 	                     _rv);
- 	return _res;
- }
- #endif
- 
  static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args)
  {
--- 9318,9321 ----
***************
*** 9835,9843 ****
  
  static PyMethodDef Qt_methods[] = {
- 
- #if !TARGET_API_MAC_CARBON
- 	{"CheckQuickTimeRegistration", (PyCFunction)Qt_CheckQuickTimeRegistration, 1,
- 	 PyDoc_STR("(void * registrationKey, long flags) -> None")},
- #endif
  	{"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
  	 PyDoc_STR("() -> None")},
--- 9493,9496 ----
***************
*** 9856,9864 ****
  	{"GetDataHandler", (PyCFunction)Qt_GetDataHandler, 1,
  	 PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)")},
- 
- #if !TARGET_API_MAC_CARBON
- 	{"OpenADataHandler", (PyCFunction)Qt_OpenADataHandler, 1,
- 	 PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, Handle anchorDataRef, OSType anchorDataRefType, TimeBase tb, long flags) -> (ComponentInstance dh)")},
- #endif
  	{"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
  	 PyDoc_STR("(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None")},
--- 9509,9512 ----
***************
*** 9989,9997 ****
  	{"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
  	 PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)")},
- 
- #if !TARGET_API_MAC_CARBON
- 	{"SpriteMediaGetIndImageProperty", (PyCFunction)Qt_SpriteMediaGetIndImageProperty, 1,
- 	 PyDoc_STR("(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)")},
- #endif
  	{"SpriteMediaDisposeSprite", (PyCFunction)Qt_SpriteMediaDisposeSprite, 1,
  	 PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)")},
--- 9637,9640 ----
***************
*** 10026,10054 ****
  	{"FlashMediaGetSupportedSwfVersion", (PyCFunction)Qt_FlashMediaGetSupportedSwfVersion, 1,
  	 PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 swfVersion)")},
- 
- #if !TARGET_API_MAC_CARBON
- 	{"MovieMediaGetCurrentMovieProperty", (PyCFunction)Qt_MovieMediaGetCurrentMovieProperty, 1,
- 	 PyDoc_STR("(MediaHandler mh, OSType whichProperty, void * value) -> (ComponentResult _rv)")},
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 	{"MovieMediaGetCurrentTrackProperty", (PyCFunction)Qt_MovieMediaGetCurrentTrackProperty, 1,
- 	 PyDoc_STR("(MediaHandler mh, long trackID, OSType whichProperty, void * value) -> (ComponentResult _rv)")},
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 	{"MovieMediaGetChildMovieDataReference", (PyCFunction)Qt_MovieMediaGetChildMovieDataReference, 1,
- 	 PyDoc_STR("(MediaHandler mh, QTAtomID dataRefID, short dataRefIndex) -> (ComponentResult _rv, OSType dataRefType, Handle dataRef, QTAtomID dataRefIDOut, short dataRefIndexOut)")},
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 	{"MovieMediaSetChildMovieDataReference", (PyCFunction)Qt_MovieMediaSetChildMovieDataReference, 1,
- 	 PyDoc_STR("(MediaHandler mh, QTAtomID dataRefID, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)")},
- #endif
- 
- #if !TARGET_API_MAC_CARBON
- 	{"MovieMediaLoadChildMovieFromDataReference", (PyCFunction)Qt_MovieMediaLoadChildMovieFromDataReference, 1,
- 	 PyDoc_STR("(MediaHandler mh, QTAtomID dataRefID) -> (ComponentResult _rv)")},
- #endif
  	{"Media3DGetCurrentGroup", (PyCFunction)Qt_Media3DGetCurrentGroup, 1,
  	 PyDoc_STR("(MediaHandler mh, void * group) -> (ComponentResult _rv)")},
--- 9669,9672 ----
***************
*** 10071,10079 ****
  	{"Media3DGetCameraRange", (PyCFunction)Qt_Media3DGetCameraRange, 1,
  	 PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
- 
- #if !TARGET_API_MAC_CARBON
- 	{"Media3DGetViewObject", (PyCFunction)Qt_Media3DGetViewObject, 1,
- 	 PyDoc_STR("(MediaHandler mh, void * tq3viewObject) -> (ComponentResult _rv)")},
- #endif
  	{"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
  	 PyDoc_STR("() -> (TimeBase _rv)")},
--- 9689,9692 ----

Index: qtscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/qt/qtscan.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** qtscan.py	15 Aug 2002 21:48:15 -0000	1.20
--- qtscan.py	12 Dec 2002 10:31:52 -0000	1.21
***************
*** 63,84 ****
  			"MakeMediaTimeTable", # ditto
  ##			"VideoMediaGetStallCount", # Undefined in CW Pro 3 library
! 			]
  
! 	def makegreylist(self):
! 		return [
! 			('#if !TARGET_API_MAC_CARBON', [
! 				'SpriteMediaGetIndImageProperty',	# XXXX Why isn't this in carbon?
! 				'CheckQuickTimeRegistration',
! 				'SetMovieAnchorDataRef',
! 				'GetMovieAnchorDataRef',
! 				'GetMovieLoadState',
! 				'OpenADataHandler',
! 				'MovieMediaGetCurrentMovieProperty',
! 				'MovieMediaGetCurrentTrackProperty',
! 				'MovieMediaGetChildMovieDataReference',
! 				'MovieMediaSetChildMovieDataReference',
! 				'MovieMediaLoadChildMovieFromDataReference',
! 				'Media3DGetViewObject',
! 			])]
  
  	def makeblacklisttypes(self):
--- 63,81 ----
  			"MakeMediaTimeTable", # ditto
  ##			"VideoMediaGetStallCount", # Undefined in CW Pro 3 library
! 			# OS8 only:
! 			'SpriteMediaGetIndImageProperty',	# XXXX Why isn't this in carbon?
! 			'CheckQuickTimeRegistration',
! 			'SetMovieAnchorDataRef',
! 			'GetMovieAnchorDataRef',
! 			'GetMovieLoadState',
! 			'OpenADataHandler',
! 			'MovieMediaGetCurrentMovieProperty',
! 			'MovieMediaGetCurrentTrackProperty',
! 			'MovieMediaGetChildMovieDataReference',
! 			'MovieMediaSetChildMovieDataReference',
! 			'MovieMediaLoadChildMovieFromDataReference',
! 			'Media3DGetViewObject',
  
! 			]
  
  	def makeblacklisttypes(self):