-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bf809b9
Showing
8 changed files
with
1,020 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Xcode | ||
.DS_Store | ||
*/build/* | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
profile | ||
*.moved-aside | ||
DerivedData | ||
.idea/ | ||
*.hmap | ||
xcuserdata/* | ||
|
||
*.pbxuser | ||
*.mode1v3 | ||
*.mode2v3 | ||
*.perspectivev3 | ||
*.xcuserstate | ||
project.xcworkspace/ | ||
xcuserdata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,302 @@ | ||
// !$*UTF8*$! | ||
{ | ||
archiveVersion = 1; | ||
classes = { | ||
}; | ||
objectVersion = 48; | ||
objects = { | ||
|
||
/* Begin PBXBuildFile section */ | ||
3A40066E18B53113005F43A6 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A40066D18B53113005F43A6 /* ScreenSaver.framework */; }; | ||
3A40068318B53129005F43A6 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A40068218B53129005F43A6 /* WebKit.framework */; }; | ||
3A40068518B53226005F43A6 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = 3A40068418B53226005F43A6 /* index.html */; }; | ||
77996CD91C94B825006B0FF7 /* GridClock.m in Sources */ = {isa = PBXBuildFile; fileRef = 77996CD81C94B825006B0FF7 /* GridClock.m */; }; | ||
/* End PBXBuildFile section */ | ||
|
||
/* Begin PBXFileReference section */ | ||
3A40066818B53112005F43A6 /* Grid Clock.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Grid Clock.saver"; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
3A40066D18B53113005F43A6 /* ScreenSaver.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScreenSaver.framework; path = System/Library/Frameworks/ScreenSaver.framework; sourceTree = SDKROOT; }; | ||
3A40068218B53129005F43A6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; | ||
3A40068418B53226005F43A6 /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = SOURCE_ROOT; }; | ||
3A95A94B18EA12D30036779C /* GridClock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridClock.h; sourceTree = SOURCE_ROOT; }; | ||
77996CD61C94B804006B0FF7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; | ||
77996CD81C94B825006B0FF7 /* GridClock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GridClock.m; sourceTree = SOURCE_ROOT; }; | ||
/* End PBXFileReference section */ | ||
|
||
/* Begin PBXFrameworksBuildPhase section */ | ||
3A40066318B53112005F43A6 /* Frameworks */ = { | ||
isa = PBXFrameworksBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
3A40068318B53129005F43A6 /* WebKit.framework in Frameworks */, | ||
3A40066E18B53113005F43A6 /* ScreenSaver.framework in Frameworks */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXFrameworksBuildPhase section */ | ||
|
||
/* Begin PBXGroup section */ | ||
3A40065D18B53112005F43A6 = { | ||
isa = PBXGroup; | ||
children = ( | ||
3A40067318B53113005F43A6 /* Source */, | ||
3A40066A18B53112005F43A6 /* Frameworks */, | ||
3A40066918B53112005F43A6 /* Products */, | ||
); | ||
sourceTree = "<group>"; | ||
}; | ||
3A40066918B53112005F43A6 /* Products */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
3A40066818B53112005F43A6 /* Grid Clock.saver */, | ||
); | ||
name = Products; | ||
sourceTree = "<group>"; | ||
}; | ||
3A40066A18B53112005F43A6 /* Frameworks */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
3A40068218B53129005F43A6 /* WebKit.framework */, | ||
3A40066D18B53113005F43A6 /* ScreenSaver.framework */, | ||
); | ||
name = Frameworks; | ||
sourceTree = "<group>"; | ||
}; | ||
3A40067318B53113005F43A6 /* Source */ = { | ||
isa = PBXGroup; | ||
children = ( | ||
3A95A94B18EA12D30036779C /* GridClock.h */, | ||
77996CD81C94B825006B0FF7 /* GridClock.m */, | ||
3A40068418B53226005F43A6 /* index.html */, | ||
77996CD61C94B804006B0FF7 /* Info.plist */, | ||
); | ||
name = Source; | ||
sourceTree = "<group>"; | ||
}; | ||
/* End PBXGroup section */ | ||
|
||
/* Begin PBXHeadersBuildPhase section */ | ||
3A40066418B53112005F43A6 /* Headers */ = { | ||
isa = PBXHeadersBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXHeadersBuildPhase section */ | ||
|
||
/* Begin PBXNativeTarget section */ | ||
3A40066718B53112005F43A6 /* Grid Clock */ = { | ||
isa = PBXNativeTarget; | ||
buildConfigurationList = 3A40067F18B53113005F43A6 /* Build configuration list for PBXNativeTarget "Grid Clock" */; | ||
buildPhases = ( | ||
3A40066218B53112005F43A6 /* Sources */, | ||
3A40066318B53112005F43A6 /* Frameworks */, | ||
3A40066418B53112005F43A6 /* Headers */, | ||
3A40066518B53112005F43A6 /* Resources */, | ||
3A40066618B53112005F43A6 /* Rez */, | ||
); | ||
buildRules = ( | ||
); | ||
dependencies = ( | ||
); | ||
name = "Grid Clock"; | ||
productReference = 3A40066818B53112005F43A6 /* Grid Clock.saver */; | ||
productType = "com.apple.product-type.bundle"; | ||
}; | ||
/* End PBXNativeTarget section */ | ||
|
||
/* Begin PBXProject section */ | ||
3A40065E18B53112005F43A6 /* Project object */ = { | ||
isa = PBXProject; | ||
attributes = { | ||
LastUpgradeCheck = 0810; | ||
ORGANIZATIONNAME = chrstphrknwtn; | ||
TargetAttributes = { | ||
3A40066718B53112005F43A6 = { | ||
ProvisioningStyle = Automatic; | ||
}; | ||
}; | ||
}; | ||
buildConfigurationList = 3A40066118B53112005F43A6 /* Build configuration list for PBXProject "Grid Clock" */; | ||
compatibilityVersion = "Xcode 8.0"; | ||
developmentRegion = English; | ||
hasScannedForEncodings = 0; | ||
knownRegions = ( | ||
en, | ||
); | ||
mainGroup = 3A40065D18B53112005F43A6; | ||
productRefGroup = 3A40066918B53112005F43A6 /* Products */; | ||
projectDirPath = ""; | ||
projectRoot = ""; | ||
targets = ( | ||
3A40066718B53112005F43A6 /* Grid Clock */, | ||
); | ||
}; | ||
/* End PBXProject section */ | ||
|
||
/* Begin PBXResourcesBuildPhase section */ | ||
3A40066518B53112005F43A6 /* Resources */ = { | ||
isa = PBXResourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
3A40068518B53226005F43A6 /* index.html in Resources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXResourcesBuildPhase section */ | ||
|
||
/* Begin PBXRezBuildPhase section */ | ||
3A40066618B53112005F43A6 /* Rez */ = { | ||
isa = PBXRezBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXRezBuildPhase section */ | ||
|
||
/* Begin PBXSourcesBuildPhase section */ | ||
3A40066218B53112005F43A6 /* Sources */ = { | ||
isa = PBXSourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
77996CD91C94B825006B0FF7 /* GridClock.m in Sources */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
/* End PBXSourcesBuildPhase section */ | ||
|
||
/* Begin XCBuildConfiguration section */ | ||
3A40067D18B53113005F43A6 /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
CLANG_CXX_LIBRARY = "libc++"; | ||
CLANG_ENABLE_OBJC_ARC = YES; | ||
CLANG_WARN_BOOL_CONVERSION = YES; | ||
CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
CLANG_WARN_EMPTY_BODY = YES; | ||
CLANG_WARN_ENUM_CONVERSION = YES; | ||
CLANG_WARN_INFINITE_RECURSION = YES; | ||
CLANG_WARN_INT_CONVERSION = YES; | ||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
CLANG_WARN_UNREACHABLE_CODE = YES; | ||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
COPY_PHASE_STRIP = NO; | ||
ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
ENABLE_TESTABILITY = YES; | ||
GCC_C_LANGUAGE_STANDARD = gnu99; | ||
GCC_DYNAMIC_NO_PIC = NO; | ||
GCC_ENABLE_OBJC_EXCEPTIONS = YES; | ||
GCC_NO_COMMON_BLOCKS = YES; | ||
GCC_OPTIMIZATION_LEVEL = 0; | ||
GCC_PREPROCESSOR_DEFINITIONS = ( | ||
"DEBUG=1", | ||
"$(inherited)", | ||
); | ||
GCC_SYMBOLS_PRIVATE_EXTERN = NO; | ||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
GCC_WARN_UNINITIALIZED_AUTOS = YES; | ||
GCC_WARN_UNUSED_FUNCTION = YES; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
ONLY_ACTIVE_ARCH = YES; | ||
SDKROOT = macosx; | ||
}; | ||
name = Debug; | ||
}; | ||
3A40067E18B53113005F43A6 /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | ||
CLANG_CXX_LIBRARY = "libc++"; | ||
CLANG_ENABLE_OBJC_ARC = YES; | ||
CLANG_WARN_BOOL_CONVERSION = YES; | ||
CLANG_WARN_CONSTANT_CONVERSION = YES; | ||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | ||
CLANG_WARN_EMPTY_BODY = YES; | ||
CLANG_WARN_ENUM_CONVERSION = YES; | ||
CLANG_WARN_INFINITE_RECURSION = YES; | ||
CLANG_WARN_INT_CONVERSION = YES; | ||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | ||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | ||
CLANG_WARN_UNREACHABLE_CODE = YES; | ||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | ||
COPY_PHASE_STRIP = YES; | ||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
ENABLE_NS_ASSERTIONS = NO; | ||
ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
GCC_C_LANGUAGE_STANDARD = gnu99; | ||
GCC_ENABLE_OBJC_EXCEPTIONS = YES; | ||
GCC_NO_COMMON_BLOCKS = YES; | ||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | ||
GCC_WARN_UNDECLARED_SELECTOR = YES; | ||
GCC_WARN_UNINITIALIZED_AUTOS = YES; | ||
GCC_WARN_UNUSED_FUNCTION = YES; | ||
GCC_WARN_UNUSED_VARIABLE = YES; | ||
MACOSX_DEPLOYMENT_TARGET = 10.11; | ||
SDKROOT = macosx; | ||
}; | ||
name = Release; | ||
}; | ||
3A40068018B53113005F43A6 /* Debug */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
CODE_SIGN_IDENTITY = "Mac Developer"; | ||
COMBINE_HIDPI_IMAGES = YES; | ||
DEVELOPMENT_TEAM = 4699R6ELY7; | ||
INFOPLIST_FILE = Info.plist; | ||
INSTALL_PATH = "$(HOME)/Library/Screen Savers"; | ||
PRODUCT_BUNDLE_IDENTIFIER = "com.chrstphrknwtn.${PRODUCT_NAME:rfc1034identifier}"; | ||
PRODUCT_NAME = "Grid Clock"; | ||
WRAPPER_EXTENSION = saver; | ||
}; | ||
name = Debug; | ||
}; | ||
3A40068118B53113005F43A6 /* Release */ = { | ||
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
CODE_SIGN_IDENTITY = "Mac Developer"; | ||
COMBINE_HIDPI_IMAGES = YES; | ||
DEVELOPMENT_TEAM = 4699R6ELY7; | ||
INFOPLIST_FILE = Info.plist; | ||
INSTALL_PATH = "$(HOME)/Library/Screen Savers"; | ||
PRODUCT_BUNDLE_IDENTIFIER = "com.chrstphrknwtn.${PRODUCT_NAME:rfc1034identifier}"; | ||
PRODUCT_NAME = "Grid Clock"; | ||
WRAPPER_EXTENSION = saver; | ||
}; | ||
name = Release; | ||
}; | ||
/* End XCBuildConfiguration section */ | ||
|
||
/* Begin XCConfigurationList section */ | ||
3A40066118B53112005F43A6 /* Build configuration list for PBXProject "Grid Clock" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
3A40067D18B53113005F43A6 /* Debug */, | ||
3A40067E18B53113005F43A6 /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
3A40067F18B53113005F43A6 /* Build configuration list for PBXNativeTarget "Grid Clock" */ = { | ||
isa = XCConfigurationList; | ||
buildConfigurations = ( | ||
3A40068018B53113005F43A6 /* Debug */, | ||
3A40068118B53113005F43A6 /* Release */, | ||
); | ||
defaultConfigurationIsVisible = 0; | ||
defaultConfigurationName = Release; | ||
}; | ||
/* End XCConfigurationList section */ | ||
}; | ||
rootObject = 3A40065E18B53112005F43A6 /* Project object */; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#import <ScreenSaver/ScreenSaver.h> | ||
|
||
@interface WSView : ScreenSaverView | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#import "GridClock.h" | ||
#import <WebKit/WebKit.h> | ||
|
||
@implementation WSView | ||
|
||
- (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview { | ||
if (!(self = [super initWithFrame:frame isPreview:isPreview])) return nil; | ||
|
||
NSURL* indexHTMLDocumentURL = [NSURL URLWithString:[[[NSURL fileURLWithPath:[[NSBundle bundleForClass:self.class].resourcePath stringByAppendingString:@"/index.html"] isDirectory:NO] description] stringByAppendingFormat:@"?screensaver=1%@", self.isPreview ? @"&is_preview=1" : @""]]; | ||
|
||
WebView* webView = [[WebView alloc] initWithFrame:NSMakeRect(0, 0, frame.size.width, frame.size.height)]; | ||
webView.drawsBackground = NO; // Avoids a "white flash" just before the index.html file has loaded | ||
[webView.mainFrame loadRequest:[NSURLRequest requestWithURL:indexHTMLDocumentURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0]]; | ||
[self addSubview:webView]; | ||
|
||
return self; | ||
} | ||
|
||
#pragma mark - ScreenSaverView | ||
|
||
- (void)animateOneFrame { [self stopAnimation]; } // We don't need animation callbacks | ||
- (BOOL)hasConfigureSheet { return NO; } // Nothing to configure | ||
|
||
#pragma mark - WebFrameLoadDelegate | ||
|
||
- (void)webView:(WebView *)sender didFailLoadWithError:(NSError *)error forFrame:(WebFrame *)frame { | ||
NSLog(@"%@ error=%@", NSStringFromSelector(_cmd), error); | ||
} | ||
|
||
// A bunch of methods that captures all the input events to prevent so screensaver exits normally. | ||
#pragma mark Focus Overrides | ||
|
||
- (NSView *)hitTest:(NSPoint)aPoint {return self;} | ||
- (void)keyDown:(NSEvent *)theEvent {return;} | ||
- (void)keyUp:(NSEvent *)theEvent {return;} | ||
- (void)mouseDown:(NSEvent *)theEvent {return;} | ||
- (void)mouseUp:(NSEvent *)theEvent {return;} | ||
- (void)mouseDragged:(NSEvent *)theEvent {return;} | ||
- (void)mouseEntered:(NSEvent *)theEvent {return;} | ||
- (void)mouseExited:(NSEvent *)theEvent {return;} | ||
- (BOOL)acceptsFirstResponder {return YES;} | ||
- (BOOL)resignFirstResponder {return NO;} | ||
|
||
@end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.