[Python-checkins] CVS: python/dist/src/Mac/Modules/te TEmodule.c,1.13,1.14

Jack Jansen jackjansen@users.sourceforge.net
Tue, 22 May 2001 14:55:47 -0700


Update of /cvsroot/python/python/dist/src/Mac/Modules/te
In directory usw-pr-cvs1:/tmp/cvs-serv15146/Python/Mac/Modules/te

Modified Files:
	TEmodule.c 
Log Message:
Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python.

Index: TEmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/te/TEmodule.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** TEmodule.c	2001/05/17 21:58:12	1.13
--- TEmodule.c	2001/05/22 21:55:44	1.14
***************
*** 9,13 ****
--- 9,17 ----
  #include "pymactoolbox.h"
  
+ #ifdef WITHOUT_FRAMEWORKS
  #include <TextEdit.h>
+ #else
+ #include <Carbon/Carbon.h>
+ #endif
  
  #ifdef USE_TOOLBOX_OBJECT_GLUE
***************
*** 26,31 ****
  */
  static PyObject *
! TextStyle_New(itself)
! 	TextStylePtr itself;
  {
  
--- 30,34 ----
  */
  static PyObject *
! TextStyle_New(TextStylePtr itself)
  {
  
***************
*** 35,41 ****
  
  static int
! TextStyle_Convert(v, p_itself)
! 	PyObject *v;
! 	TextStylePtr p_itself;
  {
  	long font, face, size;
--- 38,42 ----
  
  static int
! TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
  {
  	long font, face, size;
***************
*** 62,67 ****
  } TEObject;
  
! PyObject *TEObj_New(itself)
! 	TEHandle itself;
  {
  	TEObject *it;
--- 63,67 ----
  } TEObject;
  
! PyObject *TEObj_New(TEHandle itself)
  {
  	TEObject *it;
***************
*** 75,81 ****
  	return (PyObject *)it;
  }
! TEObj_Convert(v, p_itself)
! 	PyObject *v;
! 	TEHandle *p_itself;
  {
  	if (!TEObj_Check(v))
--- 75,79 ----
  	return (PyObject *)it;
  }
! TEObj_Convert(PyObject *v, TEHandle *p_itself)
  {
  	if (!TEObj_Check(v))
***************
*** 88,93 ****
  }
  
! static void TEObj_dealloc(self)
! 	TEObject *self;
  {
  	TEDispose(self->ob_itself);
--- 86,90 ----
  }
  
! static void TEObj_dealloc(TEObject *self)
  {
  	TEDispose(self->ob_itself);
***************
*** 95,101 ****
  }
  
! static PyObject *TEObj_TESetText(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 92,96 ----
  }
  
! static PyObject *TEObj_TESetText(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 115,121 ****
  }
  
! static PyObject *TEObj_TEGetText(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 110,114 ----
  }
  
! static PyObject *TEObj_TEGetText(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 129,135 ****
  }
  
! static PyObject *TEObj_TEIdle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 122,126 ----
  }
  
! static PyObject *TEObj_TEIdle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 142,148 ****
  }
  
! static PyObject *TEObj_TESetSelect(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 133,137 ----
  }
  
! static PyObject *TEObj_TESetSelect(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 161,167 ****
  }
  
! static PyObject *TEObj_TEActivate(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 150,154 ----
  }
  
! static PyObject *TEObj_TEActivate(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 174,180 ****
  }
  
! static PyObject *TEObj_TEDeactivate(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 161,165 ----
  }
  
! static PyObject *TEObj_TEDeactivate(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 187,193 ****
  }
  
! static PyObject *TEObj_TEKey(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 172,176 ----
  }
  
! static PyObject *TEObj_TEKey(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 203,209 ****
  }
  
! static PyObject *TEObj_TECut(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 186,190 ----
  }
  
! static PyObject *TEObj_TECut(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 216,222 ****
  }
  
! static PyObject *TEObj_TECopy(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 197,201 ----
  }
  
! static PyObject *TEObj_TECopy(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 229,235 ****
  }
  
! static PyObject *TEObj_TEPaste(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 208,212 ----
  }
  
! static PyObject *TEObj_TEPaste(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 242,248 ****
  }
  
! static PyObject *TEObj_TEDelete(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 219,223 ----
  }
  
! static PyObject *TEObj_TEDelete(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 255,261 ****
  }
  
! static PyObject *TEObj_TEInsert(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 230,234 ----
  }
  
! static PyObject *TEObj_TEInsert(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 275,281 ****
  }
  
! static PyObject *TEObj_TESetAlignment(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 248,252 ----
  }
  
! static PyObject *TEObj_TESetAlignment(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 291,297 ****
  }
  
! static PyObject *TEObj_TEUpdate(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 262,266 ----
  }
  
! static PyObject *TEObj_TEUpdate(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 307,313 ****
  }
  
! static PyObject *TEObj_TEScroll(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 276,280 ----
  }
  
! static PyObject *TEObj_TEScroll(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 326,332 ****
  }
  
! static PyObject *TEObj_TESelView(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 293,297 ----
  }
  
! static PyObject *TEObj_TESelView(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 339,345 ****
  }
  
! static PyObject *TEObj_TEPinScroll(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 304,308 ----
  }
  
! static PyObject *TEObj_TEPinScroll(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 358,364 ****
  }
  
! static PyObject *TEObj_TEAutoView(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 321,325 ----
  }
  
! static PyObject *TEObj_TEAutoView(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 374,380 ****
  }
  
! static PyObject *TEObj_TECalText(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 335,339 ----
  }
  
! static PyObject *TEObj_TECalText(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 387,393 ****
  }
  
! static PyObject *TEObj_TEGetOffset(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 346,350 ----
  }
  
! static PyObject *TEObj_TEGetOffset(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 404,410 ****
  }
  
! static PyObject *TEObj_TEGetPoint(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 361,365 ----
  }
  
! static PyObject *TEObj_TEGetPoint(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 421,427 ****
  }
  
! static PyObject *TEObj_TEClick(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 376,380 ----
  }
  
! static PyObject *TEObj_TEClick(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 440,446 ****
  }
  
! static PyObject *TEObj_TESetStyleHandle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 393,397 ----
  }
  
! static PyObject *TEObj_TESetStyleHandle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 456,462 ****
  }
  
! static PyObject *TEObj_TEGetStyleHandle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 407,411 ----
  }
  
! static PyObject *TEObj_TEGetStyleHandle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 470,476 ****
  }
  
! static PyObject *TEObj_TEGetStyle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 419,423 ----
  }
  
! static PyObject *TEObj_TEGetStyle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 494,500 ****
  }
  
! static PyObject *TEObj_TEStylePaste(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 441,445 ----
  }
  
! static PyObject *TEObj_TEStylePaste(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 507,513 ****
  }
  
! static PyObject *TEObj_TESetStyle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 452,456 ----
  }
  
! static PyObject *TEObj_TESetStyle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 529,535 ****
  }
  
! static PyObject *TEObj_TEReplaceStyle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 472,476 ----
  }
  
! static PyObject *TEObj_TEReplaceStyle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 554,560 ****
  }
  
! static PyObject *TEObj_TEGetStyleScrapHandle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 495,499 ----
  }
  
! static PyObject *TEObj_TEGetStyleScrapHandle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 568,574 ****
  }
  
! static PyObject *TEObj_TEStyleInsert(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 507,511 ----
  }
  
! static PyObject *TEObj_TEStyleInsert(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 591,597 ****
  }
  
! static PyObject *TEObj_TEGetHeight(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 528,532 ----
  }
  
! static PyObject *TEObj_TEGetHeight(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 611,617 ****
  }
  
! static PyObject *TEObj_TEContinuousStyle(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 546,550 ----
  }
  
! static PyObject *TEObj_TEContinuousStyle(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 633,639 ****
  }
  
! static PyObject *TEObj_TEUseStyleScrap(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 566,570 ----
  }
  
! static PyObject *TEObj_TEUseStyleScrap(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 658,664 ****
  }
  
! static PyObject *TEObj_TENumStyles(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 589,593 ----
  }
  
! static PyObject *TEObj_TENumStyles(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 678,684 ****
  }
  
! static PyObject *TEObj_TEFeatureFlag(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 607,611 ----
  }
  
! static PyObject *TEObj_TEFeatureFlag(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 698,704 ****
  }
  
! static PyObject *TEObj_TEGetHiliteRgn(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 625,629 ----
  }
  
! static PyObject *TEObj_TEGetHiliteRgn(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 716,722 ****
  }
  
! static PyObject *TEObj_as_Resource(_self, _args)
! 	TEObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 641,645 ----
  }
  
! static PyObject *TEObj_as_Resource(TEObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 810,816 ****
  PyMethodChain TEObj_chain = { TEObj_methods, NULL };
  
! static PyObject *TEObj_getattr(self, name)
! 	TEObject *self;
! 	char *name;
  {
  
--- 733,737 ----
  PyMethodChain TEObj_chain = { TEObj_methods, NULL };
  
! static PyObject *TEObj_getattr(TEObject *self, char *name)
  {
  
***************
*** 885,891 ****
  
  
! static PyObject *TE_TEScrapHandle(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 806,810 ----
  
  
! static PyObject *TE_TEScrapHandle(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 899,905 ****
  }
  
! static PyObject *TE_TEGetScrapLength(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 818,822 ----
  }
  
! static PyObject *TE_TEGetScrapLength(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 913,919 ****
  }
  
! static PyObject *TE_TENew(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 830,834 ----
  }
  
! static PyObject *TE_TENew(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 932,938 ****
  }
  
! static PyObject *TE_TETextBox(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 847,851 ----
  }
  
! static PyObject *TE_TETextBox(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 957,963 ****
  }
  
! static PyObject *TE_TEStyleNew(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 870,874 ----
  }
  
! static PyObject *TE_TEStyleNew(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 976,982 ****
  }
  
! static PyObject *TE_TESetScrapLength(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 887,891 ----
  }
  
! static PyObject *TE_TESetScrapLength(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 991,997 ****
  }
  
! static PyObject *TE_TEFromScrap(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 900,904 ----
  }
  
! static PyObject *TE_TEFromScrap(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 1006,1012 ****
  }
  
! static PyObject *TE_TEToScrap(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 913,917 ----
  }
  
! static PyObject *TE_TEToScrap(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 1023,1029 ****
  #if TARGET_API_MAC_CARBON
  
! static PyObject *TE_TEGetScrapHandle(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 928,932 ----
  #if TARGET_API_MAC_CARBON
  
! static PyObject *TE_TEGetScrapHandle(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 1040,1046 ****
  #if TARGET_API_MAC_CARBON
  
! static PyObject *TE_TESetScrapHandle(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 943,947 ----
  #if TARGET_API_MAC_CARBON
  
! static PyObject *TE_TESetScrapHandle(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 1056,1062 ****
  #endif
  
! static PyObject *TE_as_TE(_self, _args)
! 	PyObject *_self;
! 	PyObject *_args;
  {
  	PyObject *_res = NULL;
--- 957,961 ----
  #endif
  
! static PyObject *TE_as_TE(PyObject *_self, PyObject *_args)
  {
  	PyObject *_res = NULL;
***************
*** 1107,1111 ****
  
  
! void initTE()
  {
  	PyObject *m;
--- 1006,1010 ----
  
  
! void initTE(void)
  {
  	PyObject *m;
***************
*** 1114,1119 ****
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(TEObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEObj_Convert);
  
  
--- 1013,1018 ----
  
  
! 		PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
! 		PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);