Skip to content

Commit

Permalink
Update doco, update licensing,
Browse files Browse the repository at this point in the history
  • Loading branch information
dagronf committed May 11, 2024
1 parent 483a264 commit 6769673
Show file tree
Hide file tree
Showing 15 changed files with 162 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
//
// AppDelegate.h
// AppKitFocusOverlay Objc Demo
// Copyright © 2024 Darren Ford. All rights reserved.
//
// Created by Darren Ford on 5/1/2022.
// MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#import <Cocoa/Cocoa.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
//
// AppDelegate.m
// AppKitFocusOverlay Objc Demo
// Copyright © 2024 Darren Ford. All rights reserved.
//
// Created by Darren Ford on 5/1/2022.
// MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#import "AppDelegate.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
//
// ViewController.h
// AppKitFocusOverlay Objc Demo
// Copyright © 2024 Darren Ford. All rights reserved.
//
// Created by Darren Ford on 5/1/2022.
// MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#import <Cocoa/Cocoa.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
//
// ViewController.m
// AppKitFocusOverlay Objc Demo
// Copyright © 2024 Darren Ford. All rights reserved.
//
// Created by Darren Ford on 5/1/2022.
// MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#import "ViewController.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
//
// main.m
// AppKitFocusOverlay Objc Demo
// Copyright © 2024 Darren Ford. All rights reserved.
//
// Created by Darren Ford on 5/1/2022.
// MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#import <Cocoa/Cocoa.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 3L6RK3LGGW;
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "AppKitFocusOverlay-Objc-Demo-Info.plist";
Expand Down Expand Up @@ -364,7 +364,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 3L6RK3LGGW;
ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "AppKitFocusOverlay-Objc-Demo-Info.plist";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
//
// AppDelegate.swift
// AppKitFocusPathDisplay Demo
// Copyright © 2024 Darren Ford. All rights reserved.
//
// Created by Darren Ford on 31/12/2021.
// MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import Cocoa
Expand All @@ -15,12 +27,12 @@ let _globalFocusOverlay = AppKitFocusOverlay()
@main
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application

// We have to 'use' the focus overlay object in order to force Swift to lazy load the global
_ = _globalFocusOverlay
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}

func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
//
// ViewController.swift
// AppKitFocusPathDisplay Demo
// Copyright © 2024 Darren Ford. All rights reserved.
//
// Created by Darren Ford on 31/12/2021.
// MIT license
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial
// portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

import Cocoa
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Darren Ford
Copyright (c) 2024 Darren Ford

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
45 changes: 20 additions & 25 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version: 5.4

import PackageDescription

let package = Package(
name: "AppKitFocusOverlay",
platforms: [
name: "AppKitFocusOverlay",
platforms: [
.macOS(.v10_11)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "AppKitFocusOverlay",
targets: ["AppKitFocusOverlay"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/dagronf/HotKey", from: "0.1.3")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "AppKitFocusOverlay",
dependencies: ["HotKey"]),
.testTarget(
name: "AppKitFocusOverlayTests",
dependencies: ["AppKitFocusOverlay"]),
]
],
products: [
.library(
name: "AppKitFocusOverlay",
targets: ["AppKitFocusOverlay"]),
],
dependencies: [
.package(url: "https://github.com/dagronf/HotKey", from: "0.1.3")
],
targets: [
.target(
name: "AppKitFocusOverlay",
dependencies: ["HotKey"]),
.testTarget(
name: "AppKitFocusOverlayTests",
dependencies: ["AppKitFocusOverlay"]),
]
)
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ Uses [HotKey](https://github.com/soffes/HotKey) to define and detect hot-key pre
# License
MIT. Use it for anything you want, just attribute my work if you do. Let me know if you do use it somewhere, I'd love to hear about it!
## AppKitFocusOverlay
```
MIT License

Copyright (c) 2021 Darren Ford
Copyright (c) 2024 Darren Ford

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -139,3 +139,28 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
## HotKey
```
Copyright (c) 2017–2019 Sam Soffes, http://soff.es

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
10 changes: 2 additions & 8 deletions Sources/AppKitFocusOverlay/AppKitFocusOverlay.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
//
// FocusOverlay.swift
// AppKitFocusPathDisplay
//
// Created by Darren Ford on 28/12/2021.
// Copyright © 2021 Darren Ford. All rights reserved.
// Copyright © 2024 Darren Ford. All rights reserved.
//
// MIT license
//
Expand Down Expand Up @@ -60,9 +56,7 @@ import HotKey
///
/// This is primarily a convenience for objective-c support, as the HotKey library is not exposed to objective-c.
/// If you need to customize the hotkeys for objective-c you'll need to fork this library and change the code.
@objc public init(
shouldRecalculateKeyViewLoop: Bool
) {
@objc public init(shouldRecalculateKeyViewLoop: Bool) {
self.hotKeyWindow = HotKey(key: .leftBracket, modifiers: [.option])
self.hotKeyView = HotKey(key: .rightBracket, modifiers: [.option])
self.shouldRecalculateKeyViewLoop = shouldRecalculateKeyViewLoop
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//
// CGContext+extensions.swift
//
// Created by Darren Ford on 19/11/21.
// Copyright © 2021 Darren Ford. All rights reserved.
// Copyright © 2024 Darren Ford. All rights reserved.
//
// MIT license
//
Expand Down
5 changes: 1 addition & 4 deletions Sources/AppKitFocusOverlay/private/CGPath+arrow.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//
// CGPath+arrow.swift
//
// Created by Darren Ford on 28/12/2021.
// Copyright © 2021 Darren Ford. All rights reserved.
// Copyright © 2024 Darren Ford. All rights reserved.
//
// MIT license
//
Expand Down
3 changes: 1 addition & 2 deletions Sources/AppKitFocusOverlay/private/Palette.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//
// Created by Darren Ford on 6/1/2022.
// Copyright © 2022 Darren Ford. All rights reserved.
// Copyright © 2024 Darren Ford. All rights reserved.
//
// MIT license
//
Expand Down

0 comments on commit 6769673

Please sign in to comment.