forked from PlayCover/PlayTools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plugin.swift
33 lines (29 loc) · 1 KB
/
Plugin.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Plugin.swift
// PlayTools
//
// Created by Isaac Marovitz on 13/09/2022.
//
import Foundation
@objc(Plugin)
public protocol Plugin: NSObjectProtocol {
init()
var screenCount: Int { get }
var mousePoint: CGPoint { get }
var windowFrame: CGRect { get }
var mainScreenFrame: CGRect { get }
var isMainScreenEqualToFirst: Bool { get }
var isFullscreen: Bool { get }
var cmdPressed: Bool { get }
func hideCursor()
func warpCursor()
func unhideCursor()
func terminateApplication()
func setupKeyboard(keyboard: @escaping(UInt16, Bool, Bool, Bool) -> Bool,
swapMode: @escaping() -> Bool)
func setupMouseMoved(_ mouseMoved: @escaping(CGFloat, CGFloat) -> Bool)
func setupMouseButton(left: Bool, right: Bool, _ consumed: @escaping(Int, Bool) -> Bool)
func setupScrollWheel(_ onMoved: @escaping(CGFloat, CGFloat) -> Bool)
func urlForApplicationWithBundleIdentifier(_ value: String) -> URL?
func setMenuBarVisible(_ value: Bool)
}