37.8. Mac OS Toolbox ModulesΒΆ
These are a set of modules that provide interfaces to various legacy Mac OS toolboxes.
If applicable the module will define a number of Python objects for the various
structures declared by the toolbox, and operations will be implemented as
methods of the object. Other operations will be implemented as functions in the
module. Not all operations possible in C will also be possible in Python
(callbacks are often a problem), and parameters will occasionally be different
in Python (input and output buffers, especially). All methods and functions
have a __doc__ string describing their arguments and return values, and
for additional description you are referred to Inside Macintosh or similar works.
These modules all live in a package called Carbon. Despite that name they
are not all part of the Carbon framework: CF is really in the CoreFoundation
framework and Qt is in the QuickTime framework. The normal use pattern is
from Carbon import AE
Note
Most of the OS X APIs that these modules use are deprecated or removed in recent versions of OS X. Many are not available when Python is executing in 64-bit mode. The Carbon modules have been removed in Python 3. You should avoid using them in Python 2.
37.8.3. Carbon.App β Appearance ManagerΒΆ
37.8.4. Carbon.Appearance β Appearance Manager constantsΒΆ
37.8.5. Carbon.CF β Core FoundationΒΆ
The CFBase, CFArray, CFData, CFDictionary, CFString and
CFURL objects are supported, some only partially.
37.8.7. Carbon.CarbonEvt β Carbon Event ManagerΒΆ
37.8.8. Carbon.CarbonEvents β Carbon Event Manager constantsΒΆ
37.8.10. Carbon.Components β Component Manager constantsΒΆ
37.8.11. Carbon.ControlAccessor β Control Manager accssorsΒΆ
37.8.12. Carbon.Controls β Control Manager constantsΒΆ
37.8.13. Carbon.CoreFounation β CoreFounation constantsΒΆ
37.8.14. Carbon.CoreGraphics β CoreGraphics constantsΒΆ
37.8.15. Carbon.Ctl β Control ManagerΒΆ
37.8.16. Carbon.Dialogs β Dialog Manager constantsΒΆ
37.8.17. Carbon.Dlg β Dialog ManagerΒΆ
37.8.18. Carbon.Drag β Drag and Drop ManagerΒΆ
37.8.19. Carbon.Dragconst β Drag and Drop Manager constantsΒΆ
37.8.20. Carbon.Events β Event Manager constantsΒΆ
37.8.21. Carbon.Evt β Event ManagerΒΆ
37.8.22. Carbon.File β File ManagerΒΆ
37.8.23. Carbon.Files β File Manager constantsΒΆ
37.8.25. Carbon.Folder β Folder ManagerΒΆ
37.8.26. Carbon.Folders β Folder Manager constantsΒΆ
37.8.27. Carbon.Fonts β Font Manager constantsΒΆ
37.8.28. Carbon.Help β Help ManagerΒΆ
37.8.29. Carbon.IBCarbon β Carbon InterfaceBuilderΒΆ
37.8.30. Carbon.IBCarbonRuntime β Carbon InterfaceBuilder constantsΒΆ
37.8.31. Carbon.Icn β Carbon Icon ManagerΒΆ
37.8.32. Carbon.Icons β Carbon Icon Manager constantsΒΆ
37.8.33. Carbon.Launch β Carbon Launch ServicesΒΆ
37.8.34. Carbon.LaunchServices β Carbon Launch Services constantsΒΆ
37.8.35. Carbon.List β List ManagerΒΆ
37.8.36. Carbon.Lists β List Manager constantsΒΆ
37.8.37. Carbon.MacHelp β Help Manager constantsΒΆ
37.8.38. Carbon.MediaDescr β Parsers and generators for Quicktime Media descriptorsΒΆ
37.8.39. Carbon.Menu β Menu ManagerΒΆ
37.8.40. Carbon.Menus β Menu Manager constantsΒΆ
37.8.41. Carbon.Mlte β MultiLingual Text EditorΒΆ
37.8.42. Carbon.OSA β Carbon OSA InterfaceΒΆ
37.8.43. Carbon.OSAconst β Carbon OSA Interface constantsΒΆ
37.8.44. Carbon.QDOffscreen β QuickDraw Offscreen constantsΒΆ
37.8.46. Carbon.Qdoffs β QuickDraw OffscreenΒΆ
37.8.48. Carbon.QuickDraw β QuickDraw constantsΒΆ
37.8.49. Carbon.QuickTime β QuickTime constantsΒΆ
37.8.50. Carbon.Res β Resource Manager and HandlesΒΆ
37.8.51. Carbon.Resources β Resource Manager and Handles constantsΒΆ
37.8.52. Carbon.Scrap β Scrap ManagerΒΆ
This module is only fully available on Mac OS 9 and earlier under classic PPC MacPython. Very limited functionality is available under Carbon MacPython.
The Scrap Manager supports the simplest form of cut & paste operations on the Macintosh. It can be use for both inter- and intra-application clipboard operations.
The Scrap module provides low-level access to the functions of the Scrap
Manager. It contains the following functions:
-
Carbon.Scrap.InfoScrap()ΒΆ Return current information about the scrap. The information is encoded as a tuple containing the fields
(size, handle, count, state, path).Field
Meaning
size
Size of the scrap in bytes.
handle
Resource object representing the scrap.
count
Serial number of the scrap contents.
state
Integer; positive if in memory,
0if on disk, negative if uninitialized.path
Filename of the scrap when stored on disk.
See also
- Scrap Manager
Appleβs documentation for the Scrap Manager gives a lot of useful information about using the Scrap Manager in applications.
