| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | #ifndef _RECORD_H_ |
| 22 | #define _RECORD_H_ |
| 23 | |
| 24 | #include <X11/extensions/recordconst.h> |
| 25 | |
| 26 | typedef unsigned long XRecordClientSpec; |
| 27 | typedef unsigned long XRecordContext; |
| 28 | |
| 29 | typedef struct |
| 30 | { |
| 31 | unsigned char first; |
| 32 | unsigned char last; |
| 33 | } XRecordRange8; |
| 34 | |
| 35 | typedef struct |
| 36 | { |
| 37 | unsigned short first; |
| 38 | unsigned short last; |
| 39 | } XRecordRange16; |
| 40 | |
| 41 | typedef struct |
| 42 | { |
| 43 | XRecordRange8 ext_major; |
| 44 | XRecordRange16 ext_minor; |
| 45 | } XRecordExtRange; |
| 46 | |
| 47 | typedef struct |
| 48 | { |
| 49 | XRecordRange8 core_requests; |
| 50 | XRecordRange8 core_replies; |
| 51 | XRecordExtRange ext_requests; |
| 52 | XRecordExtRange ext_replies; |
| 53 | XRecordRange8 delivered_events; |
| 54 | XRecordRange8 device_events; |
| 55 | XRecordRange8 errors; |
| 56 | Bool client_started; |
| 57 | Bool client_died; |
| 58 | } XRecordRange; |
| 59 | |
| 60 | typedef struct |
| 61 | { |
| 62 | XRecordClientSpec client; |
| 63 | unsigned long nranges; |
| 64 | XRecordRange **ranges; |
| 65 | } XRecordClientInfo; |
| 66 | |
| 67 | typedef struct |
| 68 | { |
| 69 | Bool enabled; |
| 70 | int datum_flags; |
| 71 | unsigned long nclients; |
| 72 | XRecordClientInfo **client_info; |
| 73 | } XRecordState; |
| 74 | |
| 75 | typedef struct |
| 76 | { |
| 77 | XID id_base; |
| 78 | Time server_time; |
| 79 | unsigned long client_seq; |
| 80 | int category; |
| 81 | Bool client_swapped; |
| 82 | unsigned char *data; |
| 83 | unsigned long data_len; |
| 84 | } XRecordInterceptData; |
| 85 | |
| 86 | _XFUNCPROTOBEGIN |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | XID XRecordIdBaseMask( |
| 95 | Display *dpy |
| 96 | ); |
| 97 | |
| 98 | extern Status XRecordQueryVersion( |
| 99 | Display* , |
| 100 | int* , |
| 101 | int* |
| 102 | ); |
| 103 | |
| 104 | extern XRecordContext XRecordCreateContext( |
| 105 | Display* , |
| 106 | int , |
| 107 | XRecordClientSpec* , |
| 108 | int , |
| 109 | XRecordRange** , |
| 110 | int |
| 111 | ); |
| 112 | |
| 113 | extern XRecordRange *XRecordAllocRange( |
| 114 | void |
| 115 | ); |
| 116 | |
| 117 | extern Status XRecordRegisterClients( |
| 118 | Display* , |
| 119 | XRecordContext , |
| 120 | int , |
| 121 | XRecordClientSpec* , |
| 122 | int , |
| 123 | XRecordRange** , |
| 124 | int |
| 125 | ); |
| 126 | |
| 127 | extern Status XRecordUnregisterClients( |
| 128 | Display* , |
| 129 | XRecordContext , |
| 130 | XRecordClientSpec* , |
| 131 | int |
| 132 | ); |
| 133 | |
| 134 | extern Status XRecordGetContext( |
| 135 | Display* , |
| 136 | XRecordContext , |
| 137 | XRecordState** |
| 138 | ); |
| 139 | |
| 140 | extern void XRecordFreeState( |
| 141 | XRecordState* |
| 142 | ); |
| 143 | |
| 144 | typedef void (*XRecordInterceptProc) ( |
| 145 | XPointer , |
| 146 | XRecordInterceptData* |
| 147 | ); |
| 148 | |
| 149 | extern Status XRecordEnableContext( |
| 150 | Display* , |
| 151 | XRecordContext , |
| 152 | XRecordInterceptProc , |
| 153 | XPointer |
| 154 | ); |
| 155 | |
| 156 | extern Status XRecordEnableContextAsync( |
| 157 | Display* , |
| 158 | XRecordContext , |
| 159 | XRecordInterceptProc , |
| 160 | XPointer |
| 161 | ); |
| 162 | |
| 163 | extern void XRecordProcessReplies( |
| 164 | Display* |
| 165 | ); |
| 166 | |
| 167 | extern void XRecordFreeData( |
| 168 | XRecordInterceptData* |
| 169 | ); |
| 170 | |
| 171 | extern Status XRecordDisableContext( |
| 172 | Display* , |
| 173 | XRecordContext |
| 174 | ); |
| 175 | |
| 176 | extern Status XRecordFreeContext( |
| 177 | Display* , |
| 178 | XRecordContext |
| 179 | ); |
| 180 | |
| 181 | _XFUNCPROTOEND |
| 182 | |
| 183 | #endif |