blob: ba150622299e11134ef5f8c9d107594f77b36a21 [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"
28
Jack Jansen94bebc02001-08-08 13:17:31 +000029
Jack Jansen94bebc02001-08-08 13:17:31 +000030/* Like strerror() but for Mac OS error numbers */
31char *PyMac_StrError(int err)
32{
33 static char buf[256];
34 Handle h;
35 char *str;
Jack Jansendde800e2002-11-07 23:07:05 +000036 static int errors_loaded;
Jack Jansen94bebc02001-08-08 13:17:31 +000037
38 h = GetResource('Estr', err);
Jack Jansendde800e2002-11-07 23:07:05 +000039 if (!h && !errors_loaded) {
40 /*
41 ** Attempt to open the resource file containing the
42 ** Estr resources. We ignore all errors. We also try
43 ** this only once.
44 */
Jack Jansendde800e2002-11-07 23:07:05 +000045 PyObject *m, *rv;
Michael W. Hudson5f26dda2002-11-09 14:47:18 +000046 errors_loaded = 1;
Jack Jansendde800e2002-11-07 23:07:05 +000047
48 m = PyImport_ImportModule("macresource");
49 if (!m) {
50 if (Py_VerboseFlag)
51 PyErr_Print();
52 PyErr_Clear();
53 } else {
54 rv = PyObject_CallMethod(m, "open_error_resource", "");
55 if (!rv) {
56 if (Py_VerboseFlag)
57 PyErr_Print();
58 PyErr_Clear();
59 } else {
60 Py_DECREF(rv);
61 /* And try again... */
62 h = GetResource('Estr', err);
63 }
64 }
65 }
66 /*
67 ** Whether the code above succeeded or not, we won't try
68 ** again.
69 */
70 errors_loaded = 1;
71
Jack Jansen94bebc02001-08-08 13:17:31 +000072 if ( h ) {
73 HLock(h);
74 str = (char *)*h;
75 memcpy(buf, str+1, (unsigned char)str[0]);
76 buf[(unsigned char)str[0]] = '\0';
77 HUnlock(h);
78 ReleaseResource(h);
79 } else {
Tim Peters22a51ef2001-12-04 01:11:32 +000080 PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err);
Jack Jansen94bebc02001-08-08 13:17:31 +000081 }
82 return buf;
83}
84
85/* Exception object shared by all Mac specific modules for Mac OS errors */
86PyObject *PyMac_OSErrException;
87
88/* Initialize and return PyMac_OSErrException */
89PyObject *
Jack Jansen697842f2001-09-10 22:00:39 +000090PyMac_GetOSErrException(void)
Jack Jansen94bebc02001-08-08 13:17:31 +000091{
92 if (PyMac_OSErrException == NULL)
Jack Jansen8fce2ef2002-10-19 22:02:21 +000093 PyMac_OSErrException = PyErr_NewException("MacOS.Error", NULL, NULL);
Jack Jansen94bebc02001-08-08 13:17:31 +000094 return PyMac_OSErrException;
95}
96
97/* Set a MAC-specific error from errno, and return NULL; return None if no error */
98PyObject *
99PyErr_Mac(PyObject *eobj, int err)
100{
101 char *msg;
102 PyObject *v;
103
104 if (err == 0 && !PyErr_Occurred()) {
105 Py_INCREF(Py_None);
106 return Py_None;
107 }
108 if (err == -1 && PyErr_Occurred())
109 return NULL;
110 msg = PyMac_StrError(err);
111 v = Py_BuildValue("(is)", err, msg);
112 PyErr_SetObject(eobj, v);
113 Py_DECREF(v);
114 return NULL;
115}
116
117/* Call PyErr_Mac with PyMac_OSErrException */
118PyObject *
119PyMac_Error(OSErr err)
120{
121 return PyErr_Mac(PyMac_GetOSErrException(), err);
122}
123
Jack Jansen697842f2001-09-10 22:00:39 +0000124
Jack Jansen697842f2001-09-10 22:00:39 +0000125OSErr
126PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
127{
128 FSRef fsr;
129 OSErr err;
130
131 *path = '\0';
132 err = FSpMakeFSRef(fss, &fsr);
133 if ( err == fnfErr ) {
134 /* FSSpecs can point to non-existing files, fsrefs can't. */
135 FSSpec fss2;
136 int tocopy;
137
138 err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2);
139 if ( err ) return err;
140 err = FSpMakeFSRef(&fss2, &fsr);
141 if ( err ) return err;
142 err = (OSErr)FSRefMakePath(&fsr, path, len-1);
143 if ( err ) return err;
144 /* This part is not 100% safe: we append the filename part, but
145 ** I'm not sure that we don't run afoul of the various 8bit
146 ** encodings here. Will have to look this up at some point...
147 */
148 strcat(path, "/");
149 tocopy = fss->name[0];
150 if ( strlen(path) + tocopy >= len )
151 tocopy = len - strlen(path) - 1;
152 if ( tocopy > 0 )
153 strncat(path, fss->name+1, tocopy);
154 } else {
155 if ( err ) return err;
156 err = (OSErr)FSRefMakePath(&fsr, path, len);
157 if ( err ) return err;
158 }
159 return 0;
160}
161
Jack Jansen21ed16a2002-08-02 14:11:24 +0000162
163#ifdef WITH_NEXT_FRAMEWORK
164/*
165** In a bundle, find a file "resourceName" of type "resourceType". Return the
166** full pathname in "resourceURLCstr".
167*/
168static int
169locateResourcePy(CFStringRef resourceType, CFStringRef resourceName, char *resourceURLCStr, int length)
170{
171 CFBundleRef mainBundle = NULL;
172 CFURLRef URL, absoluteURL;
173 CFStringRef filenameString, filepathString;
174 CFIndex size, i;
175 CFArrayRef arrayRef = NULL;
176 int success = 0;
177
Jack Jansen21ed16a2002-08-02 14:11:24 +0000178 CFURLPathStyle thePathStyle = kCFURLPOSIXPathStyle;
Jack Jansen21ed16a2002-08-02 14:11:24 +0000179
180 /* Get a reference to our main bundle */
181 mainBundle = CFBundleGetMainBundle();
182
183 /* If we are running inside a bundle, look through it. Otherwise, do nothing. */
184 if (mainBundle) {
185
186 /* Look for py files in the main bundle by type */
187 arrayRef = CFBundleCopyResourceURLsOfType( mainBundle,
188 resourceType,
189 NULL );
190
191 /* See if there are any filename matches */
192 size = CFArrayGetCount(arrayRef);
193 for (i = 0; i < size; i++) {
194 URL = CFArrayGetValueAtIndex(arrayRef, i);
195 filenameString = CFURLCopyLastPathComponent(URL);
196 if (CFStringCompare(filenameString, resourceName, 0) == kCFCompareEqualTo) {
197 /* We found a match, get the file's full path */
198 absoluteURL = CFURLCopyAbsoluteURL(URL);
199 filepathString = CFURLCopyFileSystemPath(absoluteURL, thePathStyle);
200 CFRelease(absoluteURL);
201
202 /* Copy the full path into the caller's character buffer */
203 success = CFStringGetCString(filepathString, resourceURLCStr, length,
204 kCFStringEncodingMacRoman);
205
206 CFRelease(filepathString);
207 }
208 CFRelease(filenameString);
209 }
210 CFRelease(arrayRef);
211 }
212 return success;
213}
214
215/*
216** iff we are running in a .app framework then we could be
217** the main program for an applet. In that case, return the
218** script filename for the applet.
219** Otherwise return NULL.
220*/
221char *
222PyMac_GetAppletScriptFile(void)
223{
224 static char scriptpath[1024];
225
226 /* First we see whether we have __rawmain__.py and run that if it
227 ** is there. This is used for applets that want sys.argv to be
228 ** unix-like: __rawmain__ will construct it (from the initial appleevent)
229 ** and then call __main__.py.
230 */
231 if (locateResourcePy(CFSTR("py"), CFSTR("__rawmain__.py"), scriptpath, 1024)) {
232 return scriptpath;
233 } else if (locateResourcePy(CFSTR("pyc"), CFSTR("__rawmain__.pyc"), scriptpath, 1024)) {
234 return scriptpath;
235 } else if (locateResourcePy(CFSTR("py"), CFSTR("__main__.py"), scriptpath, 1024)) {
236 return scriptpath;
237 } else if (locateResourcePy(CFSTR("pyc"), CFSTR("__main__.pyc"), scriptpath, 1024)) {
238 return scriptpath;
239 }
240 return NULL;
241}
242
243#endif
244
245
Jack Jansen94bebc02001-08-08 13:17:31 +0000246/* Convert a 4-char string object argument to an OSType value */
247int
248PyMac_GetOSType(PyObject *v, OSType *pr)
249{
250 if (!PyString_Check(v) || PyString_Size(v) != 4) {
251 PyErr_SetString(PyExc_TypeError,
252 "OSType arg must be string of 4 chars");
253 return 0;
254 }
255 memcpy((char *)pr, PyString_AsString(v), 4);
256 return 1;
257}
258
259/* Convert an OSType value to a 4-char string object */
260PyObject *
261PyMac_BuildOSType(OSType t)
262{
263 return PyString_FromStringAndSize((char *)&t, 4);
264}
265
266/* Convert an NumVersion value to a 4-element tuple */
267PyObject *
268PyMac_BuildNumVersion(NumVersion t)
269{
270 return Py_BuildValue("(hhhh)", t.majorRev, t.minorAndBugRev, t.stage, t.nonRelRev);
271}
272
273
274/* Convert a Python string object to a Str255 */
275int
276PyMac_GetStr255(PyObject *v, Str255 pbuf)
277{
278 int len;
279 if (!PyString_Check(v) || (len = PyString_Size(v)) > 255) {
280 PyErr_SetString(PyExc_TypeError,
281 "Str255 arg must be string of at most 255 chars");
282 return 0;
283 }
284 pbuf[0] = len;
285 memcpy((char *)(pbuf+1), PyString_AsString(v), len);
286 return 1;
287}
288
289/* Convert a Str255 to a Python string object */
290PyObject *
291PyMac_BuildStr255(Str255 s)
292{
293 if ( s == NULL ) {
294 PyErr_SetString(PyExc_SystemError, "Str255 pointer is NULL");
295 return NULL;
296 }
297 return PyString_FromStringAndSize((char *)&s[1], (int)s[0]);
298}
299
300PyObject *
301PyMac_BuildOptStr255(Str255 s)
302{
303 if ( s == NULL ) {
304 Py_INCREF(Py_None);
305 return Py_None;
306 }
307 return PyString_FromStringAndSize((char *)&s[1], (int)s[0]);
308}
309
310
311
312/* Convert a Python object to a Rect.
313 The object must be a (left, top, right, bottom) tuple.
314 (This differs from the order in the struct but is consistent with
315 the arguments to SetRect(), and also with STDWIN). */
316int
317PyMac_GetRect(PyObject *v, Rect *r)
318{
319 return PyArg_Parse(v, "(hhhh)", &r->left, &r->top, &r->right, &r->bottom);
320}
321
322/* Convert a Rect to a Python object */
323PyObject *
324PyMac_BuildRect(Rect *r)
325{
326 return Py_BuildValue("(hhhh)", r->left, r->top, r->right, r->bottom);
327}
328
329
330/* Convert a Python object to a Point.
331 The object must be a (h, v) tuple.
332 (This differs from the order in the struct but is consistent with
333 the arguments to SetPoint(), and also with STDWIN). */
334int
335PyMac_GetPoint(PyObject *v, Point *p)
336{
337 return PyArg_Parse(v, "(hh)", &p->h, &p->v);
338}
339
340/* Convert a Point to a Python object */
341PyObject *
342PyMac_BuildPoint(Point p)
343{
344 return Py_BuildValue("(hh)", p.h, p.v);
345}
346
347
348/* Convert a Python object to an EventRecord.
349 The object must be a (what, message, when, (v, h), modifiers) tuple. */
350int
351PyMac_GetEventRecord(PyObject *v, EventRecord *e)
352{
Jack Jansen84c2b1b2003-04-17 20:44:21 +0000353 return PyArg_Parse(v, "(Hkk(hh)H)",
Jack Jansen94bebc02001-08-08 13:17:31 +0000354 &e->what,
355 &e->message,
356 &e->when,
357 &e->where.h,
358 &e->where.v,
359 &e->modifiers);
360}
361
362/* Convert a Rect to an EventRecord object */
363PyObject *
364PyMac_BuildEventRecord(EventRecord *e)
365{
366 return Py_BuildValue("(hll(hh)h)",
367 e->what,
368 e->message,
369 e->when,
370 e->where.h,
371 e->where.v,
372 e->modifiers);
373}
374
375/* Convert Python object to Fixed */
376int
377PyMac_GetFixed(PyObject *v, Fixed *f)
378{
379 double d;
380
381 if( !PyArg_Parse(v, "d", &d))
382 return 0;
383 *f = (Fixed)(d * 0x10000);
384 return 1;
385}
386
Jack Jansen06bd3232001-08-27 14:01:05 +0000387/* Convert a Fixed to a Python object */
Jack Jansen94bebc02001-08-08 13:17:31 +0000388PyObject *
389PyMac_BuildFixed(Fixed f)
390{
391 double d;
392
393 d = f;
394 d = d / 0x10000;
395 return Py_BuildValue("d", d);
396}
397
398/* Convert wide to/from Python int or (hi, lo) tuple. XXXX Should use Python longs */
399int
400PyMac_Getwide(PyObject *v, wide *rv)
401{
402 if (PyInt_Check(v)) {
403 rv->hi = 0;
404 rv->lo = PyInt_AsLong(v);
405 if( rv->lo & 0x80000000 )
406 rv->hi = -1;
407 return 1;
408 }
Jack Jansen84c2b1b2003-04-17 20:44:21 +0000409 return PyArg_Parse(v, "(kk)", &rv->hi, &rv->lo);
Jack Jansen94bebc02001-08-08 13:17:31 +0000410}
411
412
413PyObject *
414PyMac_Buildwide(wide *w)
415{
416 if ( (w->hi == 0 && (w->lo & 0x80000000) == 0) ||
417 (w->hi == -1 && (w->lo & 0x80000000) ) )
418 return PyInt_FromLong(w->lo);
419 return Py_BuildValue("(ll)", w->hi, w->lo);
420}
421
422#ifdef USE_TOOLBOX_OBJECT_GLUE
423/*
424** Glue together the toolbox objects.
425**
426** Because toolbox modules interdepend on each other, they use each others
427** object types, on MacOSX/MachO this leads to the situation that they
428** cannot be dynamically loaded (or they would all have to be lumped into
429** a single .so, but this would be bad for extensibility).
430**
431** This file defines wrappers for all the _New and _Convert functions,
432** which are the Py_BuildValue and PyArg_ParseTuple helpers. The wrappers
433** check an indirection function pointer, and if it isn't filled in yet
434** they import the appropriate module, whose init routine should fill in
435** the pointer.
436*/
437
438#define GLUE_NEW(object, routinename, module) \
439PyObject *(*PyMacGluePtr_##routinename)(object); \
440\
441PyObject *routinename(object cobj) { \
442 if (!PyMacGluePtr_##routinename) { \
443 if (!PyImport_ImportModule(module)) return NULL; \
444 if (!PyMacGluePtr_##routinename) { \
445 PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
446 return NULL; \
447 } \
448 } \
449 return (*PyMacGluePtr_##routinename)(cobj); \
450}
451
452#define GLUE_CONVERT(object, routinename, module) \
453int (*PyMacGluePtr_##routinename)(PyObject *, object *); \
454\
455int routinename(PyObject *pyobj, object *cobj) { \
456 if (!PyMacGluePtr_##routinename) { \
457 if (!PyImport_ImportModule(module)) return NULL; \
458 if (!PyMacGluePtr_##routinename) { \
459 PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
460 return NULL; \
461 } \
462 } \
463 return (*PyMacGluePtr_##routinename)(pyobj, cobj); \
464}
Jack Jansenfabd00f2001-09-01 23:39:58 +0000465
Jack Jansenad5e76a2003-03-02 23:16:50 +0000466GLUE_NEW(FSSpec *, PyMac_BuildFSSpec, "Carbon.File")
467GLUE_CONVERT(FSSpec, PyMac_GetFSSpec, "Carbon.File")
468GLUE_NEW(FSRef *, PyMac_BuildFSRef, "Carbon.File")
469GLUE_CONVERT(FSRef, PyMac_GetFSRef, "Carbon.File")
Jack Jansen94bebc02001-08-08 13:17:31 +0000470
Jack Jansen06bd3232001-08-27 14:01:05 +0000471GLUE_NEW(AppleEvent *, AEDesc_New, "Carbon.AE") /* XXXX Why by address? */
Jack Jansenb2a57722003-01-17 23:11:17 +0000472GLUE_NEW(AppleEvent *, AEDesc_NewBorrowed, "Carbon.AE")
Jack Jansen06bd3232001-08-27 14:01:05 +0000473GLUE_CONVERT(AppleEvent, AEDesc_Convert, "Carbon.AE")
Jack Jansen94bebc02001-08-08 13:17:31 +0000474
Jack Jansen06bd3232001-08-27 14:01:05 +0000475GLUE_NEW(Component, CmpObj_New, "Carbon.Cm")
476GLUE_CONVERT(Component, CmpObj_Convert, "Carbon.Cm")
477GLUE_NEW(ComponentInstance, CmpInstObj_New, "Carbon.Cm")
478GLUE_CONVERT(ComponentInstance, CmpInstObj_Convert, "Carbon.Cm")
Jack Jansen94bebc02001-08-08 13:17:31 +0000479
Jack Jansen06bd3232001-08-27 14:01:05 +0000480GLUE_NEW(ControlHandle, CtlObj_New, "Carbon.Ctl")
481GLUE_CONVERT(ControlHandle, CtlObj_Convert, "Carbon.Ctl")
Jack Jansen94bebc02001-08-08 13:17:31 +0000482
Jack Jansen06bd3232001-08-27 14:01:05 +0000483GLUE_NEW(DialogPtr, DlgObj_New, "Carbon.Dlg")
484GLUE_CONVERT(DialogPtr, DlgObj_Convert, "Carbon.Dlg")
485GLUE_NEW(DialogPtr, DlgObj_WhichDialog, "Carbon.Dlg")
Jack Jansen94bebc02001-08-08 13:17:31 +0000486
Jack Jansen06bd3232001-08-27 14:01:05 +0000487GLUE_NEW(DragReference, DragObj_New, "Carbon.Drag")
488GLUE_CONVERT(DragReference, DragObj_Convert, "Carbon.Drag")
Jack Jansen94bebc02001-08-08 13:17:31 +0000489
Jack Jansen06bd3232001-08-27 14:01:05 +0000490GLUE_NEW(ListHandle, ListObj_New, "Carbon.List")
491GLUE_CONVERT(ListHandle, ListObj_Convert, "Carbon.List")
Jack Jansen94bebc02001-08-08 13:17:31 +0000492
Jack Jansen06bd3232001-08-27 14:01:05 +0000493GLUE_NEW(MenuHandle, MenuObj_New, "Carbon.Menu")
494GLUE_CONVERT(MenuHandle, MenuObj_Convert, "Carbon.Menu")
Jack Jansen94bebc02001-08-08 13:17:31 +0000495
Jack Jansen06bd3232001-08-27 14:01:05 +0000496GLUE_NEW(GrafPtr, GrafObj_New, "Carbon.Qd")
497GLUE_CONVERT(GrafPtr, GrafObj_Convert, "Carbon.Qd")
498GLUE_NEW(BitMapPtr, BMObj_New, "Carbon.Qd")
499GLUE_CONVERT(BitMapPtr, BMObj_Convert, "Carbon.Qd")
500GLUE_NEW(RGBColor *, QdRGB_New, "Carbon.Qd") /* XXXX Why? */
501GLUE_CONVERT(RGBColor, QdRGB_Convert, "Carbon.Qd")
Jack Jansen94bebc02001-08-08 13:17:31 +0000502
Jack Jansen06bd3232001-08-27 14:01:05 +0000503GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
504GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
Jack Jansen94bebc02001-08-08 13:17:31 +0000505
Jack Jansen06bd3232001-08-27 14:01:05 +0000506GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
507GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
508GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
509GLUE_CONVERT(Movie, MovieObj_Convert, "Carbon.Qt")
510GLUE_NEW(MovieController, MovieCtlObj_New, "Carbon.Qt")
511GLUE_CONVERT(MovieController, MovieCtlObj_Convert, "Carbon.Qt")
512GLUE_NEW(TimeBase, TimeBaseObj_New, "Carbon.Qt")
513GLUE_CONVERT(TimeBase, TimeBaseObj_Convert, "Carbon.Qt")
514GLUE_NEW(UserData, UserDataObj_New, "Carbon.Qt")
515GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
516GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
517GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
Jack Jansen94bebc02001-08-08 13:17:31 +0000518
Jack Jansen06bd3232001-08-27 14:01:05 +0000519GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
520GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")
521GLUE_NEW(Handle, OptResObj_New, "Carbon.Res")
522GLUE_CONVERT(Handle, OptResObj_Convert, "Carbon.Res")
Jack Jansen94bebc02001-08-08 13:17:31 +0000523
Jack Jansen06bd3232001-08-27 14:01:05 +0000524GLUE_NEW(TEHandle, TEObj_New, "Carbon.TE")
525GLUE_CONVERT(TEHandle, TEObj_Convert, "Carbon.TE")
Jack Jansen94bebc02001-08-08 13:17:31 +0000526
Jack Jansen06bd3232001-08-27 14:01:05 +0000527GLUE_NEW(WindowPtr, WinObj_New, "Carbon.Win")
528GLUE_CONVERT(WindowPtr, WinObj_Convert, "Carbon.Win")
529GLUE_NEW(WindowPtr, WinObj_WhichWindow, "Carbon.Win")
Jack Jansen94bebc02001-08-08 13:17:31 +0000530
Jack Jansen4eb45e72003-05-27 21:39:58 +0000531GLUE_CONVERT(CFTypeRef, CFObj_Convert, "Carbon.CF")
532GLUE_NEW(CFTypeRef, CFObj_New, "Carbon.CF")
533
Jack Jansen537a69f2001-11-05 14:39:22 +0000534GLUE_CONVERT(CFTypeRef, CFTypeRefObj_Convert, "Carbon.CF")
535GLUE_NEW(CFTypeRef, CFTypeRefObj_New, "Carbon.CF")
536
537GLUE_CONVERT(CFStringRef, CFStringRefObj_Convert, "Carbon.CF")
538GLUE_NEW(CFStringRef, CFStringRefObj_New, "Carbon.CF")
539GLUE_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert, "Carbon.CF")
540GLUE_NEW(CFMutableStringRef, CFMutableStringRefObj_New, "Carbon.CF")
541
542GLUE_CONVERT(CFArrayRef, CFArrayRefObj_Convert, "Carbon.CF")
543GLUE_NEW(CFArrayRef, CFArrayRefObj_New, "Carbon.CF")
544GLUE_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert, "Carbon.CF")
545GLUE_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New, "Carbon.CF")
546
547GLUE_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert, "Carbon.CF")
548GLUE_NEW(CFDictionaryRef, CFDictionaryRefObj_New, "Carbon.CF")
549GLUE_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert, "Carbon.CF")
550GLUE_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New, "Carbon.CF")
551
552GLUE_CONVERT(CFURLRef, CFURLRefObj_Convert, "Carbon.CF")
553GLUE_CONVERT(CFURLRef, OptionalCFURLRefObj_Convert, "Carbon.CF")
554GLUE_NEW(CFURLRef, CFURLRefObj_New, "Carbon.CF")
555
Michael W. Hudson5f26dda2002-11-09 14:47:18 +0000556#endif /* USE_TOOLBOX_OBJECT_GLUE */