UserString.MutableString has been removed in Python 3.0.
[python.git] / Doc / library / carbon.rst
blob94e0c9a61609d08e39df6f124fe59c32284c063b
2 .. _toolbox:
4 *********************
5 MacOS Toolbox Modules
6 *********************
8 There are a set of modules that provide interfaces to various MacOS toolboxes.
9 If applicable the module will define a number of Python objects for the various
10 structures declared by the toolbox, and operations will be implemented as
11 methods of the object.  Other operations will be implemented as functions in the
12 module.  Not all operations possible in C will also be possible in Python
13 (callbacks are often a problem), and parameters will occasionally be different
14 in Python (input and output buffers, especially).  All methods and functions
15 have a :attr:`__doc__` string describing their arguments and return values, and
16 for additional description you are referred to `Inside Macintosh
17 <http://developer.apple.com/documentation/macos8/mac8.html>`_ or similar works.
19 These modules all live in a package called :mod:`Carbon`. Despite that name they
20 are not all part of the Carbon framework: CF is really in the CoreFoundation
21 framework and Qt is in the QuickTime framework. The normal use pattern is ::
23    from Carbon import AE
25 .. warning::
27    The Carbon modules are removed in 3.0.
30 :mod:`Carbon.AE` --- Apple Events
31 =================================
33 .. module:: Carbon.AE
34    :platform: Mac
35    :synopsis: Interface to the Apple Events toolbox.
36    :deprecated:
40 :mod:`Carbon.AH` --- Apple Help
41 ===============================
43 .. module:: Carbon.AH
44    :platform: Mac
45    :synopsis: Interface to the Apple Help manager.
46    :deprecated:
50 :mod:`Carbon.App` --- Appearance Manager
51 ========================================
53 .. module:: Carbon.App
54    :platform: Mac
55    :synopsis: Interface to the Appearance Manager.
56    :deprecated:
60 :mod:`Carbon.CF` --- Core Foundation
61 ====================================
63 .. module:: Carbon.CF
64    :platform: Mac
65    :synopsis: Interface to the Core Foundation.
66    :deprecated:
69 The ``CFBase``, ``CFArray``, ``CFData``, ``CFDictionary``, ``CFString`` and
70 ``CFURL`` objects are supported, some only partially.
73 :mod:`Carbon.CG` --- Core Graphics
74 ==================================
76 .. module:: Carbon.CG
77    :platform: Mac
78    :synopsis: Interface to Core Graphics.
79    :deprecated:
83 :mod:`Carbon.CarbonEvt` --- Carbon Event Manager
84 ================================================
86 .. module:: Carbon.CarbonEvt
87    :platform: Mac
88    :synopsis: Interface to the Carbon Event Manager.
89    :deprecated:
93 :mod:`Carbon.Cm` --- Component Manager
94 ======================================
96 .. module:: Carbon.Cm
97    :platform: Mac
98    :synopsis: Interface to the Component Manager.
99    :deprecated:
103 :mod:`Carbon.Ctl` --- Control Manager
104 =====================================
106 .. module:: Carbon.Ctl
107    :platform: Mac
108    :synopsis: Interface to the Control Manager.
109    :deprecated:
113 :mod:`Carbon.Dlg` --- Dialog Manager
114 ====================================
116 .. module:: Carbon.Dlg
117    :platform: Mac
118    :synopsis: Interface to the Dialog Manager.
119    :deprecated:
123 :mod:`Carbon.Evt` --- Event Manager
124 ===================================
126 .. module:: Carbon.Evt
127    :platform: Mac
128    :synopsis: Interface to the classic Event Manager.
129    :deprecated:
133 :mod:`Carbon.Fm` --- Font Manager
134 =================================
136 .. module:: Carbon.Fm
137    :platform: Mac
138    :synopsis: Interface to the Font Manager.
139    :deprecated:
143 :mod:`Carbon.Folder` --- Folder Manager
144 =======================================
146 .. module:: Carbon.Folder
147    :platform: Mac
148    :synopsis: Interface to the Folder Manager.
149    :deprecated:
153 :mod:`Carbon.Help` --- Help Manager
154 ===================================
156 .. module:: Carbon.Help
157    :platform: Mac
158    :synopsis: Interface to the Carbon Help Manager.
159    :deprecated:
163 :mod:`Carbon.List` --- List Manager
164 ===================================
166 .. module:: Carbon.List
167    :platform: Mac
168    :synopsis: Interface to the List Manager.
169    :deprecated:
173 :mod:`Carbon.Menu` --- Menu Manager
174 ===================================
176 .. module:: Carbon.Menu
177    :platform: Mac
178    :synopsis: Interface to the Menu Manager.
179    :deprecated:
183 :mod:`Carbon.Mlte` --- MultiLingual Text Editor
184 ===============================================
186 .. module:: Carbon.Mlte
187    :platform: Mac
188    :synopsis: Interface to the MultiLingual Text Editor.
189    :deprecated:
193 :mod:`Carbon.Qd` --- QuickDraw
194 ==============================
196 .. module:: Carbon.Qd
197    :platform: Mac
198    :synopsis: Interface to the QuickDraw toolbox.
199    :deprecated:
203 :mod:`Carbon.Qdoffs` --- QuickDraw Offscreen
204 ============================================
206 .. module:: Carbon.Qdoffs
207    :platform: Mac
208    :synopsis: Interface to the QuickDraw Offscreen APIs.
209    :deprecated:
213 :mod:`Carbon.Qt` --- QuickTime
214 ==============================
216 .. module:: Carbon.Qt
217    :platform: Mac
218    :synopsis: Interface to the QuickTime toolbox.
219    :deprecated:
223 :mod:`Carbon.Res` --- Resource Manager and Handles
224 ==================================================
226 .. module:: Carbon.Res
227    :platform: Mac
228    :synopsis: Interface to the Resource Manager and Handles.
229    :deprecated:
233 :mod:`Carbon.Scrap` --- Scrap Manager
234 =====================================
236 .. module:: Carbon.Scrap
237    :platform: Mac
238    :synopsis: The Scrap Manager provides basic services for implementing cut & paste and
239               clipboard operations.
240    :deprecated:
243 This module is only fully available on MacOS9 and earlier under classic PPC
244 MacPython.  Very limited functionality is available under Carbon MacPython.
246 .. index:: single: Scrap Manager
248 The Scrap Manager supports the simplest form of cut & paste operations on the
249 Macintosh.  It can be use for both inter- and intra-application clipboard
250 operations.
252 The :mod:`Scrap` module provides low-level access to the functions of the Scrap
253 Manager.  It contains the following functions:
256 .. function:: InfoScrap()
258    Return current information about the scrap.  The information is encoded as a
259    tuple containing the fields ``(size, handle, count, state, path)``.
261    +----------+---------------------------------------------+
262    | Field    | Meaning                                     |
263    +==========+=============================================+
264    | *size*   | Size of the scrap in bytes.                 |
265    +----------+---------------------------------------------+
266    | *handle* | Resource object representing the scrap.     |
267    +----------+---------------------------------------------+
268    | *count*  | Serial number of the scrap contents.        |
269    +----------+---------------------------------------------+
270    | *state*  | Integer; positive if in memory, ``0`` if on |
271    |          | disk, negative if uninitialized.            |
272    +----------+---------------------------------------------+
273    | *path*   | Filename of the scrap when stored on disk.  |
274    +----------+---------------------------------------------+
277 .. seealso::
279    `Scrap Manager <http://developer.apple.com/documentation/mac/MoreToolbox/MoreToolbox-109.html>`_
280       Apple's documentation for the Scrap Manager gives a lot of useful information
281       about using the Scrap Manager in applications.
285 :mod:`Carbon.Snd` --- Sound Manager
286 ===================================
288 .. module:: Carbon.Snd
289    :platform: Mac
290    :synopsis: Interface to the Sound Manager.
291    :deprecated:
295 :mod:`Carbon.TE` --- TextEdit
296 =============================
298 .. module:: Carbon.TE
299    :platform: Mac
300    :synopsis: Interface to TextEdit.
301    :deprecated:
305 :mod:`Carbon.Win` --- Window Manager
306 ====================================
308 .. module:: Carbon.Win
309    :platform: Mac
310    :synopsis: Interface to the Window Manager.
311    :deprecated: