| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* ========================== Module waste ========================== */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "Python.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-12-18 15:39:38 +00:00
										 |  |  | #ifdef _WIN32
 | 
					
						
							|  |  |  | #include "pywintoolbox.h"
 | 
					
						
							|  |  |  | #else
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | #include "macglue.h"
 | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | #include "pymactoolbox.h"
 | 
					
						
							| 
									
										
										
										
											2001-12-18 15:39:38 +00:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2001-09-05 15:44:37 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Macro to test whether a weak-loaded CFM function exists */ | 
					
						
							|  |  |  | #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
 | 
					
						
							|  |  |  |     	PyErr_SetString(PyExc_NotImplementedError, \ | 
					
						
							|  |  |  |     	"Not available in this shared library/OS version"); \ | 
					
						
							|  |  |  |     	return NULL; \ | 
					
						
							|  |  |  |     }} while(0) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <WASTE.h>
 | 
					
						
							| 
									
										
										
										
											1997-08-27 14:09:25 +00:00
										 |  |  | #include <WEObjectHandlers.h>
 | 
					
						
							| 
									
										
										
										
											1997-09-20 17:40:22 +00:00
										 |  |  | #include <WETabs.h>
 | 
					
						
							| 
									
										
										
										
											2002-11-18 15:26:43 +00:00
										 |  |  | #ifndef PyDoc_STR
 | 
					
						
							|  |  |  | #define PyDoc_STR(x) (x)
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Exported by Qdmodule.c: */ | 
					
						
							|  |  |  | extern PyObject *QdRGB_New(RGBColor *); | 
					
						
							|  |  |  | extern int QdRGB_Convert(PyObject *, RGBColor *); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1997-08-27 14:09:25 +00:00
										 |  |  | /* Exported by AEModule.c: */ | 
					
						
							|  |  |  | extern PyObject *AEDesc_New(AppleEvent *); | 
					
						
							|  |  |  | extern int AEDesc_Convert(PyObject *, AppleEvent *); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | /* Forward declaration */ | 
					
						
							| 
									
										
										
										
											2002-07-17 16:30:39 +00:00
										 |  |  | static PyObject *WEOObj_New(WEObjectReference); | 
					
						
							|  |  |  | static PyObject *ExistingwasteObj_New(WEReference); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  | ** Parse/generate TextStyle records | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | static PyObject * | 
					
						
							|  |  |  | TextStyle_New(TextStylePtr itself) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New, | 
					
						
							|  |  |  | 				&itself->tsColor); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | static int | 
					
						
							| 
									
										
										
										
											2002-12-13 15:02:02 +00:00
										 |  |  | TextStyle_Convert(PyObject *v, TextStylePtr p_itself) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	long font, face, size; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	if( !PyArg_ParseTuple(v, "lllO&", &font, &face, &size, QdRGB_Convert, &p_itself->tsColor) ) | 
					
						
							|  |  |  | 		return 0; | 
					
						
							|  |  |  | 	p_itself->tsFont = (short)font; | 
					
						
							|  |  |  | 	p_itself->tsFace = (Style)face; | 
					
						
							|  |  |  | 	p_itself->tsSize = (short)size; | 
					
						
							|  |  |  | 	return 1; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  | ** Parse/generate RunInfo records | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | static PyObject * | 
					
						
							|  |  |  | RunInfo_New(WERunInfo *itself) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	return Py_BuildValue("llhhO&O&", itself->runStart, itself->runEnd, itself->runHeight, | 
					
						
							|  |  |  | 		itself->runAscent, TextStyle_New, &itself->runStyle, WEOObj_New, itself->runObject); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Conversion of long points and rects */ | 
					
						
							|  |  |  | int | 
					
						
							|  |  |  | LongRect_Convert(PyObject *v, LongRect *r) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	return PyArg_Parse(v, "(llll)", &r->left, &r->top, &r->right, &r->bottom); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyObject * | 
					
						
							|  |  |  | LongRect_New(LongRect *r) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	return Py_BuildValue("(llll)", r->left, r->top, r->right, r->bottom); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | int | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | LongPt_Convert(PyObject *v, LongPt *p) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	return PyArg_Parse(v, "(ll)", &p->h, &p->v); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyObject * | 
					
						
							|  |  |  | LongPt_New(LongPt *p) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	return Py_BuildValue("(ll)", p->h, p->v); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | /* Stuff for the callbacks: */ | 
					
						
							|  |  |  | static PyObject *callbackdict; | 
					
						
							| 
									
										
										
										
											1996-05-20 11:30:45 +00:00
										 |  |  | WENewObjectUPP upp_new_handler; | 
					
						
							|  |  |  | WEDisposeObjectUPP upp_dispose_handler; | 
					
						
							|  |  |  | WEDrawObjectUPP upp_draw_handler; | 
					
						
							|  |  |  | WEClickObjectUPP upp_click_handler; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | static OSErr | 
					
						
							|  |  |  | any_handler(WESelector what, WEObjectReference who, PyObject *args, PyObject **rv) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	FlavorType tp; | 
					
						
							|  |  |  | 	PyObject *key, *func; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	if ( args == NULL ) return errAECorruptData; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	tp = WEGetObjectType(who); | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	if( (key=Py_BuildValue("O&O&", PyMac_BuildOSType, tp, PyMac_BuildOSType, what)) == NULL) | 
					
						
							|  |  |  | 		return errAECorruptData; | 
					
						
							|  |  |  | 	if( (func = PyDict_GetItem(callbackdict, key)) == NULL ) { | 
					
						
							|  |  |  | 		Py_DECREF(key); | 
					
						
							|  |  |  | 		return errAEHandlerNotFound; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	Py_INCREF(func); | 
					
						
							|  |  |  | 	*rv = PyEval_CallObject(func, args); | 
					
						
							|  |  |  | 	Py_DECREF(func); | 
					
						
							|  |  |  | 	Py_DECREF(key); | 
					
						
							|  |  |  | 	if ( *rv == NULL ) { | 
					
						
							| 
									
										
										
										
											1998-10-12 20:53:15 +00:00
										 |  |  | 		PySys_WriteStderr("--Exception in callback: "); | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 		PyErr_Print(); | 
					
						
							|  |  |  | 		return errAEReplyNotArrived; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return 0; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static pascal OSErr | 
					
						
							|  |  |  | my_new_handler(Point *objectSize, WEObjectReference objref) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *args=NULL, *rv=NULL; | 
					
						
							|  |  |  | 	OSErr err; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	args=Py_BuildValue("(O&)", WEOObj_New, objref); | 
					
						
							|  |  |  | 	err = any_handler(weNewHandler, objref, args, &rv); | 
					
						
							|  |  |  | 	if (!err) { | 
					
						
							|  |  |  | 		if (!PyMac_GetPoint(rv, objectSize) ) | 
					
						
							|  |  |  | 			err = errAECoercionFail; | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	if ( args ) { | 
					
						
							|  |  |  | 		Py_DECREF(args); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	if ( rv ) { | 
					
						
							|  |  |  | 		Py_DECREF(rv); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	return err; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static pascal OSErr | 
					
						
							|  |  |  | my_dispose_handler(WEObjectReference objref) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *args=NULL, *rv=NULL; | 
					
						
							|  |  |  | 	OSErr err; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	args=Py_BuildValue("(O&)", WEOObj_New, objref); | 
					
						
							|  |  |  | 	err = any_handler(weDisposeHandler, objref, args, &rv); | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	if ( args ) { | 
					
						
							|  |  |  | 		Py_DECREF(args); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	if ( rv ) { | 
					
						
							|  |  |  | 		Py_DECREF(rv); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	return err; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static pascal OSErr | 
					
						
							| 
									
										
										
										
											2001-06-20 21:21:07 +00:00
										 |  |  | my_draw_handler(const Rect *destRect, WEObjectReference objref) | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *args=NULL, *rv=NULL; | 
					
						
							|  |  |  | 	OSErr err; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	args=Py_BuildValue("O&O&", PyMac_BuildRect, destRect, WEOObj_New, objref); | 
					
						
							|  |  |  | 	err = any_handler(weDrawHandler, objref, args, &rv); | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	if ( args ) { | 
					
						
							|  |  |  | 		Py_DECREF(args); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	if ( rv ) { | 
					
						
							|  |  |  | 		Py_DECREF(rv); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	return err; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static pascal Boolean | 
					
						
							|  |  |  | my_click_handler(Point hitPt, EventModifiers modifiers, | 
					
						
							|  |  |  | 		unsigned long clickTime, WEObjectReference objref) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *args=NULL, *rv=NULL; | 
					
						
							|  |  |  | 	int retvalue; | 
					
						
							|  |  |  | 	OSErr err; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	args=Py_BuildValue("O&llO&", PyMac_BuildPoint, hitPt, | 
					
						
							|  |  |  | 			(long)modifiers, (long)clickTime, WEOObj_New, objref); | 
					
						
							|  |  |  | 	err = any_handler(weClickHandler, objref, args, &rv); | 
					
						
							|  |  |  | 	if (!err) | 
					
						
							|  |  |  | 		retvalue = PyInt_AsLong(rv); | 
					
						
							|  |  |  | 	else | 
					
						
							|  |  |  | 		retvalue = 0; | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	if ( args ) { | 
					
						
							|  |  |  | 		Py_DECREF(args); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	if ( rv ) { | 
					
						
							|  |  |  | 		Py_DECREF(rv); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	return retvalue; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | static PyObject *waste_Error; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* ------------------------ Object type WEO ------------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyTypeObject WEO_Type; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-12-19 21:24:35 +00:00
										 |  |  | #define WEOObj_Check(x) ((x)->ob_type == &WEO_Type || PyObject_TypeCheck((x), &WEO_Type))
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | typedef struct WEOObject { | 
					
						
							|  |  |  | 	PyObject_HEAD | 
					
						
							|  |  |  | 	WEObjectReference ob_itself; | 
					
						
							|  |  |  | } WEOObject; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | PyObject *WEOObj_New(WEObjectReference itself) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	WEOObject *it; | 
					
						
							|  |  |  | 	if (itself == NULL) { | 
					
						
							|  |  |  | 						Py_INCREF(Py_None); | 
					
						
							|  |  |  | 						return Py_None; | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 	it = PyObject_NEW(WEOObject, &WEO_Type); | 
					
						
							|  |  |  | 	if (it == NULL) return NULL; | 
					
						
							|  |  |  | 	it->ob_itself = itself; | 
					
						
							|  |  |  | 	return (PyObject *)it; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2001-09-05 15:44:37 +00:00
										 |  |  | int WEOObj_Convert(PyObject *v, WEObjectReference *p_itself) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	if (!WEOObj_Check(v)) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		PyErr_SetString(PyExc_TypeError, "WEO required"); | 
					
						
							|  |  |  | 		return 0; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	*p_itself = ((WEOObject *)v)->ob_itself; | 
					
						
							|  |  |  | 	return 1; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static void WEOObj_dealloc(WEOObject *self) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	/* Cleanup of self->ob_itself goes here */ | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	self->ob_type->tp_free((PyObject *)self); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *WEOObj_WEGetObjectType(WEOObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	FlavorType _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetObjectType(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     PyMac_BuildOSType, _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *WEOObj_WEGetObjectDataHandle(WEOObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Handle _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetObjectDataHandle(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     ResObj_New, _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *WEOObj_WEGetObjectOwner(WEOObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	WEReference _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetObjectOwner(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     ExistingwasteObj_New, _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *WEOObj_WEGetObjectOffset(WEOObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	SInt32 _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetObjectOffset(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *WEOObj_WEGetObjectSize(WEOObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Point _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetObjectSize(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     PyMac_BuildPoint, _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *WEOObj_WESetObjectSize(WEOObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	Point inObjectSize; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							|  |  |  | 	                      PyMac_GetPoint, &inObjectSize)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WESetObjectSize(_self->ob_itself, | 
					
						
							|  |  |  | 	                       inObjectSize); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *WEOObj_WEGetObjectFrame(WEOObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	LongRect outObjectFrame; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEGetObjectFrame(_self->ob_itself, | 
					
						
							|  |  |  | 	                        &outObjectFrame); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongRect_New, &outObjectFrame); | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *WEOObj_WEGetObjectRefCon(WEOObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetObjectRefCon(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *WEOObj_WESetObjectRefCon(WEOObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inRefCon; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inRefCon)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WESetObjectRefCon(_self->ob_itself, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                  inRefCon); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyMethodDef WEOObj_methods[] = { | 
					
						
							|  |  |  | 	{"WEGetObjectType", (PyCFunction)WEOObj_WEGetObjectType, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (FlavorType _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetObjectDataHandle", (PyCFunction)WEOObj_WEGetObjectDataHandle, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (Handle _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	{"WEGetObjectOwner", (PyCFunction)WEOObj_WEGetObjectOwner, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (WEReference _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetObjectOffset", (PyCFunction)WEOObj_WEGetObjectOffset, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetObjectSize", (PyCFunction)WEOObj_WEGetObjectSize, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (Point _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WESetObjectSize", (PyCFunction)WEOObj_WESetObjectSize, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Point inObjectSize) -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetObjectFrame", (PyCFunction)WEOObj_WEGetObjectFrame, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (LongRect outObjectFrame)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetObjectRefCon", (PyCFunction)WEOObj_WEGetObjectRefCon, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESetObjectRefCon", (PyCFunction)WEOObj_WESetObjectRefCon, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inRefCon) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{NULL, NULL, 0} | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | #define WEOObj_getsetlist NULL
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | #define WEOObj_compare NULL
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define WEOObj_repr NULL
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define WEOObj_hash NULL
 | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | #define WEOObj_tp_init 0
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define WEOObj_tp_alloc PyType_GenericAlloc
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *WEOObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *self; | 
					
						
							|  |  |  | 	WEObjectReference itself; | 
					
						
							|  |  |  | 	char *kw[] = {"itself", 0}; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, WEOObj_Convert, &itself)) return NULL; | 
					
						
							|  |  |  | 	if ((self = type->tp_alloc(type, 0)) == NULL) return NULL; | 
					
						
							|  |  |  | 	((WEOObject *)self)->ob_itself = itself; | 
					
						
							|  |  |  | 	return self; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define WEOObj_tp_free PyObject_Del
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | PyTypeObject WEO_Type = { | 
					
						
							| 
									
										
										
										
											2001-11-30 14:16:36 +00:00
										 |  |  | 	PyObject_HEAD_INIT(NULL) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	0, /*ob_size*/ | 
					
						
							| 
									
										
										
										
											2001-12-08 18:02:58 +00:00
										 |  |  | 	"waste.WEO", /*tp_name*/ | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	sizeof(WEOObject), /*tp_basicsize*/ | 
					
						
							|  |  |  | 	0, /*tp_itemsize*/ | 
					
						
							|  |  |  | 	/* methods */ | 
					
						
							|  |  |  | 	(destructor) WEOObj_dealloc, /*tp_dealloc*/ | 
					
						
							|  |  |  | 	0, /*tp_print*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	(getattrfunc)0, /*tp_getattr*/ | 
					
						
							|  |  |  | 	(setattrfunc)0, /*tp_setattr*/ | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | 	(cmpfunc) WEOObj_compare, /*tp_compare*/ | 
					
						
							|  |  |  | 	(reprfunc) WEOObj_repr, /*tp_repr*/ | 
					
						
							|  |  |  | 	(PyNumberMethods *)0, /* tp_as_number */ | 
					
						
							|  |  |  | 	(PySequenceMethods *)0, /* tp_as_sequence */ | 
					
						
							|  |  |  | 	(PyMappingMethods *)0, /* tp_as_mapping */ | 
					
						
							|  |  |  | 	(hashfunc) WEOObj_hash, /*tp_hash*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	0, /*tp_call*/ | 
					
						
							|  |  |  | 	0, /*tp_str*/ | 
					
						
							|  |  |  | 	PyObject_GenericGetAttr, /*tp_getattro*/ | 
					
						
							|  |  |  | 	PyObject_GenericSetAttr, /*tp_setattro */ | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	0, /*tp_as_buffer*/ | 
					
						
							|  |  |  | 	Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ | 
					
						
							|  |  |  | 	0, /*tp_doc*/ | 
					
						
							|  |  |  | 	0, /*tp_traverse*/ | 
					
						
							|  |  |  | 	0, /*tp_clear*/ | 
					
						
							|  |  |  | 	0, /*tp_richcompare*/ | 
					
						
							|  |  |  | 	0, /*tp_weaklistoffset*/ | 
					
						
							|  |  |  | 	0, /*tp_iter*/ | 
					
						
							|  |  |  | 	0, /*tp_iternext*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	WEOObj_methods, /* tp_methods */ | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	0, /*tp_members*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	WEOObj_getsetlist, /*tp_getset*/ | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	0, /*tp_base*/ | 
					
						
							|  |  |  | 	0, /*tp_dict*/ | 
					
						
							|  |  |  | 	0, /*tp_descr_get*/ | 
					
						
							|  |  |  | 	0, /*tp_descr_set*/ | 
					
						
							|  |  |  | 	0, /*tp_dictoffset*/ | 
					
						
							|  |  |  | 	WEOObj_tp_init, /* tp_init */ | 
					
						
							|  |  |  | 	WEOObj_tp_alloc, /* tp_alloc */ | 
					
						
							|  |  |  | 	WEOObj_tp_new, /* tp_new */ | 
					
						
							|  |  |  | 	WEOObj_tp_free, /* tp_free */ | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* ---------------------- End object type WEO ----------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* ----------------------- Object type waste ------------------------ */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyTypeObject waste_Type; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-12-19 21:24:35 +00:00
										 |  |  | #define wasteObj_Check(x) ((x)->ob_type == &waste_Type || PyObject_TypeCheck((x), &waste_Type))
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | typedef struct wasteObject { | 
					
						
							|  |  |  | 	PyObject_HEAD | 
					
						
							|  |  |  | 	WEReference ob_itself; | 
					
						
							|  |  |  | } wasteObject; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | PyObject *wasteObj_New(WEReference itself) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	wasteObject *it; | 
					
						
							|  |  |  | 	if (itself == NULL) { | 
					
						
							|  |  |  | 						PyErr_SetString(waste_Error,"Cannot create null WE"); | 
					
						
							|  |  |  | 						return NULL; | 
					
						
							|  |  |  | 					} | 
					
						
							|  |  |  | 	it = PyObject_NEW(wasteObject, &waste_Type); | 
					
						
							|  |  |  | 	if (it == NULL) return NULL; | 
					
						
							|  |  |  | 	it->ob_itself = itself; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	WESetInfo(weRefCon, (void *)&it, itself); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return (PyObject *)it; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2001-09-05 15:44:37 +00:00
										 |  |  | int wasteObj_Convert(PyObject *v, WEReference *p_itself) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	if (!wasteObj_Check(v)) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		PyErr_SetString(PyExc_TypeError, "waste required"); | 
					
						
							|  |  |  | 		return 0; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	*p_itself = ((wasteObject *)v)->ob_itself; | 
					
						
							|  |  |  | 	return 1; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static void wasteObj_dealloc(wasteObject *self) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	WEDispose(self->ob_itself); | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	self->ob_type->tp_free((PyObject *)self); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetText(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Handle _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetText(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     ResObj_New, _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetChar(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt16 _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEGetChar(inOffset, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("h", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetTextLength(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetTextLength(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetSelection(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 outSelStart; | 
					
						
							|  |  |  | 	SInt32 outSelEnd; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetSelection(&outSelStart, | 
					
						
							|  |  |  | 	               &outSelEnd, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	               _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outSelStart, | 
					
						
							|  |  |  | 	                     outSelEnd); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetDestRect(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongRect outDestRect; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetDestRect(&outDestRect, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	              _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongRect_New, &outDestRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetViewRect(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongRect outViewRect; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetViewRect(&outViewRect, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	              _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongRect_New, &outViewRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEIsActive(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEIsActive(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("b", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEGetClickCount(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	UInt16 _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEGetClickCount(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("H", | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WESetSelection(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inSelStart; | 
					
						
							|  |  |  | 	SInt32 inSelEnd; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "ll", | 
					
						
							|  |  |  | 	                      &inSelStart, | 
					
						
							|  |  |  | 	                      &inSelEnd)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WESetSelection(inSelStart, | 
					
						
							|  |  |  | 	               inSelEnd, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	               _self->ob_itself); | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WESetDestRect(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	LongRect inDestRect; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							|  |  |  | 	                      LongRect_Convert, &inDestRect)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WESetDestRect(&inDestRect, | 
					
						
							|  |  |  | 	              _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WESetViewRect(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	LongRect inViewRect; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							|  |  |  | 	                      LongRect_Convert, &inViewRect)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WESetViewRect(&inViewRect, | 
					
						
							|  |  |  | 	              _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEContinuousStyle(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							|  |  |  | 	WEStyleMode ioMode; | 
					
						
							|  |  |  | 	TextStyle outTextStyle; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "H", | 
					
						
							|  |  |  | 	                      &ioMode)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEContinuousStyle(&ioMode, | 
					
						
							|  |  |  | 	                        &outTextStyle, | 
					
						
							|  |  |  | 	                        _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("bHO&", | 
					
						
							|  |  |  | 	                     _rv, | 
					
						
							|  |  |  | 	                     ioMode, | 
					
						
							|  |  |  | 	                     TextStyle_New, &outTextStyle); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WECountRuns(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	SInt32 _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WECountRuns(_self->ob_itself); | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEOffsetToRun(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	SInt32 _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEOffsetToRun(inOffset, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	                    _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetRunRange(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inStyleRunIndex; | 
					
						
							|  |  |  | 	SInt32 outStyleRunStart; | 
					
						
							|  |  |  | 	SInt32 outStyleRunEnd; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inStyleRunIndex)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetRunRange(inStyleRunIndex, | 
					
						
							|  |  |  | 	              &outStyleRunStart, | 
					
						
							|  |  |  | 	              &outStyleRunEnd, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	              _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outStyleRunStart, | 
					
						
							|  |  |  | 	                     outStyleRunEnd); | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEGetRunInfo(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	WERunInfo outStyleRunInfo; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetRunInfo(inOffset, | 
					
						
							|  |  |  | 	             &outStyleRunInfo, | 
					
						
							|  |  |  | 	             _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     RunInfo_New, &outStyleRunInfo); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEGetIndRunInfo(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	SInt32 inStyleRunIndex; | 
					
						
							|  |  |  | 	WERunInfo outStyleRunInfo; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inStyleRunIndex)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WEGetIndRunInfo(inStyleRunIndex, | 
					
						
							|  |  |  | 	                &outStyleRunInfo, | 
					
						
							|  |  |  | 	                _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     RunInfo_New, &outStyleRunInfo); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEGetRunDirection(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							|  |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inOffset)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetRunDirection(inOffset, | 
					
						
							|  |  |  | 	                        _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("b", | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WECountParaRuns(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WECountParaRuns(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEOffsetToParaRun(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							|  |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEOffsetToParaRun(inOffset, | 
					
						
							|  |  |  | 	                        _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEGetParaRunRange(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inParagraphRunIndex; | 
					
						
							|  |  |  | 	SInt32 outParagraphRunStart; | 
					
						
							|  |  |  | 	SInt32 outParagraphRunEnd; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inParagraphRunIndex)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetParaRunRange(inParagraphRunIndex, | 
					
						
							|  |  |  | 	                  &outParagraphRunStart, | 
					
						
							|  |  |  | 	                  &outParagraphRunEnd, | 
					
						
							|  |  |  | 	                  _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							|  |  |  | 	                     outParagraphRunStart, | 
					
						
							|  |  |  | 	                     outParagraphRunEnd); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WECountLines(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WECountLines(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEOffsetToLine(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							|  |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEOffsetToLine(inOffset, | 
					
						
							|  |  |  | 	                     _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEGetLineRange(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inLineIndex; | 
					
						
							|  |  |  | 	SInt32 outLineStart; | 
					
						
							|  |  |  | 	SInt32 outLineEnd; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inLineIndex)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetLineRange(inLineIndex, | 
					
						
							|  |  |  | 	               &outLineStart, | 
					
						
							|  |  |  | 	               &outLineEnd, | 
					
						
							|  |  |  | 	               _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							|  |  |  | 	                     outLineStart, | 
					
						
							|  |  |  | 	                     outLineEnd); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEGetHeight(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							|  |  |  | 	SInt32 inStartLineIndex; | 
					
						
							|  |  |  | 	SInt32 inEndLineIndex; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "ll", | 
					
						
							|  |  |  | 	                      &inStartLineIndex, | 
					
						
							|  |  |  | 	                      &inEndLineIndex)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEGetHeight(inStartLineIndex, | 
					
						
							|  |  |  | 	                  inEndLineIndex, | 
					
						
							|  |  |  | 	                  _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetOffset(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongPt inPoint; | 
					
						
							|  |  |  | 	WEEdge outEdge; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      LongPt_Convert, &inPoint)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEGetOffset(&inPoint, | 
					
						
							|  |  |  | 	                  &outEdge, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                  _self->ob_itself); | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 	_res = Py_BuildValue("lB", | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                     _rv, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outEdge); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetPoint(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	SInt16 inDirection; | 
					
						
							|  |  |  | 	LongPt outPoint; | 
					
						
							|  |  |  | 	SInt16 outLineHeight; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "lh", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset, | 
					
						
							|  |  |  | 	                      &inDirection)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEGetPoint(inOffset, | 
					
						
							|  |  |  | 	           inDirection, | 
					
						
							|  |  |  | 	           &outPoint, | 
					
						
							|  |  |  | 	           &outLineHeight, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	           _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&h", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongPt_New, &outPoint, | 
					
						
							|  |  |  | 	                     outLineHeight); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEFindWord(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	WEEdge inEdge; | 
					
						
							|  |  |  | 	SInt32 outWordStart; | 
					
						
							|  |  |  | 	SInt32 outWordEnd; | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "lB", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset, | 
					
						
							|  |  |  | 	                      &inEdge)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEFindWord(inOffset, | 
					
						
							|  |  |  | 	           inEdge, | 
					
						
							|  |  |  | 	           &outWordStart, | 
					
						
							|  |  |  | 	           &outWordEnd, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	           _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outWordStart, | 
					
						
							|  |  |  | 	                     outWordEnd); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEFindLine(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	WEEdge inEdge; | 
					
						
							|  |  |  | 	SInt32 outLineStart; | 
					
						
							|  |  |  | 	SInt32 outLineEnd; | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "lB", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset, | 
					
						
							|  |  |  | 	                      &inEdge)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEFindLine(inOffset, | 
					
						
							|  |  |  | 	           inEdge, | 
					
						
							|  |  |  | 	           &outLineStart, | 
					
						
							|  |  |  | 	           &outLineEnd, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	           _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outLineStart, | 
					
						
							|  |  |  | 	                     outLineEnd); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEFindParagraph(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	WEEdge inEdge; | 
					
						
							|  |  |  | 	SInt32 outParagraphStart; | 
					
						
							|  |  |  | 	SInt32 outParagraphEnd; | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "lB", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset, | 
					
						
							|  |  |  | 	                      &inEdge)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEFindParagraph(inOffset, | 
					
						
							|  |  |  | 	                inEdge, | 
					
						
							|  |  |  | 	                &outParagraphStart, | 
					
						
							|  |  |  | 	                &outParagraphEnd, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	                _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outParagraphStart, | 
					
						
							|  |  |  | 	                     outParagraphEnd); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEFind(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	char* inKey; | 
					
						
							|  |  |  | 	SInt32 inKeyLength; | 
					
						
							|  |  |  | 	TextEncoding inKeyEncoding; | 
					
						
							|  |  |  | 	OptionBits inMatchOptions; | 
					
						
							|  |  |  | 	SInt32 inRangeStart; | 
					
						
							|  |  |  | 	SInt32 inRangeEnd; | 
					
						
							|  |  |  | 	SInt32 outMatchStart; | 
					
						
							|  |  |  | 	SInt32 outMatchEnd; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "slllll", | 
					
						
							|  |  |  | 	                      &inKey, | 
					
						
							|  |  |  | 	                      &inKeyLength, | 
					
						
							|  |  |  | 	                      &inKeyEncoding, | 
					
						
							|  |  |  | 	                      &inMatchOptions, | 
					
						
							|  |  |  | 	                      &inRangeStart, | 
					
						
							|  |  |  | 	                      &inRangeEnd)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEFind(inKey, | 
					
						
							|  |  |  | 	              inKeyLength, | 
					
						
							|  |  |  | 	              inKeyEncoding, | 
					
						
							|  |  |  | 	              inMatchOptions, | 
					
						
							|  |  |  | 	              inRangeStart, | 
					
						
							|  |  |  | 	              inRangeEnd, | 
					
						
							|  |  |  | 	              &outMatchStart, | 
					
						
							|  |  |  | 	              &outMatchEnd, | 
					
						
							|  |  |  | 	              _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("ll", | 
					
						
							|  |  |  | 	                     outMatchStart, | 
					
						
							|  |  |  | 	                     outMatchEnd); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEStreamRange(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	SInt32 inRangeStart; | 
					
						
							|  |  |  | 	SInt32 inRangeEnd; | 
					
						
							|  |  |  | 	FlavorType inRequestedType; | 
					
						
							|  |  |  | 	OptionBits inStreamOptions; | 
					
						
							|  |  |  | 	Handle outData; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "llO&lO&", | 
					
						
							|  |  |  | 	                      &inRangeStart, | 
					
						
							|  |  |  | 	                      &inRangeEnd, | 
					
						
							|  |  |  | 	                      PyMac_GetOSType, &inRequestedType, | 
					
						
							|  |  |  | 	                      &inStreamOptions, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &outData)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEStreamRange(inRangeStart, | 
					
						
							|  |  |  | 	                     inRangeEnd, | 
					
						
							|  |  |  | 	                     inRequestedType, | 
					
						
							|  |  |  | 	                     inStreamOptions, | 
					
						
							|  |  |  | 	                     outData, | 
					
						
							|  |  |  | 	                     _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WECopyRange(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inRangeStart; | 
					
						
							|  |  |  | 	SInt32 inRangeEnd; | 
					
						
							|  |  |  | 	Handle outText; | 
					
						
							|  |  |  | 	StScrpHandle outStyles; | 
					
						
							|  |  |  | 	WESoupHandle outSoup; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "llO&O&O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inRangeStart, | 
					
						
							|  |  |  | 	                      &inRangeEnd, | 
					
						
							|  |  |  | 	                      OptResObj_Convert, &outText, | 
					
						
							|  |  |  | 	                      OptResObj_Convert, &outStyles, | 
					
						
							|  |  |  | 	                      OptResObj_Convert, &outSoup)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WECopyRange(inRangeStart, | 
					
						
							|  |  |  | 	                   inRangeEnd, | 
					
						
							|  |  |  | 	                   outText, | 
					
						
							|  |  |  | 	                   outStyles, | 
					
						
							|  |  |  | 	                   outSoup, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                   _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEGetTextRangeAsUnicode(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	SInt32 inRangeStart; | 
					
						
							|  |  |  | 	SInt32 inRangeEnd; | 
					
						
							|  |  |  | 	Handle outUnicodeText; | 
					
						
							|  |  |  | 	Handle ioCharFormat; | 
					
						
							|  |  |  | 	Handle ioParaFormat; | 
					
						
							|  |  |  | 	TextEncodingVariant inUnicodeVariant; | 
					
						
							|  |  |  | 	TextEncodingFormat inTransformationFormat; | 
					
						
							|  |  |  | 	OptionBits inGetOptions; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "llO&O&O&lll", | 
					
						
							|  |  |  | 	                      &inRangeStart, | 
					
						
							|  |  |  | 	                      &inRangeEnd, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &outUnicodeText, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &ioCharFormat, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &ioParaFormat, | 
					
						
							|  |  |  | 	                      &inUnicodeVariant, | 
					
						
							|  |  |  | 	                      &inTransformationFormat, | 
					
						
							|  |  |  | 	                      &inGetOptions)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEGetTextRangeAsUnicode(inRangeStart, | 
					
						
							|  |  |  | 	                               inRangeEnd, | 
					
						
							|  |  |  | 	                               outUnicodeText, | 
					
						
							|  |  |  | 	                               ioCharFormat, | 
					
						
							|  |  |  | 	                               ioParaFormat, | 
					
						
							|  |  |  | 	                               inUnicodeVariant, | 
					
						
							|  |  |  | 	                               inTransformationFormat, | 
					
						
							|  |  |  | 	                               inGetOptions, | 
					
						
							|  |  |  | 	                               _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetAlignment(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	WEAlignment _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetAlignment(_self->ob_itself); | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 	_res = Py_BuildValue("B", | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WESetAlignment(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEAlignment inAlignment; | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "B", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inAlignment)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WESetAlignment(inAlignment, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	               _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetDirection(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	WEDirection _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetDirection(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("h", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WESetDirection(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEDirection inDirection; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "h", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inDirection)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WESetDirection(inDirection, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	               _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WECalText(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WECalText(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEUpdate(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	RgnHandle inUpdateRgn; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      ResObj_Convert, &inUpdateRgn)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEUpdate(inUpdateRgn, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	         _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEScroll(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inHorizontalOffset; | 
					
						
							|  |  |  | 	SInt32 inVerticalOffset; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inHorizontalOffset, | 
					
						
							|  |  |  | 	                      &inVerticalOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEScroll(inHorizontalOffset, | 
					
						
							|  |  |  | 	         inVerticalOffset, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	         _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEPinScroll(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	SInt32 inHorizontalOffset; | 
					
						
							|  |  |  | 	SInt32 inVerticalOffset; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "ll", | 
					
						
							|  |  |  | 	                      &inHorizontalOffset, | 
					
						
							|  |  |  | 	                      &inVerticalOffset)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WEPinScroll(inHorizontalOffset, | 
					
						
							|  |  |  | 	            inVerticalOffset, | 
					
						
							|  |  |  | 	            _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WESelView(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WESelView(_self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEActivate(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WEActivate(_self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEDeactivate(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WEDeactivate(_self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEKey(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	CharParameter inKey; | 
					
						
							|  |  |  | 	EventModifiers inModifiers; | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "hH", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inKey, | 
					
						
							|  |  |  | 	                      &inModifiers)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEKey(inKey, | 
					
						
							|  |  |  | 	      inModifiers, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	      _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEClick(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	Point inHitPoint; | 
					
						
							|  |  |  | 	EventModifiers inModifiers; | 
					
						
							|  |  |  | 	UInt32 inClickTime; | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&Hl", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      PyMac_GetPoint, &inHitPoint, | 
					
						
							|  |  |  | 	                      &inModifiers, | 
					
						
							|  |  |  | 	                      &inClickTime)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEClick(inHitPoint, | 
					
						
							|  |  |  | 	        inModifiers, | 
					
						
							|  |  |  | 	        inClickTime, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	        _self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEAdjustCursor(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	Point inMouseLoc; | 
					
						
							|  |  |  | 	RgnHandle ioMouseRgn; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      PyMac_GetPoint, &inMouseLoc, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &ioMouseRgn)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEAdjustCursor(inMouseLoc, | 
					
						
							|  |  |  | 	                     ioMouseRgn, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                     _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("b", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEIdle(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	UInt32 outMaxSleep; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEIdle(&outMaxSleep, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	       _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outMaxSleep); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEInsert(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	char *inTextPtr__in__; | 
					
						
							|  |  |  | 	long inTextPtr__len__; | 
					
						
							|  |  |  | 	int inTextPtr__in_len__; | 
					
						
							|  |  |  | 	StScrpHandle inStyles; | 
					
						
							|  |  |  | 	WESoupHandle inSoup; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "s#O&O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inTextPtr__in__, &inTextPtr__in_len__, | 
					
						
							|  |  |  | 	                      OptResObj_Convert, &inStyles, | 
					
						
							|  |  |  | 	                      OptResObj_Convert, &inSoup)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	inTextPtr__len__ = inTextPtr__in_len__; | 
					
						
							|  |  |  | 	_err = WEInsert(inTextPtr__in__, inTextPtr__len__, | 
					
						
							|  |  |  | 	                inStyles, | 
					
						
							|  |  |  | 	                inSoup, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEInsertFormattedText(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	char *inTextPtr__in__; | 
					
						
							|  |  |  | 	long inTextPtr__len__; | 
					
						
							|  |  |  | 	int inTextPtr__in_len__; | 
					
						
							|  |  |  | 	StScrpHandle inStyles; | 
					
						
							|  |  |  | 	WESoupHandle inSoup; | 
					
						
							|  |  |  | 	Handle inParaFormat; | 
					
						
							|  |  |  | 	Handle inRulerScrap; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "s#O&O&O&O&", | 
					
						
							|  |  |  | 	                      &inTextPtr__in__, &inTextPtr__in_len__, | 
					
						
							|  |  |  | 	                      OptResObj_Convert, &inStyles, | 
					
						
							|  |  |  | 	                      OptResObj_Convert, &inSoup, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &inParaFormat, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &inRulerScrap)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	inTextPtr__len__ = inTextPtr__in_len__; | 
					
						
							|  |  |  | 	_err = WEInsertFormattedText(inTextPtr__in__, inTextPtr__len__, | 
					
						
							|  |  |  | 	                             inStyles, | 
					
						
							|  |  |  | 	                             inSoup, | 
					
						
							|  |  |  | 	                             inParaFormat, | 
					
						
							|  |  |  | 	                             inRulerScrap, | 
					
						
							|  |  |  | 	                             _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEDelete(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEDelete(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEUseText(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	Handle inText; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							|  |  |  | 	                      ResObj_Convert, &inText)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEUseText(inText, | 
					
						
							|  |  |  | 	                 _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEChangeCase(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	SInt16 inCase; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "h", | 
					
						
							|  |  |  | 	                      &inCase)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEChangeCase(inCase, | 
					
						
							|  |  |  | 	                    _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WESetOneAttribute(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	SInt32 inRangeStart; | 
					
						
							|  |  |  | 	SInt32 inRangeEnd; | 
					
						
							|  |  |  | 	WESelector inAttributeSelector; | 
					
						
							|  |  |  | 	char *inAttributeValue__in__; | 
					
						
							|  |  |  | 	long inAttributeValue__len__; | 
					
						
							|  |  |  | 	int inAttributeValue__in_len__; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "llO&s#", | 
					
						
							|  |  |  | 	                      &inRangeStart, | 
					
						
							|  |  |  | 	                      &inRangeEnd, | 
					
						
							|  |  |  | 	                      PyMac_GetOSType, &inAttributeSelector, | 
					
						
							|  |  |  | 	                      &inAttributeValue__in__, &inAttributeValue__in_len__)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	inAttributeValue__len__ = inAttributeValue__in_len__; | 
					
						
							|  |  |  | 	_err = WESetOneAttribute(inRangeStart, | 
					
						
							|  |  |  | 	                         inRangeEnd, | 
					
						
							|  |  |  | 	                         inAttributeSelector, | 
					
						
							|  |  |  | 	                         inAttributeValue__in__, inAttributeValue__len__, | 
					
						
							|  |  |  | 	                         _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WESetStyle(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEStyleMode inMode; | 
					
						
							|  |  |  | 	TextStyle inTextStyle; | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "HO&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inMode, | 
					
						
							|  |  |  | 	                      TextStyle_Convert, &inTextStyle)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WESetStyle(inMode, | 
					
						
							|  |  |  | 	                  &inTextStyle, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                  _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEUseStyleScrap(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	StScrpHandle inStyles; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      ResObj_Convert, &inStyles)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEUseStyleScrap(inStyles, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                       _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WEUndo(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEUndo(_self->ob_itself); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WERedo(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WERedo(_self->ob_itself); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEClearUndo(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WEClearUndo(_self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetUndoInfo(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	WEActionKind _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	Boolean outRedoFlag; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEGetUndoInfo(&outRedoFlag, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                    _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("hb", | 
					
						
							|  |  |  | 	                     _rv, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outRedoFlag); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEGetIndUndoInfo(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	WEActionKind _rv; | 
					
						
							|  |  |  | 	SInt32 inUndoLevel; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inUndoLevel)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetIndUndoInfo(inUndoLevel, | 
					
						
							|  |  |  | 	                       _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("h", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEIsTyping(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEIsTyping(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("b", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEBeginAction(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEBeginAction(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEEndAction(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEActionKind inActionKind; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "h", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inActionKind)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEEndAction(inActionKind, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	                   _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetModCount(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	UInt32 _rv; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetModCount(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEResetModCount(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WEResetModCount(_self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEInsertObject(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	FlavorType inObjectType; | 
					
						
							|  |  |  | 	Handle inObjectDataHandle; | 
					
						
							|  |  |  | 	Point inObjectSize; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&O&O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      PyMac_GetOSType, &inObjectType, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &inObjectDataHandle, | 
					
						
							|  |  |  | 	                      PyMac_GetPoint, &inObjectSize)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEInsertObject(inObjectType, | 
					
						
							|  |  |  | 	                      inObjectDataHandle, | 
					
						
							|  |  |  | 	                      inObjectSize, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                      _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetSelectedObject(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEObjectReference outObject; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEGetSelectedObject(&outObject, | 
					
						
							|  |  |  | 	                           _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     WEOObj_New, outObject); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_WEGetObjectAtOffset(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	WEObjectReference outObject; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							|  |  |  | 	                      &inOffset)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEGetObjectAtOffset(inOffset, | 
					
						
							|  |  |  | 	                           &outObject, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                           _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     WEOObj_New, outObject); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEFindNextObject(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt32 _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							|  |  |  | 	WEObjectReference outObject; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEFindNextObject(inOffset, | 
					
						
							|  |  |  | 	                       &outObject, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                       _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("lO&", | 
					
						
							|  |  |  | 	                     _rv, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     WEOObj_New, outObject); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEUseSoup(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WESoupHandle inSoup; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      ResObj_Convert, &inSoup)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEUseSoup(inSoup, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                 _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WECut(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WECut(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WECopy(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WECopy(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEPaste(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEPaste(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WECanPaste(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WECanPaste(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("b", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetHiliteRgn(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	RgnHandle _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inRangeStart; | 
					
						
							|  |  |  | 	SInt32 inRangeEnd; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inRangeStart, | 
					
						
							|  |  |  | 	                      &inRangeEnd)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEGetHiliteRgn(inRangeStart, | 
					
						
							|  |  |  | 	                     inRangeEnd, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                     _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							|  |  |  | 	                     ResObj_New, _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WECharByte(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt16 _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WECharByte(inOffset, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                 _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("h", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WECharType(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt16 _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt32 inOffset; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WECharType(inOffset, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                 _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("h", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEStopInlineSession(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WEStopInlineSession(_self->ob_itself); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEFeatureFlag(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	SInt16 _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	SInt16 inFeature; | 
					
						
							|  |  |  | 	SInt16 inAction; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "hh", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inFeature, | 
					
						
							|  |  |  | 	                      &inAction)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WEFeatureFlag(inFeature, | 
					
						
							|  |  |  | 	                    inAction, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	                    _self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("h", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetUserInfo(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WESelector inUserTag; | 
					
						
							|  |  |  | 	SInt32 outUserInfo; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      PyMac_GetOSType, &inUserTag)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEGetUserInfo(inUserTag, | 
					
						
							|  |  |  | 	                     &outUserInfo, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	                     _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     outUserInfo); | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WESetUserInfo(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WESelector inUserTag; | 
					
						
							|  |  |  | 	SInt32 inUserInfo; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      PyMac_GetOSType, &inUserTag, | 
					
						
							|  |  |  | 	                      &inUserInfo)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WESetUserInfo(inUserTag, | 
					
						
							|  |  |  | 	                     inUserInfo, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	                     _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | static PyObject *wasteObj_WERemoveUserInfo(wasteObject *_self, PyObject *_args) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	WESelector inUserTag; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							|  |  |  | 	                      PyMac_GetOSType, &inUserTag)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WERemoveUserInfo(inUserTag, | 
					
						
							|  |  |  | 	                        _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEInstallTabHooks(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-10-23 15:43:46 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEInstallTabHooks(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WERemoveTabHooks(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-10-23 15:43:46 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WERemoveTabHooks(_self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEIsTabHooks(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-10-23 15:43:46 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEIsTabHooks(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("b", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WEGetTabSize(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-03-02 16:56:18 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	SInt16 _rv; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_rv = WEGetTabSize(_self->ob_itself); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("h", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *wasteObj_WESetTabSize(wasteObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-03-02 16:56:18 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	SInt16 tabWidth; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "h", | 
					
						
							|  |  |  | 	                      &tabWidth)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WESetTabSize(tabWidth, | 
					
						
							|  |  |  | 	                    _self->ob_itself); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | static PyMethodDef wasteObj_methods[] = { | 
					
						
							|  |  |  | 	{"WEGetText", (PyCFunction)wasteObj_WEGetText, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (Handle _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetChar", (PyCFunction)wasteObj_WEGetChar, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (SInt16 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetTextLength", (PyCFunction)wasteObj_WEGetTextLength, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetSelection", (PyCFunction)wasteObj_WEGetSelection, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt32 outSelStart, SInt32 outSelEnd)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetDestRect", (PyCFunction)wasteObj_WEGetDestRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (LongRect outDestRect)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetViewRect", (PyCFunction)wasteObj_WEGetViewRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (LongRect outViewRect)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEIsActive", (PyCFunction)wasteObj_WEIsActive, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (Boolean _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-08-06 16:04:22 +00:00
										 |  |  | 	{"WEGetClickCount", (PyCFunction)wasteObj_WEGetClickCount, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (UInt16 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESetSelection", (PyCFunction)wasteObj_WESetSelection, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inSelStart, SInt32 inSelEnd) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESetDestRect", (PyCFunction)wasteObj_WESetDestRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(LongRect inDestRect) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESetViewRect", (PyCFunction)wasteObj_WESetViewRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(LongRect inViewRect) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEContinuousStyle", (PyCFunction)wasteObj_WEContinuousStyle, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WEStyleMode ioMode) -> (Boolean _rv, WEStyleMode ioMode, TextStyle outTextStyle)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WECountRuns", (PyCFunction)wasteObj_WECountRuns, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEOffsetToRun", (PyCFunction)wasteObj_WEOffsetToRun, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetRunRange", (PyCFunction)wasteObj_WEGetRunRange, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inStyleRunIndex) -> (SInt32 outStyleRunStart, SInt32 outStyleRunEnd)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetRunInfo", (PyCFunction)wasteObj_WEGetRunInfo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (WERunInfo outStyleRunInfo)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetIndRunInfo", (PyCFunction)wasteObj_WEGetIndRunInfo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inStyleRunIndex) -> (WERunInfo outStyleRunInfo)")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEGetRunDirection", (PyCFunction)wasteObj_WEGetRunDirection, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (Boolean _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WECountParaRuns", (PyCFunction)wasteObj_WECountParaRuns, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEOffsetToParaRun", (PyCFunction)wasteObj_WEOffsetToParaRun, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetParaRunRange", (PyCFunction)wasteObj_WEGetParaRunRange, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inParagraphRunIndex) -> (SInt32 outParagraphRunStart, SInt32 outParagraphRunEnd)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WECountLines", (PyCFunction)wasteObj_WECountLines, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEOffsetToLine", (PyCFunction)wasteObj_WEOffsetToLine, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetLineRange", (PyCFunction)wasteObj_WEGetLineRange, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inLineIndex) -> (SInt32 outLineStart, SInt32 outLineEnd)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetHeight", (PyCFunction)wasteObj_WEGetHeight, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inStartLineIndex, SInt32 inEndLineIndex) -> (SInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetOffset", (PyCFunction)wasteObj_WEGetOffset, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(LongPt inPoint) -> (SInt32 _rv, WEEdge outEdge)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetPoint", (PyCFunction)wasteObj_WEGetPoint, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset, SInt16 inDirection) -> (LongPt outPoint, SInt16 outLineHeight)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEFindWord", (PyCFunction)wasteObj_WEFindWord, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset, WEEdge inEdge) -> (SInt32 outWordStart, SInt32 outWordEnd)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEFindLine", (PyCFunction)wasteObj_WEFindLine, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset, WEEdge inEdge) -> (SInt32 outLineStart, SInt32 outLineEnd)")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEFindParagraph", (PyCFunction)wasteObj_WEFindParagraph, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset, WEEdge inEdge) -> (SInt32 outParagraphStart, SInt32 outParagraphEnd)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEFind", (PyCFunction)wasteObj_WEFind, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(char* inKey, SInt32 inKeyLength, TextEncoding inKeyEncoding, OptionBits inMatchOptions, SInt32 inRangeStart, SInt32 inRangeEnd) -> (SInt32 outMatchStart, SInt32 outMatchEnd)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEStreamRange", (PyCFunction)wasteObj_WEStreamRange, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inRangeStart, SInt32 inRangeEnd, FlavorType inRequestedType, OptionBits inStreamOptions, Handle outData) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WECopyRange", (PyCFunction)wasteObj_WECopyRange, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inRangeStart, SInt32 inRangeEnd, Handle outText, StScrpHandle outStyles, WESoupHandle outSoup) -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetTextRangeAsUnicode", (PyCFunction)wasteObj_WEGetTextRangeAsUnicode, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inRangeStart, SInt32 inRangeEnd, Handle outUnicodeText, Handle ioCharFormat, Handle ioParaFormat, TextEncodingVariant inUnicodeVariant, TextEncodingFormat inTransformationFormat, OptionBits inGetOptions) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetAlignment", (PyCFunction)wasteObj_WEGetAlignment, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (WEAlignment _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESetAlignment", (PyCFunction)wasteObj_WESetAlignment, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WEAlignment inAlignment) -> None")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEGetDirection", (PyCFunction)wasteObj_WEGetDirection, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (WEDirection _rv)")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WESetDirection", (PyCFunction)wasteObj_WESetDirection, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WEDirection inDirection) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WECalText", (PyCFunction)wasteObj_WECalText, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEUpdate", (PyCFunction)wasteObj_WEUpdate, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(RgnHandle inUpdateRgn) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEScroll", (PyCFunction)wasteObj_WEScroll, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inHorizontalOffset, SInt32 inVerticalOffset) -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEPinScroll", (PyCFunction)wasteObj_WEPinScroll, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inHorizontalOffset, SInt32 inVerticalOffset) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESelView", (PyCFunction)wasteObj_WESelView, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEActivate", (PyCFunction)wasteObj_WEActivate, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEDeactivate", (PyCFunction)wasteObj_WEDeactivate, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEKey", (PyCFunction)wasteObj_WEKey, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(CharParameter inKey, EventModifiers inModifiers) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEClick", (PyCFunction)wasteObj_WEClick, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Point inHitPoint, EventModifiers inModifiers, UInt32 inClickTime) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEAdjustCursor", (PyCFunction)wasteObj_WEAdjustCursor, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Point inMouseLoc, RgnHandle ioMouseRgn) -> (Boolean _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEIdle", (PyCFunction)wasteObj_WEIdle, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (UInt32 outMaxSleep)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEInsert", (PyCFunction)wasteObj_WEInsert, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Buffer inTextPtr, StScrpHandle inStyles, WESoupHandle inSoup) -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEInsertFormattedText", (PyCFunction)wasteObj_WEInsertFormattedText, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Buffer inTextPtr, StScrpHandle inStyles, WESoupHandle inSoup, Handle inParaFormat, Handle inRulerScrap) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEDelete", (PyCFunction)wasteObj_WEDelete, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEUseText", (PyCFunction)wasteObj_WEUseText, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Handle inText) -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEChangeCase", (PyCFunction)wasteObj_WEChangeCase, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt16 inCase) -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WESetOneAttribute", (PyCFunction)wasteObj_WESetOneAttribute, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inRangeStart, SInt32 inRangeEnd, WESelector inAttributeSelector, Buffer inAttributeValue) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESetStyle", (PyCFunction)wasteObj_WESetStyle, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WEStyleMode inMode, TextStyle inTextStyle) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEUseStyleScrap", (PyCFunction)wasteObj_WEUseStyleScrap, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(StScrpHandle inStyles) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEUndo", (PyCFunction)wasteObj_WEUndo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WERedo", (PyCFunction)wasteObj_WERedo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEClearUndo", (PyCFunction)wasteObj_WEClearUndo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetUndoInfo", (PyCFunction)wasteObj_WEGetUndoInfo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (WEActionKind _rv, Boolean outRedoFlag)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetIndUndoInfo", (PyCFunction)wasteObj_WEGetIndUndoInfo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inUndoLevel) -> (WEActionKind _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEIsTyping", (PyCFunction)wasteObj_WEIsTyping, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (Boolean _rv)")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEBeginAction", (PyCFunction)wasteObj_WEBeginAction, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEEndAction", (PyCFunction)wasteObj_WEEndAction, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WEActionKind inActionKind) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetModCount", (PyCFunction)wasteObj_WEGetModCount, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (UInt32 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEResetModCount", (PyCFunction)wasteObj_WEResetModCount, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEInsertObject", (PyCFunction)wasteObj_WEInsertObject, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(FlavorType inObjectType, Handle inObjectDataHandle, Point inObjectSize) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetSelectedObject", (PyCFunction)wasteObj_WEGetSelectedObject, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (WEObjectReference outObject)")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WEGetObjectAtOffset", (PyCFunction)wasteObj_WEGetObjectAtOffset, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (WEObjectReference outObject)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEFindNextObject", (PyCFunction)wasteObj_WEFindNextObject, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (SInt32 _rv, WEObjectReference outObject)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEUseSoup", (PyCFunction)wasteObj_WEUseSoup, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WESoupHandle inSoup) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WECut", (PyCFunction)wasteObj_WECut, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WECopy", (PyCFunction)wasteObj_WECopy, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEPaste", (PyCFunction)wasteObj_WEPaste, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WECanPaste", (PyCFunction)wasteObj_WECanPaste, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (Boolean _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEGetHiliteRgn", (PyCFunction)wasteObj_WEGetHiliteRgn, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inRangeStart, SInt32 inRangeEnd) -> (RgnHandle _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WECharByte", (PyCFunction)wasteObj_WECharByte, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (SInt16 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WECharType", (PyCFunction)wasteObj_WECharType, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inOffset) -> (SInt16 _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEStopInlineSession", (PyCFunction)wasteObj_WEStopInlineSession, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEFeatureFlag", (PyCFunction)wasteObj_WEFeatureFlag, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt16 inFeature, SInt16 inAction) -> (SInt16 _rv)")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEGetUserInfo", (PyCFunction)wasteObj_WEGetUserInfo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WESelector inUserTag) -> (SInt32 outUserInfo)")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WESetUserInfo", (PyCFunction)wasteObj_WESetUserInfo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WESelector inUserTag, SInt32 inUserInfo) -> None")}, | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	{"WERemoveUserInfo", (PyCFunction)wasteObj_WERemoveUserInfo, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(WESelector inUserTag) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-10-23 15:43:46 +00:00
										 |  |  | 	{"WEInstallTabHooks", (PyCFunction)wasteObj_WEInstallTabHooks, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-10-23 15:43:46 +00:00
										 |  |  | 	{"WERemoveTabHooks", (PyCFunction)wasteObj_WERemoveTabHooks, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-10-23 15:43:46 +00:00
										 |  |  | 	{"WEIsTabHooks", (PyCFunction)wasteObj_WEIsTabHooks, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (Boolean _rv)")}, | 
					
						
							| 
									
										
										
										
											1998-03-02 16:56:18 +00:00
										 |  |  | 	{"WEGetTabSize", (PyCFunction)wasteObj_WEGetTabSize, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> (SInt16 _rv)")}, | 
					
						
							| 
									
										
										
										
											1998-03-02 16:56:18 +00:00
										 |  |  | 	{"WESetTabSize", (PyCFunction)wasteObj_WESetTabSize, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt16 tabWidth) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{NULL, NULL, 0} | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | #define wasteObj_getsetlist NULL
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | #define wasteObj_compare NULL
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define wasteObj_repr NULL
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define wasteObj_hash NULL
 | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | #define wasteObj_tp_init 0
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define wasteObj_tp_alloc PyType_GenericAlloc
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static PyObject *wasteObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *self; | 
					
						
							|  |  |  | 	WEReference itself; | 
					
						
							|  |  |  | 	char *kw[] = {"itself", 0}; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, wasteObj_Convert, &itself)) return NULL; | 
					
						
							|  |  |  | 	if ((self = type->tp_alloc(type, 0)) == NULL) return NULL; | 
					
						
							|  |  |  | 	((wasteObject *)self)->ob_itself = itself; | 
					
						
							|  |  |  | 	return self; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define wasteObj_tp_free PyObject_Del
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | PyTypeObject waste_Type = { | 
					
						
							| 
									
										
										
										
											2001-11-30 14:16:36 +00:00
										 |  |  | 	PyObject_HEAD_INIT(NULL) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	0, /*ob_size*/ | 
					
						
							| 
									
										
										
										
											2001-12-08 18:02:58 +00:00
										 |  |  | 	"waste.waste", /*tp_name*/ | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	sizeof(wasteObject), /*tp_basicsize*/ | 
					
						
							|  |  |  | 	0, /*tp_itemsize*/ | 
					
						
							|  |  |  | 	/* methods */ | 
					
						
							|  |  |  | 	(destructor) wasteObj_dealloc, /*tp_dealloc*/ | 
					
						
							|  |  |  | 	0, /*tp_print*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	(getattrfunc)0, /*tp_getattr*/ | 
					
						
							|  |  |  | 	(setattrfunc)0, /*tp_setattr*/ | 
					
						
							| 
									
										
										
										
											2000-07-14 22:16:45 +00:00
										 |  |  | 	(cmpfunc) wasteObj_compare, /*tp_compare*/ | 
					
						
							|  |  |  | 	(reprfunc) wasteObj_repr, /*tp_repr*/ | 
					
						
							|  |  |  | 	(PyNumberMethods *)0, /* tp_as_number */ | 
					
						
							|  |  |  | 	(PySequenceMethods *)0, /* tp_as_sequence */ | 
					
						
							|  |  |  | 	(PyMappingMethods *)0, /* tp_as_mapping */ | 
					
						
							|  |  |  | 	(hashfunc) wasteObj_hash, /*tp_hash*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	0, /*tp_call*/ | 
					
						
							|  |  |  | 	0, /*tp_str*/ | 
					
						
							|  |  |  | 	PyObject_GenericGetAttr, /*tp_getattro*/ | 
					
						
							|  |  |  | 	PyObject_GenericSetAttr, /*tp_setattro */ | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	0, /*tp_as_buffer*/ | 
					
						
							|  |  |  | 	Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */ | 
					
						
							|  |  |  | 	0, /*tp_doc*/ | 
					
						
							|  |  |  | 	0, /*tp_traverse*/ | 
					
						
							|  |  |  | 	0, /*tp_clear*/ | 
					
						
							|  |  |  | 	0, /*tp_richcompare*/ | 
					
						
							|  |  |  | 	0, /*tp_weaklistoffset*/ | 
					
						
							|  |  |  | 	0, /*tp_iter*/ | 
					
						
							|  |  |  | 	0, /*tp_iternext*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	wasteObj_methods, /* tp_methods */ | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	0, /*tp_members*/ | 
					
						
							| 
									
										
										
										
											2002-11-29 23:40:48 +00:00
										 |  |  | 	wasteObj_getsetlist, /*tp_getset*/ | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	0, /*tp_base*/ | 
					
						
							|  |  |  | 	0, /*tp_dict*/ | 
					
						
							|  |  |  | 	0, /*tp_descr_get*/ | 
					
						
							|  |  |  | 	0, /*tp_descr_set*/ | 
					
						
							|  |  |  | 	0, /*tp_dictoffset*/ | 
					
						
							|  |  |  | 	wasteObj_tp_init, /* tp_init */ | 
					
						
							|  |  |  | 	wasteObj_tp_alloc, /* tp_alloc */ | 
					
						
							|  |  |  | 	wasteObj_tp_new, /* tp_new */ | 
					
						
							|  |  |  | 	wasteObj_tp_free, /* tp_free */ | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* --------------------- End object type waste ---------------------- */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WENew(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongRect inDestRect; | 
					
						
							|  |  |  | 	LongRect inViewRect; | 
					
						
							|  |  |  | 	OptionBits inOptions; | 
					
						
							|  |  |  | 	WEReference outWE; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&O&l", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      LongRect_Convert, &inDestRect, | 
					
						
							|  |  |  | 	                      LongRect_Convert, &inViewRect, | 
					
						
							|  |  |  | 	                      &inOptions)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WENew(&inDestRect, | 
					
						
							|  |  |  | 	             &inViewRect, | 
					
						
							|  |  |  | 	             inOptions, | 
					
						
							|  |  |  | 	             &outWE); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     wasteObj_New, outWE); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WEUpdateStyleScrap(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	StScrpHandle ioStyles; | 
					
						
							|  |  |  | 	WEFontTableHandle inFontTable; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      ResObj_Convert, &ioStyles, | 
					
						
							|  |  |  | 	                      ResObj_Convert, &inFontTable)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEUpdateStyleScrap(ioStyles, | 
					
						
							|  |  |  | 	                          inFontTable); | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WEInstallTSMHandlers(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WEInstallTSMHandlers(); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WERemoveTSMHandlers(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							|  |  |  | 	if (!PyArg_ParseTuple(_args, "")) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	_err = WERemoveTSMHandlers(); | 
					
						
							|  |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	Py_INCREF(Py_None); | 
					
						
							|  |  |  | 	_res = Py_None; | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WEHandleTSMEvent(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	OSErr _err; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	AppleEvent inAppleEvent; | 
					
						
							|  |  |  | 	AppleEvent ioReply; | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      AEDesc_Convert, &inAppleEvent)) | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_err = WEHandleTSMEvent(&inAppleEvent, | 
					
						
							|  |  |  | 	                        &ioReply); | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	if (_err != noErr) return PyMac_Error(_err); | 
					
						
							|  |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     AEDesc_New, &ioReply); | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WELongPointToPoint(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongPt inLongPoint; | 
					
						
							|  |  |  | 	Point outPoint; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      LongPt_Convert, &inLongPoint)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WELongPointToPoint(&inLongPoint, | 
					
						
							|  |  |  | 	                   &outPoint); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     PyMac_BuildPoint, outPoint); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WEPointToLongPoint(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	Point inPoint; | 
					
						
							|  |  |  | 	LongPt outLongPoint; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      PyMac_GetPoint, &inPoint)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEPointToLongPoint(inPoint, | 
					
						
							|  |  |  | 	                   &outLongPoint); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongPt_New, &outLongPoint); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WESetLongRect(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongRect outLongRect; | 
					
						
							|  |  |  | 	SInt32 inLeft; | 
					
						
							|  |  |  | 	SInt32 inTop; | 
					
						
							|  |  |  | 	SInt32 inRight; | 
					
						
							|  |  |  | 	SInt32 inBottom; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "llll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inLeft, | 
					
						
							|  |  |  | 	                      &inTop, | 
					
						
							|  |  |  | 	                      &inRight, | 
					
						
							|  |  |  | 	                      &inBottom)) | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	WESetLongRect(&outLongRect, | 
					
						
							|  |  |  | 	              inLeft, | 
					
						
							|  |  |  | 	              inTop, | 
					
						
							|  |  |  | 	              inRight, | 
					
						
							|  |  |  | 	              inBottom); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongRect_New, &outLongRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WELongRectToRect(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongRect inLongRect; | 
					
						
							|  |  |  | 	Rect outRect; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      LongRect_Convert, &inLongRect)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WELongRectToRect(&inLongRect, | 
					
						
							|  |  |  | 	                 &outRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     PyMac_BuildRect, &outRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WERectToLongRect(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	Rect inRect; | 
					
						
							|  |  |  | 	LongRect outLongRect; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      PyMac_GetRect, &inRect)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WERectToLongRect(&inRect, | 
					
						
							|  |  |  | 	                 &outLongRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongRect_New, &outLongRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WEOffsetLongRect(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongRect ioLongRect; | 
					
						
							|  |  |  | 	SInt32 inHorizontalOffset; | 
					
						
							|  |  |  | 	SInt32 inVerticalOffset; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "ll", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      &inHorizontalOffset, | 
					
						
							|  |  |  | 	                      &inVerticalOffset)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	WEOffsetLongRect(&ioLongRect, | 
					
						
							|  |  |  | 	                 inHorizontalOffset, | 
					
						
							|  |  |  | 	                 inVerticalOffset); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	_res = Py_BuildValue("O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                     LongRect_New, &ioLongRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WELongPointInLongRect(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 	Boolean _rv; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	LongPt inLongPoint; | 
					
						
							|  |  |  | 	LongRect inLongRect; | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	if (!PyArg_ParseTuple(_args, "O&O&", | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	                      LongPt_Convert, &inLongPoint, | 
					
						
							|  |  |  | 	                      LongRect_Convert, &inLongRect)) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 		return NULL; | 
					
						
							| 
									
										
										
										
											2002-01-11 12:37:15 +00:00
										 |  |  | 	_rv = WELongPointInLongRect(&inLongPoint, | 
					
						
							|  |  |  | 	                            &inLongRect); | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	_res = Py_BuildValue("b", | 
					
						
							|  |  |  | 	                     _rv); | 
					
						
							|  |  |  | 	return _res; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_STDObjectHandlers(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		OSErr err; | 
					
						
							|  |  |  | 		// install the sample object handlers for pictures and sounds
 | 
					
						
							|  |  |  | #define	kTypePicture			'PICT'
 | 
					
						
							|  |  |  | #define	kTypeSound				'snd '
 | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ( !PyArg_ParseTuple(_args, "") ) return NULL; | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ((err = WEInstallObjectHandler(kTypePicture, weNewHandler, | 
					
						
							|  |  |  | 					(UniversalProcPtr) NewWENewObjectProc(HandleNewPicture), NULL)) != noErr) | 
					
						
							|  |  |  | 			goto cleanup; | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ((err = WEInstallObjectHandler(kTypePicture, weDisposeHandler, | 
					
						
							|  |  |  | 					(UniversalProcPtr) NewWEDisposeObjectProc(HandleDisposePicture), NULL)) != noErr) | 
					
						
							|  |  |  | 			goto cleanup; | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ((err = WEInstallObjectHandler(kTypePicture, weDrawHandler, | 
					
						
							|  |  |  | 					(UniversalProcPtr) NewWEDrawObjectProc(HandleDrawPicture), NULL)) != noErr) | 
					
						
							|  |  |  | 			goto cleanup; | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ((err = WEInstallObjectHandler(kTypeSound, weNewHandler, | 
					
						
							|  |  |  | 					(UniversalProcPtr) NewWENewObjectProc(HandleNewSound), NULL)) != noErr) | 
					
						
							|  |  |  | 			goto cleanup; | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ((err = WEInstallObjectHandler(kTypeSound, weDrawHandler, | 
					
						
							|  |  |  | 					(UniversalProcPtr) NewWEDrawObjectProc(HandleDrawSound), NULL)) != noErr) | 
					
						
							|  |  |  | 			goto cleanup; | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ((err = WEInstallObjectHandler(kTypeSound, weClickHandler, | 
					
						
							|  |  |  | 					(UniversalProcPtr) NewWEClickObjectProc(HandleClickSound), NULL)) != noErr) | 
					
						
							|  |  |  | 			goto cleanup; | 
					
						
							|  |  |  | 		Py_INCREF(Py_None); | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 		_res = Py_None; | 
					
						
							|  |  |  | 		return _res; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 		 | 
					
						
							|  |  |  | 	cleanup: | 
					
						
							|  |  |  | 		return PyMac_Error(err); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | static PyObject *waste_WEInstallObjectHandler(PyObject *_self, PyObject *_args) | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *_res = NULL; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		OSErr err; | 
					
						
							|  |  |  | 		FlavorType objectType; | 
					
						
							|  |  |  | 		WESelector selector; | 
					
						
							|  |  |  | 		PyObject *py_handler; | 
					
						
							|  |  |  | 		UniversalProcPtr handler; | 
					
						
							|  |  |  | 		WEReference we = NULL; | 
					
						
							|  |  |  | 		PyObject *key; | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		if ( !PyArg_ParseTuple(_args, "O&O&O|O&", | 
					
						
							|  |  |  | 				PyMac_GetOSType, &objectType, | 
					
						
							|  |  |  | 				PyMac_GetOSType, &selector, | 
					
						
							|  |  |  | 				&py_handler, | 
					
						
							| 
									
										
										
										
											1996-10-01 11:41:14 +00:00
										 |  |  | 				WEOObj_Convert, &we) ) return NULL; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 				 | 
					
						
							| 
									
										
										
										
											1996-05-20 11:30:45 +00:00
										 |  |  | 		if ( selector == weNewHandler ) handler = (UniversalProcPtr)upp_new_handler; | 
					
						
							|  |  |  | 		else if ( selector == weDisposeHandler ) handler = (UniversalProcPtr)upp_dispose_handler; | 
					
						
							|  |  |  | 		else if ( selector == weDrawHandler ) handler = (UniversalProcPtr)upp_draw_handler; | 
					
						
							|  |  |  | 		else if ( selector == weClickHandler ) handler = (UniversalProcPtr)upp_click_handler; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 		else return PyMac_Error(weUndefinedSelectorErr); | 
					
						
							|  |  |  | 				 | 
					
						
							|  |  |  | 		if ((key = Py_BuildValue("O&O&",  | 
					
						
							|  |  |  | 				PyMac_BuildOSType, objectType,  | 
					
						
							|  |  |  | 				PyMac_BuildOSType, selector)) == NULL ) | 
					
						
							|  |  |  | 			return NULL; | 
					
						
							|  |  |  | 			 | 
					
						
							|  |  |  | 		PyDict_SetItem(callbackdict, key, py_handler); | 
					
						
							|  |  |  | 		 | 
					
						
							|  |  |  | 		err = WEInstallObjectHandler(objectType, selector, handler, we); | 
					
						
							|  |  |  | 		if ( err ) return PyMac_Error(err); | 
					
						
							|  |  |  | 		Py_INCREF(Py_None); | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 		_res = Py_None; | 
					
						
							|  |  |  | 		return _res; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | static PyMethodDef waste_methods[] = { | 
					
						
							|  |  |  | 	{"WENew", (PyCFunction)waste_WENew, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(LongRect inDestRect, LongRect inViewRect, OptionBits inOptions) -> (WEReference outWE)")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEUpdateStyleScrap", (PyCFunction)waste_WEUpdateStyleScrap, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(StScrpHandle ioStyles, WEFontTableHandle inFontTable) -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEInstallTSMHandlers", (PyCFunction)waste_WEInstallTSMHandlers, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WERemoveTSMHandlers", (PyCFunction)waste_WERemoveTSMHandlers, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("() -> None")}, | 
					
						
							| 
									
										
										
										
											1998-02-20 15:57:30 +00:00
										 |  |  | 	{"WEHandleTSMEvent", (PyCFunction)waste_WEHandleTSMEvent, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(AppleEvent inAppleEvent) -> (AppleEvent ioReply)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WELongPointToPoint", (PyCFunction)waste_WELongPointToPoint, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(LongPt inLongPoint) -> (Point outPoint)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEPointToLongPoint", (PyCFunction)waste_WEPointToLongPoint, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Point inPoint) -> (LongPt outLongPoint)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WESetLongRect", (PyCFunction)waste_WESetLongRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inLeft, SInt32 inTop, SInt32 inRight, SInt32 inBottom) -> (LongRect outLongRect)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WELongRectToRect", (PyCFunction)waste_WELongRectToRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(LongRect inLongRect) -> (Rect outRect)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WERectToLongRect", (PyCFunction)waste_WERectToLongRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(Rect inRect) -> (LongRect outLongRect)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WEOffsetLongRect", (PyCFunction)waste_WEOffsetLongRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(SInt32 inHorizontalOffset, SInt32 inVerticalOffset) -> (LongRect ioLongRect)")}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{"WELongPointInLongRect", (PyCFunction)waste_WELongPointInLongRect, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR("(LongPt inLongPoint, LongRect inLongRect) -> (Boolean _rv)")}, | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	{"STDObjectHandlers", (PyCFunction)waste_STDObjectHandlers, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR(NULL)}, | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 	{"WEInstallObjectHandler", (PyCFunction)waste_WEInstallObjectHandler, 1, | 
					
						
							| 
									
										
										
										
											2002-08-22 23:29:45 +00:00
										 |  |  | 	 PyDoc_STR(NULL)}, | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 	{NULL, NULL, 0} | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | /* Return the object corresponding to the window, or NULL */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | PyObject * | 
					
						
							|  |  |  | ExistingwasteObj_New(w) | 
					
						
							|  |  |  | 	WEReference w; | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	PyObject *it = NULL; | 
					
						
							|  |  |  | 	 | 
					
						
							|  |  |  | 	if (w == NULL) | 
					
						
							|  |  |  | 		it = NULL; | 
					
						
							|  |  |  | 	else | 
					
						
							|  |  |  | 		WEGetInfo(weRefCon, (void *)&it, w); | 
					
						
							|  |  |  | 	if (it == NULL || ((wasteObject *)it)->ob_itself != w) | 
					
						
							|  |  |  | 		it = Py_None; | 
					
						
							|  |  |  | 	Py_INCREF(it); | 
					
						
							|  |  |  | 	return it; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-05-22 21:56:42 +00:00
										 |  |  | void initwaste(void) | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | { | 
					
						
							|  |  |  | 	PyObject *m; | 
					
						
							|  |  |  | 	PyObject *d; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	m = Py_InitModule("waste", waste_methods); | 
					
						
							|  |  |  | 	d = PyModule_GetDict(m); | 
					
						
							|  |  |  | 	waste_Error = PyMac_GetOSErrException(); | 
					
						
							|  |  |  | 	if (waste_Error == NULL || | 
					
						
							|  |  |  | 	    PyDict_SetItemString(d, "Error", waste_Error) != 0) | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 		return; | 
					
						
							| 
									
										
										
										
											1997-09-20 17:40:22 +00:00
										 |  |  | 	WEO_Type.ob_type = &PyType_Type; | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	if (PyType_Ready(&WEO_Type) < 0) return; | 
					
						
							| 
									
										
										
										
											1997-09-20 17:40:22 +00:00
										 |  |  | 	Py_INCREF(&WEO_Type); | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	PyModule_AddObject(m, "WEO", (PyObject *)&WEO_Type); | 
					
						
							|  |  |  | 	/* Backward-compatible name */ | 
					
						
							|  |  |  | 	Py_INCREF(&WEO_Type); | 
					
						
							|  |  |  | 	PyModule_AddObject(m, "WEOType", (PyObject *)&WEO_Type); | 
					
						
							| 
									
										
										
										
											1997-09-20 17:40:22 +00:00
										 |  |  | 	waste_Type.ob_type = &PyType_Type; | 
					
						
							| 
									
										
										
										
											2002-12-23 23:16:25 +00:00
										 |  |  | 	if (PyType_Ready(&waste_Type) < 0) return; | 
					
						
							| 
									
										
										
										
											1997-09-20 17:40:22 +00:00
										 |  |  | 	Py_INCREF(&waste_Type); | 
					
						
							| 
									
										
										
										
											2002-12-03 23:40:22 +00:00
										 |  |  | 	PyModule_AddObject(m, "waste", (PyObject *)&waste_Type); | 
					
						
							|  |  |  | 	/* Backward-compatible name */ | 
					
						
							|  |  |  | 	Py_INCREF(&waste_Type); | 
					
						
							|  |  |  | 	PyModule_AddObject(m, "wasteType", (PyObject *)&waste_Type); | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		callbackdict = PyDict_New(); | 
					
						
							|  |  |  | 		if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0) | 
					
						
							| 
									
										
										
										
											2000-09-08 22:06:16 +00:00
										 |  |  | 			return; | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 		upp_new_handler = NewWENewObjectProc(my_new_handler); | 
					
						
							| 
									
										
										
										
											1996-05-20 11:30:45 +00:00
										 |  |  | 		upp_dispose_handler = NewWEDisposeObjectProc(my_dispose_handler); | 
					
						
							|  |  |  | 		upp_draw_handler = NewWEDrawObjectProc(my_draw_handler); | 
					
						
							|  |  |  | 		upp_click_handler = NewWEClickObjectProc(my_click_handler); | 
					
						
							| 
									
										
										
										
											1996-05-07 15:24:01 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-04-16 14:29:15 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* ======================== End module waste ======================== */ | 
					
						
							|  |  |  | 
 |