Adding some useful functions to ITFoundation, for dealing with Carbon
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 15 Jan 2004 00:37:33 +0000 (00:37 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 15 Jan 2004 00:37:33 +0000 (00:37 +0000)
datatypes.

ITCarbonSupport.h [new file with mode: 0755]
ITCarbonSupport.m [new file with mode: 0755]
ITFoundation.xcode/project.pbxproj

diff --git a/ITCarbonSupport.h b/ITCarbonSupport.h
new file mode 100755 (executable)
index 0000000..9e69748
--- /dev/null
@@ -0,0 +1,5 @@
+#import <Foundation/Foundation.h>
+#import <Carbon/Carbon.h>
+
+NSString *NSStringFromFourCharCode(FourCharCode code);
+FourCharCode FourCharCodeFromNSString(NSString *string);
\ No newline at end of file
diff --git a/ITCarbonSupport.m b/ITCarbonSupport.m
new file mode 100755 (executable)
index 0000000..ed6a35c
--- /dev/null
@@ -0,0 +1,9 @@
+#import "ITCarbonSupport.h"
+
+NSString *NSStringFromFourCharCode(FourCharCode code) {
+    return [NSString stringWithUTF8String:&code];
+}
+
+FourCharCode FourCharCodeFromNSString(NSString *string) {
+    return (*((unsigned long*)[string UTF8String]));
+}
\ No newline at end of file
index baec463..f8320c8 100755 (executable)
                                7CF6C92F057D65B0007FEC13,
                                7CF6C936057D65BA007FEC13,
                                7CF6C937057D65BA007FEC13,
+                               7C97DC2C05B614300013E85F,
+                               7C97DC2D05B614300013E85F,
                        );
                        isa = PBXGroup;
                        name = Classes;
 //7C2
 //7C3
 //7C4
+               7C97DC2C05B614300013E85F = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       path = ITCarbonSupport.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               7C97DC2D05B614300013E85F = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = ITCarbonSupport.m;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               7C97DC2E05B614300013E85F = {
+                       fileRef = 7C97DC2C05B614300013E85F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
+               7C97DC2F05B614300013E85F = {
+                       fileRef = 7C97DC2D05B614300013E85F;
+                       isa = PBXBuildFile;
+                       settings = {
+                       };
+               };
                7CA50B2B054E77950074E1D9 = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
                                2AB93A3205705A0C007E748F,
                                7CF6C930057D65B0007FEC13,
                                7CF6C938057D65BA007FEC13,
+                               7C97DC2E05B614300013E85F,
                        );
                        isa = PBXHeadersBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;
                                2AB93A3305705A0C007E748F,
                                7CF6C931057D65B0007FEC13,
                                7CF6C939057D65BA007FEC13,
+                               7C97DC2F05B614300013E85F,
                        );
                        isa = PBXSourcesBuildPhase;
                        runOnlyForDeploymentPostprocessing = 0;