Commit Graph

60 Commits

Author SHA1 Message Date
Jack Jansen 28f14012d7 We have strdup(), but not its prototype:-( 2001-12-14 22:58:11 +00:00
Jack Jansen b58f1c0c03 Added declarations for PyMac_SetConsoleHandler, PyMan_DUmmyReadHandler
and PyMac_DummyWriteHandler.
2001-10-08 13:16:39 +00:00
Jack Jansen 697842f58c Replaced PyMac_FullPath by PyMac_FullPathname, which has an extra 'length'
parameter for the return string (as unix pathnames are not limited
by the 255 char pstring limit).
Implemented the function for MachO-Python, where it returns unix pathnames.
2001-09-10 22:00:39 +00:00
Jack Jansen fabd00fa91 Added glue routine for PyMac_BuildFSSpec, PyMac_GetFSRef and PyMac_BuildFSRef.
Moved the declarations to pymactoolbox.h.
2001-09-01 23:39:58 +00:00
Jack Jansen 94bebc0381 Split macglue.c into two: a new mactoolboxglue.c (in ./Python)
with functionality needed for both unix-Python and MacPython and a
new smaller ./Mac/Python/macglue.c which contains MacPython stuff only.

pymactoolbox.h has moved to ./Include from ./Mac/Include and now also
contains the relevant stuff from macglue.h.

The net effect of this is that the ./Mac subdirectory is not needed
anymore for building the unix-Python core on MacOSX (it is needed
for building the extension modules).
2001-08-08 13:17:31 +00:00
Jack Jansen 4e566ab904 Implemented minimal FSRef support, plus conversion between FSRefs, FSSpecs and pathnames where applicable.
PyMac_GetFSSpec and PyMac_BuildFSSpec have moved to macfsmodule from macglue.

These mods are untested on OSX.
2001-07-08 22:07:23 +00:00
Jack Jansen 0194ad5c7d Got the first MacPython module working under MacOSX/MachO (gestalt). Main changes
are including Carbon/Carbon.h in stead of the old headers (unless WITHOUT_FRAMEWORKS
is defined, as it will be for classic MacPython) and selectively disabling all the
stuff that is unneeded in a unix-Python (event handling, etc).
2001-05-12 22:46:35 +00:00
Jack Jansen 6e68a7e74f Be more sensible about when to use TARGET_API_MAC_OS8 in stead of !TARGET_API_MAC_CARBON. This should greatly facilitate porting stuff to OSX in its MachO/BSD incarnation. 2001-05-12 21:31:34 +00:00
Jack Jansen b4b27bec0e - Raise console window on input. Fixes Carbon hang. 2001-04-25 22:07:42 +00:00
Jack Jansen 8a38714ba0 Bit the bullet and added a private GUSISIOUX for Python. This makes the delayconsole and keepopen code neater. Also tells Sioux to behave better with events, and handles cmd-. during print better. The pythonpreferences have also changed due to this. 2001-02-11 01:08:04 +00:00
Jack Jansen 8413b47ba7 Added PyMac_OutputSeen(), which acknowledges all current output in the stdio window, i.e. it acts like input has been read insofar as the keep-console-open option is interested. 2000-10-19 22:02:16 +00:00
Jack Jansen 5660639f9f Moved PyOS_StackCheck prototype to pythonrun.h 2000-08-07 21:03:33 +00:00
Jack Jansen 5bdbabd203 Added more prototypes. 2000-07-24 19:52:52 +00:00
Jack Jansen a44923fbfe Got rid of obsolete HAVE_UNIVERSAL_HEADERS test and SystemSevenOrLater define. 2000-07-14 22:52:50 +00:00
Jack Jansen 74a1e63a89 Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef. 2000-07-14 22:37:27 +00:00
Jack Jansen bb7e213a8b PyMac_PromptGetFile and PyMac_GetDirectory don't exist in carbonpython. 2000-07-14 22:15:24 +00:00
Jack Jansen e17fd2a5af Got rid of __SC__ ifdefs. 2000-07-11 22:37:03 +00:00
Jack Jansen 9ae898b415 ANSIfication step 2: make sure all needed prototypes are available, and all needed
header files included.
2000-07-11 21:16:03 +00:00
Jack Jansen d88296d25a ANSIfication step 1: get rid of Py_PROTO and Py_FPROTO. 2000-07-11 19:51:05 +00:00
Jack Jansen fe38d2998f PyMac_FindModuleExtension now uses a size_t as its size parameter for compatibility. 2000-07-03 23:53:40 +00:00
Jack Jansen ee0810403d Made the GUSI options work again with GUSI 2. 2000-04-21 23:53:37 +00:00
Jack Jansen 2d1306b7cf Started on GUSI2 and threading support. 2000-04-07 09:10:49 +00:00
Jack Jansen b734adef4b Added PyMac_BuildOptStr255, which returns None on a null pointer. 1999-12-17 17:15:50 +00:00
Jack Jansen 8f5725af60 First bits and pieces of appearance support: an init routine, a global flag PyMac_AppearanceCompliant (exported thru MacOS). If USE_APPEARANCE
is off the code is disabled (but the variables are still there, set to 0).
1999-12-07 23:08:10 +00:00
Jack Jansen c7fda7e195 Make macglue.h C++ compatible. 1999-09-30 11:14:49 +00:00
Jack Jansen f22e67dcb5 Added prototypes for the code resource routines, and for Pstring
(which was missing, for some reason).
1998-07-13 13:39:34 +00:00
Jack Jansen bbf4be2c2f Incorrect argument for PyMacBuildwide() 1998-04-23 13:20:17 +00:00
Jack Jansen 0dca75229b Add (temporary) PyMac_{Build,Get}wide 1998-04-21 15:20:50 +00:00
Jack Jansen c84cb9511b Added declarations for mac{set,get}filetype 1998-04-15 14:12:45 +00:00
Jack Jansen 50ea91976b Mods for user mainloop event handling 1997-06-20 16:25:00 +00:00
Jack Jansen eda78634a4 Make imports faster on the Mac, by
- Remembering whether sys.path components refer to files or folders,
- Using mac-specific code to check for file existence, in stead of trying
  to fopen() each possible file.

These mods need an accompanying mod to import.c.
1997-06-12 15:29:46 +00:00
Jack Jansen 0130f0fb8f Added prototype for PyMac_RestoreMenuBar 1997-06-12 10:51:39 +00:00
Jack Jansen 4a79a4b0a9 Removed SetScheduleTimes and PyMac_DoYieldEnabled
Added [GS]etSchedParams
Added parameter to PyMac_HandleEvent (safe to run python code at this point)
Removed various cruft
1997-06-03 15:27:31 +00:00
Jack Jansen 570e4b7ad1 Added PyMac_StopGUSISpin 1997-05-23 15:33:20 +00:00
Jack Jansen 42218ce33c Added/updated copyright notices
(and the &*^$%@ resource files got binhexed again, sigh)
1997-01-31 16:15:11 +00:00
Jack Jansen 52ac037249 Added PyMac_Initialize() routine, to be used by embedding programs (in
stead of standard Py_Initialize(), which it calls).
1997-01-15 15:49:08 +00:00
Jack Jansen 6c11f7444c Added PyMac_GetFullPath(), PyMac_ApplicationPath and PyMac_ApplicationFSSpec 1996-11-09 18:48:06 +00:00
Jack Jansen 3d228879fe macglue: added PyMac_AppRefNum
pythonresources: elaborated comment on preferences, added new options
1996-09-06 22:18:40 +00:00
Jack Jansen 3469e997b4 Python about box implemented. Slightly convoluted, since (a) we have
to override an internal sioux routine and (b) we have to override the
"about sioux" menuitem after sioux has created its menus.
1996-09-06 00:30:45 +00:00
Jack Jansen f6865f77d4 - Fixed PyMac_DoYield:
- Update lastyield correctly
  - Do event handling if PyMac_YieldEnabled > 0 (previous cmd-. fix
    broke this)
- Use our own GUSISpin routine: fixes crash when exiting with sockets
  open and keeps windows, etc reacting consistently when waiting for
  accepts(), etc.
1996-09-04 15:24:59 +00:00
Jack Jansen 70463665d3 PyMac_BuildNumVersion added 1996-08-02 11:21:03 +00:00
Jack Jansen 378815ca86 Replaced previous gusi-chdir() fix by a call to PyMac_FixGUSIcd()
after each chdir call.
1996-03-06 16:21:34 +00:00
Jack Jansen fa4d5d0414 Added converters for Fixed 1995-11-15 15:19:29 +00:00
Jack Jansen 32486f5662 Added PyMac_PromptGetFile, removed stuff gone to other sources. 1995-08-14 12:36:37 +00:00
Jack Jansen f74f63a43f Initial port to CodeWarrior CFM68K support (mainly by disabling
unsupported features).
1995-06-27 13:18:14 +00:00
Jack Jansen 3ec804af85 - Added PyMac_GetDirectory call which asks the user to select a
directory.
- No __main__ resource found message is now a dialog
- Fixes wrt stdio window handling in applets.

NB: these fixes require a new resource file.
1995-02-20 15:56:10 +00:00
Guido van Rossum f71a9a9c6e macstrerror -> MacOS-StrError; added applet and cfm-68k support 1995-02-18 14:59:48 +00:00
Jack Jansen 74162f311f Added support for loading pyc code from a resource. 1995-02-15 22:58:33 +00:00
Guido van Rossum becdbec806 ported to Think C 1995-02-14 01:27:24 +00:00
Jack Jansen 8cd2b720f6 Added PyMac_GetPythonDir routine which obtains python home directory
from an alias resource (or from the user). Note: this uses a dialog
resource so there's an accompanying change in the resource file.
1995-02-13 11:33:28 +00:00