forked from gnachman/iTerm2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FutureMethods.h
122 lines (93 loc) · 3.29 KB
/
FutureMethods.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//
// FutureMethods.h
// iTerm
//
// Created by George Nachman on 8/29/11.
//
#import <Cocoa/Cocoa.h>
// This is for the args to CGSSetWindowBackgroundBlurRadiusFunction, which is used for window-blurring using undocumented APIs.
#import <CGSInternal.h>
#ifdef BLOCKS_NOT_AVAILABLE
// OS 10.5 Compatibility
@protocol NSControlTextEditingDelegate
@end
@protocol NSMenuDelegate
@end
@protocol NSNetServiceBrowserDelegate
@end
@protocol NSNetServiceDelegate
@end
@protocol NSSplitViewDelegate
@end
@protocol NSTableViewDataSource
@end
@protocol NSTableViewDelegate
@end
@protocol NSTextFieldDelegate
@end
@protocol NSTextViewDelegate
@end
@protocol NSTokenFieldDelegate
@end
@protocol NSToolbarDelegate
@end
@protocol NSWindowDelegate
@end
#endif
// From proc_info.h, available on 10.7 and 10.8 only.
#define FUTURE_PROC_PIDT_SHORTBSDINFO 13
#define FUTURE_MAXCOMLEN 16
struct future_proc_bsdshortinfo {
uint32_t pbsi_pid; /* process id */
uint32_t pbsi_ppid; /* process parent id */
uint32_t pbsi_pgid; /* process perp id */
int32_t pbsi_status; /* p_stat value, SZOMB, SRUN, etc */
char pbsi_comm[FUTURE_MAXCOMLEN]; /* upto 16 characters of process name */
uint32_t pbsi_flags; /* 64bit; emulated etc */
uid_t pbsi_uid; /* current uid on process */
gid_t pbsi_gid; /* current gid on process */
uid_t pbsi_ruid; /* current ruid on process */
gid_t pbsi_rgid; /* current tgid on process */
uid_t pbsi_svuid; /* current svuid on process */
gid_t pbsi_svgid; /* current svgid on process */
uint32_t pbsi_rfu; /* reserved for future use*/
};
extern const int FutureNSWindowCollectionBehaviorStationary;
@interface NSView (Future)
- (void)futureSetAcceptsTouchEvents:(BOOL)value;
- (void)futureSetWantsRestingTouches:(BOOL)value;
- (NSRect)futureConvertRectToScreen:(NSRect)rect;
- (NSRect)futureConvertRectFromScreen:(NSRect)rect;
@end
@interface NSEvent (Future)
- (NSArray *)futureTouchesMatchingPhase:(int)phase inView:(NSView *)view;
@end
@interface NSWindow (Future)
- (void)futureSetRestorable:(BOOL)value;
- (void)futureSetRestorationClass:(Class)class;
- (void)futureInvalidateRestorableState;
@end
enum {
FutureNSScrollerStyleLegacy = 0,
FutureNSScrollerStyleOverlay = 1
};
typedef NSInteger FutureNSScrollerStyle;
@interface NSScroller (Future)
- (FutureNSScrollerStyle)futureScrollerStyle;
@end
@interface NSScrollView (Future)
- (FutureNSScrollerStyle)futureScrollerStyle;
@end
@interface CIImage (Future)
@end
@interface NSObject (Future)
- (BOOL)performSelectorReturningBool:(SEL)selector withObjects:(NSArray *)objects;
@end
@interface NSScroller (future)
- (void)futureSetKnobStyle:(NSInteger)newKnobStyle;
@end
typedef CGError CGSSetWindowBackgroundBlurRadiusFunction(CGSConnectionID cid, CGSWindowID wid, NSUInteger blur);
CGSSetWindowBackgroundBlurRadiusFunction* GetCGSSetWindowBackgroundBlurRadiusFunction(void);
// 10.7-only function.
typedef void CTFontDrawGlyphsFunction(CTFontRef runFont, const CGGlyph *glyphs, NSPoint *positions, int glyphCount, CGContextRef ctx);
CTFontDrawGlyphsFunction* GetCTFontDrawGlyphsFunction(void);