mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Import AppKit rather than Cocoa
Importing Cocoa pulls in CoreData, which we're not using. https://github.com/brentsimmons/NetNewsWire/blob/master/Technotes/CodingGuidelines.md
This commit is contained in:
parent
b311005393
commit
4d2a8087ed
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2018 Dan Barber. All rights reserved.
|
// Copyright © 2018 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
import MediaKeyTap
|
import MediaKeyTap
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
import Differ
|
import Differ
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class AlbumViewItem: NSCollectionViewItem {
|
class AlbumViewItem: NSCollectionViewItem {
|
||||||
var observer: NSKeyValueObservation?
|
var observer: NSKeyValueObservation?
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class MainSplitViewController: NSSplitViewController {
|
class MainSplitViewController: NSSplitViewController {
|
||||||
override func keyDown(with event: NSEvent) {
|
override func keyDown(with event: NSEvent) {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
class QueueViewController: NSViewController,
|
class QueueViewController: NSViewController,
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
class WindowController: NSWindowController {
|
class WindowController: NSWindowController {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
class AlbumDataSource: NSObject, NSCollectionViewDataSource {
|
class AlbumDataSource: NSObject, NSCollectionViewDataSource {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class QueueDataSource: NSObject, NSOutlineViewDataSource {
|
class QueueDataSource: NSObject, NSOutlineViewDataSource {
|
||||||
var queue: [QueueItem] = []
|
var queue: [QueueItem] = []
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
extension CGColor {
|
extension CGColor {
|
||||||
static let albumBorderColorLight = NSColor.black.withAlphaComponent(0.15).cgColor
|
static let albumBorderColorLight = NSColor.black.withAlphaComponent(0.15).cgColor
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
extension NSEvent {
|
extension NSEvent {
|
||||||
static let keyCodeSpace: UInt16 = 49
|
static let keyCodeSpace: UInt16 = 49
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
extension NSFont {
|
extension NSFont {
|
||||||
static let systemFontRegular = systemFont(ofSize: 13, weight: .regular)
|
static let systemFontRegular = systemFont(ofSize: 13, weight: .regular)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
extension NSImage {
|
extension NSImage {
|
||||||
static let playIcon = NSImage(named: "playButton")
|
static let playIcon = NSImage(named: "playButton")
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
extension NSUserInterfaceItemIdentifier {
|
extension NSUserInterfaceItemIdentifier {
|
||||||
static let queueSongTitleColumn = NSUserInterfaceItemIdentifier("songTitleColumn")
|
static let queueSongTitleColumn = NSUserInterfaceItemIdentifier("songTitleColumn")
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class AlbumViewLayout: NSCollectionViewFlowLayout {
|
class AlbumViewLayout: NSCollectionViewFlowLayout {
|
||||||
let maxItemWidth: CGFloat = 180
|
let maxItemWidth: CGFloat = 180
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import CryptoSwift
|
import CryptoSwift
|
||||||
|
|
||||||
struct Album {
|
struct Album {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class TrackTimer: NSObject {
|
class TrackTimer: NSObject {
|
||||||
var timer: Timer?
|
var timer: Timer?
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class CoverArtQueue {
|
class CoverArtQueue {
|
||||||
static let shared = CoverArtQueue()
|
static let shared = CoverArtQueue()
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class CoverArtPrefsController: NSViewController {
|
class CoverArtPrefsController: NSViewController {
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
class GeneralPrefsViewController: NSViewController {
|
class GeneralPrefsViewController: NSViewController {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class PreferencesViewController: NSTabViewController {
|
class PreferencesViewController: NSTabViewController {
|
||||||
private lazy var tabViewSizes: [String : NSSize] = [:]
|
private lazy var tabViewSizes: [String : NSSize] = [:]
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class PreferencesWindowController: NSWindowController, NSWindowDelegate {
|
class PreferencesWindowController: NSWindowController, NSWindowDelegate {
|
||||||
override func windowDidLoad() {
|
override func windowDidLoad() {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
class CoverArtService {
|
class CoverArtService {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
extension CoverArtService {
|
extension CoverArtService {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import PromiseKit
|
import PromiseKit
|
||||||
|
|
||||||
extension CoverArtService {
|
extension CoverArtService {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import SwiftyJSON
|
import SwiftyJSON
|
||||||
import PromiseKit
|
import PromiseKit
|
||||||
import PMKFoundation
|
import PMKFoundation
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
struct SongNotifierService {
|
struct SongNotifierService {
|
||||||
let song: Song
|
let song: Song
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
struct ResetAlbumListCoverArtAction: Action {}
|
struct ResetAlbumListCoverArtAction: Action {}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
struct UpdateCurrentCoverArtAction: Action {
|
struct UpdateCurrentCoverArtAction: Action {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
struct PlayerState: StateType {
|
struct PlayerState: StateType {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
func playerReducer(action: Action, state: PlayerState?) -> PlayerState {
|
func playerReducer(action: Action, state: PlayerState?) -> PlayerState {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
func queueReducer(action: Action, state: QueueState?) -> QueueState {
|
func queueReducer(action: Action, state: QueueState?) -> QueueState {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class AlbumItemView: NSView {
|
class AlbumItemView: NSView {
|
||||||
var trackingArea: NSTrackingArea?
|
var trackingArea: NSTrackingArea?
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
import ReSwift
|
import ReSwift
|
||||||
|
|
||||||
class CurrentCoverArtView: NSImageView {
|
class CurrentCoverArtView: NSImageView {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2019 Dan Barber. All rights reserved.
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import AppKit
|
||||||
|
|
||||||
class MainWindow: NSWindow {
|
class MainWindow: NSWindow {
|
||||||
override func keyDown(with event: NSEvent) {
|
override func keyDown(with event: NSEvent) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user