Skip to content

Commit

Permalink
CAWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed Oct 26, 2023
1 parent 3592308 commit b993142
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/CommonAppleKit/CommonAppleKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
public typealias CACollectionViewLayout = UICollectionViewLayout
public typealias CACollectionViewFlowLayout = UICollectionViewFlowLayout
public typealias CAColor = UIColor
public typealias CAWindow = UIWindow

public extension CATextField {
var stringValue: String {
Expand Down Expand Up @@ -68,6 +69,7 @@
public typealias CACollectionViewLayout = NSCollectionViewLayout
public typealias CACollectionViewFlowLayout = NSCollectionViewFlowLayout
public typealias CAColor = NSColor
public typealias CAWindow = NSWindow

public extension CAImage {
@available(macOS 11.0, *)
Expand Down Expand Up @@ -123,4 +125,16 @@
register(cellClass, forItemWithIdentifier: .init(identifier))
}
}

public extension CAWindow {
var rootViewController: CAViewController? {
get {
contentViewController
}

set {
contentViewController = newValue
}
}
}
#endif

0 comments on commit b993142

Please sign in to comment.