mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-30 15:30:31 +00:00
added some examples to testing/
This commit is contained in:
parent
e1dd4ff2d0
commit
69bb7341d5
@ -0,0 +1,420 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
FEFC49140BB219B3006628BF /* CGShadingCreate */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = FEFC49210BB21A04006628BF /* Build configuration list for PBXAggregateTarget "CGShadingCreate" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
FEFC49160BB219B7006628BF /* PBXTargetDependency */,
|
||||
FEFC49180BB219BA006628BF /* PBXTargetDependency */,
|
||||
);
|
||||
name = CGShadingCreate;
|
||||
productName = CGShadingCreate;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
FEFC48F00BB21906006628BF /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
FEFC48F10BB21906006628BF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
FEFC48F30BB21906006628BF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
FEFC48F50BB21906006628BF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
FEFC49240BB21A07006628BF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
||||
FEFC49250BB21A08006628BF /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; };
|
||||
FEFC492A0BB21B1D006628BF /* GradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = FEFC49290BB21B1D006628BF /* GradientView.m */; };
|
||||
FEFC492B0BB21B1D006628BF /* GradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = FEFC49290BB21B1D006628BF /* GradientView.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
FEFC48FC0BB2192F006628BF /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = org.cocotron.1.0.windows.i386.gcc.default;
|
||||
fileType = sourcecode.c;
|
||||
isEditable = 1;
|
||||
outputFiles = (
|
||||
);
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
FEFC49150BB219B7006628BF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8D1107260486CEB800E47090;
|
||||
remoteInfo = "CGShadingCreate-Mac";
|
||||
};
|
||||
FEFC49170BB219BA006628BF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FEFC48EE0BB21906006628BF;
|
||||
remoteInfo = "CGShadingCreate-Windows";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* CGShadingCreate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CGShadingCreate.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FEFC48F90BB21906006628BF /* CGShadingCreate.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CGShadingCreate.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FEFC49280BB21B1D006628BF /* GradientView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = "<group>"; };
|
||||
FEFC49290BB21B1D006628BF /* GradientView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = GradientView.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEFC48F40BB21906006628BF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEFC48F50BB21906006628BF /* Cocoa.framework in Frameworks */,
|
||||
FEFC49240BB21A07006628BF /* Foundation.framework in Frameworks */,
|
||||
FEFC49250BB21A08006628BF /* AppKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* CGShadingCreate.app */,
|
||||
FEFC48F90BB21906006628BF /* CGShadingCreate.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* CGShadingCreate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = CGShadingCreate;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
FEFC49280BB21B1D006628BF /* GradientView.h */,
|
||||
FEFC49290BB21B1D006628BF /* GradientView.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* CGShadingCreate-Mac */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CGShadingCreate-Mac" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "CGShadingCreate-Mac";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = CGShadingCreate;
|
||||
productReference = 8D1107320486CEB800E47090 /* CGShadingCreate.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FEFC48EE0BB21906006628BF /* CGShadingCreate-Windows */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FEFC48F60BB21906006628BF /* Build configuration list for PBXNativeTarget "CGShadingCreate-Windows" */;
|
||||
buildPhases = (
|
||||
FEFC48EF0BB21906006628BF /* Resources */,
|
||||
FEFC48F20BB21906006628BF /* Sources */,
|
||||
FEFC48F40BB21906006628BF /* Frameworks */,
|
||||
FEB8F1150D3DB75D00754380 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
FEFC48FC0BB2192F006628BF /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "CGShadingCreate-Windows";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = CGShadingCreate;
|
||||
productReference = FEFC48F90BB21906006628BF /* CGShadingCreate.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CGShadingCreate" */;
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* CGShadingCreate */;
|
||||
projectDirPath = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* CGShadingCreate-Mac */,
|
||||
FEFC48EE0BB21906006628BF /* CGShadingCreate-Windows */,
|
||||
FEFC49140BB219B3006628BF /* CGShadingCreate */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEFC48EF0BB21906006628BF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEFC48F00BB21906006628BF /* MainMenu.nib in Resources */,
|
||||
FEFC48F10BB21906006628BF /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
FEB8F1150D3DB75D00754380 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/Developer/Cocotron/1.0/bin/retargetBundle -framework Foundation -framework AppKit -destination $TARGET_BUILD_DIR\"/\"$EXECUTABLE_FOLDER_PATH\n\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
FEFC492A0BB21B1D006628BF /* GradientView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEFC48F20BB21906006628BF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEFC48F30BB21906006628BF /* main.m in Sources */,
|
||||
FEFC492B0BB21B1D006628BF /* GradientView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
FEFC49160BB219B7006628BF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8D1107260486CEB800E47090 /* CGShadingCreate-Mac */;
|
||||
targetProxy = FEFC49150BB219B7006628BF /* PBXContainerItemProxy */;
|
||||
};
|
||||
FEFC49180BB219BA006628BF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = FEFC48EE0BB21906006628BF /* CGShadingCreate-Windows */;
|
||||
targetProxy = FEFC49170BB219BA006628BF /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
29B97319FDCFA39411CA2CEA /* English */,
|
||||
);
|
||||
name = MainMenu.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4C08A954540054247B /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_NAME = CGShadingCreate;
|
||||
SYMROOT = build/Mac;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FEFC48F80BB21906006628BF /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
EXECUTABLE_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Windows";
|
||||
EXECUTABLE_SUFFIX = .exe;
|
||||
FRAMEWORK_SEARCH_PATHS = /Developer/Cocotron/1.0/Windows/i386/Frameworks;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
OTHER_LDFLAGS = (
|
||||
"-Wl,--enable-auto-import",
|
||||
"-mwindows",
|
||||
);
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CGShadingCreate;
|
||||
SYMROOT = build/Windows;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FEFC49220BB21A04006628BF /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
PRODUCT_NAME = CGShadingCreate;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CGShadingCreate-Mac" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4C08A954540054247B /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CGShadingCreate" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF5008A954540054247B /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FEFC48F60BB21906006628BF /* Build configuration list for PBXNativeTarget "CGShadingCreate-Windows" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FEFC48F80BB21906006628BF /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FEFC49210BB21A04006628BF /* Build configuration list for PBXAggregateTarget "CGShadingCreate" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FEFC49220BB21A04006628BF /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
BIN
testing/Examples/CGShadingCreate/English.lproj/InfoPlist.strings
Normal file
BIN
testing/Examples/CGShadingCreate/English.lproj/InfoPlist.strings
Normal file
Binary file not shown.
39
testing/Examples/CGShadingCreate/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
39
testing/Examples/CGShadingCreate/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
selectType = id;
|
||||
takeEndColorFromSender = id;
|
||||
takeEndXFromSender = id;
|
||||
takeEndYFromSender = id;
|
||||
takeExtendEndFromSender = id;
|
||||
takeExtendStartFromSender = id;
|
||||
takeInnerRadiusFromSender = id;
|
||||
takeOuterRadiusFromSender = id;
|
||||
takeStartColorFromSender = id;
|
||||
takeStartXFromSender = id;
|
||||
takeStartYFromSender = id;
|
||||
};
|
||||
CLASS = GradientView;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
"_endColor" = NSColorWell;
|
||||
"_endExtend" = NSButton;
|
||||
"_endXTextField" = NSTextField;
|
||||
"_endYTextField" = NSTextField;
|
||||
"_innerRadius" = NSFormCell;
|
||||
"_innerRadiusSlider" = NSSlider;
|
||||
"_outerRadius" = NSFormCell;
|
||||
"_outerRadiusSlider" = NSSlider;
|
||||
"_shadingType" = NSMatrix;
|
||||
"_startColor" = NSColorWell;
|
||||
"_startExtend" = NSButton;
|
||||
"_startXTextField" = NSTextField;
|
||||
"_startYTextField" = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSView;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
24
testing/Examples/CGShadingCreate/English.lproj/MainMenu.nib/info.nib
generated
Normal file
24
testing/Examples/CGShadingCreate/English.lproj/MainMenu.nib/info.nib
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>76 78 356 240 0 0 1680 1028 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>80 352 350 44 0 0 1680 1028 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>29</integer>
|
||||
<integer>21</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8L2127</string>
|
||||
<key>IBUsesTextArchiving</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
9592
testing/Examples/CGShadingCreate/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
9592
testing/Examples/CGShadingCreate/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
File diff suppressed because it is too large
Load Diff
49
testing/Examples/CGShadingCreate/GradientView.h
Normal file
49
testing/Examples/CGShadingCreate/GradientView.h
Normal file
@ -0,0 +1,49 @@
|
||||
/* GradientView, not exactly MVC but you get the idea */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface GradientView : NSView {
|
||||
float _C0[4];
|
||||
float _C1[4];
|
||||
NSPoint _startPoint;
|
||||
NSPoint _endPoint;
|
||||
BOOL _extendStart;
|
||||
BOOL _extendEnd;
|
||||
float _startRadius;
|
||||
float _endRadius;
|
||||
BOOL _mouseFirst;
|
||||
|
||||
IBOutlet NSMatrix *_shadingType;
|
||||
IBOutlet NSTextField *_startXTextField;
|
||||
IBOutlet NSTextField *_startYTextField;
|
||||
IBOutlet NSColorWell *_startColor;
|
||||
IBOutlet NSButton *_startExtend;
|
||||
|
||||
IBOutlet NSTextField *_endXTextField;
|
||||
IBOutlet NSTextField *_endYTextField;
|
||||
IBOutlet NSColorWell *_endColor;
|
||||
IBOutlet NSButton *_endExtend;
|
||||
|
||||
IBOutlet NSFormCell *_innerRadius;
|
||||
IBOutlet NSSlider *_innerRadiusSlider;
|
||||
IBOutlet NSFormCell *_outerRadius;
|
||||
IBOutlet NSSlider *_outerRadiusSlider;
|
||||
}
|
||||
|
||||
-(IBAction)selectType:sender;
|
||||
|
||||
-(IBAction)takeStartXFromSender:sender;
|
||||
-(IBAction)takeStartYFromSender:sender;
|
||||
-(IBAction)takeEndXFromSender:sender;
|
||||
-(IBAction)takeEndYFromSender:sender;
|
||||
|
||||
-(IBAction)takeStartColorFromSender:sender;
|
||||
-(IBAction)takeEndColorFromSender:sender;
|
||||
|
||||
-(IBAction)takeExtendStartFromSender:sender;
|
||||
-(IBAction)takeExtendEndFromSender:sender;
|
||||
|
||||
-(IBAction)takeInnerRadiusFromSender:sender;
|
||||
-(IBAction)takeOuterRadiusFromSender:sender;
|
||||
|
||||
@end
|
157
testing/Examples/CGShadingCreate/GradientView.m
Normal file
157
testing/Examples/CGShadingCreate/GradientView.m
Normal file
@ -0,0 +1,157 @@
|
||||
#import "GradientView.h"
|
||||
#import <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
@implementation GradientView
|
||||
|
||||
-initWithFrame:(NSRect)frame {
|
||||
[super initWithFrame:frame];
|
||||
_C0[0]=0;
|
||||
_C0[1]=0;
|
||||
_C0[2]=0;
|
||||
_C0[3]=1;
|
||||
|
||||
_C1[0]=1;
|
||||
_C1[1]=0;
|
||||
_C1[2]=0;
|
||||
_C1[3]=1;
|
||||
_startPoint=NSMakePoint(0,0);
|
||||
_endPoint=NSMakePoint(frame.size.width,frame.size.height);
|
||||
_extendStart=NO;
|
||||
_extendEnd=NO;
|
||||
_startRadius=10;
|
||||
_endRadius=100;
|
||||
_mouseFirst=YES;
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)updateRadius {
|
||||
[_innerRadius setFloatValue:_startRadius];
|
||||
[_innerRadiusSlider setFloatValue:_startRadius];
|
||||
[_outerRadius setFloatValue:_endRadius];
|
||||
[_outerRadiusSlider setFloatValue:_endRadius];
|
||||
}
|
||||
|
||||
-(void)updatePointFields {
|
||||
[_startXTextField setFloatValue:_startPoint.x];
|
||||
[_startYTextField setFloatValue:_startPoint.y];
|
||||
[_endXTextField setFloatValue:_endPoint.x];
|
||||
[_endYTextField setFloatValue:_endPoint.y];
|
||||
}
|
||||
|
||||
-(void)awakeFromNib {
|
||||
[self updatePointFields];
|
||||
[self updateRadius];
|
||||
}
|
||||
|
||||
void evaluate(void *info,const float *in, float *output) {
|
||||
float x=in[0];
|
||||
GradientView *self=info;
|
||||
int i;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
output[i]=self->_C0[i]+x*(self->_C1[i]-self->_C0[i]);
|
||||
}
|
||||
|
||||
-(void)drawRect:(NSRect)rect {
|
||||
CGContextRef context=[[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGFunctionRef function;
|
||||
CGShadingRef shading;
|
||||
float domain[2]={0,1};
|
||||
float range[8]={0,1,0,1,0,1,0,1};
|
||||
CGFunctionCallbacks callbacks={0,evaluate,NULL};
|
||||
|
||||
[[NSColor whiteColor] set];
|
||||
NSRectFill([self bounds]);
|
||||
|
||||
function=CGFunctionCreate(self,1,domain,4,range,&callbacks);
|
||||
|
||||
if([_shadingType selectedTag]==0)
|
||||
shading=CGShadingCreateAxial(CGColorSpaceCreateDeviceRGB(),CGPointMake(_startPoint.x,_startPoint.y),
|
||||
CGPointMake(_endPoint.x,_endPoint.y),function,_extendStart,_extendEnd);
|
||||
else
|
||||
shading=CGShadingCreateRadial(CGColorSpaceCreateDeviceRGB(),CGPointMake(_startPoint.x,_startPoint.y),_startRadius,
|
||||
CGPointMake(_endPoint.x,_endPoint.y),_endRadius,function,_extendStart,_extendEnd);
|
||||
|
||||
CGContextDrawShading(context,shading);
|
||||
|
||||
CGFunctionRelease(function);
|
||||
CGShadingRelease(shading);
|
||||
}
|
||||
|
||||
-(void)mouseDown:(NSEvent *)event {
|
||||
NSPoint *dest=(_mouseFirst)?&_startPoint:&_endPoint;
|
||||
|
||||
do {
|
||||
NSPoint point=[self convertPoint:[event locationInWindow] fromView:nil];
|
||||
|
||||
*dest=point;
|
||||
|
||||
[self updatePointFields];
|
||||
[self setNeedsDisplay:YES];
|
||||
event=[[self window] nextEventMatchingMask:NSLeftMouseUpMask|NSLeftMouseDraggedMask];
|
||||
}while([event type]!=NSLeftMouseUp);
|
||||
|
||||
_mouseFirst=!_mouseFirst;
|
||||
}
|
||||
|
||||
-(IBAction)selectType:sender {
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeStartXFromSender:sender {
|
||||
_startPoint.x=[sender floatValue];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeStartYFromSender:sender {
|
||||
_startPoint.y=[sender floatValue];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeEndXFromSender:sender {
|
||||
_endPoint.x=[sender floatValue];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeEndYFromSender:sender {
|
||||
_endPoint.y=[sender floatValue];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeStartColorFromSender:sender {
|
||||
NSColor *color=[[sender color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
||||
|
||||
[color getRed:_C0 green:_C0+1 blue:_C0+2 alpha:_C0+3];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeEndColorFromSender:sender {
|
||||
NSColor *color=[[sender color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
||||
|
||||
[color getRed:_C1 green:_C1+1 blue:_C1+2 alpha:_C1+3];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeExtendStartFromSender:sender {
|
||||
_extendStart=[sender intValue]?YES:NO;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeExtendEndFromSender:sender {
|
||||
_extendEnd=[sender intValue]?YES:NO;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeInnerRadiusFromSender:sender {
|
||||
_startRadius=[sender floatValue];
|
||||
[self updateRadius];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeOuterRadiusFromSender:sender {
|
||||
_endRadius=[sender floatValue];
|
||||
[self updateRadius];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
@end
|
28
testing/Examples/CGShadingCreate/Info.plist
Normal file
28
testing/Examples/CGShadingCreate/Info.plist
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocotron.CGShadingCreateAxial</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>OBJC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
6
testing/Examples/CGShadingCreate/main.m
Normal file
6
testing/Examples/CGShadingCreate/main.m
Normal file
@ -0,0 +1,6 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
@ -0,0 +1,420 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
FEFC49140BB219B3006628BF /* CGShadingCreateAxial */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = FEFC49210BB21A04006628BF /* Build configuration list for PBXAggregateTarget "CGShadingCreateAxial" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
FEFC49160BB219B7006628BF /* PBXTargetDependency */,
|
||||
FEFC49180BB219BA006628BF /* PBXTargetDependency */,
|
||||
);
|
||||
name = CGShadingCreateAxial;
|
||||
productName = CGShadingCreateAxial;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
FEFC48F00BB21906006628BF /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
FEFC48F10BB21906006628BF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
FEFC48F30BB21906006628BF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
FEFC48F50BB21906006628BF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
FEFC49240BB21A07006628BF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
||||
FEFC49250BB21A08006628BF /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; };
|
||||
FEFC492A0BB21B1D006628BF /* GradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = FEFC49290BB21B1D006628BF /* GradientView.m */; };
|
||||
FEFC492B0BB21B1D006628BF /* GradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = FEFC49290BB21B1D006628BF /* GradientView.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
FEFC48FC0BB2192F006628BF /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = org.cocotron.1.0.windows.i386.gcc.default;
|
||||
fileType = sourcecode.c;
|
||||
isEditable = 1;
|
||||
outputFiles = (
|
||||
);
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
FEFC49150BB219B7006628BF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8D1107260486CEB800E47090;
|
||||
remoteInfo = "CGShadingCreateAxial-Mac";
|
||||
};
|
||||
FEFC49170BB219BA006628BF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FEFC48EE0BB21906006628BF;
|
||||
remoteInfo = "CGShadingCreateAxial-Windows";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* CGShadingCreateAxial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CGShadingCreateAxial.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FEFC48F90BB21906006628BF /* CGShadingCreateAxial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CGShadingCreateAxial.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FEFC49280BB21B1D006628BF /* GradientView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GradientView.h; sourceTree = "<group>"; };
|
||||
FEFC49290BB21B1D006628BF /* GradientView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = GradientView.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEFC48F40BB21906006628BF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEFC48F50BB21906006628BF /* Cocoa.framework in Frameworks */,
|
||||
FEFC49240BB21A07006628BF /* Foundation.framework in Frameworks */,
|
||||
FEFC49250BB21A08006628BF /* AppKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* CGShadingCreateAxial.app */,
|
||||
FEFC48F90BB21906006628BF /* CGShadingCreateAxial.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* CGShadingCreateAxial */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = CGShadingCreateAxial;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
FEFC49280BB21B1D006628BF /* GradientView.h */,
|
||||
FEFC49290BB21B1D006628BF /* GradientView.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* CGShadingCreateAxial-Mac */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CGShadingCreateAxial-Mac" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "CGShadingCreateAxial-Mac";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = CGShadingCreateAxial;
|
||||
productReference = 8D1107320486CEB800E47090 /* CGShadingCreateAxial.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FEFC48EE0BB21906006628BF /* CGShadingCreateAxial-Windows */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FEFC48F60BB21906006628BF /* Build configuration list for PBXNativeTarget "CGShadingCreateAxial-Windows" */;
|
||||
buildPhases = (
|
||||
FEFC48EF0BB21906006628BF /* Resources */,
|
||||
FEFC48F20BB21906006628BF /* Sources */,
|
||||
FEFC48F40BB21906006628BF /* Frameworks */,
|
||||
FEB8F1280D3DB78C00754380 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
FEFC48FC0BB2192F006628BF /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "CGShadingCreateAxial-Windows";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = CGShadingCreateAxial;
|
||||
productReference = FEFC48F90BB21906006628BF /* CGShadingCreateAxial.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CGShadingCreateAxial" */;
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* CGShadingCreateAxial */;
|
||||
projectDirPath = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* CGShadingCreateAxial-Mac */,
|
||||
FEFC48EE0BB21906006628BF /* CGShadingCreateAxial-Windows */,
|
||||
FEFC49140BB219B3006628BF /* CGShadingCreateAxial */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEFC48EF0BB21906006628BF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEFC48F00BB21906006628BF /* MainMenu.nib in Resources */,
|
||||
FEFC48F10BB21906006628BF /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
FEB8F1280D3DB78C00754380 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/Developer/Cocotron/1.0/bin/retargetBundle -framework Foundation -framework AppKit -destination $TARGET_BUILD_DIR\"/\"$EXECUTABLE_FOLDER_PATH\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
FEFC492A0BB21B1D006628BF /* GradientView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEFC48F20BB21906006628BF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEFC48F30BB21906006628BF /* main.m in Sources */,
|
||||
FEFC492B0BB21B1D006628BF /* GradientView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
FEFC49160BB219B7006628BF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8D1107260486CEB800E47090 /* CGShadingCreateAxial-Mac */;
|
||||
targetProxy = FEFC49150BB219B7006628BF /* PBXContainerItemProxy */;
|
||||
};
|
||||
FEFC49180BB219BA006628BF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = FEFC48EE0BB21906006628BF /* CGShadingCreateAxial-Windows */;
|
||||
targetProxy = FEFC49170BB219BA006628BF /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
29B97319FDCFA39411CA2CEA /* English */,
|
||||
);
|
||||
name = MainMenu.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4C08A954540054247B /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
PRODUCT_NAME = CGShadingCreateAxial;
|
||||
SYMROOT = build/Mac;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FEFC48F80BB21906006628BF /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
EXECUTABLE_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Windows";
|
||||
EXECUTABLE_SUFFIX = .exe;
|
||||
FRAMEWORK_SEARCH_PATHS = /Developer/Cocotron/1.0/Windows/i386/Frameworks;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
OTHER_LDFLAGS = (
|
||||
"-Wl,--enable-auto-import",
|
||||
"-mwindows",
|
||||
);
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = CGShadingCreateAxial;
|
||||
SYMROOT = build/Windows;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FEFC49220BB21A04006628BF /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
PRODUCT_NAME = CGShadingCreateAxial;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CGShadingCreateAxial-Mac" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4C08A954540054247B /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CGShadingCreateAxial" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF5008A954540054247B /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FEFC48F60BB21906006628BF /* Build configuration list for PBXNativeTarget "CGShadingCreateAxial-Windows" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FEFC48F80BB21906006628BF /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FEFC49210BB21A04006628BF /* Build configuration list for PBXAggregateTarget "CGShadingCreateAxial" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FEFC49220BB21A04006628BF /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
Binary file not shown.
17
testing/Examples/CGShadingCreateAxial/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
17
testing/Examples/CGShadingCreateAxial/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {
|
||||
takeEndColorFromSender = id;
|
||||
takeExtendEndFromSender = id;
|
||||
takeExtendStartFromSender = id;
|
||||
takeStartColorFromSender = id;
|
||||
};
|
||||
CLASS = GradientView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSView;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
24
testing/Examples/CGShadingCreateAxial/English.lproj/MainMenu.nib/info.nib
generated
Normal file
24
testing/Examples/CGShadingCreateAxial/English.lproj/MainMenu.nib/info.nib
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>135 107 356 240 0 0 1680 1028 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>132 352 338 44 0 0 1680 1028 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>29</integer>
|
||||
<integer>21</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8L2127</string>
|
||||
<key>IBUsesTextArchiving</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
6659
testing/Examples/CGShadingCreateAxial/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
6659
testing/Examples/CGShadingCreateAxial/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
File diff suppressed because it is too large
Load Diff
21
testing/Examples/CGShadingCreateAxial/GradientView.h
Normal file
21
testing/Examples/CGShadingCreateAxial/GradientView.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* GradientView */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface GradientView : NSView {
|
||||
float _C0[4];
|
||||
float _C1[4];
|
||||
NSPoint _startPoint;
|
||||
NSPoint _endPoint;
|
||||
BOOL _extendStart;
|
||||
BOOL _extendEnd;
|
||||
BOOL _mouseFirst;
|
||||
}
|
||||
|
||||
-(IBAction)takeStartColorFromSender:sender;
|
||||
-(IBAction)takeEndColorFromSender:sender;
|
||||
|
||||
-(IBAction)takeExtendStartFromSender:sender;
|
||||
-(IBAction)takeExtendEndFromSender:sender;
|
||||
|
||||
@end
|
94
testing/Examples/CGShadingCreateAxial/GradientView.m
Normal file
94
testing/Examples/CGShadingCreateAxial/GradientView.m
Normal file
@ -0,0 +1,94 @@
|
||||
#import "GradientView.h"
|
||||
#import <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
@implementation GradientView
|
||||
|
||||
-initWithFrame:(NSRect)frame {
|
||||
[super initWithFrame:frame];
|
||||
_C0[0]=0;
|
||||
_C0[1]=0;
|
||||
_C0[2]=0;
|
||||
_C0[3]=1;
|
||||
|
||||
_C1[0]=1;
|
||||
_C1[1]=1;
|
||||
_C1[2]=1;
|
||||
_C1[3]=1;
|
||||
_startPoint=NSMakePoint(0,0);
|
||||
_endPoint=NSMakePoint(frame.size.width,frame.size.height);
|
||||
_extendStart=NO;
|
||||
_extendEnd=NO;
|
||||
_mouseFirst=YES;
|
||||
return self;
|
||||
}
|
||||
|
||||
void evaluate(void *info,const float *in, float *output) {
|
||||
float x=in[0];
|
||||
GradientView *self=info;
|
||||
int i;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
output[i]=self->_C0[i]+x*(self->_C1[i]-self->_C0[i]);
|
||||
}
|
||||
|
||||
-(void)drawRect:(NSRect)rect {
|
||||
CGContextRef context=[[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGFunctionRef function;
|
||||
CGShadingRef shading;
|
||||
float domain[2]={0,1};
|
||||
float range[8]={0,1,0,1,0,1,0,1};
|
||||
CGFunctionCallbacks callbacks={0,evaluate,NULL};
|
||||
|
||||
[[NSColor whiteColor] set];
|
||||
NSRectFill([self bounds]);
|
||||
|
||||
function=CGFunctionCreate(self,1,domain,4,range,&callbacks);
|
||||
shading=CGShadingCreateAxial(CGColorSpaceCreateDeviceRGB(),CGPointMake(_startPoint.x,_startPoint.y),
|
||||
CGPointMake(_endPoint.x,_endPoint.y),function,_extendStart,_extendEnd);
|
||||
|
||||
CGContextDrawShading(context,shading);
|
||||
|
||||
CGFunctionRelease(function);
|
||||
CGShadingRelease(shading);
|
||||
}
|
||||
|
||||
-(void)mouseDown:(NSEvent *)event {
|
||||
NSPoint *dest=(_mouseFirst)?&_startPoint:&_endPoint;
|
||||
|
||||
do {
|
||||
NSPoint point=[self convertPoint:[event locationInWindow] fromView:nil];
|
||||
|
||||
*dest=point;
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
event=[[self window] nextEventMatchingMask:NSLeftMouseUpMask|NSLeftMouseDraggedMask];
|
||||
}while([event type]!=NSLeftMouseUp);
|
||||
|
||||
_mouseFirst=!_mouseFirst;
|
||||
}
|
||||
|
||||
-(IBAction)takeStartColorFromSender:sender {
|
||||
NSColor *color=[[sender color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
||||
|
||||
[color getRed:_C0 green:_C0+1 blue:_C0+2 alpha:_C0+3];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeEndColorFromSender:sender {
|
||||
NSColor *color=[[sender color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
|
||||
|
||||
[color getRed:_C1 green:_C1+1 blue:_C1+2 alpha:_C1+3];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeExtendStartFromSender:sender {
|
||||
_extendStart=[sender intValue]?YES:NO;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
-(IBAction)takeExtendEndFromSender:sender {
|
||||
_extendEnd=[sender intValue]?YES:NO;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
@end
|
28
testing/Examples/CGShadingCreateAxial/Info.plist
Normal file
28
testing/Examples/CGShadingCreateAxial/Info.plist
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocotron.CGShadingCreateAxial</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>OBJC</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
14
testing/Examples/CGShadingCreateAxial/main.m
Normal file
14
testing/Examples/CGShadingCreateAxial/main.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// main.m
|
||||
// Gradientivity
|
||||
//
|
||||
// Created by Christopher Lloyd on 3/21/07.
|
||||
// Copyright __MyCompanyName__ 2007. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
BIN
testing/Examples/NSOpenGLView/English.lproj/InfoPlist.strings
Normal file
BIN
testing/Examples/NSOpenGLView/English.lproj/InfoPlist.strings
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
"WindowTitle"="Cocotron NSOpenGLView";
|
@ -0,0 +1,3 @@
|
||||
"WindowTitle"="Cocoa NSOpenGLView";
|
||||
|
||||
|
12
testing/Examples/NSOpenGLView/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
12
testing/Examples/NSOpenGLView/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
ACTIONS = {};
|
||||
CLASS = MyOpenGLView;
|
||||
LANGUAGE = ObjC;
|
||||
SUPERCLASS = NSOpenGLView;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
22
testing/Examples/NSOpenGLView/English.lproj/MainMenu.nib/info.nib
generated
Normal file
22
testing/Examples/NSOpenGLView/English.lproj/MainMenu.nib/info.nib
generated
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>135 107 356 240 0 0 1680 1028 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>132 352 338 44 0 0 1680 1028 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>29</integer>
|
||||
<integer>21</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8S2167</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
testing/Examples/NSOpenGLView/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
BIN
testing/Examples/NSOpenGLView/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
28
testing/Examples/NSOpenGLView/Info.plist
Normal file
28
testing/Examples/NSOpenGLView/Info.plist
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocotron.NSOpenGLView</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
10
testing/Examples/NSOpenGLView/MyOpenGLView.h
Normal file
10
testing/Examples/NSOpenGLView/MyOpenGLView.h
Normal file
@ -0,0 +1,10 @@
|
||||
/* MyOpenGLView */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface MyOpenGLView : NSOpenGLView {
|
||||
NSTimer *_timer;
|
||||
float _angleX;
|
||||
}
|
||||
|
||||
@end
|
130
testing/Examples/NSOpenGLView/MyOpenGLView.m
Normal file
130
testing/Examples/NSOpenGLView/MyOpenGLView.m
Normal file
@ -0,0 +1,130 @@
|
||||
#import "MyOpenGLView.h"
|
||||
#import <OpenGL/gl.h>
|
||||
#import <OpenGL/glu.h>
|
||||
#import <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
@implementation MyOpenGLView
|
||||
|
||||
-(void)awakeFromNib {
|
||||
_angleX=360;
|
||||
_timer=[[NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(timer:) userInfo:nil repeats:YES] retain];
|
||||
[[self window] setTitle:NSLocalizedString(@"WindowTitle",@"")];
|
||||
}
|
||||
|
||||
static void drawArcWithDepth(float beginAngle,float endAngle,float innerRadius,float outerRadius,float z){
|
||||
for(;beginAngle<=endAngle;beginAngle+=1){
|
||||
CGAffineTransform matrix=CGAffineTransformMakeRotation(M_PI*beginAngle/180.0);
|
||||
CGPoint innerPoint=CGPointMake(innerRadius,0);
|
||||
CGPoint outerPoint=CGPointMake(outerRadius,0);
|
||||
|
||||
innerPoint=CGPointApplyAffineTransform(innerPoint,matrix);
|
||||
outerPoint=CGPointApplyAffineTransform(outerPoint,matrix);
|
||||
|
||||
glVertex3f(innerPoint.x,innerPoint.y,z);
|
||||
glVertex3f(outerPoint.x,outerPoint.y,z);
|
||||
}
|
||||
}
|
||||
|
||||
static void drawEdge(float beginAngle,float endAngle,float radius,float zclose,float zfar){
|
||||
for(;beginAngle<=endAngle;beginAngle+=1){
|
||||
CGAffineTransform matrix=CGAffineTransformMakeRotation(M_PI*beginAngle/180.0);
|
||||
CGPoint point=CGPointMake(radius,0);
|
||||
CGPoint normal=CGPointMake(1,0);
|
||||
|
||||
point=CGPointApplyAffineTransform(point,matrix);
|
||||
normal=CGPointApplyAffineTransform(normal,matrix);
|
||||
|
||||
glNormal3f(normal.x,normal.y,0);
|
||||
glVertex3f(point.x, point.y,zclose);
|
||||
glVertex3f(point.x, point.y,zfar);
|
||||
}
|
||||
}
|
||||
|
||||
static void capAtAngle(float angle,float innerRadius,float outerRadius,float depth){
|
||||
CGAffineTransform matrix=CGAffineTransformMakeRotation(M_PI*angle/180.0);
|
||||
CGPoint innerPoint=CGPointMake(innerRadius,0);
|
||||
CGPoint outerPoint=CGPointMake(outerRadius,0);
|
||||
CGPoint normal=CGPointMake(1,0);
|
||||
|
||||
innerPoint=CGPointApplyAffineTransform(innerPoint,matrix);
|
||||
outerPoint=CGPointApplyAffineTransform(outerPoint,matrix);
|
||||
normal=CGPointApplyAffineTransform(normal,matrix);
|
||||
|
||||
glNormal3f(normal.x,normal.y,0);
|
||||
|
||||
glVertex3f(innerPoint.x, innerPoint.y,depth/2);
|
||||
glVertex3f(outerPoint.x, outerPoint.y,depth/2);
|
||||
glVertex3f(outerPoint.x, outerPoint.y,-depth/2);
|
||||
glVertex3f(innerPoint.x, innerPoint.y,-depth/2);
|
||||
}
|
||||
|
||||
static void drawArc(float beginAngle,float endAngle,float innerRadius,float outerRadius,float depth){
|
||||
glNormal3f(1,0,0);
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
drawArcWithDepth(beginAngle,endAngle,innerRadius,outerRadius,depth/2);
|
||||
glEnd();
|
||||
|
||||
glNormal3f(-1,0,0);
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
drawArcWithDepth(beginAngle,endAngle,innerRadius,outerRadius,-depth/2);
|
||||
glEnd();
|
||||
|
||||
glColor3f(.2, .2, .2);
|
||||
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
drawEdge(beginAngle,endAngle,outerRadius,depth/2,-depth/2);
|
||||
glEnd();
|
||||
|
||||
glBegin(GL_QUAD_STRIP);
|
||||
drawEdge(beginAngle,endAngle,innerRadius,depth/2,-depth/2);
|
||||
glEnd();
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
capAtAngle(beginAngle,innerRadius,outerRadius,depth);
|
||||
capAtAngle(endAngle,innerRadius,outerRadius,depth);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
static void drawCocotron(){
|
||||
glColor3f(0, 0, 0);
|
||||
drawArc(0,60,.5,1,.3);
|
||||
|
||||
glColor3f(0, 0, 0);
|
||||
drawArc(120,180,.5,1,.3);
|
||||
|
||||
glColor3f(0, 0, 0);
|
||||
drawArc(240,300,.5,1,.3);
|
||||
|
||||
glColor3f(.5, .5, 0);
|
||||
drawArc(30,330,.2,.4,.3);
|
||||
}
|
||||
|
||||
-(void)drawRect:(NSRect)bounds {
|
||||
glClearColor(.3, 0, .3, 1);
|
||||
glLoadIdentity();
|
||||
glClear(GL_COLOR_BUFFER_BIT+GL_DEPTH_BUFFER_BIT+GL_STENCIL_BUFFER_BIT);
|
||||
glRotatef(_angleX,0,1,0);
|
||||
drawCocotron();
|
||||
glFlush();
|
||||
[[self openGLContext] flushBuffer];
|
||||
}
|
||||
|
||||
-(void)prepareOpenGL {
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glShadeModel(GL_SMOOTH);
|
||||
}
|
||||
|
||||
-(void)reshape {
|
||||
glViewport(0,0,[self bounds].size.width,[self bounds].size.height);
|
||||
}
|
||||
|
||||
-(void) timer:(NSTimer *)timer {
|
||||
_angleX -= 1;
|
||||
|
||||
if(_angleX<0)
|
||||
_angleX=360;
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,469 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
FEF2EAD40C8782A4001FC5A8 /* NSOpenGLView */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = FEF2EADA0C8782CE001FC5A8 /* Build configuration list for PBXAggregateTarget "NSOpenGLView" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
FEF2EAD60C8782A9001FC5A8 /* PBXTargetDependency */,
|
||||
FEF2EAD80C8782AC001FC5A8 /* PBXTargetDependency */,
|
||||
);
|
||||
name = NSOpenGLView;
|
||||
productName = NSOpenGLView;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
FE472DAE0C85A959002B72EF /* MyOpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE472DAD0C85A959002B72EF /* MyOpenGLView.m */; };
|
||||
FE472DC90C85AAA1002B72EF /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE472DC80C85AAA1002B72EF /* OpenGL.framework */; };
|
||||
FE4733530C876FA1002B72EF /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
|
||||
FE4733540C876FA1002B72EF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
FE4733560C876FA1002B72EF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
FE4733570C876FA1002B72EF /* MyOpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE472DAD0C85A959002B72EF /* MyOpenGLView.m */; };
|
||||
FE4733590C876FA1002B72EF /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
FEBEB04E0C96D3EE002C9F50 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = FEBEB04D0C96D3EE002C9F50 /* Localizable.strings */; };
|
||||
FEBEB04F0C96D3EE002C9F50 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = FEBEB04D0C96D3EE002C9F50 /* Localizable.strings */; };
|
||||
FEBEB0520C96D3FD002C9F50 /* Localizable-windows.strings in Resources */ = {isa = PBXBuildFile; fileRef = FEBEB0510C96D3FD002C9F50 /* Localizable-windows.strings */; };
|
||||
FEBEB0530C96D3FD002C9F50 /* Localizable-windows.strings in Resources */ = {isa = PBXBuildFile; fileRef = FEBEB0510C96D3FD002C9F50 /* Localizable-windows.strings */; };
|
||||
FEF2EB7D0C87B952001FC5A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
||||
FEF2EB7E0C87B959001FC5A8 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
FE4733600C876FDE002B72EF /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = org.cocotron.1.0.windows.i386.gcc.default;
|
||||
fileType = sourcecode.c;
|
||||
isEditable = 1;
|
||||
outputFiles = (
|
||||
);
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
FEF2EAD50C8782A9001FC5A8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8D1107260486CEB800E47090;
|
||||
remoteInfo = "NSOpenGLView-MacOS";
|
||||
};
|
||||
FEF2EAD70C8782AC001FC5A8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FE4733510C876FA1002B72EF;
|
||||
remoteInfo = "NSOpenGLView-Windows";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* NSOpenGLView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NSOpenGLView.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FE472DAC0C85A959002B72EF /* MyOpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MyOpenGLView.h; sourceTree = "<group>"; };
|
||||
FE472DAD0C85A959002B72EF /* MyOpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MyOpenGLView.m; sourceTree = "<group>"; };
|
||||
FE472DC80C85AAA1002B72EF /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
|
||||
FE47335D0C876FA1002B72EF /* NSOpenGLView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NSOpenGLView.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FEBEB00E0C96D208002C9F50 /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
FEBEB0160C96D228002C9F50 /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = "English.lproj/Localizable-windows.strings"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
FE472DC90C85AAA1002B72EF /* OpenGL.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FE4733580C876FA1002B72EF /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FE4733590C876FA1002B72EF /* Cocoa.framework in Frameworks */,
|
||||
FEF2EB7D0C87B952001FC5A8 /* Foundation.framework in Frameworks */,
|
||||
FEF2EB7E0C87B959001FC5A8 /* AppKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* NSOpenGLView.app */,
|
||||
FE47335D0C876FA1002B72EF /* NSOpenGLView.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* NSOpenGLView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
FEBEB04D0C96D3EE002C9F50 /* Localizable.strings */,
|
||||
FEBEB0510C96D3FD002C9F50 /* Localizable-windows.strings */,
|
||||
);
|
||||
name = NSOpenGLView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
FE472DAC0C85A959002B72EF /* MyOpenGLView.h */,
|
||||
FE472DAD0C85A959002B72EF /* MyOpenGLView.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FE472DC80C85AAA1002B72EF /* OpenGL.framework */,
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* NSOpenGLView-MacOS */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NSOpenGLView-MacOS" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "NSOpenGLView-MacOS";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = NSOpenGLView;
|
||||
productReference = 8D1107320486CEB800E47090 /* NSOpenGLView.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FE4733510C876FA1002B72EF /* NSOpenGLView-Windows */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FE47335B0C876FA1002B72EF /* Build configuration list for PBXNativeTarget "NSOpenGLView-Windows" */;
|
||||
buildPhases = (
|
||||
FE4733520C876FA1002B72EF /* Resources */,
|
||||
FE4733550C876FA1002B72EF /* Sources */,
|
||||
FE4733580C876FA1002B72EF /* Frameworks */,
|
||||
FE2D932D0D491258005B7813 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
FE4733600C876FDE002B72EF /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "NSOpenGLView-Windows";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = NSOpenGLView;
|
||||
productReference = FE47335D0C876FA1002B72EF /* NSOpenGLView.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NSOpenGLView" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* NSOpenGLView */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* NSOpenGLView-MacOS */,
|
||||
FE4733510C876FA1002B72EF /* NSOpenGLView-Windows */,
|
||||
FEF2EAD40C8782A4001FC5A8 /* NSOpenGLView */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
FEBEB04E0C96D3EE002C9F50 /* Localizable.strings in Resources */,
|
||||
FEBEB0520C96D3FD002C9F50 /* Localizable-windows.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FE4733520C876FA1002B72EF /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FE4733530C876FA1002B72EF /* MainMenu.nib in Resources */,
|
||||
FE4733540C876FA1002B72EF /* InfoPlist.strings in Resources */,
|
||||
FEBEB04F0C96D3EE002C9F50 /* Localizable.strings in Resources */,
|
||||
FEBEB0530C96D3FD002C9F50 /* Localizable-windows.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
FE2D932D0D491258005B7813 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/Developer/Cocotron/1.0/bin/retargetBundle -framework Foundation -framework AppKit -destination $TARGET_BUILD_DIR\"/\"$EXECUTABLE_FOLDER_PATH\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
FE472DAE0C85A959002B72EF /* MyOpenGLView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FE4733550C876FA1002B72EF /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FE4733560C876FA1002B72EF /* main.m in Sources */,
|
||||
FE4733570C876FA1002B72EF /* MyOpenGLView.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
FEF2EAD60C8782A9001FC5A8 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8D1107260486CEB800E47090 /* NSOpenGLView-MacOS */;
|
||||
targetProxy = FEF2EAD50C8782A9001FC5A8 /* PBXContainerItemProxy */;
|
||||
};
|
||||
FEF2EAD80C8782AC001FC5A8 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = FE4733510C876FA1002B72EF /* NSOpenGLView-Windows */;
|
||||
targetProxy = FEF2EAD70C8782AC001FC5A8 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
29B97319FDCFA39411CA2CEA /* English */,
|
||||
);
|
||||
name = MainMenu.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FEBEB04D0C96D3EE002C9F50 /* Localizable.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
FEBEB00E0C96D208002C9F50 /* English */,
|
||||
);
|
||||
name = Localizable.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FEBEB0510C96D3FD002C9F50 /* Localizable-windows.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
FEBEB0160C96D228002C9F50 /* English */,
|
||||
);
|
||||
name = "Localizable-windows.strings";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4C08A954540054247B /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_OPTIMIZATION_LEVEL = 1;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PRODUCT_NAME = NSOpenGLView;
|
||||
SYMROOT = build/Mac;
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FE47335C0C876FA1002B72EF /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
EXECUTABLE_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Windows";
|
||||
EXECUTABLE_SUFFIX = .exe;
|
||||
FRAMEWORK_SEARCH_PATHS = /Developer/Cocotron/1.0/Windows/i386/Frameworks;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
OTHER_LDFLAGS = (
|
||||
"-Wl,--enable-auto-import",
|
||||
"-mwindows",
|
||||
"-lopengl32",
|
||||
);
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = NSOpenGLView;
|
||||
SDKROOT = "";
|
||||
SYMROOT = build/Windows;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FEF2EADB0C8782CE001FC5A8 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
PRODUCT_NAME = NSOpenGLView;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NSOpenGLView-MacOS" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4C08A954540054247B /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NSOpenGLView" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF5008A954540054247B /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FE47335B0C876FA1002B72EF /* Build configuration list for PBXNativeTarget "NSOpenGLView-Windows" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FE47335C0C876FA1002B72EF /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FEF2EADA0C8782CE001FC5A8 /* Build configuration list for PBXAggregateTarget "NSOpenGLView" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FEF2EADB0C8782CE001FC5A8 /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
14
testing/Examples/NSOpenGLView/main.m
Normal file
14
testing/Examples/NSOpenGLView/main.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// main.m
|
||||
// OpenGLView
|
||||
//
|
||||
// Created by Christopher Lloyd on 8/29/07.
|
||||
// Copyright __MyCompanyName__ 2007. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
24
testing/Examples/Quartz2D/Demo.h
Normal file
24
testing/Examples/Quartz2D/Demo.h
Normal file
@ -0,0 +1,24 @@
|
||||
//
|
||||
// Demo.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
// all demos draw in a 1x1 box.
|
||||
|
||||
@interface Demo : NSObject {
|
||||
|
||||
}
|
||||
|
||||
-(CGImageRef)createImageWithName:(NSString *)name;
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context;
|
||||
|
||||
-(NSString *)title;
|
||||
|
||||
@end
|
37
testing/Examples/Quartz2D/Demo.m
Normal file
37
testing/Examples/Quartz2D/Demo.m
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// Demo.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@implementation Demo
|
||||
|
||||
-(CGImageRef)createImageWithName:(NSString *)name {
|
||||
CGImageRef result;
|
||||
|
||||
NSString *path=[[NSBundle bundleForClass:[self class]] pathForResource:name ofType:@"png"];
|
||||
NSData *data=[NSData dataWithContentsOfFile:path];
|
||||
|
||||
CGImageSourceRef source=CGImageSourceCreateWithData((CFDataRef)data,nil);
|
||||
|
||||
result=CGImageSourceCreateImageAtIndex(source,0,nil);
|
||||
|
||||
CFRelease(source);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
}
|
||||
|
||||
-(NSString *)title {
|
||||
return [self description];
|
||||
}
|
||||
|
||||
|
||||
@end
|
16
testing/Examples/Quartz2D/DemoAffineImages.h
Normal file
16
testing/Examples/Quartz2D/DemoAffineImages.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// DemoAffineImages.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoAffineImages : Demo {
|
||||
CGImageRef _image;
|
||||
}
|
||||
|
||||
@end
|
54
testing/Examples/Quartz2D/DemoAffineImages.m
Normal file
54
testing/Examples/Quartz2D/DemoAffineImages.m
Normal file
@ -0,0 +1,54 @@
|
||||
//
|
||||
// DemoAffineImages.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoAffineImages.h"
|
||||
|
||||
|
||||
@implementation DemoAffineImages
|
||||
|
||||
-init {
|
||||
_image=[self createImageWithName:@"pattern"];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
CGContextTranslateCTM(context,0.5,0.5);
|
||||
int i,numberOfImages=11;
|
||||
CGBlendMode modes[]={
|
||||
kCGBlendModeNormal,
|
||||
kCGBlendModeClear,
|
||||
kCGBlendModeCopy,
|
||||
kCGBlendModeSourceIn,
|
||||
kCGBlendModeSourceOut,
|
||||
kCGBlendModeSourceAtop,
|
||||
kCGBlendModeDestinationOver,
|
||||
kCGBlendModeDestinationIn,
|
||||
kCGBlendModeDestinationOut,
|
||||
kCGBlendModeDestinationAtop,
|
||||
kCGBlendModeXOR,
|
||||
};
|
||||
|
||||
|
||||
for(i=0;i<numberOfImages;i++){
|
||||
CGRect rect=CGRectMake(0.1,0.1,0.25+i*0.01,0.25-i*0.01);
|
||||
|
||||
CGContextSetBlendMode(context,kCGBlendModeNormal);
|
||||
CGContextRotateCTM(context,(M_PI*2)/numberOfImages);
|
||||
CGContextSetRGBFillColor(context,i/(CGFloat)numberOfImages,0.7,1,0.5);
|
||||
CGContextFillRect(context,rect);
|
||||
rect=CGRectInset(rect,0.02,0.02);
|
||||
CGContextDrawImage(context,rect,_image);
|
||||
}
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Affine Images";
|
||||
}
|
||||
|
||||
@end
|
16
testing/Examples/Quartz2D/DemoAntialias.h
Normal file
16
testing/Examples/Quartz2D/DemoAntialias.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// DemoAntialias.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/9/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoAntialias : Demo {
|
||||
|
||||
}
|
||||
|
||||
@end
|
36
testing/Examples/Quartz2D/DemoAntialias.m
Normal file
36
testing/Examples/Quartz2D/DemoAntialias.m
Normal file
@ -0,0 +1,36 @@
|
||||
//
|
||||
// DemoAntialias.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/9/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoAntialias.h"
|
||||
|
||||
|
||||
@implementation DemoAntialias
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
CGContextTranslateCTM(context,0.5,0.5);
|
||||
|
||||
int i,numberOfRays=256;
|
||||
|
||||
for(i=0;i<numberOfRays;i++){
|
||||
CGFloat fraction=i/(CGFloat)numberOfRays;
|
||||
|
||||
CGContextRotateCTM(context,(M_PI*2)/numberOfRays);
|
||||
CGContextSetRGBStrokeColor(context,0,0,0,1);
|
||||
CGContextSetLineWidth(context,0.001);
|
||||
CGContextMoveToPoint(context,0,0);
|
||||
CGContextAddLineToPoint(context,0.5,1);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Antialias Radial Pattern";
|
||||
}
|
||||
|
||||
|
||||
@end
|
16
testing/Examples/Quartz2D/DemoGradient.h
Normal file
16
testing/Examples/Quartz2D/DemoGradient.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// DemoGradient.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoGradient : Demo {
|
||||
|
||||
}
|
||||
|
||||
@end
|
63
testing/Examples/Quartz2D/DemoGradient.m
Normal file
63
testing/Examples/Quartz2D/DemoGradient.m
Normal file
@ -0,0 +1,63 @@
|
||||
//
|
||||
// DemoGradient.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoGradient.h"
|
||||
|
||||
|
||||
@implementation DemoGradient
|
||||
|
||||
void blackToRed(void *info,const float *in, float *output) {
|
||||
float C0[4]={0,0,0,1};
|
||||
float C1[4]={1,0,0,1};
|
||||
float x=in[0];
|
||||
int i;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
output[i]=C0[i]+x*(C1[i]-C0[i]);
|
||||
}
|
||||
|
||||
void blackToGreen(void *info,const float *in, float *output) {
|
||||
float C0[4]={00,0,1,0.9};
|
||||
float C1[4]={0 ,1,0 ,0.1};
|
||||
float x=in[0];
|
||||
int i;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
output[i]=C0[i]+x*(C1[i]-C0[i]);
|
||||
}
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
float domain[2]={0,1};
|
||||
float range[8]={0,1,0,1,0,1,0,1};
|
||||
CGFunctionCallbacks axialCallbacks={0,blackToRed,NULL};
|
||||
CGFunctionCallbacks radialCallbacks={0,blackToGreen,NULL};
|
||||
CGFunctionRef axialFunction=CGFunctionCreate(self,1,domain,4,range,&axialCallbacks);
|
||||
CGFunctionRef radialFunction=CGFunctionCreate(self,1,domain,4,range,&radialCallbacks);
|
||||
CGColorSpaceRef colorSpace=CGColorSpaceCreateDeviceRGB();
|
||||
|
||||
CGShadingRef axial=CGShadingCreateAxial(colorSpace,CGPointMake(0,0),
|
||||
CGPointMake(1,1),axialFunction,YES,YES);
|
||||
CGShadingRef radial=CGShadingCreateRadial(colorSpace,CGPointMake(0.5,0.75),0,
|
||||
CGPointMake(0.5,0.5),0.3,radialFunction,YES,YES);
|
||||
|
||||
|
||||
CGContextDrawShading(context,axial);
|
||||
CGContextDrawShading(context,radial);
|
||||
|
||||
CGFunctionRelease(axialFunction);
|
||||
CGFunctionRelease(radialFunction);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
CGShadingRelease(radial);
|
||||
CGShadingRelease(axial);
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Gradients";
|
||||
}
|
||||
|
||||
@end
|
16
testing/Examples/Quartz2D/DemoJoinCapDash.h
Normal file
16
testing/Examples/Quartz2D/DemoJoinCapDash.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// DemoJoinCapDash.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/9/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoJoinCapDash : Demo {
|
||||
|
||||
}
|
||||
|
||||
@end
|
65
testing/Examples/Quartz2D/DemoJoinCapDash.m
Normal file
65
testing/Examples/Quartz2D/DemoJoinCapDash.m
Normal file
@ -0,0 +1,65 @@
|
||||
//
|
||||
// DemoJoinCapDash.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/9/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoJoinCapDash.h"
|
||||
|
||||
|
||||
@implementation DemoJoinCapDash
|
||||
|
||||
static void drawLine(CGContextRef context){
|
||||
CGContextSetRGBStrokeColor(context,0,0,0,1);
|
||||
CGContextSetLineWidth(context,0.05);
|
||||
CGContextMoveToPoint(context,0.1,0.1);
|
||||
CGContextAddLineToPoint(context,0.5,0.5);
|
||||
CGContextAddLineToPoint(context,0.9,0.1);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextSetRGBStrokeColor(context,1,0,0,1);
|
||||
CGContextSetLineWidth(context,0.005);
|
||||
CGContextSetLineCap(context,kCGLineCapButt);
|
||||
CGContextSetLineJoin(context,kCGLineJoinMiter);
|
||||
CGContextMoveToPoint(context,0.1,0.1);
|
||||
CGContextAddLineToPoint(context,0.5,0.5);
|
||||
CGContextAddLineToPoint(context,0.9,0.1);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
|
||||
drawLine(context);
|
||||
CGContextTranslateCTM(context,0,0.1);
|
||||
|
||||
CGContextSetLineCap(context,kCGLineCapRound);
|
||||
CGContextSetLineJoin(context,kCGLineJoinRound);
|
||||
drawLine(context);
|
||||
|
||||
CGContextTranslateCTM(context,0,0.1);
|
||||
CGContextSetLineCap(context,kCGLineJoinBevel);
|
||||
CGContextSetLineJoin(context,kCGLineCapSquare);
|
||||
drawLine(context);
|
||||
|
||||
CGContextTranslateCTM(context,0,0.1);
|
||||
CGFloat lengths[20];
|
||||
CGFloat delta=0.01;
|
||||
int i;
|
||||
|
||||
for(i=0;i<20;i+=2){
|
||||
lengths[i]=delta/2;
|
||||
lengths[i+1]=delta;
|
||||
delta+=0.005;
|
||||
}
|
||||
|
||||
CGContextSetLineDash(context,0,lengths,20);
|
||||
drawLine(context);
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Join Cap Dash";
|
||||
}
|
||||
|
||||
@end
|
16
testing/Examples/Quartz2D/DemoPaths.h
Normal file
16
testing/Examples/Quartz2D/DemoPaths.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// DemoPaths.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface DemoPaths : NSObject {
|
||||
|
||||
}
|
||||
|
||||
@end
|
14
testing/Examples/Quartz2D/DemoPaths.m
Normal file
14
testing/Examples/Quartz2D/DemoPaths.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// DemoPaths.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoPaths.h"
|
||||
|
||||
|
||||
@implementation DemoPaths
|
||||
|
||||
@end
|
17
testing/Examples/Quartz2D/DemoPattern.h
Normal file
17
testing/Examples/Quartz2D/DemoPattern.h
Normal file
@ -0,0 +1,17 @@
|
||||
//
|
||||
// DemoPattern.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/9/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoPattern : Demo {
|
||||
CGImageRef _image;
|
||||
|
||||
}
|
||||
|
||||
@end
|
61
testing/Examples/Quartz2D/DemoPattern.m
Normal file
61
testing/Examples/Quartz2D/DemoPattern.m
Normal file
@ -0,0 +1,61 @@
|
||||
//
|
||||
// DemoPattern.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/9/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoPattern.h"
|
||||
|
||||
|
||||
@implementation DemoPattern
|
||||
|
||||
-init {
|
||||
_image=[self createImageWithName:@"stankard"];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
static void drawPattern(void *info, CGContextRef ctxt){
|
||||
DemoPattern *self=(DemoPattern *)info;
|
||||
|
||||
CGContextSetRGBFillColor(ctxt,1,0,0,0.5);
|
||||
CGContextFillEllipseInRect(ctxt,CGRectMake(0,0,.5,.5));
|
||||
CGContextSetRGBFillColor(ctxt,1,0,1,0.5);
|
||||
CGContextFillEllipseInRect(ctxt,CGRectMake(0.5,0.5,0.3,0.3));
|
||||
CGContextSetRGBFillColor(ctxt,0,0,1,0.5);
|
||||
CGContextFillEllipseInRect(ctxt,CGRectMake(0.2,0.2,0.6,0.6));
|
||||
CGContextSetRGBFillColor(ctxt,0,1,1,0.5);
|
||||
CGContextFillEllipseInRect(ctxt,CGRectMake(0,0.6,0.4,0.4));
|
||||
CGContextDrawImage(ctxt,CGRectMake(0.25,0.25,0.5,0.5),self->_image);
|
||||
}
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
CGPatternCallbacks callbacks={0,drawPattern,NULL};
|
||||
CGPatternRef pattern=CGPatternCreate(self,CGRectMake(0,0,1,1),CGAffineTransformMakeScale(100,100),0.5,0.5,kCGPatternTilingNoDistortion,YES,&callbacks);
|
||||
CGColorSpaceRef colorSpace=CGColorSpaceCreatePattern(NULL);
|
||||
CGFloat components[1]={1};
|
||||
CGColorRef color=CGColorCreateWithPattern(colorSpace,pattern,components);
|
||||
|
||||
CGContextSaveGState(context);
|
||||
|
||||
CGContextSetFillColorWithColor(context,color);
|
||||
CGContextFillRect(context,CGRectMake(0,0,1,1));
|
||||
CGContextRestoreGState(context);
|
||||
|
||||
CGColorRelease(color);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
CGPatternRelease(pattern);
|
||||
}
|
||||
|
||||
-(NSString *)title {
|
||||
return @"CGPattern";
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Overlapping function based pattern composed of ellipses and image";
|
||||
}
|
||||
|
||||
|
||||
@end
|
16
testing/Examples/Quartz2D/DemoPorterDuff.h
Normal file
16
testing/Examples/Quartz2D/DemoPorterDuff.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// DemoPorterDuff.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoPorterDuff : Demo {
|
||||
|
||||
}
|
||||
|
||||
@end
|
59
testing/Examples/Quartz2D/DemoPorterDuff.m
Normal file
59
testing/Examples/Quartz2D/DemoPorterDuff.m
Normal file
@ -0,0 +1,59 @@
|
||||
//
|
||||
// DemoPorterDuff.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoPorterDuff.h"
|
||||
|
||||
|
||||
@implementation DemoPorterDuff
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
int i,numberOfModes=11;
|
||||
CGBlendMode modes[]={
|
||||
kCGBlendModeNormal,
|
||||
kCGBlendModeClear,
|
||||
kCGBlendModeCopy,
|
||||
kCGBlendModeSourceIn,
|
||||
kCGBlendModeSourceOut,
|
||||
kCGBlendModeSourceAtop,
|
||||
kCGBlendModeDestinationOver,
|
||||
kCGBlendModeDestinationIn,
|
||||
kCGBlendModeDestinationOut,
|
||||
kCGBlendModeDestinationAtop,
|
||||
kCGBlendModeXOR,
|
||||
};
|
||||
|
||||
CGFloat height=1.0/numberOfModes;
|
||||
|
||||
CGContextClearRect(context,CGRectMake(0,0,1,1));
|
||||
|
||||
for(i=0;i<numberOfModes;i++){
|
||||
|
||||
CGFloat j,numberOfBars=10;
|
||||
CGFloat barHeight=height/numberOfBars;
|
||||
CGFloat barWidth=1.0/numberOfBars;
|
||||
|
||||
CGContextSetBlendMode(context,kCGBlendModeCopy);
|
||||
for(j=0;j<numberOfBars;j++){
|
||||
CGContextSetRGBFillColor(context,j/numberOfBars*0.7,j/numberOfBars*0.8,j/numberOfBars*0.9,j/numberOfBars);
|
||||
CGContextFillRect(context,CGRectMake(0,i*height+j*barHeight,1,barHeight));
|
||||
}
|
||||
|
||||
CGContextSetBlendMode(context,modes[i]);
|
||||
for(j=0;j<numberOfBars;j++){
|
||||
CGContextSetRGBFillColor(context,j/numberOfBars*0.9,j/numberOfBars*0.7,j/numberOfBars*0.8,j/numberOfBars);
|
||||
CGContextFillRect(context,CGRectMake(j*barWidth,i*height,barWidth,height));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Porter Duff";
|
||||
}
|
||||
|
||||
@end
|
19
testing/Examples/Quartz2D/DemoSoftMask.h
Normal file
19
testing/Examples/Quartz2D/DemoSoftMask.h
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// DemoSoftMask.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/10/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoSoftMask : Demo {
|
||||
CGImageRef _image;
|
||||
CGImageRef _mask;
|
||||
CGImageRef _maskedImage;
|
||||
|
||||
}
|
||||
|
||||
@end
|
37
testing/Examples/Quartz2D/DemoSoftMask.m
Normal file
37
testing/Examples/Quartz2D/DemoSoftMask.m
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// DemoSoftMask.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/10/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoSoftMask.h"
|
||||
|
||||
|
||||
@implementation DemoSoftMask
|
||||
|
||||
-init {
|
||||
_image=[self createImageWithName:@"stankard"];
|
||||
uint8_t *bytes=malloc(1);
|
||||
|
||||
bytes[0]=128;
|
||||
|
||||
CGDataProviderRef provider=CGDataProviderCreateWithData(NULL,bytes,1,NULL);
|
||||
_mask=CGImageMaskCreate(1,1,8,8,1,provider,NULL,YES);
|
||||
_maskedImage=CGImageCreateWithMask(_image,_mask);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
CGContextSetInterpolationQuality(context,kCGInterpolationHigh);
|
||||
CGContextDrawImage(context,CGRectMake(0,0,0.5,1),_image);
|
||||
CGContextDrawImage(context,CGRectMake(0.5,0,0.5,1),_maskedImage);
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Image with Soft Mask";
|
||||
}
|
||||
|
||||
@end
|
19
testing/Examples/Quartz2D/DemoView.h
Normal file
19
testing/Examples/Quartz2D/DemoView.h
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// DemoView.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@class Demo;
|
||||
|
||||
@interface DemoView : NSView {
|
||||
Demo *_demo;
|
||||
}
|
||||
|
||||
-(void)setDemo:(Demo *)value;
|
||||
|
||||
@end
|
44
testing/Examples/Quartz2D/DemoView.m
Normal file
44
testing/Examples/Quartz2D/DemoView.m
Normal file
@ -0,0 +1,44 @@
|
||||
//
|
||||
// DemoView.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoView.h"
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@implementation DemoView
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
// Initialization code here.
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)setDemo:(Demo *)value {
|
||||
value=[value retain];
|
||||
[_demo release];
|
||||
_demo=value;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
CGContextRef context=[[NSGraphicsContext currentContext] graphicsPort];
|
||||
NSRect bounds=[self bounds];
|
||||
|
||||
[[NSColor whiteColor] set];
|
||||
NSRectFill([self bounds]);
|
||||
|
||||
CGContextSaveGState(context);
|
||||
|
||||
CGContextScaleCTM(context,bounds.size.width,bounds.size.height);
|
||||
[_demo renderInContext:context];
|
||||
CGContextRestoreGState(context);
|
||||
}
|
||||
|
||||
@end
|
16
testing/Examples/Quartz2D/DemoWindingRules.h
Normal file
16
testing/Examples/Quartz2D/DemoWindingRules.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// DemoWindingRules.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/10/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Demo.h"
|
||||
|
||||
|
||||
@interface DemoWindingRules : Demo {
|
||||
|
||||
}
|
||||
|
||||
@end
|
43
testing/Examples/Quartz2D/DemoWindingRules.m
Normal file
43
testing/Examples/Quartz2D/DemoWindingRules.m
Normal file
@ -0,0 +1,43 @@
|
||||
//
|
||||
// DemoWindingRules.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/10/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DemoWindingRules.h"
|
||||
|
||||
|
||||
@implementation DemoWindingRules
|
||||
|
||||
-(void)renderInContext:(CGContextRef)context {
|
||||
int i,numberOfCircles=6;
|
||||
|
||||
CGContextScaleCTM(context,1.5,1);
|
||||
|
||||
CGFloat y=0,yDelta=1.0/(kCGPathEOFillStroke+1);
|
||||
CGPathDrawingMode mode;
|
||||
|
||||
for(mode=kCGPathFill;mode<=kCGPathEOFillStroke;mode++){
|
||||
CGFloat x=0.1,delta=0.1;
|
||||
|
||||
CGContextSetRGBFillColor(context,0.25,0.5,0,1);
|
||||
CGContextSetRGBStrokeColor(context,0.4,0.4,0.4,0.5);
|
||||
CGContextSetLineWidth(context,0.01);
|
||||
for(i=0;i<numberOfCircles;i++){
|
||||
CGContextAddEllipseInRect(context,CGRectMake(x,y,delta,yDelta-yDelta*0.1));
|
||||
x+=delta/1.5;
|
||||
}
|
||||
CGContextDrawPath(context,mode);
|
||||
|
||||
y+=yDelta;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(NSString *)description {
|
||||
return @"Winding Rules";
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
4480
testing/Examples/Quartz2D/English.lproj/MainMenu.xib
Normal file
4480
testing/Examples/Quartz2D/English.lproj/MainMenu.xib
Normal file
File diff suppressed because it is too large
Load Diff
32
testing/Examples/Quartz2D/Quartz2D-Info.plist
Normal file
32
testing/Examples/Quartz2D/Quartz2D-Info.plist
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
462
testing/Examples/Quartz2D/Quartz2D.xcodeproj/project.pbxproj
Normal file
462
testing/Examples/Quartz2D/Quartz2D.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,462 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
||||
256AC3DA0F4B6AC300CF3369 /* Quartz2DAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* Quartz2DAppDelegate.m */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
FE0B970A12B1923E00034CC9 /* DemoAntialias.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0B970912B1923E00034CC9 /* DemoAntialias.m */; };
|
||||
FE0B973212B1A9B100034CC9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
FE0B973312B1A9B100034CC9 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
||||
FE0B973412B1A9B100034CC9 /* pattern.png in Resources */ = {isa = PBXBuildFile; fileRef = FE7F752812B03B5B00FDF52D /* pattern.png */; };
|
||||
FE0B973612B1A9B100034CC9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
FE0B973712B1A9B100034CC9 /* Quartz2DAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* Quartz2DAppDelegate.m */; };
|
||||
FE0B973812B1A9B100034CC9 /* Demo.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F72BF12B0131A00FDF52D /* Demo.m */; };
|
||||
FE0B973912B1A9B100034CC9 /* DemoPorterDuff.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F72C612B013C400FDF52D /* DemoPorterDuff.m */; };
|
||||
FE0B973A12B1A9B100034CC9 /* DemoView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F72CE12B014A600FDF52D /* DemoView.m */; };
|
||||
FE0B973B12B1A9B100034CC9 /* DemoAffineImages.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F750D12B0351C00FDF52D /* DemoAffineImages.m */; };
|
||||
FE0B973C12B1A9B100034CC9 /* DemoGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F75A012B0862D00FDF52D /* DemoGradient.m */; };
|
||||
FE0B973D12B1A9B100034CC9 /* DemoPaths.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F765112B0905700FDF52D /* DemoPaths.m */; };
|
||||
FE0B973E12B1A9B100034CC9 /* DemoAntialias.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0B970912B1923E00034CC9 /* DemoAntialias.m */; };
|
||||
FE0B97F712B1C8FB00034CC9 /* DemoPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0B97F612B1C8FB00034CC9 /* DemoPattern.m */; };
|
||||
FE0B99BC12B1DE0400034CC9 /* stankard.png in Resources */ = {isa = PBXBuildFile; fileRef = FE0B99BB12B1DE0400034CC9 /* stankard.png */; };
|
||||
FE0B99BD12B1DE0400034CC9 /* stankard.png in Resources */ = {isa = PBXBuildFile; fileRef = FE0B99BB12B1DE0400034CC9 /* stankard.png */; };
|
||||
FE0B99F712B1E42200034CC9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
|
||||
FE0B99F812B1E42300034CC9 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; };
|
||||
FE0B9AA712B1E62000034CC9 /* DemoPattern.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0B97F612B1C8FB00034CC9 /* DemoPattern.m */; };
|
||||
FE0B9B0112B1E7BF00034CC9 /* DemoJoinCapDash.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0B9B0012B1E7BF00034CC9 /* DemoJoinCapDash.m */; };
|
||||
FE0B9B0212B1E7BF00034CC9 /* DemoJoinCapDash.m in Sources */ = {isa = PBXBuildFile; fileRef = FE0B9B0012B1E7BF00034CC9 /* DemoJoinCapDash.m */; };
|
||||
FE7F72C012B0131A00FDF52D /* Demo.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F72BF12B0131A00FDF52D /* Demo.m */; };
|
||||
FE7F72C712B013C400FDF52D /* DemoPorterDuff.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F72C612B013C400FDF52D /* DemoPorterDuff.m */; };
|
||||
FE7F72CF12B014A600FDF52D /* DemoView.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F72CE12B014A600FDF52D /* DemoView.m */; };
|
||||
FE7F750E12B0351C00FDF52D /* DemoAffineImages.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F750D12B0351C00FDF52D /* DemoAffineImages.m */; };
|
||||
FE7F752912B03B5B00FDF52D /* pattern.png in Resources */ = {isa = PBXBuildFile; fileRef = FE7F752812B03B5B00FDF52D /* pattern.png */; };
|
||||
FE7F75A112B0862D00FDF52D /* DemoGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F75A012B0862D00FDF52D /* DemoGradient.m */; };
|
||||
FE7F765212B0905700FDF52D /* DemoPaths.m in Sources */ = {isa = PBXBuildFile; fileRef = FE7F765112B0905700FDF52D /* DemoPaths.m */; };
|
||||
FE9F240712B28E41007FB405 /* DemoWindingRules.m in Sources */ = {isa = PBXBuildFile; fileRef = FE9F240612B28E41007FB405 /* DemoWindingRules.m */; };
|
||||
FE9F240812B28E41007FB405 /* DemoWindingRules.m in Sources */ = {isa = PBXBuildFile; fileRef = FE9F240612B28E41007FB405 /* DemoWindingRules.m */; };
|
||||
FE9F275C12B2E203007FB405 /* DemoSoftMask.m in Sources */ = {isa = PBXBuildFile; fileRef = FE9F275B12B2E203007FB405 /* DemoSoftMask.m */; };
|
||||
FE9F275D12B2E203007FB405 /* DemoSoftMask.m in Sources */ = {isa = PBXBuildFile; fileRef = FE9F275B12B2E203007FB405 /* DemoSoftMask.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
FE0B9A0512B1E42900034CC9 /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = org.cocotron.1.0.windows.i386.gcc.default;
|
||||
fileType = sourcecode.c;
|
||||
isEditable = 1;
|
||||
outputFiles = (
|
||||
);
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
256AC3D80F4B6AC300CF3369 /* Quartz2DAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Quartz2DAppDelegate.h; sourceTree = "<group>"; };
|
||||
256AC3D90F4B6AC300CF3369 /* Quartz2DAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Quartz2DAppDelegate.m; sourceTree = "<group>"; };
|
||||
256AC3F00F4B6AF500CF3369 /* Quartz2D_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Quartz2D_Prefix.pch; sourceTree = "<group>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D1107310486CEB800E47090 /* Quartz2D-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Quartz2D-Info.plist"; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* Quartz2D.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Quartz2D.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FE0B970812B1923E00034CC9 /* DemoAntialias.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoAntialias.h; sourceTree = "<group>"; };
|
||||
FE0B970912B1923E00034CC9 /* DemoAntialias.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoAntialias.m; sourceTree = "<group>"; };
|
||||
FE0B974312B1A9B100034CC9 /* Quartz2D.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Quartz2D.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FE0B97F512B1C8FB00034CC9 /* DemoPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoPattern.h; sourceTree = "<group>"; };
|
||||
FE0B97F612B1C8FB00034CC9 /* DemoPattern.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoPattern.m; sourceTree = "<group>"; };
|
||||
FE0B99BB12B1DE0400034CC9 /* stankard.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = stankard.png; sourceTree = "<group>"; };
|
||||
FE0B9AFF12B1E7BF00034CC9 /* DemoJoinCapDash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoJoinCapDash.h; sourceTree = "<group>"; };
|
||||
FE0B9B0012B1E7BF00034CC9 /* DemoJoinCapDash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoJoinCapDash.m; sourceTree = "<group>"; };
|
||||
FE7F72BE12B0131A00FDF52D /* Demo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Demo.h; sourceTree = "<group>"; };
|
||||
FE7F72BF12B0131A00FDF52D /* Demo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Demo.m; sourceTree = "<group>"; };
|
||||
FE7F72C512B013C400FDF52D /* DemoPorterDuff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoPorterDuff.h; sourceTree = "<group>"; };
|
||||
FE7F72C612B013C400FDF52D /* DemoPorterDuff.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoPorterDuff.m; sourceTree = "<group>"; };
|
||||
FE7F72CD12B014A600FDF52D /* DemoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoView.h; sourceTree = "<group>"; };
|
||||
FE7F72CE12B014A600FDF52D /* DemoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoView.m; sourceTree = "<group>"; };
|
||||
FE7F750C12B0351C00FDF52D /* DemoAffineImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoAffineImages.h; sourceTree = "<group>"; };
|
||||
FE7F750D12B0351C00FDF52D /* DemoAffineImages.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoAffineImages.m; sourceTree = "<group>"; };
|
||||
FE7F752812B03B5B00FDF52D /* pattern.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pattern.png; sourceTree = "<group>"; };
|
||||
FE7F759F12B0862D00FDF52D /* DemoGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoGradient.h; sourceTree = "<group>"; };
|
||||
FE7F75A012B0862D00FDF52D /* DemoGradient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoGradient.m; sourceTree = "<group>"; };
|
||||
FE7F765012B0905700FDF52D /* DemoPaths.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoPaths.h; sourceTree = "<group>"; };
|
||||
FE7F765112B0905700FDF52D /* DemoPaths.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoPaths.m; sourceTree = "<group>"; };
|
||||
FE9F240512B28E41007FB405 /* DemoWindingRules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoWindingRules.h; sourceTree = "<group>"; };
|
||||
FE9F240612B28E41007FB405 /* DemoWindingRules.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoWindingRules.m; sourceTree = "<group>"; };
|
||||
FE9F275A12B2E203007FB405 /* DemoSoftMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DemoSoftMask.h; sourceTree = "<group>"; };
|
||||
FE9F275B12B2E203007FB405 /* DemoSoftMask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DemoSoftMask.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FE0B973F12B1A9B100034CC9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FE0B99F712B1E42200034CC9 /* Foundation.framework in Frameworks */,
|
||||
FE0B99F812B1E42300034CC9 /* AppKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FE0B97F512B1C8FB00034CC9 /* DemoPattern.h */,
|
||||
FE0B97F612B1C8FB00034CC9 /* DemoPattern.m */,
|
||||
256AC3D80F4B6AC300CF3369 /* Quartz2DAppDelegate.h */,
|
||||
256AC3D90F4B6AC300CF3369 /* Quartz2DAppDelegate.m */,
|
||||
FE7F72BE12B0131A00FDF52D /* Demo.h */,
|
||||
FE7F72BF12B0131A00FDF52D /* Demo.m */,
|
||||
FE7F72C512B013C400FDF52D /* DemoPorterDuff.h */,
|
||||
FE7F72C612B013C400FDF52D /* DemoPorterDuff.m */,
|
||||
FE7F759F12B0862D00FDF52D /* DemoGradient.h */,
|
||||
FE7F75A012B0862D00FDF52D /* DemoGradient.m */,
|
||||
FE7F72CD12B014A600FDF52D /* DemoView.h */,
|
||||
FE7F72CE12B014A600FDF52D /* DemoView.m */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
FE7F750C12B0351C00FDF52D /* DemoAffineImages.h */,
|
||||
FE7F750D12B0351C00FDF52D /* DemoAffineImages.m */,
|
||||
FE7F765012B0905700FDF52D /* DemoPaths.h */,
|
||||
FE7F765112B0905700FDF52D /* DemoPaths.m */,
|
||||
FE0B970812B1923E00034CC9 /* DemoAntialias.h */,
|
||||
FE0B970912B1923E00034CC9 /* DemoAntialias.m */,
|
||||
FE0B9AFF12B1E7BF00034CC9 /* DemoJoinCapDash.h */,
|
||||
FE0B9B0012B1E7BF00034CC9 /* DemoJoinCapDash.m */,
|
||||
FE9F275A12B2E203007FB405 /* DemoSoftMask.h */,
|
||||
FE9F275B12B2E203007FB405 /* DemoSoftMask.m */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* Quartz2D.app */,
|
||||
FE0B974312B1A9B100034CC9 /* Quartz2D.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* Quartz2D */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
FE9F240512B28E41007FB405 /* DemoWindingRules.h */,
|
||||
FE9F240612B28E41007FB405 /* DemoWindingRules.m */,
|
||||
);
|
||||
name = Quartz2D;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
256AC3F00F4B6AF500CF3369 /* Quartz2D_Prefix.pch */,
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FE0B99BB12B1DE0400034CC9 /* stankard.png */,
|
||||
FE7F752812B03B5B00FDF52D /* pattern.png */,
|
||||
8D1107310486CEB800E47090 /* Quartz2D-Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* Quartz2D */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Quartz2D" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Quartz2D;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = Quartz2D;
|
||||
productReference = 8D1107320486CEB800E47090 /* Quartz2D.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FE0B973012B1A9B100034CC9 /* Quartz2D-Windows-i386 */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FE0B974112B1A9B100034CC9 /* Build configuration list for PBXNativeTarget "Quartz2D-Windows-i386" */;
|
||||
buildPhases = (
|
||||
FE0B973112B1A9B100034CC9 /* Resources */,
|
||||
FE0B973512B1A9B100034CC9 /* Sources */,
|
||||
FE0B973F12B1A9B100034CC9 /* Frameworks */,
|
||||
FE0B9A1412B1E4B500034CC9 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
FE0B9A0512B1E42900034CC9 /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "Quartz2D-Windows-i386";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = Quartz2D;
|
||||
productReference = FE0B974312B1A9B100034CC9 /* Quartz2D.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Quartz2D" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* Quartz2D */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* Quartz2D */,
|
||||
FE0B973012B1A9B100034CC9 /* Quartz2D-Windows-i386 */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
|
||||
FE7F752912B03B5B00FDF52D /* pattern.png in Resources */,
|
||||
FE0B99BC12B1DE0400034CC9 /* stankard.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FE0B973112B1A9B100034CC9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FE0B973212B1A9B100034CC9 /* InfoPlist.strings in Resources */,
|
||||
FE0B973312B1A9B100034CC9 /* MainMenu.xib in Resources */,
|
||||
FE0B973412B1A9B100034CC9 /* pattern.png in Resources */,
|
||||
FE0B99BD12B1DE0400034CC9 /* stankard.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
FE0B9A1412B1E4B500034CC9 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/Developer/Cocotron/1.0/bin/retargetBundle -framework Foundation -framework AppKit -framework CoreData -destination $TARGET_BUILD_DIR\"/\"$EXECUTABLE_FOLDER_PATH\ncp /Developer/Cocotron/1.0/Windows/i386/gcc-4.3.1/i386-mingw32msvc/bin/freetype6.dll \"$TARGET_BUILD_DIR\"/\"$EXECUTABLE_FOLDER_PATH\"\ncp /Developer/Cocotron/1.0/Windows/i386/gcc-4.3.1/i386-mingw32msvc/bin/zlib1.dll \"$TARGET_BUILD_DIR\"/\"$EXECUTABLE_FOLDER_PATH\"\n\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
256AC3DA0F4B6AC300CF3369 /* Quartz2DAppDelegate.m in Sources */,
|
||||
FE7F72C012B0131A00FDF52D /* Demo.m in Sources */,
|
||||
FE7F72C712B013C400FDF52D /* DemoPorterDuff.m in Sources */,
|
||||
FE7F72CF12B014A600FDF52D /* DemoView.m in Sources */,
|
||||
FE7F750E12B0351C00FDF52D /* DemoAffineImages.m in Sources */,
|
||||
FE7F75A112B0862D00FDF52D /* DemoGradient.m in Sources */,
|
||||
FE7F765212B0905700FDF52D /* DemoPaths.m in Sources */,
|
||||
FE0B970A12B1923E00034CC9 /* DemoAntialias.m in Sources */,
|
||||
FE0B97F712B1C8FB00034CC9 /* DemoPattern.m in Sources */,
|
||||
FE0B9B0112B1E7BF00034CC9 /* DemoJoinCapDash.m in Sources */,
|
||||
FE9F240712B28E41007FB405 /* DemoWindingRules.m in Sources */,
|
||||
FE9F275C12B2E203007FB405 /* DemoSoftMask.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FE0B973512B1A9B100034CC9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FE0B973612B1A9B100034CC9 /* main.m in Sources */,
|
||||
FE0B973712B1A9B100034CC9 /* Quartz2DAppDelegate.m in Sources */,
|
||||
FE0B973812B1A9B100034CC9 /* Demo.m in Sources */,
|
||||
FE0B973912B1A9B100034CC9 /* DemoPorterDuff.m in Sources */,
|
||||
FE0B973A12B1A9B100034CC9 /* DemoView.m in Sources */,
|
||||
FE0B973B12B1A9B100034CC9 /* DemoAffineImages.m in Sources */,
|
||||
FE0B973C12B1A9B100034CC9 /* DemoGradient.m in Sources */,
|
||||
FE0B973D12B1A9B100034CC9 /* DemoPaths.m in Sources */,
|
||||
FE0B973E12B1A9B100034CC9 /* DemoAntialias.m in Sources */,
|
||||
FE0B9AA712B1E62000034CC9 /* DemoPattern.m in Sources */,
|
||||
FE0B9B0212B1E7BF00034CC9 /* DemoJoinCapDash.m in Sources */,
|
||||
FE9F240812B28E41007FB405 /* DemoWindingRules.m in Sources */,
|
||||
FE9F275D12B2E203007FB405 /* DemoSoftMask.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
1DDD58150DA1D0A300B32029 /* English */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
INFOPLIST_FILE = "Quartz2D-Info.plist";
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
PRODUCT_NAME = Quartz2D;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
FE0B974212B1A9B100034CC9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
EXECUTABLE_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Windows";
|
||||
EXECUTABLE_SUFFIX = .exe;
|
||||
FRAMEWORK_SEARCH_PATHS = /Developer/Cocotron/1.0/Windows/i386/Frameworks;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
INFOPLIST_FILE = "Quartz2D-Info.plist";
|
||||
OTHER_LDFLAGS = (
|
||||
"-Wl,--enable-auto-import",
|
||||
"-mwindows",
|
||||
"-mconsole",
|
||||
);
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = Quartz2D;
|
||||
SYMROOT = build/Windows;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Quartz2D" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4C08A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Quartz2D" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
FE0B974112B1A9B100034CC9 /* Build configuration list for PBXNativeTarget "Quartz2D-Windows-i386" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FE0B974212B1A9B100034CC9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
24
testing/Examples/Quartz2D/Quartz2DAppDelegate.h
Normal file
24
testing/Examples/Quartz2D/Quartz2DAppDelegate.h
Normal file
@ -0,0 +1,24 @@
|
||||
//
|
||||
// Quartz2DAppDelegate.h
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@class DemoView;
|
||||
|
||||
@interface Quartz2DAppDelegate : NSObject <NSApplicationDelegate> {
|
||||
NSWindow *window;
|
||||
NSArray *_allDemos;
|
||||
IBOutlet NSPopUpButton *_popupButton;
|
||||
IBOutlet DemoView *_demoView;
|
||||
}
|
||||
|
||||
@property (assign) IBOutlet NSWindow *window;
|
||||
|
||||
-(void)selectDemo:sender;
|
||||
|
||||
@end
|
78
testing/Examples/Quartz2D/Quartz2DAppDelegate.m
Normal file
78
testing/Examples/Quartz2D/Quartz2DAppDelegate.m
Normal file
@ -0,0 +1,78 @@
|
||||
//
|
||||
// Quartz2DAppDelegate.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Quartz2DAppDelegate.h"
|
||||
#import "Demo.h"
|
||||
#import "DemoView.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@implementation Quartz2DAppDelegate
|
||||
|
||||
@synthesize window;
|
||||
|
||||
NSArray *ClassGetSubclasses(Class parentClass){
|
||||
int numClasses = objc_getClassList(NULL, 0);
|
||||
Class *classes = NULL;
|
||||
|
||||
classes = malloc(sizeof(Class) * numClasses);
|
||||
numClasses = objc_getClassList(classes, numClasses);
|
||||
|
||||
NSMutableArray *result = [NSMutableArray array];
|
||||
NSInteger i;
|
||||
|
||||
for ( i = 0; i < numClasses; i++)
|
||||
{
|
||||
Class superClass = classes[i];
|
||||
do
|
||||
{
|
||||
superClass = class_getSuperclass(superClass);
|
||||
} while(superClass && superClass != parentClass);
|
||||
|
||||
if (superClass == nil)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
[result addObject:classes[i]];
|
||||
}
|
||||
|
||||
free(classes);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
|
||||
[_popupButton removeAllItems];
|
||||
|
||||
NSArray *demoClasses=ClassGetSubclasses([Demo class]);
|
||||
|
||||
NSMutableArray *demoInstances=[NSMutableArray array];
|
||||
|
||||
for(Class demoClass in demoClasses)
|
||||
[demoInstances addObject:[[demoClass alloc] init]];
|
||||
|
||||
_allDemos=[demoInstances copy];
|
||||
|
||||
for(Demo *demo in _allDemos){
|
||||
[_popupButton addItemWithTitle:[demo title]];
|
||||
}
|
||||
|
||||
[_demoView setDemo:[demoInstances objectAtIndex:0]];
|
||||
}
|
||||
|
||||
-(void)selectDemo:sender {
|
||||
NSString *title=[sender titleOfSelectedItem];
|
||||
|
||||
for(Demo *check in _allDemos)
|
||||
if([[check title] isEqual:title])
|
||||
[_demoView setDemo:check];
|
||||
}
|
||||
|
||||
|
||||
@end
|
7
testing/Examples/Quartz2D/Quartz2D_Prefix.pch
Normal file
7
testing/Examples/Quartz2D/Quartz2D_Prefix.pch
Normal file
@ -0,0 +1,7 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'Quartz2D' target in the 'Quartz2D' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
14
testing/Examples/Quartz2D/main.m
Normal file
14
testing/Examples/Quartz2D/main.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// main.m
|
||||
// Quartz2D
|
||||
//
|
||||
// Created by Christopher Lloyd on 12/8/10.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
BIN
testing/Examples/Quartz2D/pattern.png
Normal file
BIN
testing/Examples/Quartz2D/pattern.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 637 KiB |
BIN
testing/Examples/Quartz2D/stankard.png
Normal file
BIN
testing/Examples/Quartz2D/stankard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
29
testing/Examples/TextEditor/English.lproj/Credits.rtf
Normal file
29
testing/Examples/TextEditor/English.lproj/Credits.rtf
Normal file
@ -0,0 +1,29 @@
|
||||
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\paperw9840\paperh8400
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
||||
|
||||
\f0\b\fs24 \cf0 Engineering:
|
||||
\b0 \
|
||||
Some people\
|
||||
\
|
||||
|
||||
\b Human Interface Design:
|
||||
\b0 \
|
||||
Some other people\
|
||||
\
|
||||
|
||||
\b Testing:
|
||||
\b0 \
|
||||
Hopefully not nobody\
|
||||
\
|
||||
|
||||
\b Documentation:
|
||||
\b0 \
|
||||
Whoever\
|
||||
\
|
||||
|
||||
\b With special thanks to:
|
||||
\b0 \
|
||||
Mom\
|
||||
}
|
4
testing/Examples/TextEditor/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
4
testing/Examples/TextEditor/English.lproj/MainMenu.nib/classes.nib
generated
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
IBClasses = ({CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; });
|
||||
IBVersion = 1;
|
||||
}
|
23
testing/Examples/TextEditor/English.lproj/MainMenu.nib/info.nib
generated
Normal file
23
testing/Examples/TextEditor/English.lproj/MainMenu.nib/info.nib
generated
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>123 103 356 240 0 0 1680 1028 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>124 351 300 44 0 0 1680 1028 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8L2127</string>
|
||||
<key>IBUsesTextArchiving</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
9686
testing/Examples/TextEditor/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
9686
testing/Examples/TextEditor/English.lproj/MainMenu.nib/keyedobjects.nib
generated
Normal file
File diff suppressed because it is too large
Load Diff
12
testing/Examples/TextEditor/English.lproj/MyDocument.nib/classes.nib
generated
Normal file
12
testing/Examples/TextEditor/English.lproj/MyDocument.nib/classes.nib
generated
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
IBClasses = (
|
||||
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
|
||||
{
|
||||
CLASS = MyDocument;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {"_textView" = NSTextView; };
|
||||
SUPERCLASS = NSDocument;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
}
|
18
testing/Examples/TextEditor/English.lproj/MyDocument.nib/info.nib
generated
Normal file
18
testing/Examples/TextEditor/English.lproj/MyDocument.nib/info.nib
generated
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>492 77 356 240 0 0 1680 1028 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>446.1</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8L2127</string>
|
||||
<key>IBUsesTextArchiving</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
1379
testing/Examples/TextEditor/English.lproj/MyDocument.nib/keyedobjects.nib
generated
Normal file
1379
testing/Examples/TextEditor/English.lproj/MyDocument.nib/keyedobjects.nib
generated
Normal file
File diff suppressed because it is too large
Load Diff
71
testing/Examples/TextEditor/Info.plist
Normal file
71
testing/Examples/TextEditor/Info.plist
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>txt</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>txt file</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>????</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSDocumentClass</key>
|
||||
<string>MyDocument</string>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>Binary</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>text</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>text file</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>????</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSDocumentClass</key>
|
||||
<string>MyDocument</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocotron.TextEditor</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
17
testing/Examples/TextEditor/MyDocument.h
Normal file
17
testing/Examples/TextEditor/MyDocument.h
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright (c) 2006 Christopher J. W. Lloyd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface MyDocument : NSDocument
|
||||
{
|
||||
IBOutlet NSTextView *_textView;
|
||||
NSString *_string;
|
||||
}
|
||||
@end
|
51
testing/Examples/TextEditor/MyDocument.m
Normal file
51
testing/Examples/TextEditor/MyDocument.m
Normal file
@ -0,0 +1,51 @@
|
||||
/* Copyright (c) 2006 Christopher J. W. Lloyd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
|
||||
#import "MyDocument.h"
|
||||
|
||||
@implementation MyDocument
|
||||
|
||||
-init {
|
||||
[super init];
|
||||
_string=@"";
|
||||
return self;
|
||||
}
|
||||
|
||||
-(NSString *)windowNibName {
|
||||
return @"MyDocument";
|
||||
}
|
||||
|
||||
- (void)windowControllerDidLoadNib:(NSWindowController *) aController {
|
||||
[super windowControllerDidLoadNib:aController];
|
||||
[[[_textView textStorage] mutableString] setString:_string];
|
||||
[_string release];
|
||||
_string=nil;
|
||||
}
|
||||
|
||||
- (NSData *)dataRepresentationOfType:(NSString *)aType {
|
||||
return [[[_textView textStorage] string] dataUsingEncoding:NSISOLatin1StringEncoding];
|
||||
}
|
||||
|
||||
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType {
|
||||
_string=[[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding];
|
||||
|
||||
if(_textView!=nil){ // for revert
|
||||
[[[_textView textStorage] mutableString] setString:_string];
|
||||
[_string release];
|
||||
_string=nil;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void)textDidChange:(NSNotification *)note {
|
||||
[self updateChangeCount:NSChangeDone];
|
||||
}
|
||||
|
||||
@end
|
434
testing/Examples/TextEditor/TextEditor.xcodeproj/project.pbxproj
Normal file
434
testing/Examples/TextEditor/TextEditor.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,434 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 42;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
FE7135E30B370ED7006C9493 /* TextEditor */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = FE7135EE0B370F3A006C9493 /* Build configuration list for PBXAggregateTarget "TextEditor" */;
|
||||
buildPhases = (
|
||||
);
|
||||
dependencies = (
|
||||
FE7135E50B370EDC006C9493 /* PBXTargetDependency */,
|
||||
FE7135E70B370EDF006C9493 /* PBXTargetDependency */,
|
||||
);
|
||||
name = TextEditor;
|
||||
productName = TextEditor;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; };
|
||||
8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */; };
|
||||
8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */; };
|
||||
8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D15AC320486D014006FF6A4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
|
||||
FE7CDD490B35D0450079F150 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */; };
|
||||
FE7CDD4A0B35D0460079F150 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */; };
|
||||
FEF2CA110B35153A005449C7 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; };
|
||||
FEF2CA120B35153A005449C7 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */; };
|
||||
FEF2CA130B35153A005449C7 /* MyDocument.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */; };
|
||||
FEF2CA160B35153A005449C7 /* MyDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */; settings = {ATTRIBUTES = (); }; };
|
||||
FEF2CA170B35153A005449C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
FEF2CA190B35153A005449C7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXBuildRule section */
|
||||
FEF2CA500B351742005449C7 /* PBXBuildRule */ = {
|
||||
isa = PBXBuildRule;
|
||||
compilerSpec = org.cocotron.1.0.windows.i386.gcc.default;
|
||||
fileType = sourcecode.c;
|
||||
isEditable = 1;
|
||||
outputFiles = (
|
||||
);
|
||||
};
|
||||
/* End PBXBuildRule section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
FE7135E40B370EDC006C9493 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8D15AC270486D014006FF6A4;
|
||||
remoteInfo = "TextEditor-Mac";
|
||||
};
|
||||
FE7135E60B370EDF006C9493 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FEF2CA0F0B35153A005449C7;
|
||||
remoteInfo = "TextEditor-Windows";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyDocument.m; sourceTree = "<group>"; };
|
||||
2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyDocument.h; sourceTree = "<group>"; };
|
||||
2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
2A37F4B5FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MyDocument.nib; sourceTree = "<group>"; };
|
||||
2A37F4B7FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
|
||||
2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
|
||||
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D15AC370486D014006FF6A4 /* TextEditor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TextEditor.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FEF2CA1C0B35153A005449C7 /* TextEditor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TextEditor.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D15AC330486D014006FF6A4 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEF2CA180B35153A005449C7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEF2CA190B35153A005449C7 /* Cocoa.framework in Frameworks */,
|
||||
FE7CDD490B35D0450079F150 /* AppKit.framework in Frameworks */,
|
||||
FE7CDD4A0B35D0460079F150 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */,
|
||||
2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FB0FE9D524F11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D15AC370486D014006FF6A4 /* TextEditor.app */,
|
||||
FEF2CA1C0B35153A005449C7 /* TextEditor.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A37F4AAFDCFA73011CA2CEA /* TextEditor */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A37F4ABFDCFA73011CA2CEA /* Classes */,
|
||||
2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
|
||||
2A37F4AFFDCFA73011CA2CEA /* Other Sources */,
|
||||
19C28FB0FE9D524F11CA2CBB /* Products */,
|
||||
2A37F4B8FDCFA73011CA2CEA /* Resources */,
|
||||
);
|
||||
name = TextEditor;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A37F4AEFDCFA73011CA2CEA /* MyDocument.h */,
|
||||
2A37F4ACFDCFA73011CA2CEA /* MyDocument.m */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A37F4AFFDCFA73011CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A37F4B0FDCFA73011CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */,
|
||||
2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */,
|
||||
2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */,
|
||||
8D15AC360486D014006FF6A4 /* Info.plist */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A37F4C3FDCFA73011CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */,
|
||||
1058C7A8FEA54F5311CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D15AC270486D014006FF6A4 /* TextEditor-Mac */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "TextEditor-Mac" */;
|
||||
buildPhases = (
|
||||
8D15AC2B0486D014006FF6A4 /* Resources */,
|
||||
8D15AC300486D014006FF6A4 /* Sources */,
|
||||
8D15AC330486D014006FF6A4 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "TextEditor-Mac";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = TextEditor;
|
||||
productReference = 8D15AC370486D014006FF6A4 /* TextEditor.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FEF2CA0F0B35153A005449C7 /* TextEditor-Windows */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FEF2CA1A0B35153A005449C7 /* Build configuration list for PBXNativeTarget "TextEditor-Windows" */;
|
||||
buildPhases = (
|
||||
FEF2CA100B35153A005449C7 /* Resources */,
|
||||
FEF2CA150B35153A005449C7 /* Sources */,
|
||||
FEF2CA180B35153A005449C7 /* Frameworks */,
|
||||
FEB6746C0D2F2909006EE835 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
FEF2CA500B351742005449C7 /* PBXBuildRule */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "TextEditor-Windows";
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = TextEditor;
|
||||
productReference = FEF2CA1C0B35153A005449C7 /* TextEditor.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "TextEditor" */;
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 2A37F4AAFDCFA73011CA2CEA /* TextEditor */;
|
||||
projectDirPath = "";
|
||||
targets = (
|
||||
FE7135E30B370ED7006C9493 /* TextEditor */,
|
||||
8D15AC270486D014006FF6A4 /* TextEditor-Mac */,
|
||||
FEF2CA0F0B35153A005449C7 /* TextEditor-Windows */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D15AC2B0486D014006FF6A4 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D15AC2C0486D014006FF6A4 /* Credits.rtf in Resources */,
|
||||
8D15AC2D0486D014006FF6A4 /* MainMenu.nib in Resources */,
|
||||
8D15AC2E0486D014006FF6A4 /* MyDocument.nib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEF2CA100B35153A005449C7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEF2CA110B35153A005449C7 /* Credits.rtf in Resources */,
|
||||
FEF2CA120B35153A005449C7 /* MainMenu.nib in Resources */,
|
||||
FEF2CA130B35153A005449C7 /* MyDocument.nib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
FEB6746C0D2F2909006EE835 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/Developer/Cocotron/1.0/bin/retargetBundle -framework Foundation -framework AppKit -destination $TARGET_BUILD_DIR\"/\"$EXECUTABLE_FOLDER_PATH\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D15AC300486D014006FF6A4 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D15AC310486D014006FF6A4 /* MyDocument.m in Sources */,
|
||||
8D15AC320486D014006FF6A4 /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FEF2CA150B35153A005449C7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FEF2CA160B35153A005449C7 /* MyDocument.m in Sources */,
|
||||
FEF2CA170B35153A005449C7 /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
FE7135E50B370EDC006C9493 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 8D15AC270486D014006FF6A4 /* TextEditor-Mac */;
|
||||
targetProxy = FE7135E40B370EDC006C9493 /* PBXContainerItemProxy */;
|
||||
};
|
||||
FE7135E70B370EDF006C9493 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = FEF2CA0F0B35153A005449C7 /* TextEditor-Windows */;
|
||||
targetProxy = FE7135E60B370EDF006C9493 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
2A37F4B4FDCFA73011CA2CEA /* MyDocument.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
2A37F4B5FDCFA73011CA2CEA /* English */,
|
||||
);
|
||||
name = MyDocument.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
2A37F4B7FDCFA73011CA2CEA /* English */,
|
||||
);
|
||||
name = MainMenu.nib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
2A37F4BAFDCFA73011CA2CEA /* English */,
|
||||
);
|
||||
name = Credits.rtf;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C05733C808A9546B00998B17 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.3;
|
||||
PRODUCT_NAME = TextEditor;
|
||||
SYMROOT = build/Mac;
|
||||
WRAPPER_EXTENSION = app;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
C05733CC08A9546B00998B17 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FE7135EF0B370F3A006C9493 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
PRODUCT_NAME = TextEditor;
|
||||
ZERO_LINK = NO;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
FEF2CA1B0B35153A005449C7 /* Deployment */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = i386;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
EXECUTABLE_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Windows";
|
||||
EXECUTABLE_SUFFIX = .exe;
|
||||
FRAMEWORK_SEARCH_PATHS = /Developer/Cocotron/1.0/Windows/i386/Frameworks;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
OTHER_LDFLAGS = (
|
||||
"-Wl,--enable-auto-import",
|
||||
"-mwindows",
|
||||
);
|
||||
PREBINDING = NO;
|
||||
PRODUCT_NAME = TextEditor;
|
||||
SYMROOT = build/Windows;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C05733C708A9546B00998B17 /* Build configuration list for PBXNativeTarget "TextEditor-Mac" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C05733C808A9546B00998B17 /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
C05733CB08A9546B00998B17 /* Build configuration list for PBXProject "TextEditor" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C05733CC08A9546B00998B17 /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FE7135EE0B370F3A006C9493 /* Build configuration list for PBXAggregateTarget "TextEditor" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FE7135EF0B370F3A006C9493 /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
FEF2CA1A0B35153A005449C7 /* Build configuration list for PBXNativeTarget "TextEditor-Windows" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FEF2CA1B0B35153A005449C7 /* Deployment */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Deployment;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
|
||||
}
|
15
testing/Examples/TextEditor/main.m
Normal file
15
testing/Examples/TextEditor/main.m
Normal file
@ -0,0 +1,15 @@
|
||||
/* Copyright (c) 2006 Christopher J. W. Lloyd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **) argv);
|
||||
}
|
Loading…
Reference in New Issue
Block a user