-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathQSMouseTriggerView.h
55 lines (48 loc) · 1.49 KB
/
QSMouseTriggerView.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
45
46
47
48
49
50
51
52
53
54
55
typedef enum _QSRectBits {
QSCenterAnchor = 0,
QSTopRightAnchor = 1,
QSTopLeftAnchor = 2,
QSBottomLeftAnchor = 3,
QSBottomRightAnchor = 4,
QSMinXAnchor = 5,
QSMinYAnchor = 6,
QSMaxXAnchor = 7,
QSMaxYAnchor = 8
} QSRectBits;
enum { /* masks for the Anchors */
QSCenterAnchorMask = 1 << QSCenterAnchor,
QSTopRightAnchorMask = 1 << QSTopRightAnchor,
QSTopLeftAnchorMask = 1 << QSTopLeftAnchor,
QSBottomLeftAnchorMask = 1 << QSBottomLeftAnchor,
QSBottomRightAnchorMask = 1 << QSBottomRightAnchor,
QSMinXAnchorMask = 1 << QSMinXAnchor,
QSMinYAnchorMask = 1 << QSMinYAnchor,
QSMaxXAnchorMask = 1 << QSMaxXAnchor,
QSMaxYAnchorMask = 1 << QSMaxYAnchor
};
NSRect rectForAnchor(NSUInteger anchor, NSRect rect, CGFloat size, CGFloat inset);
@interface QSMouseTriggerWindow : NSPanel
@end
@class QSWindow;
@interface QSMouseTriggerView : NSView {
BOOL active;
bool dragging;
QSWindow *displayWindow;
NSTrackingRectTag trackingRect;
bool captureMode;
NSScreen *screen;
@public
NSUInteger anchor;
NSInteger screenNum;
//NSPasteboard *dragPboard;
}
//+ (id)triggerWindowWithAnchor:(int)thisAnchor onScreen:(NSScreen *)screen;
+ (id)triggerWindowWithAnchor:(NSUInteger)thisAnchor onScreenNum:(NSInteger)thisScreen;
- (NSWindow *)displayWindow;
- (void)updateDisplayFrame;
- (void)updateFrame;
- (bool)captureMode;
- (void)setCaptureMode:(BOOL)flag;
- (NSScreen *)screen;
- (void)showTriggerList;
@end