Commit Graph

516 Commits

Author SHA1 Message Date
Jack Jansen df222d2691 Added hfsplusapi module. 2001-11-06 15:56:56 +00:00
Jack Jansen ae2df93814 Removed unused variable. 2001-11-06 12:10:05 +00:00
Jack Jansen 24aa3cea07 First couple of fixes to make it compile with Universal 3.3.2. 2001-11-06 12:06:39 +00:00
Jack Jansen e9b2a0597e HFS+ API contributed by Nitin Ganatra. This checkin is identical to what he sent me, except for the namechange (fmgr->hfsplus). 2001-11-06 11:10:13 +00:00
Jack Jansen 9c2b514014 Correctly builds the C module now. 2001-11-05 16:21:45 +00:00
Jack Jansen bd00884415 First tweaks to allow MacPython to be compiled with
Universal Headers 3.4
2001-11-05 16:16:39 +00:00
Jack Jansen 34cbe718d4 Fixed broken newlines and changed module name. Still untested. 2001-11-05 16:15:45 +00:00
Jack Jansen 52e9045da6 Carbon Event Manager module donated by Donovan Preston. Checked in as I received them (except for namechange), these will not work as-is, that'll be fixed in a later checkin. 2001-11-05 14:44:23 +00:00
Jack Jansen 537a69fe66 Make the CoreFoundation object _New and _Convert routines available to other modules. Idea by Donovan Preston, implementaion by me. 2001-11-05 14:39:22 +00:00
Just van Rossum 3b5074b0fb added acces to the cellSize field, rewrote setattr code 2001-11-05 11:12:12 +00:00
Just van Rossum dd4830ac1d More List Manager interfacing:
- CreateCustomList(): write LDEF's in Python! (carbon + classic)
- list.LGetCellDataLocation()

(Jack: what's with this _WIN32/pywintoolbox.h stuff?)
2001-11-05 08:27:57 +00:00
Jack Jansen 01a9462787 Under MachO-Python unconditionally import macfsn. 2001-11-01 14:00:19 +00:00
Just van Rossum ab57c7dcfc Moved macfsn hackery from macmain.c to macfsmodule.c so it loads
on demand instead of at startup.
2001-10-31 22:55:08 +00:00
Jack Jansen e54968a11a Some escaped newlines had spaces between the backslash and the newline. Also slightly changed the comment on xstat(). 2001-10-23 22:28:23 +00:00
Guido van Rossum 98bf58f1c6 SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
This is a big one, touching lots of files.  Some of the platforms
aren't tested yet.  Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences.  When accessed as a sequence, they behave exactly as
before.  But they also have attributes like st_mtime or tm_year.  The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there).  If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.

(Still missing is a documentation update.)
2001-10-18 20:34:25 +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 044d95e9f7 A few more gcc warnings bite the dust. 2001-09-05 15:44:37 +00:00
Jack Jansen fd064863eb Shut up many more gcc warnings. 2001-09-05 10:31:52 +00:00
Jack Jansen f894f6f4e9 Added prototypes to shut gcc -Wstrict-prototypes up. 2001-09-04 22:29:31 +00:00
Jack Jansen 9642ecad06 Shut up a few more gcc warnings. 2001-09-04 22:25:47 +00:00
Jack Jansen 1767f93603 Added prototypes to silence gcc strict-prototype warnings.
Fixed a few missing return values.
2001-09-04 22:20:39 +00:00
Jack Jansen 06d2e1af35 Regenerated without default int return types. 2001-09-04 22:19:18 +00:00
Jack Jansen 6114297c87 Silly typos. 2001-09-02 00:09:35 +00:00
Jack Jansen 569ba10610 Don't call PyMac_HandleEvent in unix-Python 2001-09-02 00:08:16 +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 62d24a0f50 Don't call PyMac_HandleEvent if we're in unix-Python. 2001-09-01 23:38:50 +00:00
Jack Jansen e9fb3d6db3 Include Carbon/Carbon.h if we're on OSX. 2001-09-01 23:38:13 +00:00
Jack Jansen e7d8322630 exceptions was missing from the module list. Added. 2001-08-27 22:50:41 +00:00
Jack Jansen 75a2f85593 Last renamed module that wasn't removed yet. 2001-08-24 09:17:15 +00:00
Jack Jansen 25a5bd7708 Renamed. 2001-08-23 14:11:10 +00:00
Jack Jansen 50ecb0ad83 Renamed the Mac toolbox modules to have an initial _ in their name. 2001-08-23 14:02:09 +00:00
Jack Jansen 77105a960b The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package. 2001-08-23 13:51:46 +00:00
Jack Jansen d7b568ac4d test_glob found a nasty bug in GUSI opendir(): it will not fail when called on files, but in stead open the parent directory! We now explicitly test for the argument being a directory and simulate ENOTDIR otherwise. 2001-08-11 23:18:55 +00:00
Jack Jansen deefbe5666 - Don't return mac-style pathnames in unix-Python.
- Fixed up a lot more prototypes (gcc also wants them on static routines)
- Fixed various other gcc warnings.
2001-08-08 13:46:49 +00:00
Jack Jansen b760923b20 Got rid of 68k-Mac and other outdated ifdefs. 2001-08-07 15:30:23 +00:00
Jack Jansen 71c5b02859 Got rid of mactcp cruft, added Mlte and CF modules. 2001-08-07 15:29:17 +00:00
Jack Jansen b927285c03 Removed unused variable. 2001-08-07 15:28:52 +00:00
Jack Jansen 67992b7732 Bit another bullet: all toolbox modules are now in dynamically loaded modules. Everything still seems to work, but the ConfigurePythonXXX on initial install may still need work. 2001-08-07 13:53:25 +00:00
Jack Jansen 4590049228 Oops, arg type for the glue routine was wrong. 2001-08-06 15:32:30 +00:00
Jack Jansen a5bca579fd PyMac_GetFSSpec must be called via the dylib glue code on OSX. 2001-08-03 15:39:27 +00:00
Jack Jansen 3988358b4d If we use frameworks we should include CoreServices/CoreServices.h, not the
old-style CoreFoundation.h.
2001-08-03 15:36:23 +00:00
Jack Jansen 03b33effc7 TXNTSMCheck isn't available under Mach-O Carbon. 2001-08-03 15:34:29 +00:00
Jack Jansen cbed91b4db Merging appropriate 2.1.1 fixes back into the main trunk. 2001-08-03 13:31:36 +00:00
Jack Jansen ddafd2b0c7 (Finally) converted to new-style args.
Added an optional (and ignored) 3d parameter to open() to make the signature compatible with posixmodule.
Added the various O_ constants (by stealing the code from posixmodule).

test_fileinput now passes.
2001-08-03 13:07:19 +00:00
Jack Jansen 6f70d62855 Used an adapted MethodGenerator to generate methods too for functions that have the object as the second arg after a first CFAllocatorRef arg (which we pass as NULL always anyway). 2001-07-17 20:47:13 +00:00
Jack Jansen e85e4e43bd The TNXDraw gworld argument is optional. 2001-07-16 21:58:44 +00:00
Jack Jansen f0ded2f0bc Various small fixes. The demo now starts to limp along. 2001-07-14 14:00:50 +00:00
Jack Jansen d4b8361910 Fixed the mis-guessed parameters and added support for a few optional parameter types. There's a good chance that this is usable now (but there's no test code yet). 2001-07-13 22:27:20 +00:00
Jack Jansen 2aadb891e7 First stab at an interface to the Multi Language Text Editor. It compiles and imports, but that's about all. Apple didn't put const in front of their input-only by-reference args, so that needs fixing first. 2001-07-13 20:56:52 +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
unknown c90acb9599 Do conversion of CFStrings to/from unicode. 2001-07-04 22:38:52 +00:00
Jack Jansen 340d98f564 - Use weaklink generators so we can support OSX-only calls without crashing on OS9.
- Convert CFString to/from Python strings. Currently always MacRoman, to be fixed later (as is unicode support). Python->CFString conversion is automatic.
2001-07-01 22:04:02 +00:00
Jack Jansen 7becc91fef Added CFURL support, and got base chaining to really work. 2001-06-28 22:08:26 +00:00
Jack Jansen bc7c8960e0 CFArray, CFData and CFDictonary are now covered, but mainly opaque.
CFStrings are in better shape, but Unicode support and automatic conversion to/from Python strings remains to be done.
2001-06-27 22:00:55 +00:00
Jack Jansen 686f9c344c First small step towards bgen-generated CoreFoundation. there is hardly any real functionality yet, but method chains seem to work, and so do Retain/Release semantics. 2001-06-26 21:51:18 +00:00
Just van Rossum 50cb38df43 Added support for the gc module (!). 2001-06-21 14:50:03 +00:00
Jack Jansen 2942131dac Got rid of a silly #if. 2001-06-20 21:44:38 +00:00
Jack Jansen b8248d8cff Don't use extern when we mean staticforward (OSX gcc is picky about it).
Blacklist SendControlMessage: it's signature has changed between Universal Headers 3.3 and 3.4.
2001-06-20 21:31:28 +00:00
Jack Jansen 82bcbd04fd {Is,Set}AntiAliasedTextEnabled don't exist on MacOS 8.5.5 and earlier. For now: cop out and blacklist them. 2001-06-20 21:29:19 +00:00
Jack Jansen 3685a4328d ANSIfied function headers to shut up compiler warnings on OSX/Mach-o. 2001-06-20 21:22:23 +00:00
Jack Jansen 6b9289ff1a Added a const to shut up a compiler warning. 2001-06-20 21:21:07 +00:00
Jack Jansen 4edc5eb639 Reversed the order of the checks for None or a Dialog where a Window is expected so it doesn't crash under OSX/Mach-o. 2001-06-20 21:20:22 +00:00
Jack Jansen 8853b18cc8 Removed some unused routines under Carbon. They caused compile errors with UH34. 2001-06-20 20:55:05 +00:00
Jack Jansen ff75c214ef Adapted to Universal Headers 3.4: new refcontype and use UPP names in stead of Proc names for callback creation. 2001-06-20 20:53:38 +00:00
Jack Jansen 0c995756b3 Fixed an error in the signature of the QdRGB converter routines. 2001-06-13 12:39:02 +00:00
Jack Jansen fa77e1a1b1 Lots more Carbon/Carbon.h includes, new UPP routine names, function prototypes. Most toolbox modules now compile, link and import in MacOSX-MachO python. 2001-05-22 21:56:42 +00:00
Jack Jansen 1129671350 Fixed changed UPP routines names. The module now compiles and loads. 2001-05-22 21:48:40 +00:00
Jack Jansen f3163303a9 Ifdeffed a few more sections. All functionality that is relevant on MacOSX
now appears to work.
2001-05-19 12:50:05 +00:00
Jack Jansen 6143d533b6 Include Carbon/Carbon.h in stead of universal headers, if appropriate.
Test for TARGET_API_MAC_OS8 in stead of !TARGET_API_MAC_CARBON where
appropriate.
2001-05-19 12:34:59 +00:00
Jack Jansen 0e04eecdbf First step in porting MacPython modules to OSX/unix: break all references between modules except for the obj_New() and obj_Convert() routines, the PyArg_Parse and Py_BuildValue helpers.
And these can now be vectored through glue routines (by defining USE_TOOLBOX_OBJECT_GLUE) which will do the necessary imports, whereupon the module's init routine will tell the glue routine about the real conversion routine address and everything is fine again.
2001-05-17 21:58:34 +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 c54be4299c Check RefCon backpointer to python object with IsPointerValid() before dereferencing it (carbon only). 2001-04-25 22:09:29 +00:00
Jack Jansen aabdb0d5bf Dummy _tkinter module for Carbon, which explains that Tkinter isnt supported under Carbon. 2001-03-20 23:29:41 +00:00
Jack Jansen abd703d0ce FindFolder argument is a short, not an unsigned short. 2001-03-15 14:38:10 +00:00
Jack Jansen 043732e95d Enable FSpResourceFileAlreadyOpen only for Carbon. This is not strictly correct: OS9 InterfaceLib has it, but enabling it will make Python refuse to run on 8.6 and earlier. 2001-03-02 16:32:03 +00:00
Jack Jansen f1d7b41fa0 Disable GetWindowSpareFlag and GetWindowGoAwayBox on carbon. 2001-02-28 23:32:42 +00:00
Jack Jansen cced0aa3e0 SetListCellIndent() argument was guessed incorrectly. Fixed. 2001-02-27 13:00:36 +00:00
Jack Jansen f02f4c8825 Soundex has gone. 2001-02-27 12:59:49 +00:00
Jack Jansen 599ce9c6c2 On OSX passing NULL to NewUniversalFilterProc() does not return NULL but a crashing UPP. This made ModalDialog (and, hence EditPythonPrefs and EasyDialogs and many others) crash. Fixed. 2001-02-20 22:27:43 +00:00
Jack Jansen 3f49e4d064 Oops, repr didn't allocate the memory it used... 2001-02-11 01:12:53 +00:00
Jack Jansen 69e7f11aa8 Added DlgObj_WhichDialog, analoguous to WhichWindow, and use this to get at dialogs. 2001-02-06 16:14:54 +00:00
Jack Jansen d6b2aeb10d QDFlushPortBuffer() has an optional region argument. 2001-02-06 16:13:50 +00:00
Jack Jansen ecdaadb7c6 Also recognize DragRef as a method-argument. 2001-02-05 13:47:13 +00:00
Jack Jansen dc2ac8d39f Accept Dialogs and Windows where Grafports are expected (such as in SetPort) and do a MacOSX compatible cast. Bit of a hack, but good enough for now. 2001-02-02 22:41:48 +00:00
Jack Jansen 87eb4f8bb3 New internal function BMObj_NewCopied() which copies the BitMap. Used to get the screenBits bitmap. 2001-01-30 09:57:13 +00:00
Jack Jansen bf21bef254 Got ZeroScrap() and PutScrap() to work under Carbon. 2001-01-29 15:20:06 +00:00
Jack Jansen 5c3c58bde0 Accessor functions for regions and such expect an existing region as parameter. Fixed for grafport attribute access.
Got GetPortBitMapForCopyBits() and port.portBits to work.
2001-01-29 14:07:01 +00:00
Jack Jansen 54c0787909 Added generators for EnableMenuItem and CheckMenuItem (which have Mac in front of their name in the include files). 2001-01-29 13:32:10 +00:00
Jack Jansen f424f24bbb Re-enabled Scrap (even though it's mostly empty right now). 2001-01-29 13:31:10 +00:00
Jack Jansen 5a8115c94b Ported the icglue module to carbon. 2001-01-29 13:27:46 +00:00
Jack Jansen 4ff2fe7ee1 ucnhash module has gone, xreadlines module added. 2001-01-25 16:28:00 +00:00
Jack Jansen 7b3cc1f9c3 Regenerated (and manually massaged for PutScrap) so it can be byuilt both for Carbon and Classic. The Carbon module is rather empty, though, for now. 2001-01-24 16:04:01 +00:00
Jack Jansen 5396feb3bb Quick (manual) fix to make the module compile with Waste 2.0. TBD later. 2001-01-24 16:03:05 +00:00
Jack Jansen f47075e86d Blacklisted (for the time being) the functions that have a component argument. Don't want to drag the Cm module into the core set too. 2001-01-24 14:22:13 +00:00
Jack Jansen bd58edaa01 Implemented direct attribute access for Carbon builds and accessor functions for non-carbon builds. 2001-01-24 14:05:11 +00:00
Jack Jansen 193509b320 Added an attribute runtimemodel, which is either "ppc" or "carbon" and is the runtime model of the current interpreter. Will have to ad another value later for real MacOSX MachO, I guess. 2001-01-23 22:38:23 +00:00
Jack Jansen c33a423c53 Treat an empty kwdict argument the same as a missing one. 2001-01-19 23:46:28 +00:00
Jack Jansen 726d873887 Undefine and redefine PRAGMA_ALIGN_SUPPORTED under Carbon. Apple's "solution" of a funny define makes portable code impossible:-( 2001-01-19 23:45:57 +00:00
Jack Jansen 319c67b6e1 The interruptRoutine attribute is gone under Carbon. Luckily it appears that nothing used it. 2001-01-12 23:39:59 +00:00