7337ae20ce93cbac854b2979ecd303a4790eec6e
[platform/upstream/efl.git] / src / lib / ecore_x / Ecore_X.h
1 #ifndef _ECORE_X_H
2 #define _ECORE_X_H
3
4 #include <Eina.h>
5 #include <Efl_Config.h>
6
7 #ifdef EAPI
8 # undef EAPI
9 #endif // ifdef EAPI
10
11 #ifdef _MSC_VER
12 # ifdef BUILDING_DLL
13 #  define EAPI __declspec(dllexport)
14 # else // ifdef BUILDING_DLL
15 #  define EAPI __declspec(dllimport)
16 # endif // ifdef BUILDING_DLL
17 #else // ifdef _MSC_VER
18 # ifdef __GNUC__
19 #  if __GNUC__ >= 4
20 #   define EAPI __attribute__ ((visibility("default")))
21 #  else // if __GNUC__ >= 4
22 #   define EAPI
23 #  endif // if __GNUC__ >= 4
24 # else // ifdef __GNUC__
25 #  define EAPI
26 # endif // ifdef __GNUC__
27 #endif // ifdef _MSC_VER
28
29 #define ECORE_X_VERSION_MAJOR EFL_VERSION_MAJOR
30 #define ECORE_X_VERSION_MINOR EFL_VERSION_MINOR
31 /**
32  * @typedef Ecore_X_Version
33  * Represents the current version of Ecore_X
34  */
35 typedef struct _Ecore_X_Version
36 {
37       int major; /** < major (binary or source incompatible changes) */
38       int minor; /** < minor (new features, bugfixes, major improvements version) */
39       int micro; /** < micro (bugfix, internal improvements, no new features version) */
40       int revision; /** < git revision (0 if a proper release or the git revision number Ecore_X is built from) */
41 } Ecore_X_Version;
42
43 EAPI extern Ecore_X_Version *ecore_x_version;
44
45 #include "ecore_x_version.h"
46
47 #include <sys/types.h>
48
49 /**
50  * @file
51  * @brief Ecore functions for dealing with the X Windows System
52  *
53  * @defgroup Ecore_X_Group Ecore_X - X11 Integration
54  * @ingroup Ecore
55  *
56  * Ecore_X provides a wrapper and convenience functions for using the
57  * X Windows System.  Function groups for this part of the library
58  * include the following:
59  * @li @ref Ecore_X_Init_Group
60  * @li @ref Ecore_X_Display_Attr_Group
61  * @li @ref Ecore_X_Flush_Group
62  * @li @ref Ecore_X_DPMS_Group
63  * @li @ref Ecore_X_Drawable_Group
64  * @li @ref Ecore_X_Pixmap_Group
65  * @li @ref Ecore_X_Window_Create_Group
66  * @li @ref Ecore_X_Window_Properties_Group
67  * @li @ref Ecore_X_Window_Destroy_Group
68  * @li @ref Ecore_X_Window_Visibility_Group
69  * @li @ref Ecore_X_Window_Geometry_Group
70  * @li @ref Ecore_X_Window_Focus_Functions
71  * @li @ref Ecore_X_Window_Z_Order_Group
72  * @li @ref Ecore_X_Window_Parent_Group
73  * @li @ref Ecore_X_Window_Shape
74  *
75  * When using the XLib backend, setting the ECORE_X_SYNC environment variable
76  * will cause X calls to be run synchronously for easier debugging.
77  */
78
79 typedef unsigned int   Ecore_X_ID;
80 #ifndef _ECORE_X_WINDOW_PREDEF
81 typedef Ecore_X_ID     Ecore_X_Window;
82 typedef Ecore_X_ID     Ecore_X_Pixmap;
83 typedef Ecore_X_ID     Ecore_X_Atom;
84 typedef struct _Ecore_X_Icon
85 {
86    unsigned int  width, height;
87    unsigned int *data;
88 } Ecore_X_Icon;
89 #endif // ifndef _ECORE_X_WINDOW_PREDEF
90 typedef void          *Ecore_X_Visual;
91 typedef Ecore_X_ID     Ecore_X_Drawable;
92 #ifdef HAVE_ECORE_X_XCB
93 typedef Ecore_X_ID     Ecore_X_GC;
94 #else // ifdef HAVE_ECORE_X_XCB
95 typedef void          *Ecore_X_GC;
96 #endif /* HAVE_ECORE_X_XCB */
97 typedef Ecore_X_ID     Ecore_X_Colormap;
98 typedef Ecore_X_ID     Ecore_X_Time;
99 typedef Ecore_X_ID     Ecore_X_Cursor;
100 typedef void           Ecore_X_Display;
101 typedef void           Ecore_X_Connection;
102 typedef void           Ecore_X_Screen;
103 typedef Ecore_X_ID     Ecore_X_Sync_Counter;
104 typedef Ecore_X_ID     Ecore_X_Sync_Alarm;
105 typedef Ecore_X_ID     Ecore_X_Sync_Fence; /**< @since 1.9 */
106 typedef void           Ecore_X_XRegion;
107
108 typedef Ecore_X_ID     Ecore_X_Randr_Output;
109 typedef Ecore_X_ID     Ecore_X_Randr_Crtc;
110 typedef Ecore_X_ID     Ecore_X_Randr_Mode;
111 typedef unsigned short Ecore_X_Randr_Size_ID;
112 typedef int            Ecore_X_Randr_Screen;
113
114 typedef Ecore_X_ID     Ecore_X_Device;
115
116 #ifdef __cplusplus
117 extern "C" {
118 #endif // ifdef __cplusplus
119
120 typedef struct _Ecore_X_Rectangle
121 {
122    int          x, y;
123    unsigned int width, height;
124 } Ecore_X_Rectangle;
125
126 typedef enum _Ecore_X_GC_Value_Mask
127 {
128    ECORE_X_GC_VALUE_MASK_FUNCTION = (1L << 0),
129    ECORE_X_GC_VALUE_MASK_PLANE_MASK = (1L << 1),
130    ECORE_X_GC_VALUE_MASK_FOREGROUND = (1L << 2),
131    ECORE_X_GC_VALUE_MASK_BACKGROUND = (1L << 3),
132    ECORE_X_GC_VALUE_MASK_LINE_WIDTH = (1L << 4),
133    ECORE_X_GC_VALUE_MASK_LINE_STYLE = (1L << 5),
134    ECORE_X_GC_VALUE_MASK_CAP_STYLE = (1L << 6),
135    ECORE_X_GC_VALUE_MASK_JOIN_STYLE = (1L << 7),
136    ECORE_X_GC_VALUE_MASK_FILL_STYLE = (1L << 8),
137    ECORE_X_GC_VALUE_MASK_FILL_RULE = (1L << 9),
138    ECORE_X_GC_VALUE_MASK_TILE = (1L << 10),
139    ECORE_X_GC_VALUE_MASK_STIPPLE = (1L << 11),
140    ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X = (1L << 12),
141    ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y = (1L << 13),
142    ECORE_X_GC_VALUE_MASK_FONT = (1L << 14),
143    ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE = (1L << 15),
144    ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES = (1L << 16),
145    ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X = (1L << 17),
146    ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y = (1L << 18),
147    ECORE_X_GC_VALUE_MASK_CLIP_MASK = (1L << 19),
148    ECORE_X_GC_VALUE_MASK_DASH_OFFSET = (1L << 20),
149    ECORE_X_GC_VALUE_MASK_DASH_LIST = (1L << 21),
150    ECORE_X_GC_VALUE_MASK_ARC_MODE = (1L << 22)
151 } Ecore_X_GC_Value_Mask;
152
153 typedef enum _Ecore_X_Composite_Update_Type
154 {
155    ECORE_X_COMPOSITE_UPDATE_AUTOMATIC,
156    ECORE_X_COMPOSITE_UPDATE_MANUAL
157 } Ecore_X_Composite_Update_Type;
158
159 /**
160  * @typedef _Ecore_X_Window_State
161  * Defines the different states of the window of Ecore_X.
162  */
163 typedef enum _Ecore_X_Window_State
164 {
165    ECORE_X_WINDOW_STATE_UNKNOWN = 0,
166    ECORE_X_WINDOW_STATE_ICONIFIED,  /** The window is iconified. */
167    ECORE_X_WINDOW_STATE_MODAL,  /** The window is a modal dialog box. */
168    ECORE_X_WINDOW_STATE_STICKY, /** The window manager should keep the window's position fixed
169                                  * even if the virtual desktop scrolls. */
170    ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,  /** The window has the maximum vertical size. */
171    ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,  /** The window has the maximum horizontal size. */
172    ECORE_X_WINDOW_STATE_SHADED,  /** The window is shaded. */
173    ECORE_X_WINDOW_STATE_SKIP_TASKBAR,  /** The window should not be included in the taskbar. */
174    ECORE_X_WINDOW_STATE_SKIP_PAGER,  /** The window should not be included in the pager. */
175    ECORE_X_WINDOW_STATE_HIDDEN,  /** The window is invisible (i.e. minimized/iconified) */
176    ECORE_X_WINDOW_STATE_FULLSCREEN,  /** The window should fill the entire screen and have no
177                                       * window border/decorations */
178    ECORE_X_WINDOW_STATE_ABOVE,
179    ECORE_X_WINDOW_STATE_BELOW,
180    ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
181 } Ecore_X_Window_State;
182
183 typedef enum _Ecore_X_Window_State_Action
184 {
185    ECORE_X_WINDOW_STATE_ACTION_REMOVE,
186    ECORE_X_WINDOW_STATE_ACTION_ADD,
187    ECORE_X_WINDOW_STATE_ACTION_TOGGLE
188 } Ecore_X_Window_State_Action;
189
190 typedef enum _Ecore_X_Window_Stack_Mode
191 {
192    ECORE_X_WINDOW_STACK_ABOVE = 0,
193    ECORE_X_WINDOW_STACK_BELOW = 1,
194    ECORE_X_WINDOW_STACK_TOP_IF = 2,
195    ECORE_X_WINDOW_STACK_BOTTOM_IF = 3,
196    ECORE_X_WINDOW_STACK_OPPOSITE = 4
197 } Ecore_X_Window_Stack_Mode;
198
199 typedef enum _Ecore_X_Randr_Orientation
200 {
201    ECORE_X_RANDR_ORIENTATION_ROT_0 = (1 << 0),
202    ECORE_X_RANDR_ORIENTATION_ROT_90 = (1 << 1),
203    ECORE_X_RANDR_ORIENTATION_ROT_180 = (1 << 2),
204    ECORE_X_RANDR_ORIENTATION_ROT_270 = (1 << 3),
205    ECORE_X_RANDR_ORIENTATION_FLIP_X = (1 << 4),
206    ECORE_X_RANDR_ORIENTATION_FLIP_Y = (1 << 5)
207 } Ecore_X_Randr_Orientation;
208
209 typedef enum _Ecore_X_Randr_Connection_Status
210 {
211    ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED = 0,
212    ECORE_X_RANDR_CONNECTION_STATUS_DISCONNECTED = 1,
213    ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN = 2
214 } Ecore_X_Randr_Connection_Status;
215
216 typedef enum _Ecore_X_Randr_Output_Policy
217 {
218    ECORE_X_RANDR_OUTPUT_POLICY_ABOVE = 1,
219    ECORE_X_RANDR_OUTPUT_POLICY_RIGHT = 2,
220    ECORE_X_RANDR_OUTPUT_POLICY_BELOW = 3,
221    ECORE_X_RANDR_OUTPUT_POLICY_LEFT = 4,
222    ECORE_X_RANDR_OUTPUT_POLICY_CLONE = 5,
223    ECORE_X_RANDR_OUTPUT_POLICY_NONE = 6,
224    ECORE_X_RANDR_OUTPUT_POLICY_ASK = 7
225 } Ecore_X_Randr_Output_Policy;
226
227 typedef enum _Ecore_X_Randr_Relative_Alignment
228 {
229    ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE = 0,
230    ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL = 1,
231    ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR = 2
232 } Ecore_X_Randr_Relative_Alignment;
233
234 typedef enum _Ecore_X_Render_Subpixel_Order
235 {
236    ECORE_X_RENDER_SUBPIXEL_ORDER_UNKNOWN = 0,
237    ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_RGB = 1,
238    ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_BGR = 2,
239    ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_RGB = 3,
240    ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_BGR = 4,
241    ECORE_X_RENDER_SUBPIXEL_ORDER_NONE = 5
242 } Ecore_X_Render_Subpixel_Order;
243
244 typedef enum _Ecore_X_Randr_Edid_Display_Interface_Type
245 {
246    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_UNDEFINED,
247    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DVI,
248    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_HDMI_A,
249    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_HDMI_B,
250    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_MDDI,
251    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DISPLAY_PORT
252 } Ecore_X_Randr_Edid_Display_Interface_Type;
253
254 typedef enum _Ecore_X_Randr_Edid_Display_Colorscheme
255 {
256    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_MONOCHROME_GRAYSCALE = 0x00,
257    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB = 0x08,
258    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_NON_RGB = 0x10,
259    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_UNDEFINED = 0x18,
260    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_4_4_4 = 0x444000,
261    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_4_4 = 0x444,
262    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_2_2 = 0x422
263 } Ecore_X_Randr_Edid_Display_Colorscheme;
264
265 typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio
266 {
267    ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3 = 0x0,
268    ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9 = 0x1,
269    ECORE_X_RANDR_EDID_ASPECT_RATIO_16_10 = 0x2,
270    ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4 = 0x4,
271    ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9 = 0x8
272 } Ecore_X_Randr_Edid_Aspect_Ratio;
273
274 #define ECORE_X_RANDR_EDID_UNKNOWN_VALUE       -1
275
276 #define ECORE_X_SELECTION_TARGET_TARGETS       "TARGETS"
277 #define ECORE_X_SELECTION_TARGET_TEXT          "TEXT"
278 #define ECORE_X_SELECTION_TARGET_COMPOUND_TEXT "COMPOUND_TEXT"
279 #define ECORE_X_SELECTION_TARGET_STRING        "STRING"
280 #define ECORE_X_SELECTION_TARGET_UTF8_STRING   "UTF8_STRING"
281 #define ECORE_X_SELECTION_TARGET_FILENAME      "FILENAME"
282 #define ECORE_X_SELECTION_TARGET_X_MOZ_URL     "X_MOZ_URL"
283
284 #define ECORE_X_DND_VERSION                    5
285
286 typedef enum _Ecore_X_Selection
287 {
288    ECORE_X_SELECTION_PRIMARY,
289    ECORE_X_SELECTION_SECONDARY,
290    ECORE_X_SELECTION_XDND,
291    ECORE_X_SELECTION_CLIPBOARD,
292    ECORE_X_SELECTION_OTHER
293 } Ecore_X_Selection;
294
295 typedef enum _Ecore_X_Event_Mode
296 {
297    ECORE_X_EVENT_MODE_NORMAL,
298    ECORE_X_EVENT_MODE_WHILE_GRABBED,
299    ECORE_X_EVENT_MODE_GRAB,
300    ECORE_X_EVENT_MODE_UNGRAB
301 } Ecore_X_Event_Mode;
302
303 typedef enum _Ecore_X_Event_Detail
304 {
305    ECORE_X_EVENT_DETAIL_ANCESTOR,
306    ECORE_X_EVENT_DETAIL_VIRTUAL,
307    ECORE_X_EVENT_DETAIL_INFERIOR,
308    ECORE_X_EVENT_DETAIL_NON_LINEAR,
309    ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL,
310    ECORE_X_EVENT_DETAIL_POINTER,
311    ECORE_X_EVENT_DETAIL_POINTER_ROOT,
312    ECORE_X_EVENT_DETAIL_DETAIL_NONE
313 } Ecore_X_Event_Detail;
314
315 typedef enum _Ecore_X_Event_Mask
316 {
317    ECORE_X_EVENT_MASK_NONE = 0L,
318    ECORE_X_EVENT_MASK_KEY_DOWN = (1L << 0),
319    ECORE_X_EVENT_MASK_KEY_UP = (1L << 1),
320    ECORE_X_EVENT_MASK_MOUSE_DOWN = (1L << 2),
321    ECORE_X_EVENT_MASK_MOUSE_UP = (1L << 3),
322    ECORE_X_EVENT_MASK_MOUSE_IN = (1L << 4),
323    ECORE_X_EVENT_MASK_MOUSE_OUT = (1L << 5),
324    ECORE_X_EVENT_MASK_MOUSE_MOVE = (1L << 6),
325    ECORE_X_EVENT_MASK_WINDOW_DAMAGE = (1L << 15),
326    ECORE_X_EVENT_MASK_WINDOW_VISIBILITY = (1L << 16),
327    ECORE_X_EVENT_MASK_WINDOW_CONFIGURE = (1L << 17),
328    ECORE_X_EVENT_MASK_WINDOW_RESIZE_MANAGE = (1L << 18),
329    ECORE_X_EVENT_MASK_WINDOW_MANAGE = (1L << 19),
330    ECORE_X_EVENT_MASK_WINDOW_CHILD_CONFIGURE = (1L << 20),
331    ECORE_X_EVENT_MASK_WINDOW_FOCUS_CHANGE = (1L << 21),
332    ECORE_X_EVENT_MASK_WINDOW_PROPERTY = (1L << 22),
333    ECORE_X_EVENT_MASK_WINDOW_COLORMAP = (1L << 23),
334    ECORE_X_EVENT_MASK_WINDOW_GRAB = (1L << 24),
335    ECORE_X_EVENT_MASK_MOUSE_WHEEL = (1L << 29),
336    ECORE_X_EVENT_MASK_WINDOW_FOCUS_IN = (1L << 30),
337    ECORE_X_EVENT_MASK_WINDOW_FOCUS_OUT = (1L << 31)
338 } Ecore_X_Event_Mask;
339
340 typedef enum _Ecore_X_Gravity
341 {
342    ECORE_X_GRAVITY_FORGET = 0,
343    ECORE_X_GRAVITY_UNMAP = 0,
344    ECORE_X_GRAVITY_NW = 1,
345    ECORE_X_GRAVITY_N = 2,
346    ECORE_X_GRAVITY_NE = 3,
347    ECORE_X_GRAVITY_W = 4,
348    ECORE_X_GRAVITY_CENTER = 5,
349    ECORE_X_GRAVITY_E = 6,
350    ECORE_X_GRAVITY_SW = 7,
351    ECORE_X_GRAVITY_S = 8,
352    ECORE_X_GRAVITY_SE = 9,
353    ECORE_X_GRAVITY_STATIC = 10
354 } Ecore_X_Gravity;
355
356 /* Needed for ecore_x_region_window_shape_set */
357 typedef enum _Ecore_X_Shape_Type
358 {
359    ECORE_X_SHAPE_BOUNDING,
360    ECORE_X_SHAPE_CLIP,
361    ECORE_X_SHAPE_INPUT
362 } Ecore_X_Shape_Type;
363
364 typedef enum _Ecore_X_Mapping_Type
365 {
366    ECORE_X_MAPPING_MODIFIER,
367    ECORE_X_MAPPING_KEYBOARD,
368    ECORE_X_MAPPING_MOUSE
369 } Ecore_X_Mapping_Type;
370
371 typedef enum _Ecore_X_Randr_Property_Change
372 {
373    ECORE_X_RANDR_PROPERTY_CHANGE_ADD,
374    ECORE_X_RANDR_PROPERTY_CHANGE_DEL
375 } Ecore_X_Randr_Property_Change;
376
377 typedef enum _Ecore_X_Netwm_Direction
378 {
379    ECORE_X_NETWM_DIRECTION_SIZE_TL = 0,
380    ECORE_X_NETWM_DIRECTION_SIZE_T = 1,
381    ECORE_X_NETWM_DIRECTION_SIZE_TR = 2,
382    ECORE_X_NETWM_DIRECTION_SIZE_R = 3,
383    ECORE_X_NETWM_DIRECTION_SIZE_BR = 4,
384    ECORE_X_NETWM_DIRECTION_SIZE_B = 5,
385    ECORE_X_NETWM_DIRECTION_SIZE_BL = 6,
386    ECORE_X_NETWM_DIRECTION_SIZE_L = 7,
387    ECORE_X_NETWM_DIRECTION_MOVE = 8,
388    ECORE_X_NETWM_DIRECTION_CANCEL = 11,
389 } Ecore_X_Netwm_Direction;
390
391 /**
392  * @typedef _Ecore_X_Error_Code
393  * Defines the error codes of Ecore_X which wraps the X Window Systems
394  * protocol's errors.
395  *
396  * @since 1.7.0
397  */
398 typedef enum _Ecore_X_Error_Code
399 {
400    /** Everything is okay. */
401    ECORE_X_ERROR_CODE_SUCCESS = 0, /** Bad request code */
402    ECORE_X_ERROR_CODE_BAD_REQUEST = 1, /** Int parameter out of range */
403    ECORE_X_ERROR_CODE_BAD_VALUE = 2, /** Parameter not a Window */
404    ECORE_X_ERROR_CODE_BAD_WINDOW = 3, /** Parameter not a Pixmap */
405    ECORE_X_ERROR_CODE_BAD_PIXMAP = 4, /** Parameter not an Atom */
406    ECORE_X_ERROR_CODE_BAD_ATOM = 5, /** Parameter not a Cursor */
407    ECORE_X_ERROR_CODE_BAD_CURSOR = 6, /** Parameter not a Font */
408    ECORE_X_ERROR_CODE_BAD_FONT = 7, /** Parameter mismatch */
409    ECORE_X_ERROR_CODE_BAD_MATCH = 8, /** Parameter not a Pixmap or Window */
410    ECORE_X_ERROR_CODE_BAD_DRAWABLE = 9, /** Bad access */
411    ECORE_X_ERROR_CODE_BAD_ACCESS = 10, /** Insufficient resources */
412    ECORE_X_ERROR_CODE_BAD_ALLOC = 11, /** No such colormap */
413    ECORE_X_ERROR_CODE_BAD_COLOR = 12, /** Parameter not a GC */
414    ECORE_X_ERROR_CODE_BAD_GC = 13, /** Choice not in range or already used */
415    ECORE_X_ERROR_CODE_BAD_ID_CHOICE = 14, /** Font or color name doesn't exist */
416    ECORE_X_ERROR_CODE_BAD_NAME = 15, /** Request length incorrect */
417    ECORE_X_ERROR_CODE_BAD_LENGTH = 16, /** Server is defective */
418    ECORE_X_ERROR_CODE_BAD_IMPLEMENTATION = 17,
419 } Ecore_X_Error_Code;
420
421 typedef enum _Ecore_X_Dpms_Mode
422 {
423    ECORE_X_DPMS_MODE_ON = 0,
424    ECORE_X_DPMS_MODE_STANDBY = 1,
425    ECORE_X_DPMS_MODE_SUSPEND = 2,
426    ECORE_X_DPMS_MODE_OFF = 3
427 } Ecore_X_Dpms_Mode;
428
429 typedef struct _Ecore_X_Event_Mouse_In                     Ecore_X_Event_Mouse_In;
430 typedef struct _Ecore_X_Event_Mouse_Out                    Ecore_X_Event_Mouse_Out;
431 typedef struct _Ecore_X_Event_Window_Focus_In              Ecore_X_Event_Window_Focus_In;
432 typedef struct _Ecore_X_Event_Window_Focus_Out             Ecore_X_Event_Window_Focus_Out;
433 typedef struct _Ecore_X_Event_Window_Keymap                Ecore_X_Event_Window_Keymap;
434 typedef struct _Ecore_X_Event_Window_Damage                Ecore_X_Event_Window_Damage;
435 typedef struct _Ecore_X_Event_Window_Visibility_Change     Ecore_X_Event_Window_Visibility_Change;
436 typedef struct _Ecore_X_Event_Window_Create                Ecore_X_Event_Window_Create;
437 typedef struct _Ecore_X_Event_Window_Destroy               Ecore_X_Event_Window_Destroy;
438 typedef struct _Ecore_X_Event_Window_Hide                  Ecore_X_Event_Window_Hide;
439 typedef struct _Ecore_X_Event_Window_Show                  Ecore_X_Event_Window_Show;
440 typedef struct _Ecore_X_Event_Window_Show_Request          Ecore_X_Event_Window_Show_Request;
441 typedef struct _Ecore_X_Event_Window_Reparent              Ecore_X_Event_Window_Reparent;
442 typedef struct _Ecore_X_Event_Window_Configure             Ecore_X_Event_Window_Configure;
443 typedef struct _Ecore_X_Event_Window_Configure_Request     Ecore_X_Event_Window_Configure_Request;
444 typedef struct _Ecore_X_Event_Window_Gravity               Ecore_X_Event_Window_Gravity;
445 typedef struct _Ecore_X_Event_Window_Resize_Request        Ecore_X_Event_Window_Resize_Request;
446 typedef struct _Ecore_X_Event_Window_Stack                 Ecore_X_Event_Window_Stack;
447 typedef struct _Ecore_X_Event_Window_Stack_Request         Ecore_X_Event_Window_Stack_Request;
448 typedef struct _Ecore_X_Event_Window_Property              Ecore_X_Event_Window_Property;
449 typedef struct _Ecore_X_Event_Window_Colormap              Ecore_X_Event_Window_Colormap;
450 typedef struct _Ecore_X_Event_Mapping_Change               Ecore_X_Event_Mapping_Change;
451 typedef struct _Ecore_X_Event_Window_Mapping               Ecore_X_Event_Window_Mapping;
452 typedef struct _Ecore_X_Event_Selection_Clear              Ecore_X_Event_Selection_Clear;
453 typedef struct _Ecore_X_Event_Selection_Request            Ecore_X_Event_Selection_Request;
454 typedef struct _Ecore_X_Event_Selection_Notify             Ecore_X_Event_Selection_Notify;
455 typedef struct _Ecore_X_Event_Fixes_Selection_Notify       Ecore_X_Event_Fixes_Selection_Notify;
456 typedef struct _Ecore_X_Selection_Data                     Ecore_X_Selection_Data;
457 typedef struct _Ecore_X_Selection_Data_Files               Ecore_X_Selection_Data_Files;
458 typedef struct _Ecore_X_Selection_Data_Text                Ecore_X_Selection_Data_Text;
459 typedef struct _Ecore_X_Selection_Data_X_Moz_Url           Ecore_X_Selection_Data_X_Moz_Url;
460 typedef struct _Ecore_X_Selection_Data_Targets             Ecore_X_Selection_Data_Targets;
461 typedef struct _Ecore_X_Event_Xdnd_Enter                   Ecore_X_Event_Xdnd_Enter;
462 typedef struct _Ecore_X_Event_Xdnd_Position                Ecore_X_Event_Xdnd_Position;
463 typedef struct _Ecore_X_Event_Xdnd_Status                  Ecore_X_Event_Xdnd_Status;
464 typedef struct _Ecore_X_Event_Xdnd_Leave                   Ecore_X_Event_Xdnd_Leave;
465 typedef struct _Ecore_X_Event_Xdnd_Drop                    Ecore_X_Event_Xdnd_Drop;
466 typedef struct _Ecore_X_Event_Xdnd_Finished                Ecore_X_Event_Xdnd_Finished;
467 typedef struct _Ecore_X_Event_Client_Message               Ecore_X_Event_Client_Message;
468 typedef struct _Ecore_X_Event_Window_Shape                 Ecore_X_Event_Window_Shape;
469 typedef struct _Ecore_X_Event_Screensaver_Notify           Ecore_X_Event_Screensaver_Notify;
470 typedef struct _Ecore_X_Event_Gesture_Notify_Flick         Ecore_X_Event_Gesture_Notify_Flick;
471 typedef struct _Ecore_X_Event_Gesture_Notify_Pan           Ecore_X_Event_Gesture_Notify_Pan;
472 typedef struct _Ecore_X_Event_Gesture_Notify_PinchRotation Ecore_X_Event_Gesture_Notify_PinchRotation;
473 typedef struct _Ecore_X_Event_Gesture_Notify_Tap           Ecore_X_Event_Gesture_Notify_Tap;
474 typedef struct _Ecore_X_Event_Gesture_Notify_TapNHold      Ecore_X_Event_Gesture_Notify_TapNHold;
475 typedef struct _Ecore_X_Event_Gesture_Notify_Hold          Ecore_X_Event_Gesture_Notify_Hold;
476 typedef struct _Ecore_X_Event_Gesture_Notify_Group         Ecore_X_Event_Gesture_Notify_Group;
477 typedef struct _Ecore_X_Event_Sync_Counter                 Ecore_X_Event_Sync_Counter;
478 typedef struct _Ecore_X_Event_Sync_Alarm                   Ecore_X_Event_Sync_Alarm;
479 typedef struct _Ecore_X_Event_Screen_Change                Ecore_X_Event_Screen_Change;
480 typedef struct _Ecore_X_Event_Randr_Crtc_Change            Ecore_X_Event_Randr_Crtc_Change;
481 typedef struct _Ecore_X_Event_Randr_Output_Change          Ecore_X_Event_Randr_Output_Change;
482 typedef struct _Ecore_X_Event_Randr_Output_Property_Notify Ecore_X_Event_Randr_Output_Property_Notify;
483
484 typedef struct _Ecore_X_Event_Window_Delete_Request        Ecore_X_Event_Window_Delete_Request;
485 typedef struct _Ecore_X_Event_Window_Move_Resize_Request   Ecore_X_Event_Window_Move_Resize_Request;
486 typedef struct _Ecore_X_Event_Window_State_Request         Ecore_X_Event_Window_State_Request;
487 typedef struct _Ecore_X_Event_Frame_Extents_Request        Ecore_X_Event_Frame_Extents_Request;
488 typedef struct _Ecore_X_Event_Ping                         Ecore_X_Event_Ping;
489 typedef struct _Ecore_X_Event_Desktop_Change               Ecore_X_Event_Desktop_Change;
490
491 typedef struct _Ecore_X_Event_Startup_Sequence             Ecore_X_Event_Startup_Sequence;
492
493 typedef struct _Ecore_X_Event_Generic                      Ecore_X_Event_Generic;
494
495
496 typedef struct Ecore_X_Event_Present_Configure             Ecore_X_Event_Present_Configure; /**< @since 1.9 */
497 typedef struct Ecore_X_Event_Present_Complete              Ecore_X_Event_Present_Complete; /**< @since 1.9 */
498 typedef struct Ecore_X_Event_Present_Idle                  Ecore_X_Event_Present_Idle; /**< @since 1.9 */
499
500 typedef struct _Ecore_X_Randr_Screen_Size                  Ecore_X_Randr_Screen_Size;
501 typedef struct _Ecore_X_Randr_Screen_Size_MM               Ecore_X_Randr_Screen_Size_MM;
502 typedef struct _Ecore_X_Randr_Crtc_Info                    Ecore_X_Randr_Crtc_Info; /**< @since 1.8 */
503
504 typedef struct _Ecore_X_Xdnd_Position                      Ecore_X_Xdnd_Position;
505
506
507 struct _Ecore_X_Event_Mouse_In
508 {
509    int                  modifiers;
510    int                  x, y;
511    Eina_Bool            same_screen : 1;
512    struct
513    {
514       int x, y;
515    } root;
516    Ecore_X_Window       win;
517    Ecore_X_Window       event_win;
518    Ecore_X_Window       root_win;
519    Ecore_X_Event_Mode   mode;
520    Ecore_X_Event_Detail detail;
521    Ecore_X_Time         time;
522 };
523
524 struct _Ecore_X_Event_Mouse_Out
525 {
526    int                  modifiers;
527    int                  x, y;
528    int                  same_screen;
529    struct
530    {
531       int x, y;
532    } root;
533    Ecore_X_Window       win;
534    Ecore_X_Window       event_win;
535    Ecore_X_Window       root_win;
536    Ecore_X_Event_Mode   mode;
537    Ecore_X_Event_Detail detail;
538    Ecore_X_Time         time;
539 };
540
541 struct _Ecore_X_Event_Window_Focus_In
542 {
543    Ecore_X_Window       win;
544    Ecore_X_Event_Mode   mode;
545    Ecore_X_Event_Detail detail;
546    Ecore_X_Time         time;
547 };
548
549 struct _Ecore_X_Event_Window_Focus_Out
550 {
551    Ecore_X_Window       win;
552    Ecore_X_Event_Mode   mode;
553    Ecore_X_Event_Detail detail;
554    Ecore_X_Time         time;
555 };
556
557 struct _Ecore_X_Event_Window_Keymap
558 {
559    Ecore_X_Window win;
560 };
561
562 struct _Ecore_X_Event_Window_Damage
563 {
564    Ecore_X_Window win;
565    int            x, y, w, h;
566    int            count;
567    Ecore_X_Time   time;
568 };
569
570 struct _Ecore_X_Event_Window_Visibility_Change
571 {
572    Ecore_X_Window win;
573    int            fully_obscured;
574    Ecore_X_Time   time;
575 };
576
577 struct _Ecore_X_Event_Window_Create
578 {
579    Ecore_X_Window win;
580    Ecore_X_Window parent;
581    int            override;
582    int            x, y, w, h;
583    int            border;
584    Ecore_X_Time   time;
585 };
586
587 struct _Ecore_X_Event_Window_Destroy
588 {
589    Ecore_X_Window win;
590    Ecore_X_Window event_win;
591    Ecore_X_Time   time;
592 };
593
594 struct _Ecore_X_Event_Window_Hide
595 {
596    Ecore_X_Window win;
597    Ecore_X_Window event_win;
598    Ecore_X_Time   time;
599    Eina_Bool      send_event : 1; /**< @since 1.8 */
600 };
601
602 struct _Ecore_X_Event_Window_Show
603 {
604    Ecore_X_Window win;
605    Ecore_X_Window event_win;
606    Ecore_X_Time   time;
607 };
608
609 struct _Ecore_X_Event_Window_Show_Request
610 {
611    Ecore_X_Window win;
612    Ecore_X_Window parent;
613    Ecore_X_Time   time;
614 };
615
616 struct _Ecore_X_Event_Window_Reparent
617 {
618    Ecore_X_Window win;
619    Ecore_X_Window event_win;
620    Ecore_X_Window parent;
621    Ecore_X_Time   time;
622 };
623
624 struct _Ecore_X_Event_Window_Configure
625 {
626    Ecore_X_Window win;
627    Ecore_X_Window event_win;
628    Ecore_X_Window abovewin;
629    int            x, y, w, h;
630    int            border;
631    Eina_Bool      override : 1;
632    Eina_Bool      from_wm : 1;
633    Ecore_X_Time   time;
634 };
635
636 struct _Ecore_X_Event_Window_Configure_Request
637 {
638    Ecore_X_Window            win;
639    Ecore_X_Window            parent_win;
640    Ecore_X_Window            abovewin;
641    int                       x, y, w, h;
642    int                       border;
643    Ecore_X_Window_Stack_Mode detail;
644    unsigned long             value_mask;
645    Ecore_X_Time              time;
646 };
647
648 struct _Ecore_X_Event_Window_Gravity
649 {
650    Ecore_X_Window win;
651    Ecore_X_Window event_win;
652    Ecore_X_Time   time;
653 };
654
655 struct _Ecore_X_Event_Window_Resize_Request
656 {
657    Ecore_X_Window win;
658    int            w, h;
659    Ecore_X_Time   time;
660 };
661
662 struct _Ecore_X_Event_Window_Stack
663 {
664    Ecore_X_Window            win;
665    Ecore_X_Window            event_win;
666    Ecore_X_Window_Stack_Mode detail;
667    Ecore_X_Time              time;
668 };
669
670 struct _Ecore_X_Event_Window_Stack_Request
671 {
672    Ecore_X_Window            win;
673    Ecore_X_Window            parent;
674    Ecore_X_Window_Stack_Mode detail;
675    Ecore_X_Time              time;
676 };
677
678 struct _Ecore_X_Event_Window_Property
679 {
680    Ecore_X_Window win;
681    Ecore_X_Atom   atom;
682    Ecore_X_Time   time;
683    Eina_Bool      state; /**< @since 1.16 If @c EINA_TRUE, property was deleted */
684 };
685
686 struct _Ecore_X_Event_Window_Colormap
687 {
688    Ecore_X_Window   win;
689    Ecore_X_Colormap cmap;
690    Eina_Bool        installed : 1;
691    Ecore_X_Time     time;
692 };
693
694 struct _Ecore_X_Event_Mapping_Change
695 {
696    Ecore_X_Mapping_Type type;
697    int                  keycode;
698    int                  num;
699 };
700
701 struct _Ecore_X_Event_Selection_Clear
702 {
703    Ecore_X_Window    win;
704    Ecore_X_Selection selection;
705    Ecore_X_Atom      atom;
706    Ecore_X_Time      time;
707 };
708
709 struct _Ecore_X_Event_Selection_Request
710 {
711    Ecore_X_Window owner;
712    Ecore_X_Window requestor;
713    Ecore_X_Time   time;
714    Ecore_X_Atom   selection;
715    Ecore_X_Atom   target;
716    Ecore_X_Atom   property;
717 };
718
719 typedef enum
720 {
721    ECORE_X_OWNER_CHANGE_REASON_NEW_OWNER,
722    ECORE_X_OWNER_CHANGE_REASON_DESTROY,
723    ECORE_X_OWNER_CHANGE_REASON_CLOSE
724 } Ecore_X_Owner_Change_Reason;
725
726 struct _Ecore_X_Event_Fixes_Selection_Notify
727 {
728    Ecore_X_Window              win;
729    Ecore_X_Window              owner;
730    Ecore_X_Time                time;
731    Ecore_X_Time                selection_time;
732    Ecore_X_Selection           selection;
733    Ecore_X_Atom                atom;
734    Ecore_X_Owner_Change_Reason reason;
735 };
736
737 struct _Ecore_X_Event_Selection_Notify
738 {
739    Ecore_X_Window    win;
740    Ecore_X_Time      time;
741    Ecore_X_Selection selection;
742    Ecore_X_Atom      atom;
743    char             *target;
744    void             *data;
745    Ecore_X_Atom      property; /**< @since 1.16 */
746 };
747
748 struct _Ecore_X_Selection_Data
749 {
750    enum
751    {
752       ECORE_X_SELECTION_CONTENT_NONE,
753       ECORE_X_SELECTION_CONTENT_TEXT,
754       ECORE_X_SELECTION_CONTENT_FILES,
755       ECORE_X_SELECTION_CONTENT_X_MOZ_URL,
756       ECORE_X_SELECTION_CONTENT_TARGETS,
757       ECORE_X_SELECTION_CONTENT_CUSTOM
758    } content;
759    unsigned char *data;
760    int            length;
761    int            format;
762    int            (*free)(void *data);
763 };
764
765 struct _Ecore_X_Selection_Data_Files
766 {
767    Ecore_X_Selection_Data data;
768    char                 **files;
769    int                    num_files;
770 };
771
772 struct _Ecore_X_Selection_Data_Text
773 {
774    Ecore_X_Selection_Data data;
775    char                  *text;
776 };
777
778 struct _Ecore_X_Selection_Data_X_Moz_Url
779 {
780    Ecore_X_Selection_Data data;
781    Eina_Inarray         *links;
782    Eina_Inarray         *link_names;
783 };
784
785 struct _Ecore_X_Selection_Data_Targets
786 {
787    Ecore_X_Selection_Data data;
788    char                 **targets;
789    int                    num_targets;
790 };
791
792 struct _Ecore_X_Event_Xdnd_Enter
793 {
794    Ecore_X_Window win, source;
795
796    char         **types;
797    int            num_types;
798 };
799
800 struct _Ecore_X_Event_Xdnd_Position
801 {
802    Ecore_X_Window win, source;
803    struct
804    {
805       int x, y;
806    } position;
807    Ecore_X_Atom   action;
808 };
809
810 struct _Ecore_X_Xdnd_Position
811 {
812    Ecore_X_Window win, prev;
813    struct
814    {
815       int x, y;
816    } position;
817 };
818
819 struct _Ecore_X_Event_Xdnd_Status
820 {
821    Ecore_X_Window    win, target;
822    Eina_Bool         will_accept : 1;
823    Ecore_X_Rectangle rectangle;
824    Ecore_X_Atom      action;
825 };
826
827 struct _Ecore_X_Event_Xdnd_Leave
828 {
829    Ecore_X_Window win, source;
830 };
831
832 struct _Ecore_X_Event_Xdnd_Drop
833 {
834    Ecore_X_Window win, source;
835    Ecore_X_Atom   action;
836    struct
837    {
838       int x, y;
839    } position;
840 };
841
842 struct _Ecore_X_Event_Xdnd_Finished
843 {
844    Ecore_X_Window win, target;
845    Eina_Bool      completed : 1;
846    Ecore_X_Atom   action;
847 };
848
849 struct _Ecore_X_Event_Client_Message
850 {
851    Ecore_X_Window win;
852    Ecore_X_Atom   message_type;
853    int            format;
854    union
855    {
856       char  b[20];
857       short s[10];
858       long  l[5];
859    } data;
860    Ecore_X_Time   time;
861 };
862
863 struct _Ecore_X_Event_Window_Shape
864 {
865    Ecore_X_Window     win;
866    Ecore_X_Time       time;
867    Ecore_X_Shape_Type type;
868    int                x, y, w, h;
869    Eina_Bool          shaped : 1;
870 };
871
872 struct _Ecore_X_Event_Screensaver_Notify
873 {
874    Ecore_X_Window win;
875    Eina_Bool      on : 1;
876    Ecore_X_Time   time;
877 };
878
879 struct _Ecore_X_Event_Sync_Counter
880 {
881    Ecore_X_Time time;
882 };
883
884 struct _Ecore_X_Event_Sync_Alarm
885 {
886    Ecore_X_Time       time;
887    Ecore_X_Sync_Alarm alarm;
888 };
889
890 struct _Ecore_X_Randr_Screen_Size
891 {
892    int width, height;
893 };
894
895 struct _Ecore_X_Randr_Screen_Size_MM
896 {
897    int width, height, width_mm, height_mm;
898 };
899
900 struct _Ecore_X_Randr_Crtc_Info
901 {
902    Ecore_X_Time timestamp;
903    int x, y;
904    unsigned int width, height;
905    Ecore_X_Randr_Mode mode;
906    Ecore_X_Randr_Orientation rotation;
907    int noutput;
908    Ecore_X_Randr_Output *outputs;
909    Ecore_X_Randr_Orientation rotations;
910    int npossible;
911    Ecore_X_Randr_Output *possible;
912 }; /**< @since 1.8 */
913
914 struct _Ecore_X_Event_Screen_Change
915 {
916    Ecore_X_Window                win;
917    Ecore_X_Window                root;
918    Ecore_X_Randr_Screen_Size_MM  size;  /* in pixel and millimeters */
919    Ecore_X_Time                  time;
920    Ecore_X_Time                  config_time;
921    Ecore_X_Randr_Orientation     orientation;
922    Ecore_X_Render_Subpixel_Order subpixel_order;
923    Ecore_X_Randr_Size_ID         size_id;
924 };
925
926 struct _Ecore_X_Event_Randr_Crtc_Change
927 {
928    Ecore_X_Window            win;
929    Ecore_X_Randr_Crtc        crtc;
930    Ecore_X_Randr_Mode        mode;
931    Ecore_X_Randr_Orientation orientation;
932    Eina_Rectangle            geo;
933 };
934
935 struct _Ecore_X_Event_Randr_Output_Change
936 {
937    Ecore_X_Window                  win;
938    Ecore_X_Randr_Output            output;
939    Ecore_X_Randr_Crtc              crtc;
940    Ecore_X_Randr_Mode              mode;
941    Ecore_X_Randr_Orientation       orientation;
942    Ecore_X_Randr_Connection_Status connection;
943    Ecore_X_Render_Subpixel_Order   subpixel_order;
944 };
945
946 struct _Ecore_X_Event_Randr_Output_Property_Notify
947 {
948    Ecore_X_Window                win;
949    Ecore_X_Randr_Output          output;
950    Ecore_X_Atom                  property;
951    Ecore_X_Time                  time;
952    Ecore_X_Randr_Property_Change state;
953 };
954
955 struct _Ecore_X_Event_Window_Delete_Request
956 {
957    Ecore_X_Window win;
958    Ecore_X_Time   time;
959 };
960
961 struct _Ecore_X_Event_Window_Prop_Title_Change
962 {
963    Ecore_X_Window win;
964    char          *title;
965    Ecore_X_Time   time;
966 };
967
968 struct _Ecore_X_Event_Window_Prop_Visible_Title_Change
969 {
970    Ecore_X_Window win;
971    char          *title;
972    Ecore_X_Time   time;
973 };
974
975 struct _Ecore_X_Event_Window_Prop_Icon_Name_Change
976 {
977    Ecore_X_Window win;
978    char          *name;
979    Ecore_X_Time   time;
980 };
981
982 struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change
983 {
984    Ecore_X_Window win;
985    char          *name;
986    Ecore_X_Time   time;
987 };
988
989 struct _Ecore_X_Event_Window_Prop_Client_Machine_Change
990 {
991    Ecore_X_Window win;
992    char          *name;
993    Ecore_X_Time   time;
994 };
995
996 struct _Ecore_X_Event_Window_Prop_Name_Class_Change
997 {
998    Ecore_X_Window win;
999    char          *name;
1000    char          *clas;
1001    Ecore_X_Time   time;
1002 };
1003
1004 struct _Ecore_X_Event_Window_Prop_Pid_Change
1005 {
1006    Ecore_X_Window win;
1007    pid_t          pid;
1008    Ecore_X_Time   time;
1009 };
1010
1011 struct _Ecore_X_Event_Window_Prop_Desktop_Change
1012 {
1013    Ecore_X_Window win;
1014    long           desktop;
1015    Ecore_X_Time   time;
1016 };
1017
1018 struct _Ecore_X_Event_Startup_Sequence
1019 {
1020    Ecore_X_Window win;
1021 };
1022
1023 struct _Ecore_X_Event_Window_Move_Resize_Request
1024 {
1025    Ecore_X_Window win;
1026    int            x, y;
1027    int            direction;
1028    int            button;
1029    int            source;
1030 };
1031
1032 struct _Ecore_X_Event_Window_State_Request
1033 {
1034    Ecore_X_Window              win;
1035    Ecore_X_Window_State_Action action;
1036    Ecore_X_Window_State        state[2];
1037    int                         source;
1038 };
1039
1040 struct _Ecore_X_Event_Frame_Extents_Request
1041 {
1042    Ecore_X_Window win;
1043 };
1044
1045 struct _Ecore_X_Event_Ping
1046 {
1047    Ecore_X_Window win;
1048    Ecore_X_Window event_win;
1049    Ecore_X_Time   time;
1050 };
1051
1052 struct _Ecore_X_Event_Desktop_Change
1053 {
1054    Ecore_X_Window win;
1055    unsigned int   desk;
1056    int            source;
1057 };
1058
1059 struct _Ecore_X_Event_Generic
1060 {
1061    int          extension;
1062    int          evtype;
1063    unsigned int cookie;
1064    void        *data;
1065 };
1066
1067 typedef enum Ecore_X_Present_Event_Mask
1068 {
1069     ECORE_X_PRESENT_EVENT_MASK_NO_EVENT = 0,
1070     ECORE_X_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY = 1,
1071     ECORE_X_PRESENT_EVENT_MASK_COMPLETE_NOTIFY = 2,
1072     ECORE_X_PRESENT_EVENT_MASK_IDLE_NOTIFY = 4,
1073 } Ecore_X_Present_Event_Mask; /**< @since 1.9 */
1074
1075 typedef struct Ecore_X_Present
1076 {
1077    Ecore_X_Window win;
1078    unsigned int serial;
1079 } Ecore_X_Present; /**< @since 1.9 */
1080
1081 struct Ecore_X_Event_Present_Configure
1082 {
1083    Ecore_X_Window win;
1084
1085    int x, y;
1086    unsigned int width, height;
1087    int off_x, off_y;
1088    int pixmap_width, pixmap_height;
1089    long pixmap_flags;
1090 }; /**< @since 1.9 */
1091
1092 typedef enum
1093 {
1094    ECORE_X_PRESENT_COMPLETE_MODE_COPY,
1095    ECORE_X_PRESENT_COMPLETE_MODE_FLIP,
1096    ECORE_X_PRESENT_COMPLETE_MODE_SKIP,
1097 } Ecore_X_Present_Complete_Mode;
1098
1099 struct Ecore_X_Event_Present_Complete
1100 {
1101    Ecore_X_Window win;
1102
1103    unsigned int serial; // value provided when generating request
1104    unsigned long long ust; // system time of presentation
1105    unsigned long long msc; // frame count at time of presentation
1106    Eina_Bool kind : 1; /* 0 for PresentCompleteKindPixmap (PresentPixmap completion),
1107                           1 for PresentCompleteKindNotifyMsc (PresentNotifyMSC completion) */
1108    Ecore_X_Present_Complete_Mode mode;
1109 }; /**< @since 1.9 */
1110
1111 struct Ecore_X_Event_Present_Idle
1112 {
1113    Ecore_X_Window win;
1114
1115    unsigned int serial;
1116    Ecore_X_Pixmap pixmap;
1117    Ecore_X_Sync_Fence idle_fence;
1118 }; /**< @since 1.9 */
1119
1120 EAPI extern int ECORE_X_EVENT_ANY; /**< low level event dependent on
1121                                         backend in use, if Xlib will be XEvent, if XCB will be xcb_generic_event_t.
1122                                         @warning avoid using it.
1123                                     */
1124 EAPI extern int ECORE_X_EVENT_MOUSE_IN;
1125 EAPI extern int ECORE_X_EVENT_MOUSE_OUT;
1126 EAPI extern int ECORE_X_EVENT_WINDOW_FOCUS_IN;
1127 EAPI extern int ECORE_X_EVENT_WINDOW_FOCUS_OUT;
1128 EAPI extern int ECORE_X_EVENT_WINDOW_KEYMAP;
1129 EAPI extern int ECORE_X_EVENT_WINDOW_DAMAGE;
1130 EAPI extern int ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE;
1131 EAPI extern int ECORE_X_EVENT_WINDOW_CREATE;
1132 EAPI extern int ECORE_X_EVENT_WINDOW_DESTROY;
1133 EAPI extern int ECORE_X_EVENT_WINDOW_HIDE;
1134 EAPI extern int ECORE_X_EVENT_WINDOW_SHOW;
1135 EAPI extern int ECORE_X_EVENT_WINDOW_SHOW_REQUEST;
1136 EAPI extern int ECORE_X_EVENT_WINDOW_REPARENT;
1137 EAPI extern int ECORE_X_EVENT_WINDOW_CONFIGURE;
1138 EAPI extern int ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST;
1139 EAPI extern int ECORE_X_EVENT_WINDOW_GRAVITY;
1140 EAPI extern int ECORE_X_EVENT_WINDOW_RESIZE_REQUEST;
1141 EAPI extern int ECORE_X_EVENT_WINDOW_STACK;
1142 EAPI extern int ECORE_X_EVENT_WINDOW_STACK_REQUEST;
1143 EAPI extern int ECORE_X_EVENT_WINDOW_PROPERTY;
1144 EAPI extern int ECORE_X_EVENT_WINDOW_COLORMAP;
1145 EAPI extern int ECORE_X_EVENT_WINDOW_MAPPING;
1146 EAPI extern int ECORE_X_EVENT_MAPPING_CHANGE;
1147 EAPI extern int ECORE_X_EVENT_SELECTION_CLEAR;
1148 EAPI extern int ECORE_X_EVENT_SELECTION_REQUEST;
1149 EAPI extern int ECORE_X_EVENT_SELECTION_NOTIFY;
1150 EAPI extern int ECORE_X_EVENT_FIXES_SELECTION_NOTIFY;
1151 EAPI extern int ECORE_X_EVENT_CLIENT_MESSAGE;
1152 EAPI extern int ECORE_X_EVENT_WINDOW_SHAPE;
1153 EAPI extern int ECORE_X_EVENT_SCREENSAVER_NOTIFY;
1154 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_FLICK;
1155 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_PAN;
1156 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_PINCHROTATION;
1157 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_TAP;
1158 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_TAPNHOLD;
1159 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_HOLD;
1160 EAPI extern int ECORE_X_EVENT_GESTURE_NOTIFY_GROUP;
1161 EAPI extern int ECORE_X_EVENT_SYNC_COUNTER;
1162 EAPI extern int ECORE_X_EVENT_SYNC_ALARM;
1163 EAPI extern int ECORE_X_EVENT_SCREEN_CHANGE;
1164 EAPI extern int ECORE_X_EVENT_RANDR_CRTC_CHANGE;
1165 EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE;
1166 EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY;
1167 EAPI extern int ECORE_X_EVENT_DAMAGE_NOTIFY;
1168
1169 EAPI extern int ECORE_X_EVENT_WINDOW_DELETE_REQUEST;
1170
1171 EAPI extern int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST;
1172 EAPI extern int ECORE_X_EVENT_WINDOW_STATE_REQUEST;
1173 EAPI extern int ECORE_X_EVENT_FRAME_EXTENTS_REQUEST;
1174 EAPI extern int ECORE_X_EVENT_PING;
1175 EAPI extern int ECORE_X_EVENT_DESKTOP_CHANGE;
1176
1177 EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_NEW;
1178 EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
1179 EAPI extern int ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE;
1180 EAPI extern int ECORE_X_EVENT_XKB_STATE_NOTIFY; /** @since 1.7 */
1181 EAPI extern int ECORE_X_EVENT_XKB_NEWKBD_NOTIFY; /** @since 1.7 */
1182
1183 EAPI extern int ECORE_X_EVENT_GENERIC;
1184
1185 EAPI extern int ECORE_X_EVENT_PRESENT_CONFIGURE; /**< @since 1.9 */
1186 EAPI extern int ECORE_X_EVENT_PRESENT_COMPLETE; /**< @since 1.9 */
1187 EAPI extern int ECORE_X_EVENT_PRESENT_IDLE; /**< @since 1.9 */
1188
1189 EAPI extern int ECORE_X_EVENT_XDND_ENTER;
1190 EAPI extern int ECORE_X_EVENT_XDND_POSITION;
1191 EAPI extern int ECORE_X_EVENT_XDND_STATUS;
1192 EAPI extern int ECORE_X_EVENT_XDND_LEAVE;
1193 EAPI extern int ECORE_X_EVENT_XDND_DROP;
1194 EAPI extern int ECORE_X_EVENT_XDND_FINISHED;
1195
1196 EAPI extern int ECORE_X_MODIFIER_SHIFT; /**< @since 1.7 */
1197 EAPI extern int ECORE_X_MODIFIER_CTRL;  /**< @since 1.7 */
1198 EAPI extern int ECORE_X_MODIFIER_ALT;   /**< @since 1.7 */
1199 EAPI extern int ECORE_X_MODIFIER_WIN;   /**< @since 1.7 */
1200 EAPI extern int ECORE_X_MODIFIER_ALTGR; /**< @since 1.7 */
1201
1202 EAPI extern int ECORE_X_LOCK_SCROLL;
1203 EAPI extern int ECORE_X_LOCK_NUM;
1204 EAPI extern int ECORE_X_LOCK_CAPS;
1205 EAPI extern int ECORE_X_LOCK_SHIFT;
1206
1207 EAPI extern int ECORE_X_RAW_BUTTON_PRESS;   /**< @since 1.8 */
1208 EAPI extern int ECORE_X_RAW_BUTTON_RELEASE; /**< @since 1.8 */
1209 EAPI extern int ECORE_X_RAW_MOTION;         /**< @since 1.8 */
1210
1211 typedef enum _Ecore_X_WM_Protocol
1212 {
1213    /** If enabled the window manager will be asked to send a
1214     * delete message instead of just closing (destroying) the window. */
1215    ECORE_X_WM_PROTOCOL_DELETE_REQUEST,
1216
1217    /** If enabled the window manager will be told that the window
1218     * explicitly sets input focus. */
1219    ECORE_X_WM_PROTOCOL_TAKE_FOCUS,
1220
1221    /** If enabled the window manager can ping the window to check
1222     * if it is alive. */
1223    ECORE_X_NET_WM_PROTOCOL_PING,
1224
1225    /** If enabled the window manager can sync updating with the
1226     * window (?) */
1227    ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST,
1228
1229    /** Number of defined items */
1230    ECORE_X_WM_PROTOCOL_NUM
1231 } Ecore_X_WM_Protocol;
1232
1233 typedef enum _Ecore_X_Window_Input_Mode
1234 {
1235    /** The window can never be focused */
1236    ECORE_X_WINDOW_INPUT_MODE_NONE,
1237
1238    /** The window can be focused by the WM but doesn't focus itself */
1239    ECORE_X_WINDOW_INPUT_MODE_PASSIVE,
1240
1241    /** The window sets the focus itself if one of its sub-windows
1242     * already is focused */
1243    ECORE_X_WINDOW_INPUT_MODE_ACTIVE_LOCAL,
1244
1245    /** The window sets the focus itself even if another window
1246     * is currently focused */
1247    ECORE_X_WINDOW_INPUT_MODE_ACTIVE_GLOBAL
1248 } Ecore_X_Window_Input_Mode;
1249
1250 /**
1251  * @typedef _Ecore_X_Window_State_Hint
1252  * Defines the different state hint of the window of Ecore_X.
1253  */
1254 typedef enum _Ecore_X_Window_State_Hint
1255 {
1256    /** Do not provide any state hint to the window manager */
1257    ECORE_X_WINDOW_STATE_HINT_NONE = -1,
1258
1259    /** The window wants to remain hidden and NOT iconified */
1260    ECORE_X_WINDOW_STATE_HINT_WITHDRAWN,
1261
1262    /** The window wants to be mapped normally */
1263    ECORE_X_WINDOW_STATE_HINT_NORMAL,
1264
1265    /** The window wants to start in an iconified state */
1266    ECORE_X_WINDOW_STATE_HINT_ICONIC
1267 } Ecore_X_Window_State_Hint;
1268
1269 typedef enum _Ecore_X_Window_Type
1270 {
1271    ECORE_X_WINDOW_TYPE_UNKNOWN = 0,
1272    ECORE_X_WINDOW_TYPE_DESKTOP,
1273    ECORE_X_WINDOW_TYPE_DOCK,
1274    ECORE_X_WINDOW_TYPE_TOOLBAR,
1275    ECORE_X_WINDOW_TYPE_MENU,
1276    ECORE_X_WINDOW_TYPE_UTILITY,
1277    ECORE_X_WINDOW_TYPE_SPLASH,
1278    ECORE_X_WINDOW_TYPE_DIALOG,
1279    ECORE_X_WINDOW_TYPE_NORMAL,
1280    ECORE_X_WINDOW_TYPE_DROPDOWN_MENU,
1281    ECORE_X_WINDOW_TYPE_POPUP_MENU,
1282    ECORE_X_WINDOW_TYPE_TOOLTIP,
1283    ECORE_X_WINDOW_TYPE_NOTIFICATION,
1284    ECORE_X_WINDOW_TYPE_COMBO,
1285    ECORE_X_WINDOW_TYPE_DND
1286 } Ecore_X_Window_Type;
1287
1288 typedef enum _Ecore_X_Action
1289 {
1290    ECORE_X_ACTION_MOVE,
1291    ECORE_X_ACTION_RESIZE,
1292    ECORE_X_ACTION_MINIMIZE,
1293    ECORE_X_ACTION_SHADE,
1294    ECORE_X_ACTION_STICK,
1295    ECORE_X_ACTION_MAXIMIZE_HORZ,
1296    ECORE_X_ACTION_MAXIMIZE_VERT,
1297    ECORE_X_ACTION_FULLSCREEN,
1298    ECORE_X_ACTION_CHANGE_DESKTOP,
1299    ECORE_X_ACTION_CLOSE,
1300    ECORE_X_ACTION_ABOVE,
1301    ECORE_X_ACTION_BELOW
1302 } Ecore_X_Action;
1303
1304 typedef enum _Ecore_X_Window_Configure_Mask
1305 {
1306    ECORE_X_WINDOW_CONFIGURE_MASK_X = (1 << 0),
1307    ECORE_X_WINDOW_CONFIGURE_MASK_Y = (1 << 1),
1308    ECORE_X_WINDOW_CONFIGURE_MASK_W = (1 << 2),
1309    ECORE_X_WINDOW_CONFIGURE_MASK_H = (1 << 3),
1310    ECORE_X_WINDOW_CONFIGURE_MASK_BORDER_WIDTH = (1 << 4),
1311    ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING = (1 << 5),
1312    ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE = (1 << 6)
1313 } Ecore_X_Window_Configure_Mask;
1314
1315 typedef enum _Ecore_X_Virtual_Keyboard_State
1316 {
1317    ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN = 0,
1318    ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF,
1319    ECORE_X_VIRTUAL_KEYBOARD_STATE_ON,
1320    ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA,
1321    ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC,
1322    ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN,
1323    ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER,
1324    ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX,
1325    ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL,
1326    ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD,
1327    ECORE_X_VIRTUAL_KEYBOARD_STATE_IP,
1328    ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST,
1329    ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE,
1330    ECORE_X_VIRTUAL_KEYBOARD_STATE_URL,
1331    ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD,
1332    ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME
1333 } Ecore_X_Virtual_Keyboard_State;
1334
1335 typedef enum _Ecore_X_Illume_Mode
1336 {
1337    ECORE_X_ILLUME_MODE_UNKNOWN = 0,
1338    ECORE_X_ILLUME_MODE_SINGLE,
1339    ECORE_X_ILLUME_MODE_DUAL_TOP,
1340    ECORE_X_ILLUME_MODE_DUAL_LEFT
1341 } Ecore_X_Illume_Mode;
1342
1343 typedef enum _Ecore_X_Illume_Quickpanel_State
1344 {
1345    ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN = 0,
1346    ECORE_X_ILLUME_QUICKPANEL_STATE_OFF,
1347    ECORE_X_ILLUME_QUICKPANEL_STATE_ON
1348 } Ecore_X_Illume_Quickpanel_State;
1349
1350 typedef enum _Ecore_X_Illume_Indicator_State
1351 {
1352    ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN = 0,
1353    ECORE_X_ILLUME_INDICATOR_STATE_OFF,
1354    ECORE_X_ILLUME_INDICATOR_STATE_ON
1355 } Ecore_X_Illume_Indicator_State;
1356
1357 typedef enum _Ecore_X_Illume_Clipboard_State
1358 {
1359    ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN = 0,
1360    ECORE_X_ILLUME_CLIPBOARD_STATE_OFF,
1361    ECORE_X_ILLUME_CLIPBOARD_STATE_ON
1362 } Ecore_X_Illume_Clipboard_State;
1363
1364 typedef enum _Ecore_X_Illume_Indicator_Opacity_Mode
1365 {
1366    ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN = 0,
1367    ECORE_X_ILLUME_INDICATOR_OPAQUE,
1368    ECORE_X_ILLUME_INDICATOR_TRANSLUCENT,
1369    ECORE_X_ILLUME_INDICATOR_TRANSPARENT
1370 } Ecore_X_Illume_Indicator_Opacity_Mode;
1371
1372 typedef enum _Ecore_X_Illume_Indicator_Type_Mode
1373 {
1374    ECORE_X_ILLUME_INDICATOR_TYPE_UNKNOWN = 0,
1375    ECORE_X_ILLUME_INDICATOR_TYPE_1,
1376    ECORE_X_ILLUME_INDICATOR_TYPE_2,
1377    ECORE_X_ILLUME_INDICATOR_TYPE_3
1378 } Ecore_X_Illume_Indicator_Type_Mode; /**< @since 1.8 */
1379
1380 typedef enum _Ecore_X_Illume_Window_State
1381 {
1382    ECORE_X_ILLUME_WINDOW_STATE_NORMAL = 0,
1383    ECORE_X_ILLUME_WINDOW_STATE_FLOATING
1384 } Ecore_X_Illume_Window_State;
1385
1386 /* Window layer constants */
1387 #define ECORE_X_WINDOW_LAYER_BELOW  2
1388 #define ECORE_X_WINDOW_LAYER_NORMAL 4
1389 #define ECORE_X_WINDOW_LAYER_ABOVE  6
1390
1391 /* Property list operations */
1392 #define ECORE_X_PROP_LIST_REMOVE    0
1393 #define ECORE_X_PROP_LIST_ADD       1
1394 #define ECORE_X_PROP_LIST_TOGGLE    2
1395
1396 EAPI int                       ecore_x_init(const char *name);
1397 EAPI int                       ecore_x_init_from_display(Ecore_X_Display *display); /**< @since 1.15 */
1398 EAPI int                       ecore_x_shutdown(void);
1399 EAPI int                       ecore_x_disconnect(void);
1400 EAPI Ecore_X_Display          *ecore_x_display_get(void);
1401 EAPI Ecore_X_Connection       *ecore_x_connection_get(void);
1402 EAPI int                       ecore_x_fd_get(void);
1403 EAPI Ecore_X_Screen           *ecore_x_default_screen_get(void);
1404 EAPI void                      ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h);
1405 EAPI int                       ecore_x_screen_count_get(void);
1406 EAPI int                       ecore_x_screen_index_get(const Ecore_X_Screen *screen);
1407 EAPI Ecore_X_Screen           *ecore_x_screen_get(int index);
1408
1409 EAPI void                      ecore_x_double_click_time_set(double t);
1410 EAPI double                    ecore_x_double_click_time_get(void);
1411 EAPI void                      ecore_x_flush(void);
1412 EAPI void                      ecore_x_sync(void);
1413 EAPI void                      ecore_x_killall(Ecore_X_Window root);
1414 EAPI void                      ecore_x_kill(Ecore_X_Window win);
1415 EAPI int                       ecore_x_dpi_get(void);
1416 EAPI Eina_Bool                 ecore_x_bell(int percent);
1417 EAPI unsigned int              ecore_x_visual_id_get(Ecore_X_Visual visual);
1418
1419 EAPI Ecore_X_Visual            ecore_x_default_visual_get(Ecore_X_Display *disp, Ecore_X_Screen *screen);
1420 EAPI Ecore_X_Colormap          ecore_x_default_colormap_get(Ecore_X_Display *disp, Ecore_X_Screen *screen);
1421 EAPI int                       ecore_x_default_depth_get(Ecore_X_Display *disp, Ecore_X_Screen *screen);
1422
1423 EAPI Ecore_X_Time              ecore_x_current_time_get(void);
1424
1425 EAPI void                      ecore_x_error_handler_set(void (*func)(void *data), const void *data);
1426 EAPI void                      ecore_x_io_error_handler_set(void (*func)(void *data), const void *data);
1427 EAPI int                       ecore_x_error_request_get(void);
1428 EAPI int                       ecore_x_error_code_get(void);
1429 EAPI Ecore_X_ID                ecore_x_error_resource_id_get(void);
1430
1431 EAPI void                      ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask);
1432 EAPI void                      ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask);
1433
1434 EAPI Eina_Bool                 ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection, Ecore_X_Atom target, Ecore_X_Atom property, Ecore_X_Time time);
1435 EAPI Eina_Bool                 ecore_x_selection_primary_set(Ecore_X_Window w, const void *data, int size);
1436 EAPI Eina_Bool                 ecore_x_selection_primary_clear(void);
1437 EAPI Eina_Bool                 ecore_x_selection_secondary_set(Ecore_X_Window w, const void *data, int size);
1438 EAPI Eina_Bool                 ecore_x_selection_secondary_clear(void);
1439 EAPI Eina_Bool                 ecore_x_selection_xdnd_set(Ecore_X_Window w, const void *data, int size);
1440 EAPI Eina_Bool                 ecore_x_selection_xdnd_clear(void);
1441 EAPI Eina_Bool                 ecore_x_selection_clipboard_set(Ecore_X_Window w, const void *data, int size);
1442 EAPI Eina_Bool                 ecore_x_selection_clipboard_clear(void);
1443 EAPI void                      ecore_x_selection_primary_request(Ecore_X_Window w, const char *target);
1444 EAPI void                      ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target);
1445 EAPI void                      ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target);
1446 EAPI void                      ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target);
1447 EAPI Eina_Bool                 ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **data_ret, int *len, Ecore_X_Atom *targprop, int *targsize);
1448 EAPI void                      ecore_x_selection_converter_add(char *target, Eina_Bool (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *, int *));
1449 EAPI void                      ecore_x_selection_converter_atom_add(Ecore_X_Atom target, Eina_Bool (*func)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop, int *tsize));
1450 EAPI void                      ecore_x_selection_converter_del(char *target);
1451 EAPI void                      ecore_x_selection_converter_atom_del(Ecore_X_Atom target);
1452 EAPI void                      ecore_x_selection_parser_add(const char *target, void *(*func)(const char *target, void *data, int size, int format));
1453 EAPI void                      ecore_x_selection_parser_del(const char *target);
1454 EAPI void                      ecore_x_selection_owner_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Time tm);
1455 EAPI Ecore_X_Window            ecore_x_selection_owner_get(Ecore_X_Atom atom);
1456 EAPI Eina_Bool                 ecore_x_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *targprop, int *s); /** @since 1.8 */
1457
1458 EAPI void                      ecore_x_dnd_aware_set(Ecore_X_Window win, Eina_Bool on);
1459 EAPI int                       ecore_x_dnd_version_get(Ecore_X_Window win);
1460 EAPI Eina_Bool                 ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type);
1461 EAPI void                      ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on);
1462 EAPI void                      ecore_x_dnd_types_set(Ecore_X_Window win, const char **types, unsigned int num_types);
1463 EAPI void                      ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int num_actions);
1464 EAPI Eina_Bool                 ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size);
1465 EAPI Eina_Bool                 ecore_x_dnd_drop(void);
1466 EAPI Eina_Bool                 ecore_x_dnd_self_begin(Ecore_X_Window source, unsigned char *data, int size); /**< @since 1.8 */
1467 EAPI Eina_Bool                 ecore_x_dnd_self_drop(void); /**< @since 1.8 */
1468 EAPI void                      ecore_x_dnd_send_status(Eina_Bool will_accept, Eina_Bool suppress, Ecore_X_Rectangle rectangle, Ecore_X_Atom action);
1469 EAPI void                      ecore_x_dnd_send_finished(void);
1470 EAPI void                      ecore_x_dnd_source_action_set(Ecore_X_Atom action);
1471 EAPI Ecore_X_Atom              ecore_x_dnd_source_action_get(void);
1472 EAPI void                      ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, Ecore_X_Xdnd_Position *data), const void *data);
1473 EAPI Eina_Bool                 ecore_x_dnd_abort(Ecore_X_Window xwin_source); /**< @since 1.9 */
1474
1475 EAPI Ecore_X_Window
1476    ecore_x_window_full_new(Ecore_X_Window parent,
1477                            int x,
1478                            int y,
1479                            int w,
1480                            int h,
1481                            Ecore_X_Visual *visual,
1482                            Ecore_X_Colormap colormap,
1483                            int depth,
1484                            Eina_Bool override); /**< @since 1.12 */
1485
1486 EAPI Ecore_X_Window            ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h);
1487 EAPI Ecore_X_Window            ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h);
1488 EAPI int                       ecore_x_window_argb_get(Ecore_X_Window win);
1489 EAPI Ecore_X_Window            ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w, int h);
1490 EAPI Ecore_X_Window            ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h);
1491 EAPI Ecore_X_Window            ecore_x_window_override_argb_new(Ecore_X_Window parent, int x, int y, int w, int h);
1492 EAPI Ecore_X_Window            ecore_x_window_permanent_new(Ecore_X_Window parent, Ecore_X_Atom unique_atom); /* @since 1.9 */
1493 EAPI Ecore_X_Window            ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h);
1494 EAPI void                      ecore_x_window_configure(Ecore_X_Window win, Ecore_X_Window_Configure_Mask mask, int x, int y, int w, int h, int border_width, Ecore_X_Window sibling, int stack_mode);
1495 EAPI void                      ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c);
1496 EAPI void                      ecore_x_window_free(Ecore_X_Window win);
1497 EAPI void                      ecore_x_window_ignore_set(Ecore_X_Window win, int ignore);
1498 EAPI Ecore_X_Window           *ecore_x_window_ignore_list(int *num);
1499
1500 EAPI void                      ecore_x_window_delete_request_send(Ecore_X_Window win);
1501 EAPI void                      ecore_x_window_show(Ecore_X_Window win);
1502 EAPI void                      ecore_x_window_hide(Ecore_X_Window win);
1503 EAPI void                      ecore_x_window_move(Ecore_X_Window win, int x, int y);
1504 EAPI void                      ecore_x_window_resize(Ecore_X_Window win, int w, int h);
1505 EAPI void                      ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h);
1506 EAPI void                      ecore_x_window_focus(Ecore_X_Window win);
1507 EAPI void                      ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t);
1508 EAPI Ecore_X_Window            ecore_x_window_focus_get(void);
1509 EAPI void                      ecore_x_window_raise(Ecore_X_Window win);
1510 EAPI void                      ecore_x_window_lower(Ecore_X_Window win);
1511 EAPI void                      ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window new_parent, int x, int y);
1512 EAPI void                      ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h);
1513 EAPI void                      ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
1514 EAPI int                       ecore_x_window_border_width_get(Ecore_X_Window win);
1515 EAPI void                      ecore_x_window_border_width_set(Ecore_X_Window win, int width);
1516 EAPI int                       ecore_x_window_depth_get(Ecore_X_Window win);
1517 EAPI void                      ecore_x_window_cursor_show(Ecore_X_Window win, Eina_Bool show);
1518 EAPI void                      ecore_x_window_defaults_set(Ecore_X_Window win);
1519 EAPI int                       ecore_x_window_visible_get(Ecore_X_Window win);
1520 EAPI Ecore_X_Window            ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, int x, int y, Ecore_X_Window *skip, int skip_num);
1521 EAPI Ecore_X_Window            ecore_x_window_shadow_parent_get(Ecore_X_Window root, Ecore_X_Window win);
1522 EAPI void                      ecore_x_window_shadow_tree_flush(void);
1523 EAPI Ecore_X_Window            ecore_x_window_root_get(Ecore_X_Window win);
1524 EAPI Ecore_X_Window            ecore_x_window_at_xy_get(int x, int y);
1525 EAPI Ecore_X_Window            ecore_x_window_at_xy_with_skip_get(int x, int y, Ecore_X_Window *skip, int skip_num);
1526 EAPI Ecore_X_Window            ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y);
1527 EAPI Ecore_X_Window            ecore_x_window_parent_get(Ecore_X_Window win);
1528
1529 EAPI void                      ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r, unsigned short g, unsigned short b);
1530 EAPI void                      ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav);
1531 EAPI void                      ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav);
1532 EAPI void                      ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pmap);
1533 EAPI void                      ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h);
1534 EAPI void                      ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h);
1535 EAPI void                      ecore_x_window_override_set(Ecore_X_Window win, Eina_Bool override);
1536
1537 EAPI void                      ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int *val, unsigned int num);
1538 EAPI int                       ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int *val, unsigned int len);
1539 EAPI int                       ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int **plst);
1540
1541 EAPI void                      ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID *lst, unsigned int num);
1542 EAPI int                       ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID *lst, unsigned int len);
1543 EAPI int                       ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID **plst);
1544 EAPI void                      ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID item, int op);
1545 EAPI void                      ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom *val, unsigned int num);
1546 EAPI int                       ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom *val, unsigned int len);
1547 EAPI int                       ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom **plst);
1548 EAPI void                      ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom item, int op);
1549 EAPI void                      ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window *val, unsigned int num);
1550 EAPI int                       ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window *val, unsigned int len);
1551 EAPI int                       ecore_x_window_prop_window_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window **plst);
1552
1553 EAPI Ecore_X_Atom              ecore_x_window_prop_any_type(void);
1554 EAPI void                      ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Atom format, int size, void *data, int number);
1555 EAPI int                       ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size, unsigned char **data, int *num);
1556 EAPI void                      ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property);
1557 EAPI Ecore_X_Atom             *ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret);
1558 EAPI void                      ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char *str);
1559 EAPI char                     *ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type);
1560 EAPI Eina_Bool                 ecore_x_window_prop_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol);
1561 EAPI Ecore_X_WM_Protocol      *ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret);
1562
1563 EAPI void                      ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask);
1564 EAPI void                      ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win);
1565 EAPI void                      ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
1566 EAPI void                      ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h);
1567 EAPI void                      ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
1568 EAPI void                      ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h);
1569 EAPI void                      ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
1570 EAPI void                      ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h);
1571 EAPI void                      ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, int x, int y, int w, int h);
1572 EAPI void                      ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, int x, int y, int w, int h);
1573 EAPI void                      ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
1574 EAPI void                      ecore_x_window_shape_input_window_set(Ecore_X_Window win, Ecore_X_Window shape_win);
1575 EAPI void                      ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win);
1576 EAPI void                      ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
1577 EAPI void                      ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
1578 EAPI void                      ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h);
1579 EAPI void                      ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h);
1580 EAPI void                      ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h);
1581 EAPI void                      ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
1582 EAPI void                      ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
1583 EAPI Ecore_X_Rectangle        *ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret);
1584 EAPI Ecore_X_Rectangle        *ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret);
1585 EAPI void                      ecore_x_window_shape_events_select(Ecore_X_Window win, Eina_Bool on);
1586 EAPI void                      ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask);
1587
1588 EAPI Ecore_X_Pixmap            ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep);
1589 EAPI void                      ecore_x_pixmap_free(Ecore_X_Pixmap pmap);
1590 EAPI void                      ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, Ecore_X_GC gc, int sx, int sy, int w, int h, int dx, int dy);
1591 EAPI void                      ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h);
1592 EAPI int                       ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap);
1593
1594 EAPI Ecore_X_GC                ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list);
1595 EAPI void                      ecore_x_gc_free(Ecore_X_GC gc);
1596 EAPI void                      ecore_x_gc_foreground_set(Ecore_X_GC gc, unsigned long foreground);
1597 EAPI void                      ecore_x_gc_background_set(Ecore_X_GC gc, unsigned long background);
1598
1599 EAPI Eina_Bool                 ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Event_Mask mask, long d0, long d1, long d2, long d3, long d4);
1600 EAPI Eina_Bool                 ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len);
1601 EAPI Eina_Bool                 ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y);
1602 EAPI Eina_Bool                 ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b);
1603 EAPI Eina_Bool                 ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b);
1604 EAPI Eina_Bool                 ecore_x_mouse_in_send(Ecore_X_Window win, int x, int y);
1605 EAPI Eina_Bool                 ecore_x_mouse_out_send(Ecore_X_Window win, int x, int y);
1606
1607 EAPI void                      ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h);
1608 EAPI int                       ecore_x_drawable_border_width_get(Ecore_X_Drawable d);
1609 EAPI int                       ecore_x_drawable_depth_get(Ecore_X_Drawable d);
1610 EAPI void                      ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height);
1611
1612 EAPI Eina_Bool                 ecore_x_cursor_color_supported_get(void);
1613 EAPI Ecore_X_Cursor            ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y);
1614 EAPI void                      ecore_x_cursor_free(Ecore_X_Cursor c);
1615 EAPI Ecore_X_Cursor            ecore_x_cursor_shape_get(int shape);
1616 EAPI void                      ecore_x_cursor_size_set(int size);
1617 EAPI int                       ecore_x_cursor_size_get(void);
1618
1619 /* FIXME: these funcs need categorising */
1620 EAPI Ecore_X_Window           *ecore_x_window_root_list(int *num_ret);
1621 EAPI Ecore_X_Window            ecore_x_window_root_first_get(void);
1622 EAPI Eina_Bool                 ecore_x_window_manage(Ecore_X_Window win);
1623 EAPI void                      ecore_x_window_container_manage(Ecore_X_Window win);
1624 EAPI void                      ecore_x_window_client_manage(Ecore_X_Window win);
1625 EAPI void                      ecore_x_window_sniff(Ecore_X_Window win);
1626 EAPI void                      ecore_x_window_client_sniff(Ecore_X_Window win);
1627
1628 EAPI Ecore_X_Atom              ecore_x_atom_get(const char *name);
1629 EAPI void                      ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms);
1630 EAPI char                     *ecore_x_atom_name_get(Ecore_X_Atom atom);
1631
1632 EAPI void                      ecore_x_icccm_init(void);
1633 EAPI void                      ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state);
1634 EAPI Ecore_X_Window_State_Hint ecore_x_icccm_state_get(Ecore_X_Window win);
1635 EAPI void                      ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t);
1636 EAPI void                      ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t);
1637 EAPI void                      ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t);
1638 EAPI void                      ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h);
1639 EAPI void                      ecore_x_icccm_hints_set(Ecore_X_Window win, Eina_Bool accepts_focus, Ecore_X_Window_State_Hint initial_state, Ecore_X_Pixmap icon_pixmap, Ecore_X_Pixmap icon_mask, Ecore_X_Window icon_window, Ecore_X_Window window_group, Eina_Bool is_urgent);
1640 EAPI Eina_Bool                 ecore_x_icccm_hints_get(Ecore_X_Window win, Eina_Bool *accepts_focus, Ecore_X_Window_State_Hint *initial_state, Ecore_X_Pixmap *icon_pixmap, Ecore_X_Pixmap *icon_mask, Ecore_X_Window *icon_window, Ecore_X_Window *window_group, Eina_Bool *is_urgent);
1641 EAPI void                      ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, Eina_Bool request_pos, Ecore_X_Gravity gravity, int min_w, int min_h, int max_w, int max_h, int base_w, int base_h, int step_x, int step_y, double min_aspect, double max_aspect);
1642 EAPI Eina_Bool                 ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, Eina_Bool *request_pos, Ecore_X_Gravity *gravity, int *min_w, int *min_h, int *max_w, int *max_h, int *base_w, int *base_h, int *step_x, int *step_y, double *min_aspect, double *max_aspect);
1643 EAPI void                      ecore_x_icccm_title_set(Ecore_X_Window win, const char *t);
1644 EAPI char                     *ecore_x_icccm_title_get(Ecore_X_Window win);
1645 EAPI void                      ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, Ecore_X_Atom *protos, int num);
1646 EAPI void                      ecore_x_icccm_protocol_set(Ecore_X_Window win, Ecore_X_WM_Protocol protocol, Eina_Bool on);
1647 EAPI Eina_Bool                 ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol);
1648 EAPI void                      ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *n, const char *c);
1649 EAPI void                      ecore_x_icccm_name_class_get(Ecore_X_Window win, char **n, char **c);
1650 EAPI char                     *ecore_x_icccm_client_machine_get(Ecore_X_Window win);
1651 EAPI void                      ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv);
1652 EAPI void                      ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv);
1653 EAPI char                     *ecore_x_icccm_icon_name_get(Ecore_X_Window win);
1654 EAPI void                      ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t);
1655 EAPI void                      ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin);
1656 EAPI void                      ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin);
1657 EAPI void                      ecore_x_icccm_transient_for_set(Ecore_X_Window win, Ecore_X_Window forwin);
1658 EAPI void                      ecore_x_icccm_transient_for_unset(Ecore_X_Window win);
1659 EAPI Ecore_X_Window            ecore_x_icccm_transient_for_get(Ecore_X_Window win);
1660 EAPI void                      ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role);
1661 EAPI char                     *ecore_x_icccm_window_role_get(Ecore_X_Window win);
1662 EAPI void                      ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window l);
1663 EAPI Ecore_X_Window            ecore_x_icccm_client_leader_get(Ecore_X_Window win);
1664 EAPI void                      ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root);
1665
1666 typedef enum _Ecore_X_MWM_Hint_Func
1667 {
1668    ECORE_X_MWM_HINT_FUNC_ALL = (1 << 0),
1669    ECORE_X_MWM_HINT_FUNC_RESIZE = (1 << 1),
1670    ECORE_X_MWM_HINT_FUNC_MOVE = (1 << 2),
1671    ECORE_X_MWM_HINT_FUNC_MINIMIZE = (1 << 3),
1672    ECORE_X_MWM_HINT_FUNC_MAXIMIZE = (1 << 4),
1673    ECORE_X_MWM_HINT_FUNC_CLOSE = (1 << 5)
1674 } Ecore_X_MWM_Hint_Func;
1675
1676 typedef enum _Ecore_X_MWM_Hint_Decor
1677 {
1678    ECORE_X_MWM_HINT_DECOR_ALL = (1 << 0),
1679    ECORE_X_MWM_HINT_DECOR_BORDER = (1 << 1),
1680    ECORE_X_MWM_HINT_DECOR_RESIZEH = (1 << 2),
1681    ECORE_X_MWM_HINT_DECOR_TITLE = (1 << 3),
1682    ECORE_X_MWM_HINT_DECOR_MENU = (1 << 4),
1683    ECORE_X_MWM_HINT_DECOR_MINIMIZE = (1 << 5),
1684    ECORE_X_MWM_HINT_DECOR_MAXIMIZE = (1 << 6)
1685 } Ecore_X_MWM_Hint_Decor;
1686
1687 typedef enum _Ecore_X_MWM_Hint_Input
1688 {
1689    ECORE_X_MWM_HINT_INPUT_MODELESS = 0,
1690    ECORE_X_MWM_HINT_INPUT_PRIMARY_APPLICATION_MODAL = 1,
1691    ECORE_X_MWM_HINT_INPUT_SYSTEM_MODAL = 2,
1692    ECORE_X_MWM_HINT_INPUT_FULL_APPLICATION_MODAL = 3
1693 } Ecore_X_MWM_Hint_Input;
1694
1695 EAPI Eina_Bool                       ecore_x_mwm_hints_get(Ecore_X_Window win, Ecore_X_MWM_Hint_Func *fhint, Ecore_X_MWM_Hint_Decor *dhint, Ecore_X_MWM_Hint_Input *ihint);
1696 EAPI void                            ecore_x_mwm_borderless_set(Ecore_X_Window win, Eina_Bool borderless);
1697
1698 /* netwm */
1699 EAPI void                            ecore_x_netwm_init(void);
1700 EAPI void                            ecore_x_netwm_shutdown(void);
1701 EAPI void                            ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, const char *wm_name);
1702 EAPI void                            ecore_x_netwm_supported_set(Ecore_X_Window root, Ecore_X_Atom *supported, int num);
1703 EAPI Eina_Bool                       ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, int *num);
1704 EAPI void                            ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks);
1705 EAPI void                            ecore_x_netwm_desk_roots_set(Ecore_X_Window root, Ecore_X_Window *vroots, unsigned int n_desks);
1706 EAPI void                            ecore_x_netwm_desk_names_set(Ecore_X_Window root, const char **names, unsigned int n_desks);
1707 EAPI void                            ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width, unsigned int height);
1708 EAPI void                            ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, unsigned int *areas, unsigned int n_desks);
1709 EAPI unsigned int                   *ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks);
1710 EAPI void                            ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk);
1711 EAPI void                            ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, unsigned int *origins, unsigned int n_desks);
1712 EAPI void                            ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation, int columns, int rows, int starting_corner);
1713 EAPI void                            ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, Eina_Bool on);
1714 EAPI void                            ecore_x_netwm_client_list_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients);
1715 EAPI void                            ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients);
1716 EAPI void                            ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win);
1717 EAPI void                            ecore_x_netwm_client_active_request(Ecore_X_Window root, Ecore_X_Window win, int type, Ecore_X_Window current_win);
1718 EAPI void                            ecore_x_netwm_name_set(Ecore_X_Window win, const char *name);
1719 EAPI int                             ecore_x_netwm_name_get(Ecore_X_Window win, char **name);
1720 EAPI void                            ecore_x_netwm_startup_id_set(Ecore_X_Window win, const char *id);
1721 EAPI int                             ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id);
1722 EAPI void                            ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name);
1723 EAPI int                             ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name);
1724 EAPI void                            ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name);
1725 EAPI int                             ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name);
1726 EAPI void                            ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name);
1727 EAPI int                             ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name);
1728 EAPI void                            ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk);
1729 EAPI Eina_Bool                       ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk);
1730 EAPI void                            ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right, int top, int bottom);
1731 EAPI Eina_Bool                       ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right, int *top, int *bottom);
1732 EAPI void                            ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right, int top, int bottom, int left_start_y, int left_end_y, int right_start_y, int right_end_y, int top_start_x, int top_end_x, int bottom_start_x, int bottom_end_x);
1733 EAPI Eina_Bool                       ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *left, int *right, int *top, int *bottom, int *left_start_y, int *left_end_y, int *right_start_y, int *right_end_y, int *top_start_x, int *top_end_x, int *bottom_start_x, int *bottom_end_x);
1734
1735 EAPI void                            ecore_x_netwm_icons_set(Ecore_X_Window win, Ecore_X_Icon *icon, int num);
1736
1737 EAPI Eina_Bool                       ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num);
1738 EAPI void                            ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, int x, int y, int width, int height);
1739 EAPI Eina_Bool                       ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, int *x, int *y, int *width, int *height);
1740 EAPI void                            ecore_x_netwm_pid_set(Ecore_X_Window win, int pid);
1741 EAPI Eina_Bool                       ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid);
1742 EAPI void                            ecore_x_netwm_handled_icons_set(Ecore_X_Window win);
1743 EAPI Eina_Bool                       ecore_x_netwm_handled_icons_get(Ecore_X_Window win);
1744 EAPI void                            ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int time);
1745 EAPI Eina_Bool                       ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *time);
1746 EAPI void                            ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state, unsigned int num);
1747 EAPI Eina_Bool                       ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state, unsigned int *num);
1748 EAPI void                            ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type);
1749 EAPI Eina_Bool                       ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type);
1750 EAPI int                             ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types);
1751 EAPI Eina_Bool                       ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action);
1752 EAPI void                            ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, unsigned int num);
1753 EAPI Eina_Bool                       ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, unsigned int *num);
1754 EAPI void                            ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity);
1755 EAPI Eina_Bool                       ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity);
1756 EAPI void                            ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb);
1757 EAPI Eina_Bool                       ecore_x_netwm_frame_size_get(Ecore_X_Window win, int *fl, int *fr, int *ft, int *fb);
1758 EAPI Eina_Bool                       ecore_x_netwm_sync_counter_get(Ecore_X_Window win, Ecore_X_Sync_Counter *counter);
1759 EAPI void                            ecore_x_netwm_ping_send(Ecore_X_Window win);
1760 EAPI void                            ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial);
1761 EAPI void                            ecore_x_netwm_state_request_send(Ecore_X_Window win, Ecore_X_Window root, Ecore_X_Window_State s1, Ecore_X_Window_State s2, Eina_Bool set);
1762 EAPI void                            ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsigned int desktop);
1763 EAPI void                            ecore_x_netwm_moveresize_request_send(Ecore_X_Window win, int x, int y, Ecore_X_Netwm_Direction direction, unsigned int button);
1764
1765 EAPI void                            ecore_x_e_init(void);
1766 EAPI void                            ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb);
1767 EAPI void                            ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard);
1768 EAPI Eina_Bool                       ecore_x_e_virtual_keyboard_get(Ecore_X_Window win);
1769 EAPI void                            ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state);
1770 EAPI Ecore_X_Virtual_Keyboard_State  ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win);
1771 EAPI void                            ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state);
1772
1773 /* Illume functions */
1774 EAPI void                            ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone);
1775 EAPI Ecore_X_Window                  ecore_x_e_illume_zone_get(Ecore_X_Window win);
1776 EAPI void                            ecore_x_e_illume_zone_list_set(Ecore_X_Window win, Ecore_X_Window *zones, unsigned int n_zones);
1777 EAPI void                            ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant);
1778 EAPI Eina_Bool                       ecore_x_e_illume_conformant_get(Ecore_X_Window win);
1779 EAPI void                            ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode);
1780 EAPI Ecore_X_Illume_Mode             ecore_x_e_illume_mode_get(Ecore_X_Window win);
1781 EAPI void                            ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode);
1782 EAPI void                            ecore_x_e_illume_focus_back_send(Ecore_X_Window win);
1783 EAPI void                            ecore_x_e_illume_focus_forward_send(Ecore_X_Window win);
1784 EAPI void                            ecore_x_e_illume_focus_home_send(Ecore_X_Window win);
1785 EAPI void                            ecore_x_e_illume_close_send(Ecore_X_Window win);
1786 EAPI void                            ecore_x_e_illume_home_new_send(Ecore_X_Window win);
1787 EAPI void                            ecore_x_e_illume_home_del_send(Ecore_X_Window win);
1788 EAPI void                            ecore_x_e_illume_access_action_next_send(Ecore_X_Window win);
1789 EAPI void                            ecore_x_e_illume_access_action_prev_send(Ecore_X_Window win);
1790 EAPI void                            ecore_x_e_illume_access_action_activate_send(Ecore_X_Window win);
1791 EAPI void                            ecore_x_e_illume_access_action_over_send(Ecore_X_Window win);
1792 EAPI void                            ecore_x_e_illume_access_action_read_send(Ecore_X_Window win);
1793 EAPI void                            ecore_x_e_illume_access_action_read_next_send(Ecore_X_Window win);
1794 EAPI void                            ecore_x_e_illume_access_action_read_prev_send(Ecore_X_Window win);
1795 EAPI void                            ecore_x_e_illume_access_action_up_send(Ecore_X_Window win);
1796 EAPI void                            ecore_x_e_illume_access_action_down_send(Ecore_X_Window win);
1797
1798 EAPI void                            ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag);
1799 EAPI Eina_Bool                       ecore_x_e_illume_drag_get(Ecore_X_Window win);
1800 EAPI void                            ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked);
1801 EAPI Eina_Bool                       ecore_x_e_illume_drag_locked_get(Ecore_X_Window win);
1802 EAPI void                            ecore_x_e_illume_drag_start_send(Ecore_X_Window win);
1803 EAPI void                            ecore_x_e_illume_drag_end_send(Ecore_X_Window win);
1804 EAPI void                            ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, int x, int y, int w, int h);
1805 EAPI Eina_Bool                       ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
1806 EAPI void                            ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, int x, int y, int w, int h);
1807 EAPI Eina_Bool                       ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
1808 EAPI void                            ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w, int h);
1809 EAPI Eina_Bool                       ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
1810 EAPI void                            ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel);
1811 EAPI Eina_Bool                       ecore_x_e_illume_quickpanel_get(Ecore_X_Window win);
1812 EAPI void                            ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state);
1813 EAPI Ecore_X_Illume_Quickpanel_State ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win);
1814 EAPI void                            ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state);
1815 EAPI void                            ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win);
1816 EAPI void                            ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, unsigned int priority);
1817 EAPI int                             ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win);
1818 EAPI void                            ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, unsigned int priority);
1819 EAPI int                             ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win);
1820 EAPI void                            ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone);
1821 EAPI int                             ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win);
1822 EAPI void                            ecore_x_e_illume_quickpanel_zone_request_send(Ecore_X_Window win);
1823 EAPI void                            ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win);
1824
1825 EAPI void                            ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, Ecore_X_Illume_Clipboard_State state);
1826
1827 EAPI Ecore_X_Illume_Clipboard_State  ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win);
1828
1829 EAPI void                            ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, int x, int y, int w, int h);
1830 EAPI Eina_Bool                       ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h);
1831 EAPI void                            ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter);
1832 EAPI Ecore_X_Sync_Counter            ecore_x_e_comp_sync_counter_get(Ecore_X_Window win);
1833 EAPI void                            ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win);
1834 EAPI void                            ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win, int w, int h);
1835 EAPI void                            ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled);
1836 EAPI Eina_Bool                       ecore_x_e_comp_sync_supported_get(Ecore_X_Window root);
1837 EAPI void                            ecore_x_e_comp_sync_begin_send(Ecore_X_Window win);
1838 EAPI void                            ecore_x_e_comp_sync_end_send(Ecore_X_Window win);
1839 EAPI void                            ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win);
1840
1841 EAPI void                            ecore_x_e_comp_flush_send(Ecore_X_Window win);
1842 EAPI void                            ecore_x_e_comp_dump_send(Ecore_X_Window win);
1843 EAPI void                            ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap);
1844 EAPI Ecore_X_Pixmap                  ecore_x_e_comp_pixmap_get(Ecore_X_Window win);
1845
1846 /**
1847  * @brief Get the window profile
1848  *
1849  * @param win The client x window
1850  * @return The string value of the window profile, or NULL if none exists
1851  */
1852 EAPI char                            *ecore_x_e_window_profile_get(Ecore_X_Window win);
1853 /**
1854  * @brief Set the window profile
1855  *
1856  * @param win The client x window
1857  * @param profile The string value of the window profile
1858  */
1859 EAPI void                             ecore_x_e_window_profile_set(Ecore_X_Window win, const char *profile);
1860 /**
1861  * @brief Set the array of window profiles
1862  *
1863  * @param win The client x window
1864  * @param profiles The string array of window profiles
1865  * @param num_profiles The number of window profiles
1866  *
1867  * @deprecated use ecore_x_e_window_available_profiles_set
1868  */
1869 EAPI void                             ecore_x_e_window_profile_list_set(Ecore_X_Window  win, const char **profiles, unsigned int num_profiles);
1870 /**
1871  * @brief Get the array of window profiles
1872  *
1873  * @param win The client x window
1874  * @param profiles Where to return the string array of window profiles
1875  * @param ret_num Where to return the number of window profiles
1876  * @return EINA_TRUE if window profiles exist, EINA_FALSE otherwise
1877  *
1878  * @deprecated use ecore_x_e_window_available_profiles_get
1879  */
1880 EAPI Eina_Bool                        ecore_x_e_window_profile_list_get(Ecore_X_Window win, const char ***profiles, int *ret_num);
1881 /**
1882  * @brief Set the status for the window profile support
1883  *
1884  * @param root The root window
1885  * @param enabled The enabled value for the window profile support
1886  *
1887  * @since 1.8
1888  */
1889 EAPI void                             ecore_x_e_window_profile_supported_set(Ecore_X_Window root, Eina_Bool enabled);
1890 /**
1891  * @brief Query if the window profile is supported
1892  *
1893  * @param root The root window
1894  * @return EINA_TRUE if it is supported, EINA_FALSE otherwise
1895  *
1896  * @since 1.8
1897  */
1898 EAPI Eina_Bool                        ecore_x_e_window_profile_supported_get(Ecore_X_Window root);
1899 /**
1900  * @brief Set the array of available window profiles
1901  *
1902  * @param win The client x window
1903  * @param profiles The string array of available window profiles
1904  * @param count The number of available window profiles
1905  *
1906  * @since 1.8
1907  */
1908 EAPI void                             ecore_x_e_window_available_profiles_set(Ecore_X_Window win, const char **profiles, unsigned int count);
1909 /**
1910  * @brief Get the array of avaialbe window profiles
1911  *
1912  * @param win The client x window
1913  * @param profiles Where to return the string array of available window profiles
1914  * @param count Where to return the number of members in profiles
1915  * @return EINA_TRUE if available window profiles exist, EINA_FALSE otherwise
1916  *
1917  * @since 1.8
1918  */
1919 EAPI Eina_Bool                        ecore_x_e_window_available_profiles_get(Ecore_X_Window win, const char ***profiles, int *count);
1920 /**
1921  * @brief Send a profile change event to the window manager
1922  *
1923  * This function sends a request to the window manager to change the profile.
1924  * If honored by the window manager, the client will receive a profile change
1925  * request event back. If the client has replied, the window manager will move
1926  * the client window on the virtual desktop associated with changed profile.
1927  *
1928  * @param root The root x window
1929  * @param win The client x window
1930  * @param profile The string value of the window profile
1931  *
1932  * @since 1.8
1933  */
1934 EAPI void                             ecore_x_e_window_profile_change_send(Ecore_X_Window root, Ecore_X_Window win, const char *profile);
1935 /**
1936  * @brief Send a profile change request event to the client
1937  *
1938  * This function sends a request to the client to change the profile.
1939  * If the client has replied, the window manager will move the client window
1940  * on the virtual desktop associated with changed profile.
1941  *
1942  * @param win The client x window
1943  * @param profile The string value of the window profile
1944  *
1945  * @since 1.8
1946  */
1947 EAPI void                             ecore_x_e_window_profile_change_request_send(Ecore_X_Window win, const char *profile);
1948 /**
1949  * @brief Send a profile change done event to the window manager
1950  *
1951  * This function sends a profile change done event to the window manager.
1952  * Upon receiving, the window manager will move the client window
1953  * on the virtual desktop associated with changed profile.
1954  *
1955  * @param root The root x window
1956  * @param win The client x window
1957  * @param profile The string value of the window profile
1958  *
1959  * @since 1.8
1960  */
1961 EAPI void                             ecore_x_e_window_profile_change_done_send(Ecore_X_Window root, Ecore_X_Window win, const char *profile);
1962
1963 EAPI Ecore_X_Sync_Alarm              ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter);
1964 EAPI Eina_Bool                       ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm);
1965 EAPI Eina_Bool                       ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val);
1966 EAPI Ecore_X_Sync_Counter            ecore_x_sync_counter_new(int val);
1967 EAPI void                            ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter);
1968 EAPI void                            ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by);
1969 EAPI void                            ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val);
1970
1971 EAPI void                            ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val);
1972 EAPI void                            ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo);
1973 EAPI Eina_Bool                       ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo);
1974
1975 EAPI int                             ecore_x_xinerama_screen_count_get(void);
1976 EAPI Eina_Bool                       ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h);
1977
1978 EAPI Eina_Bool                       ecore_x_screensaver_event_available_get(void);
1979 EAPI int                             ecore_x_screensaver_idle_time_get(void);
1980 EAPI void                            ecore_x_screensaver_set(int timeout, int interval, int prefer_blanking, int allow_exposures);
1981 EAPI void                            ecore_x_screensaver_timeout_set(int timeout);
1982 EAPI int                             ecore_x_screensaver_timeout_get(void);
1983 EAPI void                            ecore_x_screensaver_blank_set(int timeout);
1984 EAPI int                             ecore_x_screensaver_blank_get(void);
1985 EAPI void                            ecore_x_screensaver_expose_set(int timeout);
1986 EAPI int                             ecore_x_screensaver_expose_get(void);
1987 EAPI void                            ecore_x_screensaver_interval_set(int timeout);
1988 EAPI int                             ecore_x_screensaver_interval_get(void);
1989 EAPI void                            ecore_x_screensaver_event_listen_set(Eina_Bool on);
1990 EAPI Eina_Bool                       ecore_x_screensaver_custom_blanking_enable(void); /** @since 1.7 */
1991 EAPI Eina_Bool                       ecore_x_screensaver_custom_blanking_disable(void); /** @since 1.7 */
1992 EINA_DEPRECATED EAPI void            ecore_x_screensaver_supend(void); /** @since 1.11 */
1993 EAPI void                            ecore_x_screensaver_resume(void); /** @since 1.11 */
1994 EAPI void                            ecore_x_screensaver_reset(void); /** @since 1.11 */
1995 EAPI void                            ecore_x_screensaver_activate(void); /** @since 1.11 */
1996 EAPI void                            ecore_x_screensaver_suspend(void); /** @since 1.13 */
1997
1998 /* FIXME: these funcs need categorising */
1999
2000 typedef struct _Ecore_X_Window_Attributes
2001 {
2002    Ecore_X_Window   root;
2003    int              x, y, w, h;
2004    int              border;
2005    int              depth;
2006    Eina_Bool        visible : 1;
2007    Eina_Bool        viewable : 1;
2008    Eina_Bool        override : 1;
2009    Eina_Bool        input_only : 1;
2010    Eina_Bool        save_under : 1;
2011    struct
2012    {
2013       Ecore_X_Event_Mask mine;
2014       Ecore_X_Event_Mask all;
2015       Ecore_X_Event_Mask no_propagate;
2016    } event_mask;
2017    Ecore_X_Gravity  window_gravity;
2018    Ecore_X_Gravity  pixel_gravity;
2019    Ecore_X_Colormap colormap;
2020    Ecore_X_Visual   visual;
2021    /* FIXME: missing
2022     * int map_installed;
2023     * Screen *screen;
2024     */
2025 } Ecore_X_Window_Attributes;
2026
2027 EAPI Eina_Bool        ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att_ret);
2028 EAPI void             ecore_x_window_save_set_add(Ecore_X_Window win);
2029 EAPI void             ecore_x_window_save_set_del(Ecore_X_Window win);
2030 EAPI Ecore_X_Window  *ecore_x_window_children_get(Ecore_X_Window win, int *num);
2031
2032 EAPI Eina_Bool        ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold);
2033 EAPI Eina_Bool        ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold);
2034 EAPI Eina_Bool        ecore_x_pointer_mapping_set(unsigned char *map, int nmap);
2035 EAPI Eina_Bool        ecore_x_pointer_mapping_get(unsigned char *map, int nmap);
2036 EAPI Eina_Bool        ecore_x_pointer_grab(Ecore_X_Window win);
2037 EAPI Eina_Bool        ecore_x_pointer_confine_grab(Ecore_X_Window win);
2038 EAPI void             ecore_x_pointer_ungrab(void);
2039 EAPI Eina_Bool        ecore_x_pointer_warp(Ecore_X_Window win, int x, int y);
2040 EAPI Eina_Bool        ecore_x_keyboard_grab(Ecore_X_Window win);
2041 EAPI void             ecore_x_keyboard_ungrab(void);
2042 EAPI void             ecore_x_grab(void);
2043 EAPI void             ecore_x_ungrab(void);
2044 EAPI void             ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data, int event_type, void *event), void *data);
2045 EAPI void             ecore_x_window_button_grab(Ecore_X_Window win, int button, Ecore_X_Event_Mask event_mask, int mod, int any_mod);
2046 EAPI void             ecore_x_window_button_ungrab(Ecore_X_Window win, int button, int mod, int any_mod);
2047 EAPI void             ecore_x_window_key_grab(Ecore_X_Window win, const char *key, int mod, int any_mod);
2048 EAPI void             ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key, int mod, int any_mod);
2049
2050 EAPI void             ecore_x_focus_reset(void);
2051 EAPI void             ecore_x_events_allow_all(void);
2052 EAPI void             ecore_x_pointer_last_xy_get(int *x, int *y);
2053 EAPI void             ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y);
2054 EAPI void             ecore_x_pointer_root_xy_get(int *x, int *y);
2055
2056 /* ecore_x_region.c */
2057 EAPI Ecore_X_XRegion *ecore_x_xregion_new(void);
2058 EAPI void             ecore_x_xregion_free(Ecore_X_XRegion *region);
2059 EAPI Eina_Bool        ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc);
2060 EAPI void             ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y);
2061 EAPI Eina_Bool        ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
2062 EAPI Eina_Bool        ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
2063 EAPI Eina_Bool        ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect);
2064 EAPI Eina_Bool        ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
2065 EAPI Eina_Bool        ecore_x_xregion_is_empty(Ecore_X_XRegion *region);
2066 EAPI Eina_Bool        ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
2067 EAPI Eina_Bool        ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y);
2068 EAPI Eina_Bool        ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect);
2069
2070 /* ecore_x_randr.c */
2071
2072 /* The usage of 'Ecore_X_Randr_None' or 'Ecore_X_Randr_Unset'
2073  * depends on the context. In most cases 'Ecore_X_Randr_Unset'
2074  * can be used, but in some cases -1 is a special value to
2075  * functions, thus 'Ecore_X_Randr_None' (=0) must be used.
2076  */
2077
2078 typedef short Ecore_X_Randr_Refresh_Rate;
2079 typedef int   Ecore_X_Randr_Crtc_Gamma;
2080 typedef int   Ecore_X_Randr_Signal_Format;
2081 typedef int   Ecore_X_Randr_Signal_Property;
2082 typedef int   Ecore_X_Randr_Connector_Type;
2083
2084 typedef struct _Ecore_X_Randr_Mode_Info
2085 {
2086    Ecore_X_ID    xid;
2087    unsigned int  width;
2088    unsigned int  height;
2089    unsigned long dotClock;
2090    unsigned int  hSyncStart;
2091    unsigned int  hSyncEnd;
2092    unsigned int  hTotal;
2093    unsigned int  hSkew;
2094    unsigned int  vSyncStart;
2095    unsigned int  vSyncEnd;
2096    unsigned int  vTotal;
2097    char         *name;
2098    unsigned int  nameLength;
2099    unsigned long modeFlags;
2100 } Ecore_X_Randr_Mode_Info;
2101
2102 typedef struct _Ecore_X_Randr_Crtc_Gamma_Info
2103 {
2104    int size;
2105    unsigned short *red;
2106    unsigned short *green;
2107    unsigned short *blue;
2108 } Ecore_X_Randr_Crtc_Gamma_Info;
2109
2110 EAPI int                                       ecore_x_randr_version_get(void);
2111 EAPI Eina_Bool                                 ecore_x_randr_query(void);
2112 EAPI Ecore_X_Time                              ecore_x_randr_config_timestamp_get(Ecore_X_Window root); /** @since 1.8 */
2113 EAPI Ecore_X_Randr_Orientation                 ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root);
2114 EAPI Ecore_X_Randr_Orientation                 ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root);
2115 EAPI Eina_Bool                                 ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Orientation orientation);
2116 EAPI Ecore_X_Randr_Screen_Size_MM             *ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num);
2117
2118 /**
2119  * @brief get the current set size of a given screen's primary output
2120  * @param root window which's primary output will be queried
2121  * @param w the current size's width
2122  * @param h the current size's height
2123  * @param w_mm the current size's width in mm
2124  * @param h_mm the current size's height in mm
2125  * @param size_index of current set size to be used with ecore_x_randr_primary_output_size_set()
2126  */
2127 EAPI void                                      ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w, int *h, int *w_mm, int *h_mm, int *size_index);
2128 EAPI Eina_Bool                                 ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, int size_index);
2129 EAPI Ecore_X_Randr_Refresh_Rate                ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root);
2130 EAPI Ecore_X_Randr_Refresh_Rate               *ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int size_index, int *num);
2131 EAPI Eina_Bool                                 ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root, int size_index, Ecore_X_Randr_Refresh_Rate rate);
2132
2133 EAPI void                                      ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on);
2134
2135 EAPI void                                      ecore_x_randr_screen_current_size_get(Ecore_X_Window root, int *w, int *h, int *w_mm, int *h_mm);
2136 EAPI void                                      ecore_x_randr_screen_size_range_get(Ecore_X_Window root, int *wmin, int *hmin, int *wmax, int *hmax);
2137 EAPI void                                      ecore_x_randr_screen_reset(Ecore_X_Window root);
2138 EAPI Eina_Bool                                 ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_mm, int h_mm);
2139 EAPI Ecore_X_Randr_Mode_Info                 **ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num);
2140 EAPI Ecore_X_Randr_Mode                        ecore_x_randr_mode_info_add(Ecore_X_Window root, Ecore_X_Randr_Mode_Info *mode_info);
2141 EAPI void                                      ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode);
2142 EAPI Ecore_X_Randr_Mode_Info                  *ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode);
2143 EAPI void                                      ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info);
2144 EAPI Ecore_X_Randr_Crtc                       *ecore_x_randr_crtcs_get(Ecore_X_Window root, int *num);
2145 EAPI Ecore_X_Randr_Output                     *ecore_x_randr_outputs_get(Ecore_X_Window root, int *num);
2146 EAPI Ecore_X_Randr_Output                     *ecore_x_randr_window_outputs_get(Ecore_X_Window window, int *num);
2147 EAPI Ecore_X_Randr_Output                     *ecore_x_randr_current_output_get(Ecore_X_Window window, int *num);
2148 EAPI Ecore_X_Randr_Crtc                       *ecore_x_randr_window_crtcs_get(Ecore_X_Window window, int *num);
2149 EAPI Ecore_X_Randr_Crtc                       *ecore_x_randr_current_crtc_get(Ecore_X_Window window, int *num);
2150 EAPI Ecore_X_Randr_Output                     *ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *num);
2151 EAPI Ecore_X_Randr_Output                     *ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *num);
2152 EAPI void                                      ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h);
2153 EAPI void                                      ecore_x_randr_crtc_pos_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y);
2154 EAPI Eina_Bool                                 ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x, int y);
2155 EAPI Ecore_X_Randr_Mode                        ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc);
2156 EAPI Eina_Bool                                 ecore_x_randr_crtc_mode_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Output *outputs, int noutputs, Ecore_X_Randr_Mode mode);
2157 EAPI void                                      ecore_x_randr_crtc_size_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *w, int *h);
2158 EAPI Ecore_X_Randr_Refresh_Rate                ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Mode mode);
2159 EAPI Ecore_X_Randr_Orientation                 ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc);
2160 EAPI Ecore_X_Randr_Orientation                 ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc);
2161 EAPI Eina_Bool                                 ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const Ecore_X_Randr_Orientation orientation);
2162 EAPI Eina_Bool                                 ecore_x_randr_crtc_clone_set(Ecore_X_Window root, Ecore_X_Randr_Crtc original, Ecore_X_Randr_Crtc clone);
2163 EAPI Eina_Bool                                 ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Output *outputs, int noutputs, int x, int y, Ecore_X_Randr_Mode mode, Ecore_X_Randr_Orientation orientation);
2164 EAPI Eina_Bool                                 ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc_r1, Ecore_X_Randr_Crtc crtc_r2, Ecore_X_Randr_Output_Policy policy, Ecore_X_Randr_Relative_Alignment alignment);
2165 EAPI Ecore_X_Randr_Crtc_Info                  *ecore_x_randr_crtc_info_get(Ecore_X_Window root, const Ecore_X_Randr_Crtc crtc); /**< @since 1.8 */
2166 EAPI void                                      ecore_x_randr_crtc_info_free(Ecore_X_Randr_Crtc_Info *info); /**< @since 1.8 */
2167 EAPI Eina_Bool                                 ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mode);
2168 EAPI void                                      ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mode);
2169 EAPI Ecore_X_Randr_Mode                       *ecore_x_randr_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num, int *npreferred);
2170 EAPI Ecore_X_Randr_Output                     *ecore_x_randr_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
2171 EAPI Ecore_X_Randr_Crtc                       *ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
2172 EAPI Ecore_X_Randr_Crtc                        ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
2173 EAPI char                                     *ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *len);
2174 EINA_DEPRECATED EAPI int                       ecore_x_randr_crtc_gamma_ramp_size_get(Ecore_X_Randr_Crtc crtc);
2175 EINA_DEPRECATED EAPI Ecore_X_Randr_Crtc_Gamma **ecore_x_randr_crtc_gamma_ramps_get(Ecore_X_Randr_Crtc crtc);
2176 EINA_DEPRECATED EAPI Eina_Bool                 ecore_x_randr_crtc_gamma_ramps_set(Ecore_X_Randr_Crtc crtc, const Ecore_X_Randr_Crtc_Gamma *red, const Ecore_X_Randr_Crtc_Gamma *green, const Ecore_X_Randr_Crtc_Gamma *blue);
2177 EAPI Eina_Bool                                 ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, const Ecore_X_Randr_Crtc *not_moved, int nnot_moved, int dx, int dy);
2178 EAPI Eina_Bool                                 ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, int ncrtc, int dx, int dy);
2179 EAPI void                                      ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h);
2180 EAPI Ecore_X_Randr_Connection_Status           ecore_x_randr_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
2181 EAPI void                                      ecore_x_randr_output_size_mm_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *w, int *h);
2182 EAPI Eina_Bool                                 ecore_x_randr_output_crtc_set(Ecore_X_Window root, Ecore_X_Randr_Output output, const Ecore_X_Randr_Crtc crtc);
2183
2184 EAPI int                                       ecore_x_randr_crtc_gamma_size_get(Ecore_X_Randr_Crtc crtc); /**< @since 1.8 */
2185 EAPI Ecore_X_Randr_Crtc_Gamma_Info            *ecore_x_randr_crtc_gamma_get(Ecore_X_Randr_Crtc crtc); /**< @since 1.8 */
2186 EAPI Eina_Bool                                 ecore_x_randr_crtc_gamma_set(Ecore_X_Randr_Crtc crtc, const Ecore_X_Randr_Crtc_Gamma_Info *gamma); /**< @since 1.8 */
2187
2188 /**
2189  * @brief Validates the header from raw EDID data.
2190  *
2191  * @param edid The edid structure.
2192  * @param edid_length Length of the edid structure.
2193  * @return @c EINA_TRUE, if the header is valid, @c EINA_FALSE otherwise.
2194  */
2195 EAPI Eina_Bool                                 ecore_x_randr_edid_has_valid_header(unsigned char *edid, unsigned long edid_length);
2196
2197 /**
2198  * @brief Checks whether a display's EDID has a valid checksum.
2199  *
2200  * @param edid The edid structure.
2201  * @param edid_length Length of the edid structure.
2202  * @return @c EINA_TRUE, if the checksum is valid, @c EINA_FALSE otherwise.
2203  */
2204 EAPI Eina_Bool                                 ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, unsigned long edid_length);
2205
2206 /**
2207  * @brief Get the encoded version from raw EDID data.
2208  *
2209  * The return value has the minor version in the lowest 8 bits, and the major
2210  * version in all the rest of the bits. i.e.
2211  *
2212  * minor = (version & 0x000000ff);
2213  * major = (version & 0xffffff00) >> 8;
2214  *
2215  * @param edid the edid structure
2216  * @param edid_length length of the edid structure
2217  * @return The encoded major and minor version encasuplated an int.
2218  */
2219 EAPI int                                       ecore_x_randr_edid_version_get(unsigned char *edid, unsigned long edid_length);
2220
2221 /**
2222  * @brief Get the encoded manufacturer from raw EDID data.
2223  *
2224  * @param edid the edid structure
2225  * @param edid_length length of the edid structure
2226  * @return The encoded manufacturer identifier.
2227  */
2228 EAPI char                                     *ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, unsigned long edid_length);
2229
2230 /**
2231  * @brief Get the encoded name from raw EDID data.
2232  *
2233  * @param edid the edid structure
2234  * @param edid_length length of the edid structure
2235  * @return The encoded manufacturer identifier.
2236  */
2237 EAPI char                                     *ecore_x_randr_edid_display_name_get(unsigned char *edid, unsigned long edid_length);
2238
2239 /**
2240  * @brief Get the encoded ASCII from raw EDID data.
2241  *
2242  * @param edid the edid structure
2243  * @param edid_length length of the edid structure
2244  * @return The encoded ASCII display identifier.
2245  */
2246 EAPI char                                     *ecore_x_randr_edid_display_ascii_get(unsigned char *edid, unsigned long edid_length);
2247
2248 /**
2249  * @brief Get the encoded serial identifier from raw EDID data.
2250  *
2251  * @param edid the edid structure
2252  * @param edid_length length of the edid structure
2253  * @return The encoded serial identifier.
2254  */
2255 EAPI char                                     *ecore_x_randr_edid_display_serial_get(unsigned char *edid, unsigned long edid_length);
2256
2257 /**
2258  * @brief Get the encoded model number from raw EDID data.
2259  *
2260  * The manufacturer ID table is necessary for a useful description.
2261  *
2262  * @param edid the edid structure
2263  * @param edid_length length of the edid structure
2264  * @return The encoded model number.
2265  */
2266 EAPI int                                       ecore_x_randr_edid_model_get(unsigned char *edid, unsigned long edid_length);
2267
2268 /**
2269  * @brief Get the manufacturer serial number from raw EDID data.
2270  *
2271  * @param edid the edid structure
2272  * @param edid_length length of the edid structure
2273  * @return The encoded serial manufacturer serial number.
2274  */
2275 EAPI int                                       ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, unsigned long edid_length);
2276
2277 /**
2278  * @brief Get the manufacturer model number from raw EDID data.
2279  *
2280  * @param edid the edid structure
2281  * @param edid_length length of the edid structure
2282  * @return The manufacturer's model number.
2283  */
2284 EAPI int                                       ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, unsigned long edid_length);
2285
2286 /**
2287  * @brief Looks up the DPMS support from raw EDID data.
2288  *
2289  * @param edid The edid structure.
2290  * @param edid_length Length of the edid structure.
2291  * @return @c EINA_TRUE, if DPMS is supported in some way, @c EINA_FALSE
2292  * otherwise.
2293  */
2294 EAPI Eina_Bool                                 ecore_x_randr_edid_dpms_available_get(unsigned char *edid, unsigned long edid_length);
2295
2296 /**
2297  * @brief Looks up the DPMS Standby support from raw EDID data.
2298  *
2299  * @param edid The edid structure.
2300  * @param edid_length Length of the edid structure.
2301  * @return @c EINA_TRUE, if DPMS Standby is supported, @c EINA_FALSE otherwise.
2302  */
2303 EAPI Eina_Bool                                 ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, unsigned long edid_length);
2304
2305 /**
2306  * @brief Looks up the DPMS Suspend support from raw EDID data.
2307  *
2308  * @param edid The edid structure.
2309  * @param edid_length Length of the edid structure.
2310  * @return @c EINA_TRUE, if DPMS Suspend is supported, @c EINA_FALSE otherwise.
2311  */
2312 EAPI Eina_Bool                                 ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, unsigned long edid_length);
2313
2314 /**
2315  * @brief Looks up the DPMS Off support from raw EDID data.
2316  *
2317  * @param edid The edid structure.
2318  * @param edid_length Length of the edid structure.
2319  * @return @c EINA_TRUE, if DPMS Off is supported, @c EINA_FALSE otherwise.
2320  */
2321 EAPI Eina_Bool                                 ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, unsigned long edid_length);
2322
2323 /**
2324  * @brief Get the preferred aspect ratio from raw EDID data.
2325  *
2326  * @param edid the edid structure
2327  * @param edid_length length of the edid structure
2328  * @return The preferred aspect ratio.
2329  */
2330 EAPI Ecore_X_Randr_Edid_Aspect_Ratio           ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, unsigned long edid_length);
2331
2332 /**
2333  * @brief Get the supported aspect ratios from raw EDID data.
2334  *
2335  * @param edid the edid structure
2336  * @param edid_length length of the edid structure
2337  * @return The supported aspect ratios.
2338  */
2339 EAPI Ecore_X_Randr_Edid_Aspect_Ratio           ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, unsigned long edid_length);
2340
2341 /**
2342  * @brief Get the supported colorschemes from raw EDID data.
2343  *
2344  * @param edid the edid structure
2345  * @param edid_length length of the edid structure
2346  * @return The supported colorschemes.
2347  */
2348 EAPI Ecore_X_Randr_Edid_Display_Colorscheme    ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, unsigned long edid_length);
2349
2350 /**
2351  * @brief Get the display type from raw EDID data.
2352  *
2353  * @param edid The edid structure.
2354  * @param edid_length Length of the edid structure.
2355  * @return @c EINA_TRUE, if the display is a digital one, @c EINA_FALSE
2356  * otherwise.
2357  */
2358 EAPI Eina_Bool                                 ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, unsigned long edid_length);
2359
2360 /**
2361  * @brief Get the display interface type from raw EDID data.
2362  *
2363  * @param edid the edid structure
2364  * @param edid_length length of the edid structure
2365  * @return The interface type.
2366  */
2367 EAPI Ecore_X_Randr_Edid_Display_Interface_Type ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, unsigned long edid_length);
2368
2369 EAPI Eina_Bool                                 ecore_x_randr_output_backlight_available(void);
2370 EAPI void                                      ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, double level);
2371 EAPI double                                    ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
2372 EAPI Eina_Bool                                 ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, Ecore_X_Randr_Output output, double level);
2373 EAPI Ecore_X_Randr_Output                      ecore_x_randr_primary_output_get(Ecore_X_Window root);
2374 EAPI void                                      ecore_x_randr_primary_output_set(Ecore_X_Window root, Ecore_X_Randr_Output output);
2375 EAPI Ecore_X_Render_Subpixel_Order             ecore_x_randr_output_subpixel_order_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
2376 EAPI unsigned char                            *ecore_x_randr_output_edid_get(Ecore_X_Window root, Ecore_X_Randr_Output output, unsigned long *length);
2377 EAPI Ecore_X_Randr_Output                     *ecore_x_randr_output_wired_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
2378 EAPI Ecore_X_Randr_Output                    **ecore_x_randr_output_compatibility_list_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
2379 EAPI Ecore_X_Randr_Signal_Format              *ecore_x_randr_output_signal_formats_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
2380 EAPI Eina_Bool                                 ecore_x_randr_output_signal_format_set(Ecore_X_Window root, Ecore_X_Randr_Output output, Ecore_X_Randr_Signal_Format *signal);
2381 EAPI Ecore_X_Randr_Signal_Property            *ecore_x_randr_output_signal_properties_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
2382 EAPI int                                       ecore_x_randr_output_connector_number_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
2383 EAPI Ecore_X_Randr_Connector_Type              ecore_x_randr_output_connector_type_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
2384 EAPI void                                      ecore_x_randr_crtc_panning_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h); /**< @since 1.8 */
2385 EAPI Eina_Bool                                 ecore_x_randr_crtc_panning_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const int x, const int y, const int w, const int h); /**< @since 1.8 */
2386 EAPI void                                      ecore_x_randr_crtc_tracking_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h); /**< @since 1.8 */
2387 EAPI Eina_Bool                                 ecore_x_randr_crtc_tracking_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const int x, const int y, const int w, const int h); /**< @since 1.8 */
2388 EAPI void                                      ecore_x_randr_crtc_border_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h); /**< @since 1.8 */
2389 EAPI Eina_Bool                                 ecore_x_randr_crtc_border_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, const int left, const int top, const int right, const int bottom); /**< @since 1.8 */
2390
2391 /* XRender Support (horrendously incomplete) */
2392 typedef Ecore_X_ID Ecore_X_Picture;
2393
2394 /* XFixes Extension Support */
2395 typedef Ecore_X_ID Ecore_X_Region;
2396
2397 typedef enum _Ecore_X_Region_Type
2398 {
2399    ECORE_X_REGION_BOUNDING,
2400    ECORE_X_REGION_CLIP
2401 } Ecore_X_Region_Type;
2402
2403 EAPI Ecore_X_Region     ecore_x_region_new(Ecore_X_Rectangle *rects, int num);
2404 EAPI Ecore_X_Region     ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap);
2405 EAPI Ecore_X_Region     ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type);
2406 EAPI Ecore_X_Region     ecore_x_region_new_from_gc(Ecore_X_GC gc);
2407 EAPI Ecore_X_Region     ecore_x_region_new_from_picture(Ecore_X_Picture picture);
2408 EAPI void               ecore_x_region_free(Ecore_X_Region region);
2409 EAPI void               ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num);
2410 EAPI void               ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source);
2411 EAPI void               ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2);
2412 EAPI void               ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2);
2413 EAPI void               ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2);
2414 EAPI void               ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Region source);
2415 EAPI void               ecore_x_region_translate(Ecore_X_Region region, int dx, int dy);
2416 EAPI void               ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source);
2417 EAPI Ecore_X_Rectangle *ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds);
2418 EAPI void               ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int left, unsigned int right, unsigned int top, unsigned int bottom);
2419 EAPI void               ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x_origin, int y_origin);
2420 EAPI void               ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window win, Ecore_X_Shape_Type type, int x_offset, int y_offset);
2421 EAPI void               ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x_origin, int y_origin);
2422
2423 /**
2424  * xfixes selection notification request.
2425  *
2426  * This lets you choose which selections you want to get notifications for.
2427  * @param selection The selection atom.
2428  * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
2429  * @since 1.1.0
2430  */
2431 EAPI Eina_Bool          ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection);
2432
2433 /* XComposite Extension Support */
2434 EAPI Eina_Bool          ecore_x_composite_query(void);
2435 EAPI void               ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
2436 EAPI void               ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
2437 EAPI void               ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
2438 EAPI void               ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type);
2439 EAPI Ecore_X_Pixmap     ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win);
2440 EAPI void               ecore_x_composite_window_events_disable(Ecore_X_Window win);
2441 EAPI void               ecore_x_composite_window_events_enable(Ecore_X_Window win);
2442 EAPI Ecore_X_Window     ecore_x_composite_render_window_enable(Ecore_X_Window root);
2443 EAPI void               ecore_x_composite_render_window_disable(Ecore_X_Window root);
2444
2445 /* XPresent Extension Support */
2446 /** @since 1.9 */
2447 EAPI void ecore_x_present_select_events(Ecore_X_Window win, unsigned int events);
2448 /** @since 1.9 */
2449 EAPI void ecore_x_present_notify_msc(Ecore_X_Window win, unsigned int serial, unsigned long long target_msc, unsigned long long divisor, unsigned long long remainder);
2450 /** @since 1.9 */
2451 EAPI void ecore_x_present_pixmap(Ecore_X_Window win, Ecore_X_Pixmap pixmap, unsigned int serial, Ecore_X_Region valid,
2452                                  Ecore_X_Region update, int x_off, int y_off, Ecore_X_Randr_Crtc target_crtc,
2453                                  Ecore_X_Sync_Fence wait_fence, Ecore_X_Sync_Fence idle_fence, unsigned int options,
2454                                  unsigned long long target_msc, unsigned long long divisor, unsigned long long remainder,
2455                                  Ecore_X_Present *notifies, int num_notifies);
2456 /** @since 1.9 */
2457 EAPI Eina_Bool ecore_x_present_exists(void);
2458
2459 /* XDamage Extension Support */
2460 typedef Ecore_X_ID Ecore_X_Damage;
2461
2462 typedef enum _Ecore_X_Damage_Report_Level
2463 {
2464    ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES,
2465    ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES,
2466    ECORE_X_DAMAGE_REPORT_BOUNDING_BOX,
2467    ECORE_X_DAMAGE_REPORT_NON_EMPTY
2468 } Ecore_X_Damage_Report_Level;
2469
2470 struct _Ecore_X_Event_Damage
2471 {
2472    Ecore_X_Damage_Report_Level level;
2473    Ecore_X_Drawable            drawable;
2474    Ecore_X_Damage              damage;
2475    int                         more;
2476    Ecore_X_Time                time;
2477    Ecore_X_Rectangle           area;
2478    Ecore_X_Rectangle           geometry;
2479 };
2480
2481 typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage;
2482
2483 struct _Ecore_X_Event_Xkb
2484 {
2485    int group;
2486 };
2487 typedef struct _Ecore_X_Event_Xkb Ecore_X_Event_Xkb; /** @since 1.7 */
2488
2489 EAPI Eina_Bool      ecore_x_damage_query(void);
2490 EAPI Ecore_X_Damage ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level);
2491 EAPI void           ecore_x_damage_free(Ecore_X_Damage damage);
2492 EAPI void           ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts);
2493
2494 EAPI Eina_Bool      ecore_x_screen_is_composited(int screen);
2495 EAPI void           ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win);
2496
2497 EAPI Eina_Bool      ecore_x_dpms_query(void);
2498 EAPI Eina_Bool      ecore_x_dpms_capable_get(void);
2499 EAPI Eina_Bool      ecore_x_dpms_enabled_get(void);
2500 EAPI void           ecore_x_dpms_enabled_set(int enabled);
2501 EAPI Ecore_X_Dpms_Mode  ecore_x_dpms_power_level_get(void);
2502 EAPI void           ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned int *off);
2503 EAPI Eina_Bool      ecore_x_dpms_timeouts_set(unsigned int standby, unsigned int suspend, unsigned int off);
2504 EAPI unsigned int   ecore_x_dpms_timeout_standby_get(void);
2505 EAPI unsigned int   ecore_x_dpms_timeout_suspend_get(void);
2506 EAPI unsigned int   ecore_x_dpms_timeout_off_get(void);
2507 EAPI void           ecore_x_dpms_timeout_standby_set(unsigned int new_timeout);
2508 EAPI void           ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout);
2509 EAPI void           ecore_x_dpms_timeout_off_set(unsigned int new_timeout);
2510
2511 EAPI Eina_Bool      ecore_x_test_fake_key_down(const char *key);
2512 EAPI Eina_Bool      ecore_x_test_fake_key_up(const char *key);
2513 EAPI Eina_Bool      ecore_x_test_fake_key_press(const char *key);
2514 EAPI const char    *ecore_x_keysym_string_get(int keysym);
2515
2516 /**
2517  * Given a keyname, return the keycode representing that key
2518  * @param keyname The key from which to get the keycode.
2519  * @return The keycode of the key.
2520  *
2521  * @since 1.2.0
2522  */
2523 EAPI int            ecore_x_keysym_keycode_get(const char *keyname);
2524
2525 /**
2526  * Return the X-specific keysym for a given key string
2527  * @param string The key to get the keysym for
2528  * @return the keysym value
2529  *
2530  * @since 1.15
2531  * @note The returned value is not portable.
2532  */
2533 EAPI unsigned int   ecore_x_keysym_get(const char *string);
2534
2535 typedef struct _Ecore_X_Image Ecore_X_Image;
2536
2537 EAPI Ecore_X_Image *ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth);
2538 EAPI void           ecore_x_image_free(Ecore_X_Image *im);
2539 EAPI Eina_Bool      ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, int x, int y, int sx, int sy, int w, int h);
2540 EAPI void           ecore_x_image_put(Ecore_X_Image *im, Ecore_X_Drawable draw, Ecore_X_GC gc, int x, int y, int sx, int sy, int w, int h);
2541 EAPI void          *ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp);
2542 EAPI Eina_Bool      ecore_x_image_is_argb32_get(Ecore_X_Image *im);
2543
2544 EAPI Eina_Bool      ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c, Ecore_X_Visual v, int x, int y, int w, int h, unsigned int *dst, int dbpl, int dx, int dy);
2545
2546 EAPI Eina_Bool      ecore_x_input_multi_select(Ecore_X_Window win); /**< @since 1.13 */
2547 EAPI Eina_Bool      ecore_x_input_raw_select(Ecore_X_Window win); /**< @since 1.8 */
2548 EAPI Eina_Bool      ecore_x_input_touch_devices_grab(Ecore_X_Window win); /**< @since 1.15 */
2549 EAPI Eina_Bool      ecore_x_input_touch_devices_ungrab(void); /**< @since 1.15 */
2550
2551 EAPI Eina_Bool      ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win);
2552
2553 typedef enum _Ecore_X_Gesture_Event_Mask
2554 {
2555    ECORE_X_GESTURE_EVENT_MASK_NONE = 0L,
2556    ECORE_X_GESTURE_EVENT_MASK_FLICK = (1L << 0),
2557    ECORE_X_GESTURE_EVENT_MASK_PAN = (1L << 1),
2558    ECORE_X_GESTURE_EVENT_MASK_PINCHROTATION = (1L << 2),
2559    ECORE_X_GESTURE_EVENT_MASK_TAP = (1L << 3),
2560    ECORE_X_GESTURE_EVENT_MASK_TAPNHOLD = (1L << 4),
2561    ECORE_X_GESTURE_EVENT_MASK_HOLD = (1L << 5),
2562    ECORE_X_GESTURE_EVENT_MASK_GROUP = (1L << 6)
2563 } Ecore_X_Gesture_Event_Mask;
2564
2565 typedef enum _Ecore_X_Gesture_Event_Type
2566 {
2567    ECORE_X_GESTURE_EVENT_FLICK,
2568    ECORE_X_GESTURE_EVENT_PAN,
2569    ECORE_X_GESTURE_EVENT_PINCHROTATION,
2570    ECORE_X_GESTURE_EVENT_TAP,
2571    ECORE_X_GESTURE_EVENT_TAPNHOLD,
2572    ECORE_X_GESTURE_EVENT_HOLD,
2573    ECORE_X_GESTURE_EVENT_GROUP
2574 } Ecore_X_Gesture_Event_Type;
2575
2576 typedef enum _Ecore_X_Gesture_Event_Subtype
2577 {
2578    ECORE_X_GESTURE_END,
2579    ECORE_X_GESTURE_BEGIN,
2580    ECORE_X_GESTURE_UPDATE,
2581    ECORE_X_GESTURE_DONE
2582 } Ecore_X_Gesture_Event_Subtype;
2583
2584 typedef enum _Ecore_X_Gesture_Group_Subtype
2585 {
2586    ECORE_X_GESTURE_GROUP_REMOVED,
2587    ECORE_X_GESTURE_GROUP_ADDED,
2588    ECORE_X_GESTURE_GROUP_CURRENT
2589 } Ecore_X_Gesture_Group_Subtype;
2590
2591 typedef enum _Ecore_X_Gesture_Direction
2592 {
2593    ECORE_X_GESTURE_NORTHWARD,
2594    ECORE_X_GESTURE_NORTHEASTWARD,
2595    ECORE_X_GESTURE_EASTWARD,
2596    ECORE_X_GESTURE_SOUTHEASTWARD,
2597    ECORE_X_GESTURE_SOUTHWARD,
2598    ECORE_X_GESTURE_SOUTHWESTWARD,
2599    ECORE_X_GESTURE_WESTWARD,
2600    ECORE_X_GESTURE_NORTHWESTWARD
2601 } Ecore_X_Gesture_Direction;
2602
2603 struct _Ecore_X_Event_Gesture_Notify_Flick
2604 {
2605    Ecore_X_Window                win;
2606    Ecore_X_Time                  time;
2607    Ecore_X_Gesture_Event_Subtype subtype;
2608    int                           num_fingers;
2609    int                           distance;
2610    Ecore_X_Time                  duration;
2611    Ecore_X_Gesture_Direction     direction;
2612    double                        angle;
2613 };
2614
2615 struct _Ecore_X_Event_Gesture_Notify_Pan
2616 {
2617    Ecore_X_Window                win;
2618    Ecore_X_Time                  time;
2619    Ecore_X_Gesture_Event_Subtype subtype;
2620    int                           num_fingers;
2621    int                           dx;
2622    int                           dy;
2623    int                           distance;
2624    Ecore_X_Time                  duration;
2625    Ecore_X_Gesture_Direction     direction;
2626 };
2627
2628 struct _Ecore_X_Event_Gesture_Notify_PinchRotation
2629 {
2630    Ecore_X_Window                win;
2631    Ecore_X_Time                  time;
2632    Ecore_X_Gesture_Event_Subtype subtype;
2633    int                           num_fingers;
2634    int                           distance;
2635    int                           cx;
2636    int                           cy;
2637    double                        zoom;
2638    double                        angle;
2639 };
2640
2641 struct _Ecore_X_Event_Gesture_Notify_Tap
2642 {
2643    Ecore_X_Window                win;
2644    Ecore_X_Time                  time;
2645    Ecore_X_Gesture_Event_Subtype subtype;
2646    int                           num_fingers;
2647    int                           cx;
2648    int                           cy;
2649    int                           tap_repeat;
2650    Ecore_X_Time                  interval;
2651 };
2652
2653 struct _Ecore_X_Event_Gesture_Notify_TapNHold
2654 {
2655    Ecore_X_Window                win;
2656    Ecore_X_Time                  time;
2657    Ecore_X_Gesture_Event_Subtype subtype;
2658    int                           num_fingers;
2659    int                           cx;
2660    int                           cy;
2661    Ecore_X_Time                  interval;
2662    Ecore_X_Time                  hold_time;
2663 };
2664
2665 struct _Ecore_X_Event_Gesture_Notify_Hold
2666 {
2667    Ecore_X_Window                win;
2668    Ecore_X_Time                  time;
2669    Ecore_X_Gesture_Event_Subtype subtype;
2670    int                           num_fingers;
2671    int                           cx;
2672    int                           cy;
2673    Ecore_X_Time                  hold_time;
2674 };
2675
2676 struct _Ecore_X_Event_Gesture_Notify_Group
2677 {
2678    Ecore_X_Window                win;
2679    Ecore_X_Time                  time;
2680    Ecore_X_Gesture_Group_Subtype subtype;
2681    int                           num_groups;
2682    int                           group_id;
2683 };
2684
2685 EAPI Eina_Bool                             ecore_x_gesture_supported(void);
2686
2687 EAPI Eina_Bool                             ecore_x_gesture_events_select(Ecore_X_Window win, Ecore_X_Gesture_Event_Mask mask);
2688
2689 EAPI Ecore_X_Gesture_Event_Mask            ecore_x_gesture_events_selected_get(Ecore_X_Window win);
2690
2691 EAPI Eina_Bool                             ecore_x_gesture_event_grab(Ecore_X_Window win, Ecore_X_Gesture_Event_Type type, int num_fingers);
2692
2693 EAPI Eina_Bool                             ecore_x_gesture_event_ungrab(Ecore_X_Window win, Ecore_X_Gesture_Event_Type type, int num_fingers);
2694
2695 EAPI void                                  ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, Ecore_X_Illume_Indicator_State state);
2696 EAPI Ecore_X_Illume_Indicator_State        ecore_x_e_illume_indicator_state_get(Ecore_X_Window win);
2697 EAPI void                                  ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, Ecore_X_Illume_Indicator_State state);
2698
2699 EAPI void                                  ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, Ecore_X_Illume_Indicator_Opacity_Mode mode);
2700 EAPI Ecore_X_Illume_Indicator_Opacity_Mode ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win);
2701 EAPI void                                  ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, Ecore_X_Illume_Indicator_Opacity_Mode mode);
2702
2703 EAPI void                                  ecore_x_e_illume_indicator_type_set(Ecore_X_Window win, Ecore_X_Illume_Indicator_Type_Mode mode);  /**< @since 1.8 */
2704 EAPI Ecore_X_Illume_Indicator_Type_Mode    ecore_x_e_illume_indicator_type_get(Ecore_X_Window win);  /**< @since 1.8 */
2705 EAPI void                                  ecore_x_e_illume_indicator_type_send(Ecore_X_Window win, Ecore_X_Illume_Indicator_Type_Mode mode);  /**< @since 1.8 */
2706
2707 EAPI void                                  ecore_x_e_illume_window_state_set(Ecore_X_Window win, Ecore_X_Illume_Window_State state);
2708 EAPI Ecore_X_Illume_Window_State           ecore_x_e_illume_window_state_get(Ecore_X_Window win);
2709 EAPI void                                  ecore_x_e_illume_window_state_send(Ecore_X_Window win, Ecore_X_Illume_Window_State state); /**< @since 1.9 */
2710
2711 EAPI void                                  ecore_x_xkb_select_group(int group); /* @since 1.7 */
2712
2713 EAPI void                                  ecore_x_e_window_rotation_supported_set(Ecore_X_Window root, Eina_Bool enabled); /**< @since 1.9 */
2714 EAPI Eina_Bool                             ecore_x_e_window_rotation_supported_get(Ecore_X_Window root); /**< @since 1.9 */
2715 EAPI void                                  ecore_x_e_window_rotation_app_set(Ecore_X_Window win, Eina_Bool set); /**< @since 1.9 */
2716 EAPI Eina_Bool                             ecore_x_e_window_rotation_app_get(Ecore_X_Window win); /**< @since 1.9 */
2717 EAPI void                                  ecore_x_e_window_rotation_preferred_rotation_set(Ecore_X_Window win, int rot); /**< @since 1.9 */
2718 EAPI Eina_Bool                             ecore_x_e_window_rotation_preferred_rotation_get(Ecore_X_Window win, int *rot); /**< @since 1.9 */
2719 EAPI void                                  ecore_x_e_window_rotation_available_rotations_set(Ecore_X_Window win, const int *rots, unsigned int count); /**< @since 1.9 */
2720 EAPI Eina_Bool                             ecore_x_e_window_rotation_available_rotations_get(Ecore_X_Window win, int **rots, unsigned int *count); /**< @since 1.9 */
2721 EAPI void                                  ecore_x_e_window_rotation_change_prepare_send(Ecore_X_Window win, int rot, Eina_Bool resize, int w, int h); /**< @since 1.9 */
2722 EAPI void                                  ecore_x_e_window_rotation_change_prepare_done_send(Ecore_X_Window root, Ecore_X_Window win, int rot); /**< @since 1.9 */
2723 EAPI void                                  ecore_x_e_window_rotation_change_request_send(Ecore_X_Window win, int rot); /**< @since 1.9 */
2724 EAPI void                                  ecore_x_e_window_rotation_change_done_send(Ecore_X_Window root, Ecore_X_Window win, int rot, int w, int h); /**< @since 1.9 */
2725
2726 //this enum and API for keyrouter and client window side
2727 //keycode (8~255)
2728 typedef enum
2729 {
2730    ECORE_X_WIN_KEYGRAB_UNKNOWN = 0, /**< Unknown keygrab mode */
2731    ECORE_X_WIN_KEYGRAB_SHARED  = (1 << 8), /**< Getting the grabbed-key together with the other client windows */
2732    ECORE_X_WIN_KEYGRAB_TOPMOST = (1 << 9), /**< Getting the grabbed-key only when window is top of the stack */
2733    ECORE_X_WIN_KEYGRAB_EXCLUSIVE = (1 << 10), /**< Getting the grabbed-key exclusively regardless of window's position */
2734    ECORE_X_WIN_KEYGRAB_OVERRIDE_EXCLUSIVE = (1 << 11) /**< Getting the grabbed-key exclusively regardless of window's position. Being overrided the grab by the other client window  */
2735 } Ecore_X_Win_Keygrab_Mode;
2736
2737 //add mod, anymod, priority for the future.
2738 //we will support modifier and priority feature later.
2739 EAPI Eina_Bool                             ecore_x_window_keygrab_set(Ecore_X_Window win, const char *key, int mod, int any_mod, int priority, Ecore_X_Win_Keygrab_Mode grab_mode); /**< @since 1.15 */
2740 EAPI Eina_Bool                             ecore_x_window_keygrab_unset(Ecore_X_Window win, const char *key, int mod, int any_mod); /**< @since 1.15 */
2741
2742 //this API for keyrouter protocol
2743 EAPI void                                  ecore_x_e_keyrouter_set(Ecore_X_Window root, Eina_Bool on); /**< @since 1.15 */ //Key router set keyrouter flag using this
2744 EAPI Eina_Bool                             ecore_x_e_keyrouter_get(Ecore_X_Window root); /**< @since 1.15 */ //Client check the existance of keyrouter using this
2745
2746 #include <Ecore_X_Atoms.h>
2747 #include <Ecore_X_Cursor.h>
2748
2749 #ifdef __cplusplus
2750 }
2751 #endif // ifdef __cplusplus
2752
2753 #undef EAPI
2754 #define EAPI
2755
2756 #endif // ifndef _ECORE_X_H