PageRenderTime 33ms CodeModel.GetById 24ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/filesystems/procfs/procfs_windows.h

http://macfuse.googlecode.com/
C++ Header | 52 lines | 39 code | 10 blank | 3 comment | 0 complexity | 2b9b87705be49bc2a81a336301ea7871 MD5 | raw file
 1/*
 2 * MacFUSE-Based procfs
 3 */
 4
 5#ifndef _PROCFS_WINDOWS_H_
 6#define _PROCFS_WINDOWS_H_
 7
 8#include <ApplicationServices/ApplicationServices.h>
 9#include <CoreFoundation/CoreFoundation.h>
10
11extern "C" {
12
13typedef mach_port_t   CGSConnectionID;
14typedef mach_port_t   CGSWindowID;
15
16extern CGSConnectionID _CGSDefaultConnection(void);
17extern CGError CGSGetWindowLevel(CGSConnectionID connectionID,
18                                 CGSWindowID windowID, CGWindowLevel *level);
19extern CGError CGSGetConnectionIDForPSN(CGSConnectionID connectionID,
20                                        ProcessSerialNumber *psn,
21                                        CGSConnectionID *out);
22extern CGError CGSGetOnScreenWindowList(CGSConnectionID connectionID,
23                                        CGSConnectionID targetConnectionID,
24                                        int maxCount,
25                                        CGSWindowID *windowList,
26                                        int *outCount);
27extern CGError CGSGetWindowList(CGSConnectionID connectionID,
28                                CGSConnectionID targetConnectionID,
29                                int maxCount,
30                                CGSWindowID *windowList,
31                                int *outCount);
32extern CGError CGSGetScreenRectForWindow(CGSConnectionID connectionID,
33                                         CGSWindowID windowID, CGRect *outRect);
34
35extern CGError CGSGetParentWindowList(CGSConnectionID connectionID,
36                                        CGSConnectionID targetConnectionID,
37                                        int maxCount,
38                                        CGSWindowID *windowList,
39                                        int *outCount);
40
41int PROCFS_GetPNGForWindowAtIndex(CGWindowID index, CFMutableDataRef *data);
42off_t PROCFS_GetPNGSizeForWindowAtIndex(CGWindowID index);
43
44struct ProcfsWindowData {
45    CFMutableDataRef window_png;
46    size_t           len;
47    size_t           max_len;
48};
49
50} /* extern "C" */
51
52#endif /* _PROCFS_WINDOWS_H_ */