├── prefs.png
├── targets.png
├── demo-paskysaver.gif
├── Pasky-Saver.saver.zip
├── PaskySaver.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── PaskySaverApp
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
└── Base.lproj
│ └── MainMenu.xib
├── APScrenSaver
├── Info.plist
└── APScreenSaverView.swift
├── .gitignore
├── LICENSE
└── README.md
/prefs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elpsk/PaskySaver/HEAD/prefs.png
--------------------------------------------------------------------------------
/targets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elpsk/PaskySaver/HEAD/targets.png
--------------------------------------------------------------------------------
/demo-paskysaver.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elpsk/PaskySaver/HEAD/demo-paskysaver.gif
--------------------------------------------------------------------------------
/Pasky-Saver.saver.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/elpsk/PaskySaver/HEAD/Pasky-Saver.saver.zip
--------------------------------------------------------------------------------
/PaskySaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PaskySaverApp/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // PaskySaver
4 | //
5 | // Created by Alberto Pasca on 31/03/16.
6 | // Copyright © 2016 albertopasca.it. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 |
12 | @NSApplicationMain
13 | class AppDelegate: NSObject, NSApplicationDelegate {
14 |
15 | @IBOutlet weak var window: NSWindow!
16 | lazy var screenSaverView = APScreenSaverView (frame: NSZeroRect, isPreview: false)
17 |
18 | func applicationDidFinishLaunching(_ aNotification: Notification) {
19 | if let screenSaverView = screenSaverView {
20 | screenSaverView.frame = window.contentView!.bounds;
21 | window.contentView!.addSubview(screenSaverView);
22 | }
23 | }
24 |
25 | func applicationWillTerminate(_ aNotification: Notification) {
26 |
27 | }
28 |
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/APScrenSaver/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 | Pasky-Saver
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | NSHumanReadableCopyright
24 | Copyright © 2016 albertopasca.it. All rights reserved.
25 | NSPrincipalClass
26 | APScreenSaverView
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 |
20 | ## Other
21 | *.xccheckout
22 | *.moved-aside
23 | *.xcuserstate
24 | *.xcscmblueprint
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 alberto
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/PaskySaverApp/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 | }
--------------------------------------------------------------------------------
/PaskySaverApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2016 albertopasca.it. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Pasky-Saver
2 | Mac OSx Screen Saver, created using the source file of itself! :)
3 |
4 |
5 | 
6 |
7 |
8 | ###What are the letters?
9 | Letters are the *source code* of the Screen Saver project (`APScreenSaverView.swift`).
10 | Every refresh a letter is extracted randomly from file.
11 |
12 | Some special characters are colored differently:
13 |
14 | "}", "{", "[", "]", "(", ")":
15 | NSColor.greenColor()
16 |
17 | ".", ":", ";":
18 | NSColor.yellowColor()
19 |
20 | "#", "|", "!", "=":
21 | NSColor.orangeColor()
22 |
23 | "/", "+", "-", "*":
24 | NSColor.redColor()
25 |
26 | ##BUILD / RUN / DEBUG
27 | This project has two targets:
28 | 
29 |
30 | To run screensaver on your Mac, you must install it.
31 |
32 | - Select from target **PaskySaver** and click *build*, next open **Products** folder, select **Pasky-Saver.saver**, right-click and select "**Show in Finder**". Double click to install in osx.
33 |
34 | - To debug instead, select from target **PaskySaverApp** and click *Build And Run*.
35 |
36 | 
37 |
38 | ##TOO COMPLICATE?
39 | Download from here an executable: [Pasky-Saver.saver.zip](https://github.com/elpsk/PaskySaver/raw/master/Pasky-Saver.saver.zip)
40 |
41 | ##TODO
42 | ####1. A massive memory optimization.
43 |
44 | >This example is created adding an NSTextField every time on screen and removing the oldest one.
45 | In a perfect world, this should be done in OpenGL or drawing in drawRect refresh cycle.
46 |
47 | ####2. Preview view
48 |
49 | > The view to show in the **Preferences->Screen Saver** as *Preview*.
50 |
51 | ####3. Settings view
52 |
53 | > The setting view
54 |
55 | ####4. Icons
56 |
57 |
58 | If you want to improve, you're welcome.
59 |
60 |
61 | ##KNOWN BUGS
62 | Nothing interesting...
63 |
64 |
65 | ##License:
66 |
67 | > The MIT License (MIT)
68 |
69 | > Copyright (c) 2016 alberto
70 |
71 | > Permission is hereby granted, free of charge, to any person obtaining a copy
72 | of this software and associated documentation files (the "Software"), to deal
73 | in the Software without restriction, including without limitation the rights
74 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
75 | copies of the Software, and to permit persons to whom the Software is
76 | furnished to do so, subject to the following conditions:
77 |
78 | > The above copyright notice and this permission notice shall be included in all
79 | copies or substantial portions of the Software.
80 |
81 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
82 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
83 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
84 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
85 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
86 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
87 | SOFTWARE.
88 |
--------------------------------------------------------------------------------
/APScrenSaver/APScreenSaverView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // APScreenSaverView.swift
3 | // PaskySaver
4 | //
5 | // Created by Alberto Pasca on 31/03/16.
6 | // Copyright © 2016 albertopasca.it. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 | import ScreenSaver
11 |
12 |
13 | // MARK: - NSView extension to set background color.
14 | extension NSView {
15 | func backgroundColor(_ color: NSColor) {
16 | wantsLayer = true
17 | layer?.backgroundColor = color.cgColor
18 | }
19 | }
20 |
21 |
22 | class APScreenSaverView: ScreenSaverView {
23 |
24 | // config
25 | var screenW : UInt32 = 0
26 |
27 | // constants
28 | let kFilePath = "/Users/pasky/Dropbox/Work/Personal/PaskySaver/APScrenSaver/APScreenSaverView.swift"
29 | let kRefreshInterval = 0.000005
30 | let kMaxCharsOnScreen = 5000
31 |
32 | // counters
33 | var drawed = 0
34 | var idx = 1
35 |
36 | // characters
37 | var words : [String]?
38 |
39 | /**
40 | Return a random number (4):
41 |
42 | - parameter pMax: Max value
43 | - parameter pMin: Min Value
44 |
45 | - returns: A random number
46 | */
47 | func randomNumber(_ pMax:UInt32, pMin:UInt32) -> Int {
48 | return Int(arc4random_uniform(pMax) + pMin)
49 | }
50 |
51 | override init?(frame: NSRect, isPreview: Bool) {
52 | super.init(frame: frame, isPreview: isPreview)
53 |
54 | screenW = UInt32(NSScreen.main()!.frame.width)
55 | self.backgroundColor(NSColor.black)
56 |
57 | // load a text file from system
58 | let location = NSString(string: kFilePath)
59 |
60 | // read as string
61 | var fileContent : String = try! String(contentsOfFile: location as String, encoding: String.Encoding.utf8)
62 |
63 | // put all characters in array
64 | words = fileContent.characters.map { String($0) } // powa of Swift 3!
65 |
66 | fileContent = ""
67 |
68 | // screen saver animation interval
69 | self.animationTimeInterval = kRefreshInterval
70 |
71 | // uncomment the line below if you want to debug/simulate in app:
72 | //Timer.scheduledTimer(timeInterval: kRefreshInterval, target: self, selector: #selector(APScreenSaverView.drawCharacters), userInfo: nil, repeats: true)
73 | }
74 |
75 | /**
76 | Draw a character on screen randomly
77 | */
78 | func drawCharacters() {
79 | DispatchQueue.global(qos: .background).async {
80 |
81 | let character = self.gimmeAChar()
82 | let letter = self.makeTextField( character )
83 |
84 | DispatchQueue.main.async {
85 |
86 | // i want on screen maximum 5000 letters. If > delete the oldest one.
87 | if self.drawed >= self.kMaxCharsOnScreen {
88 | self.subviews.remove(at: 0)
89 | }
90 |
91 | self.addSubview(letter)
92 | self.drawed += 1
93 |
94 | // refresh only the letter rect
95 | self.setNeedsDisplay(letter.frame)
96 | }
97 | }
98 | }
99 |
100 | /**
101 | Random value from array
102 |
103 | - returns: A Character
104 | */
105 | func gimmeAChar() -> NSString {
106 | let tot = self.words!.count
107 | return self.words![self.randomNumber(UInt32(tot-1), pMin: 0)] as NSString
108 | }
109 |
110 | /**
111 | Create an NSTextField
112 |
113 | - parameter character: The char to draw
114 |
115 | - returns: NSTextfield
116 | */
117 | func makeTextField(_ character : NSString) -> NSTextField {
118 |
119 | let letter : NSTextField = NSTextField(
120 | frame: NSMakeRect(
121 | CGFloat(self.randomNumber(self.screenW, pMin: 0)),
122 | CGFloat(self.randomNumber(self.screenW, pMin: 0)),
123 | 30,
124 | 35))
125 |
126 | // config
127 | letter.isEditable = false
128 | letter.isBordered = false
129 | letter.alignment = .center
130 | letter.usesSingleLineMode = false
131 | letter.backgroundColor = NSColor.clear
132 | letter.font = NSFont(name: "Raleway-Medium", size: 18)
133 | letter.stringValue = character as String
134 |
135 | // colors
136 | switch character {
137 | case "}", "{", "[", "]", "(", ")":
138 | letter.textColor = NSColor.green
139 | break
140 | case ".", ":", ";":
141 | letter.textColor = NSColor.yellow
142 | break
143 | case "#", "|", "!", "=":
144 | letter.textColor = NSColor.orange
145 | break
146 | case "/", "+", "-", "*":
147 | letter.textColor = NSColor.red
148 | break
149 | default:
150 | letter.textColor = NSColor.darkGray
151 | }
152 |
153 | return letter
154 | }
155 |
156 |
157 | // +------------------------------------------------------------------------+
158 |
159 |
160 | required init?(coder: NSCoder) {
161 | super.init(coder: coder)
162 | }
163 |
164 | override func startAnimation() {
165 | super.startAnimation()
166 | }
167 |
168 | override func stopAnimation() {
169 | super.stopAnimation()
170 | }
171 |
172 | override func draw(_ rect: NSRect) {
173 | super.draw(rect)
174 | }
175 |
176 | override func animateOneFrame() {
177 | drawCharacters()
178 | }
179 |
180 | override func hasConfigureSheet() -> Bool {
181 | return false
182 | }
183 |
184 | override func configureSheet() -> NSWindow? {
185 | return nil
186 | }
187 |
188 | override var wantsDefaultClipping: Bool {
189 | return false
190 | }
191 |
192 | }
193 |
194 | extension DispatchQueue {
195 |
196 | static func background(delay: Double = 0.0, background: (()->Void)? = nil, completion: (() -> Void)? = nil) {
197 | DispatchQueue.global(qos: .background).async {
198 | background?()
199 | if let completion = completion {
200 | DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
201 | completion()
202 | })
203 | }
204 | }
205 | }
206 |
207 | }
208 |
209 |
--------------------------------------------------------------------------------
/PaskySaver.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 7DE4302B1B51CA190073DB62 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE4302A1B51CA190073DB62 /* AppDelegate.swift */; };
11 | 7DE4302D1B51CA190073DB62 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DE4302C1B51CA190073DB62 /* Assets.xcassets */; };
12 | 7DE430301B51CA190073DB62 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DE4302E1B51CA190073DB62 /* MainMenu.xib */; };
13 | 7DE430351B51CD320073DB62 /* APScreenSaverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DF79BA81B51A43300BF9B54 /* APScreenSaverView.swift */; };
14 | 7DF79BA91B51A43300BF9B54 /* APScreenSaverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DF79BA81B51A43300BF9B54 /* APScreenSaverView.swift */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXFileReference section */
18 | 7DE430281B51CA190073DB62 /* PaskySaverApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PaskySaverApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
19 | 7DE4302A1B51CA190073DB62 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
20 | 7DE4302C1B51CA190073DB62 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
21 | 7DE4302F1B51CA190073DB62 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
22 | 7DE430311B51CA190073DB62 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
23 | 7DF79B9A1B5157C000BF9B54 /* Pasky-Saver.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Pasky-Saver.saver"; sourceTree = BUILT_PRODUCTS_DIR; };
24 | 7DF79BA11B5157C000BF9B54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
25 | 7DF79BA81B51A43300BF9B54 /* APScreenSaverView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APScreenSaverView.swift; sourceTree = ""; };
26 | /* End PBXFileReference section */
27 |
28 | /* Begin PBXFrameworksBuildPhase section */
29 | 7DE430251B51CA190073DB62 /* Frameworks */ = {
30 | isa = PBXFrameworksBuildPhase;
31 | buildActionMask = 2147483647;
32 | files = (
33 | );
34 | runOnlyForDeploymentPostprocessing = 0;
35 | };
36 | 7DF79B961B5157C000BF9B54 /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | );
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXFrameworksBuildPhase section */
44 |
45 | /* Begin PBXGroup section */
46 | 7DE430291B51CA190073DB62 /* PaskySaverApp */ = {
47 | isa = PBXGroup;
48 | children = (
49 | 7DE4302A1B51CA190073DB62 /* AppDelegate.swift */,
50 | 7DE4302C1B51CA190073DB62 /* Assets.xcassets */,
51 | 7DE4302E1B51CA190073DB62 /* MainMenu.xib */,
52 | 7DE430311B51CA190073DB62 /* Info.plist */,
53 | );
54 | path = PaskySaverApp;
55 | sourceTree = "";
56 | };
57 | 7DF79B901B5157C000BF9B54 = {
58 | isa = PBXGroup;
59 | children = (
60 | 7DF79B9C1B5157C000BF9B54 /* PaskySaver */,
61 | 7DE430291B51CA190073DB62 /* PaskySaverApp */,
62 | 7DF79B9B1B5157C000BF9B54 /* Products */,
63 | );
64 | sourceTree = "";
65 | };
66 | 7DF79B9B1B5157C000BF9B54 /* Products */ = {
67 | isa = PBXGroup;
68 | children = (
69 | 7DF79B9A1B5157C000BF9B54 /* Pasky-Saver.saver */,
70 | 7DE430281B51CA190073DB62 /* PaskySaverApp.app */,
71 | );
72 | name = Products;
73 | sourceTree = "";
74 | };
75 | 7DF79B9C1B5157C000BF9B54 /* PaskySaver */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 7DF79BA11B5157C000BF9B54 /* Info.plist */,
79 | 7DF79BA81B51A43300BF9B54 /* APScreenSaverView.swift */,
80 | );
81 | name = PaskySaver;
82 | path = APScrenSaver;
83 | sourceTree = "";
84 | };
85 | /* End PBXGroup section */
86 |
87 | /* Begin PBXHeadersBuildPhase section */
88 | 7DF79B971B5157C000BF9B54 /* Headers */ = {
89 | isa = PBXHeadersBuildPhase;
90 | buildActionMask = 2147483647;
91 | files = (
92 | );
93 | runOnlyForDeploymentPostprocessing = 0;
94 | };
95 | /* End PBXHeadersBuildPhase section */
96 |
97 | /* Begin PBXNativeTarget section */
98 | 7DE430271B51CA190073DB62 /* PaskySaverApp */ = {
99 | isa = PBXNativeTarget;
100 | buildConfigurationList = 7DE430341B51CA190073DB62 /* Build configuration list for PBXNativeTarget "PaskySaverApp" */;
101 | buildPhases = (
102 | 7DE430241B51CA190073DB62 /* Sources */,
103 | 7DE430251B51CA190073DB62 /* Frameworks */,
104 | 7DE430261B51CA190073DB62 /* Resources */,
105 | );
106 | buildRules = (
107 | );
108 | dependencies = (
109 | );
110 | name = PaskySaverApp;
111 | productName = ImageStreamApp;
112 | productReference = 7DE430281B51CA190073DB62 /* PaskySaverApp.app */;
113 | productType = "com.apple.product-type.application";
114 | };
115 | 7DF79B991B5157C000BF9B54 /* PaskySaver */ = {
116 | isa = PBXNativeTarget;
117 | buildConfigurationList = 7DF79BA41B5157C000BF9B54 /* Build configuration list for PBXNativeTarget "PaskySaver" */;
118 | buildPhases = (
119 | 7DF79B951B5157C000BF9B54 /* Sources */,
120 | 7DF79B961B5157C000BF9B54 /* Frameworks */,
121 | 7DF79B971B5157C000BF9B54 /* Headers */,
122 | 7DF79B981B5157C000BF9B54 /* Resources */,
123 | );
124 | buildRules = (
125 | );
126 | dependencies = (
127 | );
128 | name = PaskySaver;
129 | productName = ImageStream;
130 | productReference = 7DF79B9A1B5157C000BF9B54 /* Pasky-Saver.saver */;
131 | productType = "com.apple.product-type.bundle";
132 | };
133 | /* End PBXNativeTarget section */
134 |
135 | /* Begin PBXProject section */
136 | 7DF79B911B5157C000BF9B54 /* Project object */ = {
137 | isa = PBXProject;
138 | attributes = {
139 | CLASSPREFIX = AP;
140 | LastSwiftUpdateCheck = 0700;
141 | LastUpgradeCheck = 0700;
142 | ORGANIZATIONNAME = albertopasca.it;
143 | TargetAttributes = {
144 | 7DE430271B51CA190073DB62 = {
145 | CreatedOnToolsVersion = 7.0;
146 | LastSwiftMigration = 0820;
147 | };
148 | 7DF79B991B5157C000BF9B54 = {
149 | CreatedOnToolsVersion = 7.0;
150 | LastSwiftMigration = 0800;
151 | };
152 | };
153 | };
154 | buildConfigurationList = 7DF79B941B5157C000BF9B54 /* Build configuration list for PBXProject "PaskySaver" */;
155 | compatibilityVersion = "Xcode 3.2";
156 | developmentRegion = English;
157 | hasScannedForEncodings = 0;
158 | knownRegions = (
159 | en,
160 | Base,
161 | );
162 | mainGroup = 7DF79B901B5157C000BF9B54;
163 | productRefGroup = 7DF79B9B1B5157C000BF9B54 /* Products */;
164 | projectDirPath = "";
165 | projectRoot = "";
166 | targets = (
167 | 7DF79B991B5157C000BF9B54 /* PaskySaver */,
168 | 7DE430271B51CA190073DB62 /* PaskySaverApp */,
169 | );
170 | };
171 | /* End PBXProject section */
172 |
173 | /* Begin PBXResourcesBuildPhase section */
174 | 7DE430261B51CA190073DB62 /* Resources */ = {
175 | isa = PBXResourcesBuildPhase;
176 | buildActionMask = 2147483647;
177 | files = (
178 | 7DE4302D1B51CA190073DB62 /* Assets.xcassets in Resources */,
179 | 7DE430301B51CA190073DB62 /* MainMenu.xib in Resources */,
180 | );
181 | runOnlyForDeploymentPostprocessing = 0;
182 | };
183 | 7DF79B981B5157C000BF9B54 /* Resources */ = {
184 | isa = PBXResourcesBuildPhase;
185 | buildActionMask = 2147483647;
186 | files = (
187 | );
188 | runOnlyForDeploymentPostprocessing = 0;
189 | };
190 | /* End PBXResourcesBuildPhase section */
191 |
192 | /* Begin PBXSourcesBuildPhase section */
193 | 7DE430241B51CA190073DB62 /* Sources */ = {
194 | isa = PBXSourcesBuildPhase;
195 | buildActionMask = 2147483647;
196 | files = (
197 | 7DE430351B51CD320073DB62 /* APScreenSaverView.swift in Sources */,
198 | 7DE4302B1B51CA190073DB62 /* AppDelegate.swift in Sources */,
199 | );
200 | runOnlyForDeploymentPostprocessing = 0;
201 | };
202 | 7DF79B951B5157C000BF9B54 /* Sources */ = {
203 | isa = PBXSourcesBuildPhase;
204 | buildActionMask = 2147483647;
205 | files = (
206 | 7DF79BA91B51A43300BF9B54 /* APScreenSaverView.swift in Sources */,
207 | );
208 | runOnlyForDeploymentPostprocessing = 0;
209 | };
210 | /* End PBXSourcesBuildPhase section */
211 |
212 | /* Begin PBXVariantGroup section */
213 | 7DE4302E1B51CA190073DB62 /* MainMenu.xib */ = {
214 | isa = PBXVariantGroup;
215 | children = (
216 | 7DE4302F1B51CA190073DB62 /* Base */,
217 | );
218 | name = MainMenu.xib;
219 | sourceTree = "";
220 | };
221 | /* End PBXVariantGroup section */
222 |
223 | /* Begin XCBuildConfiguration section */
224 | 7DE430321B51CA190073DB62 /* Debug */ = {
225 | isa = XCBuildConfiguration;
226 | buildSettings = {
227 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
228 | CODE_SIGN_IDENTITY = "-";
229 | COMBINE_HIDPI_IMAGES = YES;
230 | INFOPLIST_FILE = PaskySaverApp/Info.plist;
231 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
232 | PRODUCT_BUNDLE_IDENTIFIER = "it.albertopasca.paskysaver-debug";
233 | PRODUCT_NAME = PaskySaverApp;
234 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
235 | SWIFT_VERSION = 3.0;
236 | };
237 | name = Debug;
238 | };
239 | 7DE430331B51CA190073DB62 /* Release */ = {
240 | isa = XCBuildConfiguration;
241 | buildSettings = {
242 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
243 | CODE_SIGN_IDENTITY = "-";
244 | COMBINE_HIDPI_IMAGES = YES;
245 | INFOPLIST_FILE = PaskySaverApp/Info.plist;
246 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
247 | PRODUCT_BUNDLE_IDENTIFIER = "it.albertopasca.paskysaver-debug";
248 | PRODUCT_NAME = PaskySaverApp;
249 | SWIFT_VERSION = 3.0;
250 | };
251 | name = Release;
252 | };
253 | 7DF79BA21B5157C000BF9B54 /* Debug */ = {
254 | isa = XCBuildConfiguration;
255 | buildSettings = {
256 | ALWAYS_SEARCH_USER_PATHS = NO;
257 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
258 | CLANG_CXX_LIBRARY = "libc++";
259 | CLANG_ENABLE_MODULES = YES;
260 | CLANG_ENABLE_OBJC_ARC = YES;
261 | CLANG_WARN_BOOL_CONVERSION = YES;
262 | CLANG_WARN_CONSTANT_CONVERSION = YES;
263 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
264 | CLANG_WARN_EMPTY_BODY = YES;
265 | CLANG_WARN_ENUM_CONVERSION = YES;
266 | CLANG_WARN_INT_CONVERSION = YES;
267 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
268 | CLANG_WARN_UNREACHABLE_CODE = YES;
269 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
270 | COPY_PHASE_STRIP = NO;
271 | DEBUG_INFORMATION_FORMAT = dwarf;
272 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
273 | ENABLE_STRICT_OBJC_MSGSEND = YES;
274 | ENABLE_TESTABILITY = YES;
275 | GCC_C_LANGUAGE_STANDARD = gnu99;
276 | GCC_DYNAMIC_NO_PIC = NO;
277 | GCC_NO_COMMON_BLOCKS = YES;
278 | GCC_OPTIMIZATION_LEVEL = 0;
279 | GCC_PREPROCESSOR_DEFINITIONS = (
280 | "DEBUG=1",
281 | "$(inherited)",
282 | );
283 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
284 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
285 | GCC_WARN_UNDECLARED_SELECTOR = YES;
286 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
287 | GCC_WARN_UNUSED_FUNCTION = YES;
288 | GCC_WARN_UNUSED_VARIABLE = YES;
289 | MACOSX_DEPLOYMENT_TARGET = 10.11;
290 | MTL_ENABLE_DEBUG_INFO = YES;
291 | ONLY_ACTIVE_ARCH = YES;
292 | SDKROOT = macosx;
293 | };
294 | name = Debug;
295 | };
296 | 7DF79BA31B5157C000BF9B54 /* Release */ = {
297 | isa = XCBuildConfiguration;
298 | buildSettings = {
299 | ALWAYS_SEARCH_USER_PATHS = NO;
300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
301 | CLANG_CXX_LIBRARY = "libc++";
302 | CLANG_ENABLE_MODULES = YES;
303 | CLANG_ENABLE_OBJC_ARC = YES;
304 | CLANG_WARN_BOOL_CONVERSION = YES;
305 | CLANG_WARN_CONSTANT_CONVERSION = YES;
306 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
307 | CLANG_WARN_EMPTY_BODY = YES;
308 | CLANG_WARN_ENUM_CONVERSION = YES;
309 | CLANG_WARN_INT_CONVERSION = YES;
310 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
311 | CLANG_WARN_UNREACHABLE_CODE = YES;
312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
313 | COPY_PHASE_STRIP = NO;
314 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
315 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
316 | ENABLE_NS_ASSERTIONS = NO;
317 | ENABLE_STRICT_OBJC_MSGSEND = YES;
318 | GCC_C_LANGUAGE_STANDARD = gnu99;
319 | GCC_NO_COMMON_BLOCKS = YES;
320 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
321 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
322 | GCC_WARN_UNDECLARED_SELECTOR = YES;
323 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
324 | GCC_WARN_UNUSED_FUNCTION = YES;
325 | GCC_WARN_UNUSED_VARIABLE = YES;
326 | MACOSX_DEPLOYMENT_TARGET = 10.11;
327 | MTL_ENABLE_DEBUG_INFO = NO;
328 | SDKROOT = macosx;
329 | };
330 | name = Release;
331 | };
332 | 7DF79BA51B5157C000BF9B54 /* Debug */ = {
333 | isa = XCBuildConfiguration;
334 | buildSettings = {
335 | CLANG_ENABLE_MODULES = YES;
336 | COMBINE_HIDPI_IMAGES = YES;
337 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
338 | INFOPLIST_FILE = APScrenSaver/Info.plist;
339 | INSTALL_PATH = "$(HOME)/Library/Screen Savers";
340 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
341 | PRODUCT_BUNDLE_IDENTIFIER = it.albertopasca.paskysaver;
342 | PRODUCT_NAME = "Pasky-Saver";
343 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
344 | SWIFT_VERSION = 3.0;
345 | WRAPPER_EXTENSION = saver;
346 | };
347 | name = Debug;
348 | };
349 | 7DF79BA61B5157C000BF9B54 /* Release */ = {
350 | isa = XCBuildConfiguration;
351 | buildSettings = {
352 | CLANG_ENABLE_MODULES = YES;
353 | COMBINE_HIDPI_IMAGES = YES;
354 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
355 | INFOPLIST_FILE = APScrenSaver/Info.plist;
356 | INSTALL_PATH = "$(HOME)/Library/Screen Savers";
357 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
358 | PRODUCT_BUNDLE_IDENTIFIER = it.albertopasca.paskysaver;
359 | PRODUCT_NAME = "Pasky-Saver";
360 | SWIFT_VERSION = 3.0;
361 | WRAPPER_EXTENSION = saver;
362 | };
363 | name = Release;
364 | };
365 | /* End XCBuildConfiguration section */
366 |
367 | /* Begin XCConfigurationList section */
368 | 7DE430341B51CA190073DB62 /* Build configuration list for PBXNativeTarget "PaskySaverApp" */ = {
369 | isa = XCConfigurationList;
370 | buildConfigurations = (
371 | 7DE430321B51CA190073DB62 /* Debug */,
372 | 7DE430331B51CA190073DB62 /* Release */,
373 | );
374 | defaultConfigurationIsVisible = 0;
375 | defaultConfigurationName = Release;
376 | };
377 | 7DF79B941B5157C000BF9B54 /* Build configuration list for PBXProject "PaskySaver" */ = {
378 | isa = XCConfigurationList;
379 | buildConfigurations = (
380 | 7DF79BA21B5157C000BF9B54 /* Debug */,
381 | 7DF79BA31B5157C000BF9B54 /* Release */,
382 | );
383 | defaultConfigurationIsVisible = 0;
384 | defaultConfigurationName = Release;
385 | };
386 | 7DF79BA41B5157C000BF9B54 /* Build configuration list for PBXNativeTarget "PaskySaver" */ = {
387 | isa = XCConfigurationList;
388 | buildConfigurations = (
389 | 7DF79BA51B5157C000BF9B54 /* Debug */,
390 | 7DF79BA61B5157C000BF9B54 /* Release */,
391 | );
392 | defaultConfigurationIsVisible = 0;
393 | defaultConfigurationName = Release;
394 | };
395 | /* End XCConfigurationList section */
396 | };
397 | rootObject = 7DF79B911B5157C000BF9B54 /* Project object */;
398 | }
399 |
--------------------------------------------------------------------------------
/PaskySaverApp/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
--------------------------------------------------------------------------------