This file contains hidden or 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
enum HTTPStatusCodes: Int { | |
// 100 Informational | |
case Continue = 100 | |
case SwitchingProtocols | |
case Processing | |
// 200 Success | |
case OK = 200 | |
case Created | |
case Accepted | |
case NonAuthoritativeInformation |
This file contains hidden or 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
import Cocoa | |
extension NSWorkspace { | |
class func frontmostApp() -> NSRunningApplication? { | |
return self.sharedWorkspace().frontmostApplication | |
} | |
class func runningApp(bundleIdentifier:NSString) -> NSRunningApplication? { | |
let runningApplications = NSWorkspace.sharedWorkspace().runningApplications | |
return runningApplications.filter({$0.bundleIdentifier == bundleIdentifier}).first | |
} |
This file contains hidden or 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
import Cocoa | |
protocol AXUIProtocol { | |
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement] | |
func AXUIWindowArray(bundleIdentifier bid:NSString) -> [AXUIElement] | |
} | |
extension AXUIProtocol { | |
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement] { | |
let windowList : UnsafeMutablePointer<AnyObject?> = UnsafeMutablePointer<AnyObject?>.alloc(1) |