forked from gnachman/iTerm2
/
HotkeyWindowController.h
44 lines (34 loc) · 1.15 KB
/
HotkeyWindowController.h
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
34
35
36
37
38
39
40
41
42
43
44
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
@class PseudoTerminal;
@class GTMCarbonHotKey;
@interface HotkeyWindowController : NSObject {
// Set while window is appearing.
BOOL rollingIn_;
// Set when iTerm was key at the time the hotkey window was opened.
BOOL itermWasActiveWhenHotkeyOpened_;
// The keycode that opens the hotkey window
int hotkeyCode_;
// Modifiers for the keypress that opens the hotkey window
int hotkeyModifiers_;
// The registered carbon hotkey that listens for hotkey presses.
GTMCarbonHotKey* carbonHotKey_;
// When using an event tap, these will be set:
CFMachPortRef machPortRef_;
CFRunLoopSourceRef eventSrc_;
}
+ (id)sharedInstance;
- (BOOL)rollingInHotkeyTerm;
- (void)showHotKeyWindow;
- (void)doNotOrderOutWhenHidingHotkeyWindow;
- (void)fastHideHotKeyWindow;
- (void)hideHotKeyWindow:(PseudoTerminal*)hotkeyTerm;
- (BOOL)isHotKeyWindowOpen;
- (PseudoTerminal*)hotKeyWindow;
- (BOOL)eventIsHotkey:(NSEvent*)e;
- (void)unregisterHotkey;
- (BOOL)haveEventTap;
- (BOOL)registerHotkey:(int)keyCode modifiers:(int)modifiers;
- (void)beginRemappingModifiers;
- (void)stopEventTap;
@end