308bcc4186098b2d085c438e1b996475a312c5f9
[framework/uifw/ecore.git] / src / lib / ecore_x / Ecore_X.h
1 #ifndef _ECORE_X_H
2 #define _ECORE_X_H
3
4 #include <Eina.h>
5
6 #ifdef EAPI
7 # undef EAPI
8 #endif // ifdef EAPI
9
10 #ifdef _MSC_VER
11 # ifdef BUILDING_DLL
12 #  define EAPI __declspec(dllexport)
13 # else // ifdef BUILDING_DLL
14 #  define EAPI __declspec(dllimport)
15 # endif // ifdef BUILDING_DLL
16 #else // ifdef _MSC_VER
17 # ifdef __GNUC__
18 #  if __GNUC__ >= 4
19 #   define EAPI __attribute__ ((visibility("default")))
20 #  else // if __GNUC__ >= 4
21 #   define EAPI
22 #  endif // if __GNUC__ >= 4
23 # else // ifdef __GNUC__
24 #  define EAPI
25 # endif // ifdef __GNUC__
26 #endif // ifdef _MSC_VER
27
28 #include <sys/types.h>
29
30 /**
31  * @file
32  * @brief Ecore functions for dealing with the X Windows System
33  *
34  * Ecore_X provides a wrapper and convenience functions for using the
35  * X Windows System.  Function groups for this part of the library
36  * include the following:
37  * @li @ref Ecore_X_Init_Group
38  * @li @ref Ecore_X_Display_Attr_Group
39  * @li @ref Ecore_X_Flush_Group
40  */
41
42 typedef unsigned int   Ecore_X_ID;
43 #ifndef _ECORE_X_WINDOW_PREDEF
44 typedef Ecore_X_ID     Ecore_X_Window;
45 #endif // ifndef _ECORE_X_WINDOW_PREDEF
46 typedef void          *Ecore_X_Visual;
47 typedef Ecore_X_ID     Ecore_X_Pixmap;
48 typedef Ecore_X_ID     Ecore_X_Drawable;
49 #ifdef HAVE_ECORE_X_XCB
50 typedef Ecore_X_ID     Ecore_X_GC;
51 #else // ifdef HAVE_ECORE_X_XCB
52 typedef void          *Ecore_X_GC;
53 #endif /* HAVE_ECORE_X_XCB */
54 typedef Ecore_X_ID     Ecore_X_Atom;
55 typedef Ecore_X_ID     Ecore_X_Colormap;
56 typedef Ecore_X_ID     Ecore_X_Time;
57 typedef Ecore_X_ID     Ecore_X_Cursor;
58 typedef void           Ecore_X_Display;
59 typedef void           Ecore_X_Connection;
60 typedef void           Ecore_X_Screen;
61 typedef Ecore_X_ID     Ecore_X_Sync_Counter;
62 typedef Ecore_X_ID     Ecore_X_Sync_Alarm;
63 typedef void           Ecore_X_XRegion;
64
65 typedef Ecore_X_ID     Ecore_X_Randr_Output;
66 typedef Ecore_X_ID     Ecore_X_Randr_Crtc;
67 typedef Ecore_X_ID     Ecore_X_Randr_Mode;
68 typedef unsigned short Ecore_X_Randr_Size_ID;
69 typedef int            Ecore_X_Randr_Screen;
70
71 typedef Ecore_X_ID     Ecore_X_Device;
72
73 #ifdef __cplusplus
74 extern "C" {
75 #endif // ifdef __cplusplus
76
77 typedef struct _Ecore_X_Rectangle
78 {
79    int          x, y;
80    unsigned int width, height;
81 } Ecore_X_Rectangle;
82
83 typedef struct _Ecore_X_Icon
84 {
85    unsigned int  width, height;
86    unsigned int *data;
87 } Ecore_X_Icon;
88
89 typedef enum _Ecore_X_GC_Value_Mask
90 {
91    ECORE_X_GC_VALUE_MASK_FUNCTION = (1L << 0),
92    ECORE_X_GC_VALUE_MASK_PLANE_MASK = (1L << 1),
93    ECORE_X_GC_VALUE_MASK_FOREGROUND = (1L << 2),
94    ECORE_X_GC_VALUE_MASK_BACKGROUND = (1L << 3),
95    ECORE_X_GC_VALUE_MASK_LINE_WIDTH = (1L << 4),
96    ECORE_X_GC_VALUE_MASK_LINE_STYLE = (1L << 5),
97    ECORE_X_GC_VALUE_MASK_CAP_STYLE = (1L << 6),
98    ECORE_X_GC_VALUE_MASK_JOIN_STYLE = (1L << 7),
99    ECORE_X_GC_VALUE_MASK_FILL_STYLE = (1L << 8),
100    ECORE_X_GC_VALUE_MASK_FILL_RULE = (1L << 9),
101    ECORE_X_GC_VALUE_MASK_TILE = (1L << 10),
102    ECORE_X_GC_VALUE_MASK_STIPPLE = (1L << 11),
103    ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X = (1L << 12),
104    ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y = (1L << 13),
105    ECORE_X_GC_VALUE_MASK_FONT = (1L << 14),
106    ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE = (1L << 15),
107    ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES = (1L << 16),
108    ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X = (1L << 17),
109    ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y = (1L << 18),
110    ECORE_X_GC_VALUE_MASK_CLIP_MASK = (1L << 19),
111    ECORE_X_GC_VALUE_MASK_DASH_OFFSET = (1L << 20),
112    ECORE_X_GC_VALUE_MASK_DASH_LIST = (1L << 21),
113    ECORE_X_GC_VALUE_MASK_ARC_MODE = (1L << 22)
114 } Ecore_X_GC_Value_Mask;
115
116 typedef enum _Ecore_X_Composite_Update_Type
117 {
118    ECORE_X_COMPOSITE_UPDATE_AUTOMATIC,
119    ECORE_X_COMPOSITE_UPDATE_MANUAL
120 } Ecore_X_Composite_Update_Type;
121
122 /**
123  * @typedef _Ecore_X_Window_State
124  * Defines the different states of the window of Ecore_X.
125  */
126 typedef enum _Ecore_X_Window_State
127 {
128    /* Unknown state */
129     ECORE_X_WINDOW_STATE_UNKNOWN = 0,
130     /** The window is iconified. */
131     ECORE_X_WINDOW_STATE_ICONIFIED,
132     /** The window is a modal dialog box. */
133     ECORE_X_WINDOW_STATE_MODAL,
134     /** The window manager should keep the window's position fixed
135      * even if the virtual desktop scrolls. */
136     ECORE_X_WINDOW_STATE_STICKY,
137     /** The window has the maximum vertical size. */
138     ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,
139     /** The window has the maximum horizontal size. */
140     ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,
141     /** The window is shaded. */
142     ECORE_X_WINDOW_STATE_SHADED,
143     /** The window should not be included in the taskbar. */
144     ECORE_X_WINDOW_STATE_SKIP_TASKBAR,
145     /** The window should not be included in the pager. */
146     ECORE_X_WINDOW_STATE_SKIP_PAGER,
147     /** The window is invisible (i.e. minimized/iconified) */
148     ECORE_X_WINDOW_STATE_HIDDEN,
149     /** The window should fill the entire screen and have no
150      * window border/decorations */
151     ECORE_X_WINDOW_STATE_FULLSCREEN,
152     /* The following are not documented because they are not
153      * intended for use in applications. */
154     ECORE_X_WINDOW_STATE_ABOVE,
155     ECORE_X_WINDOW_STATE_BELOW,
156     /* FIXME: Documentation */
157     ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
158 } Ecore_X_Window_State;
159
160 typedef enum _Ecore_X_Window_State_Action
161 {
162    ECORE_X_WINDOW_STATE_ACTION_REMOVE,
163    ECORE_X_WINDOW_STATE_ACTION_ADD,
164    ECORE_X_WINDOW_STATE_ACTION_TOGGLE
165 } Ecore_X_Window_State_Action;
166
167 typedef enum _Ecore_X_Window_Stack_Mode
168 {
169    ECORE_X_WINDOW_STACK_ABOVE = 0,
170    ECORE_X_WINDOW_STACK_BELOW = 1,
171    ECORE_X_WINDOW_STACK_TOP_IF = 2,
172    ECORE_X_WINDOW_STACK_BOTTOM_IF = 3,
173    ECORE_X_WINDOW_STACK_OPPOSITE = 4
174 } Ecore_X_Window_Stack_Mode;
175
176 typedef enum _Ecore_X_Randr_Orientation
177 {
178    ECORE_X_RANDR_ORIENTATION_ROT_0 = (1 << 0),
179    ECORE_X_RANDR_ORIENTATION_ROT_90 = (1 << 1),
180    ECORE_X_RANDR_ORIENTATION_ROT_180 = (1 << 2),
181    ECORE_X_RANDR_ORIENTATION_ROT_270 = (1 << 3),
182    ECORE_X_RANDR_ORIENTATION_FLIP_X = (1 << 4),
183    ECORE_X_RANDR_ORIENTATION_FLIP_Y = (1 << 5)
184 } Ecore_X_Randr_Orientation;
185
186 typedef enum _Ecore_X_Randr_Connection_Status
187 {
188    ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED = 0,
189    ECORE_X_RANDR_CONNECTION_STATUS_DISCONNECTED = 1,
190    ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN = 2
191 } Ecore_X_Randr_Connection_Status;
192
193 typedef enum _Ecore_X_Randr_Output_Policy
194 {
195    ECORE_X_RANDR_OUTPUT_POLICY_ABOVE = 1,
196    ECORE_X_RANDR_OUTPUT_POLICY_RIGHT = 2,
197    ECORE_X_RANDR_OUTPUT_POLICY_BELOW = 3,
198    ECORE_X_RANDR_OUTPUT_POLICY_LEFT = 4,
199    ECORE_X_RANDR_OUTPUT_POLICY_CLONE = 5,
200    ECORE_X_RANDR_OUTPUT_POLICY_NONE = 6
201 } Ecore_X_Randr_Output_Policy;
202
203 typedef enum _Ecore_X_Randr_Relative_Alignment
204 {
205    ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE = 0,
206    ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL = 1,
207    ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR = 2
208 } Ecore_X_Randr_Relative_Alignment;
209
210 typedef enum _Ecore_X_Render_Subpixel_Order
211 {
212    ECORE_X_RENDER_SUBPIXEL_ORDER_UNKNOWN = 0,
213    ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_RGB = 1,
214    ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_BGR = 2,
215    ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_RGB = 3,
216    ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_BGR = 4,
217    ECORE_X_RENDER_SUBPIXEL_ORDER_NONE = 5
218 } Ecore_X_Render_Subpixel_Order;
219
220 typedef enum _Ecore_X_Randr_Edid_Display_Interface_Type
221 {
222    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_UNDEFINED,
223    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DVI,
224    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_HDMI_A,
225    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_HDMI_B,
226    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_MDDI,
227    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DISPLAY_PORT
228 } Ecore_X_Randr_Edid_Display_Interface_Type;
229
230 typedef enum _Ecore_X_Randr_Edid_Display_Colorscheme
231 {
232    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_MONOCHROME_GRAYSCALE = 0x00,
233    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB = 0x08,
234    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_NON_RGB = 0x10,
235    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_UNDEFINED = 0x18,
236    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_4_4_4 = 0x444000,
237    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_4_4 = 0x444,
238    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_2_2 = 0x422
239 } Ecore_X_Randr_Edid_Display_Colorscheme;
240
241 typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio
242 {
243    ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3 = 0x0,
244    ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9 = 0x1,
245    ECORE_X_RANDR_EDID_ASPECT_RATIO_16_10 = 0x2,
246    ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4 = 0x4,
247    ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9 = 0x8
248 } Ecore_X_Randr_Edid_Aspect_Ratio;
249
250 #define ECORE_X_RANDR_EDID_UNKNOWN_VALUE       -1
251
252 #define ECORE_X_SELECTION_TARGET_TARGETS       "TARGETS"
253 #define ECORE_X_SELECTION_TARGET_TEXT          "TEXT"
254 #define ECORE_X_SELECTION_TARGET_COMPOUND_TEXT "COMPOUND_TEXT"
255 #define ECORE_X_SELECTION_TARGET_STRING        "STRING"
256 #define ECORE_X_SELECTION_TARGET_UTF8_STRING   "UTF8_STRING"
257 #define ECORE_X_SELECTION_TARGET_FILENAME      "FILENAME"
258
259 #define ECORE_X_DND_VERSION                    5
260
261 typedef enum _Ecore_X_Selection
262 {
263    ECORE_X_SELECTION_PRIMARY,
264    ECORE_X_SELECTION_SECONDARY,
265    ECORE_X_SELECTION_XDND,
266    ECORE_X_SELECTION_CLIPBOARD,
267    ECORE_X_SELECTION_OTHER
268 } Ecore_X_Selection;
269
270 typedef enum _Ecore_X_Event_Mode
271 {
272    ECORE_X_EVENT_MODE_NORMAL,
273    ECORE_X_EVENT_MODE_WHILE_GRABBED,
274    ECORE_X_EVENT_MODE_GRAB,
275    ECORE_X_EVENT_MODE_UNGRAB
276 } Ecore_X_Event_Mode;
277
278 typedef enum _Ecore_X_Event_Detail
279 {
280    ECORE_X_EVENT_DETAIL_ANCESTOR,
281    ECORE_X_EVENT_DETAIL_VIRTUAL,
282    ECORE_X_EVENT_DETAIL_INFERIOR,
283    ECORE_X_EVENT_DETAIL_NON_LINEAR,
284    ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL,
285    ECORE_X_EVENT_DETAIL_POINTER,
286    ECORE_X_EVENT_DETAIL_POINTER_ROOT,
287    ECORE_X_EVENT_DETAIL_DETAIL_NONE
288 } Ecore_X_Event_Detail;
289
290 typedef enum _Ecore_X_Event_Mask
291 {
292    ECORE_X_EVENT_MASK_NONE = 0L,
293    ECORE_X_EVENT_MASK_KEY_DOWN = (1L << 0),
294    ECORE_X_EVENT_MASK_KEY_UP = (1L << 1),
295    ECORE_X_EVENT_MASK_MOUSE_DOWN = (1L << 2),
296    ECORE_X_EVENT_MASK_MOUSE_UP = (1L << 3),
297    ECORE_X_EVENT_MASK_MOUSE_IN = (1L << 4),
298    ECORE_X_EVENT_MASK_MOUSE_OUT = (1L << 5),
299    ECORE_X_EVENT_MASK_MOUSE_MOVE = (1L << 6),
300    ECORE_X_EVENT_MASK_WINDOW_DAMAGE = (1L << 15),
301    ECORE_X_EVENT_MASK_WINDOW_VISIBILITY = (1L << 16),
302    ECORE_X_EVENT_MASK_WINDOW_CONFIGURE = (1L << 17),
303    ECORE_X_EVENT_MASK_WINDOW_RESIZE_MANAGE = (1L << 18),
304    ECORE_X_EVENT_MASK_WINDOW_MANAGE = (1L << 19),
305    ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE = (1L << 20),
306    ECORE_X_EVENT_MASK_WINDOW_FOCUS_CHANGE = (1L << 21),
307    ECORE_X_EVENT_MASK_WINDOW_PROPERTY = (1L << 22),
308    ECORE_X_EVENT_MASK_WINDOW_COLORMAP = (1L << 23),
309    ECORE_X_EVENT_MASK_WINDOW_GRAB = (1L << 24),
310    ECORE_X_EVENT_MASK_MOUSE_WHEEL = (1L << 29),
311    ECORE_X_EVENT_MASK_WINDOW_FOCUS_IN = (1L << 30),
312    ECORE_X_EVENT_MASK_WINDOW_FOCUS_OUT = (1L << 31)
313 } Ecore_X_Event_Mask;
314
315 typedef enum _Ecore_X_Gravity
316 {
317    ECORE_X_GRAVITY_FORGET = 0,
318    ECORE_X_GRAVITY_UNMAP = 0,
319    ECORE_X_GRAVITY_NW = 1,
320    ECORE_X_GRAVITY_N = 2,
321    ECORE_X_GRAVITY_NE = 3,
322    ECORE_X_GRAVITY_W = 4,
323    ECORE_X_GRAVITY_CENTER = 5,
324    ECORE_X_GRAVITY_E = 6,
325    ECORE_X_GRAVITY_SW = 7,
326    ECORE_X_GRAVITY_S = 8,
327    ECORE_X_GRAVITY_SE = 9,
328    ECORE_X_GRAVITY_STATIC = 10
329 } Ecore_X_Gravity;
330
331 /* Needed for ecore_x_region_window_shape_set */
332 typedef enum _Ecore_X_Shape_Type
333 {
334    ECORE_X_SHAPE_BOUNDING,
335    ECORE_X_SHAPE_CLIP,
336    ECORE_X_SHAPE_INPUT
337 } Ecore_X_Shape_Type;
338
339 typedef enum _Ecore_X_Mapping_Type
340 {
341    ECORE_X_MAPPING_MODIFIER,
342    ECORE_X_MAPPING_KEYBOARD,
343    ECORE_X_MAPPING_MOUSE
344 } Ecore_X_Mapping_Type;
345
346 typedef enum _Ecore_X_Randr_Property_Change
347 {
348    ECORE_X_RANDR_PROPERTY_CHANGE_ADD,
349    ECORE_X_RANDR_PROPERTY_CHANGE_DEL
350 } Ecore_X_Randr_Property_Change;
351
352 /**
353  * @typedef _Ecore_X_Error_Code
354  * Defines the error codes of Ecore_X which wraps the X Window Systems 
355  * protocol's errors.
356  *
357  * @since 1.3.0
358  */
359 typedef enum _Ecore_X_Error_Code
360 {
361    /** Everything is okay. */
362    ECORE_X_ERROR_CODE_SUCCESS            = 0,
363    /** Bad request code */
364    ECORE_X_ERROR_CODE_BAD_REQUEST        = 1,
365    /** Int parameter out of range */
366    ECORE_X_ERROR_CODE_BAD_VALUE          = 2,
367    /** Parameter not a Window */
368    ECORE_X_ERROR_CODE_BAD_WINDOW         = 3,
369    /** Parameter not a Pixmap */
370    ECORE_X_ERROR_CODE_BAD_PIXMAP         = 4,
371    /** Parameter not an Atom */
372    ECORE_X_ERROR_CODE_BAD_ATOM           = 5,
373    /** Parameter not a Cursor */
374    ECORE_X_ERROR_CODE_BAD_CURSOR         = 6,
375    /** Parameter not a Font */
376    ECORE_X_ERROR_CODE_BAD_FONT           = 7,
377    /** Parameter mismatch */
378    ECORE_X_ERROR_CODE_BAD_MATCH          = 8,
379    /** Parameter not a Pixmap or Window */
380    ECORE_X_ERROR_CODE_BAD_DRAWABLE       = 9,
381    /** Bad access */
382    ECORE_X_ERROR_CODE_BAD_ACCESS         = 10,
383    /** Insufficient resources */
384    ECORE_X_ERROR_CODE_BAD_ALLOC          = 11,
385    /** No such colormap */
386    ECORE_X_ERROR_CODE_BAD_COLOR          = 12,
387    /** Parameter not a GC */
388    ECORE_X_ERROR_CODE_BAD_GC             = 13,
389    /** Choice not in range or already used */
390    ECORE_X_ERROR_CODE_BAD_ID_CHOICE      = 14,
391    /** Font or color name doesn't exist */
392    ECORE_X_ERROR_CODE_BAD_NAME           = 15,
393    /** Request length incorrect */
394    ECORE_X_ERROR_CODE_BAD_LENGTH         = 16,
395    /** Server is defective */
396    ECORE_X_ERROR_CODE_BAD_IMPLEMENTATION = 17,
397 } Ecore_X_Error_Code;
398
399 typedef struct _Ecore_X_Event_Mouse_In                     Ecore_X_Event_Mouse_In;
400 typedef struct _Ecore_X_Event_Mouse_Out                    Ecore_X_Event_Mouse_Out;
401 typedef struct _Ecore_X_Event_Window_Focus_In              Ecore_X_Event_Window_Focus_In;
402 typedef struct _Ecore_X_Event_Window_Focus_Out             Ecore_X_Event_Window_Focus_Out;
403 typedef struct _Ecore_X_Event_Window_Keymap                Ecore_X_Event_Window_Keymap;
404 typedef struct _Ecore_X_Event_Window_Damage                Ecore_X_Event_Window_Damage;
405 typedef struct _Ecore_X_Event_Window_Visibility_Change     Ecore_X_Event_Window_Visibility_Change;
406 typedef struct _Ecore_X_Event_Window_Create                Ecore_X_Event_Window_Create;
407 typedef struct _Ecore_X_Event_Window_Destroy               Ecore_X_Event_Window_Destroy;
408 typedef struct _Ecore_X_Event_Window_Hide                  Ecore_X_Event_Window_Hide;
409 typedef struct _Ecore_X_Event_Window_Show                  Ecore_X_Event_Window_Show;
410 typedef struct _Ecore_X_Event_Window_Show_Request          Ecore_X_Event_Window_Show_Request;
411 typedef struct _Ecore_X_Event_Window_Reparent              Ecore_X_Event_Window_Reparent;
412 typedef struct _Ecore_X_Event_Window_Configure             Ecore_X_Event_Window_Configure;
413 typedef struct _Ecore_X_Event_Window_Configure_Request     Ecore_X_Event_Window_Configure_Request;
414 typedef struct _Ecore_X_Event_Window_Gravity               Ecore_X_Event_Window_Gravity;
415 typedef struct _Ecore_X_Event_Window_Resize_Request        Ecore_X_Event_Window_Resize_Request;
416 typedef struct _Ecore_X_Event_Window_Stack                 Ecore_X_Event_Window_Stack;
417 typedef struct _Ecore_X_Event_Window_Stack_Request         Ecore_X_Event_Window_Stack_Request;
418 typedef struct _Ecore_X_Event_Window_Property              Ecore_X_Event_Window_Property;
419 typedef struct _Ecore_X_Event_Window_Colormap              Ecore_X_Event_Window_Colormap;
420 typedef struct _Ecore_X_Event_Mapping_Change               Ecore_X_Event_Mapping_Change;
421 typedef struct _Ecore_X_Event_Window_Mapping               Ecore_X_Event_Window_Mapping;
422 typedef struct _Ecore_X_Event_Selection_Clear              Ecore_X_Event_Selection_Clear;
423 typedef struct _Ecore_X_Event_Selection_Request            Ecore_X_Event_Selection_Request;
424 typedef struct _Ecore_X_Event_Selection_Notify             Ecore_X_Event_Selection_Notify;
425 typedef struct _Ecore_X_Event_Fixes_Selection_Notify       Ecore_X_Event_Fixes_Selection_Notify;
426 typedef struct _Ecore_X_Selection_Data                     Ecore_X_Selection_Data;
427 typedef struct _Ecore_X_Selection_Data_Files               Ecore_X_Selection_Data_Files;
428 typedef struct _Ecore_X_Selection_Data_Text                Ecore_X_Selection_Data_Text;
429 typedef struct _Ecore_X_Selection_Data_Targets             Ecore_X_Selection_Data_Targets;
430 typedef struct _Ecore_X_Event_Xdnd_Enter                   Ecore_X_Event_Xdnd_Enter;
431 typedef struct _Ecore_X_Event_Xdnd_Position                Ecore_X_Event_Xdnd_Position;
432 typedef struct _Ecore_X_Event_Xdnd_Status                  Ecore_X_Event_Xdnd_Status;
433 typedef struct _Ecore_X_Event_Xdnd_Leave                   Ecore_X_Event_Xdnd_Leave;
434 typedef struct _Ecore_X_Event_Xdnd_Drop                    Ecore_X_Event_Xdnd_Drop;
435 typedef struct _Ecore_X_Event_Xdnd_Finished                Ecore_X_Event_Xdnd_Finished;
436 typedef struct _Ecore_X_Event_Client_Message               Ecore_X_Event_Client_Message;
437 typedef struct _Ecore_X_Event_Window_Shape                 Ecore_X_Event_Window_Shape;
438 typedef struct _Ecore_X_Event_Screensaver_Notify           Ecore_X_Event_Screensaver_Notify;
439 typedef struct _Ecore_X_Event_Gesture_Notify_Flick         Ecore_X_Event_Gesture_Notify_Flick;
440 typedef struct _Ecore_X_Event_Gesture_Notify_Pan           Ecore_X_Event_Gesture_Notify_Pan;
441 typedef struct _Ecore_X_Event_Gesture_Notify_PinchRotation Ecore_X_Event_Gesture_Notify_PinchRotation;
442 typedef struct _Ecore_X_Event_Gesture_Notify_Tap           Ecore_X_Event_Gesture_Notify_Tap;
443 typedef struct _Ecore_X_Event_Gesture_Notify_TapNHold      Ecore_X_Event_Gesture_Notify_TapNHold;
444 typedef struct _Ecore_X_Event_Gesture_Notify_Hold          Ecore_X_Event_Gesture_Notify_Hold;
445 typedef struct _Ecore_X_Event_Gesture_Notify_Group         Ecore_X_Event_Gesture_Notify_Group;
446 typedef struct _Ecore_X_Event_Sync_Counter                 Ecore_X_Event_Sync_Counter;
447 typedef struct _Ecore_X_Event_Sync_Alarm                   Ecore_X_Event_Sync_Alarm;
448 typedef struct _Ecore_X_Event_Screen_Change                Ecore_X_Event_Screen_Change;
449 typedef struct _Ecore_X_Event_Randr_Crtc_Change            Ecore_X_Event_Randr_Crtc_Change;
450 typedef struct _Ecore_X_Event_Randr_Output_Change          Ecore_X_Event_Randr_Output_Change;
451 typedef struct _Ecore_X_Event_Randr_Output_Property_Notify Ecore_X_Event_Randr_Output_Property_Notify;
452
453 typedef struct _Ecore_X_Event_Window_Delete_Request        Ecore_X_Event_Window_Delete_Request;
454 typedef struct _Ecore_X_Event_Window_Move_Resize_Request   Ecore_X_Event_Window_Move_Resize_Request;
455 typedef struct _Ecore_X_Event_Window_State_Request         Ecore_X_Event_Window_State_Request;
456 typedef struct _Ecore_X_Event_Frame_Extents_Request        Ecore_X_Event_Frame_Extents_Request;
457 typedef struct _Ecore_X_Event_Ping                         Ecore_X_Event_Ping;
458 typedef struct _Ecore_X_Event_Desktop_Change               Ecore_X_Event_Desktop_Change;
459
460 typedef struct _Ecore_X_Event_Startup_Sequence             Ecore_X_Event_Startup_Sequence;
461
462 typedef struct _Ecore_X_Event_Generic                      Ecore_X_Event_Generic;
463
464 typedef struct _Ecore_X_Randr_Screen_Size                  Ecore_X_Randr_Screen_Size;
465 typedef struct _Ecore_X_Randr_Screen_Size_MM               Ecore_X_Randr_Screen_Size_MM;
466
467 typedef struct _Ecore_X_Xdnd_Position                      Ecore_X_Xdnd_Position;
468
469 struct _Ecore_X_Event_Mouse_In
470 {
471    int                  modifiers;
472    int                  x, y;
473    Eina_Bool            same_screen : 1;
474    struct
475    {
476       int x, y;
477    } root;
478    Ecore_X_Window       win;
479    Ecore_X_Window       event_win;
480    Ecore_X_Window       root_win;
481    Ecore_X_Event_Mode   mode;
482    Ecore_X_Event_Detail detail;
483    Ecore_X_Time         time;
484 };
485
486 struct _Ecore_X_Event_Mouse_Out
487 {
488    int                  modifiers;
489    int                  x, y;
490    int                  same_screen;
491    struct
492    {
493       int x, y;
494    } root;
495    Ecore_X_Window       win;
496    Ecore_X_Window       event_win;
497    Ecore_X_Window       root_win;
498    Ecore_X_Event_Mode   mode;
499    Ecore_X_Event_Detail detail;
500    Ecore_X_Time         time;
501 };
502
503 struct _Ecore_X_Event_Window_Focus_In
504 {
505    Ecore_X_Window       win;
506    Ecore_X_Event_Mode   mode;
507    Ecore_X_Event_Detail detail;
508    Ecore_X_Time         time;
509 };
510
511 struct _Ecore_X_Event_Window_Focus_Out
512 {
513    Ecore_X_Window       win;
514    Ecore_X_Event_Mode   mode;
515    Ecore_X_Event_Detail detail;
516    Ecore_X_Time         time;
517 };
518
519 struct _Ecore_X_Event_Window_Keymap
520 {
521    Ecore_X_Window win;
522 };
523
524 struct _Ecore_X_Event_Window_Damage
525 {
526    Ecore_X_Window win;
527    int            x, y, w, h;
528    int            count;
529    Ecore_X_Time   time;
530 };
531
532 struct _Ecore_X_Event_Window_Visibility_Change
533 {
534    Ecore_X_Window win;
535    int            fully_obscured;
536    Ecore_X_Time   time;
537 };
538
539 struct _Ecore_X_Event_Window_Create
540 {
541    Ecore_X_Window win;
542    Ecore_X_Window parent;
543    int            override;
544    int            x, y, w, h;
545    int            border;
546    Ecore_X_Time   time;
547 };
548
549 struct _Ecore_X_Event_Window_Destroy
550 {
551    Ecore_X_Window win;
552    Ecore_X_Window event_win;
553    Ecore_X_Time   time;
554 };
555
556 struct _Ecore_X_Event_Window_Hide
557 {
558    Ecore_X_Window win;
559    Ecore_X_Window event_win;
560    Ecore_X_Time   time;
561 };
562
563 struct _Ecore_X_Event_Window_Show
564 {
565    Ecore_X_Window win;
566    Ecore_X_Window event_win;
567    Ecore_X_Time   time;
568 };
569
570 struct _Ecore_X_Event_Window_Show_Request
571 {
572    Ecore_X_Window win;
573    Ecore_X_Window parent;
574    Ecore_X_Time   time;
575 };
576
577 struct _Ecore_X_Event_Window_Reparent
578 {
579    Ecore_X_Window win;
580    Ecore_X_Window event_win;
581    Ecore_X_Window parent;
582    Ecore_X_Time   time;
583 };
584
585 struct _Ecore_X_Event_Window_Configure
586 {
587    Ecore_X_Window win;
588    Ecore_X_Window event_win;
589    Ecore_X_Window abovewin;
590    int            x, y, w, h;
591    int            border;
592    Eina_Bool      override : 1;
593    Eina_Bool      from_wm : 1;
594    Ecore_X_Time   time;
595 };
596
597 struct _Ecore_X_Event_Window_Configure_Request
598 {
599    Ecore_X_Window            win;
600    Ecore_X_Window            parent_win;
601    Ecore_X_Window            abovewin;
602    int                       x, y, w, h;
603    int                       border;
604    Ecore_X_Window_Stack_Mode detail;
605    unsigned long             value_mask;
606    Ecore_X_Time              time;
607 };
608
609 struct _Ecore_X_Event_Window_Gravity
610 {
611    Ecore_X_Window win;
612    Ecore_X_Window event_win;
613    Ecore_X_Time   time;
614 };
615
616 struct _Ecore_X_Event_Window_Resize_Request
617 {
618    Ecore_X_Window win;
619    int            w, h;
620    Ecore_X_Time   time;
621 };
622
623 struct _Ecore_X_Event_Window_Stack
624 {
625    Ecore_X_Window            win;
626    Ecore_X_Window            event_win;
627    Ecore_X_Window_Stack_Mode detail;
628    Ecore_X_Time              time;
629 };
630
631 struct _Ecore_X_Event_Window_Stack_Request
632 {
633    Ecore_X_Window            win;
634    Ecore_X_Window            parent;
635    Ecore_X_Window_Stack_Mode detail;
636    Ecore_X_Time              time;
637 };
638
639 struct _Ecore_X_Event_Window_Property
640 {
641    Ecore_X_Window win;
642    Ecore_X_Atom   atom;
643    Ecore_X_Time   time;
644 };
645
646 struct _Ecore_X_Event_Window_Colormap
647 {
648    Ecore_X_Window   win;
649    Ecore_X_Colormap cmap;
650    Eina_Bool        installed : 1;
651    Ecore_X_Time     time;
652 };
653
654 struct _Ecore_X_Event_Mapping_Change
655 {
656    Ecore_X_Mapping_Type type;
657    int                  keycode;
658    int                  num;
659 };
660
661 struct _Ecore_X_Event_Selection_Clear
662 {
663    Ecore_X_Window    win;
664    Ecore_X_Selection selection;
665    Ecore_X_Atom      atom;
666    Ecore_X_Time      time;
667 };
668
669 struct _Ecore_X_Event_Selection_Request
670 {
671    Ecore_X_Window owner;
672    Ecore_X_Window requestor;
673    Ecore_X_Time   time;
674    Ecore_X_Atom   selection;
675    Ecore_X_Atom   target;
676    Ecore_X_Atom   property;
677 };
678
679 typedef enum
680 {
681    ECORE_X_OWNER_CHANGE_REASON_NEW_OWNER,
682    ECORE_X_OWNER_CHANGE_REASON_DESTROY,
683    ECORE_X_OWNER_CHANGE_REASON_CLOSE
684 } Ecore_X_Owner_Change_Reason;
685
686 struct _Ecore_X_Event_Fixes_Selection_Notify
687 {
688    Ecore_X_Window              win;
689    Ecore_X_Window              owner;
690    Ecore_X_Time                time;
691    Ecore_X_Time                selection_time;
692    Ecore_X_Selection           selection;
693    Ecore_X_Atom                atom;
694    Ecore_X_Owner_Change_Reason reason;
695 };
696
697 struct _Ecore_X_Event_Selection_Notify
698 {
699    Ecore_X_Window    win;
700    Ecore_X_Time      time;
701    Ecore_X_Selection selection;
702    Ecore_X_Atom      atom;
703    char             *target;
704    void             *data;
705 };
706
707 struct _Ecore_X_Selection_Data
708 {
709    enum
710    {
711       ECORE_X_SELECTION_CONTENT_NONE,
712       ECORE_X_SELECTION_CONTENT_TEXT,
713       ECORE_X_SELECTION_CONTENT_FILES,
714       ECORE_X_SELECTION_CONTENT_TARGETS,
715       ECORE_X_SELECTION_CONTENT_CUSTOM
716    } content;
717    unsigned char *data;
718    int            length;
719    int            format;
720    int            (*free)(void *data);
721 };
722
723 struct _Ecore_X_Selection_Data_Files
724 {
725    Ecore_X_Selection_Data data;
726    char                 **files;
727    int                    num_files;
728 };
729
730 struct _Ecore_X_Selection_Data_Text
731 {
732    Ecore_X_Selection_Data data;
733    char                  *text;
734 };
735
736 struct _Ecore_X_Selection_Data_Targets
737 {
738    Ecore_X_Selection_Data data;
739    char                 **targets;
740    int                    num_targets;
741 };
742
743 struct _Ecore_X_Event_Xdnd_Enter
744 {
745    Ecore_X_Window win, source;
746
747    char         **types;
748    int            num_types;
749 };
750
751 struct _Ecore_X_Event_Xdnd_Position
752 {
753    Ecore_X_Window win, source;
754    struct
755    {
756       int x, y;
757    } position;
758    Ecore_X_Atom   action;
759 };
760
761 struct _Ecore_X_Xdnd_Position
762 {
763    Ecore_X_Window win, prev;
764    struct
765    {
766       int x, y;
767    } position;
768 };
769
770 struct _Ecore_X_Event_Xdnd_Status
771 {
772    Ecore_X_Window    win, target;
773    Eina_Bool         will_accept : 1;
774    Ecore_X_Rectangle rectangle;
775    Ecore_X_Atom      action;
776 };
777
778 struct _Ecore_X_Event_Xdnd_Leave
779 {
780    Ecore_X_Window win, source;
781 };
782
783 struct _Ecore_X_Event_Xdnd_Drop
784 {
785    Ecore_X_Window win, source;
786    Ecore_X_Atom   action;
787    struct
788    {
789       int x, y;
790    } position;
791 };
792
793 struct _Ecore_X_Event_Xdnd_Finished
794 {
795    Ecore_X_Window win, target;
796    Eina_Bool      completed : 1;
797    Ecore_X_Atom   action;
798 };
799
800 struct _Ecore_X_Event_Client_Message
801 {
802    Ecore_X_Window win;
803    Ecore_X_Atom   message_type;
804    int            format;
805    union
806    {
807       char  b[20];
808       short s[10];
809       long  l[5];
810    } data;
811    Ecore_X_Time   time;
812 };
813
814 struct _Ecore_X_Event_Window_Shape
815 {
816    Ecore_X_Window     win;
817    Ecore_X_Time       time;
818    Ecore_X_Shape_Type type;
819    int                x, y, w, h;
820    Eina_Bool          shaped : 1;
821 };
822
823 struct _Ecore_X_Event_Screensaver_Notify
824 {
825    Ecore_X_Window win;
826    Eina_Bool      on : 1;
827    Ecore_X_Time   time;
828 };
829
830 struct _Ecore_X_Event_Sync_Counter
831 {
832    Ecore_X_Time time;
833 };
834
835 struct _Ecore_X_Event_Sync_Alarm
836 {
837    Ecore_X_Time       time;
838    Ecore_X_Sync_Alarm alarm;
839 };
840
841 struct _Ecore_X_Randr_Screen_Size
842 {
843    int width, height;
844 };
845
846 struct _Ecore_X_Randr_Screen_Size_MM
847 {
848    int width, height, width_mm, height_mm;
849 };
850
851 struct _Ecore_X_Event_Screen_Change
852 {
853    Ecore_X_Window                win;
854    Ecore_X_Window                root;
855    Ecore_X_Randr_Screen_Size_MM  size;  /* in pixel and millimeters */
856    Ecore_X_Time                  time;
857    Ecore_X_Time                  config_time;
858    Ecore_X_Randr_Orientation     orientation;
859    Ecore_X_Render_Subpixel_Order subpixel_order;
860    Ecore_X_Randr_Size_ID         size_id;
861 };
862
863 struct _Ecore_X_Event_Randr_Crtc_Change
864 {
865    Ecore_X_Window            win;
866    Ecore_X_Randr_Crtc        crtc;
867    Ecore_X_Randr_Mode        mode;
868    Ecore_X_Randr_Orientation orientation;
869    Eina_Rectangle            geo;
870 };
871
872 struct _Ecore_X_Event_Randr_Output_Change
873 {
874    Ecore_X_Window                  win;
875    Ecore_X_Randr_Output            output;
876    Ecore_X_Randr_Crtc              crtc;
877    Ecore_X_Randr_Mode              mode;
878    Ecore_X_Randr_Orientation       orientation;
879    Ecore_X_Randr_Connection_Status connection;
880    Ecore_X_Render_Subpixel_Order   subpixel_order;
881 };
882
883 struct _Ecore_X_Event_Randr_Output_Property_Notify
884 {
885    Ecore_X_Window                win;
886    Ecore_X_Randr_Output          output;
887    Ecore_X_Atom                  property;
888    Ecore_X_Time                  time;
889    Ecore_X_Randr_Property_Change state;
890 };
891
892 struct _Ecore_X_Event_Window_Delete_Request
893 {
894    Ecore_X_Window win;
895    Ecore_X_Time   time;
896 };
897
898 struct _Ecore_X_Event_Startup_Sequence
899 {
900    Ecore_X_Window win;
901 };
902
903 struct _Ecore_X_Event_Window_Move_Resize_Request
904 {
905    Ecore_X_Window win;
906    int            x, y;
907    int            direction;
908    int            button;
909    int            source;
910 };
911
912 struct _Ecore_X_Event_Window_State_Request
913 {
914    Ecore_X_Window              win;
915    Ecore_X_Window_State_Action action;
916    Ecore_X_Window_State        state[2];
917    int                         source;
918 };
919
920 struct _Ecore_X_Event_Frame_Extents_Request
921 {
922    Ecore_X_Window win;
923 };
924
925 struct _Ecore_X_Event_Ping
926 {
927    Ecore_X_Window win;
928    Ecore_X_Window event_win;
929    Ecore_X_Time   time;
930 };
931
932 struct _Ecore_X_Event_Desktop_Change
933 {
934    Ecore_X_Window win;
935    unsigned int   desk;
936    int            source;
937 };
938
939 struct _Ecore_X_Event_Generic
940 {
941    int          extension;
942    int          evtype;
943    unsigned int cookie;
944    void        *data;
945 };
946
947 EAPI extern int ECORE_X_EVENT_ANY; /**< low level event dependent on
948                                         backend in use, if Xlib will be XEvent,
949                                         if XCB will be xcb_generic_event_t.
950                                         @warning avoid using it.
951                                     */
952 EAPI extern int ECORE_X_EVENT_MOUSE_IN;
953 EAPI extern int ECORE_X_EVENT_MOUSE_OUT;
954 EAPI extern int ECORE_X_EVENT_WINDOW_FOCUS_IN;
955 EAPI extern int ECORE_X_EVENT_WINDOW_FOCUS_OUT;
956 EAPI extern int ECORE_X_EVENT_WINDOW_KEYMAP;
957 EAPI extern int ECORE_X_EVENT_WINDOW_DAMAGE;
958 EAPI extern int ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE;
959 EAPI extern int ECORE_X_EVENT_WINDOW_CREATE;
960 EAPI extern int ECORE_X_EVENT_WINDOW_DESTROY;
961 EAPI extern int ECORE_X_EVENT_WINDOW_HIDE;
962 EAPI extern int ECORE_X_EVENT_WINDOW_SHOW;
963 EAPI extern int ECORE_X_EVENT_WINDOW_SHOW_REQUEST;
964 EAPI extern int ECORE_X_EVENT_WINDOW_REPARENT;
965 EAPI extern int ECORE_X_EVENT_WINDOW_CONFIGURE;
966 EAPI extern int ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST;
967 EAPI extern int ECORE_X_EVENT_WINDOW_GRAVITY;
968 EAPI extern int ECORE_X_EVENT_WINDOW_RESIZE_REQUEST;
969 EAPI extern int ECORE_X_EVENT_WINDOW_STACK;
970 EAPI extern int ECORE_X_EVENT_WINDOW_STACK_REQUEST;
971 EAPI extern int ECORE_X_EVENT_WINDOW_PROPERTY;
972 EAPI extern int ECORE_X_EVENT_WINDOW_COLORMAP;
973 EAPI extern int ECORE_X_EVENT_WINDOW_MAPPING;
974 EAPI extern int ECORE_X_EVENT_MAPPING_CHANGE;
975 EAPI extern int ECORE_X_EVENT_SELECTION_CLEAR;
976 EAPI extern int ECORE_X_EVENT_SELECTION_REQUEST;
977 EAPI extern int ECORE_X_EVENT_SELECTION_NOTIFY;
978 EAPI extern int ECORE_X_EVENT_FIXES_SELECTION_NOTIFY;
979 EAPI extern int ECORE_X_EVENT_CLIENT_MESSAGE;
980 EAPI extern int ECORE_X_EVENT_WINDOW_SHAPE;
981 EAPI extern int ECORE_X_EVENT_SCREENSAVER_NOTIFY;
982 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_FLICK;
983 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_PAN;
984 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_PINCHROTATION;
985 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_TAP;
986 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_TAPNHOLD;
987 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_HOLD;
988 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_GROUP;
989 EAPI extern int ECORE_X_EVENT_SYNC_COUNTER;
990 EAPI extern int ECORE_X_EVENT_SYNC_ALARM;
991 EAPI extern int ECORE_X_EVENT_SCREEN_CHANGE;
992 EAPI extern int ECORE_X_EVENT_RANDR_CRTC_CHANGE;
993 EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE;
994 EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY;
995 EAPI extern int ECORE_X_EVENT_DAMAGE_NOTIFY;
996
997 EAPI extern int ECORE_X_EVENT_WINDOW_DELETE_REQUEST;
998
999 EAPI extern int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST;
1000 EAPI extern int ECORE_X_EVENT_WINDOW_STATE_REQUEST;
1001 EAPI extern int ECORE_X_EVENT_FRAME_EXTENTS_REQUEST;
1002 EAPI extern int ECORE_X_EVENT_PING;
1003 EAPI extern int ECORE_X_EVENT_DESKTOP_CHANGE;
1004
1005 EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_NEW;
1006 EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
1007 EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE;
1008
1009 EAPI extern int ECORE_X_EVENT_GENERIC;
1010
1011 EAPI extern int ECORE_X_EVENT_XDND_ENTER;
1012 EAPI extern int ECORE_X_EVENT_XDND_POSITION;
1013 EAPI extern int ECORE_X_EVENT_XDND_STATUS;
1014 EAPI extern int ECORE_X_EVENT_XDND_LEAVE;
1015 EAPI extern int ECORE_X_EVENT_XDND_DROP;
1016 EAPI extern int ECORE_X_EVENT_XDND_FINISHED;
1017
1018 EAPI extern int ECORE_X_LOCK_SCROLL;
1019 EAPI extern int ECORE_X_LOCK_NUM;
1020 EAPI extern int ECORE_X_LOCK_CAPS;
1021 EAPI extern int ECORE_X_LOCK_SHIFT;
1022
1023 typedef enum _Ecore_X_WM_Protocol
1024 {
1025    /* If enabled the window manager will be asked to send a
1026     * delete message instead of just closing (destroying) the window. */
1027      ECORE_X_WM_PROTOCOL_DELETE_REQUEST,
1028
1029      /* If enabled the window manager will be told that the window
1030       * explicitly sets input focus. */
1031      ECORE_X_WM_PROTOCOL_TAKE_FOCUS,
1032
1033      /* If enabled the window manager can ping the window to check
1034       * if it is alive. */
1035      ECORE_X_NET_WM_PROTOCOL_PING,
1036
1037      /* If enabled the window manager can sync updating with the
1038       * window (?) */
1039      ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST,
1040
1041      /* Number of defined items */
1042      ECORE_X_WM_PROTOCOL_NUM
1043 } Ecore_X_WM_Protocol;
1044
1045 typedef enum _Ecore_X_Window_Input_Mode
1046 {
1047    /* The window can never be focused */
1048     ECORE_X_WINDOW_INPUT_MODE_NONE,
1049
1050     /* The window can be focused by the WM but doesn't focus itself */
1051     ECORE_X_WINDOW_INPUT_MODE_PASSIVE,
1052
1053     /* The window sets the focus itself if one of its sub-windows
1054      * already is focused */
1055     ECORE_X_WINDOW_INPUT_MODE_ACTIVE_LOCAL,
1056
1057     /* The window sets the focus itself even if another window
1058      * is currently focused */
1059     ECORE_X_WINDOW_INPUT_MODE_ACTIVE_GLOBAL
1060 } Ecore_X_Window_Input_Mode;
1061
1062 /**
1063  * @typedef _Ecore_X_Window_State_Hint
1064  * Defines the different state hint of the window of Ecore_X.
1065  */
1066 typedef enum _Ecore_X_Window_State_Hint
1067 {
1068    /** Do not provide any state hint to the window manager */
1069     ECORE_X_WINDOW_STATE_HINT_NONE = -1,
1070
1071     /** The window wants to remain hidden and NOT iconified */
1072     ECORE_X_WINDOW_STATE_HINT_WITHDRAWN,
1073
1074     /** The window wants to be mapped normally */
1075     ECORE_X_WINDOW_STATE_HINT_NORMAL,
1076
1077     /** The window wants to start in an iconified state */
1078     ECORE_X_WINDOW_STATE_HINT_ICONIC
1079 } Ecore_X_Window_State_Hint;
1080
1081 typedef enum _Ecore_X_Window_Type
1082 {
1083    ECORE_X_WINDOW_TYPE_UNKNOWN = 0,
1084    ECORE_X_WINDOW_TYPE_DESKTOP,
1085    ECORE_X_WINDOW_TYPE_DOCK,
1086    ECORE_X_WINDOW_TYPE_TOOLBAR,
1087    ECORE_X_WINDOW_TYPE_MENU,
1088    ECORE_X_WINDOW_TYPE_UTILITY,
1089    ECORE_X_WINDOW_TYPE_SPLASH,
1090    ECORE_X_WINDOW_TYPE_DIALOG,
1091    ECORE_X_WINDOW_TYPE_NORMAL,
1092    ECORE_X_WINDOW_TYPE_DROPDOWN_MENU,
1093    ECORE_X_WINDOW_TYPE_POPUP_MENU,
1094    ECORE_X_WINDOW_TYPE_TOOLTIP,
1095    ECORE_X_WINDOW_TYPE_NOTIFICATION,
1096    ECORE_X_WINDOW_TYPE_COMBO,
1097    ECORE_X_WINDOW_TYPE_DND
1098 } Ecore_X_Window_Type;
1099
1100 typedef enum _Ecore_X_Action
1101 {
1102    ECORE_X_ACTION_MOVE,
1103    ECORE_X_ACTION_RESIZE,
1104    ECORE_X_ACTION_MINIMIZE,
1105    ECORE_X_ACTION_SHADE,
1106    ECORE_X_ACTION_STICK,
1107    ECORE_X_ACTION_MAXIMIZE_HORZ,
1108    ECORE_X_ACTION_MAXIMIZE_VERT,
1109    ECORE_X_ACTION_FULLSCREEN,
1110    ECORE_X_ACTION_CHANGE_DESKTOP,
1111    ECORE_X_ACTION_CLOSE,
1112    ECORE_X_ACTION_ABOVE,
1113    ECORE_X_ACTION_BELOW
1114 } Ecore_X_Action;
1115
1116 typedef enum _Ecore_X_Window_Configure_Mask
1117 {
1118    ECORE_X_WINDOW_CONFIGURE_MASK_X = (1 << 0),
1119    ECORE_X_WINDOW_CONFIGURE_MASK_Y = (1 << 1),
1120    ECORE_X_WINDOW_CONFIGURE_MASK_W = (1 << 2),
1121    ECORE_X_WINDOW_CONFIGURE_MASK_H = (1 << 3),
1122    ECORE_X_WINDOW_CONFIGURE_MASK_BORDER_WIDTH = (1 << 4),
1123    ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING = (1 << 5),
1124    ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE = (1 << 6)
1125 } Ecore_X_Window_Configure_Mask;
1126
1127 typedef enum _Ecore_X_Virtual_Keyboard_State
1128 {
1129    ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN = 0,
1130    ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF,
1131    ECORE_X_VIRTUAL_KEYBOARD_STATE_ON,
1132    ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA,
1133    ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC,
1134    ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN,
1135    ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER,
1136    ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX,
1137    ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL,
1138    ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD,
1139    ECORE_X_VIRTUAL_KEYBOARD_STATE_IP,
1140    ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST,
1141    ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE,
1142    ECORE_X_VIRTUAL_KEYBOARD_STATE_URL,
1143    ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD,
1144    ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME
1145 } Ecore_X_Virtual_Keyboard_State;
1146
1147 typedef enum _Ecore_X_Illume_Mode
1148 {
1149    ECORE_X_ILLUME_MODE_UNKNOWN = 0,
1150    ECORE_X_ILLUME_MODE_SINGLE,
1151    ECORE_X_ILLUME_MODE_DUAL_TOP,
1152    ECORE_X_ILLUME_MODE_DUAL_LEFT
1153 } Ecore_X_Illume_Mode;
1154
1155 typedef enum _Ecore_X_Illume_Quickpanel_State
1156 {
1157    ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN = 0,
1158    ECORE_X_ILLUME_QUICKPANEL_STATE_OFF,
1159    ECORE_X_ILLUME_QUICKPANEL_STATE_ON
1160 } Ecore_X_Illume_Quickpanel_State;
1161
1162 typedef enum _Ecore_X_Illume_Indicator_State
1163 {
1164    ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN = 0,
1165    ECORE_X_ILLUME_INDICATOR_STATE_OFF,
1166    ECORE_X_ILLUME_INDICATOR_STATE_ON
1167 } Ecore_X_Illume_Indicator_State;
1168
1169 typedef enum _Ecore_X_Illume_Clipboard_State
1170 {
1171    ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN = 0,
1172    ECORE_X_ILLUME_CLIPBOARD_STATE_OFF,
1173    ECORE_X_ILLUME_CLIPBOARD_STATE_ON
1174 } Ecore_X_Illume_Clipboard_State;
1175
1176 typedef enum _Ecore_X_Illume_Indicator_Opacity_Mode
1177 {
1178    ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN = 0,
1179    ECORE_X_ILLUME_INDICATOR_OPAQUE,
1180    ECORE_X_ILLUME_INDICATOR_TRANSLUCENT,
1181    ECORE_X_ILLUME_INDICATOR_TRANSPARENT
1182 } Ecore_X_Illume_Indicator_Opacity_Mode;
1183
1184 /* Window layer constants */
1185 #define ECORE_X_WINDOW_LAYER_BELOW  2
1186 #define ECORE_X_WINDOW_LAYER_NORMAL 4
1187 #define ECORE_X_WINDOW_LAYER_ABOVE  6
1188
1189 /* Property list operations */
1190 #define ECORE_X_PROP_LIST_REMOVE    0
1191 #define ECORE_X_PROP_LIST_ADD       1
1192 #define ECORE_X_PROP_LIST_TOGGLE    2
1193
1194 EAPI int
1195  ecore_x_init(const char *name);
1196 EAPI int
1197  ecore_x_shutdown(void);
1198 EAPI int
1199  ecore_x_disconnect(void);
1200 EAPI Ecore_X_Display *
1201  ecore_x_display_get(void);
1202 EAPI Ecore_X_Connection *
1203  ecore_x_connection_get(void);
1204 EAPI int
1205  ecore_x_fd_get(void);
1206 EAPI Ecore_X_Screen *
1207  ecore_x_default_screen_get(void);
1208 EAPI void
1209  ecore_x_screen_size_get(const Ecore_X_Screen *screen,
1210                         int *w,
1211                         int *h);
1212 EAPI int
1213  ecore_x_screen_count_get(void);
1214 EAPI int
1215  ecore_x_screen_index_get(const Ecore_X_Screen *screen);
1216 EAPI Ecore_X_Screen *
1217  ecore_x_screen_get(int index);
1218
1219 EAPI void
1220  ecore_x_double_click_time_set(double t);
1221 EAPI double
1222  ecore_x_double_click_time_get(void);
1223 EAPI void
1224  ecore_x_flush(void);
1225 EAPI void
1226  ecore_x_sync(void);
1227 EAPI void
1228  ecore_x_killall(Ecore_X_Window root);
1229 EAPI void
1230  ecore_x_kill(Ecore_X_Window win);
1231 EAPI int
1232  ecore_x_dpi_get(void);
1233 EAPI Eina_Bool
1234  ecore_x_bell(int percent);
1235 EAPI unsigned int
1236  ecore_x_visual_id_get(Ecore_X_Visual visual);
1237
1238 EAPI Ecore_X_Visual
1239 ecore_x_default_visual_get(Ecore_X_Display *disp,
1240                            Ecore_X_Screen *screen);
1241 EAPI Ecore_X_Colormap
1242 ecore_x_default_colormap_get(Ecore_X_Display *disp,
1243                              Ecore_X_Screen *screen);
1244 EAPI int
1245 ecore_x_default_depth_get(Ecore_X_Display *disp,
1246                           Ecore_X_Screen *screen);
1247
1248 EAPI Ecore_X_Time
1249 ecore_x_current_time_get(void);
1250
1251 EAPI void
1252 ecore_x_error_handler_set(void (*func)(void *data),
1253                           const void *data);
1254 EAPI void
1255 ecore_x_io_error_handler_set(void (*func)(void *data),
1256                              const void *data);
1257 EAPI int
1258  ecore_x_error_request_get(void);
1259 EAPI int
1260  ecore_x_error_code_get(void);
1261 EAPI Ecore_X_ID
1262 ecore_x_error_resource_id_get(void);
1263
1264 EAPI void
1265 ecore_x_event_mask_set(Ecore_X_Window w,
1266                        Ecore_X_Event_Mask mask);
1267 EAPI void
1268 ecore_x_event_mask_unset(Ecore_X_Window w,
1269                          Ecore_X_Event_Mask mask);
1270
1271 EAPI Eina_Bool
1272 ecore_x_selection_notify_send(Ecore_X_Window requestor,
1273                               Ecore_X_Atom selection,
1274                               Ecore_X_Atom target,
1275                               Ecore_X_Atom property,
1276                               Ecore_X_Time time);
1277 EAPI Eina_Bool
1278 ecore_x_selection_primary_set(Ecore_X_Window w,
1279                               const void *data,
1280                               int size);
1281 EAPI Eina_Bool
1282  ecore_x_selection_primary_clear(void);
1283 EAPI Eina_Bool
1284  ecore_x_selection_secondary_set(Ecore_X_Window w,
1285                                 const void *data,
1286                                 int size);
1287 EAPI Eina_Bool
1288  ecore_x_selection_secondary_clear(void);
1289 EAPI Eina_Bool
1290  ecore_x_selection_xdnd_set(Ecore_X_Window w,
1291                            const void *data,
1292                            int size);
1293 EAPI Eina_Bool
1294  ecore_x_selection_xdnd_clear(void);
1295 EAPI Eina_Bool
1296  ecore_x_selection_clipboard_set(Ecore_X_Window w,
1297                                 const void *data,
1298                                 int size);
1299 EAPI Eina_Bool
1300  ecore_x_selection_clipboard_clear(void);
1301 EAPI void
1302  ecore_x_selection_primary_request(Ecore_X_Window w,
1303                                   const char *target);
1304 EAPI void
1305 ecore_x_selection_secondary_request(Ecore_X_Window w,
1306                                     const char *target);
1307 EAPI void
1308 ecore_x_selection_xdnd_request(Ecore_X_Window w,
1309                                const char *target);
1310 EAPI void
1311 ecore_x_selection_clipboard_request(Ecore_X_Window w,
1312                                     const char *target);
1313 EAPI Eina_Bool
1314 ecore_x_selection_convert(Ecore_X_Atom selection,
1315                           Ecore_X_Atom target,
1316                           void **data_ret,
1317                           int *len,
1318                           Ecore_X_Atom *targprop,
1319                           int *targsize);
1320 EAPI void
1321 ecore_x_selection_converter_add(char *target,
1322                                 Eina_Bool (*func)(char *target,
1323                                                   void *data,
1324                                                   int size,
1325                                                   void **data_ret,
1326                                                   int *size_ret,
1327                                                   Ecore_X_Atom *,
1328                                                   int *));
1329 EAPI void
1330 ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
1331                                      Eina_Bool (*func)(char *target,
1332                                                        void *data,
1333                                                        int size,
1334                                                        void **data_ret,
1335                                                        int *size_ret,
1336                                                        Ecore_X_Atom *tprop,
1337                                                        int *tsize));
1338 EAPI void
1339  ecore_x_selection_converter_del(char *target);
1340 EAPI void
1341  ecore_x_selection_converter_atom_del(Ecore_X_Atom target);
1342 EAPI void
1343  ecore_x_selection_parser_add(const char *target,
1344                              void *(*func)(const char *target, void *data, int size, int format));
1345 EAPI void
1346  ecore_x_selection_parser_del(const char *target);
1347 EAPI void
1348  ecore_x_selection_owner_set(Ecore_X_Window win,
1349                             Ecore_X_Atom atom,
1350                             Ecore_X_Time tm);
1351 EAPI Ecore_X_Window
1352 ecore_x_selection_owner_get(Ecore_X_Atom atom);
1353
1354 EAPI void
1355 ecore_x_dnd_aware_set(Ecore_X_Window win,
1356                       Eina_Bool on);
1357 EAPI int
1358  ecore_x_dnd_version_get(Ecore_X_Window win);
1359 EAPI Eina_Bool
1360  ecore_x_dnd_type_isset(Ecore_X_Window win,
1361                        const char *type);
1362 EAPI void
1363 ecore_x_dnd_type_set(Ecore_X_Window win,
1364                      const char *type,
1365                      Eina_Bool on);
1366 EAPI void
1367 ecore_x_dnd_types_set(Ecore_X_Window win,
1368                       const char **types,
1369                       unsigned int num_types);
1370 EAPI void
1371 ecore_x_dnd_actions_set(Ecore_X_Window win,
1372                         Ecore_X_Atom *actions,
1373                         unsigned int num_actions);
1374 EAPI Eina_Bool
1375 ecore_x_dnd_begin(Ecore_X_Window source,
1376                   unsigned char *data,
1377                   int size);
1378 EAPI Eina_Bool
1379  ecore_x_dnd_drop(void);
1380 EAPI void
1381  ecore_x_dnd_send_status(Eina_Bool will_accept,
1382                         Eina_Bool suppress,
1383                         Ecore_X_Rectangle rectangle,
1384                         Ecore_X_Atom action);
1385 EAPI void
1386  ecore_x_dnd_send_finished(void);
1387 EAPI void
1388  ecore_x_dnd_source_action_set(Ecore_X_Atom action);
1389 EAPI Ecore_X_Atom
1390  ecore_x_dnd_source_action_get(void);
1391 EAPI void
1392  ecore_x_dnd_callback_pos_update_set(void (*cb)(void *,
1393                                                Ecore_X_Xdnd_Position *data),
1394                                     const void *data);
1395
1396 EAPI Ecore_X_Window
1397 ecore_x_window_new(Ecore_X_Window parent,
1398                    int x,
1399                    int y,
1400                    int w,
1401                    int h);
1402 EAPI Ecore_X_Window
1403 ecore_x_window_override_new(Ecore_X_Window parent,
1404                             int x,
1405                             int y,
1406                             int w,
1407                             int h);
1408 EAPI int
1409  ecore_x_window_argb_get(Ecore_X_Window win);
1410 EAPI Ecore_X_Window
1411  ecore_x_window_manager_argb_new(Ecore_X_Window parent,
1412                                 int x,
1413                                 int y,
1414                                 int w,
1415                                 int h);
1416 EAPI Ecore_X_Window
1417 ecore_x_window_argb_new(Ecore_X_Window parent,
1418                         int x,
1419                         int y,
1420                         int w,
1421                         int h);
1422 EAPI Ecore_X_Window
1423 ecore_x_window_override_argb_new(Ecore_X_Window parent,
1424                                  int x,
1425                                  int y,
1426                                  int w,
1427                                  int h);
1428 EAPI Ecore_X_Window
1429 ecore_x_window_input_new(Ecore_X_Window parent,
1430                          int x,
1431                          int y,
1432                          int w,
1433                          int h);
1434 EAPI void
1435 ecore_x_window_configure(Ecore_X_Window win,
1436                          Ecore_X_Window_Configure_Mask mask,
1437                          int x,
1438                          int y,
1439                          int w,
1440                          int h,
1441                          int border_width,
1442                          Ecore_X_Window sibling,
1443                          int stack_mode);
1444 EAPI void
1445 ecore_x_window_cursor_set(Ecore_X_Window win,
1446                           Ecore_X_Cursor c);
1447 EAPI void
1448  ecore_x_window_free(Ecore_X_Window win);
1449 EAPI void
1450  ecore_x_window_ignore_set(Ecore_X_Window win,
1451                           int ignore);
1452 EAPI Ecore_X_Window *
1453 ecore_x_window_ignore_list(int *num);
1454
1455 EAPI void
1456  ecore_x_window_delete_request_send(Ecore_X_Window win);
1457 EAPI void
1458  ecore_x_window_show(Ecore_X_Window win);
1459 EAPI void
1460  ecore_x_window_hide(Ecore_X_Window win);
1461 EAPI void
1462  ecore_x_window_move(Ecore_X_Window win,
1463                     int x,
1464                     int y);
1465 EAPI void
1466 ecore_x_window_resize(Ecore_X_Window win,
1467                       int w,
1468                       int h);
1469 EAPI void
1470 ecore_x_window_move_resize(Ecore_X_Window win,
1471                            int x,
1472                            int y,
1473                            int w,
1474                            int h);
1475 EAPI void
1476  ecore_x_window_focus(Ecore_X_Window win);
1477 EAPI void
1478  ecore_x_window_focus_at_time(Ecore_X_Window win,
1479                              Ecore_X_Time t);
1480 EAPI Ecore_X_Window
1481  ecore_x_window_focus_get(void);
1482 EAPI void
1483  ecore_x_window_raise(Ecore_X_Window win);
1484 EAPI void
1485  ecore_x_window_lower(Ecore_X_Window win);
1486 EAPI void
1487  ecore_x_window_reparent(Ecore_X_Window win,
1488                         Ecore_X_Window new_parent,
1489                         int x,
1490                         int y);
1491 EAPI void
1492 ecore_x_window_size_get(Ecore_X_Window win,
1493                         int *w,
1494                         int *h);
1495 EAPI void
1496 ecore_x_window_geometry_get(Ecore_X_Window win,
1497                             int *x,
1498                             int *y,
1499                             int *w,
1500                             int *h);
1501 EAPI int
1502  ecore_x_window_border_width_get(Ecore_X_Window win);
1503 EAPI void
1504  ecore_x_window_border_width_set(Ecore_X_Window win,
1505                                 int width);
1506 EAPI int
1507  ecore_x_window_depth_get(Ecore_X_Window win);
1508 EAPI void
1509  ecore_x_window_cursor_show(Ecore_X_Window win,
1510                            Eina_Bool show);
1511 EAPI void
1512  ecore_x_window_defaults_set(Ecore_X_Window win);
1513 EAPI int
1514  ecore_x_window_visible_get(Ecore_X_Window win);
1515 EAPI Ecore_X_Window
1516  ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
1517                                                int x,
1518                                                int y,
1519                                                Ecore_X_Window *skip,
1520                                                int skip_num);
1521 EAPI Ecore_X_Window
1522 ecore_x_window_shadow_parent_get(Ecore_X_Window root,
1523                                  Ecore_X_Window win);
1524 EAPI void
1525  ecore_x_window_shadow_tree_flush(void);
1526 EAPI Ecore_X_Window
1527  ecore_x_window_root_get(Ecore_X_Window win);
1528 EAPI Ecore_X_Window
1529  ecore_x_window_at_xy_get(int x,
1530                          int y);
1531 EAPI Ecore_X_Window
1532 ecore_x_window_at_xy_with_skip_get(int x,
1533                                    int y,
1534                                    Ecore_X_Window *skip,
1535                                    int skip_num);
1536 EAPI Ecore_X_Window
1537 ecore_x_window_at_xy_begin_get(Ecore_X_Window begin,
1538                                int x,
1539                                int y);
1540 EAPI Ecore_X_Window
1541 ecore_x_window_parent_get(Ecore_X_Window win);
1542
1543 EAPI void
1544 ecore_x_window_background_color_set(Ecore_X_Window win,
1545                                     unsigned short r,
1546                                     unsigned short g,
1547                                     unsigned short b);
1548 EAPI void
1549 ecore_x_window_gravity_set(Ecore_X_Window win,
1550                            Ecore_X_Gravity grav);
1551 EAPI void
1552 ecore_x_window_pixel_gravity_set(Ecore_X_Window win,
1553                                  Ecore_X_Gravity grav);
1554 EAPI void
1555 ecore_x_window_pixmap_set(Ecore_X_Window win,
1556                           Ecore_X_Pixmap pmap);
1557 EAPI void
1558 ecore_x_window_area_clear(Ecore_X_Window win,
1559                           int x,
1560                           int y,
1561                           int w,
1562                           int h);
1563 EAPI void
1564 ecore_x_window_area_expose(Ecore_X_Window win,
1565                            int x,
1566                            int y,
1567                            int w,
1568                            int h);
1569 EAPI void
1570 ecore_x_window_override_set(Ecore_X_Window win,
1571                             Eina_Bool override);
1572
1573 EAPI void
1574 ecore_x_window_prop_card32_set(Ecore_X_Window win,
1575                                Ecore_X_Atom atom,
1576                                unsigned int *val,
1577                                unsigned int num);
1578 EAPI int
1579 ecore_x_window_prop_card32_get(Ecore_X_Window win,
1580                                Ecore_X_Atom atom,
1581                                unsigned int *val,
1582                                unsigned int len);
1583 EAPI int
1584 ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
1585                                     Ecore_X_Atom atom,
1586                                     unsigned int **plst);
1587
1588 EAPI void
1589 ecore_x_window_prop_xid_set(Ecore_X_Window win,
1590                             Ecore_X_Atom atom,
1591                             Ecore_X_Atom type,
1592                             Ecore_X_ID *lst,
1593                             unsigned int num);
1594 EAPI int
1595 ecore_x_window_prop_xid_get(Ecore_X_Window win,
1596                             Ecore_X_Atom atom,
1597                             Ecore_X_Atom type,
1598                             Ecore_X_ID *lst,
1599                             unsigned int len);
1600 EAPI int
1601 ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
1602                                  Ecore_X_Atom atom,
1603                                  Ecore_X_Atom type,
1604                                  Ecore_X_ID **plst);
1605 EAPI void
1606 ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
1607                                     Ecore_X_Atom atom,
1608                                     Ecore_X_Atom type,
1609                                     Ecore_X_ID item,
1610                                     int op);
1611 EAPI void
1612 ecore_x_window_prop_atom_set(Ecore_X_Window win,
1613                              Ecore_X_Atom atom,
1614                              Ecore_X_Atom *val,
1615                              unsigned int num);
1616 EAPI int
1617 ecore_x_window_prop_atom_get(Ecore_X_Window win,
1618                              Ecore_X_Atom atom,
1619                              Ecore_X_Atom *val,
1620                              unsigned int len);
1621 EAPI int
1622 ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
1623                                   Ecore_X_Atom atom,
1624                                   Ecore_X_Atom **plst);
1625 EAPI void
1626 ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
1627                                      Ecore_X_Atom atom,
1628                                      Ecore_X_Atom item,
1629                                      int op);
1630 EAPI void
1631 ecore_x_window_prop_window_set(Ecore_X_Window win,
1632                                Ecore_X_Atom atom,
1633                                Ecore_X_Window *val,
1634                                unsigned int num);
1635 EAPI int
1636 ecore_x_window_prop_window_get(Ecore_X_Window win,
1637                                Ecore_X_Atom atom,
1638                                Ecore_X_Window *val,
1639                                unsigned int len);
1640 EAPI int
1641 ecore_x_window_prop_window_list_get(Ecore_X_Window win,
1642                                     Ecore_X_Atom atom,
1643                                     Ecore_X_Window **plst);
1644
1645 EAPI Ecore_X_Atom
1646  ecore_x_window_prop_any_type(void);
1647 EAPI void
1648  ecore_x_window_prop_property_set(Ecore_X_Window win,
1649                                  Ecore_X_Atom type,
1650                                  Ecore_X_Atom format,
1651                                  int size,
1652                                  void *data,
1653                                  int number);
1654 EAPI int
1655 ecore_x_window_prop_property_get(Ecore_X_Window win,
1656                                  Ecore_X_Atom property,
1657                                  Ecore_X_Atom type,
1658                                  int size,
1659                                  unsigned char **data,
1660                                  int *num);
1661 EAPI void
1662 ecore_x_window_prop_property_del(Ecore_X_Window win,
1663                                  Ecore_X_Atom property);
1664 EAPI Ecore_X_Atom *
1665 ecore_x_window_prop_list(Ecore_X_Window win,
1666                          int *num_ret);
1667 EAPI void
1668 ecore_x_window_prop_string_set(Ecore_X_Window win,
1669                                Ecore_X_Atom type,
1670                                const char *str);
1671 EAPI char *
1672 ecore_x_window_prop_string_get(Ecore_X_Window win,
1673                                Ecore_X_Atom type);
1674 EAPI Eina_Bool
1675 ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
1676                                    Ecore_X_WM_Protocol protocol);
1677 EAPI Ecore_X_WM_Protocol *
1678 ecore_x_window_prop_protocol_list_get(Ecore_X_Window win,
1679                                       int *num_ret);
1680
1681 EAPI void
1682 ecore_x_window_shape_mask_set(Ecore_X_Window win,
1683                               Ecore_X_Pixmap mask);
1684 EAPI void
1685 ecore_x_window_shape_window_set(Ecore_X_Window win,
1686                                 Ecore_X_Window shape_win);
1687 EAPI void
1688 ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
1689                                    Ecore_X_Window shape_win,
1690                                    int x,
1691                                    int y);
1692 EAPI void
1693 ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
1694                                    int x,
1695                                    int y,
1696                                    int w,
1697                                    int h);
1698 EAPI void
1699 ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
1700                                     Ecore_X_Rectangle *rects,
1701                                     int num);
1702 EAPI void
1703 ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win,
1704                                          int x,
1705                                          int y,
1706                                          int w,
1707                                          int h);
1708 EAPI void
1709 ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win,
1710                                           Ecore_X_Rectangle *rects,
1711                                           int num);
1712 EAPI void
1713 ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win,
1714                                          int x,
1715                                          int y,
1716                                          int w,
1717                                          int h);
1718 EAPI void
1719 ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win,
1720                                         int x,
1721                                         int y,
1722                                         int w,
1723                                         int h);
1724 EAPI void
1725 ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win,
1726                                               int x,
1727                                               int y,
1728                                               int w,
1729                                               int h);
1730 EAPI void
1731 ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win,
1732                                          Ecore_X_Window shape_win,
1733                                          int x,
1734                                          int y);
1735 EAPI void
1736 ecore_x_window_shape_input_window_set(Ecore_X_Window win,
1737                                       Ecore_X_Window shape_win);
1738 EAPI void
1739 ecore_x_window_shape_window_add(Ecore_X_Window win,
1740                                 Ecore_X_Window shape_win);
1741 EAPI void
1742 ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
1743                                    Ecore_X_Window shape_win,
1744                                    int x,
1745                                    int y);
1746 EAPI void
1747 ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win,
1748                                          Ecore_X_Window shape_win,
1749                                          int x,
1750                                          int y);
1751 EAPI void
1752 ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
1753                                    int x,
1754                                    int y,
1755                                    int w,
1756                                    int h);
1757 EAPI void
1758 ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
1759                                     int x,
1760                                     int y,
1761                                     int w,
1762                                     int h);
1763 EAPI void
1764 ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win,
1765                                           int x,
1766                                           int y,
1767                                           int w,
1768                                           int h);
1769 EAPI void
1770 ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
1771                                     Ecore_X_Rectangle *rects,
1772                                     int num);
1773 EAPI void
1774 ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win,
1775                                           Ecore_X_Rectangle *rects,
1776                                           int num);
1777 EAPI Ecore_X_Rectangle *
1778 ecore_x_window_shape_rectangles_get(Ecore_X_Window win,
1779                                     int *num_ret);
1780 EAPI Ecore_X_Rectangle *
1781 ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win,
1782                                           int *num_ret);
1783 EAPI void
1784 ecore_x_window_shape_events_select(Ecore_X_Window win,
1785                                    Eina_Bool on);
1786 EAPI void
1787 ecore_x_window_shape_input_mask_set(Ecore_X_Window win,
1788                                     Ecore_X_Pixmap mask);
1789
1790 EAPI Ecore_X_Pixmap
1791 ecore_x_pixmap_new(Ecore_X_Window win,
1792                    int w,
1793                    int h,
1794                    int dep);
1795 EAPI void
1796  ecore_x_pixmap_free(Ecore_X_Pixmap pmap);
1797 EAPI void
1798  ecore_x_pixmap_paste(Ecore_X_Pixmap pmap,
1799                      Ecore_X_Drawable dest,
1800                      Ecore_X_GC gc,
1801                      int sx,
1802                      int sy,
1803                      int w,
1804                      int h,
1805                      int dx,
1806                      int dy);
1807 EAPI void
1808 ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
1809                             int *x,
1810                             int *y,
1811                             int *w,
1812                             int *h);
1813 EAPI int
1814 ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap);
1815
1816 EAPI Ecore_X_GC
1817 ecore_x_gc_new(Ecore_X_Drawable draw,
1818                Ecore_X_GC_Value_Mask value_mask,
1819                const unsigned int *value_list);
1820 EAPI void
1821  ecore_x_gc_free(Ecore_X_GC gc);
1822 EAPI void
1823  ecore_x_gc_foreground_set(Ecore_X_GC gc,
1824                           unsigned long foreground);
1825 EAPI void
1826 ecore_x_gc_background_set(Ecore_X_GC gc,
1827                           unsigned long background);
1828
1829 EAPI Eina_Bool
1830 ecore_x_client_message32_send(Ecore_X_Window win,
1831                               Ecore_X_Atom type,
1832                               Ecore_X_Event_Mask mask,
1833                               long d0,
1834                               long d1,
1835                               long d2,
1836                               long d3,
1837                               long d4);
1838 EAPI Eina_Bool
1839 ecore_x_client_message8_send(Ecore_X_Window win,
1840                              Ecore_X_Atom type,
1841                              const void *data,
1842                              int len);
1843 EAPI Eina_Bool
1844 ecore_x_mouse_move_send(Ecore_X_Window win,
1845                         int x,
1846                         int y);
1847 EAPI Eina_Bool
1848 ecore_x_mouse_down_send(Ecore_X_Window win,
1849                         int x,
1850                         int y,
1851                         int b);
1852 EAPI Eina_Bool
1853 ecore_x_mouse_up_send(Ecore_X_Window win,
1854                       int x,
1855                       int y,
1856                       int b);
1857 EAPI Eina_Bool
1858 ecore_x_mouse_in_send(Ecore_X_Window win, int x, int y);
1859 EAPI Eina_Bool
1860 ecore_x_mouse_out_send(Ecore_X_Window win, int x, int y);
1861        
1862 EAPI void
1863 ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
1864                               int *x,
1865                               int *y,
1866                               int *w,
1867                               int *h);
1868 EAPI int
1869  ecore_x_drawable_border_width_get(Ecore_X_Drawable d);
1870 EAPI int
1871  ecore_x_drawable_depth_get(Ecore_X_Drawable d);
1872 EAPI void
1873  ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d,
1874                                 Ecore_X_GC gc,
1875                                 int x,
1876                                 int y,
1877                                 int width,
1878                                 int height);
1879
1880 EAPI Eina_Bool
1881  ecore_x_cursor_color_supported_get(void);
1882 EAPI Ecore_X_Cursor
1883  ecore_x_cursor_new(Ecore_X_Window win,
1884                    int *pixels,
1885                    int w,
1886                    int h,
1887                    int hot_x,
1888                    int hot_y);
1889 EAPI void
1890  ecore_x_cursor_free(Ecore_X_Cursor c);
1891 EAPI Ecore_X_Cursor
1892  ecore_x_cursor_shape_get(int shape);
1893 EAPI void
1894  ecore_x_cursor_size_set(int size);
1895 EAPI int
1896  ecore_x_cursor_size_get(void);
1897
1898 /* FIXME: these funcs need categorising */
1899 EAPI Ecore_X_Window *
1900  ecore_x_window_root_list(int *num_ret);
1901 EAPI Ecore_X_Window
1902  ecore_x_window_root_first_get(void);
1903 EAPI Eina_Bool
1904  ecore_x_window_manage(Ecore_X_Window win);
1905 EAPI void
1906  ecore_x_window_container_manage(Ecore_X_Window win);
1907 EAPI void
1908  ecore_x_window_client_manage(Ecore_X_Window win);
1909 EAPI void
1910  ecore_x_window_sniff(Ecore_X_Window win);
1911 EAPI void
1912  ecore_x_window_client_sniff(Ecore_X_Window win);
1913
1914 EAPI Ecore_X_Atom
1915  ecore_x_atom_get(const char *name);
1916 EAPI void
1917  ecore_x_atoms_get(const char **names,
1918                   int num,
1919                   Ecore_X_Atom *atoms);
1920 EAPI char *
1921 ecore_x_atom_name_get(Ecore_X_Atom atom);
1922
1923 EAPI void
1924  ecore_x_icccm_init(void);
1925 EAPI void
1926  ecore_x_icccm_state_set(Ecore_X_Window win,
1927                         Ecore_X_Window_State_Hint state);
1928 EAPI Ecore_X_Window_State_Hint
1929  ecore_x_icccm_state_get(Ecore_X_Window win);
1930 EAPI void
1931  ecore_x_icccm_delete_window_send(Ecore_X_Window win,
1932                                  Ecore_X_Time t);
1933 EAPI void
1934 ecore_x_icccm_take_focus_send(Ecore_X_Window win,
1935                               Ecore_X_Time t);
1936 EAPI void
1937 ecore_x_icccm_save_yourself_send(Ecore_X_Window win,
1938                                  Ecore_X_Time t);
1939 EAPI void
1940 ecore_x_icccm_move_resize_send(Ecore_X_Window win,
1941                                int x,
1942                                int y,
1943                                int w,
1944                                int h);
1945 EAPI void
1946 ecore_x_icccm_hints_set(Ecore_X_Window win,
1947                         Eina_Bool accepts_focus,
1948                         Ecore_X_Window_State_Hint initial_state,
1949                         Ecore_X_Pixmap icon_pixmap,
1950                         Ecore_X_Pixmap icon_mask,
1951                         Ecore_X_Window icon_window,
1952                         Ecore_X_Window window_group,
1953                         Eina_Bool is_urgent);
1954 EAPI Eina_Bool
1955 ecore_x_icccm_hints_get(Ecore_X_Window win,
1956                         Eina_Bool *accepts_focus,
1957                         Ecore_X_Window_State_Hint *initial_state,
1958                         Ecore_X_Pixmap *icon_pixmap,
1959                         Ecore_X_Pixmap *icon_mask,
1960                         Ecore_X_Window *icon_window,
1961                         Ecore_X_Window *window_group,
1962                         Eina_Bool *is_urgent);
1963 EAPI void
1964 ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
1965                                  Eina_Bool request_pos,
1966                                  Ecore_X_Gravity gravity,
1967                                  int min_w,
1968                                  int min_h,
1969                                  int max_w,
1970                                  int max_h,
1971                                  int base_w,
1972                                  int base_h,
1973                                  int step_x,
1974                                  int step_y,
1975                                  double min_aspect,
1976                                  double max_aspect);
1977 EAPI Eina_Bool
1978 ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
1979                                  Eina_Bool *request_pos,
1980                                  Ecore_X_Gravity *gravity,
1981                                  int *min_w,
1982                                  int *min_h,
1983                                  int *max_w,
1984                                  int *max_h,
1985                                  int *base_w,
1986                                  int *base_h,
1987                                  int *step_x,
1988                                  int *step_y,
1989                                  double *min_aspect,
1990                                  double *max_aspect);
1991 EAPI void
1992 ecore_x_icccm_title_set(Ecore_X_Window win,
1993                         const char *t);
1994 EAPI char *
1995  ecore_x_icccm_title_get(Ecore_X_Window win);
1996 EAPI void
1997  ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
1998                                  Ecore_X_Atom *protos,
1999                                  int num);
2000 EAPI void
2001 ecore_x_icccm_protocol_set(Ecore_X_Window win,
2002                            Ecore_X_WM_Protocol protocol,
2003                            Eina_Bool on);
2004 EAPI Eina_Bool
2005 ecore_x_icccm_protocol_isset(Ecore_X_Window win,
2006                              Ecore_X_WM_Protocol protocol);
2007 EAPI void
2008 ecore_x_icccm_name_class_set(Ecore_X_Window win,
2009                              const char *n,
2010                              const char *c);
2011 EAPI void
2012 ecore_x_icccm_name_class_get(Ecore_X_Window win,
2013                              char **n,
2014                              char **c);
2015 EAPI char *
2016  ecore_x_icccm_client_machine_get(Ecore_X_Window win);
2017 EAPI void
2018  ecore_x_icccm_command_set(Ecore_X_Window win,
2019                           int argc,
2020                           char **argv);
2021 EAPI void
2022 ecore_x_icccm_command_get(Ecore_X_Window win,
2023                           int *argc,
2024                           char ***argv);
2025 EAPI char *
2026  ecore_x_icccm_icon_name_get(Ecore_X_Window win);
2027 EAPI void
2028  ecore_x_icccm_icon_name_set(Ecore_X_Window win,
2029                             const char *t);
2030 EAPI void
2031 ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
2032                                   Ecore_X_Window subwin);
2033 EAPI void
2034 ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
2035                                     Ecore_X_Window subwin);
2036 EAPI void
2037 ecore_x_icccm_transient_for_set(Ecore_X_Window win,
2038                                 Ecore_X_Window forwin);
2039 EAPI void
2040  ecore_x_icccm_transient_for_unset(Ecore_X_Window win);
2041 EAPI Ecore_X_Window
2042  ecore_x_icccm_transient_for_get(Ecore_X_Window win);
2043 EAPI void
2044  ecore_x_icccm_window_role_set(Ecore_X_Window win,
2045                               const char *role);
2046 EAPI char *
2047  ecore_x_icccm_window_role_get(Ecore_X_Window win);
2048 EAPI void
2049  ecore_x_icccm_client_leader_set(Ecore_X_Window win,
2050                                 Ecore_X_Window l);
2051 EAPI Ecore_X_Window
2052  ecore_x_icccm_client_leader_get(Ecore_X_Window win);
2053 EAPI void
2054  ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
2055                                   Ecore_X_Window root);
2056
2057 typedef enum _Ecore_X_MWM_Hint_Func
2058 {
2059    ECORE_X_MWM_HINT_FUNC_ALL = (1 << 0),
2060    ECORE_X_MWM_HINT_FUNC_RESIZE = (1 << 1),
2061    ECORE_X_MWM_HINT_FUNC_MOVE = (1 << 2),
2062    ECORE_X_MWM_HINT_FUNC_MINIMIZE = (1 << 3),
2063    ECORE_X_MWM_HINT_FUNC_MAXIMIZE = (1 << 4),
2064    ECORE_X_MWM_HINT_FUNC_CLOSE = (1 << 5)
2065 } Ecore_X_MWM_Hint_Func;
2066
2067 typedef enum _Ecore_X_MWM_Hint_Decor
2068 {
2069    ECORE_X_MWM_HINT_DECOR_ALL = (1 << 0),
2070    ECORE_X_MWM_HINT_DECOR_BORDER = (1 << 1),
2071    ECORE_X_MWM_HINT_DECOR_RESIZEH = (1 << 2),
2072    ECORE_X_MWM_HINT_DECOR_TITLE = (1 << 3),
2073    ECORE_X_MWM_HINT_DECOR_MENU = (1 << 4),
2074    ECORE_X_MWM_HINT_DECOR_MINIMIZE = (1 << 5),
2075    ECORE_X_MWM_HINT_DECOR_MAXIMIZE = (1 << 6)
2076 } Ecore_X_MWM_Hint_Decor;
2077
2078 typedef enum _Ecore_X_MWM_Hint_Input
2079 {
2080    ECORE_X_MWM_HINT_INPUT_MODELESS = 0,
2081    ECORE_X_MWM_HINT_INPUT_PRIMARY_APPLICATION_MODAL = 1,
2082    ECORE_X_MWM_HINT_INPUT_SYSTEM_MODAL = 2,
2083    ECORE_X_MWM_HINT_INPUT_FULL_APPLICATION_MODAL = 3
2084 } Ecore_X_MWM_Hint_Input;
2085
2086 EAPI Eina_Bool
2087 ecore_x_mwm_hints_get(Ecore_X_Window win,
2088                       Ecore_X_MWM_Hint_Func *fhint,
2089                       Ecore_X_MWM_Hint_Decor *dhint,
2090                       Ecore_X_MWM_Hint_Input *ihint);
2091 EAPI void
2092 ecore_x_mwm_borderless_set(Ecore_X_Window win,
2093                            Eina_Bool borderless);
2094
2095 /* netwm */
2096 EAPI void
2097  ecore_x_netwm_init(void);
2098 EAPI void
2099  ecore_x_netwm_shutdown(void);
2100 EAPI void
2101  ecore_x_netwm_wm_identify(Ecore_X_Window root,
2102                           Ecore_X_Window check,
2103                           const char *wm_name);
2104 EAPI void
2105 ecore_x_netwm_supported_set(Ecore_X_Window root,
2106                             Ecore_X_Atom *supported,
2107                             int num);
2108 EAPI Eina_Bool
2109 ecore_x_netwm_supported_get(Ecore_X_Window root,
2110                             Ecore_X_Atom **supported,
2111                             int *num);
2112 EAPI void
2113 ecore_x_netwm_desk_count_set(Ecore_X_Window root,
2114                              unsigned int n_desks);
2115 EAPI void
2116 ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
2117                              Ecore_X_Window *vroots,
2118                              unsigned int n_desks);
2119 EAPI void
2120 ecore_x_netwm_desk_names_set(Ecore_X_Window root,
2121                              const char **names,
2122                              unsigned int n_desks);
2123 EAPI void
2124 ecore_x_netwm_desk_size_set(Ecore_X_Window root,
2125                             unsigned int width,
2126                             unsigned int height);
2127 EAPI void
2128 ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
2129                                  unsigned int *areas,
2130                                  unsigned int n_desks);
2131 EAPI unsigned int *
2132 ecore_x_netwm_desk_workareas_get(Ecore_X_Window root,
2133                                  unsigned int *n_desks);
2134 EAPI void
2135 ecore_x_netwm_desk_current_set(Ecore_X_Window root,
2136                                unsigned int desk);
2137 EAPI void
2138 ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
2139                                  unsigned int *origins,
2140                                  unsigned int n_desks);
2141 EAPI void
2142 ecore_x_netwm_desk_layout_set(Ecore_X_Window root,
2143                               int orientation,
2144                               int columns,
2145                               int rows,
2146                               int starting_corner);
2147 EAPI void
2148 ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
2149                                   Eina_Bool on);
2150 EAPI void
2151 ecore_x_netwm_client_list_set(Ecore_X_Window root,
2152                               Ecore_X_Window *p_clients,
2153                               unsigned int n_clients);
2154 EAPI void
2155 ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
2156                                        Ecore_X_Window *p_clients,
2157                                        unsigned int n_clients);
2158 EAPI void
2159 ecore_x_netwm_client_active_set(Ecore_X_Window root,
2160                                 Ecore_X_Window win);
2161 EAPI void
2162 ecore_x_netwm_client_active_request(Ecore_X_Window root,
2163                                     Ecore_X_Window win,
2164                                     int type,
2165                                     Ecore_X_Window current_win);
2166 EAPI void
2167 ecore_x_netwm_name_set(Ecore_X_Window win,
2168                        const char *name);
2169 EAPI int
2170 ecore_x_netwm_name_get(Ecore_X_Window win,
2171                        char **name);
2172 EAPI void
2173 ecore_x_netwm_startup_id_set(Ecore_X_Window win,
2174                              const char *id);
2175 EAPI int
2176 ecore_x_netwm_startup_id_get(Ecore_X_Window win,
2177                              char **id);
2178 EAPI void
2179 ecore_x_netwm_visible_name_set(Ecore_X_Window win,
2180                                const char *name);
2181 EAPI int
2182 ecore_x_netwm_visible_name_get(Ecore_X_Window win,
2183                                char **name);
2184 EAPI void
2185 ecore_x_netwm_icon_name_set(Ecore_X_Window win,
2186                             const char *name);
2187 EAPI int
2188 ecore_x_netwm_icon_name_get(Ecore_X_Window win,
2189                             char **name);
2190 EAPI void
2191 ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win,
2192                                     const char *name);
2193 EAPI int
2194 ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win,
2195                                     char **name);
2196 EAPI void
2197 ecore_x_netwm_desktop_set(Ecore_X_Window win,
2198                           unsigned int desk);
2199 EAPI Eina_Bool
2200 ecore_x_netwm_desktop_get(Ecore_X_Window win,
2201                           unsigned int *desk);
2202 EAPI void
2203 ecore_x_netwm_strut_set(Ecore_X_Window win,
2204                         int left,
2205                         int right,
2206                         int top,
2207                         int bottom);
2208 EAPI Eina_Bool
2209 ecore_x_netwm_strut_get(Ecore_X_Window win,
2210                         int *left,
2211                         int *right,
2212                         int *top,
2213                         int *bottom);
2214 EAPI void
2215 ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
2216                                 int left,
2217                                 int right,
2218                                 int top,
2219                                 int bottom,
2220                                 int left_start_y,
2221                                 int left_end_y,
2222                                 int right_start_y,
2223                                 int right_end_y,
2224                                 int top_start_x,
2225                                 int top_end_x,
2226                                 int bottom_start_x,
2227                                 int bottom_end_x);
2228 EAPI Eina_Bool
2229 ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
2230                                 int *left,
2231                                 int *right,
2232                                 int *top,
2233                                 int *bottom,
2234                                 int *left_start_y,
2235                                 int *left_end_y,
2236                                 int *right_start_y,
2237                                 int *right_end_y,
2238                                 int *top_start_x,
2239                                 int *top_end_x,
2240                                 int *bottom_start_x,
2241                                 int *bottom_end_x);
2242
2243 EAPI void
2244 ecore_x_netwm_icons_set(Ecore_X_Window win,
2245                         Ecore_X_Icon *icon,
2246                         int num);
2247        
2248 EAPI Eina_Bool
2249 ecore_x_netwm_icons_get(Ecore_X_Window win,
2250                         Ecore_X_Icon **icon,
2251                         int *num);
2252 EAPI void
2253 ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
2254                                 int x,
2255                                 int y,
2256                                 int width,
2257                                 int height);
2258 EAPI Eina_Bool
2259 ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
2260                                 int *x,
2261                                 int *y,
2262                                 int *width,
2263                                 int *height);
2264 EAPI void
2265 ecore_x_netwm_pid_set(Ecore_X_Window win,
2266                       int pid);
2267 EAPI Eina_Bool
2268 ecore_x_netwm_pid_get(Ecore_X_Window win,
2269                       int *pid);
2270 EAPI void
2271  ecore_x_netwm_handled_icons_set(Ecore_X_Window win);
2272 EAPI Eina_Bool
2273  ecore_x_netwm_handled_icons_get(Ecore_X_Window win);
2274 EAPI void
2275  ecore_x_netwm_user_time_set(Ecore_X_Window win,
2276                             unsigned int time);
2277 EAPI Eina_Bool
2278 ecore_x_netwm_user_time_get(Ecore_X_Window win,
2279                             unsigned int *time);
2280 EAPI void
2281 ecore_x_netwm_window_state_set(Ecore_X_Window win,
2282                                Ecore_X_Window_State *state,
2283                                unsigned int num);
2284 EAPI Eina_Bool
2285 ecore_x_netwm_window_state_get(Ecore_X_Window win,
2286                                Ecore_X_Window_State **state,
2287                                unsigned int *num);
2288 EAPI void
2289 ecore_x_netwm_window_type_set(Ecore_X_Window win,
2290                               Ecore_X_Window_Type type);
2291 EAPI Eina_Bool
2292 ecore_x_netwm_window_type_get(Ecore_X_Window win,
2293                               Ecore_X_Window_Type *type);
2294 EAPI int
2295 ecore_x_netwm_window_types_get(Ecore_X_Window win,
2296                                Ecore_X_Window_Type **types);
2297 EAPI Eina_Bool
2298 ecore_x_netwm_allowed_action_isset(Ecore_X_Window win,
2299                                    Ecore_X_Action action);
2300 EAPI void
2301 ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
2302                                  Ecore_X_Action *action,
2303                                  unsigned int num);
2304 EAPI Eina_Bool
2305 ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
2306                                  Ecore_X_Action **action,
2307                                  unsigned int *num);
2308 EAPI void
2309 ecore_x_netwm_opacity_set(Ecore_X_Window win,
2310                           unsigned int opacity);
2311 EAPI Eina_Bool
2312 ecore_x_netwm_opacity_get(Ecore_X_Window win,
2313                           unsigned int *opacity);
2314 EAPI void
2315 ecore_x_netwm_frame_size_set(Ecore_X_Window win,
2316                              int fl,
2317                              int fr,
2318                              int ft,
2319                              int fb);
2320 EAPI Eina_Bool
2321 ecore_x_netwm_frame_size_get(Ecore_X_Window win,
2322                              int *fl,
2323                              int *fr,
2324                              int *ft,
2325                              int *fb);
2326 EAPI Eina_Bool
2327 ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
2328                                Ecore_X_Sync_Counter *counter);
2329 EAPI void
2330  ecore_x_netwm_ping_send(Ecore_X_Window win);
2331 EAPI void
2332  ecore_x_netwm_sync_request_send(Ecore_X_Window win,
2333                                 unsigned int serial);
2334 EAPI void
2335 ecore_x_netwm_state_request_send(Ecore_X_Window win,
2336                                  Ecore_X_Window root,
2337                                  Ecore_X_Window_State s1,
2338                                  Ecore_X_Window_State s2,
2339                                  Eina_Bool set);
2340 EAPI void
2341 ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
2342                                    Ecore_X_Window root,
2343                                    unsigned int desktop);
2344
2345 EAPI void
2346  ecore_x_e_init(void);
2347 EAPI void
2348  ecore_x_e_frame_size_set(Ecore_X_Window win,
2349                          int fl,
2350                          int fr,
2351                          int ft,
2352                          int fb);
2353 EAPI void
2354 ecore_x_e_virtual_keyboard_set(Ecore_X_Window win,
2355                                unsigned int is_keyboard);
2356 EAPI Eina_Bool
2357  ecore_x_e_virtual_keyboard_get(Ecore_X_Window win);
2358 EAPI void
2359  ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
2360                                      Ecore_X_Virtual_Keyboard_State state);
2361 EAPI Ecore_X_Virtual_Keyboard_State
2362  ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win);
2363 EAPI void
2364  ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
2365                                       Ecore_X_Virtual_Keyboard_State state);
2366
2367 /* Illume functions */
2368 EAPI void
2369 ecore_x_e_illume_zone_set(Ecore_X_Window win,
2370                           Ecore_X_Window zone);
2371 EAPI Ecore_X_Window
2372  ecore_x_e_illume_zone_get(Ecore_X_Window win);
2373 EAPI void
2374  ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
2375                                Ecore_X_Window *zones,
2376                                unsigned int n_zones);
2377 EAPI void
2378 ecore_x_e_illume_conformant_set(Ecore_X_Window win,
2379                                 unsigned int is_conformant);
2380 EAPI Eina_Bool
2381  ecore_x_e_illume_conformant_get(Ecore_X_Window win);
2382 EAPI void
2383  ecore_x_e_illume_mode_set(Ecore_X_Window win,
2384                           Ecore_X_Illume_Mode mode);
2385 EAPI Ecore_X_Illume_Mode
2386  ecore_x_e_illume_mode_get(Ecore_X_Window win);
2387 EAPI void
2388  ecore_x_e_illume_mode_send(Ecore_X_Window win,
2389                            Ecore_X_Illume_Mode mode);
2390 EAPI void
2391  ecore_x_e_illume_focus_back_send(Ecore_X_Window win);
2392 EAPI void
2393  ecore_x_e_illume_focus_forward_send(Ecore_X_Window win);
2394 EAPI void
2395  ecore_x_e_illume_focus_home_send(Ecore_X_Window win);
2396 EAPI void
2397  ecore_x_e_illume_close_send(Ecore_X_Window win);
2398 EAPI void
2399  ecore_x_e_illume_home_new_send(Ecore_X_Window win);
2400 EAPI void
2401  ecore_x_e_illume_home_del_send(Ecore_X_Window win);
2402 EAPI void
2403  ecore_x_e_illume_access_action_next_send(Ecore_X_Window win);
2404 EAPI void
2405  ecore_x_e_illume_access_action_prev_send(Ecore_X_Window win);
2406 EAPI void
2407  ecore_x_e_illume_access_action_activate_send(Ecore_X_Window win);
2408 EAPI void
2409  ecore_x_e_illume_access_action_read_send(Ecore_X_Window win);
2410 EAPI void
2411  ecore_x_e_illume_access_action_read_next_send(Ecore_X_Window win);
2412 EAPI void
2413  ecore_x_e_illume_access_action_read_prev_send(Ecore_X_Window win);
2414        
2415 EAPI void
2416  ecore_x_e_illume_drag_set(Ecore_X_Window win,
2417                           unsigned int drag);
2418 EAPI Eina_Bool
2419  ecore_x_e_illume_drag_get(Ecore_X_Window win);
2420 EAPI void
2421  ecore_x_e_illume_drag_locked_set(Ecore_X_Window win,
2422                                  unsigned int is_locked);
2423 EAPI Eina_Bool
2424  ecore_x_e_illume_drag_locked_get(Ecore_X_Window win);
2425 EAPI void
2426  ecore_x_e_illume_drag_start_send(Ecore_X_Window win);
2427 EAPI void
2428  ecore_x_e_illume_drag_end_send(Ecore_X_Window win);
2429 EAPI void
2430  ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
2431                                         int x,
2432                                         int y,
2433                                         int w,
2434                                         int h);
2435 EAPI Eina_Bool
2436 ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
2437                                         int *x,
2438                                         int *y,
2439                                         int *w,
2440                                         int *h);
2441 EAPI void
2442 ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
2443                                       int x,
2444                                       int y,
2445                                       int w,
2446                                       int h);
2447 EAPI Eina_Bool
2448 ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
2449                                       int *x,
2450                                       int *y,
2451                                       int *w,
2452                                       int *h);
2453 EAPI void
2454 ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
2455                                        int x,
2456                                        int y,
2457                                        int w,
2458                                        int h);
2459 EAPI Eina_Bool
2460 ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
2461                                        int *x,
2462                                        int *y,
2463                                        int *w,
2464                                        int *h);
2465 EAPI void
2466 ecore_x_e_illume_quickpanel_set(Ecore_X_Window win,
2467                                 unsigned int is_quickpanel);
2468 EAPI Eina_Bool
2469  ecore_x_e_illume_quickpanel_get(Ecore_X_Window win);
2470 EAPI void
2471  ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
2472                                       Ecore_X_Illume_Quickpanel_State state);
2473 EAPI Ecore_X_Illume_Quickpanel_State
2474  ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win);
2475 EAPI void
2476  ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
2477                                        Ecore_X_Illume_Quickpanel_State state);
2478 EAPI void
2479  ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win);
2480 EAPI void
2481  ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
2482                                                unsigned int priority);
2483 EAPI int
2484  ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win);
2485 EAPI void
2486  ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
2487                                                unsigned int priority);
2488 EAPI int
2489  ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win);
2490 EAPI void
2491  ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win,
2492                                      unsigned int zone);
2493 EAPI int
2494  ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win);
2495 EAPI void
2496  ecore_x_e_illume_quickpanel_zone_request_send(Ecore_X_Window win);
2497 EAPI void
2498  ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win);
2499
2500 EAPI void
2501 ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win,
2502                                      Ecore_X_Illume_Clipboard_State state);
2503
2504 EAPI Ecore_X_Illume_Clipboard_State
2505 ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win);
2506
2507 EAPI void
2508 ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win,
2509                                         int x,
2510                                         int y,
2511                                         int w,
2512                                         int h);
2513 EAPI Eina_Bool
2514 ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win,
2515                                         int *x,
2516                                         int *y,
2517                                         int *w,
2518                                         int *h);
2519 EAPI void
2520 ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
2521                                 Ecore_X_Sync_Counter counter);
2522 EAPI Ecore_X_Sync_Counter
2523  ecore_x_e_comp_sync_counter_get(Ecore_X_Window win);
2524 EAPI void
2525  ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root,
2526                                    Ecore_X_Window win);
2527 EAPI void
2528 ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root,
2529                                         Ecore_X_Window win,
2530                                         int w,
2531                                         int h);
2532 EAPI void
2533 ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
2534                                   Eina_Bool enabled);
2535 EAPI Eina_Bool
2536  ecore_x_e_comp_sync_supported_get(Ecore_X_Window root);
2537 EAPI void
2538  ecore_x_e_comp_sync_begin_send(Ecore_X_Window win);
2539 EAPI void
2540  ecore_x_e_comp_sync_end_send(Ecore_X_Window win);
2541 EAPI void
2542  ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win);
2543
2544 EAPI void
2545  ecore_x_e_comp_flush_send(Ecore_X_Window win);
2546 EAPI void
2547  ecore_x_e_comp_dump_send(Ecore_X_Window win);
2548 EAPI void
2549  ecore_x_e_comp_pixmap_set(Ecore_X_Window win,
2550                           Ecore_X_Pixmap pixmap);
2551 EAPI Ecore_X_Pixmap
2552 ecore_x_e_comp_pixmap_get(Ecore_X_Window win);
2553
2554 EAPI Ecore_X_Sync_Alarm
2555  ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter);
2556 EAPI Eina_Bool
2557  ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm);
2558 EAPI Eina_Bool
2559  ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter,
2560                            unsigned int *val);
2561 EAPI Ecore_X_Sync_Counter
2562  ecore_x_sync_counter_new(int val);
2563 EAPI void
2564  ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter);
2565 EAPI void
2566  ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter,
2567                          int by);
2568 EAPI void
2569 ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter,
2570                               int val);
2571
2572 EAPI void
2573 ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter,
2574                          int val);
2575 EAPI void
2576 ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter,
2577                            int val_hi,
2578                            unsigned int val_lo);
2579 EAPI Eina_Bool
2580 ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter,
2581                              int *val_hi,
2582                              unsigned int *val_lo);
2583
2584 EAPI int
2585  ecore_x_xinerama_screen_count_get(void);
2586 EAPI Eina_Bool
2587  ecore_x_xinerama_screen_geometry_get(int screen,
2588                                      int *x,
2589                                      int *y,
2590                                      int *w,
2591                                      int *h);
2592
2593 EAPI Eina_Bool
2594  ecore_x_screensaver_event_available_get(void);
2595 EAPI int
2596  ecore_x_screensaver_idle_time_get(void);
2597 EAPI void
2598  ecore_x_screensaver_set(int timeout,
2599                         int interval,
2600                         int prefer_blanking,
2601                         int allow_exposures);
2602 EAPI void
2603  ecore_x_screensaver_timeout_set(int timeout);
2604 EAPI int
2605  ecore_x_screensaver_timeout_get(void);
2606 EAPI void
2607  ecore_x_screensaver_blank_set(int timeout);
2608 EAPI int
2609  ecore_x_screensaver_blank_get(void);
2610 EAPI void
2611  ecore_x_screensaver_expose_set(int timeout);
2612 EAPI int
2613  ecore_x_screensaver_expose_get(void);
2614 EAPI void
2615  ecore_x_screensaver_interval_set(int timeout);
2616 EAPI int
2617  ecore_x_screensaver_interval_get(void);
2618 EAPI void
2619  ecore_x_screensaver_event_listen_set(Eina_Bool on);
2620
2621 /* FIXME: these funcs need categorising */
2622
2623 typedef struct _Ecore_X_Window_Attributes
2624 {
2625    Ecore_X_Window   root;
2626    int              x, y, w, h;
2627    int              border;
2628    int              depth;
2629    Eina_Bool        visible : 1;
2630    Eina_Bool        viewable : 1;
2631    Eina_Bool        override : 1;
2632    Eina_Bool        input_only : 1;
2633    Eina_Bool        save_under : 1;
2634    struct
2635    {
2636       Ecore_X_Event_Mask mine;
2637       Ecore_X_Event_Mask all;
2638       Ecore_X_Event_Mask no_propagate;
2639    } event_mask;
2640    Ecore_X_Gravity  window_gravity;
2641    Ecore_X_Gravity  pixel_gravity;
2642    Ecore_X_Colormap colormap;
2643    Ecore_X_Visual   visual;
2644    /* FIXME: missing
2645     * int map_installed;
2646     * Screen *screen;
2647     */
2648 } Ecore_X_Window_Attributes;
2649
2650 EAPI Eina_Bool
2651 ecore_x_window_attributes_get(Ecore_X_Window win,
2652                               Ecore_X_Window_Attributes *att_ret);
2653 EAPI void
2654  ecore_x_window_save_set_add(Ecore_X_Window win);
2655 EAPI void
2656  ecore_x_window_save_set_del(Ecore_X_Window win);
2657 EAPI Ecore_X_Window *
2658  ecore_x_window_children_get(Ecore_X_Window win,
2659                             int *num);
2660
2661 EAPI Eina_Bool
2662 ecore_x_pointer_control_set(int accel_num,
2663                             int accel_denom,
2664                             int threshold);
2665 EAPI Eina_Bool
2666 ecore_x_pointer_control_get(int *accel_num,
2667                             int *accel_denom,
2668                             int *threshold);
2669 EAPI Eina_Bool
2670 ecore_x_pointer_mapping_set(unsigned char *map,
2671                             int nmap);
2672 EAPI Eina_Bool
2673 ecore_x_pointer_mapping_get(unsigned char *map,
2674                             int nmap);
2675 EAPI Eina_Bool
2676  ecore_x_pointer_grab(Ecore_X_Window win);
2677 EAPI Eina_Bool
2678  ecore_x_pointer_confine_grab(Ecore_X_Window win);
2679 EAPI void
2680  ecore_x_pointer_ungrab(void);
2681 EAPI Eina_Bool
2682  ecore_x_pointer_warp(Ecore_X_Window win,
2683                      int x,
2684                      int y);
2685 EAPI Eina_Bool
2686  ecore_x_keyboard_grab(Ecore_X_Window win);
2687 EAPI void
2688  ecore_x_keyboard_ungrab(void);
2689 EAPI void
2690  ecore_x_grab(void);
2691 EAPI void
2692  ecore_x_ungrab(void);
2693 EAPI void
2694  ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
2695                                                        int event_type,
2696                                                        void *event),
2697                                      void *data);
2698 EAPI void
2699 ecore_x_window_button_grab(Ecore_X_Window win,
2700                            int button,
2701                            Ecore_X_Event_Mask event_mask,
2702                            int mod,
2703                            int any_mod);
2704 EAPI void
2705 ecore_x_window_button_ungrab(Ecore_X_Window win,
2706                              int button,
2707                              int mod,
2708                              int any_mod);
2709 EAPI void
2710 ecore_x_window_key_grab(Ecore_X_Window win,
2711                         const char *key,
2712                         int mod,
2713                         int any_mod);
2714 EAPI void
2715 ecore_x_window_key_ungrab(Ecore_X_Window win,
2716                           const char *key,
2717                           int mod,
2718                           int any_mod);
2719
2720 EAPI void
2721  ecore_x_focus_reset(void);
2722 EAPI void
2723  ecore_x_events_allow_all(void);
2724 EAPI void
2725  ecore_x_pointer_last_xy_get(int *x,
2726                             int *y);
2727 EAPI void
2728 ecore_x_pointer_xy_get(Ecore_X_Window win,
2729                        int *x,
2730                        int *y);
2731
2732 /* ecore_x_region.c */
2733 EAPI Ecore_X_XRegion *
2734  ecore_x_xregion_new(void);
2735 EAPI void
2736  ecore_x_xregion_free(Ecore_X_XRegion *region);
2737 EAPI Eina_Bool
2738  ecore_x_xregion_set(Ecore_X_XRegion *region,
2739                     Ecore_X_GC gc);
2740 EAPI void
2741 ecore_x_xregion_translate(Ecore_X_XRegion *region,
2742                           int x,
2743                           int y);
2744 EAPI Eina_Bool
2745 ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
2746                           Ecore_X_XRegion *r1,
2747                           Ecore_X_XRegion *r2);
2748 EAPI Eina_Bool
2749 ecore_x_xregion_union(Ecore_X_XRegion *dst,
2750                       Ecore_X_XRegion *r1,
2751                       Ecore_X_XRegion *r2);
2752 EAPI Eina_Bool
2753 ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
2754                            Ecore_X_XRegion *src,
2755                            Ecore_X_Rectangle *rect);
2756 EAPI Eina_Bool
2757 ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
2758                          Ecore_X_XRegion *r1,
2759                          Ecore_X_XRegion *r2);
2760 EAPI Eina_Bool
2761  ecore_x_xregion_is_empty(Ecore_X_XRegion *region);
2762 EAPI Eina_Bool
2763  ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
2764                          Ecore_X_XRegion *r2);
2765 EAPI Eina_Bool
2766 ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
2767                               int x,
2768                               int y);
2769 EAPI Eina_Bool
2770 ecore_x_xregion_rect_contain(Ecore_X_XRegion *region,
2771                              Ecore_X_Rectangle *rect);
2772
2773 /* ecore_x_randr.c */
2774
2775 /* The usage of 'Ecore_X_Randr_None' or 'Ecore_X_Randr_Unset'
2776  * depends on the context. In most cases 'Ecore_X_Randr_Unset'
2777  * can be used, but in some cases -1 is a special value to
2778  * functions, thus 'Ecore_X_Randr_None' (=0) must be used.
2779  */
2780
2781 typedef short Ecore_X_Randr_Refresh_Rate;
2782 typedef int   Ecore_X_Randr_Crtc_Gamma;
2783 typedef int   Ecore_X_Randr_Signal_Format;
2784 typedef int   Ecore_X_Randr_Signal_Property;
2785 typedef int   Ecore_X_Randr_Connector_Type;
2786
2787 typedef struct _Ecore_X_Randr_Mode_Info
2788 {
2789    Ecore_X_ID    xid;
2790    unsigned int  width;
2791    unsigned int  height;
2792    unsigned long dotClock;
2793    unsigned int  hSyncStart;
2794    unsigned int  hSyncEnd;
2795    unsigned int  hTotal;
2796    unsigned int  hSkew;
2797    unsigned int  vSyncStart;
2798    unsigned int  vSyncEnd;
2799    unsigned int  vTotal;
2800    char         *name;
2801    unsigned int  nameLength;
2802    unsigned long modeFlags;
2803 } Ecore_X_Randr_Mode_Info;
2804
2805 EAPI int
2806  ecore_x_randr_version_get(void);
2807 EAPI Eina_Bool
2808  ecore_x_randr_query(void);
2809
2810 /* ecore_x_randr_11.c */
2811 EAPI Ecore_X_Randr_Orientation
2812  ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root);
2813 EAPI Ecore_X_Randr_Orientation
2814  ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root);
2815 EAPI Eina_Bool
2816  ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root,
2817                                                     Ecore_X_Randr_Orientation orientation);
2818 EAPI Ecore_X_Randr_Screen_Size_MM *
2819 ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root,
2820                                               int *num);
2821 EAPI void
2822 ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root,
2823                                                      int *w,
2824                                                      int *h,
2825                                                      int *w_mm,
2826                                                      int *h_mm,
2827                                                      int *size_index);
2828 EAPI Eina_Bool
2829 ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
2830                                              int size_index);
2831 EAPI Ecore_X_Randr_Refresh_Rate
2832  ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root);
2833 EAPI Ecore_X_Randr_Refresh_Rate *
2834  ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
2835                                                       int size_index,
2836                                                       int *num);
2837 EAPI Eina_Bool
2838 ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root,
2839                                                      int size_index,
2840                                                      Ecore_X_Randr_Refresh_Rate rate);
2841
2842 /* ecore_x_randr_12.c */
2843 EAPI void
2844 ecore_x_randr_events_select(Ecore_X_Window win,
2845                             Eina_Bool on);
2846
2847 EAPI void
2848 ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
2849                                       int *w,
2850                                       int *h,
2851                                       int *w_mm,
2852                                       int *h_mm);
2853 EAPI void
2854 ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
2855                                     int *wmin,
2856                                     int *hmin,
2857                                     int *wmax,
2858                                     int *hmax);
2859 EAPI void
2860  ecore_x_randr_screen_reset(Ecore_X_Window root);
2861 EAPI Eina_Bool
2862  ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
2863                                       int w,
2864                                       int h,
2865                                       int w_mm,
2866                                       int h_mm);
2867 EAPI Ecore_X_Randr_Mode_Info **
2868 ecore_x_randr_modes_info_get(Ecore_X_Window root,
2869                              int *num);
2870 EAPI Ecore_X_Randr_Mode
2871 ecore_x_randr_mode_info_add(Ecore_X_Window root,
2872                             Ecore_X_Randr_Mode_Info *mode_info);
2873 EAPI void
2874 ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode);
2875 EAPI Ecore_X_Randr_Mode_Info *
2876 ecore_x_randr_mode_info_get(Ecore_X_Window root,
2877                             Ecore_X_Randr_Mode mode);
2878 EAPI void
2879                            ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info);
2880 EAPI Ecore_X_Randr_Crtc *
2881                            ecore_x_randr_crtcs_get(Ecore_X_Window root,
2882                         int *num);
2883 EAPI Ecore_X_Randr_Output *ecore_x_randr_outputs_get(Ecore_X_Window root,
2884                                                       int *num);
2885 EAPI Ecore_X_Randr_Output *
2886 ecore_x_randr_window_outputs_get(Ecore_X_Window window,
2887                                  int *num);
2888 EAPI Ecore_X_Randr_Output *
2889 ecore_x_randr_current_output_get(Ecore_X_Window window,
2890                                  int *num);
2891 EAPI Ecore_X_Randr_Crtc *
2892 ecore_x_randr_window_crtcs_get(Ecore_X_Window window,
2893                                int *num);
2894 EAPI Ecore_X_Randr_Crtc *
2895 ecore_x_randr_current_crtc_get(Ecore_X_Window window,
2896                                int *num);
2897 EAPI Ecore_X_Randr_Output *
2898 ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
2899                                Ecore_X_Randr_Crtc crtc,
2900                                int *num);
2901 EAPI Ecore_X_Randr_Output *
2902 ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
2903                                         Ecore_X_Randr_Crtc crtc,
2904                                         int *num);
2905 EAPI void
2906 ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
2907                                 Ecore_X_Randr_Crtc crtc,
2908                                 int *x,
2909                                 int *y,
2910                                 int *w,
2911                                 int *h);
2912 EAPI void
2913 ecore_x_randr_crtc_pos_get(Ecore_X_Window root,
2914                            Ecore_X_Randr_Crtc crtc,
2915                            int *x,
2916                            int *y);
2917 EAPI Eina_Bool
2918 ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
2919                            Ecore_X_Randr_Crtc crtc,
2920                            int x,
2921                            int y);
2922 EAPI Ecore_X_Randr_Mode
2923 ecore_x_randr_crtc_mode_get(Ecore_X_Window root,
2924                             Ecore_X_Randr_Crtc crtc);
2925 EAPI Eina_Bool
2926 ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
2927                             Ecore_X_Randr_Crtc crtc,
2928                             Ecore_X_Randr_Output *outputs,
2929                             int noutputs,
2930                             Ecore_X_Randr_Mode mode);
2931 EAPI void
2932 ecore_x_randr_crtc_size_get(Ecore_X_Window root,
2933                             Ecore_X_Randr_Crtc crtc,
2934                             int *w,
2935                             int *h);
2936 EAPI Ecore_X_Randr_Refresh_Rate
2937 ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
2938                                     Ecore_X_Randr_Crtc crtc,
2939                                     Ecore_X_Randr_Mode mode);
2940 EAPI Ecore_X_Randr_Orientation
2941 ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
2942                                     Ecore_X_Randr_Crtc crtc);
2943 EAPI Ecore_X_Randr_Orientation
2944 ecore_x_randr_crtc_orientation_get(Ecore_X_Window root,
2945                                    Ecore_X_Randr_Crtc crtc);
2946 EAPI Eina_Bool
2947 ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
2948                                    Ecore_X_Randr_Crtc crtc,
2949                                    const Ecore_X_Randr_Orientation orientation);
2950 EAPI Eina_Bool
2951 ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
2952                              Ecore_X_Randr_Crtc original,
2953                              Ecore_X_Randr_Crtc clone);
2954 EAPI Eina_Bool
2955 ecore_x_randr_crtc_settings_set(Ecore_X_Window root,
2956                                 Ecore_X_Randr_Crtc crtc,
2957                                 Ecore_X_Randr_Output *outputs,
2958                                 int noutputs,
2959                                 int x,
2960                                 int y,
2961                                 Ecore_X_Randr_Mode mode,
2962                                 Ecore_X_Randr_Orientation orientation);
2963 EAPI Eina_Bool
2964 ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
2965                                     Ecore_X_Randr_Crtc crtc_r1,
2966                                     Ecore_X_Randr_Crtc crtc_r2,
2967                                     Ecore_X_Randr_Output_Policy policy,
2968                                     Ecore_X_Randr_Relative_Alignment alignment);
2969 EAPI Eina_Bool
2970 ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output,
2971                               Ecore_X_Randr_Mode mode);
2972 EAPI void
2973 ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output,
2974                               Ecore_X_Randr_Mode mode);
2975 EAPI Ecore_X_Randr_Mode *
2976 ecore_x_randr_output_modes_get(Ecore_X_Window root,
2977                                Ecore_X_Randr_Output output,
2978                                int *num,
2979                                int *npreferred);
2980 EAPI Ecore_X_Randr_Output *ecore_x_randr_output_clones_get(Ecore_X_Window root,
2981                                                            Ecore_X_Randr_Output output,
2982                                                            int *num);
2983 EAPI Ecore_X_Randr_Crtc *ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root,
2984                                                                  Ecore_X_Randr_Output output,
2985                                                                  int *num);
2986 EAPI Ecore_X_Randr_Crtc
2987 ecore_x_randr_output_crtc_get(Ecore_X_Window root,
2988                               Ecore_X_Randr_Output output);
2989 EAPI char *
2990 ecore_x_randr_output_name_get(Ecore_X_Window root,
2991                               Ecore_X_Randr_Output output,
2992                               int *len);
2993 EAPI int
2994  ecore_x_randr_crtc_gamma_ramp_size_get(Ecore_X_Randr_Crtc crtc);
2995 EAPI Ecore_X_Randr_Crtc_Gamma **
2996  ecore_x_randr_crtc_gamma_ramps_get(Ecore_X_Randr_Crtc crtc);
2997 EAPI Eina_Bool
2998  ecore_x_randr_crtc_gamma_ramps_set(Ecore_X_Randr_Crtc crtc,
2999                                    const Ecore_X_Randr_Crtc_Gamma *red,
3000                                    const Ecore_X_Randr_Crtc_Gamma *green,
3001                                    const Ecore_X_Randr_Crtc_Gamma *blue);
3002 EAPI Eina_Bool
3003 ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
3004                                  const Ecore_X_Randr_Crtc *not_moved,
3005                                  int nnot_moved,
3006                                  int dx,
3007                                  int dy);
3008 EAPI Eina_Bool
3009 ecore_x_randr_move_crtcs(Ecore_X_Window root,
3010                          const Ecore_X_Randr_Crtc *crtcs,
3011                          int ncrtc,
3012                          int dx,
3013                          int dy);
3014 EAPI void
3015 ecore_x_randr_mode_size_get(Ecore_X_Window root,
3016                             Ecore_X_Randr_Mode mode,
3017                             int *w,
3018                             int *h);
3019 EAPI Ecore_X_Randr_Connection_Status
3020 ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
3021                                            Ecore_X_Randr_Output output);
3022 EAPI void
3023 ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
3024                                  Ecore_X_Randr_Output output,
3025                                  int *w,
3026                                  int *h);
3027 EAPI Eina_Bool
3028 ecore_x_randr_output_crtc_set(Ecore_X_Window root,
3029                               Ecore_X_Randr_Output output,
3030                               const Ecore_X_Randr_Crtc crtc);
3031
3032 /* ecore_x_randr_12_edid.c */
3033
3034 /*
3035  * @brief Validates the header from raw EDID data.
3036  *
3037  * @param edid The edid structure.
3038  * @param edid_length Length of the edid structure.
3039  * @return @c EINA_TRUE, if the header is valid, @c EINA_FALSE otherwise.
3040  */
3041 EAPI Eina_Bool
3042 ecore_x_randr_edid_has_valid_header(unsigned char *edid,
3043                                     unsigned long edid_length);
3044
3045 /*
3046  * @brief Checks whether a display's EDID has a valid checksum.
3047  *
3048  * @param edid The edid structure.
3049  * @param edid_length Length of the edid structure.
3050  * @return @c EINA_TRUE, if the checksum is valid, @c EINA_FALSE otherwise.
3051  */
3052 EAPI Eina_Bool
3053 ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid,
3054                                            unsigned long edid_length);
3055
3056 /*
3057  * @brief Get the encoded version from raw EDID data.
3058  *
3059  * The return value has the minor version in the lowest 8 bits, and the major
3060  * version in all the rest of the bits. i.e.
3061  *
3062  * minor = (version & 0x000000ff);
3063  * major = (version & 0xffffff00) >> 8;
3064  *
3065  * @param edid the edid structure
3066  * @param edid_length length of the edid structure
3067  * @return The encoded major and minor version encasuplated an int.
3068  */
3069 EAPI int
3070 ecore_x_randr_edid_version_get(unsigned char *edid,
3071                                unsigned long edid_length);
3072
3073 /*
3074  * @brief Get the encoded manufacturer from raw EDID data.
3075  *
3076  * @param edid the edid structure
3077  * @param edid_length length of the edid structure
3078  * @return The encoded manufacturer identifier.
3079  */
3080 EAPI char *
3081 ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid,
3082                                          unsigned long edid_length);
3083
3084 /*
3085  * @brief Get the encoded name from raw EDID data.
3086  *
3087  * @param edid the edid structure
3088  * @param edid_length length of the edid structure
3089  * @return The encoded manufacturer identifier.
3090  */
3091 EAPI char *
3092 ecore_x_randr_edid_display_name_get(unsigned char *edid,
3093                                     unsigned long edid_length);
3094
3095 /*
3096  * @brief Get the encoded ASCII from raw EDID data.
3097  *
3098  * @param edid the edid structure
3099  * @param edid_length length of the edid structure
3100  * @return The encoded ASCII display identifier.
3101  */
3102 EAPI char *
3103 ecore_x_randr_edid_display_ascii_get(unsigned char *edid,
3104                                      unsigned long edid_length);
3105
3106 /*
3107  * @brief Get the encoded serial identifier from raw EDID data.
3108  *
3109  * @param edid the edid structure
3110  * @param edid_length length of the edid structure
3111  * @return The encoded serial identifier.
3112  */
3113 EAPI char *
3114 ecore_x_randr_edid_display_serial_get(unsigned char *edid,
3115                                       unsigned long edid_length);
3116
3117 /*
3118  * @brief Get the encoded model number from raw EDID data.
3119  *
3120  * The manufacturer ID table is necessary for a useful description.
3121  *
3122  * @param edid the edid structure
3123  * @param edid_length length of the edid structure
3124  * @return The encoded model number.
3125  */
3126 EAPI int
3127 ecore_x_randr_edid_model_get(unsigned char *edid,
3128                              unsigned long edid_length);
3129
3130 /*
3131  * @brief Get the manufacturer serial number from raw EDID data.
3132  *
3133  * @param edid the edid structure
3134  * @param edid_length length of the edid structure
3135  * @return The encoded serial manufacturer serial number.
3136  */
3137 EAPI int
3138 ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid,
3139                                                   unsigned long edid_length);
3140
3141 /*
3142  * @brief Get the manufacturer model number from raw EDID data.
3143  *
3144  * @param edid the edid structure
3145  * @param edid_length length of the edid structure
3146  * @return The manufacturer's model number.
3147  */
3148 EAPI int
3149 ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid,
3150                                           unsigned long edid_length);
3151
3152 /*
3153  * @brief Looks up the DPMS support from raw EDID data.
3154  *
3155  * @param edid The edid structure.
3156  * @param edid_length Length of the edid structure.
3157  * @return @c EINA_TRUE, if DPMS is supported in some way, @c EINA_FALSE
3158  * otherwise.
3159  */
3160 EAPI Eina_Bool
3161 ecore_x_randr_edid_dpms_available_get(unsigned char *edid,
3162                                       unsigned long edid_length);
3163
3164 /*
3165  * @brief Looks up the DPMS Standby support from raw EDID data.
3166  *
3167  * @param edid The edid structure.
3168  * @param edid_length Length of the edid structure.
3169  * @return @c EINA_TRUE, if DPMS Standby is supported, @c EINA_FALSE otherwise.
3170  */
3171 EAPI Eina_Bool
3172 ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid,
3173                                               unsigned long edid_length);
3174
3175 /*
3176  * @brief Looks up the DPMS Suspend support from raw EDID data.
3177  *
3178  * @param edid The edid structure.
3179  * @param edid_length Length of the edid structure.
3180  * @return @c EINA_TRUE, if DPMS Suspend is supported, @c EINA_FALSE otherwise.
3181  */
3182 EAPI Eina_Bool
3183 ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid,
3184                                               unsigned long edid_length);
3185
3186 /*
3187  * @brief Looks up the DPMS Off support from raw EDID data.
3188  *
3189  * @param edid The edid structure.
3190  * @param edid_length Length of the edid structure.
3191  * @return @c EINA_TRUE, if DPMS Off is supported, @c EINA_FALSE otherwise.
3192  */
3193 EAPI Eina_Bool
3194 ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid,
3195                                           unsigned long edid_length);
3196
3197 /*
3198  * @brief Get the preferred aspect ratio from raw EDID data.
3199  *
3200  * @param edid the edid structure
3201  * @param edid_length length of the edid structure
3202  * @return The preferred aspect ratio.
3203  */
3204 EAPI Ecore_X_Randr_Edid_Aspect_Ratio
3205 ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid,
3206                                                       unsigned long edid_length);
3207
3208 /*
3209  * @brief Get the supported aspect ratios from raw EDID data.
3210  *
3211  * @param edid the edid structure
3212  * @param edid_length length of the edid structure
3213  * @return The supported aspect ratios.
3214  */
3215 EAPI Ecore_X_Randr_Edid_Aspect_Ratio
3216 ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid,
3217                                              unsigned long edid_length);
3218
3219 /*
3220  * @brief Get the supported colorschemes from raw EDID data.
3221  *
3222  * @param edid the edid structure
3223  * @param edid_length length of the edid structure
3224  * @return The supported colorschemes.
3225  */
3226 EAPI Ecore_X_Randr_Edid_Display_Colorscheme
3227 ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid,
3228                                            unsigned long edid_length);
3229
3230 /*
3231  * @brief Get the display type from raw EDID data.
3232  *
3233  * @param edid The edid structure.
3234  * @param edid_length Length of the edid structure.
3235  * @return @c EINA_TRUE, if the display is a digital one, @c EINA_FALSE
3236  * otherwise.
3237  */
3238 EAPI Eina_Bool
3239 ecore_x_randr_edid_display_type_digital_get(unsigned char *edid,
3240                                             unsigned long edid_length);
3241
3242 /*
3243  * @brief Get the display interface type from raw EDID data.
3244  *
3245  * @param edid the edid structure
3246  * @param edid_length length of the edid structure
3247  * @return The interface type.
3248  */
3249 EAPI Ecore_X_Randr_Edid_Display_Interface_Type
3250 ecore_x_randr_edid_display_interface_type_get(unsigned char *edid,
3251                                               unsigned long edid_length);
3252
3253 /* ecore_x_randr_12.c */
3254
3255 EAPI Eina_Bool
3256 ecore_x_randr_output_backlight_available(void);
3257 EAPI void
3258 ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root,
3259                                          double level);
3260 EAPI double
3261 ecore_x_randr_output_backlight_level_get(Ecore_X_Window root,
3262                                          Ecore_X_Randr_Output output);
3263 EAPI Eina_Bool
3264 ecore_x_randr_output_backlight_level_set(Ecore_X_Window root,
3265                                          Ecore_X_Randr_Output output,
3266                                          double level);
3267 EAPI Ecore_X_Randr_Output
3268  ecore_x_randr_primary_output_get(Ecore_X_Window root);
3269 EAPI void
3270  ecore_x_randr_primary_output_set(Ecore_X_Window root,
3271                                  Ecore_X_Randr_Output output);
3272 EAPI Ecore_X_Render_Subpixel_Order
3273 ecore_x_randr_output_subpixel_order_get(Ecore_X_Window root,
3274                                         Ecore_X_Randr_Output output);
3275 EAPI unsigned char *
3276 ecore_x_randr_output_edid_get(Ecore_X_Window root,
3277                               Ecore_X_Randr_Output output,
3278                               unsigned long *length);
3279 EAPI Ecore_X_Randr_Output *
3280 ecore_x_randr_output_wired_clones_get(Ecore_X_Window root,
3281                                       Ecore_X_Randr_Output output,
3282                                       int *num);
3283 EAPI Ecore_X_Randr_Output **
3284 ecore_x_randr_output_compatibility_list_get(Ecore_X_Window root,
3285                                             Ecore_X_Randr_Output output,
3286                                             int *num);
3287 EAPI Ecore_X_Randr_Signal_Format *
3288 ecore_x_randr_output_signal_formats_get(Ecore_X_Window root,
3289                                         Ecore_X_Randr_Output output,
3290                                         int *num);
3291 EAPI Eina_Bool
3292 ecore_x_randr_output_signal_format_set(Ecore_X_Window root,
3293                                        Ecore_X_Randr_Output output,
3294                                        Ecore_X_Randr_Signal_Format *signal);
3295 EAPI Ecore_X_Randr_Signal_Property *
3296 ecore_x_randr_output_signal_properties_get(Ecore_X_Window root,
3297                                            Ecore_X_Randr_Output output,
3298                                            int *num);
3299 EAPI int
3300 ecore_x_randr_output_connector_number_get(Ecore_X_Window root,
3301                                           Ecore_X_Randr_Output output);
3302 EAPI Ecore_X_Randr_Connector_Type
3303 ecore_x_randr_output_connector_type_get(Ecore_X_Window root,
3304                                         Ecore_X_Randr_Output output);
3305 EAPI Eina_Rectangle *
3306 ecore_x_randr_crtc_panning_area_get(Ecore_X_Window root,
3307                                     Ecore_X_Randr_Crtc crtc,
3308                                     int *x,
3309                                     int *y,
3310                                     int *w,
3311                                     int *h);
3312 EAPI Eina_Bool
3313 ecore_x_randr_crtc_panning_area_set(Ecore_X_Window root,
3314                                     Ecore_X_Randr_Crtc crtc,
3315                                     int x,
3316                                     const int y,
3317                                     const int w,
3318                                     const int h);
3319 EAPI Eina_Rectangle *
3320 ecore_x_randr_crtc_tracking_area_get(Ecore_X_Window root,
3321                                      Ecore_X_Randr_Crtc crtc,
3322                                      int *x,
3323                                      int *y,
3324                                      int *w,
3325                                      int *h);
3326 EAPI Eina_Bool
3327 ecore_x_randr_crtc_tracking_area_set(Ecore_X_Window root,
3328                                      Ecore_X_Randr_Crtc crtc,
3329                                      int x,
3330                                      const int y,
3331                                      const int w,
3332                                      const int h);
3333 EAPI Eina_Rectangle *
3334 ecore_x_randr_crtc_border_area_get(Ecore_X_Window root,
3335                                    Ecore_X_Randr_Crtc crtc);
3336 EAPI Eina_Bool
3337 ecore_x_randr_crtc_border_area_set(Ecore_X_Window root,
3338                                    Ecore_X_Randr_Crtc crtc,
3339                                    int left,
3340                                    const int top,
3341                                    const int right,
3342                                    const int bottom);
3343
3344 /* XRender Support (horrendously incomplete) */
3345 typedef Ecore_X_ID Ecore_X_Picture;
3346
3347 /* XFixes Extension Support */
3348 typedef Ecore_X_ID Ecore_X_Region;
3349
3350 typedef enum _Ecore_X_Region_Type
3351 {
3352    ECORE_X_REGION_BOUNDING,
3353    ECORE_X_REGION_CLIP
3354 } Ecore_X_Region_Type;
3355
3356 EAPI Ecore_X_Region
3357 ecore_x_region_new(Ecore_X_Rectangle *rects,
3358                    int num);
3359 EAPI Ecore_X_Region
3360  ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap);
3361 EAPI Ecore_X_Region
3362  ecore_x_region_new_from_window(Ecore_X_Window win,
3363                                Ecore_X_Region_Type type);
3364 EAPI Ecore_X_Region
3365  ecore_x_region_new_from_gc(Ecore_X_GC gc);
3366 EAPI Ecore_X_Region
3367  ecore_x_region_new_from_picture(Ecore_X_Picture picture);
3368 EAPI void
3369  ecore_x_region_free(Ecore_X_Region region);
3370 EAPI void
3371  ecore_x_region_set(Ecore_X_Region region,
3372                    Ecore_X_Rectangle *rects,
3373                    int num);
3374 EAPI void
3375 ecore_x_region_copy(Ecore_X_Region dest,
3376                     Ecore_X_Region source);
3377 EAPI void
3378 ecore_x_region_combine(Ecore_X_Region dest,
3379                        Ecore_X_Region source1,
3380                        Ecore_X_Region source2);
3381 EAPI void
3382 ecore_x_region_intersect(Ecore_X_Region dest,
3383                          Ecore_X_Region source1,
3384                          Ecore_X_Region source2);
3385 EAPI void
3386 ecore_x_region_subtract(Ecore_X_Region dest,
3387                         Ecore_X_Region source1,
3388                         Ecore_X_Region source2);
3389 EAPI void
3390 ecore_x_region_invert(Ecore_X_Region dest,
3391                       Ecore_X_Rectangle *bounds,
3392                       Ecore_X_Region source);
3393 EAPI void
3394 ecore_x_region_translate(Ecore_X_Region region,
3395                          int dx,
3396                          int dy);
3397 EAPI void
3398 ecore_x_region_extents(Ecore_X_Region dest,
3399                        Ecore_X_Region source);
3400 EAPI Ecore_X_Rectangle *
3401 ecore_x_region_fetch(Ecore_X_Region region,
3402                      int *num,
3403                      Ecore_X_Rectangle *bounds);
3404 EAPI void
3405 ecore_x_region_expand(Ecore_X_Region dest,
3406                       Ecore_X_Region source,
3407                       unsigned int left,
3408                       unsigned int right,
3409                       unsigned int top,
3410                       unsigned int bottom);
3411 EAPI void
3412 ecore_x_region_gc_clip_set(Ecore_X_Region region,
3413                            Ecore_X_GC gc,
3414                            int x_origin,
3415                            int y_origin);
3416 EAPI void
3417 ecore_x_region_window_shape_set(Ecore_X_Region region,
3418                                 Ecore_X_Window win,
3419                                 Ecore_X_Shape_Type type,
3420                                 int x_offset,
3421                                 int y_offset);
3422 EAPI void
3423 ecore_x_region_picture_clip_set(Ecore_X_Region region,
3424                                 Ecore_X_Picture picture,
3425                                 int x_origin,
3426                                 int y_origin);
3427
3428 /**
3429  * xfixes selection notification request.
3430  *
3431  * This lets you choose which selections you want to get notifications for.
3432  * @param selection The selection atom.
3433  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
3434  * @since 1.1.0
3435  */
3436 EAPI Eina_Bool
3437 ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection);
3438
3439 /* XComposite Extension Support */
3440 EAPI Eina_Bool
3441  ecore_x_composite_query(void);
3442 EAPI void
3443  ecore_x_composite_redirect_window(Ecore_X_Window win,
3444                                   Ecore_X_Composite_Update_Type type);
3445 EAPI void
3446 ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
3447                                       Ecore_X_Composite_Update_Type type);
3448 EAPI void
3449 ecore_x_composite_unredirect_window(Ecore_X_Window win,
3450                                     Ecore_X_Composite_Update_Type type);
3451 EAPI void
3452 ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
3453                                         Ecore_X_Composite_Update_Type type);
3454 EAPI Ecore_X_Pixmap
3455  ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win);
3456 EAPI void
3457  ecore_x_composite_window_events_disable(Ecore_X_Window win);
3458 EAPI void
3459  ecore_x_composite_window_events_enable(Ecore_X_Window win);
3460 EAPI Ecore_X_Window
3461  ecore_x_composite_render_window_enable(Ecore_X_Window root);
3462 EAPI void
3463  ecore_x_composite_render_window_disable(Ecore_X_Window root);
3464
3465 /* XDamage Extension Support */
3466 typedef Ecore_X_ID Ecore_X_Damage;
3467
3468 typedef enum _Ecore_X_Damage_Report_Level
3469 {
3470    ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES,
3471    ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES,
3472    ECORE_X_DAMAGE_REPORT_BOUNDING_BOX,
3473    ECORE_X_DAMAGE_REPORT_NON_EMPTY
3474 } Ecore_X_Damage_Report_Level;
3475
3476 struct _Ecore_X_Event_Damage
3477 {
3478    Ecore_X_Damage_Report_Level level;
3479    Ecore_X_Drawable            drawable;
3480    Ecore_X_Damage              damage;
3481    int                         more;
3482    Ecore_X_Time                time;
3483    Ecore_X_Rectangle           area;
3484    Ecore_X_Rectangle           geometry;
3485 };
3486
3487 typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage;
3488
3489 EAPI Eina_Bool
3490  ecore_x_damage_query(void);
3491 EAPI Ecore_X_Damage
3492  ecore_x_damage_new(Ecore_X_Drawable d,
3493                    Ecore_X_Damage_Report_Level level);
3494 EAPI void
3495  ecore_x_damage_free(Ecore_X_Damage damage);
3496 EAPI void
3497  ecore_x_damage_subtract(Ecore_X_Damage damage,
3498                         Ecore_X_Region repair,
3499                         Ecore_X_Region parts);
3500
3501 EAPI Eina_Bool
3502  ecore_x_screen_is_composited(int screen);
3503 EAPI void
3504  ecore_x_screen_is_composited_set(int screen,
3505                                  Ecore_X_Window win);
3506
3507 EAPI Eina_Bool
3508  ecore_x_dpms_query(void);
3509 EAPI Eina_Bool
3510  ecore_x_dpms_capable_get(void);
3511 EAPI Eina_Bool
3512  ecore_x_dpms_enabled_get(void);
3513 EAPI void
3514  ecore_x_dpms_enabled_set(int enabled);
3515 EAPI void
3516  ecore_x_dpms_timeouts_get(unsigned int *standby,
3517                           unsigned int *suspend,
3518                           unsigned int *off);
3519 EAPI Eina_Bool
3520 ecore_x_dpms_timeouts_set(unsigned int standby,
3521                           unsigned int suspend,
3522                           unsigned int off);
3523 EAPI unsigned int
3524  ecore_x_dpms_timeout_standby_get(void);
3525 EAPI unsigned int
3526  ecore_x_dpms_timeout_suspend_get(void);
3527 EAPI unsigned int
3528  ecore_x_dpms_timeout_off_get(void);
3529 EAPI void
3530  ecore_x_dpms_timeout_standby_set(unsigned int new_timeout);
3531 EAPI void
3532  ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout);
3533 EAPI void
3534  ecore_x_dpms_timeout_off_set(unsigned int new_timeout);
3535
3536 EAPI Eina_Bool
3537  ecore_x_test_fake_key_down(const char *key);
3538 EAPI Eina_Bool
3539  ecore_x_test_fake_key_up(const char *key);
3540 EAPI Eina_Bool
3541  ecore_x_test_fake_key_press(const char *key);
3542 EAPI const char *
3543  ecore_x_keysym_string_get(int keysym);
3544
3545 /**
3546  * Given a keyname, return the keycode representing that key
3547  * @param keyname The key from which to get the keycode.
3548  * @return The keycode of the key.
3549  *
3550  * @since 1.2.0
3551  */
3552 EAPI int ecore_x_keysym_keycode_get(const char *keyname);
3553
3554 typedef struct _Ecore_X_Image Ecore_X_Image;
3555
3556 EAPI Ecore_X_Image *
3557 ecore_x_image_new(int w,
3558                   int h,
3559                   Ecore_X_Visual vis,
3560                   int depth);
3561 EAPI void
3562  ecore_x_image_free(Ecore_X_Image *im);
3563 EAPI Eina_Bool
3564  ecore_x_image_get(Ecore_X_Image *im,
3565                   Ecore_X_Drawable draw,
3566                   int x,
3567                   int y,
3568                   int sx,
3569                   int sy,
3570                   int w,
3571                   int h);
3572 EAPI void
3573 ecore_x_image_put(Ecore_X_Image *im,
3574                   Ecore_X_Drawable draw,
3575                   Ecore_X_GC gc,
3576                   int x,
3577                   int y,
3578                   int sx,
3579                   int sy,
3580                   int w,
3581                   int h);
3582 EAPI void *
3583 ecore_x_image_data_get(Ecore_X_Image *im,
3584                        int *bpl,
3585                        int *rows,
3586                        int *bpp);
3587 EAPI Eina_Bool
3588 ecore_x_image_is_argb32_get(Ecore_X_Image *im);
3589
3590 EAPI Eina_Bool
3591 ecore_x_image_to_argb_convert(void *src,
3592                               int sbpp,
3593                               int sbpl,
3594                               Ecore_X_Colormap c,
3595                               Ecore_X_Visual v,
3596                               int x,
3597                               int y,
3598                               int w,
3599                               int h,
3600                               unsigned int *dst,
3601                               int dbpl,
3602                               int dx,
3603                               int dy);
3604
3605 EAPI Eina_Bool
3606 ecore_x_input_multi_select(Ecore_X_Window win);
3607
3608 EAPI Eina_Bool
3609 ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win);
3610
3611 typedef enum _Ecore_X_Gesture_Event_Mask
3612 {
3613    ECORE_X_GESTURE_EVENT_MASK_NONE = 0L,
3614    ECORE_X_GESTURE_EVENT_MASK_FLICK = (1L << 0),
3615    ECORE_X_GESTURE_EVENT_MASK_PAN = (1L << 1),
3616    ECORE_X_GESTURE_EVENT_MASK_PINCHROTATION = (1L << 2),
3617    ECORE_X_GESTURE_EVENT_MASK_TAP = (1L << 3),
3618    ECORE_X_GESTURE_EVENT_MASK_TAPNHOLD = (1L << 4),
3619    ECORE_X_GESTURE_EVENT_MASK_HOLD = (1L << 5),
3620    ECORE_X_GESTURE_EVENT_MASK_GROUP = (1L << 6)
3621 } Ecore_X_Gesture_Event_Mask;
3622
3623 typedef enum _Ecore_X_Gesture_Event_Type
3624 {
3625    ECORE_X_GESTURE_EVENT_FLICK,
3626    ECORE_X_GESTURE_EVENT_PAN,
3627    ECORE_X_GESTURE_EVENT_PINCHROTATION,
3628    ECORE_X_GESTURE_EVENT_TAP,
3629    ECORE_X_GESTURE_EVENT_TAPNHOLD,
3630    ECORE_X_GESTURE_EVENT_HOLD,
3631    ECORE_X_GESTURE_EVENT_GROUP
3632 } Ecore_X_Gesture_Event_Type;
3633
3634 typedef enum _Ecore_X_Gesture_Event_Subtype
3635 {
3636    ECORE_X_GESTURE_END,
3637    ECORE_X_GESTURE_BEGIN,
3638    ECORE_X_GESTURE_UPDATE,
3639    ECORE_X_GESTURE_DONE
3640 } Ecore_X_Gesture_Event_Subtype;
3641
3642 typedef enum _Ecore_X_Gesture_Group_Subtype
3643 {
3644    ECORE_X_GESTURE_GROUP_REMOVED,
3645    ECORE_X_GESTURE_GROUP_ADDED,
3646    ECORE_X_GESTURE_GROUP_CURRENT
3647 } Ecore_X_Gesture_Group_Subtype;
3648
3649 typedef enum _Ecore_X_Gesture_Direction
3650 {
3651    ECORE_X_GESTURE_NORTHWARD,
3652    ECORE_X_GESTURE_NORTHEASTWARD,
3653    ECORE_X_GESTURE_EASTWARD,
3654    ECORE_X_GESTURE_SOUTHEASTWARD,
3655    ECORE_X_GESTURE_SOUTHWARD,
3656    ECORE_X_GESTURE_SOUTHWESTWARD,
3657    ECORE_X_GESTURE_WESTWARD,
3658    ECORE_X_GESTURE_NORTHWESTWARD
3659 } Ecore_X_Gesture_Direction;
3660
3661 struct _Ecore_X_Event_Gesture_Notify_Flick
3662 {
3663    Ecore_X_Window win;
3664    Ecore_X_Time time;
3665    Ecore_X_Gesture_Event_Subtype subtype;
3666    int num_fingers;
3667    int distance;
3668    Ecore_X_Time duration;
3669    Ecore_X_Gesture_Direction direction;
3670    double angle;
3671 };
3672    
3673 struct _Ecore_X_Event_Gesture_Notify_Pan
3674 {
3675    Ecore_X_Window win;
3676    Ecore_X_Time time;
3677    Ecore_X_Gesture_Event_Subtype subtype;
3678    int num_fingers;
3679    int dx;
3680    int dy;
3681    int distance;
3682    Ecore_X_Time duration;
3683    Ecore_X_Gesture_Direction direction;
3684 };
3685
3686 struct _Ecore_X_Event_Gesture_Notify_PinchRotation
3687 {
3688    Ecore_X_Window win;
3689    Ecore_X_Time time;
3690    Ecore_X_Gesture_Event_Subtype subtype;
3691    int num_fingers;
3692    int distance;
3693    int cx;
3694    int cy;
3695    double zoom;
3696    double angle;
3697 };
3698
3699 struct _Ecore_X_Event_Gesture_Notify_Tap
3700 {
3701   Ecore_X_Window win;
3702   Ecore_X_Time time;
3703   Ecore_X_Gesture_Event_Subtype subtype;
3704   int num_fingers;
3705   int cx;
3706   int cy;
3707   int tap_repeat;
3708   Ecore_X_Time interval;
3709 };
3710
3711 struct _Ecore_X_Event_Gesture_Notify_TapNHold
3712 {
3713   Ecore_X_Window win;
3714   Ecore_X_Time time;
3715   Ecore_X_Gesture_Event_Subtype subtype;
3716   int num_fingers;
3717   int cx;
3718   int cy;
3719   Ecore_X_Time interval;
3720   Ecore_X_Time hold_time;
3721 };
3722
3723 struct _Ecore_X_Event_Gesture_Notify_Hold
3724 {
3725   Ecore_X_Window win;
3726   Ecore_X_Time time;
3727   Ecore_X_Gesture_Event_Subtype subtype;
3728   int num_fingers;
3729   int cx;
3730   int cy;
3731   Ecore_X_Time hold_time;
3732 };
3733
3734 struct _Ecore_X_Event_Gesture_Notify_Group
3735 {
3736    Ecore_X_Window win;
3737    Ecore_X_Time time;
3738    Ecore_X_Gesture_Group_Subtype subtype;
3739    int num_groups;
3740    int group_id;
3741 };
3742
3743 EAPI Eina_Bool
3744 ecore_x_gesture_supported(void);
3745
3746 EAPI Eina_Bool
3747 ecore_x_gesture_events_select(Ecore_X_Window win,
3748                               Ecore_X_Gesture_Event_Mask mask);
3749
3750 EAPI Ecore_X_Gesture_Event_Mask
3751 ecore_x_gesture_events_selected_get(Ecore_X_Window win);
3752
3753 EAPI Eina_Bool
3754 ecore_x_gesture_event_grab(Ecore_X_Window win,
3755                            Ecore_X_Gesture_Event_Type type,
3756                            int num_fingers);
3757
3758 EAPI Eina_Bool
3759 ecore_x_gesture_event_ungrab(Ecore_X_Window win,
3760                              Ecore_X_Gesture_Event_Type type,
3761                              int num_fingers);
3762
3763 EAPI void
3764 ecore_x_e_illume_indicator_state_set(Ecore_X_Window win,
3765                                      Ecore_X_Illume_Indicator_State state);
3766 EAPI Ecore_X_Illume_Indicator_State
3767 ecore_x_e_illume_indicator_state_get(Ecore_X_Window win);
3768 EAPI void
3769 ecore_x_e_illume_indicator_state_send(Ecore_X_Window win,
3770                                       Ecore_X_Illume_Indicator_State state);
3771
3772 EAPI void
3773 ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win,
3774                                      Ecore_X_Illume_Indicator_Opacity_Mode mode);
3775
3776 EAPI Ecore_X_Illume_Indicator_Opacity_Mode
3777 ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win);
3778
3779 EAPI void
3780 ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win,
3781                                       Ecore_X_Illume_Indicator_Opacity_Mode mode);
3782
3783 #ifdef __cplusplus
3784 }
3785 #endif // ifdef __cplusplus
3786
3787 #include <Ecore_X_Atoms.h>
3788 #include <Ecore_X_Cursor.h>
3789
3790 #endif // ifndef _ECORE_X_H