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