├── .gitignore ├── Appearance Maker.xcodeproj └── project.pbxproj ├── Appearance Maker ├── AMBackgroundView.h ├── AMBackgroundView.m ├── AMColorsEditorViewController.h ├── AMColorsEditorViewController.m ├── AMCustomColorWell.h ├── AMCustomColorWell.m ├── AMDocumentBasedViewController.h ├── AMDocumentBasedViewController.m ├── AMDocumentWindow.h ├── AMDocumentWindow.m ├── AMEditorAppearance.car ├── AMEditorAppearance.h ├── AMEditorAppearance.m ├── AMEditorViewController.h ├── AMEditorViewController.m ├── AMEffectEditorWindowController.h ├── AMEffectEditorWindowController.m ├── AMEffectEditorWindowController.xib ├── AMElementsEditorViewController.h ├── AMElementsEditorViewController.m ├── AMFlippedClipView.h ├── AMFlippedClipView.m ├── AMFontsEditorViewController.h ├── AMFontsEditorViewController.m ├── AMMaterialsEditorViewController.h ├── AMMaterialsEditorViewController.m ├── AMPartTableCellView.h ├── AMPartTableCellView.m ├── AMPreviewViewController.h ├── AMPreviewViewController.m ├── AMSeparatorView.h ├── AMSeparatorView.m ├── AMSystemThemeStore.h ├── AMSystemThemeStore.m ├── AMThemeDocument.h ├── AMThemeDocument.m ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ └── Main.storyboard ├── CoreThemeDefinition Headers │ ├── Assets │ │ ├── PSDPreview.h │ │ ├── TDAsset.h │ │ ├── TDMicaAsset.h │ │ ├── TDPNGAsset.h │ │ └── TDPhotoshopAsset.h │ ├── CoreThemeDocument.h │ ├── Effect │ │ ├── TDEffectComponent.h │ │ ├── TDEffectParameterType.h │ │ ├── TDEffectParameterValue.h │ │ ├── TDEffectRenditionSpec.h │ │ ├── TDEffectStyleProduction.h │ │ ├── TDEffectType.h │ │ └── TDNamedEffectProduction.h │ ├── TDColor.h │ ├── TDDistillRunner.h │ ├── TDElementProduction.h │ ├── TDRenditionSpec.h │ ├── TDSchemaCategory.h │ ├── TDSchemaDefinition.h │ ├── TDThemeBitSource.h │ └── TDThemeConstant.h ├── CoreUI Headers │ ├── CUICatalog.h │ └── CUIStructuredThemeStore.h ├── Info.plist └── main.m ├── AppearancePreview └── Info.plist ├── Design ├── PhotoshopUI.sketch └── PhotoshopUI │ ├── checkerboard.png │ ├── checkerboard@2x.png │ └── checkerboard@3x.png ├── LICENSE ├── README.md └── screenshot_new.png /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | __MACOSX 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | *.xcworkspace 12 | !default.xcworkspace 13 | xcuserdata 14 | profile 15 | *.moved-aside 16 | DerivedData 17 | *.idea 18 | reference -------------------------------------------------------------------------------- /Appearance Maker.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 512874581B29CE91000B69A3 /* AMDocumentBasedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 512874571B29CE91000B69A3 /* AMDocumentBasedViewController.m */; }; 11 | 5128745D1B29E091000B69A3 /* CoreThemeDefinition.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5128745C1B29E091000B69A3 /* CoreThemeDefinition.framework */; }; 12 | 518B94491B2F8C5D004008A6 /* CoreUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 518B94481B2F8C5D004008A6 /* CoreUI.framework */; }; 13 | 518B944E1B2F92C3004008A6 /* AMSystemThemeStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 518B944D1B2F92C3004008A6 /* AMSystemThemeStore.m */; }; 14 | 51A2C2AE1B291C5D002B5971 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2AD1B291C5D002B5971 /* AppDelegate.m */; }; 15 | 51A2C2B11B291C5D002B5971 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2B01B291C5D002B5971 /* main.m */; }; 16 | 51A2C2B41B291C5D002B5971 /* AMEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2B31B291C5D002B5971 /* AMEditorViewController.m */; }; 17 | 51A2C2B71B291C5D002B5971 /* AMThemeDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2B61B291C5D002B5971 /* AMThemeDocument.m */; }; 18 | 51A2C2B91B291C5D002B5971 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 51A2C2B81B291C5D002B5971 /* Assets.xcassets */; }; 19 | 51A2C2BC1B291C5D002B5971 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 51A2C2BA1B291C5D002B5971 /* Main.storyboard */; }; 20 | 51A2C2CB1B291E23002B5971 /* AMElementsEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2CA1B291E23002B5971 /* AMElementsEditorViewController.m */; }; 21 | 51A2C2CF1B291E4A002B5971 /* AMFontsEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2CD1B291E4A002B5971 /* AMFontsEditorViewController.m */; }; 22 | 51A2C2D71B2927EF002B5971 /* AMSeparatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2D61B2927EF002B5971 /* AMSeparatorView.m */; }; 23 | 51A2C2DA1B292A42002B5971 /* AMPartTableCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 51A2C2D91B292A42002B5971 /* AMPartTableCellView.m */; }; 24 | 51E9DAD61B292E050031E002 /* AMDocumentWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E9DAD51B292E050031E002 /* AMDocumentWindow.m */; }; 25 | 51E9DAD91B29364B0031E002 /* AMColorsEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E9DAD81B29364B0031E002 /* AMColorsEditorViewController.m */; }; 26 | 51E9DADC1B2936700031E002 /* AMPreviewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E9DADB1B2936700031E002 /* AMPreviewViewController.m */; }; 27 | 51E9DADF1B29393A0031E002 /* AMBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E9DADE1B29393A0031E002 /* AMBackgroundView.m */; }; 28 | 51E9DAEC1B293B730031E002 /* AppearancePreview.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 51E9DAE41B293B540031E002 /* AppearancePreview.bundle */; }; 29 | 51E9DAF71B2947F20031E002 /* AMEditorAppearance.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E9DAF61B2947F20031E002 /* AMEditorAppearance.m */; }; 30 | 51E9DAF91B2948FA0031E002 /* AMEditorAppearance.car in Resources */ = {isa = PBXBuildFile; fileRef = 51E9DAF81B2948FA0031E002 /* AMEditorAppearance.car */; }; 31 | B30ADE1F1E56D45900D53F27 /* AMCustomColorWell.m in Sources */ = {isa = PBXBuildFile; fileRef = B30ADE1E1E56D45900D53F27 /* AMCustomColorWell.m */; }; 32 | DD3B2E831C88E6120000D811 /* AMMaterialsEditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3B2E821C88E6120000D811 /* AMMaterialsEditorViewController.m */; }; 33 | DDFC04F11C87336D00162CCE /* AMEffectEditorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDFC04EF1C87336D00162CCE /* AMEffectEditorWindowController.m */; }; 34 | DDFC04F21C87336D00162CCE /* AMEffectEditorWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DDFC04F01C87336D00162CCE /* AMEffectEditorWindowController.xib */; }; 35 | DDFC04F61C87662400162CCE /* AMFlippedClipView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDFC04F51C87662400162CCE /* AMFlippedClipView.m */; }; 36 | /* End PBXBuildFile section */ 37 | 38 | /* Begin PBXContainerItemProxy section */ 39 | 51E9DAEA1B293B6F0031E002 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = 51A2C2A11B291C5D002B5971 /* Project object */; 42 | proxyType = 1; 43 | remoteGlobalIDString = 51E9DAE31B293B540031E002; 44 | remoteInfo = AppearancePreview; 45 | }; 46 | /* End PBXContainerItemProxy section */ 47 | 48 | /* Begin PBXFileReference section */ 49 | 512874561B29CE91000B69A3 /* AMDocumentBasedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMDocumentBasedViewController.h; sourceTree = ""; }; 50 | 512874571B29CE91000B69A3 /* AMDocumentBasedViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMDocumentBasedViewController.m; sourceTree = ""; }; 51 | 5128745C1B29E091000B69A3 /* CoreThemeDefinition.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreThemeDefinition.framework; path = ../../../../../../../System/Library/PrivateFrameworks/CoreThemeDefinition.framework; sourceTree = ""; }; 52 | 518B94481B2F8C5D004008A6 /* CoreUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreUI.framework; path = ../../../../../../../System/Library/PrivateFrameworks/CoreUI.framework; sourceTree = ""; }; 53 | 518B944C1B2F92C3004008A6 /* AMSystemThemeStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMSystemThemeStore.h; sourceTree = ""; }; 54 | 518B944D1B2F92C3004008A6 /* AMSystemThemeStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMSystemThemeStore.m; sourceTree = ""; }; 55 | 51A2C2A91B291C5D002B5971 /* Appearance Maker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Appearance Maker.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 51A2C2AC1B291C5D002B5971 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 57 | 51A2C2AD1B291C5D002B5971 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 58 | 51A2C2B01B291C5D002B5971 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 59 | 51A2C2B21B291C5D002B5971 /* AMEditorViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMEditorViewController.h; sourceTree = ""; }; 60 | 51A2C2B31B291C5D002B5971 /* AMEditorViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMEditorViewController.m; sourceTree = ""; }; 61 | 51A2C2B51B291C5D002B5971 /* AMThemeDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMThemeDocument.h; sourceTree = ""; }; 62 | 51A2C2B61B291C5D002B5971 /* AMThemeDocument.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMThemeDocument.m; sourceTree = ""; }; 63 | 51A2C2B81B291C5D002B5971 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 64 | 51A2C2BB1B291C5D002B5971 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 65 | 51A2C2BD1B291C5D002B5971 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | 51A2C2C91B291E23002B5971 /* AMElementsEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMElementsEditorViewController.h; sourceTree = ""; }; 67 | 51A2C2CA1B291E23002B5971 /* AMElementsEditorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMElementsEditorViewController.m; sourceTree = ""; }; 68 | 51A2C2CC1B291E4A002B5971 /* AMFontsEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMFontsEditorViewController.h; sourceTree = ""; }; 69 | 51A2C2CD1B291E4A002B5971 /* AMFontsEditorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMFontsEditorViewController.m; sourceTree = ""; }; 70 | 51A2C2D51B2927EF002B5971 /* AMSeparatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMSeparatorView.h; sourceTree = ""; }; 71 | 51A2C2D61B2927EF002B5971 /* AMSeparatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMSeparatorView.m; sourceTree = ""; }; 72 | 51A2C2D81B292A42002B5971 /* AMPartTableCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPartTableCellView.h; sourceTree = ""; }; 73 | 51A2C2D91B292A42002B5971 /* AMPartTableCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPartTableCellView.m; sourceTree = ""; }; 74 | 51E9DAD41B292E050031E002 /* AMDocumentWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMDocumentWindow.h; sourceTree = ""; }; 75 | 51E9DAD51B292E050031E002 /* AMDocumentWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMDocumentWindow.m; sourceTree = ""; }; 76 | 51E9DAD71B29364B0031E002 /* AMColorsEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMColorsEditorViewController.h; sourceTree = ""; }; 77 | 51E9DAD81B29364B0031E002 /* AMColorsEditorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMColorsEditorViewController.m; sourceTree = ""; }; 78 | 51E9DADA1B2936700031E002 /* AMPreviewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPreviewViewController.h; sourceTree = ""; }; 79 | 51E9DADB1B2936700031E002 /* AMPreviewViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPreviewViewController.m; sourceTree = ""; }; 80 | 51E9DADD1B29393A0031E002 /* AMBackgroundView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMBackgroundView.h; sourceTree = ""; }; 81 | 51E9DADE1B29393A0031E002 /* AMBackgroundView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMBackgroundView.m; sourceTree = ""; }; 82 | 51E9DAE41B293B540031E002 /* AppearancePreview.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AppearancePreview.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | 51E9DAE61B293B540031E002 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 84 | 51E9DAF51B2947F20031E002 /* AMEditorAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMEditorAppearance.h; sourceTree = ""; }; 85 | 51E9DAF61B2947F20031E002 /* AMEditorAppearance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMEditorAppearance.m; sourceTree = ""; }; 86 | 51E9DAF81B2948FA0031E002 /* AMEditorAppearance.car */ = {isa = PBXFileReference; lastKnownFileType = file; path = AMEditorAppearance.car; sourceTree = ""; }; 87 | B30ADE1D1E56D45900D53F27 /* AMCustomColorWell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMCustomColorWell.h; sourceTree = ""; }; 88 | B30ADE1E1E56D45900D53F27 /* AMCustomColorWell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMCustomColorWell.m; sourceTree = ""; }; 89 | DD3B2E811C88E6120000D811 /* AMMaterialsEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMMaterialsEditorViewController.h; sourceTree = ""; }; 90 | DD3B2E821C88E6120000D811 /* AMMaterialsEditorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMMaterialsEditorViewController.m; sourceTree = ""; }; 91 | DD3B2F021C8935C40000D811 /* TDAsset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDAsset.h; sourceTree = ""; }; 92 | DD3B2F031C8935C40000D811 /* TDMicaAsset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDMicaAsset.h; sourceTree = ""; }; 93 | DD3B2F041C8935C40000D811 /* TDPhotoshopAsset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDPhotoshopAsset.h; sourceTree = ""; }; 94 | DD3B2F051C8935C40000D811 /* TDPNGAsset.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDPNGAsset.h; sourceTree = ""; }; 95 | DDFC04DA1C872CAB00162CCE /* CoreThemeDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreThemeDocument.h; sourceTree = ""; }; 96 | DDFC04DB1C872CAB00162CCE /* TDColor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDColor.h; sourceTree = ""; }; 97 | DDFC04DC1C872CAB00162CCE /* TDDistillRunner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDDistillRunner.h; sourceTree = ""; }; 98 | DDFC04DD1C872CAB00162CCE /* TDSchemaCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDSchemaCategory.h; sourceTree = ""; }; 99 | DDFC04DE1C872CAB00162CCE /* TDSchemaDefinition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDSchemaDefinition.h; sourceTree = ""; }; 100 | DDFC04DF1C872CAB00162CCE /* TDThemeConstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDThemeConstant.h; sourceTree = ""; }; 101 | DDFC04E11C872CB300162CCE /* CUICatalog.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CUICatalog.h; sourceTree = ""; }; 102 | DDFC04E21C872CB300162CCE /* CUIStructuredThemeStore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CUIStructuredThemeStore.h; sourceTree = ""; }; 103 | DDFC04E41C872D2C00162CCE /* TDEffectComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDEffectComponent.h; sourceTree = ""; }; 104 | DDFC04E51C872D2C00162CCE /* TDEffectParameterType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDEffectParameterType.h; sourceTree = ""; }; 105 | DDFC04E61C872D2C00162CCE /* TDEffectParameterValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDEffectParameterValue.h; sourceTree = ""; }; 106 | DDFC04E71C872D2C00162CCE /* TDEffectRenditionSpec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDEffectRenditionSpec.h; sourceTree = ""; }; 107 | DDFC04E81C872D2C00162CCE /* TDEffectStyleProduction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDEffectStyleProduction.h; sourceTree = ""; }; 108 | DDFC04E91C872D2C00162CCE /* TDEffectType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDEffectType.h; sourceTree = ""; }; 109 | DDFC04EA1C872D2C00162CCE /* TDNamedEffectProduction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDNamedEffectProduction.h; sourceTree = ""; }; 110 | DDFC04EC1C872D8800162CCE /* TDElementProduction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDElementProduction.h; sourceTree = ""; }; 111 | DDFC04ED1C87321C00162CCE /* TDRenditionSpec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDRenditionSpec.h; sourceTree = ""; }; 112 | DDFC04EE1C87336D00162CCE /* AMEffectEditorWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMEffectEditorWindowController.h; sourceTree = ""; }; 113 | DDFC04EF1C87336D00162CCE /* AMEffectEditorWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMEffectEditorWindowController.m; sourceTree = ""; }; 114 | DDFC04F01C87336D00162CCE /* AMEffectEditorWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AMEffectEditorWindowController.xib; sourceTree = ""; }; 115 | DDFC04F41C87662400162CCE /* AMFlippedClipView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMFlippedClipView.h; sourceTree = ""; }; 116 | DDFC04F51C87662400162CCE /* AMFlippedClipView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMFlippedClipView.m; sourceTree = ""; }; 117 | DDFD0BE51CFE5BC100AB804F /* TDThemeBitSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TDThemeBitSource.h; sourceTree = ""; }; 118 | DDFD0BE71CFE5D3E00AB804F /* PSDPreview.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PSDPreview.h; sourceTree = ""; }; 119 | /* End PBXFileReference section */ 120 | 121 | /* Begin PBXFrameworksBuildPhase section */ 122 | 51A2C2A61B291C5D002B5971 /* Frameworks */ = { 123 | isa = PBXFrameworksBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | 518B94491B2F8C5D004008A6 /* CoreUI.framework in Frameworks */, 127 | 5128745D1B29E091000B69A3 /* CoreThemeDefinition.framework in Frameworks */, 128 | ); 129 | runOnlyForDeploymentPostprocessing = 0; 130 | }; 131 | 51E9DAE11B293B540031E002 /* Frameworks */ = { 132 | isa = PBXFrameworksBuildPhase; 133 | buildActionMask = 2147483647; 134 | files = ( 135 | ); 136 | runOnlyForDeploymentPostprocessing = 0; 137 | }; 138 | /* End PBXFrameworksBuildPhase section */ 139 | 140 | /* Begin PBXGroup section */ 141 | 51A2C2A01B291C5D002B5971 = { 142 | isa = PBXGroup; 143 | children = ( 144 | 518B94481B2F8C5D004008A6 /* CoreUI.framework */, 145 | 5128745C1B29E091000B69A3 /* CoreThemeDefinition.framework */, 146 | 51A2C2AB1B291C5D002B5971 /* Appearance Maker */, 147 | 51E9DAE51B293B540031E002 /* AppearancePreview */, 148 | 51A2C2AA1B291C5D002B5971 /* Products */, 149 | ); 150 | sourceTree = ""; 151 | }; 152 | 51A2C2AA1B291C5D002B5971 /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 51A2C2A91B291C5D002B5971 /* Appearance Maker.app */, 156 | 51E9DAE41B293B540031E002 /* AppearancePreview.bundle */, 157 | ); 158 | name = Products; 159 | sourceTree = ""; 160 | }; 161 | 51A2C2AB1B291C5D002B5971 /* Appearance Maker */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | DDFC04E01C872CB300162CCE /* CoreUI Headers */, 165 | DDFC04D91C872CAB00162CCE /* CoreThemeDefinition Headers */, 166 | 51E9DAF41B2947E30031E002 /* Helpers */, 167 | 51A2C2D41B2927DB002B5971 /* Views */, 168 | 51A2C2C61B291CCB002B5971 /* Resources */, 169 | 51A2C2C51B291CA5002B5971 /* Controllers */, 170 | 51A2C2AF1B291C5D002B5971 /* Supporting Files */, 171 | ); 172 | path = "Appearance Maker"; 173 | sourceTree = ""; 174 | }; 175 | 51A2C2AF1B291C5D002B5971 /* Supporting Files */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 51E9DAF81B2948FA0031E002 /* AMEditorAppearance.car */, 179 | 51A2C2BD1B291C5D002B5971 /* Info.plist */, 180 | 51A2C2AC1B291C5D002B5971 /* AppDelegate.h */, 181 | 51A2C2AD1B291C5D002B5971 /* AppDelegate.m */, 182 | 51A2C2B01B291C5D002B5971 /* main.m */, 183 | ); 184 | name = "Supporting Files"; 185 | sourceTree = ""; 186 | }; 187 | 51A2C2C51B291CA5002B5971 /* Controllers */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | DDFC04F31C87337100162CCE /* Effect Editor */, 191 | 51A2C2B21B291C5D002B5971 /* AMEditorViewController.h */, 192 | 51A2C2B31B291C5D002B5971 /* AMEditorViewController.m */, 193 | 51A2C2B51B291C5D002B5971 /* AMThemeDocument.h */, 194 | 51A2C2B61B291C5D002B5971 /* AMThemeDocument.m */, 195 | 51A2C2C91B291E23002B5971 /* AMElementsEditorViewController.h */, 196 | 51A2C2CA1B291E23002B5971 /* AMElementsEditorViewController.m */, 197 | DD3B2E811C88E6120000D811 /* AMMaterialsEditorViewController.h */, 198 | DD3B2E821C88E6120000D811 /* AMMaterialsEditorViewController.m */, 199 | 51A2C2CC1B291E4A002B5971 /* AMFontsEditorViewController.h */, 200 | 51A2C2CD1B291E4A002B5971 /* AMFontsEditorViewController.m */, 201 | 51E9DAD71B29364B0031E002 /* AMColorsEditorViewController.h */, 202 | 51E9DAD81B29364B0031E002 /* AMColorsEditorViewController.m */, 203 | 51E9DADA1B2936700031E002 /* AMPreviewViewController.h */, 204 | 51E9DADB1B2936700031E002 /* AMPreviewViewController.m */, 205 | 512874561B29CE91000B69A3 /* AMDocumentBasedViewController.h */, 206 | 512874571B29CE91000B69A3 /* AMDocumentBasedViewController.m */, 207 | ); 208 | name = Controllers; 209 | sourceTree = ""; 210 | }; 211 | 51A2C2C61B291CCB002B5971 /* Resources */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 51A2C2B81B291C5D002B5971 /* Assets.xcassets */, 215 | 51A2C2BA1B291C5D002B5971 /* Main.storyboard */, 216 | DDFC04F01C87336D00162CCE /* AMEffectEditorWindowController.xib */, 217 | ); 218 | name = Resources; 219 | sourceTree = ""; 220 | }; 221 | 51A2C2D41B2927DB002B5971 /* Views */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | 51A2C2D51B2927EF002B5971 /* AMSeparatorView.h */, 225 | 51A2C2D61B2927EF002B5971 /* AMSeparatorView.m */, 226 | 51A2C2D81B292A42002B5971 /* AMPartTableCellView.h */, 227 | 51A2C2D91B292A42002B5971 /* AMPartTableCellView.m */, 228 | 51E9DAD41B292E050031E002 /* AMDocumentWindow.h */, 229 | 51E9DAD51B292E050031E002 /* AMDocumentWindow.m */, 230 | 51E9DADD1B29393A0031E002 /* AMBackgroundView.h */, 231 | 51E9DADE1B29393A0031E002 /* AMBackgroundView.m */, 232 | DDFC04F41C87662400162CCE /* AMFlippedClipView.h */, 233 | DDFC04F51C87662400162CCE /* AMFlippedClipView.m */, 234 | B30ADE1D1E56D45900D53F27 /* AMCustomColorWell.h */, 235 | B30ADE1E1E56D45900D53F27 /* AMCustomColorWell.m */, 236 | ); 237 | name = Views; 238 | sourceTree = ""; 239 | }; 240 | 51E9DAE51B293B540031E002 /* AppearancePreview */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | 51E9DAE61B293B540031E002 /* Info.plist */, 244 | ); 245 | path = AppearancePreview; 246 | sourceTree = ""; 247 | }; 248 | 51E9DAF41B2947E30031E002 /* Helpers */ = { 249 | isa = PBXGroup; 250 | children = ( 251 | 51E9DAF51B2947F20031E002 /* AMEditorAppearance.h */, 252 | 51E9DAF61B2947F20031E002 /* AMEditorAppearance.m */, 253 | 518B944C1B2F92C3004008A6 /* AMSystemThemeStore.h */, 254 | 518B944D1B2F92C3004008A6 /* AMSystemThemeStore.m */, 255 | ); 256 | name = Helpers; 257 | sourceTree = ""; 258 | }; 259 | DD3B2F011C8935C40000D811 /* Assets */ = { 260 | isa = PBXGroup; 261 | children = ( 262 | DD3B2F021C8935C40000D811 /* TDAsset.h */, 263 | DD3B2F031C8935C40000D811 /* TDMicaAsset.h */, 264 | DD3B2F041C8935C40000D811 /* TDPhotoshopAsset.h */, 265 | DD3B2F051C8935C40000D811 /* TDPNGAsset.h */, 266 | DDFD0BE71CFE5D3E00AB804F /* PSDPreview.h */, 267 | ); 268 | path = Assets; 269 | sourceTree = ""; 270 | }; 271 | DDFC04D91C872CAB00162CCE /* CoreThemeDefinition Headers */ = { 272 | isa = PBXGroup; 273 | children = ( 274 | DD3B2F011C8935C40000D811 /* Assets */, 275 | DDFC04E31C872D2C00162CCE /* Effect */, 276 | DDFC04DA1C872CAB00162CCE /* CoreThemeDocument.h */, 277 | DDFC04DB1C872CAB00162CCE /* TDColor.h */, 278 | DDFC04DC1C872CAB00162CCE /* TDDistillRunner.h */, 279 | DDFC04DD1C872CAB00162CCE /* TDSchemaCategory.h */, 280 | DDFC04DE1C872CAB00162CCE /* TDSchemaDefinition.h */, 281 | DDFC04DF1C872CAB00162CCE /* TDThemeConstant.h */, 282 | DDFC04EC1C872D8800162CCE /* TDElementProduction.h */, 283 | DDFC04ED1C87321C00162CCE /* TDRenditionSpec.h */, 284 | DDFD0BE51CFE5BC100AB804F /* TDThemeBitSource.h */, 285 | ); 286 | path = "CoreThemeDefinition Headers"; 287 | sourceTree = ""; 288 | }; 289 | DDFC04E01C872CB300162CCE /* CoreUI Headers */ = { 290 | isa = PBXGroup; 291 | children = ( 292 | DDFC04E11C872CB300162CCE /* CUICatalog.h */, 293 | DDFC04E21C872CB300162CCE /* CUIStructuredThemeStore.h */, 294 | ); 295 | path = "CoreUI Headers"; 296 | sourceTree = ""; 297 | }; 298 | DDFC04E31C872D2C00162CCE /* Effect */ = { 299 | isa = PBXGroup; 300 | children = ( 301 | DDFC04E81C872D2C00162CCE /* TDEffectStyleProduction.h */, 302 | DDFC04EA1C872D2C00162CCE /* TDNamedEffectProduction.h */, 303 | DDFC04E41C872D2C00162CCE /* TDEffectComponent.h */, 304 | DDFC04E51C872D2C00162CCE /* TDEffectParameterType.h */, 305 | DDFC04E61C872D2C00162CCE /* TDEffectParameterValue.h */, 306 | DDFC04E71C872D2C00162CCE /* TDEffectRenditionSpec.h */, 307 | DDFC04E91C872D2C00162CCE /* TDEffectType.h */, 308 | ); 309 | path = Effect; 310 | sourceTree = ""; 311 | }; 312 | DDFC04F31C87337100162CCE /* Effect Editor */ = { 313 | isa = PBXGroup; 314 | children = ( 315 | DDFC04EE1C87336D00162CCE /* AMEffectEditorWindowController.h */, 316 | DDFC04EF1C87336D00162CCE /* AMEffectEditorWindowController.m */, 317 | ); 318 | name = "Effect Editor"; 319 | sourceTree = ""; 320 | }; 321 | /* End PBXGroup section */ 322 | 323 | /* Begin PBXNativeTarget section */ 324 | 51A2C2A81B291C5D002B5971 /* Appearance Maker */ = { 325 | isa = PBXNativeTarget; 326 | buildConfigurationList = 51A2C2C01B291C5D002B5971 /* Build configuration list for PBXNativeTarget "Appearance Maker" */; 327 | buildPhases = ( 328 | 51A2C2A51B291C5D002B5971 /* Sources */, 329 | 51A2C2A61B291C5D002B5971 /* Frameworks */, 330 | 51A2C2A71B291C5D002B5971 /* Resources */, 331 | ); 332 | buildRules = ( 333 | ); 334 | dependencies = ( 335 | 51E9DAEB1B293B6F0031E002 /* PBXTargetDependency */, 336 | ); 337 | name = "Appearance Maker"; 338 | productName = "Appearance Maker"; 339 | productReference = 51A2C2A91B291C5D002B5971 /* Appearance Maker.app */; 340 | productType = "com.apple.product-type.application"; 341 | }; 342 | 51E9DAE31B293B540031E002 /* AppearancePreview */ = { 343 | isa = PBXNativeTarget; 344 | buildConfigurationList = 51E9DAE71B293B540031E002 /* Build configuration list for PBXNativeTarget "AppearancePreview" */; 345 | buildPhases = ( 346 | 51E9DAE01B293B540031E002 /* Sources */, 347 | 51E9DAE11B293B540031E002 /* Frameworks */, 348 | 51E9DAE21B293B540031E002 /* Resources */, 349 | ); 350 | buildRules = ( 351 | ); 352 | dependencies = ( 353 | ); 354 | name = AppearancePreview; 355 | productName = AppearancePreview; 356 | productReference = 51E9DAE41B293B540031E002 /* AppearancePreview.bundle */; 357 | productType = "com.apple.product-type.bundle"; 358 | }; 359 | /* End PBXNativeTarget section */ 360 | 361 | /* Begin PBXProject section */ 362 | 51A2C2A11B291C5D002B5971 /* Project object */ = { 363 | isa = PBXProject; 364 | attributes = { 365 | LastSwiftUpdateCheck = 0730; 366 | LastUpgradeCheck = 0700; 367 | ORGANIZATIONNAME = "Guilherme Rambo"; 368 | TargetAttributes = { 369 | 51A2C2A81B291C5D002B5971 = { 370 | CreatedOnToolsVersion = 7.0; 371 | }; 372 | 51E9DAE31B293B540031E002 = { 373 | CreatedOnToolsVersion = 7.0; 374 | }; 375 | }; 376 | }; 377 | buildConfigurationList = 51A2C2A41B291C5D002B5971 /* Build configuration list for PBXProject "Appearance Maker" */; 378 | compatibilityVersion = "Xcode 3.2"; 379 | developmentRegion = English; 380 | hasScannedForEncodings = 0; 381 | knownRegions = ( 382 | en, 383 | Base, 384 | ); 385 | mainGroup = 51A2C2A01B291C5D002B5971; 386 | productRefGroup = 51A2C2AA1B291C5D002B5971 /* Products */; 387 | projectDirPath = ""; 388 | projectRoot = ""; 389 | targets = ( 390 | 51A2C2A81B291C5D002B5971 /* Appearance Maker */, 391 | 51E9DAE31B293B540031E002 /* AppearancePreview */, 392 | ); 393 | }; 394 | /* End PBXProject section */ 395 | 396 | /* Begin PBXResourcesBuildPhase section */ 397 | 51A2C2A71B291C5D002B5971 /* Resources */ = { 398 | isa = PBXResourcesBuildPhase; 399 | buildActionMask = 2147483647; 400 | files = ( 401 | 51A2C2B91B291C5D002B5971 /* Assets.xcassets in Resources */, 402 | DDFC04F21C87336D00162CCE /* AMEffectEditorWindowController.xib in Resources */, 403 | 51A2C2BC1B291C5D002B5971 /* Main.storyboard in Resources */, 404 | 51E9DAEC1B293B730031E002 /* AppearancePreview.bundle in Resources */, 405 | 51E9DAF91B2948FA0031E002 /* AMEditorAppearance.car in Resources */, 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | }; 409 | 51E9DAE21B293B540031E002 /* Resources */ = { 410 | isa = PBXResourcesBuildPhase; 411 | buildActionMask = 2147483647; 412 | files = ( 413 | ); 414 | runOnlyForDeploymentPostprocessing = 0; 415 | }; 416 | /* End PBXResourcesBuildPhase section */ 417 | 418 | /* Begin PBXSourcesBuildPhase section */ 419 | 51A2C2A51B291C5D002B5971 /* Sources */ = { 420 | isa = PBXSourcesBuildPhase; 421 | buildActionMask = 2147483647; 422 | files = ( 423 | DD3B2E831C88E6120000D811 /* AMMaterialsEditorViewController.m in Sources */, 424 | 51E9DAD61B292E050031E002 /* AMDocumentWindow.m in Sources */, 425 | 51E9DAD91B29364B0031E002 /* AMColorsEditorViewController.m in Sources */, 426 | DDFC04F11C87336D00162CCE /* AMEffectEditorWindowController.m in Sources */, 427 | B30ADE1F1E56D45900D53F27 /* AMCustomColorWell.m in Sources */, 428 | 51A2C2DA1B292A42002B5971 /* AMPartTableCellView.m in Sources */, 429 | 51E9DADC1B2936700031E002 /* AMPreviewViewController.m in Sources */, 430 | 51A2C2B71B291C5D002B5971 /* AMThemeDocument.m in Sources */, 431 | 51A2C2B41B291C5D002B5971 /* AMEditorViewController.m in Sources */, 432 | 51A2C2D71B2927EF002B5971 /* AMSeparatorView.m in Sources */, 433 | 51A2C2CF1B291E4A002B5971 /* AMFontsEditorViewController.m in Sources */, 434 | 51A2C2CB1B291E23002B5971 /* AMElementsEditorViewController.m in Sources */, 435 | 51A2C2B11B291C5D002B5971 /* main.m in Sources */, 436 | DDFC04F61C87662400162CCE /* AMFlippedClipView.m in Sources */, 437 | 51E9DAF71B2947F20031E002 /* AMEditorAppearance.m in Sources */, 438 | 51E9DADF1B29393A0031E002 /* AMBackgroundView.m in Sources */, 439 | 51A2C2AE1B291C5D002B5971 /* AppDelegate.m in Sources */, 440 | 512874581B29CE91000B69A3 /* AMDocumentBasedViewController.m in Sources */, 441 | 518B944E1B2F92C3004008A6 /* AMSystemThemeStore.m in Sources */, 442 | ); 443 | runOnlyForDeploymentPostprocessing = 0; 444 | }; 445 | 51E9DAE01B293B540031E002 /* Sources */ = { 446 | isa = PBXSourcesBuildPhase; 447 | buildActionMask = 2147483647; 448 | files = ( 449 | ); 450 | runOnlyForDeploymentPostprocessing = 0; 451 | }; 452 | /* End PBXSourcesBuildPhase section */ 453 | 454 | /* Begin PBXTargetDependency section */ 455 | 51E9DAEB1B293B6F0031E002 /* PBXTargetDependency */ = { 456 | isa = PBXTargetDependency; 457 | target = 51E9DAE31B293B540031E002 /* AppearancePreview */; 458 | targetProxy = 51E9DAEA1B293B6F0031E002 /* PBXContainerItemProxy */; 459 | }; 460 | /* End PBXTargetDependency section */ 461 | 462 | /* Begin PBXVariantGroup section */ 463 | 51A2C2BA1B291C5D002B5971 /* Main.storyboard */ = { 464 | isa = PBXVariantGroup; 465 | children = ( 466 | 51A2C2BB1B291C5D002B5971 /* Base */, 467 | ); 468 | name = Main.storyboard; 469 | sourceTree = ""; 470 | }; 471 | /* End PBXVariantGroup section */ 472 | 473 | /* Begin XCBuildConfiguration section */ 474 | 51A2C2BE1B291C5D002B5971 /* Debug */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | ALWAYS_SEARCH_USER_PATHS = NO; 478 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 479 | CLANG_CXX_LIBRARY = "libc++"; 480 | CLANG_ENABLE_MODULES = YES; 481 | CLANG_ENABLE_OBJC_ARC = YES; 482 | CLANG_WARN_BOOL_CONVERSION = YES; 483 | CLANG_WARN_CONSTANT_CONVERSION = YES; 484 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 485 | CLANG_WARN_EMPTY_BODY = YES; 486 | CLANG_WARN_ENUM_CONVERSION = YES; 487 | CLANG_WARN_INT_CONVERSION = YES; 488 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 489 | CLANG_WARN_UNREACHABLE_CODE = YES; 490 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 491 | CODE_SIGN_IDENTITY = "-"; 492 | COPY_PHASE_STRIP = NO; 493 | DEBUG_INFORMATION_FORMAT = dwarf; 494 | ENABLE_STRICT_OBJC_MSGSEND = YES; 495 | ENABLE_TESTABILITY = YES; 496 | GCC_C_LANGUAGE_STANDARD = gnu99; 497 | GCC_DYNAMIC_NO_PIC = NO; 498 | GCC_NO_COMMON_BLOCKS = YES; 499 | GCC_OPTIMIZATION_LEVEL = 0; 500 | GCC_PREPROCESSOR_DEFINITIONS = ( 501 | "DEBUG=1", 502 | "$(inherited)", 503 | ); 504 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 505 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 506 | GCC_WARN_UNDECLARED_SELECTOR = YES; 507 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 508 | GCC_WARN_UNUSED_FUNCTION = YES; 509 | GCC_WARN_UNUSED_VARIABLE = YES; 510 | MACOSX_DEPLOYMENT_TARGET = 10.11; 511 | MTL_ENABLE_DEBUG_INFO = YES; 512 | ONLY_ACTIVE_ARCH = YES; 513 | SDKROOT = macosx; 514 | }; 515 | name = Debug; 516 | }; 517 | 51A2C2BF1B291C5D002B5971 /* Release */ = { 518 | isa = XCBuildConfiguration; 519 | buildSettings = { 520 | ALWAYS_SEARCH_USER_PATHS = NO; 521 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 522 | CLANG_CXX_LIBRARY = "libc++"; 523 | CLANG_ENABLE_MODULES = YES; 524 | CLANG_ENABLE_OBJC_ARC = YES; 525 | CLANG_WARN_BOOL_CONVERSION = YES; 526 | CLANG_WARN_CONSTANT_CONVERSION = YES; 527 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 528 | CLANG_WARN_EMPTY_BODY = YES; 529 | CLANG_WARN_ENUM_CONVERSION = YES; 530 | CLANG_WARN_INT_CONVERSION = YES; 531 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 532 | CLANG_WARN_UNREACHABLE_CODE = YES; 533 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 534 | CODE_SIGN_IDENTITY = "-"; 535 | COPY_PHASE_STRIP = NO; 536 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 537 | ENABLE_NS_ASSERTIONS = NO; 538 | ENABLE_STRICT_OBJC_MSGSEND = YES; 539 | GCC_C_LANGUAGE_STANDARD = gnu99; 540 | GCC_NO_COMMON_BLOCKS = YES; 541 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 542 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 543 | GCC_WARN_UNDECLARED_SELECTOR = YES; 544 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 545 | GCC_WARN_UNUSED_FUNCTION = YES; 546 | GCC_WARN_UNUSED_VARIABLE = YES; 547 | MACOSX_DEPLOYMENT_TARGET = 10.11; 548 | MTL_ENABLE_DEBUG_INFO = NO; 549 | SDKROOT = macosx; 550 | }; 551 | name = Release; 552 | }; 553 | 51A2C2C11B291C5D002B5971 /* Debug */ = { 554 | isa = XCBuildConfiguration; 555 | buildSettings = { 556 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 557 | CLANG_ENABLE_MODULES = YES; 558 | COMBINE_HIDPI_IMAGES = YES; 559 | FRAMEWORK_SEARCH_PATHS = ( 560 | "$(inherited)", 561 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 562 | ); 563 | INFOPLIST_FILE = "Appearance Maker/Info.plist"; 564 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 565 | MACOSX_DEPLOYMENT_TARGET = 10.11; 566 | PRODUCT_BUNDLE_IDENTIFIER = "br.com.guilhermerambo.Appearance-Maker"; 567 | PRODUCT_NAME = "$(TARGET_NAME)"; 568 | SWIFT_OBJC_BRIDGING_HEADER = "Appearance Maker/Appearance Maker-Bridging-Header.h"; 569 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 570 | }; 571 | name = Debug; 572 | }; 573 | 51A2C2C21B291C5D002B5971 /* Release */ = { 574 | isa = XCBuildConfiguration; 575 | buildSettings = { 576 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 577 | CLANG_ENABLE_MODULES = YES; 578 | COMBINE_HIDPI_IMAGES = YES; 579 | FRAMEWORK_SEARCH_PATHS = ( 580 | "$(inherited)", 581 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 582 | ); 583 | INFOPLIST_FILE = "Appearance Maker/Info.plist"; 584 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 585 | MACOSX_DEPLOYMENT_TARGET = 10.11; 586 | PRODUCT_BUNDLE_IDENTIFIER = "br.com.guilhermerambo.Appearance-Maker"; 587 | PRODUCT_NAME = "$(TARGET_NAME)"; 588 | SWIFT_OBJC_BRIDGING_HEADER = "Appearance Maker/Appearance Maker-Bridging-Header.h"; 589 | }; 590 | name = Release; 591 | }; 592 | 51E9DAE81B293B540031E002 /* Debug */ = { 593 | isa = XCBuildConfiguration; 594 | buildSettings = { 595 | COMBINE_HIDPI_IMAGES = YES; 596 | INFOPLIST_FILE = AppearancePreview/Info.plist; 597 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; 598 | PRODUCT_BUNDLE_IDENTIFIER = br.com.guilhermerambo.AppearancePreview; 599 | PRODUCT_NAME = "$(TARGET_NAME)"; 600 | SKIP_INSTALL = YES; 601 | WRAPPER_EXTENSION = bundle; 602 | }; 603 | name = Debug; 604 | }; 605 | 51E9DAE91B293B540031E002 /* Release */ = { 606 | isa = XCBuildConfiguration; 607 | buildSettings = { 608 | COMBINE_HIDPI_IMAGES = YES; 609 | INFOPLIST_FILE = AppearancePreview/Info.plist; 610 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; 611 | PRODUCT_BUNDLE_IDENTIFIER = br.com.guilhermerambo.AppearancePreview; 612 | PRODUCT_NAME = "$(TARGET_NAME)"; 613 | SKIP_INSTALL = YES; 614 | WRAPPER_EXTENSION = bundle; 615 | }; 616 | name = Release; 617 | }; 618 | /* End XCBuildConfiguration section */ 619 | 620 | /* Begin XCConfigurationList section */ 621 | 51A2C2A41B291C5D002B5971 /* Build configuration list for PBXProject "Appearance Maker" */ = { 622 | isa = XCConfigurationList; 623 | buildConfigurations = ( 624 | 51A2C2BE1B291C5D002B5971 /* Debug */, 625 | 51A2C2BF1B291C5D002B5971 /* Release */, 626 | ); 627 | defaultConfigurationIsVisible = 0; 628 | defaultConfigurationName = Release; 629 | }; 630 | 51A2C2C01B291C5D002B5971 /* Build configuration list for PBXNativeTarget "Appearance Maker" */ = { 631 | isa = XCConfigurationList; 632 | buildConfigurations = ( 633 | 51A2C2C11B291C5D002B5971 /* Debug */, 634 | 51A2C2C21B291C5D002B5971 /* Release */, 635 | ); 636 | defaultConfigurationIsVisible = 0; 637 | defaultConfigurationName = Release; 638 | }; 639 | 51E9DAE71B293B540031E002 /* Build configuration list for PBXNativeTarget "AppearancePreview" */ = { 640 | isa = XCConfigurationList; 641 | buildConfigurations = ( 642 | 51E9DAE81B293B540031E002 /* Debug */, 643 | 51E9DAE91B293B540031E002 /* Release */, 644 | ); 645 | defaultConfigurationIsVisible = 0; 646 | defaultConfigurationName = Release; 647 | }; 648 | /* End XCConfigurationList section */ 649 | }; 650 | rootObject = 51A2C2A11B291C5D002B5971 /* Project object */; 651 | } 652 | -------------------------------------------------------------------------------- /Appearance Maker/AMBackgroundView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMBackgroundView.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | IB_DESIGNABLE 12 | @interface AMBackgroundView : NSView 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Appearance Maker/AMBackgroundView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMBackgroundView.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMBackgroundView.h" 10 | 11 | @implementation AMBackgroundView 12 | 13 | - (void)drawRect:(NSRect)dirtyRect { 14 | [super drawRect:dirtyRect]; 15 | 16 | [[NSColor whiteColor] setFill]; 17 | NSRectFill(dirtyRect); 18 | } 19 | 20 | - (BOOL)acceptsFirstResponder 21 | { 22 | return YES; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Appearance Maker/AMColorsEditorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMColorsEditorViewController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AMDocumentBasedViewController.h" 12 | 13 | @interface AMColorsEditorViewController : AMDocumentBasedViewController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Appearance Maker/AMColorsEditorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMColorsEditorViewController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMColorsEditorViewController.h" 10 | #import "AMThemeDocument.h" 11 | #import "AMSystemThemeStore.h" 12 | 13 | @interface AMColorsEditorViewController () 14 | 15 | @property (weak) IBOutlet NSPopUpButton *colorsPopUp; 16 | 17 | @property (nonatomic, strong) NSArray *colorNames; 18 | @property (nonatomic, strong) TDColorName *selectedColorName; 19 | 20 | @property (weak) IBOutlet NSColorWell *colorWell; 21 | @property (weak) IBOutlet NSTextField *infoLabel; 22 | 23 | @property (nonatomic, strong) TDColorDefinition *currentColorDefinition; 24 | 25 | @end 26 | 27 | @implementation AMColorsEditorViewController 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | // Do view setup here. 32 | } 33 | 34 | - (void)viewDidAppear 35 | { 36 | [super viewDidAppear]; 37 | 38 | [self loadColors]; 39 | } 40 | 41 | - (void)loadColors 42 | { 43 | NSArray *colors = [self.document allObjectsForEntity:@"ColorName" withSortDescriptors:self.document.defaultSortDescriptors]; 44 | NSMutableArray *finalColors = [[NSMutableArray alloc] initWithCapacity:colors.count]; 45 | for (TDColorName *colorName in colors) { 46 | if (![[AMSystemThemeStore defaultStore] hasPhysicalColorWithName:colorName.selector] && !colorName.colorDefinitions.count) continue; 47 | [finalColors addObject:colorName]; 48 | } 49 | self.colorNames = [finalColors copy]; 50 | } 51 | 52 | #pragma mark Color selection 53 | 54 | - (void)setColorNames:(NSArray *)colorNames 55 | { 56 | _colorNames = colorNames; 57 | 58 | [self populateColorsPopUp]; 59 | } 60 | 61 | - (void)populateColorsPopUp 62 | { 63 | [self.colorsPopUp removeAllItems]; 64 | 65 | for (TDColorName *name in self.colorNames) { 66 | NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:name.displayName action:nil keyEquivalent:@""]; 67 | item.representedObject = name; 68 | [self.colorsPopUp.menu addItem:item]; 69 | } 70 | 71 | [self colorsPopUpAction:self.colorsPopUp]; 72 | } 73 | 74 | - (IBAction)colorsPopUpAction:(id)sender 75 | { 76 | self.selectedColorName = self.colorsPopUp.selectedItem.representedObject; 77 | } 78 | 79 | - (void)setSelectedColorName:(TDColorName *)selectedColorName 80 | { 81 | _selectedColorName = selectedColorName; 82 | 83 | [self reflectColorSelectionChange]; 84 | } 85 | 86 | - (void)reflectColorSelectionChange 87 | { 88 | if (self.selectedColorName.colorDefinitions.count) { 89 | self.currentColorDefinition = self.selectedColorName.colorDefinitions.allObjects[0]; 90 | } else { 91 | self.currentColorDefinition = [self.document newObjectForEntity:@"ColorDefinition"]; 92 | self.currentColorDefinition.name = self.selectedColorName; 93 | self.currentColorDefinition.look = self.document.defaultLook; 94 | self.currentColorDefinition.dateOfLastChange = [NSDate date]; 95 | 96 | self.currentColorDefinition.colorStatus = [self.document constantWithName:@"ColorStatus" forIdentifier:1]; 97 | } 98 | 99 | [self updateColorWell]; 100 | } 101 | 102 | - (void)updateColorWell 103 | { 104 | if (self.currentColorDefinition.physicalColor && ![self.currentColorDefinition.physicalColor isEqualTo:@0]) { 105 | self.colorWell.color = [AMSystemThemeStore colorWithPhysicalColor:self.currentColorDefinition.physicalColor]; 106 | } else { 107 | colordef_t colorDef; 108 | if ([[AMSystemThemeStore defaultStore] getPhysicalColor:&colorDef withName:self.selectedColorName.selector]) { 109 | self.colorWell.color = [AMSystemThemeStore colorWithColorDef:colorDef]; 110 | } 111 | } 112 | } 113 | 114 | - (IBAction)colorWellAction:(id)sender 115 | { 116 | self.currentColorDefinition.physicalColor = [AMSystemThemeStore physicalColorWithColor:self.colorWell.color]; 117 | } 118 | 119 | @end 120 | -------------------------------------------------------------------------------- /Appearance Maker/AMCustomColorWell.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMCustomColorWell.h 3 | // Appearance Maker 4 | // 5 | // Created by leo on 2017/2/17. 6 | // Copyright © 2017年 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AMCustomColorWell : NSColorWell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Appearance Maker/AMCustomColorWell.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMCustomColorWell.m 3 | // Appearance Maker 4 | // 5 | // Created by leo on 2017/2/17. 6 | // Copyright © 2017年 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMCustomColorWell.h" 10 | 11 | @implementation AMCustomColorWell 12 | 13 | - (void)drawRect:(NSRect)dirtyRect { 14 | [super drawRect:dirtyRect]; 15 | 16 | // Drawing code here. 17 | } 18 | 19 | - (void)activate:(BOOL)exclusive 20 | { 21 | [[NSColorPanel sharedColorPanel] setShowsAlpha:YES]; 22 | [super activate:exclusive]; 23 | } 24 | 25 | - (void)deactivate 26 | { 27 | [super deactivate]; 28 | [[NSColorPanel sharedColorPanel] setShowsAlpha:NO]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Appearance Maker/AMDocumentBasedViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMDocumentBasedViewController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class AMThemeDocument; 12 | 13 | @interface AMDocumentBasedViewController : NSViewController 14 | 15 | @property (nonatomic, readonly) AMThemeDocument *document; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Appearance Maker/AMDocumentBasedViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMDocumentBasedViewController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMDocumentBasedViewController.h" 10 | 11 | #import "AMThemeDocument.h" 12 | #import "AMEditorAppearance.h" 13 | 14 | @interface AMDocumentBasedViewController () 15 | 16 | @end 17 | 18 | @implementation AMDocumentBasedViewController 19 | 20 | - (AMThemeDocument *)document 21 | { 22 | if (![self.representedObject isKindOfClass:[AMThemeDocument class]]) return nil; 23 | 24 | return (AMThemeDocument *)self.representedObject; 25 | } 26 | 27 | - (void)viewWillAppear 28 | { 29 | [super viewWillAppear]; 30 | 31 | self.view.appearance = [AMEditorAppearance appearance]; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Appearance Maker/AMDocumentWindow.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMDocumentWindow.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AMDocumentWindow : NSWindow 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Appearance Maker/AMDocumentWindow.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMDocumentWindow.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMDocumentWindow.h" 10 | 11 | @interface AMDocumentWindow () 12 | 13 | @property (nonatomic, readonly) NSTabViewController *tabVC; 14 | @property (nonatomic, strong) NSSegmentedControl *tabNavSegmentedControl; 15 | 16 | @end 17 | 18 | @implementation AMDocumentWindow 19 | { 20 | void *_childViewControllersObservationContext; 21 | void *_selectedTabObservationContext; 22 | } 23 | 24 | - (nonnull instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag 25 | { 26 | self = [super initWithContentRect:contentRect styleMask:aStyle backing:bufferingType defer:flag]; 27 | 28 | [self.contentView setWantsLayer:YES]; 29 | // self.titleVisibility = NSWindowTitleHidden; 30 | 31 | _childViewControllersObservationContext = &_childViewControllersObservationContext; 32 | _selectedTabObservationContext = &_selectedTabObservationContext; 33 | 34 | return self; 35 | } 36 | 37 | - (void)setContentViewController:(NSViewController * __nullable)contentViewController 38 | { 39 | [super setContentViewController:contentViewController]; 40 | 41 | if ([contentViewController isKindOfClass:[NSTabViewController class]]) { 42 | [self _am_setupTabNavigation]; 43 | } 44 | } 45 | 46 | - (void)_am_setupTabNavigation 47 | { 48 | [self.contentViewController addObserver:self 49 | forKeyPath:@"childViewControllers" 50 | options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew 51 | context:_childViewControllersObservationContext]; 52 | [self.contentViewController addObserver:self 53 | forKeyPath:@"selectedTabViewItemIndex" 54 | options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew 55 | context:_selectedTabObservationContext]; 56 | 57 | [[NSNotificationCenter defaultCenter] addObserverForName:NSWindowWillCloseNotification object:self queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * __nonnull note) { 58 | [self.tabVC removeObserver:self forKeyPath:@"childViewControllers"]; 59 | [self.tabVC removeObserver:self forKeyPath:@"selectedTabViewItemIndex"]; 60 | [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowWillCloseNotification object:self]; 61 | }]; 62 | } 63 | 64 | - (void)observeValueForKeyPath:(nullable NSString *)keyPath ofObject:(nullable id)object change:(nullable NSDictionary *)change context:(nullable void *)context 65 | { 66 | if (context == _childViewControllersObservationContext) { 67 | [self _am_setupTabs]; 68 | } else if (context == _selectedTabObservationContext) { 69 | [self _am_reflectTabSelectionChange]; 70 | } else { 71 | [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; 72 | } 73 | } 74 | 75 | #define kSegmentedControlItemIdentifier @"SegmentedControl" 76 | 77 | - (void)_am_setupTabs 78 | { 79 | self.toolbar = [self _am_toolbarWithTabItems:self.tabVC.tabViewItems]; 80 | } 81 | 82 | - (NSToolbar *)_am_toolbarWithTabItems:(NSArray *)items 83 | { 84 | NSToolbar *toolbar = [[NSToolbar alloc] initWithIdentifier:@"TabNavToolbar"]; 85 | toolbar.delegate = self; 86 | toolbar.displayMode = NSToolbarDisplayModeIconOnly; 87 | 88 | return toolbar; 89 | } 90 | 91 | - (nullable NSToolbarItem *)toolbar:(nonnull NSToolbar *)toolbar itemForItemIdentifier:(nonnull NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag 92 | { 93 | if (![itemIdentifier isEqualToString:kSegmentedControlItemIdentifier]) return nil; 94 | 95 | self.tabNavSegmentedControl = [[NSSegmentedControl alloc] initWithFrame:NSZeroRect]; 96 | self.tabNavSegmentedControl.segmentCount = self.tabVC.tabViewItems.count; 97 | for (NSTabViewItem *item in self.tabVC.tabViewItems) { 98 | NSInteger idx = [self.tabVC.tabViewItems indexOfObject:item]; 99 | [self.tabNavSegmentedControl setLabel:item.label forSegment:idx]; 100 | if (self.tabVC.selectedTabViewItemIndex == idx) [self.tabNavSegmentedControl setSelectedSegment:idx]; 101 | } 102 | [self.tabNavSegmentedControl setTarget:self]; 103 | [self.tabNavSegmentedControl setAction:@selector(_am_tabBarNavSegmentedControlAction:)]; 104 | [self.tabNavSegmentedControl sizeToFit]; 105 | 106 | NSToolbarItem *item = [[NSToolbarItem alloc] initWithItemIdentifier:kSegmentedControlItemIdentifier]; 107 | 108 | item.view = self.tabNavSegmentedControl; 109 | 110 | return item; 111 | } 112 | 113 | - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar 114 | { 115 | return @[NSToolbarFlexibleSpaceItemIdentifier, kSegmentedControlItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier]; 116 | } 117 | 118 | - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar 119 | { 120 | return @[kSegmentedControlItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier]; 121 | } 122 | 123 | - (void)_am_tabBarNavSegmentedControlAction:(NSSegmentedControl *)control 124 | { 125 | [self.tabVC setSelectedTabViewItemIndex:control.selectedSegment]; 126 | } 127 | 128 | - (void)_am_reflectTabSelectionChange 129 | { 130 | [self.tabNavSegmentedControl setSelectedSegment:self.tabVC.selectedTabViewItemIndex]; 131 | } 132 | 133 | - (NSTabViewController *)tabVC 134 | { 135 | return (NSTabViewController *)self.contentViewController; 136 | } 137 | 138 | @end -------------------------------------------------------------------------------- /Appearance Maker/AMEditorAppearance.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/AppearanceMaker/e0fa14430f6d8c1e9ceddad8fd01fe1318b2b95b/Appearance Maker/AMEditorAppearance.car -------------------------------------------------------------------------------- /Appearance Maker/AMEditorAppearance.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMEditorAppearance.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | @interface AMEditorAppearance : NSObject 12 | 13 | + (NSAppearance *)appearance; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Appearance Maker/AMEditorAppearance.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMEditorAppearance.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMEditorAppearance.h" 10 | 11 | @interface AMEditorAppearance () 12 | 13 | @property (strong) NSAppearance *appearance; 14 | 15 | @end 16 | 17 | @implementation AMEditorAppearance 18 | 19 | + (NSAppearance *)appearance 20 | { 21 | return [AMEditorAppearance _sharedInstance].appearance; 22 | } 23 | 24 | + (AMEditorAppearance *)_sharedInstance 25 | { 26 | static AMEditorAppearance *_shared; 27 | 28 | static dispatch_once_t onceToken; 29 | dispatch_once(&onceToken, ^{ 30 | _shared = [[AMEditorAppearance alloc] init]; 31 | }); 32 | 33 | return _shared; 34 | } 35 | 36 | - (instancetype)init 37 | { 38 | self = [super init]; 39 | 40 | self.appearance = [[NSAppearance alloc] initWithAppearanceNamed:@"AMEditorAppearance" bundle:nil]; 41 | 42 | return self; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Appearance Maker/AMEditorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AMEditorViewController : NSTabViewController 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /Appearance Maker/AMEditorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMEditorViewController.h" 10 | 11 | @implementation AMEditorViewController 12 | 13 | - (void)viewDidLoad { 14 | [super viewDidLoad]; 15 | 16 | self.tabStyle = NSTabViewControllerTabStyleUnspecified; 17 | } 18 | 19 | - (void)setRepresentedObject:(id)representedObject { 20 | [super setRepresentedObject:representedObject]; 21 | 22 | [self.childViewControllers makeObjectsPerformSelector:@selector(setRepresentedObject:) withObject:representedObject]; 23 | } 24 | 25 | - (void)addChildViewController:(nonnull NSViewController *)childViewController 26 | { 27 | [super addChildViewController:childViewController]; 28 | [childViewController setRepresentedObject:self.representedObject]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Appearance Maker/AMEffectEditorWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMEffectEditorWindowController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 02/03/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AMThemeDocument.h" 12 | 13 | @class TDSchemaEffectDefinition; 14 | 15 | @interface AMEffectEditorWindowController : NSWindowController 16 | 17 | + (AMEffectEditorWindowController *__nonnull)effectEditorWindowControllerWithEffectDefinition:(TDSchemaEffectDefinition *__nullable)effectDefinition document:(AMThemeDocument *__nonnull)document; 18 | 19 | @property (nonatomic, weak) TDSchemaEffectDefinition *__nullable effectDefinition; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Appearance Maker/AMEffectEditorWindowController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMEffectEditorWindowController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 02/03/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMEffectEditorWindowController.h" 10 | 11 | #import "TDEffectRenditionSpec.h" 12 | #import "TDEffectComponent.h" 13 | #import "TDEffectParameterValue.h" 14 | #import "TDEffectParameterType.h" 15 | #import "TDEffectType.h" 16 | 17 | #import "AMSystemThemeStore.h" 18 | 19 | #import "AMFlippedClipView.h" 20 | 21 | #define kViewPadding 8.0 22 | 23 | #define kCUIEffectParameterOpacity @"CUIEffectParameterOpacity" 24 | #define kCUIEffectParameterOpacity2 @"CUIEffectParameterOpacity2" 25 | #define kCUIEffectParameterColor1 @"CUIEffectParameterColor1" 26 | #define kCUIEffectParameterColor2 @"CUIEffectParameterColor2" 27 | #define kCUIEffectParameterBlurSize @"CUIEffectParameterBlurSize" 28 | #define kCUIEffectParameterOffset @"CUIEffectParameterOffset" 29 | #define kCUIEffectParameterSoftenSize @"CUIEffectParameterSoftenSize" 30 | #define kCUIEffectParameterBlendMode @"CUIEffectParameterBlendMode" 31 | #define kCUIEffectParameterSpread @"CUIEffectParameterSpread" 32 | #define kCUIEffectParameterAngle @"CUIEffectParameterAngle" 33 | 34 | typedef NS_ENUM(NSUInteger) { 35 | AMEffectParameterControlTypeUnkown, 36 | AMEffectParameterControlTypeTextField, 37 | AMEffectParameterControlTypeOpacitySlider, 38 | AMEffectParameterControlTypeAngleKnob, 39 | AMEffectParameterControlTypeColorWell, 40 | AMEffectParameterControlTypeBlendModePopUp 41 | } AMEffectParameterControlType; 42 | 43 | AMEffectParameterControlType _AMControlTypeForEffectParameter(TDEffectParameterValue *parameter) { 44 | NSString *name = parameter.parameterType.constantName; 45 | 46 | if ([name isEqualToString:kCUIEffectParameterOpacity] || 47 | [name isEqualToString:kCUIEffectParameterOpacity2]) { 48 | return AMEffectParameterControlTypeOpacitySlider; 49 | } else if ([name isEqualToString:kCUIEffectParameterColor1] || 50 | [name isEqualToString:kCUIEffectParameterColor2]) { 51 | return AMEffectParameterControlTypeColorWell; 52 | } else if ([name isEqualToString:kCUIEffectParameterBlurSize] || 53 | [name isEqualToString:kCUIEffectParameterOffset] || 54 | [name isEqualToString:kCUIEffectParameterSoftenSize] || 55 | [name isEqualToString:kCUIEffectParameterSpread]) { 56 | return AMEffectParameterControlTypeTextField; 57 | } else if ([name isEqualToString:kCUIEffectParameterAngle]) { 58 | return AMEffectParameterControlTypeAngleKnob; 59 | } else if ([name isEqualToString:kCUIEffectParameterBlendMode]) { 60 | return AMEffectParameterControlTypeBlendModePopUp; 61 | } 62 | 63 | return AMEffectParameterControlTypeUnkown; 64 | } 65 | 66 | @interface AMEffectEditorWindowController () 67 | 68 | @property (nonatomic, readonly) AMThemeDocument *themeDocument; 69 | 70 | @property (nonatomic, strong) NSMutableArray *productions; 71 | 72 | @property (nonatomic, strong) NSScrollView *scrollView; 73 | @property (nonatomic, strong) NSStackView *stackView; 74 | 75 | @end 76 | 77 | @implementation AMEffectEditorWindowController 78 | 79 | + (AMEffectEditorWindowController *)effectEditorWindowControllerWithEffectDefinition:(TDSchemaEffectDefinition *)effectDefinition document:(AMThemeDocument *)document 80 | { 81 | AMEffectEditorWindowController *controller = [[AMEffectEditorWindowController alloc] initWithWindowNibName:NSStringFromClass([self class])]; 82 | 83 | controller.document = document; 84 | controller.effectDefinition = effectDefinition; 85 | 86 | return controller; 87 | } 88 | 89 | - (AMThemeDocument *)themeDocument 90 | { 91 | return (AMThemeDocument *)self.document; 92 | } 93 | 94 | - (NSMutableArray *)productions 95 | { 96 | if (!_productions) _productions = [NSMutableArray new]; 97 | 98 | return _productions; 99 | } 100 | 101 | - (void)setEffectDefinition:(TDSchemaEffectDefinition *)effectDefinition 102 | { 103 | _effectDefinition = effectDefinition; 104 | 105 | [self _configureWithCurrentEffectDefinition]; 106 | } 107 | 108 | - (void)windowDidLoad { 109 | [super windowDidLoad]; 110 | 111 | self.window.contentView.wantsLayer = YES; 112 | 113 | [self _createStackView]; 114 | 115 | #ifdef DEBUG 116 | if ([[NSBundle bundleWithPath:@"/Library/Frameworks/FScript.framework"] load]) { 117 | [NSClassFromString(@"FScriptMenuItem") performSelector:@selector(insertInMainMenu)]; 118 | } 119 | #endif 120 | 121 | self.window.backgroundColor = [NSColor whiteColor]; 122 | } 123 | 124 | - (void)_configureWithCurrentEffectDefinition 125 | { 126 | if (!self.effectDefinition) return; 127 | 128 | [self _createProductionForCurrentEffectDefinition]; 129 | 130 | self.window.title = [NSString stringWithFormat:@"Effect Editor - %@", self.effectDefinition.displayName]; 131 | 132 | [self _buildInspectorUI]; 133 | } 134 | 135 | - (void)_createProductionForCurrentEffectDefinition 136 | { 137 | [self.productions removeAllObjects]; 138 | 139 | NSError *error; 140 | if (![self.document customizeSchemaEffectDefinition:self.effectDefinition shouldReplaceExisting:NO error:&error]) { 141 | [[NSAlert alertWithError:error] runModal]; 142 | [self close]; 143 | } 144 | 145 | id objs = [self.document allObjectsForEntity:@"EffectStyleProduction" withSortDescriptors:nil]; 146 | 147 | [objs enumerateObjectsUsingBlock:^(TDEffectStyleProduction *production, NSUInteger idx, BOOL *stop) { 148 | if (production.partDefinition.element.name != self.effectDefinition.name) return; 149 | 150 | [self.productions addObject:production]; 151 | }]; 152 | } 153 | 154 | - (void)_createStackView 155 | { 156 | self.scrollView = [[NSScrollView alloc] initWithFrame:self.window.contentView.bounds]; 157 | self.scrollView.translatesAutoresizingMaskIntoConstraints = NO; 158 | 159 | self.scrollView.contentView = [[AMFlippedClipView alloc] initWithFrame:self.window.contentView.bounds]; 160 | 161 | self.scrollView.borderType = NSNoBorder; 162 | self.scrollView.drawsBackground = NO; 163 | self.scrollView.hasVerticalScroller = YES; 164 | 165 | [self.window.contentView addSubview:self.scrollView]; 166 | 167 | [self.scrollView.topAnchor constraintEqualToAnchor:self.window.contentView.topAnchor constant:kViewPadding].active = YES; 168 | [self.scrollView.bottomAnchor constraintEqualToAnchor:self.window.contentView.bottomAnchor constant:-kViewPadding].active = YES; 169 | [self.scrollView.leadingAnchor constraintEqualToAnchor:self.window.contentView.leadingAnchor].active = YES; 170 | [self.scrollView.trailingAnchor constraintEqualToAnchor:self.window.contentView.trailingAnchor].active = YES; 171 | 172 | self.stackView = [[NSStackView alloc] initWithFrame:self.window.contentView.bounds]; 173 | self.stackView.orientation = NSUserInterfaceLayoutOrientationVertical; 174 | self.stackView.translatesAutoresizingMaskIntoConstraints = NO; 175 | 176 | self.scrollView.documentView = self.stackView; 177 | 178 | [self.stackView.topAnchor constraintEqualToAnchor:self.scrollView.topAnchor].active = YES; 179 | [self.stackView.leadingAnchor constraintEqualToAnchor:self.scrollView.leadingAnchor].active = YES; 180 | [self.stackView.trailingAnchor constraintEqualToAnchor:self.scrollView.trailingAnchor].active = YES; 181 | } 182 | 183 | - (void)_buildInspectorUI 184 | { 185 | [self.stackView.arrangedSubviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; 186 | 187 | TDEffectStyleProduction *production = self.productions.firstObject; 188 | 189 | for (TDEffectRenditionSpec *rendition in production.renditions) { 190 | for (TDEffectComponent *component in rendition.components) { 191 | [self _buildInspectorUIForComponent:component]; 192 | } 193 | } 194 | } 195 | 196 | - (void)_buildInspectorUIForComponent:(TDEffectComponent *)component 197 | { 198 | NSBox *box = [[NSBox alloc] initWithFrame:NSMakeRect(0, 0, NSWidth(self.stackView.bounds), 100.0)]; 199 | box.boxType = NSBoxPrimary; 200 | box.title = component.effectType.displayName; 201 | box.translatesAutoresizingMaskIntoConstraints = NO; 202 | [box addConstraint:[NSLayoutConstraint constraintWithItem:box attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:NSHeight(box.bounds)]]; 203 | 204 | [self.stackView addArrangedSubview:box]; 205 | 206 | [box.leadingAnchor constraintEqualToAnchor:self.stackView.leadingAnchor constant:kViewPadding].active = YES; 207 | [box.trailingAnchor constraintEqualToAnchor:self.stackView.trailingAnchor constant:-kViewPadding].active = YES; 208 | 209 | [self _buildParameterControlsInBox:box forComponent:component]; 210 | } 211 | 212 | - (void)_buildParameterControlsInBox:(NSBox *)box forComponent:(TDEffectComponent *)component 213 | { 214 | NSView *previousParameterView = nil; 215 | 216 | for (TDEffectParameterValue *parameter in component.parameters) { 217 | NSView *parameterControls = [self _controlsForParameter:parameter]; 218 | [box.contentView addSubview:parameterControls]; 219 | 220 | if (previousParameterView) { 221 | [parameterControls.topAnchor constraintEqualToAnchor:previousParameterView.bottomAnchor constant:kViewPadding].active = YES; 222 | } else { 223 | [parameterControls.topAnchor constraintEqualToAnchor:box.contentView.topAnchor constant:kViewPadding].active = YES; 224 | } 225 | 226 | [parameterControls.leadingAnchor constraintEqualToAnchor:box.contentView.leadingAnchor].active = YES; 227 | [parameterControls.trailingAnchor constraintEqualToAnchor:box.contentView.trailingAnchor].active = YES; 228 | 229 | previousParameterView = parameterControls; 230 | } 231 | } 232 | 233 | - (NSView *)_controlsForParameter:(TDEffectParameterValue *)parameter 234 | { 235 | AMEffectParameterControlType controlType = _AMControlTypeForEffectParameter(parameter); 236 | 237 | switch (controlType) { 238 | case AMEffectParameterControlTypeColorWell: 239 | return [self _colorControlsForParameter:parameter]; 240 | break; 241 | 242 | default: 243 | return nil; 244 | } 245 | } 246 | 247 | - (__kindof NSView *)_colorControlsForParameter:(TDEffectParameterValue *)parameter 248 | { 249 | NSView *containerView = [[NSView alloc] initWithFrame:NSZeroRect]; 250 | containerView.translatesAutoresizingMaskIntoConstraints = NO; 251 | 252 | NSColor *color = [AMSystemThemeStore effectColorWithPhysicalColor:parameter.colorValue]; 253 | 254 | NSColorWell *colorWell = [[NSColorWell alloc] initWithFrame:NSZeroRect]; 255 | colorWell.translatesAutoresizingMaskIntoConstraints = NO; 256 | [colorWell sizeToFit]; 257 | 258 | NSTextField *label = [[NSTextField alloc] initWithFrame:NSZeroRect]; 259 | label.bordered = NO; 260 | label.bezeled = NO; 261 | label.drawsBackground = NO; 262 | label.editable = NO; 263 | label.selectable = NO; 264 | label.font = [NSFont labelFontOfSize:12.0]; 265 | label.textColor = [NSColor labelColor]; 266 | label.stringValue = parameter.parameterType.displayName; 267 | [label sizeToFit]; 268 | label.translatesAutoresizingMaskIntoConstraints = NO; 269 | 270 | [containerView addSubview:label]; 271 | [containerView addSubview:colorWell]; 272 | 273 | [containerView setFrameSize:NSMakeSize(0, 22.0)]; 274 | [containerView addConstraint:[NSLayoutConstraint constraintWithItem:containerView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:NSHeight(containerView.bounds)]]; 275 | 276 | [colorWell addConstraint:[NSLayoutConstraint constraintWithItem:colorWell attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:22.0]]; 277 | [colorWell addConstraint:[NSLayoutConstraint constraintWithItem:colorWell attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:22.0]]; 278 | 279 | [label.centerYAnchor constraintEqualToAnchor:containerView.centerYAnchor].active = YES; 280 | [label.leadingAnchor constraintEqualToAnchor:containerView.leadingAnchor constant:kViewPadding].active = YES; 281 | [label.topAnchor constraintEqualToAnchor:containerView.topAnchor].active = YES; 282 | [colorWell.leadingAnchor constraintEqualToAnchor:label.trailingAnchor constant:kViewPadding].active = YES; 283 | [colorWell.centerYAnchor constraintEqualToAnchor:label.centerYAnchor].active = YES; 284 | 285 | colorWell.color = color; 286 | 287 | return containerView; 288 | } 289 | 290 | - (void)_dumpProductions 291 | { 292 | #ifdef DEBUG 293 | for (TDEffectStyleProduction *production in self.productions) { 294 | NSLog(@"## PRODUCTION: %@", production.displayName); 295 | 296 | for (TDEffectRenditionSpec *rendition in production.renditions) { 297 | NSLog(@"#### RENDITION: %@", rendition.renditionType.displayName); 298 | 299 | for (TDEffectComponent *component in rendition.components) { 300 | NSLog(@"###### COMPONENT: %@", component.effectType.displayName); 301 | 302 | for (TDEffectParameterValue *parameter in component.parameters) { 303 | NSLog(@"######## PARAMETER: %@", parameter.parameterType.displayName); 304 | } 305 | } 306 | } 307 | } 308 | #endif 309 | } 310 | 311 | 312 | @end 313 | -------------------------------------------------------------------------------- /Appearance Maker/AMEffectEditorWindowController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Appearance Maker/AMElementsEditorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMElementsEditorViewController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AMDocumentBasedViewController.h" 12 | 13 | @interface AMElementsEditorViewController : AMDocumentBasedViewController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Appearance Maker/AMElementsEditorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMElementsEditorViewController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMElementsEditorViewController.h" 10 | 11 | #import "AMThemeDocument.h" 12 | #import "AMPartTableCellView.h" 13 | 14 | #import "AMEffectEditorWindowController.h" 15 | #import "PSDPreview.h" 16 | 17 | @interface AMElementsEditorViewController () 18 | 19 | @property (weak) IBOutlet NSVisualEffectView *topBarView; 20 | @property (weak) IBOutlet NSVisualEffectView *bottomBarView; 21 | 22 | @property (weak) IBOutlet NSPopUpButton *categoriesPopUp; 23 | @property (weak) IBOutlet NSPopUpButton *elementsPopUp; 24 | 25 | @property (strong) NSArray *categories; 26 | @property (strong) NSArray <__kindof TDSchemaDefinition *> *sortedDefinitions; 27 | 28 | @property (nonatomic, strong) TDSchemaCategory *selectedCategory; 29 | @property (nonatomic, strong) TDSchemaDefinition *selectedDefinition; 30 | @property (nonatomic, strong) TDSchemaPartDefinition *selectedPart; 31 | 32 | @property (weak) IBOutlet NSButton *customizeButton; 33 | 34 | @property (strong) AMEffectEditorWindowController *effectEditorWindowController; 35 | 36 | @property (weak) IBOutlet NSTextField *selectedElementLabel; 37 | @property (weak) IBOutlet NSStackView *previewPartControlsContainerView; 38 | @property (weak) IBOutlet NSPopUpButton *partsPopUp; 39 | @property (weak) IBOutlet NSStackView *previewContainerView; 40 | @property (weak) IBOutlet NSImageView *systemAppearanceImageView; 41 | @property (weak) IBOutlet NSImageView *customizedAppearanceImageView; 42 | @property (weak) IBOutlet NSStackView *customizedAppearanceContainerView; 43 | 44 | @end 45 | 46 | @implementation AMElementsEditorViewController 47 | 48 | - (void)viewDidLoad 49 | { 50 | [super viewDidLoad]; 51 | 52 | self.selectedElementLabel.stringValue = @"(Select an element above)"; 53 | self.previewContainerView.hidden = YES; 54 | self.previewPartControlsContainerView.hidden = YES; 55 | } 56 | 57 | - (void)awakeFromNib 58 | { 59 | [super awakeFromNib]; 60 | 61 | self.view.wantsLayer = YES; 62 | self.view.layer.backgroundColor = [NSColor whiteColor].CGColor; 63 | } 64 | 65 | - (void)viewDidAppear 66 | { 67 | [super viewDidAppear]; 68 | 69 | self.document.assetManagementDelegate = self; 70 | } 71 | 72 | - (void)setRepresentedObject:(id __nullable)representedObject 73 | { 74 | [super setRepresentedObject:representedObject]; 75 | 76 | [self populateCategories]; 77 | } 78 | 79 | #pragma mark Category and Element selection 80 | 81 | - (void)populateCategories 82 | { 83 | [self.categoriesPopUp removeAllItems]; 84 | 85 | self.categories = [self.document allObjectsForEntity:@"SchemaCategory" withSortDescriptors:self.document.defaultSortDescriptors]; 86 | for (TDSchemaCategory *category in self.categories) { 87 | // materials and effects are handled in other view controllers 88 | if ([category.displayName isEqualToString:@"Materials"] || 89 | [category.displayName isEqualToString:@"Effects"]) continue; 90 | 91 | NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:category.displayName action:nil keyEquivalent:@""]; 92 | item.representedObject = category; 93 | [self.categoriesPopUp.menu addItem:item]; 94 | } 95 | 96 | [self categoriesPopUpAction:self.categoriesPopUp]; 97 | } 98 | 99 | - (IBAction)categoriesPopUpAction:(id)sender 100 | { 101 | self.selectedCategory = self.categoriesPopUp.selectedItem.representedObject; 102 | } 103 | 104 | - (IBAction)elementsPopUpAction:(id)sender 105 | { 106 | if (self.elementsPopUp.indexOfSelectedItem < 0) return; 107 | 108 | self.selectedDefinition = self.sortedDefinitions[self.elementsPopUp.indexOfSelectedItem]; 109 | } 110 | 111 | - (void)setSelectedCategory:(TDSchemaCategory *)selectedCategory 112 | { 113 | _selectedCategory = selectedCategory; 114 | 115 | [self reflectCategorySelectionChange]; 116 | } 117 | 118 | - (void)setSelectedDefinition:(TDSchemaDefinition *)selectedDefinition 119 | { 120 | _selectedDefinition = selectedDefinition; 121 | 122 | [self reflectDefinitionSelectionChange]; 123 | } 124 | 125 | - (void)setSelectedPart:(TDSchemaPartDefinition *)selectedPart 126 | { 127 | _selectedPart = selectedPart; 128 | 129 | [self reflectPartSelectionChange]; 130 | } 131 | 132 | - (NSString *)titleForDefinition:(TDSchemaDefinition *)definition 133 | { 134 | NSString *title = definition.displayName; 135 | if (!definition.published) title = [title stringByAppendingString:@" (Unpublished)"]; 136 | if ([self.document customizationExistsForSchemaDefinition:definition]) title = [title stringByAppendingString:@" (Customized)"]; 137 | 138 | return title; 139 | } 140 | 141 | - (void)reflectCategorySelectionChange 142 | { 143 | TDSchemaDefinition *previouslySelectedDefinition = self.elementsPopUp.selectedItem.representedObject; 144 | 145 | [self.elementsPopUp removeAllItems]; 146 | 147 | self.sortedDefinitions = [self.selectedCategory.elements sortedArrayUsingDescriptors:self.document.defaultSortDescriptors]; 148 | for (TDSchemaDefinition *definition in self.sortedDefinitions) { 149 | NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:[self titleForDefinition:definition] action:nil keyEquivalent:@""]; 150 | item.representedObject = definition; 151 | 152 | [self.elementsPopUp.menu addItem:item]; 153 | } 154 | 155 | if (!self.elementsPopUp.itemArray.count) { 156 | [self.elementsPopUp addItemWithTitle:@"No Elements"]; 157 | self.elementsPopUp.enabled = NO; 158 | } else { 159 | self.elementsPopUp.enabled = YES; 160 | 161 | if (previouslySelectedDefinition) [self.elementsPopUp selectItemWithTitle:[self titleForDefinition:previouslySelectedDefinition]]; 162 | 163 | [self elementsPopUpAction:self.elementsPopUp]; 164 | } 165 | } 166 | 167 | - (void)reflectDefinitionSelectionChange 168 | { 169 | if (self.selectedDefinition == nil) { 170 | self.selectedElementLabel.stringValue = @"(Select an element above)"; 171 | } else { 172 | self.selectedElementLabel.stringValue = self.selectedDefinition.displayName; 173 | } 174 | 175 | [self.selectedElementLabel sizeToFit]; 176 | 177 | self.previewPartControlsContainerView.hidden = (self.selectedDefinition == nil); 178 | self.previewContainerView.hidden = (self.selectedDefinition == nil); 179 | self.customizeButton.enabled = (self.selectedDefinition != nil); 180 | 181 | [self populatePartsPopUp]; 182 | } 183 | 184 | - (void)populatePartsPopUp 185 | { 186 | [self.partsPopUp removeAllItems]; 187 | 188 | for (TDSchemaPartDefinition *part in self.selectedDefinition.parts) { 189 | NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:part.name action:nil keyEquivalent:@""]; 190 | item.representedObject = part; 191 | [self.partsPopUp.menu addItem:item]; 192 | } 193 | 194 | [self partsPopUpAction:self.partsPopUp]; 195 | } 196 | 197 | #pragma mark Appearance Customization 198 | 199 | - (IBAction)customizeSelectedDefinition:(id)sender 200 | { 201 | if ([self.selectedDefinition isKindOfClass:[TDSchemaEffectDefinition class]]) { 202 | [self customizeEffectDefinition:(TDSchemaEffectDefinition *)self.selectedDefinition]; 203 | } else { 204 | [self customizePartDefinition:self.selectedPart]; 205 | } 206 | } 207 | 208 | - (void)customizeEffectDefinition:(TDSchemaEffectDefinition *)definition 209 | { 210 | if (!self.effectEditorWindowController) { 211 | self.effectEditorWindowController = [AMEffectEditorWindowController effectEditorWindowControllerWithEffectDefinition:definition document:self.document]; 212 | } else { 213 | self.effectEditorWindowController.document = self.document; 214 | self.effectEditorWindowController.effectDefinition = definition; 215 | } 216 | 217 | [self.effectEditorWindowController showWindow:self]; 218 | } 219 | 220 | - (void)customizePartDefinition:(TDSchemaPartDefinition *)part 221 | { 222 | NSError *error; 223 | if (![self.document customizeSchemaPartDefinition:part usingArtworkFormat:@"psd" nameElement:nil shouldReplaceExisting:NO error:&error]) { 224 | [[NSAlert alertWithError:error] beginSheetModalForWindow:self.document.windowForSheet completionHandler:nil]; 225 | } 226 | 227 | [self reflectPartSelectionChange]; 228 | [self openAssetEditorForPart:part]; 229 | } 230 | 231 | - (void)openAssetEditorForPart:(TDSchemaPartDefinition *)part 232 | { 233 | NSArray *editorURLs = [self URLsOfAssetsForPart:part]; 234 | NSLog(@"Open asset editor with URLs: %@", editorURLs); 235 | } 236 | 237 | //- (void)customizeElementDefinition:(TDSchemaDefinition *)definition 238 | //{ 239 | // NSError *error; 240 | // if (![self.document customizeSchemaElementDefinition:self.selectedDefinition usingArtworkFormat:@"psd" shouldReplaceExisting:NO error:&error]) { 241 | // [[NSAlert alertWithError:error] beginSheetModalForWindow:self.document.windowForSheet completionHandler:nil]; 242 | // } 243 | // 244 | // [self reflectCategorySelectionChange]; 245 | //} 246 | 247 | - (void)didCreateAsset:(__kindof TDAsset *)asset atURL:(NSURL *)URL 248 | { 249 | static BOOL coalescing = NO; 250 | if (coalescing) return; 251 | 252 | coalescing = YES; 253 | 254 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 255 | coalescing = NO; 256 | }); 257 | 258 | // [[NSWorkspace sharedWorkspace] selectFile:URL.path inFileViewerRootedAtPath:URL.path.stringByDeletingLastPathComponent]; 259 | } 260 | 261 | #pragma mark Element display 262 | 263 | - (IBAction)partsPopUpAction:(id)sender 264 | { 265 | self.selectedPart = self.partsPopUp.selectedItem.representedObject; 266 | } 267 | 268 | - (TDPhotoshopElementProduction *)productionForPreviewingPart:(TDSchemaPartDefinition *)part 269 | { 270 | NSString *renditionName = [[part bestPreviewRendition] name]; 271 | 272 | for (TDPhotoshopElementProduction *production in part.productions) { 273 | if ([production.comment containsString:renditionName]) { 274 | return production; 275 | } 276 | } 277 | 278 | return [[part.productions allObjects] firstObject]; 279 | } 280 | 281 | - (NSArray *)URLsOfAssetsForPart:(TDSchemaPartDefinition *)part 282 | { 283 | NSMutableArray *URLs = [NSMutableArray new]; 284 | 285 | for (TDPhotoshopElementProduction *production in part.productions) { 286 | [URLs addObject:[production.asset fileURLWithDocument:self.document]]; 287 | } 288 | 289 | return [URLs copy]; 290 | } 291 | 292 | - (void)reflectPartSelectionChange 293 | { 294 | self.systemAppearanceImageView.image = self.selectedPart.previewImage; 295 | 296 | if (self.selectedPart.productions.count > 0) { 297 | [self.customizedAppearanceContainerView setHidden:NO]; 298 | 299 | TDPhotoshopElementProduction *previewProduction = [self productionForPreviewingPart:self.selectedPart]; 300 | NSImage *previewImage = [[NSImage alloc] initWithContentsOfURL:[previewProduction.asset fileURLWithDocument:self.document]]; 301 | self.customizedAppearanceImageView.image = previewImage; 302 | self.customizeButton.title = @"Edit…"; 303 | } else { 304 | [self.customizedAppearanceContainerView setHidden:YES]; 305 | self.customizeButton.title = @"Customize"; 306 | } 307 | } 308 | 309 | #pragma mark Parts Table View 310 | 311 | - (NSInteger)numberOfRowsInTableView:(nonnull NSTableView *)tableView 312 | { 313 | return self.selectedDefinition.parts.count; 314 | } 315 | 316 | - (nullable NSView *)tableView:(nonnull NSTableView *)tableView viewForTableColumn:(nullable NSTableColumn *)tableColumn row:(NSInteger)row 317 | { 318 | AMPartTableCellView *cell = [tableView makeViewWithIdentifier:@"PartCell" owner:tableView]; 319 | 320 | cell.part = self.selectedDefinition.parts.allObjects[row]; 321 | 322 | return cell; 323 | } 324 | 325 | - (CGFloat)tableView:(nonnull NSTableView *)tableView heightOfRow:(NSInteger)row 326 | { 327 | TDSchemaPartDefinition *part = self.selectedDefinition.parts.allObjects[row]; 328 | 329 | return part.previewImage.size.height+16; 330 | } 331 | 332 | @end 333 | -------------------------------------------------------------------------------- /Appearance Maker/AMFlippedClipView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMFlippedClipView.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 02/03/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AMFlippedClipView : NSClipView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Appearance Maker/AMFlippedClipView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMFlippedClipView.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 02/03/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMFlippedClipView.h" 10 | 11 | @implementation AMFlippedClipView 12 | 13 | - (BOOL)isFlipped 14 | { 15 | return YES; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Appearance Maker/AMFontsEditorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMFontsEditorViewController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AMDocumentBasedViewController.h" 12 | 13 | @interface AMFontsEditorViewController : AMDocumentBasedViewController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Appearance Maker/AMFontsEditorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMFontsEditorViewController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMFontsEditorViewController.h" 10 | 11 | @interface AMFontsEditorViewController () 12 | 13 | @end 14 | 15 | @implementation AMFontsEditorViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do view setup here. 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Appearance Maker/AMMaterialsEditorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMMaterialsEditorViewController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 03/03/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMDocumentBasedViewController.h" 10 | 11 | @interface AMMaterialsEditorViewController : AMDocumentBasedViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Appearance Maker/AMMaterialsEditorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMMaterialsEditorViewController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 03/03/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMMaterialsEditorViewController.h" 10 | 11 | #import "AMThemeDocument.h" 12 | #import "TDMicaAsset.h" 13 | 14 | @interface AMMaterialsEditorViewController () 15 | 16 | @property (weak) IBOutlet NSScrollView *scrollView; 17 | @property (weak) IBOutlet NSTableView *tableView; 18 | @property (weak) IBOutlet NSVisualEffectView *bottomBar; 19 | @property (weak) IBOutlet NSButton *customizeButton; 20 | 21 | @property (nonatomic, copy) NSArray *materialDefinitions; 22 | 23 | @end 24 | 25 | @implementation AMMaterialsEditorViewController 26 | 27 | - (void)viewDidLoad 28 | { 29 | [super viewDidLoad]; 30 | 31 | self.scrollView.automaticallyAdjustsContentInsets = NO; 32 | self.scrollView.contentInsets = NSEdgeInsetsMake(0, 0, NSHeight(self.bottomBar.bounds), 0); 33 | 34 | self.tableView.dataSource = self; 35 | self.tableView.delegate = self; 36 | } 37 | 38 | - (void)viewDidAppear 39 | { 40 | [super viewDidAppear]; 41 | 42 | self.document.assetManagementDelegate = self; 43 | 44 | [self loadMaterialDefinitions]; 45 | } 46 | 47 | - (void)loadMaterialDefinitions 48 | { 49 | TDSchemaCategory *category = [self.document objectsForEntity:@"SchemaCategory" withPredicate:[NSPredicate predicateWithFormat:@"displayName = \"Materials\""] sortDescriptors:self.document.defaultSortDescriptors].firstObject; 50 | self.materialDefinitions = category.elements.allObjects; 51 | [self.tableView reloadData]; 52 | } 53 | 54 | - (IBAction)customizeSelectedMaterial:(id)sender 55 | { 56 | NSError *error; 57 | if (![self.document customizeSchemaMaterialDefinition:self.materialDefinitions[self.tableView.selectedRow] shouldReplaceExisting:NO error:&error]) { 58 | [[NSAlert alertWithError:error] beginSheetModalForWindow:self.document.windowForSheet completionHandler:nil]; 59 | } 60 | } 61 | 62 | - (void)didCreateAsset:(__kindof TDAsset *)asset atURL:(NSURL *)URL 63 | { 64 | if (![asset isKindOfClass:[TDMicaAsset class]]) return; 65 | 66 | // TODO: Open material editor (material editor still needs to be created 😅) 67 | } 68 | 69 | - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView 70 | { 71 | return self.materialDefinitions.count; 72 | } 73 | 74 | - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row 75 | { 76 | NSTableCellView *cellView = [tableView makeViewWithIdentifier:@"materialCell" owner:tableView]; 77 | 78 | cellView.textField.stringValue = self.materialDefinitions[row].displayName; 79 | 80 | return cellView; 81 | } 82 | 83 | - (void)tableViewSelectionDidChange:(NSNotification *)notification 84 | { 85 | self.customizeButton.enabled = (self.tableView.selectedRowIndexes.count > 0); 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Appearance Maker/AMPartTableCellView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMPartTableCellView.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "CoreThemeDocument.h" 12 | 13 | @interface AMPartTableCellView : NSTableCellView 14 | 15 | @property (nonatomic, weak) TDSchemaPartDefinition *part; 16 | @property (weak) IBOutlet NSImageView *previewImageView; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Appearance Maker/AMPartTableCellView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMPartTableCellView.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMPartTableCellView.h" 10 | 11 | @implementation AMPartTableCellView 12 | 13 | - (void)setPart:(TDSchemaPartDefinition * __nullable)part 14 | { 15 | _part = part; 16 | 17 | self.previewImageView.image = _part.previewImage; 18 | self.textField.stringValue = _part.displayName; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Appearance Maker/AMPreviewViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMExportViewController.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AMDocumentBasedViewController.h" 12 | 13 | @interface AMPreviewViewController : AMDocumentBasedViewController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Appearance Maker/AMPreviewViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMExportViewController.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMPreviewViewController.h" 10 | 11 | #import "AMBackgroundView.h" 12 | #import "AMThemeDocument.h" 13 | 14 | @interface AMPreviewViewController () 15 | 16 | @property (weak) IBOutlet NSView *containerView; 17 | @property (weak) IBOutlet NSProgressIndicator *indeterminateProgressPreview; 18 | @property (weak) IBOutlet AMBackgroundView *backgroundView; 19 | 20 | @end 21 | 22 | #define kAppearanceBundleName @"AppearancePreview" 23 | #define kAppearanceBundleExt @"bundle" 24 | #define kPreviewAppearanceName @"Preview" 25 | 26 | @implementation AMPreviewViewController 27 | { 28 | NSURL *_previewBundleURL; 29 | } 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | // Do view setup here. 33 | } 34 | 35 | - (void)viewDidAppear 36 | { 37 | [super viewDidAppear]; 38 | 39 | [self.representedObject saveDocument:nil]; 40 | 41 | [self.backgroundView becomeFirstResponder]; 42 | [self.indeterminateProgressPreview startAnimation:nil]; 43 | [self.containerView setHidden:YES]; 44 | 45 | [self _doPreview]; 46 | } 47 | 48 | - (void)_doPreview 49 | { 50 | NSError *error; 51 | if (![[NSFileManager defaultManager] copyItemAtURL:[[NSBundle mainBundle] URLForResource:kAppearanceBundleName withExtension:kAppearanceBundleExt] toURL:[self previewBundleURL] error:&error]) { 52 | [[NSAlert alertWithError:error] beginSheetModalForWindow:self.view.window completionHandler:nil]; 53 | return; 54 | } 55 | 56 | if (![[NSFileManager defaultManager] createDirectoryAtURL:[NSURL fileURLWithPath:[self previewResourcesPath]] withIntermediateDirectories:NO attributes:nil error:&error]) { 57 | [[NSAlert alertWithError:error] beginSheetModalForWindow:self.view.window completionHandler:nil]; 58 | return; 59 | } 60 | 61 | dispatch_queue_t distillerQueue = dispatch_queue_create("Distiller", DISPATCH_QUEUE_CONCURRENT); 62 | dispatch_async(distillerQueue, ^{ 63 | TDDistillRunner *runner = [[TDDistillRunner alloc] init]; 64 | 65 | BOOL result = [runner runDistillWithDocumentURL:self.document.fileURL outputURL:[self previewCarURL] attemptIncremental:NO forceDistill:NO]; 66 | 67 | dispatch_async(dispatch_get_main_queue(), ^{ 68 | if (result) { 69 | [self _loadAndApplyAppearance]; 70 | } else { 71 | NSLog(@"Distill failed"); 72 | } 73 | }); 74 | }); 75 | } 76 | 77 | - (void)_loadAndApplyAppearance 78 | { 79 | [self.backgroundView setHidden:YES]; 80 | [self.containerView setHidden:NO]; 81 | 82 | self.containerView.appearance = [[NSAppearance alloc] initWithAppearanceNamed:kPreviewAppearanceName bundle:[NSBundle bundleWithURL:[self previewBundleURL]]]; 83 | } 84 | 85 | - (NSURL *)previewBundleURL 86 | { 87 | if (!_previewBundleURL) { 88 | NSString *path = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0]; 89 | NSString *destBundleFilename = [NSString stringWithFormat:@"%@_%d_%.0f.preview", kAppearanceBundleName, 90 | [NSProcessInfo processInfo].processIdentifier, 91 | [NSDate date].timeIntervalSince1970]; 92 | _previewBundleURL = [NSURL fileURLWithPath:[NSString pathWithComponents:@[path, destBundleFilename]]]; 93 | } 94 | 95 | return _previewBundleURL; 96 | } 97 | 98 | - (NSString *)previewResourcesPath 99 | { 100 | NSString *path = [self previewBundleURL].path; 101 | 102 | return [NSString pathWithComponents:@[path, @"Contents", @"Resources"]]; 103 | } 104 | 105 | - (NSURL *)previewCarURL 106 | { 107 | return [NSURL fileURLWithPath:[NSString pathWithComponents:@[[self previewResourcesPath], [NSString stringWithFormat:@"%@.car", kPreviewAppearanceName]]]]; 108 | } 109 | 110 | - (void)viewDidDisappear 111 | { 112 | [[NSFileManager defaultManager] removeItemAtURL:[self previewBundleURL] error:nil]; 113 | 114 | [super viewDidDisappear]; 115 | } 116 | 117 | @end 118 | -------------------------------------------------------------------------------- /Appearance Maker/AMSeparatorView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMSeparatorView.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | IB_DESIGNABLE 12 | @interface AMSeparatorView : NSView 13 | 14 | @property (nonatomic, copy) NSColor *color; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Appearance Maker/AMSeparatorView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMSeparatorView.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMSeparatorView.h" 10 | 11 | @implementation AMSeparatorView 12 | 13 | - (void)drawRect:(NSRect)dirtyRect { 14 | [super drawRect:dirtyRect]; 15 | 16 | if (self.color) { 17 | [self.color setFill]; 18 | } else { 19 | [[NSColor tertiaryLabelColor] setFill]; 20 | } 21 | 22 | NSRectFill(dirtyRect); 23 | } 24 | 25 | - (void)setColor:(NSColor *)color 26 | { 27 | _color = color; 28 | 29 | [self setNeedsDisplay:YES]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Appearance Maker/AMSystemThemeStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMSystemUICatalog.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 15/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "CUICatalog.h" 10 | 11 | @interface AMSystemThemeStore : NSObject 12 | 13 | + (CUISystemStore *)defaultStore; 14 | 15 | + (NSColor *)colorWithColorDef:(colordef_t)colorDef; 16 | 17 | + (NSColor *)colorWithPhysicalColor:(NSNumber *)physicalColor; 18 | + (NSNumber *)physicalColorWithColor:(NSColor *)color; 19 | 20 | + (NSColor *)effectColorWithPhysicalColor:(NSNumber *)physicalColor; 21 | + (NSNumber *)effectPhysicalColorWithColor:(NSColor *)color; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Appearance Maker/AMSystemThemeStore.m: -------------------------------------------------------------------------------- 1 | // 2 | // AMSystemUICatalog.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 15/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMSystemThemeStore.h" 10 | 11 | #define kDefaultSystemCatalogName @"SystemAppearance" 12 | #define kUICatalogExtension @"car" 13 | #define kSystemAppearanceBundleName @"com.apple.systemappearance" 14 | 15 | @implementation AMSystemThemeStore 16 | 17 | + (CUISystemStore *)defaultStore 18 | { 19 | static CUISystemStore *_shared; 20 | 21 | static dispatch_once_t onceToken; 22 | dispatch_once(&onceToken, ^{ 23 | const char *carPath = [[[NSBundle bundleWithIdentifier:kSystemAppearanceBundleName] pathForResource:kDefaultSystemCatalogName ofType:kUICatalogExtension] UTF8String]; 24 | setenv("COREUI_CAR_PATH", carPath, 0); 25 | 26 | _shared = [[CUISystemStore alloc] init]; 27 | }); 28 | 29 | return _shared; 30 | } 31 | 32 | + (NSColor *)colorWithColorDef:(colordef_t)colorDef 33 | { 34 | return [self colorWithPhysicalColor:@(colorDef.color)]; 35 | } 36 | 37 | + (NSColor *)effectColorWithPhysicalColor:(NSNumber *)physicalColor 38 | { 39 | unsigned long color = (long)physicalColor.integerValue; 40 | 41 | unsigned char blue = color >> 16; 42 | unsigned char green = color >> 8; 43 | unsigned char red = color; 44 | 45 | CGFloat redFloat = red / 255.0; 46 | CGFloat greenFloat = green / 255.0; 47 | CGFloat blueFloat = blue / 255.0; 48 | 49 | return [NSColor colorWithCalibratedRed:redFloat green:greenFloat blue:blueFloat alpha:1.0]; 50 | } 51 | 52 | + (NSColor *)colorWithPhysicalColor:(NSNumber *)physicalColor 53 | { 54 | unsigned long color = (long)physicalColor.integerValue; 55 | 56 | unsigned char blue = color; 57 | unsigned char green = color >> 8; 58 | unsigned char red = color >> 16; 59 | unsigned char alpha = color >> 24; 60 | 61 | CGFloat redFloat = red / 255.0; 62 | CGFloat greenFloat = green / 255.0; 63 | CGFloat blueFloat = blue / 255.0; 64 | CGFloat alphaFloat = alpha / 255.0; 65 | 66 | return [NSColor colorWithCalibratedRed:redFloat green:greenFloat blue:blueFloat alpha:alphaFloat]; 67 | } 68 | 69 | + (NSNumber *)effectPhysicalColorWithColor:(NSColor *)color 70 | { 71 | unsigned char red = 0; 72 | unsigned char green = 0; 73 | unsigned char blue = 0; 74 | unsigned char alpha = color.alphaComponent*255; 75 | 76 | switch (color.numberOfComponents) { 77 | case 2: 78 | red = color.whiteComponent*255; 79 | green = color.whiteComponent*255; 80 | blue = color.whiteComponent*255; 81 | break; 82 | case 4: 83 | red = color.redComponent*255; 84 | green = color.greenComponent*255; 85 | blue = color.blueComponent*255; 86 | break; 87 | } 88 | 89 | NSString *hexString = [NSString stringWithFormat:@"%02X%02X%02X%02X", red, green, blue, alpha]; 90 | NSScanner *scanner = [[NSScanner alloc] initWithString:hexString]; 91 | 92 | unsigned int number = 0; 93 | [scanner scanHexInt:&number]; 94 | 95 | return @(number); 96 | } 97 | 98 | + (NSNumber *)physicalColorWithColor:(NSColor *)color 99 | { 100 | unsigned char red = 0; 101 | unsigned char green = 0; 102 | unsigned char blue = 0; 103 | unsigned char alpha = color.alphaComponent*255; 104 | 105 | switch (color.numberOfComponents) { 106 | case 2: 107 | red = color.whiteComponent*255; 108 | green = color.whiteComponent*255; 109 | blue = color.whiteComponent*255; 110 | break; 111 | case 4: 112 | red = color.redComponent*255; 113 | green = color.greenComponent*255; 114 | blue = color.blueComponent*255; 115 | break; 116 | } 117 | 118 | NSString *hexString = [NSString stringWithFormat:@"%02X%02X%02X%02X", alpha, red, green, blue]; 119 | NSScanner *scanner = [[NSScanner alloc] initWithString:hexString]; 120 | 121 | unsigned long long number = 0; 122 | [scanner scanHexLongLong:&number]; 123 | 124 | return @(number); 125 | } 126 | 127 | @end -------------------------------------------------------------------------------- /Appearance Maker/AMThemeDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // Document.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "CoreThemeDocument.h" 12 | 13 | @interface AMThemeDocument : CoreThemeDocument 14 | 15 | @property (nonatomic, strong) NSArray *defaultSortDescriptors; 16 | @property (nonatomic, readonly) TDThemeLook *defaultLook; 17 | 18 | @end 19 | 20 | -------------------------------------------------------------------------------- /Appearance Maker/AMThemeDocument.m: -------------------------------------------------------------------------------- 1 | // 2 | // Document.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AMThemeDocument.h" 10 | 11 | @interface AMThemeDocument () 12 | 13 | @end 14 | 15 | @implementation AMThemeDocument 16 | { 17 | TDThemeLook *_defaultLook; 18 | } 19 | 20 | + (BOOL)autosavesInPlace 21 | { 22 | return YES; 23 | } 24 | 25 | - (void)makeWindowControllers { 26 | NSWindowController *windowController = [[NSStoryboard storyboardWithName:@"Main" bundle:nil] instantiateControllerWithIdentifier:@"Document Window Controller"]; 27 | [self addWindowController:windowController]; 28 | [windowController.contentViewController setRepresentedObject:self]; 29 | 30 | self.minimumDeploymentVersion = @"10.11"; 31 | 32 | [super windowControllerDidLoadNib:windowController]; 33 | } 34 | 35 | - (NSString *)persistentStoreTypeForFileType:(NSString *)type 36 | { 37 | return NSSQLiteStoreType; 38 | } 39 | 40 | - (NSArray *)defaultSortDescriptors 41 | { 42 | if (!_defaultSortDescriptors) _defaultSortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"displayName" ascending:YES]]; 43 | 44 | return _defaultSortDescriptors; 45 | } 46 | 47 | - (TDThemeLook *)defaultLook 48 | { 49 | if (!_defaultLook) { 50 | NSArray *looks = [self objectsForEntity:@"ThemeLook" withPredicate:[NSPredicate predicateWithFormat:@"displayName = \"Luna\""] sortDescriptors:self.defaultSortDescriptors]; 51 | _defaultLook = looks[0]; 52 | } 53 | 54 | return _defaultLook; 55 | } 56 | 57 | - (IBAction)exportAppearance:(id)sender 58 | { 59 | NSSavePanel *exportPanel = [NSSavePanel savePanel]; 60 | exportPanel.allowedFileTypes = @[@"car"]; 61 | exportPanel.title = NSLocalizedString(@"Export Appearance", @"Export Appearance panel title"); 62 | exportPanel.prompt = NSLocalizedString(@"Export", @"Export"); 63 | [exportPanel beginSheetModalForWindow:self.windowForSheet completionHandler:^(NSInteger result) { 64 | if (!result) return; 65 | 66 | TDDistillRunner *distiller = [[TDDistillRunner alloc] init]; 67 | distiller.logger = [TDLogger logger]; 68 | if (![distiller runDistillWithDocumentURL:self.fileURL outputURL:exportPanel.URL attemptIncremental:YES forceDistill:NO]) { 69 | NSLog(@"Distiller failed"); 70 | } 71 | }]; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /Appearance Maker/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Appearance Maker/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 18 | // Insert code here to initialize your application 19 | } 20 | 21 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 22 | // Insert code here to tear down your application 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Appearance Maker/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Assets/PSDPreview.h: -------------------------------------------------------------------------------- 1 | // 2 | // CTDPsdPreviewRef.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 31/05/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | @interface CTDPSDPreviewRef : NSObject 12 | 13 | - (instancetype)initWithPath:(NSString *)path; 14 | 15 | - (long long)indexOfDrawingLayerType:(long long)arg1; 16 | - (id)createImageFromVerticalSlices:(id)arg1 horizontalSliceCount:(unsigned int)arg2 atLayer:(unsigned int)arg3; 17 | - (id)createImageOfGradientAtLayer:(unsigned int)arg1; 18 | - (id)createSlicedImageAtLayer:(unsigned int)arg1 overlayAlphaChannel:(long long)arg2; 19 | - (id)createSlicedImageAtLayer:(unsigned int)arg1; 20 | - (id)imagePreviewAtLayer:(unsigned int)arg1 overlayAlphaChannel:(long long)arg2; 21 | - (long long)numberOfAlphaChannels; 22 | - (long long)numberOfGradientLayers; 23 | - (BOOL)hasGradient; 24 | - (BOOL)hasRegularSliceGrid; 25 | - (void)evaluateSliceGrid; 26 | - (long long)sliceColumnCount; 27 | - (long long)sliceRowCount; 28 | 29 | 30 | @end 31 | 32 | @interface TDPhotoshopElementProduction : TDElementProduction 33 | 34 | - (CTDPSDPreviewRef *)psdImageRefWithDocument:(CoreThemeDocument *)document; 35 | 36 | + (unsigned int)sliceColumnsPerRendition:(long long)arg1; 37 | + (unsigned int)sliceRowsPerRendition:(long long)arg1; 38 | - (void)setAttributesFromCopyData:(id)arg1; 39 | - (id)copyDataFromAttributes; 40 | - (void)setAttributesFromData:(id)arg1; 41 | - (id)dataFromAttributes; 42 | - (void)copyAttributesInto:(id)arg1; 43 | - (void)deleteRenditionsInDocument:(id)arg1 shouldDeleteAssetFiles:(BOOL)arg2; 44 | - (BOOL)generateRenditionsWithEntityName:(id)arg1 document:(id)arg2 errorDescription:(id *)arg3; 45 | - (void)appendToLog:(id)arg1; 46 | - (id)log; 47 | - (id)baselineMetricsMaskWithDocument:(id)arg1; 48 | - (id)textMetricsMaskWithDocument:(id)arg1; 49 | - (id)edgeMetricsMaskWithDocument:(id)arg1; 50 | - (void)fillIterationKeyAttribute:(id)arg1 iteration:(int)arg2 rowOrColumn:(int)arg3 document:(id)arg4; 51 | - (void)getDrawingLayerIndices:(id *)arg1 themeLayers:(id *)arg2 lowestIndex:(long long *)arg3; 52 | - (void)addDrawingLayerIndex:(id)arg1 themeLayer:(id)arg2 toIndices:(id)arg3 layers:(id)arg4 lowestIndex:(long long *)arg5; 53 | - (id)associatedFileURLWithDocument:(id)arg1; 54 | - (id)relativePath; 55 | - (void)setRowIterationType:(id)arg1; 56 | - (void)setColumnIterationType:(id)arg1; 57 | - (void)setIsActive:(id)arg1; 58 | - (id)baseKeySpec; 59 | - (id)isActive; 60 | - (id)rowIterationType; 61 | - (id)columnIterationType; 62 | - (void)setColumnCount:(id)arg1; 63 | - (id)columnCount; 64 | - (void)setRowCount:(id)arg1; 65 | - (id)rowCount; 66 | 67 | @property(nonatomic, strong) TDPhotoshopAsset *asset; 68 | 69 | @end 70 | 71 | @interface CTDPhotoshopAssetView : NSView 72 | 73 | @property(nonatomic, copy) NSArray *layerIndexLayout; 74 | @property(nonatomic, copy) NSArray *layerNames; 75 | @property(nonatomic, strong) CTDPSDPreviewRef *psdImageRef; 76 | 77 | - (void)clipViewFrameOrBoundsDidChangeNotification:(id)arg1; 78 | - (BOOL)acceptsNotificationFromClipView:(id)arg1; 79 | - (NSInteger)sliceColumnCount; 80 | - (NSInteger)sliceRowCount; 81 | - (BOOL)hasRegularSliceGrid; 82 | - (void)setAlphaChannelIndex:(NSInteger)arg1; 83 | - (void)evaluateSliceGrid; 84 | - (void)tileLayersForClipView:(id)arg1; 85 | - (id)gridNodesInRect:(NSPoint)arg1; 86 | - (NSPoint)labelPointForGridNode:(NSInteger)arg1; 87 | - (NSPoint)imagePointForGridNode:(NSInteger)arg1; 88 | - (void)getRow:(NSInteger *)arg1 column:(NSInteger *)arg2 forLayerIndex:(long long)arg3; 89 | - (void)createLayerNames; 90 | 91 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Assets/TDAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | @class TDTemplateRenderingMode, TDThemeBitSource; 10 | 11 | @interface TDAsset : NSManagedObject 12 | { 13 | unsigned int _scaleFactor; 14 | } 15 | 16 | + (long long)subtypeFromImageFilename:(id)arg1; 17 | + (long long)idiomFromImageFilename:(id)arg1; 18 | + (BOOL)isTemplateFromImageFilename:(id)arg1; 19 | + (unsigned int)scaleFactorFromImageFilename:(id)arg1; 20 | + (id)_filenameRegex; 21 | @property(readonly, nonatomic) NSString *baseName; 22 | - (void)setHasProduction:(id)arg1; 23 | - (BOOL)hasProduction; 24 | 25 | - (NSURL *)fileURLWithDocument:(CoreThemeDocument *)document; 26 | 27 | - (id)sourceRelativePath; 28 | - (id)_sourceRelativePathComponents; 29 | - (unsigned int)scaleFactor; 30 | - (void)setScaleFactor:(unsigned int)arg1; 31 | 32 | // Remaining properties 33 | @property(retain, nonatomic) NSString *category; // @dynamic category; 34 | @property(retain, nonatomic) NSString *name; // @dynamic name; 35 | @property(retain, nonatomic) TDThemeBitSource *source; // @dynamic source; 36 | @property(retain, nonatomic) TDTemplateRenderingMode *templateRenderingMode; // @dynamic templateRenderingMode; 37 | 38 | @end 39 | 40 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Assets/TDMicaAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | #import "TDAsset.h" 10 | 11 | @interface TDMicaAsset : TDAsset 12 | 13 | - (void)setAttributesFromCopyData:(id)arg1; 14 | - (id)copyDataFromAttributes; 15 | - (BOOL)hasProduction; 16 | - (id)production; 17 | - (BOOL)hasCursorProduction; 18 | 19 | @property(retain, nonatomic) NSSet *productions; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Assets/TDPNGAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | #import "TDAsset.h" 10 | 11 | @interface TDPNGAsset : TDAsset 12 | 13 | - (BOOL)hasProduction; 14 | - (BOOL)hasCursorProduction; 15 | - (unsigned int)fileScaleFactor; 16 | - (void)setFileScaleFactor:(unsigned int)arg1; 17 | - (int)exifOrientation; 18 | - (id)sourceImageWithDocument:(id)arg1; 19 | - (struct CGSize)sourceImageSizeWithDocument:(id)arg1; 20 | 21 | @property(nonatomic) BOOL rawData; 22 | @property(retain, nonatomic) NSSet *renditions; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Assets/TDPhotoshopAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | #import "TDAsset.h" 10 | 11 | @interface TDPhotoshopAsset : TDAsset 12 | 13 | - (void)setAttributesFromCopyData:(id)arg1; 14 | - (id)copyDataFromAttributes; 15 | - (BOOL)hasProduction; 16 | - (id)production; 17 | - (BOOL)hasCursorProduction; 18 | 19 | @property(retain, nonatomic) NSSet *productions; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/CoreThemeDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // CoreThemeDocument.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | #import "TDSchemaCategory.h" 12 | #import "TDSchemaDefinition.h" 13 | #import "TDEffectStyleProduction.h" 14 | #import "TDNamedEffectProduction.h" 15 | #import "TDDistillRunner.h" 16 | #import "TDColor.h" 17 | #import "TDAsset.h" 18 | #import "TDPhotoshopAsset.h" 19 | #import "TDThemeBitSource.h" 20 | #import "PSDPreview.h" 21 | 22 | @protocol TDAssetManagementDelegate 23 | 24 | @optional 25 | 26 | - (void)willDeleteAsset:(__kindof TDAsset *)asset atURL:(NSURL *)URL; 27 | - (void)didDeleteAssetAtURL:(NSURL *)URL; 28 | 29 | - (void)willCreateAssetAtURL:(NSURL *)URL; 30 | - (void)didCreateAsset:(__kindof TDAsset *)asset atURL:(NSURL *)URL; 31 | 32 | @end 33 | 34 | @interface CoreThemeDocument : NSPersistentDocument 35 | 36 | + (id)defaultThemeBitSourceURLForDocumentURL:(id)arg1; 37 | + (void)doneWithColorConversion; 38 | + (int)shouldConvertColorsFromColorSpaceWithIdentifier:(unsigned long long)arg1 toIdentifier:(unsigned long long)arg2 error:(id *)arg3; 39 | + (unsigned long long)standardColorSpaceID; 40 | + (void)closeMigrationProgress; 41 | + (void)presentMigrationProgress; 42 | + (id)dataModelNameForVersion:(long long)arg1; 43 | + (long long)dataModelVersion; 44 | + (long long)targetPlatformForMOC:(id)arg1; 45 | + (long long)defaultTargetPlatform; 46 | + (long long)platformForPersistentString:(id)arg1; 47 | + (id)persistentStringForPlatform:(long long)arg1; 48 | + (id)migrateDocumentAtURL:(id)arg1 ofType:(id)arg2 error:(id *)arg3; 49 | + (long long)dataModelVersionFromMetadata:(id)arg1; 50 | + (id)createConfiguredDocumentAtURL:(id)arg1 error:(id *)arg2; 51 | + (int)maximumAreaOfPackableImageForScale:(unsigned long long)arg1; 52 | + (void)initialize; 53 | 54 | //@property(nonatomic) id customAssetProvider; // @synthesize customAssetProvider=_customAssetProvider; 55 | @property(nonatomic) id assetManagementDelegate; // @synthesize assetManagementDelegate=_assetManagementDelegate; 56 | @property(copy) NSString *pathToRepresentedDocument; // @synthesize pathToRepresentedDocument; 57 | @property(copy, nonatomic) NSString *minimumDeploymentVersion; // @synthesize minimumDeploymentVersion=_minimumDeploymentVersion; 58 | //@property(retain, nonatomic) TDDeviceTraits *optimizeForDeviceTraits; // @synthesize optimizeForDeviceTraits=_optimizeForDeviceTraits; 59 | @property(nonatomic) long long documentCapabilities; // @synthesize documentCapabilities=_capabilities; 60 | 61 | - (void)packRenditions; 62 | - (void)addThemeBitSourceAtPath:(id)arg1; 63 | - (void)addThemeBitSourceAtPath:(id)arg1 createProductions:(BOOL)arg2; 64 | @property(readonly, nonatomic) NSURL *themeBitSourceURL; 65 | - (BOOL)canAsynchronouslyWriteToURL:(id)arg1 ofType:(id)arg2 forSaveOperation:(unsigned long long)arg3; 66 | - (void)firstSaveDidEnd:(id)arg1 didSave:(BOOL)arg2 contextInfo:(void *)arg3; 67 | - (void)windowControllerDidLoadNib:(id)arg1; 68 | - (BOOL)readFromURL:(id)arg1 ofType:(id)arg2 error:(id *)arg3; 69 | - (BOOL)checkCompatibilityOfDocumentAtURL:(id)arg1 ofType:(id)arg2 error:(id *)arg3; 70 | - (BOOL)writeSafelyToURL:(id)arg1 ofType:(id)arg2 forSaveOperation:(unsigned long long)arg3 error:(id *)arg4; 71 | - (BOOL)configurePersistentStoreCoordinatorForURL:(id)arg1 ofType:(id)arg2 modelConfiguration:(id)arg3 storeOptions:(id)arg4 error:(id *)arg5; 72 | - (id)updatedVersionsMetadataFromMetadata:(id)arg1; 73 | - (id)persistentStoreTypeForFileType:(id)arg1; 74 | @property(nonatomic) BOOL allowsVibrancy; 75 | @property(nonatomic) int defaultBlendMode; 76 | 77 | - (void)importCursorsFromURL:(NSURL *)url getUnusedImportedCursors:(NSArray **)unusedImportedCursors getUnupdatedCursors:(NSArray **)unupdatedCursors; 78 | - (void)exportCursorsToURL:(NSURL *)url; 79 | - (void)importColorsFromURL:(NSURL *)url valuesOnly:(BOOL)valuesOnly getUnusedColorNames:(NSArray **)outNames; 80 | - (void)exportColorsToURL:(NSURL *)url; 81 | 82 | - (id)namedEffectProductions; 83 | - (id)namedArtworkProductions; 84 | - (id)schemaPartDefinitionWithElementID:(long long)arg1 partID:(long long)arg2; 85 | - (id)schemaDefinitionWithElementID:(long long)arg1; 86 | 87 | - (BOOL)customizeSchemaPartDefinition:(id)arg1 usingArtworkFormat:(id)arg2 nameElement:(id)arg3 shouldReplaceExisting:(BOOL)arg4 error:(id *)arg5; 88 | - (BOOL)customizeSchemaMaterialDefinition:(id)arg1 shouldReplaceExisting:(BOOL)arg2 error:(id *)arg3; 89 | - (BOOL)customizeSchemaEffectDefinition:(id)arg1 shouldReplaceExisting:(BOOL)arg2 error:(id *)arg3; 90 | - (BOOL)customizeSchemaElementDefinition:(id)arg1 usingArtworkFormat:(id)arg2 shouldReplaceExisting:(BOOL)arg3 error:(id *)arg4; 91 | 92 | - (void)removeCustomizationForSchemaDefinition:(id)arg1 shouldDeleteAssetFiles:(BOOL)arg2; 93 | - (BOOL)customizationExistsForSchemaDefinition:(id)arg1; 94 | - (id)customizedSchemaMaterialDefinitions; 95 | - (id)customizedSchemaEffectDefinitions; 96 | - (id)customizedSchemaElementDefinitions; 97 | - (BOOL)usesCUISystemThemeRenditionKey; 98 | - (long long)renditionKeySpecAttributeCount; 99 | - (int)renditionKeySemantics; 100 | //- (const struct _renditionkeyfmt *)renditionKeyFormat; 101 | - (void)convertColorsFromColorSpaceWithIdentifier:(unsigned long long)arg1 toIdentifier:(unsigned long long)arg2; 102 | - (id)colorSpaceByIdentifier:(unsigned long long)arg1; 103 | - (unsigned long long)colorSpaceID; 104 | - (BOOL)didMigrate; 105 | - (void)primeArrayControllers; 106 | - (void)resetThemeConstants; 107 | - (void)buildModel; 108 | - (long long)targetPlatform; 109 | - (void)setTargetPlatform:(long long)arg1; 110 | - (void)setArtworkFormat:(id)arg1; 111 | - (id)artworkFormat; 112 | - (unsigned int)checksum; 113 | @property(copy, nonatomic) NSUUID *uuid; 114 | - (unsigned long long)countOfRenditionsMatchingRenditionKeySpecs:(id)arg1; 115 | - (unsigned long long)countOfRenditionsMatchingRenditionKeySpec:(id)arg1; 116 | - (id)renditionsMatchingRenditionKeySpec:(id)arg1; 117 | - (BOOL)isCustomLook; 118 | - (void)setRelativePathToProductionData:(id)arg1; 119 | - (id)relativePathToProductionData; 120 | - (id)rootPathForProductionData; 121 | - (id)pathToAsset:(id)arg1; 122 | - (void)setMetadatum:(id)arg1 forKey:(id)arg2; 123 | - (id)metadatumForKey:(id)arg1; 124 | - (id)addAssetsAtFileURLs:(id)arg1 createProductions:(BOOL)arg2 referenceFiles:(BOOL)arg3 bitSource:(id)arg4 customInfos:(id)arg5; 125 | - (id)addAssetsAtFileURLs:(id)arg1 createProductions:(BOOL)arg2; 126 | - (id)addAssetsAtFileURLs:(id)arg1; 127 | - (id)assetAtFileURL:(id)arg1; 128 | - (id)assetAtPath:(id)arg1; 129 | - (id)createAssetWithName:(id)arg1 fileType:(id)arg2 scaleFactor:(unsigned int)arg3 inCategory:(id)arg4 forThemeBitSource:(id)arg5; 130 | - (id)createAssetWithName:(id)arg1 scaleFactor:(unsigned int)arg2 inCategory:(id)arg3 forThemeBitSource:(id)arg4; 131 | - (id)createAssetWithName:(id)arg1 inCategory:(id)arg2 forThemeBitSource:(id)arg3; 132 | - (id)createElementProductionWithAsset:(id)arg1; 133 | //- (void)importCustomAssetsWithImportInfos:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; 134 | - (BOOL)createCustomArtworkProductionsForCustomAssets:(id)arg1 withImportInfos:(id)arg2 error:(id *)arg3; 135 | //- (void)deleteNamedAssets:(id)arg1 shouldDeleteAssetFiles:(BOOL)arg2 completionHandler:(CDUnknownBlockType)arg3; 136 | //- (void)importNamedAssetsWithImportInfos:(id)arg1 referenceFiles:(BOOL)arg2 completionHandler:(CDUnknownBlockType)arg3; 137 | //- (void)importNamedAssetsWithImportInfos:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; 138 | //- (void)importNamedAssetsFromFileURLs:(id)arg1 referenceFiles:(BOOL)arg2 completionHandler:(CDUnknownBlockType)arg3; 139 | - (id)createNamedArtworkProductionsForAssets:(id)arg1 customInfos:(id)arg2 error:(id *)arg3; 140 | //- (id)slicesComputedForImageSize:(struct CGSize)arg1 usingSliceInsets:(CDStruct_3c058996)arg2 resizableSliceSize:(struct CGSize)arg3 withRenditionType:(long long)arg4; 141 | - (id)namedArtworkProductionWithName:(id)arg1; 142 | - (id)elementProductionsWithName:(id)arg1; 143 | - (id)namedElementsForElementDefinition:(id)arg1; 144 | - (id)namedElementWithName:(id)arg1; 145 | 146 | - (TDNamedEffectProduction *)createNamedEffectProductionWithName:(NSString *)name isText:(BOOL)flag; 147 | 148 | - (id)namedEffectProductionWithName:(id)arg1; 149 | - (id)createEffectStyleProductionForPartDefinition:(id)arg1 withNameIdentifier:(id)arg2; 150 | - (TDEffectStyleProduction *)createEffectStyleProductionForPartDefinition:(TDSchemaPartDefinition *)part; 151 | 152 | - (id)createProductionWithRenditionGroup:(id)arg1 forPartDefinition:(id)arg2 artworkFormat:(id)arg3 nameElement:(id)arg4 shouldReplaceExisting:(BOOL)arg5 error:(id *)arg6; 153 | - (id)createProductionWithRenditionGroup:(id)arg1 forPartDefinition:(id)arg2 artworkFormat:(id)arg3 shouldReplaceExisting:(BOOL)arg4 error:(id *)arg5; 154 | - (BOOL)allowMultipleInstancesOfElementID:(long long)arg1; 155 | - (BOOL)createPSDReferenceArtworkForRenditionGroup:(id)arg1 atDestination:(id)arg2 error:(id *)arg3; 156 | - (id)createReferencePNGForSchemaRendition:(id)arg1 withPartDefinition:(id)arg2 atLocation:(id)arg3 error:(id *)arg4; 157 | - (id)defaultPathComponentsForPartDefinition:(id)arg1; 158 | - (id)defaultBaseFileNameForSchemaRendition:(id)arg1 withPartDefinition:(id)arg2; 159 | - (id)defaultPNGFileNameForSchemaRendition:(id)arg1 withPartDefinition:(id)arg2; 160 | - (id)folderNameFromRenditionKey:(id)arg1 forPartDefinition:(id)arg2; 161 | - (id)minimalDisplayNameForThemeConstant:(id)arg1; 162 | - (void)deleteProductions:(id)arg1 shouldDeleteAssetFiles:(BOOL)arg2; 163 | - (void)deleteProduction:(id)arg1 shouldDeleteAssetFiles:(BOOL)arg2; 164 | - (void)deleteObject:(id)arg1; 165 | - (void)deleteObjects:(id)arg1; 166 | 167 | - (__kindof NSManagedObject *)newObjectForEntity:(NSString *)entityName; 168 | - (NSUInteger)countForEntity:(NSString *)entityName withPredicate:(NSPredicate *)predicate; 169 | - (NSArray <__kindof NSManagedObject *> *)objectsForEntity:(NSString *)entityName withPredicate:(NSPredicate *)predicate sortDescriptors:(NSArray *)sortDescriptors error:(NSError **)outError; 170 | - (NSArray <__kindof NSManagedObject *> *)objectsForEntity:(NSString *)entityName withPredicate:(NSPredicate *)predicate sortDescriptors:(NSArray *)sortDescriptors; 171 | 172 | - (id)allObjectsForEntity:(id)arg1 withSortDescriptors:(id)arg2 error:(id *)arg3; 173 | - (id)allObjectsForEntity:(id)arg1 withSortDescriptors:(id)arg2; 174 | - (id)mappingForPhotoshopLayerIndex:(long long)arg1 themeDrawingLayerIdentifier:(long long)arg2; 175 | - (id)artworkDraftTypeWithIdentifier:(long long)arg1; 176 | - (id)zeroCodeArtworkInfoWithIdentifier:(long long)arg1; 177 | - (id)psdImageRefForAsset:(id)arg1; 178 | - (id)constantWithName:(id)arg1 forIdentifier:(long long)arg2; 179 | - (id)iterationTypeWithIdentifier:(int)arg1; 180 | - (id)renditionSubtypeWithIdentifier:(unsigned int)arg1; 181 | - (id)renditionTypeWithIdentifier:(long long)arg1; 182 | - (id)effectComponentWithType:(unsigned int)arg1 inRendition:(id)arg2 createIfNeeded:(BOOL)arg3; 183 | - (id)effectParameterValueWithType:(unsigned int)arg1 inComponent:(id)arg2 createIfNeeded:(BOOL)arg3; 184 | - (id)effectParameterTypeWithIdentifier:(unsigned int)arg1; 185 | - (id)effectTypeWithIdentifier:(unsigned int)arg1; 186 | - (id)schemaCategoryWithIdentifier:(long long)arg1; 187 | - (id)lookWithIdentifier:(long long)arg1; 188 | - (id)templateRenderingModeWithIdentifier:(long long)arg1; 189 | - (id)sizeClassWithIdentifier:(long long)arg1; 190 | - (id)graphicsFeatureSetClassWithIdentifier:(long long)arg1; 191 | - (id)idiomWithIdentifier:(long long)arg1; 192 | - (id)drawingLayerWithIdentifier:(long long)arg1; 193 | - (id)previousValueWithIdentifier:(long long)arg1; 194 | - (id)valueWithIdentifier:(long long)arg1; 195 | - (id)presentationStateWithIdentifier:(long long)arg1; 196 | - (id)previousStateWithIdentifier:(long long)arg1; 197 | - (id)stateWithIdentifier:(long long)arg1; 198 | - (id)directionWithIdentifier:(long long)arg1; 199 | - (id)sizeWithIdentifier:(long long)arg1; 200 | - (id)partWithIdentifier:(long long)arg1; 201 | - (id)elementWithIdentifier:(long long)arg1; 202 | - (id)themeConstant:(id)arg1 withIdentifier:(long long)arg2; 203 | - (void)recacheThemeConstant:(id)arg1; 204 | 205 | - (NSArrayController *)arrayControllerForConstant:(id)constant; 206 | 207 | - (id)historian; 208 | - (id)mocOrganizer; 209 | 210 | - (NSManagedObjectModel *)managedObjectModel; 211 | 212 | - (id)updateToEmbeddedSchemaVersion2AndReturnAlertString:(id *)arg1; 213 | - (void)checkVersionsAndUpdateIfNecessary; 214 | - (id)initWithContentsOfURL:(id)arg1 ofType:(id)arg2 error:(id *)arg3; 215 | - (id)initForURL:(id)arg1 withContentsOfURL:(id)arg2 ofType:(id)arg3 error:(id *)arg4; 216 | - (id)initWithType:(id)arg1 error:(id *)arg2; 217 | - (id)initWithType:(id)arg1 targetPlatform:(long long)arg2 error:(id *)arg3; 218 | - (id)init; 219 | - (void)changedObjectsNotification:(id)arg1; 220 | - (void)updateRenditionSpec:(id)arg1; 221 | @property(readonly, nonatomic) int patchVersion; 222 | @property(readonly, nonatomic) int minorVersion; 223 | @property(readonly, nonatomic) int majorVersion; 224 | 225 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Effect/TDEffectComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | @class NSSet, TDEffectRenditionSpec, TDEffectType; 10 | 11 | @interface TDEffectComponent : NSManagedObject 12 | 13 | - (void)updatePresetParameters:(id)arg1 atIndex:(unsigned long long)arg2; 14 | - (void)setEffectParametersFromPreset:(id)arg1 atIndex:(unsigned long long)arg2 withDocument:(id)arg3; 15 | 16 | // Remaining properties 17 | @property(retain, nonatomic) TDEffectType *effectType; // @dynamic effectType; 18 | @property(nonatomic) BOOL isEnabled; // @dynamic isEnabled; 19 | @property(retain, nonatomic) NSSet *parameters; // @dynamic parameters; 20 | @property(retain, nonatomic) TDEffectRenditionSpec *rendition; // @dynamic rendition; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Effect/TDEffectParameterType.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | @class TDThemeConstant; 10 | 11 | @interface TDEffectParameterType : TDThemeConstant 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Effect/TDEffectParameterValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | @class NSNumber, TDEffectComponent, TDEffectParameterType; 10 | 11 | @interface TDEffectParameterValue : NSManagedObject 12 | 13 | @property(retain, nonatomic) NSNumber *angleValue; // @dynamic angleValue; 14 | @property(retain, nonatomic) NSNumber *colorValue; // @dynamic colorValue; 15 | @property(retain, nonatomic) TDEffectComponent *component; // @dynamic component; 16 | @property(retain, nonatomic) NSNumber *floatValue; // @dynamic floatValue; 17 | @property(retain, nonatomic) NSNumber *intValue; // @dynamic intValue; 18 | @property(retain, nonatomic) TDEffectParameterType *parameterType; // @dynamic parameterType; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Effect/TDEffectRenditionSpec.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import "TDRenditionSpec.h" 8 | 9 | @class NSImage, NSNumber, NSSet; 10 | 11 | @interface TDEffectRenditionSpec : TDRenditionSpec 12 | { 13 | NSImage *_sampleImage; 14 | } 15 | 16 | - (BOOL)canBePackedWithDocument:(id)arg1; 17 | - (id)createCSIRepresentationWithCompression:(BOOL)arg1 colorSpaceID:(unsigned long long)arg2 document:(id)arg3; 18 | - (id)effectPreset; 19 | - (void)setComponentsFromEffectPreset:(id)arg1 withDocument:(id)arg2; 20 | - (void)dealloc; 21 | - (NSImage *)sampleImage; 22 | - (struct CGImage *)_effectSampleImage; 23 | 24 | // Remaining properties 25 | @property(retain, nonatomic) NSSet *components; // @dynamic components; 26 | @property(retain, nonatomic) NSNumber *effectScale; // @dynamic effectScale; 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Effect/TDEffectStyleProduction.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | #import "TDElementProduction.h" 10 | 11 | @class CoreThemeDocument; 12 | 13 | @interface TDEffectStyleProduction : TDElementProduction 14 | 15 | - (NSString *)displayName; 16 | - (void)deleteRenditionsInDocument:(CoreThemeDocument *)document shouldDeleteAssetFiles:(BOOL)deleteFiles; 17 | - (NSDate *)associatedFileModificationDateWithDocument:(CoreThemeDocument *)document; 18 | - (void)generateRenditionsWithDocument:(CoreThemeDocument *)document; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Effect/TDEffectType.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | @interface TDEffectType : TDThemeConstant 10 | 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/Effect/TDNamedEffectProduction.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | @class TDEffectStyleProduction; 10 | 11 | @interface TDNamedEffectProduction : TDEffectStyleProduction 12 | 13 | - (NSString *)displayName; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // TDColor.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @interface TDThemeLook : TDThemeConstant 10 | 11 | - (BOOL)supportsContrastAdjustment; 12 | - (void)setSupportsContrastAdjustment:(BOOL)arg1; 13 | 14 | @end 15 | 16 | @interface TDColorName : NSManagedObject 17 | 18 | @property(retain, nonatomic) NSSet *colorDefinitions; 19 | @property(retain, nonatomic) NSString *colorDescription; 20 | @property(retain, nonatomic) NSString *displayName; 21 | @property(retain, nonatomic) NSString *illustrationURL; 22 | @property(retain, nonatomic) NSNumber *isExcludedFromFilter; 23 | @property(retain, nonatomic) NSString *selector; 24 | 25 | @end 26 | 27 | @interface TDColorDefinition : NSManagedObject 28 | 29 | - (NSString *)colorAsString; 30 | - (void)setAttributesFromCopyData:(NSData *)data; 31 | - (NSData *)copyDataFromAttributes; 32 | - (void)setAttributesFromData:(NSData *)data; 33 | - (NSData *)dataFromAttributes; 34 | - (void)copyAttributesInto:(id)arg1; 35 | 36 | @property(retain, nonatomic) NSManagedObject *colorStatus; 37 | @property(retain, nonatomic) NSDate *dateOfLastChange; 38 | @property(retain, nonatomic) TDThemeLook *look; 39 | @property(retain, nonatomic) TDColorName *name; 40 | @property(retain, nonatomic) NSNumber *physicalColor; 41 | 42 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDDistillRunner.h: -------------------------------------------------------------------------------- 1 | // 2 | // TDDistillRunner.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 11/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | @interface TDLogger : NSObject 12 | 13 | + (instancetype)logger; 14 | 15 | @end 16 | 17 | @interface TDDistillRunner : NSObject 18 | 19 | @property long long assetStoreVersionNumber; // @synthesize assetStoreVersionNumber=_assetStoreVersionNumber; 20 | @property(copy) NSString *assetStoreVersionString; // @synthesize assetStoreVersionString=_assetStoreVersionString; 21 | @property(retain, nonatomic) TDLogger *logger; // @synthesize logger=_logger; 22 | @property(copy, nonatomic) NSURL *outputURL; // @synthesize outputURL=_outputURL; 23 | - (void)dealloc; 24 | - (BOOL)runDistillWithDocumentURL:(id)arg1 outputURL:(id)arg2 attemptIncremental:(BOOL)arg3 forceDistill:(BOOL)arg4; 25 | @property(nonatomic) BOOL packImagesInDocument; 26 | - (BOOL)_isDistillUnnecessaryForDocument:(id)arg1; 27 | - (void)_moveScratchToOutputPath; 28 | - (void)_removeScratchPath; 29 | - (id)carScratchURL; 30 | - (id)init; 31 | 32 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDElementProduction.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | #import 8 | 9 | @class NSDate, NSNumber, NSSet, NSString, TDNamedElement, TDRenditionKeySpec, TDRenditionType, TDSchemaPartDefinition, TDThemeConstant; 10 | 11 | @interface TDRenditionType : TDThemeConstant 12 | @end 13 | 14 | @interface TDElementProduction : NSManagedObject 15 | 16 | - (void)deleteRenditionsInDocument:(id)arg1 shouldDeleteAssetFiles:(BOOL)arg2; 17 | - (id)associatedFileModificationDateWithDocument:(id)arg1; 18 | - (id)associatedFileURLWithDocument:(id)arg1; 19 | - (id)relativePath; 20 | 21 | // Remaining properties 22 | @property(retain, nonatomic) TDThemeConstant *artworkDraftType; // @dynamic artworkDraftType; 23 | @property(retain, nonatomic) TDRenditionKeySpec *baseKeySpec; // @dynamic baseKeySpec; 24 | @property(retain, nonatomic) NSString *comment; // @dynamic comment; 25 | @property(retain, nonatomic) NSDate *dateOfLastChange; // @dynamic dateOfLastChange; 26 | @property(retain, nonatomic) NSNumber *isExcludedFromFilter; // @dynamic isExcludedFromFilter; 27 | @property(nonatomic) BOOL makeOpaqueIfPossible; // @dynamic makeOpaqueIfPossible; 28 | @property(retain, nonatomic) TDNamedElement *name; // @dynamic name; 29 | @property(retain, nonatomic) TDSchemaPartDefinition *partDefinition; // @dynamic partDefinition; 30 | @property(retain, nonatomic) TDThemeConstant *renditionSubtype; // @dynamic renditionSubtype; 31 | @property(retain, nonatomic) TDRenditionType *renditionType; // @dynamic renditionType; 32 | @property(retain, nonatomic) NSSet *renditions; // @dynamic renditions; 33 | @property(retain, nonatomic) NSSet *tags; // @dynamic tags; 34 | @property(retain, nonatomic) NSString *universalTypeIdentifier; // @dynamic universalTypeIdentifier; 35 | @property(retain, nonatomic) TDThemeConstant *zeroCodeArtworkInfo; // @dynamic zeroCodeArtworkInfo; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDRenditionSpec.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 7 2015 21:36:47). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. 5 | // 6 | 7 | @import Cocoa; 8 | 9 | @class NSDate, NSSet, TDElementProduction, TDRenditionKeySpec, TDRenditionType; 10 | 11 | @interface TDRenditionSpec : NSManagedObject 12 | { 13 | } 14 | 15 | - (void)drawPackableRenditionInContext:(struct CGContext *)arg1 withDocument:(id)arg2; 16 | - (BOOL)canBePackedWithDocument:(id)arg1; 17 | - (void)updatePackingPropertiesWithDocument:(id)arg1; 18 | @property(nonatomic) struct CGPoint packedPoint; 19 | @property(retain, nonatomic) TDRenditionType *renditionType; // @dynamic renditionType; 20 | - (id)createCSIRepresentationWithCompression:(BOOL)arg1 colorSpaceID:(unsigned long long)arg2 document:(id)arg3; 21 | - (void)resetToBaseKeySpec; 22 | - (void)awakeFromInsert; 23 | 24 | // Remaining properties 25 | @property(nonatomic) BOOL alphaCrop; // @dynamic alphaCrop; 26 | @property(retain, nonatomic) NSDate *dateOfLastChange; // @dynamic dateOfLastChange; 27 | @property(nonatomic) int height; // @dynamic height; 28 | @property(retain, nonatomic) TDRenditionKeySpec *keySpec; // @dynamic keySpec; 29 | @property(nonatomic) BOOL monochrome; // @dynamic monochrome; 30 | @property(nonatomic) BOOL opaque; // @dynamic opaque; 31 | @property(nonatomic) int packedPointX; // @dynamic packedPointX; 32 | @property(nonatomic) int packedPointY; // @dynamic packedPointY; 33 | @property(retain, nonatomic) NSSet *packedRenditions; // @dynamic packedRenditions; 34 | @property(retain, nonatomic) TDRenditionSpec *parentRendition; // @dynamic parentRendition; 35 | @property(retain, nonatomic) TDElementProduction *production; // @dynamic production; 36 | @property(nonatomic) int width; // @dynamic width; 37 | 38 | @end 39 | 40 | -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDSchemaCategory.h: -------------------------------------------------------------------------------- 1 | // 2 | // TDSchemaCategory.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | #import "TDThemeConstant.h" 12 | 13 | @interface TDSchemaCategory : TDThemeConstant 14 | 15 | @property(retain, nonatomic) NSSet *elements; 16 | 17 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDSchemaDefinition.h: -------------------------------------------------------------------------------- 1 | // 2 | // TDSchemaDefinition.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | @class TDSchemaCategory; 12 | 13 | @interface TDSchemaDefinition : NSManagedObject 14 | 15 | + (unsigned long long)elementDefinitionCountWithSchema:(id)arg1; 16 | - (id)displayName; 17 | - (id)previewImage; 18 | 19 | @property(retain, nonatomic) TDSchemaCategory *category; 20 | @property(retain, nonatomic) NSString *name; 21 | @property(retain, nonatomic) NSSet *parts; 22 | @property BOOL published; 23 | 24 | @end 25 | 26 | @interface TDSchemaElementDefinition : TDSchemaDefinition 27 | @end 28 | 29 | @interface TDSchemaEffectDefinition : TDSchemaDefinition 30 | @end 31 | 32 | @interface TDSchemaMaterialDefinition : TDSchemaDefinition 33 | @end 34 | 35 | @interface TDSchemaPartDefinition : NSManagedObject 36 | 37 | @property(nonatomic) unsigned long long partFeatures; // @synthesize partFeatures; 38 | @property(retain, nonatomic) NSArray *renditionGroups; // @synthesize renditionGroups; 39 | @property(copy, nonatomic) NSArray *renditions; // @synthesize renditions; 40 | @property(retain, nonatomic) NSImage *previewImage; // @synthesize previewImage; 41 | - (void)didTurnIntoFault; 42 | - (id)displayName; 43 | - (long long)partID; 44 | - (long long)elementID; 45 | - (long long)_renditionKeyValueForTokenIdentifier:(unsigned short)arg1; 46 | - (id)validStatesWithDocument:(id)arg1; 47 | - (void)updateDerivedRenditionData; 48 | - (id)_schema; 49 | - (id)bestPreviewRendition; 50 | 51 | @property(retain, nonatomic) TDSchemaDefinition *element; 52 | @property(retain, nonatomic) NSString *name; 53 | @property(retain, nonatomic) NSSet *productions; 54 | @property(retain, nonatomic) NSString *widgetID; 55 | 56 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDThemeBitSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // TDThemeBitSource.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 31/05/16. 6 | // Copyright © 2016 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | @class TDAsset; 12 | 13 | @interface TDThemeBitSource : NSManagedObject 14 | 15 | - (NSURL *)fileURLWithDocument:(CoreThemeDocument *)document; 16 | 17 | @property (nonatomic, copy) NSString *name; 18 | 19 | @property(nonatomic, readonly) NSSet <__kindof TDAsset *> *assets; 20 | @property(nonatomic, copy) NSString *path; 21 | 22 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreThemeDefinition Headers/TDThemeConstant.h: -------------------------------------------------------------------------------- 1 | // 2 | // TDThemeConstant.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | @interface TDThemeConstant : NSManagedObject 12 | 13 | - (void)setAttributesFromCopyData:(id)arg1; 14 | - (id)copyDataFromAttributes; 15 | - (id)debugDescription; 16 | - (id)constantName; 17 | - (void)setConstantName:(id)arg1; 18 | - (id)displayName; 19 | - (void)setDisplayName:(id)arg1; 20 | - (unsigned int)identifier; 21 | - (void)setIdentifier:(unsigned int)arg1; 22 | 23 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreUI Headers/CUICatalog.h: -------------------------------------------------------------------------------- 1 | // 2 | // CUICatalog.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 15/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | #import "CUIStructuredThemeStore.h" 12 | 13 | @interface CUICatalog : NSObject 14 | 15 | + (__kindof CUICatalog *)defaultUICatalogForBundle:(id)variant; 16 | + (__kindof CUICatalog *)systemUICatalog; 17 | + (__kindof CUICatalog *)defaultUICatalog; 18 | + (__kindof CUICatalog *)systemUICatalogWithArtVariant:(id)variant; 19 | 20 | - (__kindof CUICatalog *)initWithURL:(NSURL *)anURL error:(id *)arg2; 21 | - (__kindof CUICatalog *)initWithName:(NSString *)aName fromBundle:(NSBundle *)aBundle error:(NSError **)outError; 22 | - (__kindof CUICatalog *)initWithName:(NSString *)aName fromBundle:(NSBundle *)aBundle; 23 | 24 | - (__kindof CUIStructuredThemeStore *)_themeStore; 25 | - (NSArray *)imagesWithName:(id)arg1; 26 | - (NSArray *)allImageNames; 27 | - (BOOL)imageExistsWithName:(NSString *)imageName scaleFactor:(double)factor; 28 | - (id)imageWithName:(NSString *)imageName scaleFactor:(double)factor; 29 | 30 | - (BOOL)hasCustomizedAppearanceForWidget:(id)widget; 31 | 32 | @end -------------------------------------------------------------------------------- /Appearance Maker/CoreUI Headers/CUIStructuredThemeStore.h: -------------------------------------------------------------------------------- 1 | // 2 | // CUIThemeStore.h 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 15/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | @import Cocoa; 10 | 11 | typedef struct rgbquad { 12 | unsigned int :8; 13 | unsigned int :8; 14 | unsigned int :8; 15 | unsigned int :8; 16 | } rgbquad_t; 17 | 18 | typedef struct colordef { 19 | unsigned int _field1; 20 | unsigned int _field2; 21 | unsigned int color; 22 | } colordef_t; 23 | 24 | @interface CUIStructuredThemeStore : NSObject 25 | 26 | - (id)imagesWithName:(id)arg1; 27 | - (id)allImageNames; 28 | - (id)zeroCodeGlyphList; 29 | - (unsigned int)authoredWithSchemaVersion; 30 | - (unsigned int)distilledInCoreUIVersion; 31 | - (unsigned int)documentFormatVersion; 32 | - (id)themeStore; 33 | - (id)initWithBytes:(const void *)arg1 length:(NSUInteger)arg2; 34 | - (id)initWithURL:(id)arg1; 35 | - (id)initWithPath:(id)arg1; 36 | - (BOOL)usesCUISystemThemeRenditionKey; 37 | - (long long)maximumRenditionKeyTokenCount; 38 | - (unsigned long long)colorSpaceID; 39 | - (id)bundleID; 40 | - (BOOL)hasPhysicalColorWithName:(NSString *)name; 41 | - (BOOL)getPhysicalColor:(colordef_t *)outDef withName:(NSString *)name; 42 | 43 | @property(readonly, copy) NSString *debugDescription; 44 | @property(nonatomic) unsigned long long themeIndex; 45 | 46 | @end 47 | 48 | @interface CUISystemStore : CUIStructuredThemeStore 49 | 50 | + (BOOL)isUsingSharedSystemCache; 51 | - (void)invalidateCache; 52 | - (void)encodeWithCoder:(id)arg1; 53 | - (id)initWithCoder:(id)arg1; 54 | - (id)catalogGlobals; 55 | - (id)assetDataFromCacheWithKeySignature:(id)arg1; 56 | - (BOOL)getPhysicalColor:(colordef_t *)outColor withName:(NSString *)name; 57 | - (id)init; 58 | - (id)_systemCarPath; 59 | - (id)_systemCarBundle; 60 | 61 | @end -------------------------------------------------------------------------------- /Appearance Maker/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeExtensions 11 | 12 | tdd 13 | 14 | CFBundleTypeIconFile 15 | 16 | CFBundleTypeName 17 | Theme Definition Document 18 | CFBundleTypeOSTypes 19 | 20 | ???? 21 | 22 | CFBundleTypeRole 23 | Editor 24 | LSItemContentTypes 25 | 26 | com.apple.uicatalog 27 | 28 | LSTypeIsPackage 29 | 0 30 | NSDocumentClass 31 | AMThemeDocument 32 | 33 | 34 | CFBundleExecutable 35 | $(EXECUTABLE_NAME) 36 | CFBundleIconFile 37 | 38 | CFBundleIdentifier 39 | $(PRODUCT_BUNDLE_IDENTIFIER) 40 | CFBundleInfoDictionaryVersion 41 | 6.0 42 | CFBundleName 43 | $(PRODUCT_NAME) 44 | CFBundlePackageType 45 | APPL 46 | CFBundleShortVersionString 47 | 1.0 48 | CFBundleSignature 49 | ???? 50 | CFBundleVersion 51 | 1 52 | LSMinimumSystemVersion 53 | $(MACOSX_DEPLOYMENT_TARGET) 54 | NSHumanReadableCopyright 55 | Copyright © 2015 Guilherme Rambo. All rights reserved. 56 | NSMainStoryboardFile 57 | Main 58 | NSPrincipalClass 59 | NSApplication 60 | UTExportedTypeDeclarations 61 | 62 | 63 | UTTypeConformsTo 64 | 65 | public.data 66 | 67 | UTTypeDescription 68 | Theme Definition Document 69 | UTTypeIdentifier 70 | com.apple.uicatalog 71 | UTTypeTagSpecification 72 | 73 | public.filename-extension 74 | 75 | tdd 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Appearance Maker/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Appearance Maker 4 | // 5 | // Created by Guilherme Rambo on 10/06/15. 6 | // Copyright © 2015 Guilherme Rambo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /AppearancePreview/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | NSHumanReadableCopyright 24 | Copyright © 2015 Guilherme Rambo. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Design/PhotoshopUI.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/AppearanceMaker/e0fa14430f6d8c1e9ceddad8fd01fe1318b2b95b/Design/PhotoshopUI.sketch -------------------------------------------------------------------------------- /Design/PhotoshopUI/checkerboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/AppearanceMaker/e0fa14430f6d8c1e9ceddad8fd01fe1318b2b95b/Design/PhotoshopUI/checkerboard.png -------------------------------------------------------------------------------- /Design/PhotoshopUI/checkerboard@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/AppearanceMaker/e0fa14430f6d8c1e9ceddad8fd01fe1318b2b95b/Design/PhotoshopUI/checkerboard@2x.png -------------------------------------------------------------------------------- /Design/PhotoshopUI/checkerboard@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/AppearanceMaker/e0fa14430f6d8c1e9ceddad8fd01fe1318b2b95b/Design/PhotoshopUI/checkerboard@3x.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Guilherme Rambo 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | - Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | - Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 17 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Appearance Maker 2 | 3 | Create custom appearances to customize your app's look with NSAppearance 4 | 5 | ![screenshot](https://raw.github.com/insidegui/AppearanceMaker/master/screenshot_new.png) 6 | 7 | ## How to use 8 | 9 | [🎥 Check out this short video to see It in action](https://youtu.be/DL1ZzSuU2cA). 10 | 11 | The basic workflow is: 12 | 13 | * Create an Appearance Maker document 14 | * Select the UI elements you want to customize and click "Customize" 15 | * Edit the PSDs in Photoshop or equivalent and save 16 | * Change colors and fonts (font customization is not implemented yet) 17 | * Preview and export the `.CAR` file 18 | * Add the `.CAR` file to your app's resources 19 | * Load the appearance using `NSAppearance` and apply It to your views 20 | 21 | Please note that Appearance Maker only works on OS X 10.11 and later and is not finished yet, some features are not working (mainly the effects and fonts editor). 22 | 23 | ## What's NSAppearance? 24 | 25 | [Check the docs](https://developer.apple.com/library/mac/documentation/AppKit/Reference/NSAppearance_Class/Reference/Reference.html). Even though Apple states you can create a custom appearance using Xcode, this is not currently available, so I've created this app that lets you make custom appearances. 26 | -------------------------------------------------------------------------------- /screenshot_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/insidegui/AppearanceMaker/e0fa14430f6d8c1e9ceddad8fd01fe1318b2b95b/screenshot_new.png --------------------------------------------------------------------------------