blob: 13e7afa6be5a747f91434f41503aacc46998d5d6 [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#ifdef WITHOUT_FRAMEWORKS
Jack Jansend844a5f2001-08-08 15:28:03 +000030#include <Script.h>
31#include <Resources.h>
Jack Jansen94bebc02001-08-08 13:17:31 +000032#endif
33
34/*
35** Find out what the current script is.
36** Donated by Fredrik Lund.
37*/
38char *PyMac_getscript()
39{
Jack Jansen666b1e72001-10-31 12:11:48 +000040#if TARGET_API_MAC_OSX
41 /* We cannot use GetSysFont because it requires the window manager
42 ** There are other APIs to query the default 8 bit encoding, but
43 ** I don't know about them (yet).
44 */
45 return "ascii";
46#else
Jack Jansen94bebc02001-08-08 13:17:31 +000047 int font, script, lang;
48 font = 0;
49 font = GetSysFont();
50 script = FontToScript(font);
51 switch (script) {
52 case smRoman:
53 lang = GetScriptVariable(script, smScriptLang);
54 if (lang == langIcelandic)
55 return "mac-iceland";
56 else if (lang == langTurkish)
57 return "mac-turkish";
58 else if (lang == langGreek)
59 return "mac-greek";
60 else
61 return "mac-roman";
62 break;
63#if 0
64 /* We don't have a codec for this, so don't return it */
65 case smJapanese:
66 return "mac-japan";
67#endif
68 case smGreek:
69 return "mac-greek";
70 case smCyrillic:
71 return "mac-cyrillic";
72 default:
73 return "ascii"; /* better than nothing */
74 }
Jack Jansen666b1e72001-10-31 12:11:48 +000075#endif /* TARGET_API_MAC_OSX */
Jack Jansen94bebc02001-08-08 13:17:31 +000076}
77
78/* Like strerror() but for Mac OS error numbers */
79char *PyMac_StrError(int err)
80{
81 static char buf[256];
82 Handle h;
83 char *str;
84
85 h = GetResource('Estr', err);
86 if ( h ) {
87 HLock(h);
88 str = (char *)*h;
89 memcpy(buf, str+1, (unsigned char)str[0]);
90 buf[(unsigned char)str[0]] = '\0';
91 HUnlock(h);
92 ReleaseResource(h);
93 } else {
Tim Peters22a51ef2001-12-04 01:11:32 +000094 PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err);
Jack Jansen94bebc02001-08-08 13:17:31 +000095 }
96 return buf;
97}
98
99/* Exception object shared by all Mac specific modules for Mac OS errors */
100PyObject *PyMac_OSErrException;
101
102/* Initialize and return PyMac_OSErrException */
103PyObject *
Jack Jansen697842f2001-09-10 22:00:39 +0000104PyMac_GetOSErrException(void)
Jack Jansen94bebc02001-08-08 13:17:31 +0000105{
106 if (PyMac_OSErrException == NULL)
Jack Jansen8fce2ef2002-10-19 22:02:21 +0000107 PyMac_OSErrException = PyErr_NewException("MacOS.Error", NULL, NULL);
Jack Jansen94bebc02001-08-08 13:17:31 +0000108 return PyMac_OSErrException;
109}
110
111/* Set a MAC-specific error from errno, and return NULL; return None if no error */
112PyObject *
113PyErr_Mac(PyObject *eobj, int err)
114{
115 char *msg;
116 PyObject *v;
117
118 if (err == 0 && !PyErr_Occurred()) {
119 Py_INCREF(Py_None);
120 return Py_None;
121 }
122 if (err == -1 && PyErr_Occurred())
123 return NULL;
124 msg = PyMac_StrError(err);
125 v = Py_BuildValue("(is)", err, msg);
126 PyErr_SetObject(eobj, v);
127 Py_DECREF(v);
128 return NULL;
129}
130
131/* Call PyErr_Mac with PyMac_OSErrException */
132PyObject *
133PyMac_Error(OSErr err)
134{
135 return PyErr_Mac(PyMac_GetOSErrException(), err);
136}
137
Jack Jansen697842f2001-09-10 22:00:39 +0000138
139#if TARGET_API_MAC_OSX
140OSErr
141PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
142{
143 FSRef fsr;
144 OSErr err;
145
146 *path = '\0';
147 err = FSpMakeFSRef(fss, &fsr);
148 if ( err == fnfErr ) {
149 /* FSSpecs can point to non-existing files, fsrefs can't. */
150 FSSpec fss2;
151 int tocopy;
152
153 err = FSMakeFSSpec(fss->vRefNum, fss->parID, "", &fss2);
154 if ( err ) return err;
155 err = FSpMakeFSRef(&fss2, &fsr);
156 if ( err ) return err;
157 err = (OSErr)FSRefMakePath(&fsr, path, len-1);
158 if ( err ) return err;
159 /* This part is not 100% safe: we append the filename part, but
160 ** I'm not sure that we don't run afoul of the various 8bit
161 ** encodings here. Will have to look this up at some point...
162 */
163 strcat(path, "/");
164 tocopy = fss->name[0];
165 if ( strlen(path) + tocopy >= len )
166 tocopy = len - strlen(path) - 1;
167 if ( tocopy > 0 )
168 strncat(path, fss->name+1, tocopy);
169 } else {
170 if ( err ) return err;
171 err = (OSErr)FSRefMakePath(&fsr, path, len);
172 if ( err ) return err;
173 }
174 return 0;
175}
176
177#endif /* TARGET_API_MAC_OSX */
Jack Jansen21ed16a2002-08-02 14:11:24 +0000178
179#ifdef WITH_NEXT_FRAMEWORK
180/*
181** In a bundle, find a file "resourceName" of type "resourceType". Return the
182** full pathname in "resourceURLCstr".
183*/
184static int
185locateResourcePy(CFStringRef resourceType, CFStringRef resourceName, char *resourceURLCStr, int length)
186{
187 CFBundleRef mainBundle = NULL;
188 CFURLRef URL, absoluteURL;
189 CFStringRef filenameString, filepathString;
190 CFIndex size, i;
191 CFArrayRef arrayRef = NULL;
192 int success = 0;
193
194#if TARGET_API_MAC_OSX
195 CFURLPathStyle thePathStyle = kCFURLPOSIXPathStyle;
196#else
197 CFURLPathStyle thePathStyle = kCFURLHFSPathStyle;
198#endif
199
200 /* Get a reference to our main bundle */
201 mainBundle = CFBundleGetMainBundle();
202
203 /* If we are running inside a bundle, look through it. Otherwise, do nothing. */
204 if (mainBundle) {
205
206 /* Look for py files in the main bundle by type */
207 arrayRef = CFBundleCopyResourceURLsOfType( mainBundle,
208 resourceType,
209 NULL );
210
211 /* See if there are any filename matches */
212 size = CFArrayGetCount(arrayRef);
213 for (i = 0; i < size; i++) {
214 URL = CFArrayGetValueAtIndex(arrayRef, i);
215 filenameString = CFURLCopyLastPathComponent(URL);
216 if (CFStringCompare(filenameString, resourceName, 0) == kCFCompareEqualTo) {
217 /* We found a match, get the file's full path */
218 absoluteURL = CFURLCopyAbsoluteURL(URL);
219 filepathString = CFURLCopyFileSystemPath(absoluteURL, thePathStyle);
220 CFRelease(absoluteURL);
221
222 /* Copy the full path into the caller's character buffer */
223 success = CFStringGetCString(filepathString, resourceURLCStr, length,
224 kCFStringEncodingMacRoman);
225
226 CFRelease(filepathString);
227 }
228 CFRelease(filenameString);
229 }
230 CFRelease(arrayRef);
231 }
232 return success;
233}
234
235/*
236** iff we are running in a .app framework then we could be
237** the main program for an applet. In that case, return the
238** script filename for the applet.
239** Otherwise return NULL.
240*/
241char *
242PyMac_GetAppletScriptFile(void)
243{
244 static char scriptpath[1024];
245
246 /* First we see whether we have __rawmain__.py and run that if it
247 ** is there. This is used for applets that want sys.argv to be
248 ** unix-like: __rawmain__ will construct it (from the initial appleevent)
249 ** and then call __main__.py.
250 */
251 if (locateResourcePy(CFSTR("py"), CFSTR("__rawmain__.py"), scriptpath, 1024)) {
252 return scriptpath;
253 } else if (locateResourcePy(CFSTR("pyc"), CFSTR("__rawmain__.pyc"), scriptpath, 1024)) {
254 return scriptpath;
255 } else if (locateResourcePy(CFSTR("py"), CFSTR("__main__.py"), scriptpath, 1024)) {
256 return scriptpath;
257 } else if (locateResourcePy(CFSTR("pyc"), CFSTR("__main__.pyc"), scriptpath, 1024)) {
258 return scriptpath;
259 }
260 return NULL;
261}
262
263#endif
264
265
Jack Jansen94bebc02001-08-08 13:17:31 +0000266/* Convert a 4-char string object argument to an OSType value */
267int
268PyMac_GetOSType(PyObject *v, OSType *pr)
269{
270 if (!PyString_Check(v) || PyString_Size(v) != 4) {
271 PyErr_SetString(PyExc_TypeError,
272 "OSType arg must be string of 4 chars");
273 return 0;
274 }
275 memcpy((char *)pr, PyString_AsString(v), 4);
276 return 1;
277}
278
279/* Convert an OSType value to a 4-char string object */
280PyObject *
281PyMac_BuildOSType(OSType t)
282{
283 return PyString_FromStringAndSize((char *)&t, 4);
284}
285
286/* Convert an NumVersion value to a 4-element tuple */
287PyObject *
288PyMac_BuildNumVersion(NumVersion t)
289{
290 return Py_BuildValue("(hhhh)", t.majorRev, t.minorAndBugRev, t.stage, t.nonRelRev);
291}
292
293
294/* Convert a Python string object to a Str255 */
295int
296PyMac_GetStr255(PyObject *v, Str255 pbuf)
297{
298 int len;
299 if (!PyString_Check(v) || (len = PyString_Size(v)) > 255) {
300 PyErr_SetString(PyExc_TypeError,
301 "Str255 arg must be string of at most 255 chars");
302 return 0;
303 }
304 pbuf[0] = len;
305 memcpy((char *)(pbuf+1), PyString_AsString(v), len);
306 return 1;
307}
308
309/* Convert a Str255 to a Python string object */
310PyObject *
311PyMac_BuildStr255(Str255 s)
312{
313 if ( s == NULL ) {
314 PyErr_SetString(PyExc_SystemError, "Str255 pointer is NULL");
315 return NULL;
316 }
317 return PyString_FromStringAndSize((char *)&s[1], (int)s[0]);
318}
319
320PyObject *
321PyMac_BuildOptStr255(Str255 s)
322{
323 if ( s == NULL ) {
324 Py_INCREF(Py_None);
325 return Py_None;
326 }
327 return PyString_FromStringAndSize((char *)&s[1], (int)s[0]);
328}
329
330
331
332/* Convert a Python object to a Rect.
333 The object must be a (left, top, right, bottom) tuple.
334 (This differs from the order in the struct but is consistent with
335 the arguments to SetRect(), and also with STDWIN). */
336int
337PyMac_GetRect(PyObject *v, Rect *r)
338{
339 return PyArg_Parse(v, "(hhhh)", &r->left, &r->top, &r->right, &r->bottom);
340}
341
342/* Convert a Rect to a Python object */
343PyObject *
344PyMac_BuildRect(Rect *r)
345{
346 return Py_BuildValue("(hhhh)", r->left, r->top, r->right, r->bottom);
347}
348
349
350/* Convert a Python object to a Point.
351 The object must be a (h, v) tuple.
352 (This differs from the order in the struct but is consistent with
353 the arguments to SetPoint(), and also with STDWIN). */
354int
355PyMac_GetPoint(PyObject *v, Point *p)
356{
357 return PyArg_Parse(v, "(hh)", &p->h, &p->v);
358}
359
360/* Convert a Point to a Python object */
361PyObject *
362PyMac_BuildPoint(Point p)
363{
364 return Py_BuildValue("(hh)", p.h, p.v);
365}
366
367
368/* Convert a Python object to an EventRecord.
369 The object must be a (what, message, when, (v, h), modifiers) tuple. */
370int
371PyMac_GetEventRecord(PyObject *v, EventRecord *e)
372{
373 return PyArg_Parse(v, "(Hll(hh)H)",
374 &e->what,
375 &e->message,
376 &e->when,
377 &e->where.h,
378 &e->where.v,
379 &e->modifiers);
380}
381
382/* Convert a Rect to an EventRecord object */
383PyObject *
384PyMac_BuildEventRecord(EventRecord *e)
385{
386 return Py_BuildValue("(hll(hh)h)",
387 e->what,
388 e->message,
389 e->when,
390 e->where.h,
391 e->where.v,
392 e->modifiers);
393}
394
395/* Convert Python object to Fixed */
396int
397PyMac_GetFixed(PyObject *v, Fixed *f)
398{
399 double d;
400
401 if( !PyArg_Parse(v, "d", &d))
402 return 0;
403 *f = (Fixed)(d * 0x10000);
404 return 1;
405}
406
Jack Jansen06bd3232001-08-27 14:01:05 +0000407/* Convert a Fixed to a Python object */
Jack Jansen94bebc02001-08-08 13:17:31 +0000408PyObject *
409PyMac_BuildFixed(Fixed f)
410{
411 double d;
412
413 d = f;
414 d = d / 0x10000;
415 return Py_BuildValue("d", d);
416}
417
418/* Convert wide to/from Python int or (hi, lo) tuple. XXXX Should use Python longs */
419int
420PyMac_Getwide(PyObject *v, wide *rv)
421{
422 if (PyInt_Check(v)) {
423 rv->hi = 0;
424 rv->lo = PyInt_AsLong(v);
425 if( rv->lo & 0x80000000 )
426 rv->hi = -1;
427 return 1;
428 }
429 return PyArg_Parse(v, "(ll)", &rv->hi, &rv->lo);
430}
431
432
433PyObject *
434PyMac_Buildwide(wide *w)
435{
436 if ( (w->hi == 0 && (w->lo & 0x80000000) == 0) ||
437 (w->hi == -1 && (w->lo & 0x80000000) ) )
438 return PyInt_FromLong(w->lo);
439 return Py_BuildValue("(ll)", w->hi, w->lo);
440}
441
442#ifdef USE_TOOLBOX_OBJECT_GLUE
443/*
444** Glue together the toolbox objects.
445**
446** Because toolbox modules interdepend on each other, they use each others
447** object types, on MacOSX/MachO this leads to the situation that they
448** cannot be dynamically loaded (or they would all have to be lumped into
449** a single .so, but this would be bad for extensibility).
450**
451** This file defines wrappers for all the _New and _Convert functions,
452** which are the Py_BuildValue and PyArg_ParseTuple helpers. The wrappers
453** check an indirection function pointer, and if it isn't filled in yet
454** they import the appropriate module, whose init routine should fill in
455** the pointer.
456*/
457
458#define GLUE_NEW(object, routinename, module) \
459PyObject *(*PyMacGluePtr_##routinename)(object); \
460\
461PyObject *routinename(object cobj) { \
462 if (!PyMacGluePtr_##routinename) { \
463 if (!PyImport_ImportModule(module)) return NULL; \
464 if (!PyMacGluePtr_##routinename) { \
465 PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
466 return NULL; \
467 } \
468 } \
469 return (*PyMacGluePtr_##routinename)(cobj); \
470}
471
472#define GLUE_CONVERT(object, routinename, module) \
473int (*PyMacGluePtr_##routinename)(PyObject *, object *); \
474\
475int routinename(PyObject *pyobj, object *cobj) { \
476 if (!PyMacGluePtr_##routinename) { \
477 if (!PyImport_ImportModule(module)) return NULL; \
478 if (!PyMacGluePtr_##routinename) { \
479 PyErr_SetString(PyExc_ImportError, "Module did not provide routine: " module ": " #routinename); \
480 return NULL; \
481 } \
482 } \
483 return (*PyMacGluePtr_##routinename)(pyobj, cobj); \
484}
Jack Jansenfabd00f2001-09-01 23:39:58 +0000485
486GLUE_NEW(FSSpec *, PyMac_BuildFSSpec, "macfs")
Jack Jansen94bebc02001-08-08 13:17:31 +0000487GLUE_CONVERT(FSSpec, PyMac_GetFSSpec, "macfs")
Jack Jansenfabd00f2001-09-01 23:39:58 +0000488GLUE_NEW(FSRef *, PyMac_BuildFSRef, "macfs")
489GLUE_CONVERT(FSRef, PyMac_GetFSRef, "macfs")
Jack Jansen94bebc02001-08-08 13:17:31 +0000490
Jack Jansen06bd3232001-08-27 14:01:05 +0000491GLUE_NEW(AppleEvent *, AEDesc_New, "Carbon.AE") /* XXXX Why by address? */
492GLUE_CONVERT(AppleEvent, AEDesc_Convert, "Carbon.AE")
Jack Jansen94bebc02001-08-08 13:17:31 +0000493
Jack Jansen06bd3232001-08-27 14:01:05 +0000494GLUE_NEW(Component, CmpObj_New, "Carbon.Cm")
495GLUE_CONVERT(Component, CmpObj_Convert, "Carbon.Cm")
496GLUE_NEW(ComponentInstance, CmpInstObj_New, "Carbon.Cm")
497GLUE_CONVERT(ComponentInstance, CmpInstObj_Convert, "Carbon.Cm")
Jack Jansen94bebc02001-08-08 13:17:31 +0000498
Jack Jansen06bd3232001-08-27 14:01:05 +0000499GLUE_NEW(ControlHandle, CtlObj_New, "Carbon.Ctl")
500GLUE_CONVERT(ControlHandle, CtlObj_Convert, "Carbon.Ctl")
Jack Jansen94bebc02001-08-08 13:17:31 +0000501
Jack Jansen06bd3232001-08-27 14:01:05 +0000502GLUE_NEW(DialogPtr, DlgObj_New, "Carbon.Dlg")
503GLUE_CONVERT(DialogPtr, DlgObj_Convert, "Carbon.Dlg")
504GLUE_NEW(DialogPtr, DlgObj_WhichDialog, "Carbon.Dlg")
Jack Jansen94bebc02001-08-08 13:17:31 +0000505
Jack Jansen06bd3232001-08-27 14:01:05 +0000506GLUE_NEW(DragReference, DragObj_New, "Carbon.Drag")
507GLUE_CONVERT(DragReference, DragObj_Convert, "Carbon.Drag")
Jack Jansen94bebc02001-08-08 13:17:31 +0000508
Jack Jansen06bd3232001-08-27 14:01:05 +0000509GLUE_NEW(ListHandle, ListObj_New, "Carbon.List")
510GLUE_CONVERT(ListHandle, ListObj_Convert, "Carbon.List")
Jack Jansen94bebc02001-08-08 13:17:31 +0000511
Jack Jansen06bd3232001-08-27 14:01:05 +0000512GLUE_NEW(MenuHandle, MenuObj_New, "Carbon.Menu")
513GLUE_CONVERT(MenuHandle, MenuObj_Convert, "Carbon.Menu")
Jack Jansen94bebc02001-08-08 13:17:31 +0000514
Jack Jansen06bd3232001-08-27 14:01:05 +0000515GLUE_NEW(GrafPtr, GrafObj_New, "Carbon.Qd")
516GLUE_CONVERT(GrafPtr, GrafObj_Convert, "Carbon.Qd")
517GLUE_NEW(BitMapPtr, BMObj_New, "Carbon.Qd")
518GLUE_CONVERT(BitMapPtr, BMObj_Convert, "Carbon.Qd")
519GLUE_NEW(RGBColor *, QdRGB_New, "Carbon.Qd") /* XXXX Why? */
520GLUE_CONVERT(RGBColor, QdRGB_Convert, "Carbon.Qd")
Jack Jansen94bebc02001-08-08 13:17:31 +0000521
Jack Jansen06bd3232001-08-27 14:01:05 +0000522GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs")
523GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs")
Jack Jansen94bebc02001-08-08 13:17:31 +0000524
Jack Jansen06bd3232001-08-27 14:01:05 +0000525GLUE_NEW(Track, TrackObj_New, "Carbon.Qt")
526GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt")
527GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt")
528GLUE_CONVERT(Movie, MovieObj_Convert, "Carbon.Qt")
529GLUE_NEW(MovieController, MovieCtlObj_New, "Carbon.Qt")
530GLUE_CONVERT(MovieController, MovieCtlObj_Convert, "Carbon.Qt")
531GLUE_NEW(TimeBase, TimeBaseObj_New, "Carbon.Qt")
532GLUE_CONVERT(TimeBase, TimeBaseObj_Convert, "Carbon.Qt")
533GLUE_NEW(UserData, UserDataObj_New, "Carbon.Qt")
534GLUE_CONVERT(UserData, UserDataObj_Convert, "Carbon.Qt")
535GLUE_NEW(Media, MediaObj_New, "Carbon.Qt")
536GLUE_CONVERT(Media, MediaObj_Convert, "Carbon.Qt")
Jack Jansen94bebc02001-08-08 13:17:31 +0000537
Jack Jansen06bd3232001-08-27 14:01:05 +0000538GLUE_NEW(Handle, ResObj_New, "Carbon.Res")
539GLUE_CONVERT(Handle, ResObj_Convert, "Carbon.Res")
540GLUE_NEW(Handle, OptResObj_New, "Carbon.Res")
541GLUE_CONVERT(Handle, OptResObj_Convert, "Carbon.Res")
Jack Jansen94bebc02001-08-08 13:17:31 +0000542
Jack Jansen06bd3232001-08-27 14:01:05 +0000543GLUE_NEW(TEHandle, TEObj_New, "Carbon.TE")
544GLUE_CONVERT(TEHandle, TEObj_Convert, "Carbon.TE")
Jack Jansen94bebc02001-08-08 13:17:31 +0000545
Jack Jansen06bd3232001-08-27 14:01:05 +0000546GLUE_NEW(WindowPtr, WinObj_New, "Carbon.Win")
547GLUE_CONVERT(WindowPtr, WinObj_Convert, "Carbon.Win")
548GLUE_NEW(WindowPtr, WinObj_WhichWindow, "Carbon.Win")
Jack Jansen94bebc02001-08-08 13:17:31 +0000549
Jack Jansen537a69f2001-11-05 14:39:22 +0000550GLUE_CONVERT(CFTypeRef, CFTypeRefObj_Convert, "Carbon.CF")
551GLUE_NEW(CFTypeRef, CFTypeRefObj_New, "Carbon.CF")
552
553GLUE_CONVERT(CFStringRef, CFStringRefObj_Convert, "Carbon.CF")
554GLUE_NEW(CFStringRef, CFStringRefObj_New, "Carbon.CF")
555GLUE_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert, "Carbon.CF")
556GLUE_NEW(CFMutableStringRef, CFMutableStringRefObj_New, "Carbon.CF")
557
558GLUE_CONVERT(CFArrayRef, CFArrayRefObj_Convert, "Carbon.CF")
559GLUE_NEW(CFArrayRef, CFArrayRefObj_New, "Carbon.CF")
560GLUE_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert, "Carbon.CF")
561GLUE_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New, "Carbon.CF")
562
563GLUE_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert, "Carbon.CF")
564GLUE_NEW(CFDictionaryRef, CFDictionaryRefObj_New, "Carbon.CF")
565GLUE_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert, "Carbon.CF")
566GLUE_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New, "Carbon.CF")
567
568GLUE_CONVERT(CFURLRef, CFURLRefObj_Convert, "Carbon.CF")
569GLUE_CONVERT(CFURLRef, OptionalCFURLRefObj_Convert, "Carbon.CF")
570GLUE_NEW(CFURLRef, CFURLRefObj_New, "Carbon.CF")
571
Jack Jansen94bebc02001-08-08 13:17:31 +0000572#endif /* USE_TOOLBOX_OBJECT_GLUE */