blob: 454553ef6d994aa68da78cb404da475ebf2cd9ac [file] [log] [blame]
Jack Jansen94bebc02001-08-08 13:17:31 +00001/***********************************************************
2Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
3The Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23******************************************************************/
24
25
26#include "Python.h"
Jack Jansen94bebc02001-08-08 13:17:31 +000027#include "pymactoolbox.h"
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028#include <arpa/inet.h> /* for ntohl, htonl */
Jack Jansen94bebc02001-08-08 13:17:31 +000029
Jack Jansen94bebc02001-08-08 13:17:31 +000030
Jack Jansen94bebc02001-08-08 13:17:31 +000031/* Like strerror() but for Mac OS error numbers */
Raymond Hettingerec6eb362004-11-05 07:02:59 +000032char *
33PyMac_StrError(int err)
Jack Jansen94bebc02001-08-08 13:17:31 +000034{
35 static char buf[256];
Raymond Hettingerec6eb362004-11-05 07:02:59 +000036 PyObject *m;
37 PyObject *rv;
38
39 m = PyImport_ImportModule("MacOS");
40 if (!m) {
41 if (Py_VerboseFlag)
42 PyErr_Print();
43 PyErr_Clear();
44 rv = NULL;
45 }
46 else {
47 rv = PyObject_CallMethod(m, "GetErrorString", "i", err);
48 if (!rv)
Jack Jansendde800e2002-11-07 23:07:05 +000049 PyErr_Clear();
Raymond Hettingerec6eb362004-11-05 07:02:59 +000050 }
51 if (!rv) {
52 buf[0] = '\0';
53 }
54 else {
55 char *input = PyString_AsString(rv);
56 if (!input) {
57 PyErr_Clear();
58 buf[0] = '\0';
Jack Jansendde800e2002-11-07 23:07:05 +000059 } else {
Raymond Hettingerec6eb362004-11-05 07:02:59 +000060 strncpy(buf, input, sizeof(buf) - 1);
61 buf[sizeof(buf) - 1] = '\0';
Jack Jansendde800e2002-11-07 23:07:05 +000062 }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000063 Py_DECREF(rv);
Jack Jansendde800e2002-11-07 23:07:05 +000064 }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000065 Py_XDECREF(m);
Jack Jansen94bebc02001-08-08 13:17:31 +000066 return buf;
67}
68
69/* Exception object shared by all Mac specific modules for Mac OS errors */
70PyObject *PyMac_OSErrException;
71
72/* Initialize and return PyMac_OSErrException */
73PyObject *
Jack Jansen697842f2001-09-10 22:00:39 +000074PyMac_GetOSErrException(void)
Jack Jansen94bebc02001-08-08 13:17:31 +000075{
76 if (PyMac_OSErrException == NULL)
Jack Jansen8fce2ef2002-10-19 22:02:21 +000077 PyMac_OSErrException = PyErr_NewException("MacOS.Error", NULL, NULL);
Jack Jansen94bebc02001-08-08 13:17:31 +000078 return PyMac_OSErrException;
79}
80
81/* Set a MAC-specific error from errno, and return NULL; return None if no error */
82PyObject *
83PyErr_Mac(PyObject *eobj, int err)
84{
85 char *msg;
86 PyObject *v;
87
88 if (err == 0 && !PyErr_Occurred()) {
89 Py_INCREF(Py_None);
90 return Py_None;
91 }
92 if (err == -1 && PyErr_Occurred())
93 return NULL;
94 msg = PyMac_StrError(err);
95 v = Py_BuildValue("(is)", err, msg);
96 PyErr_SetObject(eobj, v);
97 Py_DECREF(v);
98 return NULL;
99}
100
101/* Call PyErr_Mac with PyMac_OSErrException */
102PyObject *
103PyMac_Error(OSErr err)
104{
105 return PyErr_Mac(PyMac_GetOSErrException(), err);
106}
107
Jack Jansen697842f2001-09-10 22:00:39 +0000108
Jack Jansen697842f2001-09-10 22:00:39 +0000109OSErr
110PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
111{
Raymond Hettingerec6eb362004-11-05 07:02:59 +0000112 PyObject *fs, *exc;
113 PyObject *rv = NULL;
114 char *input;
115 OSErr err = noErr;
116
Jack Jansen697842f2001-09-10 22:00:39 +0000117 *path = '\0';
Raymond Hettingerec6eb362004-11-05 07:02:59 +0000118
119 fs = PyMac_BuildFSSpec(fss);
120 if (!fs)
121 goto error;
122
123 rv = PyObject_CallMethod(fs, "as_pathname", "");
124 if (!rv)
125 goto error;
126
127 input = PyString_AsString(rv);
128 if (!input)
129 goto error;
130
131 strncpy(path, input, len - 1);
132 path[len - 1] = '\0';
133
134 Py_XDECREF(rv);
135 Py_XDECREF(fs);
136 return err;
137
138 error:
139 exc = PyErr_Occurred();
140 if (exc && PyErr_GivenExceptionMatches(exc,
141 PyMac_GetOSErrException())) {
142 PyObject *args = PyObject_GetAttrString(exc, "args");
143 if (args) {
144 char *ignore;
145 PyArg_ParseTuple(args, "is", &err, &ignore);
146 Py_XDECREF(args);
147 }
Jack Jansen697842f2001-09-10 22:00:39 +0000148 }
Raymond Hettingerec6eb362004-11-05 07:02:59 +0000149 if (err == noErr)
150 err = -1;
151 PyErr_Clear();
152 Py_XDECREF(rv);
153 Py_XDECREF(fs);
154 return err;
Jack Jansen697842f2001-09-10 22:00:39 +0000155}
156
Jack Jansen94bebc02001-08-08 13:17:31 +0000157/* Convert a 4-char string object argument to an OSType value */
158int
159PyMac_GetOSType(PyObject *v, OSType *pr)
160{
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000161 uint32_t tmp;
Guido van Rossum5e23d572007-07-09 11:17:33 +0000162 const char *str;
163 int len;
164 if (PyUnicode_Check(v)) {
165 v = _PyUnicode_AsDefaultEncodedString(v, NULL);
166 if (v == NULL)
167 return 0;
168 }
169 if (PyString_Check(v)) {
170 str = PyString_AS_STRING(v);
171 len = PyString_GET_SIZE(v);
172 }
173 else if (PyBytes_Check(v)) {
174 str = PyBytes_AS_STRING(v);
175 len = PyBytes_GET_SIZE(v);
176 }
177 else {
Jack Jansen94bebc02001-08-08 13:17:31 +0000178 PyErr_SetString(PyExc_TypeError,
Guido van Rossum5e23d572007-07-09 11:17:33 +0000179 "OSType arg must be string (of 4 chars)");
Jack Jansen94bebc02001-08-08 13:17:31 +0000180 return 0;
181 }
Guido van Rossum5e23d572007-07-09 11:17:33 +0000182 if (len != 4) {
183 PyErr_SetString(PyExc_TypeError,
184 "OSType arg must be (string of) 4 chars");
185 return 0;
186 }
187 memcpy((char *)&tmp, str, 4);
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000188 *pr = (OSType)ntohl(tmp);
Jack Jansen94bebc02001-08-08 13:17:31 +0000189 return 1;
190}
191
192/* Convert an OSType value to a 4-char string object */
193PyObject *
194PyMac_BuildOSType(OSType t)
195{
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000196 uint32_t tmp = htonl((uint32_t)t);
Guido van Rossum98297ee2007-11-06 21:34:58 +0000197 return PyString_FromStringAndSize((char *)&tmp, 4);
Jack Jansen94bebc02001-08-08 13:17:31 +0000198}
199
200/* Convert an NumVersion value to a 4-element tuple */
201PyObject *
202PyMac_BuildNumVersion(NumVersion t)
203{
204 return Py_BuildValue("(hhhh)", t.majorRev, t.minorAndBugRev, t.stage, t.nonRelRev);
205}
206
207
208/* Convert a Python string object to a Str255 */
209int
210PyMac_GetStr255(PyObject *v, Str255 pbuf)
211{
Guido van Rossuma0982942007-07-10 08:30:03 +0000212 char *ptr;
213 Py_ssize_t len = 1000;
214
215 if (PyUnicode_Check(v)) {
216 v = _PyUnicode_AsDefaultEncodedString(v, NULL);
217 if (v == NULL)
Guido van Rossumf7a94e42007-07-27 04:41:00 +0000218 return 0;
Guido van Rossuma0982942007-07-10 08:30:03 +0000219 }
220 if (PyString_Check(v)) {
221 ptr = PyString_AS_STRING(v);
222 len = PyString_GET_SIZE(v);
223 }
224 else if (PyBytes_Check(v)) {
225 ptr = PyBytes_AS_STRING(v);
226 len = PyBytes_GET_SIZE(v);
227 }
228 if (len > 255) {
Jack Jansen94bebc02001-08-08 13:17:31 +0000229 PyErr_SetString(PyExc_TypeError,
Guido van Rossuma0982942007-07-10 08:30:03 +0000230 "Str255 arg must be string/bytes of at most 255 chars");
Jack Jansen94bebc02001-08-08 13:17:31 +0000231 return 0;
232 }
233 pbuf[0] = len;
Guido van Rossuma0982942007-07-10 08:30:03 +0000234 memcpy((char *)(pbuf+1), ptr, len);
Jack Jansen94bebc02001-08-08 13:17:31 +0000235 return 1;
236}
237
238/* Convert a Str255 to a Python string object */
239PyObject *
240PyMac_BuildStr255(Str255 s)
241{
242 if ( s == NULL ) {
243 PyErr_SetString(PyExc_SystemError, "Str255 pointer is NULL");
244 return NULL;
245 }
246 return PyString_FromStringAndSize((char *)&s[1], (int)s[0]);
247}
248
249PyObject *
250PyMac_BuildOptStr255(Str255 s)
251{
252 if ( s == NULL ) {
253 Py_INCREF(Py_None);
254 return Py_None;
255 }
256 return PyString_FromStringAndSize((char *)&s[1], (int)s[0]);
257}
258
259
260
261/* Convert a Python object to a Rect.
262 The object must be a (left, top, right, bottom) tuple.
263 (This differs from the order in the struct but is consistent with
264 the arguments to SetRect(), and also with STDWIN). */
265int
266PyMac_GetRect(PyObject *v, Rect *r)
267{
268 return PyArg_Parse(v, "(hhhh)", &r->left, &r->top, &r->right, &r->bottom);
269}
270
271/* Convert a Rect to a Python object */
272PyObject *
273PyMac_BuildRect(Rect *r)
274{
275 return Py_BuildValue("(hhhh)", r->left, r->top, r->right, r->bottom);
276}
277
278
279/* Convert a Python object to a Point.
280 The object must be a (h, v) tuple.
281 (This differs from the order in the struct but is consistent with
282 the arguments to SetPoint(), and also with STDWIN). */
283int
284PyMac_GetPoint(PyObject *v, Point *p)
285{
286 return PyArg_Parse(v, "(hh)", &p->h, &p->v);
287}
288
289/* Convert a Point to a Python object */
290PyObject *
291PyMac_BuildPoint(Point p)
292{
293 return Py_BuildValue("(hh)", p.h, p.v);
294}
295
296
297/* Convert a Python object to an EventRecord.
298 The object must be a (what, message, when, (v, h), modifiers) tuple. */
299int
300PyMac_GetEventRecord(PyObject *v, EventRecord *e)
301{
Jack Jansen84c2b1b2003-04-17 20:44:21 +0000302 return PyArg_Parse(v, "(Hkk(hh)H)",
Jack Jansen94bebc02001-08-08 13:17:31 +0000303 &e->what,
304 &e->message,
305 &e->when,
306 &e->where.h,
307 &e->where.v,
308 &e->modifiers);
309}
310
311/* Convert a Rect to an EventRecord object */
312PyObject *
313PyMac_BuildEventRecord(EventRecord *e)
314{
315 return Py_BuildValue("(hll(hh)h)",
316 e->what,
317 e->message,
318 e->when,
319 e->where.h,
320 e->where.v,
321 e->modifiers);
322}
323
324/* Convert Python object to Fixed */
325int
326PyMac_GetFixed(PyObject *v, Fixed *f)
327{
328 double d;
329
330 if( !PyArg_Parse(v, "d", &d))
331 return 0;
332 *f = (Fixed)(d * 0x10000);
333 return 1;
334}
335
Jack Jansen06bd3232001-08-27 14:01:05 +0000336/* Convert a Fixed to a Python object */
Jack Jansen94bebc02001-08-08 13:17:31 +0000337PyObject *
338PyMac_BuildFixed(Fixed f)
339{
340 double d;
341
342 d = f;
343 d = d / 0x10000;
344 return Py_BuildValue("d", d);
345}
346
347/* Convert wide to/from Python int or (hi, lo) tuple. XXXX Should use Python longs */
348int
349PyMac_Getwide(PyObject *v, wide *rv)
350{
351 if (PyInt_Check(v)) {
352 rv->hi = 0;
353 rv->lo = PyInt_AsLong(v);
354 if( rv->lo & 0x80000000 )
355 rv->hi = -1;
356 return 1;
357 }
Jack Jansen84c2b1b2003-04-17 20:44:21 +0000358 return PyArg_Parse(v, "(kk)", &rv->hi, &rv->lo);
Jack Jansen94bebc02001-08-08 13:17:31 +0000359}
360
361
362PyObject *
363PyMac_Buildwide(wide *w)
364{
365 if ( (w->hi == 0 && (w->lo & 0x80000000) == 0) ||
366 (w->hi == -1 && (w->lo & 0x80000000) ) )
367 return PyInt_FromLong(w->lo);
368 return Py_BuildValue("(ll)", w->hi, w->lo);
369}
370
371#ifdef USE_TOOLBOX_OBJECT_GLUE
372/*
373** Glue together the toolbox objects.
374**
375** Because toolbox modules interdepend on each other, they use each others
376** object types, on MacOSX/MachO this leads to the situation that they
377** cannot be dynamically loaded (or they would all have to be lumped into
378** a single .so, but this would be bad for extensibility).
379**
380** This file defines wrappers for all the _New and _Convert functions,
381** which are the Py_BuildValue and PyArg_ParseTuple helpers. The wrappers
382** check an indirection function pointer, and if it isn't filled in yet
383** they import the appropriate module, whose init routine should fill in
384** the pointer.
385*/
386
387#define GLUE_NEW(object, routinename, module) \
388PyObject *(*PyMacGluePtr_##routinename)(object); \
389\
390PyObject *routinename(object cobj) { \
391 if (!PyMacGluePtr_##routinename) { \
392 if (!PyImport_ImportModule(module)) return NULL; \
393 if (!PyMacGluePtr_##routinename) { \
394 PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
395 return NULL; \
396 } \
397 } \
398 return (*PyMacGluePtr_##routinename)(cobj); \
399}
400
401#define GLUE_CONVERT(object, routinename, module) \
402int (*PyMacGluePtr_##routinename)(PyObject *, object *); \
403\
404int routinename(PyObject *pyobj, object *cobj) { \
405 if (!PyMacGluePtr_##routinename) { \
Martin v. Löwis18e16552006-02-15 17:27:45 +0000406 if (!PyImport_ImportModule(module)) return 0; \
Jack Jansen94bebc02001-08-08 13:17:31 +0000407 if (!PyMacGluePtr_##routinename) { \
408 PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
Martin v. Löwis18e16552006-02-15 17:27:45 +0000409 return 0; \
Jack Jansen94bebc02001-08-08 13:17:31 +0000410 } \
411 } \
412 return (*PyMacGluePtr_##routinename)(pyobj, cobj); \
413}
Jack Jansenfabd00f2001-09-01 23:39:58 +0000414
Jack Jansenad5e76a2003-03-02 23:16:50 +0000415GLUE_NEW(FSSpec *, PyMac_BuildFSSpec, "Carbon.File")
416GLUE_CONVERT(FSSpec, PyMac_GetFSSpec, "Carbon.File")
417GLUE_NEW(FSRef *, PyMac_BuildFSRef, "Carbon.File")
418GLUE_CONVERT(FSRef, PyMac_GetFSRef, "Carbon.File")
Jack Jansen94bebc02001-08-08 13:17:31 +0000419
Jack Jansen06bd3232001-08-27 14:01:05 +0000420GLUE_NEW(AppleEvent *, AEDesc_New, "Carbon.AE") /* XXXX Why by address? */
Jack Jansenb2a57722003-01-17 23:11:17 +0000421GLUE_NEW(AppleEvent *, AEDesc_NewBorrowed, "Carbon.AE")
Jack Jansen06bd3232001-08-27 14:01:05 +0000422GLUE_CONVERT(AppleEvent, AEDesc_Convert, "Carbon.AE")
Jack Jansen94bebc02001-08-08 13:17:31 +0000423
Jack Jansen06bd3232001-08-27 14:01:05 +0000424GLUE_NEW(Component, CmpObj_New, "Carbon.Cm")
425GLUE_CONVERT(Component, CmpObj_Convert, "Carbon.Cm")
426GLUE_NEW(ComponentInstance, CmpInstObj_New, "Carbon.Cm")
427GLUE_CONVERT(ComponentInstance, CmpInstObj_Convert, "Carbon.Cm")
Jack Jansen94bebc02001-08-08 13:17:31 +0000428
Jack Jansen06bd3232001-08-27 14:01:05 +0000429GLUE_NEW(ControlHandle, CtlObj_New, "Carbon.Ctl")
430GLUE_CONVERT(ControlHandle, CtlObj_Convert, "Carbon.Ctl")
Jack Jansen94bebc02001-08-08 13:17:31 +0000431
Jack Jansen06bd3232001-08-27 14:01:05 +0000432GLUE_NEW(DialogPtr, DlgObj_New, "Carbon.Dlg")
433GLUE_CONVERT(DialogPtr, DlgObj_Convert, "Carbon.Dlg")
434GLUE_NEW(DialogPtr, DlgObj_WhichDialog, "Carbon.Dlg")
Jack Jansen94bebc02001-08-08 13:17:31 +0000435
Jack Jansen06bd3232001-08-27 14:01:05 +0000436GLUE_NEW(DragReference, DragObj_New, "Carbon.Drag")
437GLUE_CONVERT(DragReference, DragObj_Convert, "Carbon.Drag")
Jack Jansen94bebc02001-08-08 13:17:31 +0000438
Jack Jansen06bd3232001-08-27 14:01:05 +0000439GLUE_NEW(ListHandle, ListObj_New, "Carbon.List")
440GLUE_CONVERT(ListHandle, ListObj_Convert, "Carbon.List")
Jack Jansen94bebc02001-08-08 13:17:31 +0000441
Jack Jansen06bd3232001-08-27 14:01:05 +0000442GLUE_NEW(MenuHandle, MenuObj_New, "Carbon.Menu")
443GLUE_CONVERT(MenuHandle, MenuObj_Convert, "Carbon.Menu")
Jack Jansen94bebc02001-08-08 13:17:31 +0000444
Jack Jansen06bd3232001-08-27 14:01:05 +0000445GLUE_NEW(GrafPtr, GrafObj_New, "Carbon.Qd")
446GLUE_CONVERT(GrafPtr, GrafObj_Convert, "Carbon.Qd")
447GLUE_NEW(BitMapPtr, BMObj_New, "Carbon.Qd")
448GLUE_CONVERT(BitMapPtr, BMObj_Convert, "Carbon.Qd")
449GLUE_NEW(RGBColor *, QdRGB_New, "Carbon.Qd") /* XXXX Why? */
450GLUE_CONVERT(RGBColor, QdRGB_Convert, "Carbon.Qd")
Jack Jansen94bebc02001-08-08 13:17:31 +0000451
Jack Jansen06bd3232001-08-27 14:01:05 +0000452GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
453GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
Jack Jansen94bebc02001-08-08 13:17:31 +0000454
Jack Jansen06bd3232001-08-27 14:01:05 +0000455GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
456GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
457GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
458GLUE_CONVERT(Movie, MovieObj_Convert, "Carbon.Qt")
459GLUE_NEW(MovieController, MovieCtlObj_New, "Carbon.Qt")
460GLUE_CONVERT(MovieController, MovieCtlObj_Convert, "Carbon.Qt")
461GLUE_NEW(TimeBase, TimeBaseObj_New, "Carbon.Qt")
462GLUE_CONVERT(TimeBase, TimeBaseObj_Convert, "Carbon.Qt")
463GLUE_NEW(UserData, UserDataObj_New, "Carbon.Qt")
464GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
465GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
466GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
Jack Jansen94bebc02001-08-08 13:17:31 +0000467
Jack Jansen06bd3232001-08-27 14:01:05 +0000468GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
469GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")
470GLUE_NEW(Handle, OptResObj_New, "Carbon.Res")
471GLUE_CONVERT(Handle, OptResObj_Convert, "Carbon.Res")
Jack Jansen94bebc02001-08-08 13:17:31 +0000472
Jack Jansen06bd3232001-08-27 14:01:05 +0000473GLUE_NEW(TEHandle, TEObj_New, "Carbon.TE")
474GLUE_CONVERT(TEHandle, TEObj_Convert, "Carbon.TE")
Jack Jansen94bebc02001-08-08 13:17:31 +0000475
Jack Jansen06bd3232001-08-27 14:01:05 +0000476GLUE_NEW(WindowPtr, WinObj_New, "Carbon.Win")
477GLUE_CONVERT(WindowPtr, WinObj_Convert, "Carbon.Win")
478GLUE_NEW(WindowPtr, WinObj_WhichWindow, "Carbon.Win")
Jack Jansen94bebc02001-08-08 13:17:31 +0000479
Jack Jansen4eb45e72003-05-27 21:39:58 +0000480GLUE_CONVERT(CFTypeRef, CFObj_Convert, "Carbon.CF")
481GLUE_NEW(CFTypeRef, CFObj_New, "Carbon.CF")
482
Jack Jansen537a69f2001-11-05 14:39:22 +0000483GLUE_CONVERT(CFTypeRef, CFTypeRefObj_Convert, "Carbon.CF")
484GLUE_NEW(CFTypeRef, CFTypeRefObj_New, "Carbon.CF")
485
486GLUE_CONVERT(CFStringRef, CFStringRefObj_Convert, "Carbon.CF")
487GLUE_NEW(CFStringRef, CFStringRefObj_New, "Carbon.CF")
488GLUE_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert, "Carbon.CF")
489GLUE_NEW(CFMutableStringRef, CFMutableStringRefObj_New, "Carbon.CF")
490
491GLUE_CONVERT(CFArrayRef, CFArrayRefObj_Convert, "Carbon.CF")
492GLUE_NEW(CFArrayRef, CFArrayRefObj_New, "Carbon.CF")
493GLUE_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert, "Carbon.CF")
494GLUE_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New, "Carbon.CF")
495
496GLUE_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert, "Carbon.CF")
497GLUE_NEW(CFDictionaryRef, CFDictionaryRefObj_New, "Carbon.CF")
498GLUE_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert, "Carbon.CF")
499GLUE_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New, "Carbon.CF")
500
501GLUE_CONVERT(CFURLRef, CFURLRefObj_Convert, "Carbon.CF")
502GLUE_CONVERT(CFURLRef, OptionalCFURLRefObj_Convert, "Carbon.CF")
503GLUE_NEW(CFURLRef, CFURLRefObj_New, "Carbon.CF")
504
Michael W. Hudson5f26dda2002-11-09 14:47:18 +0000505#endif /* USE_TOOLBOX_OBJECT_GLUE */