-
Notifications
You must be signed in to change notification settings - Fork 11
/
procfs_windows.h
52 lines (42 loc) · 2 KB
/
procfs_windows.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
/*
* MacFUSE-Based procfs
*/
#ifndef _PROCFS_WINDOWS_H_
#define _PROCFS_WINDOWS_H_
#include <ApplicationServices/ApplicationServices.h>
#include <CoreFoundation/CoreFoundation.h>
extern "C" {
typedef mach_port_t CGSConnectionID;
typedef mach_port_t CGSWindowID;
extern CGSConnectionID _CGSDefaultConnection(void);
extern CGError CGSGetWindowLevel(CGSConnectionID connectionID,
CGSWindowID windowID, CGWindowLevel *level);
extern CGError CGSGetConnectionIDForPSN(CGSConnectionID connectionID,
ProcessSerialNumber *psn,
CGSConnectionID *out);
extern CGError CGSGetOnScreenWindowList(CGSConnectionID connectionID,
CGSConnectionID targetConnectionID,
int maxCount,
CGSWindowID *windowList,
int *outCount);
extern CGError CGSGetWindowList(CGSConnectionID connectionID,
CGSConnectionID targetConnectionID,
int maxCount,
CGSWindowID *windowList,
int *outCount);
extern CGError CGSGetScreenRectForWindow(CGSConnectionID connectionID,
CGSWindowID windowID, CGRect *outRect);
extern CGError CGSGetParentWindowList(CGSConnectionID connectionID,
CGSConnectionID targetConnectionID,
int maxCount,
CGSWindowID *windowList,
int *outCount);
int PROCFS_GetPNGForWindowAtIndex(CGWindowID index, CFMutableDataRef *data);
off_t PROCFS_GetPNGSizeForWindowAtIndex(CGWindowID index);
struct ProcfsWindowData {
CFMutableDataRef window_png;
size_t len;
size_t max_len;
};
} /* extern "C" */
#endif /* _PROCFS_WINDOWS_H_ */