diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c | 408 |
1 files changed, 408 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c new file mode 100644 index 0000000..769ffac --- /dev/null +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c | |||
@@ -0,0 +1,408 @@ | |||
1 | #include "ecore_xcb_private.h" | ||
2 | #include "ecore_x_atoms_decl.h" | ||
3 | |||
4 | /* NB: Increment if you add new atoms */ | ||
5 | #define ECORE_X_ATOMS_COUNT 199 | ||
6 | |||
7 | typedef struct _Xcb_Atom Xcb_Atom; | ||
8 | struct _Xcb_Atom | ||
9 | { | ||
10 | const char *name; | ||
11 | Ecore_X_Atom *atom; | ||
12 | }; | ||
13 | |||
14 | /* local function prototypes */ | ||
15 | |||
16 | /* local variables */ | ||
17 | static xcb_intern_atom_cookie_t cookies[ECORE_X_ATOMS_COUNT]; | ||
18 | static Xcb_Atom atoms[] = | ||
19 | { | ||
20 | { "ATOM", &ECORE_X_ATOM_ATOM }, | ||
21 | { "CARDINAL", &ECORE_X_ATOM_CARDINAL }, | ||
22 | { "COMPOUND_TEXT", &ECORE_X_ATOM_COMPOUND_TEXT }, | ||
23 | { "FILE_NAME", &ECORE_X_ATOM_FILE_NAME }, | ||
24 | { "STRING", &ECORE_X_ATOM_STRING }, | ||
25 | { "TEXT", &ECORE_X_ATOM_TEXT }, | ||
26 | { "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING }, | ||
27 | { "WINDOW", &ECORE_X_ATOM_WINDOW }, | ||
28 | { "PIXMAP", &ECORE_X_ATOM_PIXMAP }, | ||
29 | { "VISUALID", &ECORE_X_ATOM_VISUALID }, | ||
30 | |||
31 | { "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND }, | ||
32 | { "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND }, | ||
33 | { "XdndAware", &ECORE_X_ATOM_XDND_AWARE }, | ||
34 | { "XdndEnter", &ECORE_X_ATOM_XDND_ENTER }, | ||
35 | { "XdndTypeList", &ECORE_X_ATOM_XDND_TYPE_LIST }, | ||
36 | { "XdndPosition", &ECORE_X_ATOM_XDND_POSITION }, | ||
37 | { "XdndActionCopy", &ECORE_X_ATOM_XDND_ACTION_COPY }, | ||
38 | { "XdndActionMove", &ECORE_X_ATOM_XDND_ACTION_MOVE }, | ||
39 | { "XdndActionPrivate", &ECORE_X_ATOM_XDND_ACTION_PRIVATE }, | ||
40 | { "XdndActionAsk", &ECORE_X_ATOM_XDND_ACTION_ASK }, | ||
41 | { "XdndActionList", &ECORE_X_ATOM_XDND_ACTION_LIST }, | ||
42 | { "XdndActionLink", &ECORE_X_ATOM_XDND_ACTION_LINK }, | ||
43 | { "XdndActionDescription", &ECORE_X_ATOM_XDND_ACTION_DESCRIPTION }, | ||
44 | { "XdndProxy", &ECORE_X_ATOM_XDND_PROXY }, | ||
45 | { "XdndStatus", &ECORE_X_ATOM_XDND_STATUS }, | ||
46 | { "XdndLeave", &ECORE_X_ATOM_XDND_LEAVE }, | ||
47 | { "XdndDrop", &ECORE_X_ATOM_XDND_DROP }, | ||
48 | { "XdndFinished", &ECORE_X_ATOM_XDND_FINISHED }, | ||
49 | |||
50 | { "XdndActionCopy", &ECORE_X_DND_ACTION_COPY }, | ||
51 | { "XdndActionMove", &ECORE_X_DND_ACTION_MOVE }, | ||
52 | { "XdndActionLink", &ECORE_X_DND_ACTION_LINK }, | ||
53 | { "XdndActionAsk", &ECORE_X_DND_ACTION_ASK }, | ||
54 | { "XdndActionPrivate", &ECORE_X_DND_ACTION_PRIVATE }, | ||
55 | |||
56 | { "_E_FRAME_SIZE", &ECORE_X_ATOM_E_FRAME_SIZE }, | ||
57 | |||
58 | { "_WIN_LAYER", &ECORE_X_ATOM_WIN_LAYER }, | ||
59 | |||
60 | { "WM_NAME", &ECORE_X_ATOM_WM_NAME }, | ||
61 | { "WM_ICON_NAME", &ECORE_X_ATOM_WM_ICON_NAME }, | ||
62 | { "WM_NORMAL_HINTS", &ECORE_X_ATOM_WM_NORMAL_HINTS }, | ||
63 | { "WM_SIZE_HINTS", &ECORE_X_ATOM_WM_SIZE_HINTS }, | ||
64 | { "WM_HINTS", &ECORE_X_ATOM_WM_HINTS }, | ||
65 | { "WM_CLASS", &ECORE_X_ATOM_WM_CLASS }, | ||
66 | { "WM_TRANSIENT_FOR", &ECORE_X_ATOM_WM_TRANSIENT_FOR }, | ||
67 | { "WM_PROTOCOLS", &ECORE_X_ATOM_WM_PROTOCOLS }, | ||
68 | { "WM_COLORMAP_WINDOWS", &ECORE_X_ATOM_WM_COLORMAP_WINDOWS }, | ||
69 | { "WM_COMMAND", &ECORE_X_ATOM_WM_COMMAND }, | ||
70 | { "WM_CLIENT_MACHINE", &ECORE_X_ATOM_WM_CLIENT_MACHINE }, | ||
71 | |||
72 | { "WM_STATE", &ECORE_X_ATOM_WM_STATE }, | ||
73 | { "WM_ICON_SIZE", &ECORE_X_ATOM_WM_ICON_SIZE }, | ||
74 | |||
75 | { "WM_CHANGE_STATE", &ECORE_X_ATOM_WM_CHANGE_STATE }, | ||
76 | |||
77 | { "WM_TAKE_FOCUS", &ECORE_X_ATOM_WM_TAKE_FOCUS }, | ||
78 | { "WM_SAVE_YOURSELF", &ECORE_X_ATOM_WM_SAVE_YOURSELF }, | ||
79 | { "WM_DELETE_WINDOW", &ECORE_X_ATOM_WM_DELETE_WINDOW }, | ||
80 | |||
81 | { "WM_COLORMAP_NOTIFY", &ECORE_X_ATOM_WM_COLORMAP_NOTIFY }, | ||
82 | |||
83 | { "SM_CLIENT_ID", &ECORE_X_ATOM_SM_CLIENT_ID }, | ||
84 | { "WM_CLIENT_LEADER", &ECORE_X_ATOM_WM_CLIENT_LEADER }, | ||
85 | { "WM_WINDOW_ROLE", &ECORE_X_ATOM_WM_WINDOW_ROLE }, | ||
86 | |||
87 | { "_MOTIF_WM_HINTS", &ECORE_X_ATOM_MOTIF_WM_HINTS }, | ||
88 | |||
89 | { "_NET_SUPPORTED", &ECORE_X_ATOM_NET_SUPPORTED }, | ||
90 | { "_NET_CLIENT_LIST", &ECORE_X_ATOM_NET_CLIENT_LIST }, | ||
91 | { "_NET_CLIENT_LIST_STACKING", &ECORE_X_ATOM_NET_CLIENT_LIST_STACKING }, | ||
92 | { "_NET_NUMBER_OF_DESKTOPS", &ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS }, | ||
93 | { "_NET_DESKTOP_GEOMETRY", &ECORE_X_ATOM_NET_DESKTOP_GEOMETRY }, | ||
94 | { "_NET_DESKTOP_VIEWPORT", &ECORE_X_ATOM_NET_DESKTOP_VIEWPORT }, | ||
95 | { "_NET_CURRENT_DESKTOP", &ECORE_X_ATOM_NET_CURRENT_DESKTOP }, | ||
96 | { "_NET_DESKTOP_NAMES", &ECORE_X_ATOM_NET_DESKTOP_NAMES }, | ||
97 | { "_NET_ACTIVE_WINDOW", &ECORE_X_ATOM_NET_ACTIVE_WINDOW }, | ||
98 | { "_NET_WORKAREA", &ECORE_X_ATOM_NET_WORKAREA }, | ||
99 | { "_NET_SUPPORTING_WM_CHECK", &ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK }, | ||
100 | { "_NET_VIRTUAL_ROOTS", &ECORE_X_ATOM_NET_VIRTUAL_ROOTS }, | ||
101 | { "_NET_DESKTOP_LAYOUT", &ECORE_X_ATOM_NET_DESKTOP_LAYOUT }, | ||
102 | { "_NET_SHOWING_DESKTOP", &ECORE_X_ATOM_NET_SHOWING_DESKTOP }, | ||
103 | |||
104 | { "_NET_CLOSE_WINDOW", &ECORE_X_ATOM_NET_CLOSE_WINDOW }, | ||
105 | { "_NET_MOVERESIZE_WINDOW", &ECORE_X_ATOM_NET_MOVERESIZE_WINDOW }, | ||
106 | { "_NET_WM_MOVERESIZE", &ECORE_X_ATOM_NET_WM_MOVERESIZE }, | ||
107 | { "_NET_RESTACK_WINDOW", &ECORE_X_ATOM_NET_RESTACK_WINDOW }, | ||
108 | |||
109 | { "_NET_REQUEST_FRAME_EXTENTS", &ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS }, | ||
110 | |||
111 | { "_NET_WM_NAME", &ECORE_X_ATOM_NET_WM_NAME }, | ||
112 | { "_NET_WM_VISIBLE_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_NAME }, | ||
113 | { "_NET_WM_ICON_NAME", &ECORE_X_ATOM_NET_WM_ICON_NAME }, | ||
114 | { "_NET_WM_VISIBLE_ICON_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME }, | ||
115 | { "_NET_WM_DESKTOP", &ECORE_X_ATOM_NET_WM_DESKTOP }, | ||
116 | |||
117 | { "_NET_WM_WINDOW_TYPE", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE }, | ||
118 | { "_NET_WM_WINDOW_TYPE_DESKTOP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP }, | ||
119 | { "_NET_WM_WINDOW_TYPE_DOCK", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK }, | ||
120 | { "_NET_WM_WINDOW_TYPE_TOOLBAR", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR }, | ||
121 | { "_NET_WM_WINDOW_TYPE_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU }, | ||
122 | { "_NET_WM_WINDOW_TYPE_UTILITY", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY }, | ||
123 | { "_NET_WM_WINDOW_TYPE_SPLASH", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH }, | ||
124 | { "_NET_WM_WINDOW_TYPE_DIALOG", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG }, | ||
125 | { "_NET_WM_WINDOW_TYPE_NORMAL", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL }, | ||
126 | { "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", | ||
127 | &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU }, | ||
128 | { "_NET_WM_WINDOW_TYPE_POPUP_MENU", | ||
129 | &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU }, | ||
130 | { "_NET_WM_WINDOW_TYPE_TOOLTIP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP }, | ||
131 | { "_NET_WM_WINDOW_TYPE_NOTIFICATION", | ||
132 | &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION }, | ||
133 | { "_NET_WM_WINDOW_TYPE_COMBO", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO }, | ||
134 | { "_NET_WM_WINDOW_TYPE_DND", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND }, | ||
135 | |||
136 | { "_NET_WM_STATE", &ECORE_X_ATOM_NET_WM_STATE }, | ||
137 | { "_NET_WM_STATE_MODAL", &ECORE_X_ATOM_NET_WM_STATE_MODAL }, | ||
138 | { "_NET_WM_STATE_STICKY", &ECORE_X_ATOM_NET_WM_STATE_STICKY }, | ||
139 | { "_NET_WM_STATE_MAXIMIZED_VERT", | ||
140 | &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT }, | ||
141 | { "_NET_WM_STATE_MAXIMIZED_HORZ", | ||
142 | &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ }, | ||
143 | { "_NET_WM_STATE_SHADED", &ECORE_X_ATOM_NET_WM_STATE_SHADED }, | ||
144 | { "_NET_WM_STATE_SKIP_TASKBAR", &ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR }, | ||
145 | { "_NET_WM_STATE_SKIP_PAGER", &ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER }, | ||
146 | { "_NET_WM_STATE_HIDDEN", &ECORE_X_ATOM_NET_WM_STATE_HIDDEN }, | ||
147 | { "_NET_WM_STATE_FULLSCREEN", &ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN }, | ||
148 | { "_NET_WM_STATE_ABOVE", &ECORE_X_ATOM_NET_WM_STATE_ABOVE }, | ||
149 | { "_NET_WM_STATE_BELOW", &ECORE_X_ATOM_NET_WM_STATE_BELOW }, | ||
150 | { "_NET_WM_STATE_DEMANDS_ATTENTION", | ||
151 | &ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION }, | ||
152 | |||
153 | { "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS }, | ||
154 | { "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE }, | ||
155 | { "_NET_WM_ACTION_RESIZE", &ECORE_X_ATOM_NET_WM_ACTION_RESIZE }, | ||
156 | { "_NET_WM_ACTION_MINIMIZE", &ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE }, | ||
157 | { "_NET_WM_ACTION_SHADE", &ECORE_X_ATOM_NET_WM_ACTION_SHADE }, | ||
158 | { "_NET_WM_ACTION_STICK", &ECORE_X_ATOM_NET_WM_ACTION_STICK }, | ||
159 | { "_NET_WM_ACTION_MAXIMIZE_HORZ", | ||
160 | &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ }, | ||
161 | { "_NET_WM_ACTION_MAXIMIZE_VERT", | ||
162 | &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT }, | ||
163 | { "_NET_WM_ACTION_FULLSCREEN", &ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN }, | ||
164 | { "_NET_WM_ACTION_CHANGE_DESKTOP", | ||
165 | &ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP }, | ||
166 | { "_NET_WM_ACTION_CLOSE", &ECORE_X_ATOM_NET_WM_ACTION_CLOSE }, | ||
167 | { "_NET_WM_ACTION_ABOVE", &ECORE_X_ATOM_NET_WM_ACTION_ABOVE }, | ||
168 | { "_NET_WM_ACTION_BELOW", &ECORE_X_ATOM_NET_WM_ACTION_BELOW }, | ||
169 | |||
170 | { "_NET_WM_STRUT", &ECORE_X_ATOM_NET_WM_STRUT }, | ||
171 | { "_NET_WM_STRUT_PARTIAL", &ECORE_X_ATOM_NET_WM_STRUT_PARTIAL }, | ||
172 | { "_NET_WM_ICON_GEOMETRY", &ECORE_X_ATOM_NET_WM_ICON_GEOMETRY }, | ||
173 | { "_NET_WM_ICON", &ECORE_X_ATOM_NET_WM_ICON }, | ||
174 | { "_NET_WM_PID", &ECORE_X_ATOM_NET_WM_PID }, | ||
175 | { "_NET_WM_HANDLED_ICONS", &ECORE_X_ATOM_NET_WM_HANDLED_ICONS }, | ||
176 | { "_NET_WM_USER_TIME", &ECORE_X_ATOM_NET_WM_USER_TIME }, | ||
177 | { "_NET_STARTUP_ID", &ECORE_X_ATOM_NET_STARTUP_ID }, | ||
178 | { "_NET_FRAME_EXTENTS", &ECORE_X_ATOM_NET_FRAME_EXTENTS }, | ||
179 | |||
180 | { "_NET_WM_PING", &ECORE_X_ATOM_NET_WM_PING }, | ||
181 | { "_NET_WM_SYNC_REQUEST", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST }, | ||
182 | { "_NET_WM_SYNC_REQUEST_COUNTER", | ||
183 | &ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER }, | ||
184 | |||
185 | { "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY }, | ||
186 | { "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW }, | ||
187 | { "_NET_WM_WINDOW_SHADE", &ECORE_X_ATOM_NET_WM_WINDOW_SHADE }, | ||
188 | |||
189 | { "TARGETS", &ECORE_X_ATOM_SELECTION_TARGETS }, | ||
190 | { "CLIPBOARD", &ECORE_X_ATOM_SELECTION_CLIPBOARD }, | ||
191 | { "PRIMARY", &ECORE_X_ATOM_SELECTION_PRIMARY }, | ||
192 | { "SECONDARY", &ECORE_X_ATOM_SELECTION_SECONDARY }, | ||
193 | { "_ECORE_SELECTION_PRIMARY", &ECORE_X_ATOM_SELECTION_PROP_PRIMARY }, | ||
194 | { "_ECORE_SELECTION_SECONDARY", &ECORE_X_ATOM_SELECTION_PROP_SECONDARY }, | ||
195 | { "_ECORE_SELECTION_CLIPBOARD", &ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD }, | ||
196 | |||
197 | { "_E_VIRTUAL_KEYBOARD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD }, | ||
198 | { "_E_VIRTUAL_KEYBOARD_STATE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE }, | ||
199 | { "_E_VIRTUAL_KEYBOARD_ON", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON }, | ||
200 | { "_E_VIRTUAL_KEYBOARD_OFF", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF }, | ||
201 | { "_E_VIRTUAL_KEYBOARD_ALPHA", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA }, | ||
202 | { "_E_VIRTUAL_KEYBOARD_NUMERIC", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC }, | ||
203 | { "_E_VIRTUAL_KEYBOARD_PIN", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN }, | ||
204 | { "_E_VIRTUAL_KEYBOARD_PHONE_NUMBER", | ||
205 | &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER }, | ||
206 | { "_E_VIRTUAL_KEYBOARD_HEX", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX }, | ||
207 | { "_E_VIRTUAL_KEYBOARD_TERMINAL", | ||
208 | &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL }, | ||
209 | { "_E_VIRTUAL_KEYBOARD_PASSWORD", | ||
210 | &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD }, | ||
211 | { "_E_VIRTUAL_KEYBOARD_IP", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP }, | ||
212 | { "_E_VIRTUAL_KEYBOARD_HOST", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST }, | ||
213 | { "_E_VIRTUAL_KEYBOARD_FILE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE }, | ||
214 | { "_E_VIRTUAL_KEYBOARD_URL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL }, | ||
215 | { "_E_VIRTUAL_KEYBOARD_KEYPAD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD }, | ||
216 | { "_E_VIRTUAL_KEYBOARD_J2ME", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME }, | ||
217 | |||
218 | { "_E_ILLUME_ZONE", &ECORE_X_ATOM_E_ILLUME_ZONE }, | ||
219 | { "_E_ILLUME_ZONE_LIST", &ECORE_X_ATOM_E_ILLUME_ZONE_LIST }, | ||
220 | { "_E_ILLUME_CONFORMANT", &ECORE_X_ATOM_E_ILLUME_CONFORMANT }, | ||
221 | { "_E_ILLUME_MODE", &ECORE_X_ATOM_E_ILLUME_MODE }, | ||
222 | { "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE }, | ||
223 | { "_E_ILLUME_MODE_DUAL_TOP", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP }, | ||
224 | { "_E_ILLUME_MODE_DUAL_LEFT", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT }, | ||
225 | { "_E_ILLUME_FOCUS_BACK", &ECORE_X_ATOM_E_ILLUME_FOCUS_BACK }, | ||
226 | { "_E_ILLUME_FOCUS_FORWARD", &ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD }, | ||
227 | { "_E_ILLUME_FOCUS_HOME", &ECORE_X_ATOM_E_ILLUME_FOCUS_HOME }, | ||
228 | { "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE }, | ||
229 | { "_E_ILLUME_HOME_NEW", &ECORE_X_ATOM_E_ILLUME_HOME_NEW }, | ||
230 | { "_E_ILLUME_HOME_DEL", &ECORE_X_ATOM_E_ILLUME_HOME_DEL }, | ||
231 | { "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG }, | ||
232 | { "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED }, | ||
233 | { "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START }, | ||
234 | { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END }, | ||
235 | { "_E_ILLUME_INDICATOR_GEOMETRY", | ||
236 | &ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY }, | ||
237 | { "_E_ILLUME_SOFTKEY_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY }, | ||
238 | { "_E_ILLUME_KEYBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY }, | ||
239 | { "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL }, | ||
240 | { "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE }, | ||
241 | { "_E_ILLUME_QUICKPANEL_STATE_TOGGLE", | ||
242 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE }, | ||
243 | { "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON }, | ||
244 | { "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF }, | ||
245 | { "_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR", | ||
246 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR }, | ||
247 | { "_E_ILLUME_QUICKPANEL_PRIORITY_MINOR", | ||
248 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR }, | ||
249 | { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, | ||
250 | { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", | ||
251 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, | ||
252 | |||
253 | { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER }, | ||
254 | { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE }, | ||
255 | { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED }, | ||
256 | { "_E_COMP_SYNC_BEGIN", &ECORE_X_ATOM_E_COMP_SYNC_BEGIN }, | ||
257 | { "_E_COMP_SYNC_END", &ECORE_X_ATOM_E_COMP_SYNC_END }, | ||
258 | { "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL }, | ||
259 | |||
260 | { "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH }, | ||
261 | { "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP }, | ||
262 | { "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP }, | ||
263 | { "_E_VIDEO_PARENT", &ECORE_X_ATOM_E_VIDEO_PARENT }, | ||
264 | { "_E_VIDEO_POSITION", &ECORE_X_ATOM_E_VIDEO_POSITION } | ||
265 | }; | ||
266 | |||
267 | void | ||
268 | _ecore_xcb_atoms_init(void) | ||
269 | { | ||
270 | int i = 0, num = 0; | ||
271 | |||
272 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
273 | CHECK_XCB_CONN; | ||
274 | |||
275 | num = (sizeof(atoms) / sizeof(Xcb_Atom)); | ||
276 | for (i = 0; i < num; i++) | ||
277 | { | ||
278 | cookies[i] = | ||
279 | xcb_intern_atom_unchecked(_ecore_xcb_conn, 0, | ||
280 | strlen(atoms[i].name), atoms[i].name); | ||
281 | } | ||
282 | } | ||
283 | |||
284 | void | ||
285 | _ecore_xcb_atoms_finalize(void) | ||
286 | { | ||
287 | int i = 0, num = 0; | ||
288 | |||
289 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
290 | CHECK_XCB_CONN; | ||
291 | |||
292 | num = (sizeof(atoms) / sizeof(Xcb_Atom)); | ||
293 | for (i = 0; i < num; i++) | ||
294 | { | ||
295 | xcb_intern_atom_reply_t *reply = NULL; | ||
296 | |||
297 | if (!(reply = xcb_intern_atom_reply(_ecore_xcb_conn, cookies[i], 0))) | ||
298 | continue; | ||
299 | *(atoms[i].atom) = reply->atom; | ||
300 | free(reply); | ||
301 | } | ||
302 | } | ||
303 | |||
304 | /** | ||
305 | * @defgroup Ecore_X_Atom_Group XCB Atom Functions | ||
306 | * | ||
307 | * Functions that operate on atoms | ||
308 | */ | ||
309 | |||
310 | /** | ||
311 | * Retrieves the atom value associated to a name. | ||
312 | * | ||
313 | * @param name Unused. | ||
314 | * @return Associated atom value. | ||
315 | * | ||
316 | * Retrieves the atom value associated to a name. The reply is the | ||
317 | * returned value of the function ecore_xcb_intern_atom_reply(). If | ||
318 | * @p reply is @c NULL, the NULL atom is returned. Otherwise, the atom | ||
319 | * associated to the name is returned. | ||
320 | * | ||
321 | * To use this function, you must call before, and in order, | ||
322 | * ecore_x_atom_get_prefetch(), which sends the InternAtom request, | ||
323 | * then ecore_x_atom_get_fetch(), which gets the reply. | ||
324 | * | ||
325 | * @ingroup Ecore_X_Atom_Group | ||
326 | */ | ||
327 | EAPI Ecore_X_Atom | ||
328 | ecore_x_atom_get(const char *name) | ||
329 | { | ||
330 | xcb_intern_atom_cookie_t cookie; | ||
331 | xcb_intern_atom_reply_t *reply; | ||
332 | Ecore_X_Atom a; | ||
333 | |||
334 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
335 | CHECK_XCB_CONN; | ||
336 | |||
337 | cookie = xcb_intern_atom_unchecked(_ecore_xcb_conn, 0, strlen(name), name); | ||
338 | reply = xcb_intern_atom_reply(_ecore_xcb_conn, cookie, NULL); | ||
339 | if (!reply) return XCB_ATOM_NONE; | ||
340 | a = reply->atom; | ||
341 | free(reply); | ||
342 | return a; | ||
343 | } | ||
344 | |||
345 | /** | ||
346 | * Retrieves the name of the given atom. | ||
347 | * | ||
348 | * @param atom | ||
349 | * @return The name of the atom. | ||
350 | * | ||
351 | * @ingroup Ecore_X_Atom_Group | ||
352 | */ | ||
353 | EAPI char * | ||
354 | ecore_x_atom_name_get(Ecore_X_Atom atom) | ||
355 | { | ||
356 | xcb_get_atom_name_cookie_t cookie; | ||
357 | xcb_get_atom_name_reply_t *reply; | ||
358 | char *name; | ||
359 | int len = 0; | ||
360 | |||
361 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
362 | CHECK_XCB_CONN; | ||
363 | |||
364 | cookie = xcb_get_atom_name_unchecked(_ecore_xcb_conn, atom); | ||
365 | reply = xcb_get_atom_name_reply(_ecore_xcb_conn, cookie, NULL); | ||
366 | if (!reply) return NULL; | ||
367 | len = xcb_get_atom_name_name_length(reply); | ||
368 | name = (char *)malloc(sizeof(char) * (len + 1)); | ||
369 | if (!name) | ||
370 | { | ||
371 | free(reply); | ||
372 | return NULL; | ||
373 | } | ||
374 | memcpy(name, xcb_get_atom_name_name(reply), len); | ||
375 | name[len] = '\0'; | ||
376 | |||
377 | free(reply); | ||
378 | return name; | ||
379 | } | ||
380 | |||
381 | EAPI void | ||
382 | ecore_x_atoms_get(const char **names, | ||
383 | int num, | ||
384 | Ecore_X_Atom *atoms) | ||
385 | { | ||
386 | xcb_intern_atom_cookie_t cookies[num]; | ||
387 | int i = 0; | ||
388 | |||
389 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
390 | CHECK_XCB_CONN; | ||
391 | |||
392 | for (i = 0; i < num; i++) | ||
393 | { | ||
394 | cookies[i] = | ||
395 | xcb_intern_atom_unchecked(_ecore_xcb_conn, 0, | ||
396 | strlen(names[i]), names[i]); | ||
397 | } | ||
398 | for (i = 0; i < num; i++) | ||
399 | { | ||
400 | xcb_intern_atom_reply_t *reply = NULL; | ||
401 | |||
402 | if (!(reply = xcb_intern_atom_reply(_ecore_xcb_conn, cookies[i], 0))) | ||
403 | continue; | ||
404 | atoms[i] = reply->atom; | ||
405 | free(reply); | ||
406 | } | ||
407 | } | ||
408 | |||