PageRenderTime 16ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/filesystems/grabfs/windowfs_windows.h

http://macfuse.googlecode.com/
C++ Header | 64 lines | 46 code | 12 blank | 6 comment | 0 complexity | 523a8052d12f37a78af50c3260000085 MD5 | raw file
 1/*
 2 * MacFUSE-Based windowfs
 3 *
 4 * Copyright Amit Singh. All Rights Reserved.
 5 * http://osxbook.com
 6 */
 7
 8#ifndef _WINDOWFS_WINDOWS_H_
 9#define _WINDOWFS_WINDOWS_H_
10
11#include <ApplicationServices/ApplicationServices.h>
12#include <CoreFoundation/CoreFoundation.h>
13
14extern "C" {
15
16#define MAX_WINDOWS 256
17
18typedef mach_port_t   CGSConnectionID;
19typedef mach_port_t   CGSWindowID;
20
21typedef struct {
22    pid_t pid;
23    int windowCount;
24    CGSWindowID windowIDs[MAX_WINDOWS];
25} WindowListData;
26
27extern CGSConnectionID _CGSDefaultConnection(void);
28extern CGError CGSGetWindowLevel(CGSConnectionID connectionID,
29                                 CGSWindowID windowID, CGWindowLevel *level);
30extern CGError CGSGetConnectionIDForPSN(CGSConnectionID connectionID,
31                                        ProcessSerialNumber *psn,
32                                        CGSConnectionID *out);
33extern CGError CGSGetOnScreenWindowList(CGSConnectionID connectionID,
34                                        CGSConnectionID targetConnectionID,
35                                        int maxCount,
36                                        CGSWindowID *windowList,
37                                        int *outCount);
38extern CGError CGSGetWindowList(CGSConnectionID connectionID,
39                                CGSConnectionID targetConnectionID,
40                                int maxCount,
41                                CGSWindowID *windowList,
42                                int *outCount);
43extern CGError CGSGetScreenRectForWindow(CGSConnectionID connectionID,
44                                         CGSWindowID windowID, CGRect *outRect);
45
46extern CGError CGSGetParentWindowList(CGSConnectionID connectionID,
47                                        CGSConnectionID targetConnectionID,
48                                        int maxCount,
49                                        CGSWindowID *windowList,
50                                        int *outCount);
51
52int WINDOWFS_GetTIFFForWindowAtIndex(CGWindowID index, CFMutableDataRef *data);
53off_t WINDOWFS_GetTIFFSizeForWindowAtIndex(CGWindowID index);
54int WINDOWFS_GetWindowList(WindowListData *data);
55
56struct WINDOWFSWindowData {
57    CFMutableDataRef window_tiff;
58    size_t           len;
59    size_t           max_len;
60};
61
62} /* extern "C" */
63
64#endif /* _WINDOWFS_WINDOWS_H_ */