Commit Graph

46 Commits

Author SHA1 Message Date
Neal Norwitz 016880229a Kill execfile(), use exec() instead 2007-08-12 00:43:29 +00:00
Tim Peters 182b5aca27 Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
Jack Jansen e48cef7aba Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
MacOS9isms.
2003-11-19 16:13:35 +00:00
Jack Jansen bc4ded9bc0 Give a better error message when a string of the wrong size is
passed to RawBitMap.
2003-03-21 16:42:36 +00:00
Jack Jansen 6c7e326eaa Getting rid of pre-Carbon (MacOS8) support. All code depending on
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some
TARGET_API_MAC_OSX conditional code is gone, because it is no longer
used on OSX-only Python (only in MacPython-OS9).
2002-12-12 10:31:54 +00:00
Jack Jansen 96cebde909 Added PEP253 support to most Carbon modules. This isn't complete yet:
some of the more compilcated cases (CF, Res) haven't been done yet. Also,
various types should inherit from each other (anything with an as_Resource
method should be a Resource subtype, the CF types should become one family).
2002-12-03 23:40:22 +00:00
Jack Jansen dbd5701d73 Converted the Carbon modules to use PEP252-style objects, with
descriptors in stead of manual getattr hooks to get at attributes
of the objects.

For Qd I have in stead gotten rid of most of the attribute access
in favor of the carbon-style accessor methods (with the exception
of visRgn, to be done later), and of the Carbon.Qd.qd global object,
for which accessor functions are also available.

For List I have fixed the fact that various methods were incorrectly
generated as functions.

CF is untouched: PEP252 doesn't allow "poor-mans-inheritance" with
basechain, so it will have to wait for PEP253 support.
2002-11-29 23:40:48 +00:00
Jack Jansen ff8dec7427 Got rid of staticforward. 2002-08-05 15:36:57 +00:00
Jack Jansen 714d7268d5 Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
2002-03-25 00:32:17 +00:00
Jack Jansen 620a7667eb Updated to Universal Headers 3.4 2001-12-18 15:39:38 +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 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 3685a4328d ANSIfied function headers to shut up compiler warnings on OSX/Mach-o. 2001-06-20 21:22:23 +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 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 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 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 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 723ad8ae73 More toolbox modules adapted to Universal Headers 3.3.2. 2000-12-12 22:10:21 +00:00
Jack Jansen fa1e27d8d2 Got rid of Py_FatalError calls. 2000-09-08 10:21:44 +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 9d8b96c850 pymactoolbox.h contains protoypes for all externally visible toolbox module
functions. Include it in stead of duplicating the declarations everywhere. Also
cleaned up toolbox module exports, and got rid of resNotFound error.
2000-07-14 22:16:45 +00:00
Jack Jansen fd78de3a74 Under carbon use the GetQDGlobalxxx methods to implement Qd.qd.member access. 2000-06-20 07:42:00 +00:00
Jack Jansen e79dc76f53 Made the core toolbox modules carbon-compatible using the new greylist feature of bgen: non-carbon methods are still included in non-carbon MacPython. The issue of backward compatibility of Python code is still open.
Macmodule and macosmodule have also been carbonified. Some functionality is still missing there.
2000-06-02 21:35:07 +00:00
Jack Jansen 484be6152f Added methods getdata() and putdata() to obtain the data in a bitmap. 2000-03-03 16:01:11 +00:00
Jack Jansen 7f725e4061 SetPort was missing, and the defs file needs the FOUR_CHAR_CODE define. 1998-04-23 13:21:09 +00:00
Jack Jansen 0c4d947eac Replaced addpack by handcrafted code to find the bgen stuff. 1998-04-17 14:07:56 +00:00
Jack Jansen 69b43ed5bc Added support for GDHandle, CTabHandle, ITabHandle and CCrsrHandle: no
reason they were blacklisted, we can handle them as generic Handles.
1997-08-15 14:35:54 +00:00
Jack Jansen 4a8c54e6d9 - Changed GestaltEqu.h to Gestalt.h
- Changed FragLoader.h to CodeFragments.h
- Removed Desk.h
- Regenerated bgen modules from new universal headers
- Changed some of the s# in PyArg_ParseTuple to m# (unfortunately:
  this should have been a different commit)
1997-02-24 13:56:59 +00:00
Jack Jansen 3355be3f35 Added _id attribute to GrafPort objects (real id of grafport, numeric) 1996-05-08 15:33:20 +00:00
Jack Jansen bdd0747193 Fixed access to Quickdraw globals. Unfortunately, they now have to be
accessed as Qd.qd.xxxx
1996-01-29 15:44:03 +00:00
Jack Jansen 61f3df4543 Added rgbFgColor and a few other members of CGrafPort 1996-01-15 14:39:56 +00:00
Jack Jansen 3a50f8a51e - Added FontInfo support
- Added (read-)access to members of [C]GrafPort object
1996-01-11 16:17:14 +00:00
Jack Jansen 04a02e7e11 Added support for PenState and Patterns (and the accompanying qd
globals)
1996-01-06 17:12:58 +00:00
Jack Jansen b539406643 Added support for cursors, and a way to get at the qd global 'arrow' 1996-01-05 18:06:41 +00:00
Jack Jansen 425e9eb6cb - Added color window/pixmap support
- Added support for obtaining pixmap data
- Added OptResObj_* routines for optional handles
1995-12-12 15:02:03 +00:00
Jack Jansen 232f3cd190 Added support for RGB objects (tuples in python) 1995-12-09 14:04:31 +00:00
Jack Jansen 41058c0d0b BitMap object support (only lightly tested) 1995-11-16 22:48:29 +00:00
Jack Jansen 330381cbbb Added (minimal) support for a GrafPort type 1995-11-15 15:18:01 +00:00
Jack Jansen 54c8f7e4bb - Fixed handling of InsetRect, OffsetRect, MapRect
- Added support for PatHandle, CursHandle
- Regenerated from new universal headers.
1995-11-14 10:46:01 +00:00
Jack Jansen b81cf9d61c Trying again to check it in. Changes to:
- Use Universal Headers as input
- Change addpack calls to not depend on Guido's disklayout
- Checkge testprograms to use new names for some functions
1995-06-06 13:08:40 +00:00
Guido van Rossum e56db434a9 first cut at the whole quickdraw.h header file ... 1995-03-19 22:49:50 +00:00
Guido van Rossum 17448e2408 Committed a more or less working version. 1995-01-30 11:53:55 +00:00