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