diff options
Diffstat (limited to '')
35 files changed, 1953 insertions, 1879 deletions
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in index e1026e5..27a2841 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in | |||
@@ -252,10 +252,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ | |||
252 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | 252 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ |
253 | PIXMAN_LIBS = @PIXMAN_LIBS@ | 253 | PIXMAN_LIBS = @PIXMAN_LIBS@ |
254 | PKG_CONFIG = @PKG_CONFIG@ | 254 | PKG_CONFIG = @PKG_CONFIG@ |
255 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
256 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
257 | POSUB = @POSUB@ | 255 | POSUB = @POSUB@ |
258 | RANLIB = @RANLIB@ | 256 | RANLIB = @RANLIB@ |
257 | SCIM_CFLAGS = @SCIM_CFLAGS@ | ||
258 | SCIM_LIBS = @SCIM_LIBS@ | ||
259 | SDL_CFLAGS = @SDL_CFLAGS@ | 259 | SDL_CFLAGS = @SDL_CFLAGS@ |
260 | SDL_CONFIG = @SDL_CONFIG@ | 260 | SDL_CONFIG = @SDL_CONFIG@ |
261 | SDL_LIBS = @SDL_LIBS@ | 261 | SDL_LIBS = @SDL_LIBS@ |
@@ -274,6 +274,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ | |||
274 | USE_NLS = @USE_NLS@ | 274 | USE_NLS = @USE_NLS@ |
275 | VERSION = @VERSION@ | 275 | VERSION = @VERSION@ |
276 | VMAJ = @VMAJ@ | 276 | VMAJ = @VMAJ@ |
277 | WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ | ||
278 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | ||
279 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | ||
280 | WAYLAND_LIBS = @WAYLAND_LIBS@ | ||
277 | WIN32_CFLAGS = @WIN32_CFLAGS@ | 281 | WIN32_CFLAGS = @WIN32_CFLAGS@ |
278 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ | 282 | WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ |
279 | WIN32_LIBS = @WIN32_LIBS@ | 283 | WIN32_LIBS = @WIN32_LIBS@ |
@@ -387,6 +391,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ | |||
387 | ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ | 391 | ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ |
388 | ecore_imf_evas_libs = @ecore_imf_evas_libs@ | 392 | ecore_imf_evas_libs = @ecore_imf_evas_libs@ |
389 | ecore_imf_libs = @ecore_imf_libs@ | 393 | ecore_imf_libs = @ecore_imf_libs@ |
394 | ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ | ||
395 | ecore_imf_scim_libs = @ecore_imf_scim_libs@ | ||
390 | ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ | 396 | ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ |
391 | ecore_imf_xim_libs = @ecore_imf_xim_libs@ | 397 | ecore_imf_xim_libs = @ecore_imf_xim_libs@ |
392 | ecore_input_cflags = @ecore_input_cflags@ | 398 | ecore_input_cflags = @ecore_input_cflags@ |
@@ -399,6 +405,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ | |||
399 | ecore_psl1ght_libs = @ecore_psl1ght_libs@ | 405 | ecore_psl1ght_libs = @ecore_psl1ght_libs@ |
400 | ecore_sdl_cflags = @ecore_sdl_cflags@ | 406 | ecore_sdl_cflags = @ecore_sdl_cflags@ |
401 | ecore_sdl_libs = @ecore_sdl_libs@ | 407 | ecore_sdl_libs = @ecore_sdl_libs@ |
408 | ecore_wayland_cflags = @ecore_wayland_cflags@ | ||
409 | ecore_wayland_libs = @ecore_wayland_libs@ | ||
402 | ecore_win32_cflags = @ecore_win32_cflags@ | 410 | ecore_win32_cflags = @ecore_win32_cflags@ |
403 | ecore_win32_libs = @ecore_win32_libs@ | 411 | ecore_win32_libs = @ecore_win32_libs@ |
404 | ecore_wince_cflags = @ecore_wince_cflags@ | 412 | ecore_wince_cflags = @ecore_wince_cflags@ |
@@ -443,12 +451,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ | |||
443 | requirements_ecore_file = @requirements_ecore_file@ | 451 | requirements_ecore_file = @requirements_ecore_file@ |
444 | requirements_ecore_imf = @requirements_ecore_imf@ | 452 | requirements_ecore_imf = @requirements_ecore_imf@ |
445 | requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ | 453 | requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ |
454 | requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ | ||
446 | requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ | 455 | requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ |
447 | requirements_ecore_input = @requirements_ecore_input@ | 456 | requirements_ecore_input = @requirements_ecore_input@ |
448 | requirements_ecore_input_evas = @requirements_ecore_input_evas@ | 457 | requirements_ecore_input_evas = @requirements_ecore_input_evas@ |
449 | requirements_ecore_ipc = @requirements_ecore_ipc@ | 458 | requirements_ecore_ipc = @requirements_ecore_ipc@ |
450 | requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ | 459 | requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ |
451 | requirements_ecore_sdl = @requirements_ecore_sdl@ | 460 | requirements_ecore_sdl = @requirements_ecore_sdl@ |
461 | requirements_ecore_wayland = @requirements_ecore_wayland@ | ||
452 | requirements_ecore_win32 = @requirements_ecore_win32@ | 462 | requirements_ecore_win32 = @requirements_ecore_win32@ |
453 | requirements_ecore_wince = @requirements_ecore_wince@ | 463 | requirements_ecore_wince = @requirements_ecore_wince@ |
454 | requirements_ecore_x = @requirements_ecore_x@ | 464 | requirements_ecore_x = @requirements_ecore_x@ |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c index 844ab04..6d275bc 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x.c | |||
@@ -19,9 +19,9 @@ | |||
19 | #include "Ecore_X_Atoms.h" | 19 | #include "Ecore_X_Atoms.h" |
20 | #include "Ecore_Input.h" | 20 | #include "Ecore_Input.h" |
21 | 21 | ||
22 | static Eina_Bool _ecore_x_fd_handler(void *data, | 22 | static Eina_Bool _ecore_x_fd_handler(void *data, |
23 | Ecore_Fd_Handler *fd_handler); | 23 | Ecore_Fd_Handler *fd_handler); |
24 | static Eina_Bool _ecore_x_fd_handler_buf(void *data, | 24 | static Eina_Bool _ecore_x_fd_handler_buf(void *data, |
25 | Ecore_Fd_Handler *fd_handler); | 25 | Ecore_Fd_Handler *fd_handler); |
26 | static int _ecore_x_key_mask_get(KeySym sym); | 26 | static int _ecore_x_key_mask_get(KeySym sym); |
27 | static int _ecore_x_event_modifier(unsigned int state); | 27 | static int _ecore_x_event_modifier(unsigned int state); |
@@ -139,9 +139,9 @@ EAPI int ECORE_X_LOCK_SHIFT = 0; | |||
139 | #ifdef LOGRT | 139 | #ifdef LOGRT |
140 | static double t0 = 0.0; | 140 | static double t0 = 0.0; |
141 | static Status (*_logrt_real_reply)(Display *disp, | 141 | static Status (*_logrt_real_reply)(Display *disp, |
142 | void *rep, | 142 | void *rep, |
143 | int extra, | 143 | int extra, |
144 | Bool discard) = NULL; | 144 | Bool discard) = NULL; |
145 | static void | 145 | static void |
146 | _logrt_init(void) | 146 | _logrt_init(void) |
147 | { | 147 | { |
@@ -159,13 +159,13 @@ _logrt_init(void) | |||
159 | 159 | ||
160 | _logrt_real_reply = dlsym(lib, "_XReply"); | 160 | _logrt_real_reply = dlsym(lib, "_XReply"); |
161 | t0 = ecore_time_get(); | 161 | t0 = ecore_time_get(); |
162 | } /* _logrt_init */ | 162 | } |
163 | 163 | ||
164 | Status | 164 | Status |
165 | _XReply(Display *disp, | 165 | _XReply(Display *disp, |
166 | void *rep, | 166 | void *rep, |
167 | int extra, | 167 | int extra, |
168 | Bool discard) | 168 | Bool discard) |
169 | { | 169 | { |
170 | void *bt[128]; | 170 | void *bt[128]; |
171 | int i, n; | 171 | int i, n; |
@@ -207,7 +207,7 @@ _XReply(Display *disp, | |||
207 | 207 | ||
208 | // fixme: logme | 208 | // fixme: logme |
209 | return _logrt_real_reply(disp, rep, extra, discard); | 209 | return _logrt_real_reply(disp, rep, extra, discard); |
210 | } /* _XReply */ | 210 | } |
211 | 211 | ||
212 | #endif /* ifdef LOGRT */ | 212 | #endif /* ifdef LOGRT */ |
213 | 213 | ||
@@ -215,35 +215,35 @@ void | |||
215 | _ecore_x_modifiers_get(void) | 215 | _ecore_x_modifiers_get(void) |
216 | { | 216 | { |
217 | /* everything has these... unless its like a pda... :) */ | 217 | /* everything has these... unless its like a pda... :) */ |
218 | ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L); | 218 | ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L); |
219 | ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L); | 219 | ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L); |
220 | 220 | ||
221 | /* apple's xdarwin has no alt!!!! */ | 221 | /* apple's xdarwin has no alt!!!! */ |
222 | ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L); | 222 | ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L); |
223 | if (!ECORE_X_MODIFIER_ALT) | 223 | if (!ECORE_X_MODIFIER_ALT) |
224 | ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L); | 224 | ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L); |
225 | 225 | ||
226 | if (!ECORE_X_MODIFIER_ALT) | 226 | if (!ECORE_X_MODIFIER_ALT) |
227 | ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L); | 227 | ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L); |
228 | 228 | ||
229 | /* the windows key... a valid modifier :) */ | 229 | /* the windows key... a valid modifier :) */ |
230 | ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L); | 230 | ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L); |
231 | if (!ECORE_X_MODIFIER_WIN) | 231 | if (!ECORE_X_MODIFIER_WIN) |
232 | ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch); | 232 | ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch); |
233 | 233 | ||
234 | if (!ECORE_X_MODIFIER_WIN) | 234 | if (!ECORE_X_MODIFIER_WIN) |
235 | ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L); | 235 | ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L); |
236 | 236 | ||
237 | if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT) | 237 | if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT) |
238 | ECORE_X_MODIFIER_WIN = 0; | 238 | ECORE_X_MODIFIER_WIN = 0; |
239 | 239 | ||
240 | if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL) | 240 | if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL) |
241 | ECORE_X_MODIFIER_ALT = 0; | 241 | ECORE_X_MODIFIER_ALT = 0; |
242 | 242 | ||
243 | ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock); | 243 | ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock); |
244 | ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock); | 244 | ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock); |
245 | ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock); | 245 | ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock); |
246 | ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock); | 246 | ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock); |
247 | } | 247 | } |
248 | 248 | ||
249 | /** | 249 | /** |
@@ -300,7 +300,7 @@ ecore_x_init(const char *name) | |||
300 | eina_init(); | 300 | eina_init(); |
301 | _ecore_xlib_log_dom = eina_log_domain_register | 301 | _ecore_xlib_log_dom = eina_log_domain_register |
302 | ("ecore_x", ECORE_XLIB_DEFAULT_LOG_COLOR); | 302 | ("ecore_x", ECORE_XLIB_DEFAULT_LOG_COLOR); |
303 | if(_ecore_xlib_log_dom < 0) | 303 | if (_ecore_xlib_log_dom < 0) |
304 | { | 304 | { |
305 | EINA_LOG_ERR( | 305 | EINA_LOG_ERR( |
306 | "Impossible to create a log domain for the Ecore Xlib module."); | 306 | "Impossible to create a log domain for the Ecore Xlib module."); |
@@ -375,7 +375,7 @@ ecore_x_init(const char *name) | |||
375 | 375 | ||
376 | #ifdef ECORE_XGESTURE | 376 | #ifdef ECORE_XGESTURE |
377 | if (XGestureQueryExtension(_ecore_x_disp, &gesture_base, &gesture_err_base)) | 377 | if (XGestureQueryExtension(_ecore_x_disp, &gesture_base, &gesture_err_base)) |
378 | _ecore_x_event_gesture_id = gesture_base; | 378 | _ecore_x_event_gesture_id = gesture_base; |
379 | 379 | ||
380 | ECORE_X_EVENT_HANDLERS_GROW(gesture_base, GestureNumberEvents); | 380 | ECORE_X_EVENT_HANDLERS_GROW(gesture_base, GestureNumberEvents); |
381 | #endif /* ifdef ECORE_XGESTURE */ | 381 | #endif /* ifdef ECORE_XGESTURE */ |
@@ -497,20 +497,20 @@ ecore_x_init(const char *name) | |||
497 | #ifdef ECORE_XGESTURE | 497 | #ifdef ECORE_XGESTURE |
498 | if (_ecore_x_event_gesture_id) | 498 | if (_ecore_x_event_gesture_id) |
499 | { | 499 | { |
500 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyFlick] = | 500 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyFlick] = |
501 | _ecore_x_event_handle_gesture_notify_flick; | 501 | _ecore_x_event_handle_gesture_notify_flick; |
502 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPan] = | 502 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPan] = |
503 | _ecore_x_event_handle_gesture_notify_pan; | 503 | _ecore_x_event_handle_gesture_notify_pan; |
504 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPinchRotation] = | 504 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyPinchRotation] = |
505 | _ecore_x_event_handle_gesture_notify_pinchrotation; | 505 | _ecore_x_event_handle_gesture_notify_pinchrotation; |
506 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTap] = | 506 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTap] = |
507 | _ecore_x_event_handle_gesture_notify_tap; | 507 | _ecore_x_event_handle_gesture_notify_tap; |
508 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTapNHold] = | 508 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyTapNHold] = |
509 | _ecore_x_event_handle_gesture_notify_tapnhold; | 509 | _ecore_x_event_handle_gesture_notify_tapnhold; |
510 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyHold] = | 510 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyHold] = |
511 | _ecore_x_event_handle_gesture_notify_hold; | 511 | _ecore_x_event_handle_gesture_notify_hold; |
512 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyGroup] = | 512 | _ecore_x_event_handlers[_ecore_x_event_gesture_id + GestureNotifyGroup] = |
513 | _ecore_x_event_handle_gesture_notify_group; | 513 | _ecore_x_event_handle_gesture_notify_group; |
514 | } | 514 | } |
515 | 515 | ||
516 | #endif /* ifdef ECORE_XGESTURE */ | 516 | #endif /* ifdef ECORE_XGESTURE */ |
@@ -641,7 +641,7 @@ shutdown_eina: | |||
641 | eina_shutdown(); | 641 | eina_shutdown(); |
642 | 642 | ||
643 | return --_ecore_x_init_count; | 643 | return --_ecore_x_init_count; |
644 | } /* ecore_x_init */ | 644 | } |
645 | 645 | ||
646 | static int | 646 | static int |
647 | _ecore_x_shutdown(int close_display) | 647 | _ecore_x_shutdown(int close_display) |
@@ -683,7 +683,7 @@ _ecore_x_shutdown(int close_display) | |||
683 | eina_shutdown(); | 683 | eina_shutdown(); |
684 | 684 | ||
685 | return _ecore_x_init_count; | 685 | return _ecore_x_init_count; |
686 | } /* _ecore_x_shutdown */ | 686 | } |
687 | 687 | ||
688 | /** | 688 | /** |
689 | * Shuts down the Ecore X library. | 689 | * Shuts down the Ecore X library. |
@@ -699,7 +699,7 @@ EAPI int | |||
699 | ecore_x_shutdown(void) | 699 | ecore_x_shutdown(void) |
700 | { | 700 | { |
701 | return _ecore_x_shutdown(1); | 701 | return _ecore_x_shutdown(1); |
702 | } /* ecore_x_shutdown */ | 702 | } |
703 | 703 | ||
704 | /** | 704 | /** |
705 | * Shuts down the Ecore X library. | 705 | * Shuts down the Ecore X library. |
@@ -712,7 +712,7 @@ EAPI int | |||
712 | ecore_x_disconnect(void) | 712 | ecore_x_disconnect(void) |
713 | { | 713 | { |
714 | return _ecore_x_shutdown(0); | 714 | return _ecore_x_shutdown(0); |
715 | } /* ecore_x_disconnect */ | 715 | } |
716 | 716 | ||
717 | /** | 717 | /** |
718 | * @defgroup Ecore_X_Display_Attr_Group X Display Attributes | 718 | * @defgroup Ecore_X_Display_Attr_Group X Display Attributes |
@@ -729,7 +729,7 @@ EAPI Ecore_X_Display * | |||
729 | ecore_x_display_get(void) | 729 | ecore_x_display_get(void) |
730 | { | 730 | { |
731 | return (Ecore_X_Display *)_ecore_x_disp; | 731 | return (Ecore_X_Display *)_ecore_x_disp; |
732 | } /* ecore_x_display_get */ | 732 | } |
733 | 733 | ||
734 | /** | 734 | /** |
735 | * Retrieves the X display file descriptor. | 735 | * Retrieves the X display file descriptor. |
@@ -741,7 +741,7 @@ ecore_x_fd_get(void) | |||
741 | { | 741 | { |
742 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 742 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
743 | return ConnectionNumber(_ecore_x_disp); | 743 | return ConnectionNumber(_ecore_x_disp); |
744 | } /* ecore_x_fd_get */ | 744 | } |
745 | 745 | ||
746 | /** | 746 | /** |
747 | * Retrieves the Ecore_X_Screen handle used for the current X connection. | 747 | * Retrieves the Ecore_X_Screen handle used for the current X connection. |
@@ -753,7 +753,7 @@ ecore_x_default_screen_get(void) | |||
753 | { | 753 | { |
754 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 754 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
755 | return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp); | 755 | return (Ecore_X_Screen *)DefaultScreenOfDisplay(_ecore_x_disp); |
756 | } /* ecore_x_default_screen_get */ | 756 | } |
757 | 757 | ||
758 | /** | 758 | /** |
759 | * Retrieves the size of an Ecore_X_Screen. | 759 | * Retrieves the size of an Ecore_X_Screen. |
@@ -767,8 +767,8 @@ ecore_x_default_screen_get(void) | |||
767 | */ | 767 | */ |
768 | EAPI void | 768 | EAPI void |
769 | ecore_x_screen_size_get(const Ecore_X_Screen *screen, | 769 | ecore_x_screen_size_get(const Ecore_X_Screen *screen, |
770 | int *w, | 770 | int *w, |
771 | int *h) | 771 | int *h) |
772 | { | 772 | { |
773 | Screen *s = (Screen *)screen; | 773 | Screen *s = (Screen *)screen; |
774 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 774 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -840,7 +840,7 @@ ecore_x_double_click_time_set(double t) | |||
840 | t = 0.0; | 840 | t = 0.0; |
841 | 841 | ||
842 | _ecore_x_double_click_time = t; | 842 | _ecore_x_double_click_time = t; |
843 | } /* ecore_x_double_click_time_set */ | 843 | } |
844 | 844 | ||
845 | /** | 845 | /** |
846 | * Retrieves the double and triple click flag timeout. | 846 | * Retrieves the double and triple click flag timeout. |
@@ -854,7 +854,7 @@ EAPI double | |||
854 | ecore_x_double_click_time_get(void) | 854 | ecore_x_double_click_time_get(void) |
855 | { | 855 | { |
856 | return _ecore_x_double_click_time; | 856 | return _ecore_x_double_click_time; |
857 | } /* ecore_x_double_click_time_get */ | 857 | } |
858 | 858 | ||
859 | /** | 859 | /** |
860 | * @defgroup Ecore_X_Flush_Group X Synchronization Functions | 860 | * @defgroup Ecore_X_Flush_Group X Synchronization Functions |
@@ -872,7 +872,7 @@ ecore_x_flush(void) | |||
872 | { | 872 | { |
873 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 873 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
874 | XFlush(_ecore_x_disp); | 874 | XFlush(_ecore_x_disp); |
875 | } /* ecore_x_flush */ | 875 | } |
876 | 876 | ||
877 | /** | 877 | /** |
878 | * Flushes the command buffer and waits until all requests have been | 878 | * Flushes the command buffer and waits until all requests have been |
@@ -884,7 +884,7 @@ ecore_x_sync(void) | |||
884 | { | 884 | { |
885 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 885 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
886 | XSync(_ecore_x_disp, False); | 886 | XSync(_ecore_x_disp, False); |
887 | } /* ecore_x_sync */ | 887 | } |
888 | 888 | ||
889 | /** | 889 | /** |
890 | * Kill all clients with subwindows under a given window. | 890 | * Kill all clients with subwindows under a given window. |
@@ -920,7 +920,7 @@ ecore_x_killall(Ecore_X_Window root) | |||
920 | } | 920 | } |
921 | XUngrabServer(_ecore_x_disp); | 921 | XUngrabServer(_ecore_x_disp); |
922 | XSync(_ecore_x_disp, False); | 922 | XSync(_ecore_x_disp, False); |
923 | } /* ecore_x_killall */ | 923 | } |
924 | 924 | ||
925 | /** | 925 | /** |
926 | * Kill a specific client | 926 | * Kill a specific client |
@@ -934,7 +934,7 @@ ecore_x_kill(Ecore_X_Window win) | |||
934 | { | 934 | { |
935 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 935 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
936 | XKillClient(_ecore_x_disp, win); | 936 | XKillClient(_ecore_x_disp, win); |
937 | } /* ecore_x_kill */ | 937 | } |
938 | 938 | ||
939 | /** | 939 | /** |
940 | * Return the last event time | 940 | * Return the last event time |
@@ -943,7 +943,7 @@ EAPI Ecore_X_Time | |||
943 | ecore_x_current_time_get(void) | 943 | ecore_x_current_time_get(void) |
944 | { | 944 | { |
945 | return _ecore_x_event_last_time; | 945 | return _ecore_x_event_last_time; |
946 | } /* ecore_x_current_time_get */ | 946 | } |
947 | 947 | ||
948 | /** | 948 | /** |
949 | * Return the screen DPI | 949 | * Return the screen DPI |
@@ -965,7 +965,7 @@ ecore_x_dpi_get(void) | |||
965 | return 75; | 965 | return 75; |
966 | 966 | ||
967 | return (((s->width * 254) / s->mwidth) + 5) / 10; | 967 | return (((s->width * 254) / s->mwidth) + 5) / 10; |
968 | } /* ecore_x_dpi_get */ | 968 | } |
969 | 969 | ||
970 | /** | 970 | /** |
971 | * Invoke the standard system beep to alert users | 971 | * Invoke the standard system beep to alert users |
@@ -989,10 +989,10 @@ ecore_x_bell(int percent) | |||
989 | return EINA_FALSE; | 989 | return EINA_FALSE; |
990 | 990 | ||
991 | return EINA_TRUE; | 991 | return EINA_TRUE; |
992 | } /* ecore_x_bell */ | 992 | } |
993 | 993 | ||
994 | static Eina_Bool | 994 | static Eina_Bool |
995 | _ecore_x_fd_handler(void *data, | 995 | _ecore_x_fd_handler(void *data, |
996 | Ecore_Fd_Handler *fd_handler __UNUSED__) | 996 | Ecore_Fd_Handler *fd_handler __UNUSED__) |
997 | { | 997 | { |
998 | Display *d; | 998 | Display *d; |
@@ -1021,10 +1021,10 @@ _ecore_x_fd_handler(void *data, | |||
1021 | } | 1021 | } |
1022 | } | 1022 | } |
1023 | return ECORE_CALLBACK_RENEW; | 1023 | return ECORE_CALLBACK_RENEW; |
1024 | } /* _ecore_x_fd_handler */ | 1024 | } |
1025 | 1025 | ||
1026 | static Eina_Bool | 1026 | static Eina_Bool |
1027 | _ecore_x_fd_handler_buf(void *data, | 1027 | _ecore_x_fd_handler_buf(void *data, |
1028 | Ecore_Fd_Handler *fd_handler __UNUSED__) | 1028 | Ecore_Fd_Handler *fd_handler __UNUSED__) |
1029 | { | 1029 | { |
1030 | Display *d; | 1030 | Display *d; |
@@ -1034,7 +1034,7 @@ _ecore_x_fd_handler_buf(void *data, | |||
1034 | return ECORE_CALLBACK_RENEW; | 1034 | return ECORE_CALLBACK_RENEW; |
1035 | 1035 | ||
1036 | return ECORE_CALLBACK_CANCEL; | 1036 | return ECORE_CALLBACK_CANCEL; |
1037 | } /* _ecore_x_fd_handler_buf */ | 1037 | } |
1038 | 1038 | ||
1039 | static int | 1039 | static int |
1040 | _ecore_x_key_mask_get(KeySym sym) | 1040 | _ecore_x_key_mask_get(KeySym sym) |
@@ -1080,7 +1080,7 @@ _ecore_x_key_mask_get(KeySym sym) | |||
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | return 0; | 1082 | return 0; |
1083 | } /* _ecore_x_key_mask_get */ | 1083 | } |
1084 | 1084 | ||
1085 | /*****************************************************************************/ | 1085 | /*****************************************************************************/ |
1086 | /*****************************************************************************/ | 1086 | /*****************************************************************************/ |
@@ -1132,7 +1132,7 @@ ecore_x_window_root_list(int *num_ret) | |||
1132 | overlap++; | 1132 | overlap++; |
1133 | } | 1133 | } |
1134 | } | 1134 | } |
1135 | roots = malloc((num - overlap) * sizeof(Window)); | 1135 | roots = malloc(MAX((num - overlap) * sizeof(Window), 1)); |
1136 | if (roots) | 1136 | if (roots) |
1137 | { | 1137 | { |
1138 | int k; | 1138 | int k; |
@@ -1195,7 +1195,7 @@ ecore_x_window_root_list(int *num_ret) | |||
1195 | roots[i] = RootWindow(_ecore_x_disp, i); | 1195 | roots[i] = RootWindow(_ecore_x_disp, i); |
1196 | #endif /* ifdef ECORE_XPRINT */ | 1196 | #endif /* ifdef ECORE_XPRINT */ |
1197 | return roots; | 1197 | return roots; |
1198 | } /* ecore_x_window_root_list */ | 1198 | } |
1199 | 1199 | ||
1200 | EAPI Ecore_X_Window | 1200 | EAPI Ecore_X_Window |
1201 | ecore_x_window_root_first_get(void) | 1201 | ecore_x_window_root_first_get(void) |
@@ -1217,7 +1217,7 @@ ecore_x_window_root_first_get(void) | |||
1217 | free(roots); | 1217 | free(roots); |
1218 | return root; | 1218 | return root; |
1219 | */ | 1219 | */ |
1220 | } /* ecore_x_window_root_first_get */ | 1220 | } |
1221 | 1221 | ||
1222 | static void _ecore_x_window_manage_error(void *data); | 1222 | static void _ecore_x_window_manage_error(void *data); |
1223 | 1223 | ||
@@ -1228,7 +1228,7 @@ _ecore_x_window_manage_error(void *data __UNUSED__) | |||
1228 | if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) && | 1228 | if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) && |
1229 | (ecore_x_error_code_get() == BadAccess)) | 1229 | (ecore_x_error_code_get() == BadAccess)) |
1230 | _ecore_x_window_manage_failed = 1; | 1230 | _ecore_x_window_manage_failed = 1; |
1231 | } /* _ecore_x_window_manage_error */ | 1231 | } |
1232 | 1232 | ||
1233 | EAPI Eina_Bool | 1233 | EAPI Eina_Bool |
1234 | ecore_x_window_manage(Ecore_X_Window win) | 1234 | ecore_x_window_manage(Ecore_X_Window win) |
@@ -1262,7 +1262,7 @@ ecore_x_window_manage(Ecore_X_Window win) | |||
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | return EINA_TRUE; | 1264 | return EINA_TRUE; |
1265 | } /* ecore_x_window_manage */ | 1265 | } |
1266 | 1266 | ||
1267 | EAPI void | 1267 | EAPI void |
1268 | ecore_x_window_container_manage(Ecore_X_Window win) | 1268 | ecore_x_window_container_manage(Ecore_X_Window win) |
@@ -1271,7 +1271,7 @@ ecore_x_window_container_manage(Ecore_X_Window win) | |||
1271 | XSelectInput(_ecore_x_disp, win, | 1271 | XSelectInput(_ecore_x_disp, win, |
1272 | SubstructureRedirectMask | | 1272 | SubstructureRedirectMask | |
1273 | SubstructureNotifyMask); | 1273 | SubstructureNotifyMask); |
1274 | } /* ecore_x_window_container_manage */ | 1274 | } |
1275 | 1275 | ||
1276 | EAPI void | 1276 | EAPI void |
1277 | ecore_x_window_client_manage(Ecore_X_Window win) | 1277 | ecore_x_window_client_manage(Ecore_X_Window win) |
@@ -1287,7 +1287,7 @@ ecore_x_window_client_manage(Ecore_X_Window win) | |||
1287 | SubstructureNotifyMask | 1287 | SubstructureNotifyMask |
1288 | ); | 1288 | ); |
1289 | XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); | 1289 | XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); |
1290 | } /* ecore_x_window_client_manage */ | 1290 | } |
1291 | 1291 | ||
1292 | EAPI void | 1292 | EAPI void |
1293 | ecore_x_window_sniff(Ecore_X_Window win) | 1293 | ecore_x_window_sniff(Ecore_X_Window win) |
@@ -1296,7 +1296,7 @@ ecore_x_window_sniff(Ecore_X_Window win) | |||
1296 | XSelectInput(_ecore_x_disp, win, | 1296 | XSelectInput(_ecore_x_disp, win, |
1297 | PropertyChangeMask | | 1297 | PropertyChangeMask | |
1298 | SubstructureNotifyMask); | 1298 | SubstructureNotifyMask); |
1299 | } /* ecore_x_window_sniff */ | 1299 | } |
1300 | 1300 | ||
1301 | EAPI void | 1301 | EAPI void |
1302 | ecore_x_window_client_sniff(Ecore_X_Window win) | 1302 | ecore_x_window_client_sniff(Ecore_X_Window win) |
@@ -1310,10 +1310,10 @@ ecore_x_window_client_sniff(Ecore_X_Window win) | |||
1310 | StructureNotifyMask | | 1310 | StructureNotifyMask | |
1311 | SubstructureNotifyMask); | 1311 | SubstructureNotifyMask); |
1312 | XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); | 1312 | XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); |
1313 | } /* ecore_x_window_client_sniff */ | 1313 | } |
1314 | 1314 | ||
1315 | EAPI Eina_Bool | 1315 | EAPI Eina_Bool |
1316 | ecore_x_window_attributes_get(Ecore_X_Window win, | 1316 | ecore_x_window_attributes_get(Ecore_X_Window win, |
1317 | Ecore_X_Window_Attributes *att_ret) | 1317 | Ecore_X_Window_Attributes *att_ret) |
1318 | { | 1318 | { |
1319 | XWindowAttributes att; | 1319 | XWindowAttributes att; |
@@ -1353,25 +1353,25 @@ ecore_x_window_attributes_get(Ecore_X_Window win, | |||
1353 | att_ret->colormap = att.colormap; | 1353 | att_ret->colormap = att.colormap; |
1354 | att_ret->visual = att.visual; | 1354 | att_ret->visual = att.visual; |
1355 | return EINA_TRUE; | 1355 | return EINA_TRUE; |
1356 | } /* ecore_x_window_attributes_get */ | 1356 | } |
1357 | 1357 | ||
1358 | EAPI void | 1358 | EAPI void |
1359 | ecore_x_window_save_set_add(Ecore_X_Window win) | 1359 | ecore_x_window_save_set_add(Ecore_X_Window win) |
1360 | { | 1360 | { |
1361 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1361 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1362 | XAddToSaveSet(_ecore_x_disp, win); | 1362 | XAddToSaveSet(_ecore_x_disp, win); |
1363 | } /* ecore_x_window_save_set_add */ | 1363 | } |
1364 | 1364 | ||
1365 | EAPI void | 1365 | EAPI void |
1366 | ecore_x_window_save_set_del(Ecore_X_Window win) | 1366 | ecore_x_window_save_set_del(Ecore_X_Window win) |
1367 | { | 1367 | { |
1368 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1368 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1369 | XRemoveFromSaveSet(_ecore_x_disp, win); | 1369 | XRemoveFromSaveSet(_ecore_x_disp, win); |
1370 | } /* ecore_x_window_save_set_del */ | 1370 | } |
1371 | 1371 | ||
1372 | EAPI Ecore_X_Window * | 1372 | EAPI Ecore_X_Window * |
1373 | ecore_x_window_children_get(Ecore_X_Window win, | 1373 | ecore_x_window_children_get(Ecore_X_Window win, |
1374 | int *num) | 1374 | int *num) |
1375 | { | 1375 | { |
1376 | Ecore_X_Window *windows = NULL; | 1376 | Ecore_X_Window *windows = NULL; |
1377 | Window root_ret = 0, parent_ret = 0, *children_ret = NULL; | 1377 | Window root_ret = 0, parent_ret = 0, *children_ret = NULL; |
@@ -1398,7 +1398,7 @@ ecore_x_window_children_get(Ecore_X_Window win, | |||
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | return windows; | 1400 | return windows; |
1401 | } /* ecore_x_window_children_get */ | 1401 | } |
1402 | 1402 | ||
1403 | EAPI Eina_Bool | 1403 | EAPI Eina_Bool |
1404 | ecore_x_pointer_control_set(int accel_num, | 1404 | ecore_x_pointer_control_set(int accel_num, |
@@ -1408,7 +1408,7 @@ ecore_x_pointer_control_set(int accel_num, | |||
1408 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1408 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1409 | return XChangePointerControl(_ecore_x_disp, 1, 1, | 1409 | return XChangePointerControl(_ecore_x_disp, 1, 1, |
1410 | accel_num, accel_denom, threshold) ? EINA_TRUE : EINA_FALSE; | 1410 | accel_num, accel_denom, threshold) ? EINA_TRUE : EINA_FALSE; |
1411 | } /* ecore_x_pointer_control_set */ | 1411 | } |
1412 | 1412 | ||
1413 | EAPI Eina_Bool | 1413 | EAPI Eina_Bool |
1414 | ecore_x_pointer_control_get(int *accel_num, | 1414 | ecore_x_pointer_control_get(int *accel_num, |
@@ -1418,23 +1418,23 @@ ecore_x_pointer_control_get(int *accel_num, | |||
1418 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1418 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1419 | return XGetPointerControl(_ecore_x_disp, | 1419 | return XGetPointerControl(_ecore_x_disp, |
1420 | accel_num, accel_denom, threshold) ? EINA_TRUE : EINA_FALSE; | 1420 | accel_num, accel_denom, threshold) ? EINA_TRUE : EINA_FALSE; |
1421 | } /* ecore_x_pointer_control_get */ | 1421 | } |
1422 | 1422 | ||
1423 | EAPI Eina_Bool | 1423 | EAPI Eina_Bool |
1424 | ecore_x_pointer_mapping_set(unsigned char *map, | 1424 | ecore_x_pointer_mapping_set(unsigned char *map, |
1425 | int nmap) | 1425 | int nmap) |
1426 | { | 1426 | { |
1427 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1427 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1428 | return XSetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE; | 1428 | return XSetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE; |
1429 | } /* ecore_x_pointer_mapping_set */ | 1429 | } |
1430 | 1430 | ||
1431 | EAPI Eina_Bool | 1431 | EAPI Eina_Bool |
1432 | ecore_x_pointer_mapping_get(unsigned char *map, | 1432 | ecore_x_pointer_mapping_get(unsigned char *map, |
1433 | int nmap) | 1433 | int nmap) |
1434 | { | 1434 | { |
1435 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1435 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1436 | return XGetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE; | 1436 | return XGetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE; |
1437 | } /* ecore_x_pointer_mapping_get */ | 1437 | } |
1438 | 1438 | ||
1439 | EAPI Eina_Bool | 1439 | EAPI Eina_Bool |
1440 | ecore_x_pointer_grab(Ecore_X_Window win) | 1440 | ecore_x_pointer_grab(Ecore_X_Window win) |
@@ -1448,7 +1448,7 @@ ecore_x_pointer_grab(Ecore_X_Window win) | |||
1448 | return EINA_TRUE; | 1448 | return EINA_TRUE; |
1449 | 1449 | ||
1450 | return EINA_FALSE; | 1450 | return EINA_FALSE; |
1451 | } /* ecore_x_pointer_grab */ | 1451 | } |
1452 | 1452 | ||
1453 | EAPI Eina_Bool | 1453 | EAPI Eina_Bool |
1454 | ecore_x_pointer_confine_grab(Ecore_X_Window win) | 1454 | ecore_x_pointer_confine_grab(Ecore_X_Window win) |
@@ -1462,23 +1462,23 @@ ecore_x_pointer_confine_grab(Ecore_X_Window win) | |||
1462 | return EINA_TRUE; | 1462 | return EINA_TRUE; |
1463 | 1463 | ||
1464 | return EINA_FALSE; | 1464 | return EINA_FALSE; |
1465 | } /* ecore_x_pointer_confine_grab */ | 1465 | } |
1466 | 1466 | ||
1467 | EAPI void | 1467 | EAPI void |
1468 | ecore_x_pointer_ungrab(void) | 1468 | ecore_x_pointer_ungrab(void) |
1469 | { | 1469 | { |
1470 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1470 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1471 | XUngrabPointer(_ecore_x_disp, CurrentTime); | 1471 | XUngrabPointer(_ecore_x_disp, CurrentTime); |
1472 | } /* ecore_x_pointer_ungrab */ | 1472 | } |
1473 | 1473 | ||
1474 | EAPI Eina_Bool | 1474 | EAPI Eina_Bool |
1475 | ecore_x_pointer_warp(Ecore_X_Window win, | 1475 | ecore_x_pointer_warp(Ecore_X_Window win, |
1476 | int x, | 1476 | int x, |
1477 | int y) | 1477 | int y) |
1478 | { | 1478 | { |
1479 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1479 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1480 | return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y) ? EINA_TRUE : EINA_FALSE; | 1480 | return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y) ? EINA_TRUE : EINA_FALSE; |
1481 | } /* ecore_x_pointer_warp */ | 1481 | } |
1482 | 1482 | ||
1483 | EAPI Eina_Bool | 1483 | EAPI Eina_Bool |
1484 | ecore_x_keyboard_grab(Ecore_X_Window win) | 1484 | ecore_x_keyboard_grab(Ecore_X_Window win) |
@@ -1490,14 +1490,14 @@ ecore_x_keyboard_grab(Ecore_X_Window win) | |||
1490 | return EINA_TRUE; | 1490 | return EINA_TRUE; |
1491 | 1491 | ||
1492 | return EINA_FALSE; | 1492 | return EINA_FALSE; |
1493 | } /* ecore_x_keyboard_grab */ | 1493 | } |
1494 | 1494 | ||
1495 | EAPI void | 1495 | EAPI void |
1496 | ecore_x_keyboard_ungrab(void) | 1496 | ecore_x_keyboard_ungrab(void) |
1497 | { | 1497 | { |
1498 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1498 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1499 | XUngrabKeyboard(_ecore_x_disp, CurrentTime); | 1499 | XUngrabKeyboard(_ecore_x_disp, CurrentTime); |
1500 | } /* ecore_x_keyboard_ungrab */ | 1500 | } |
1501 | 1501 | ||
1502 | EAPI void | 1502 | EAPI void |
1503 | ecore_x_grab(void) | 1503 | ecore_x_grab(void) |
@@ -1506,7 +1506,7 @@ ecore_x_grab(void) | |||
1506 | _ecore_x_grab_count++; | 1506 | _ecore_x_grab_count++; |
1507 | if (_ecore_x_grab_count == 1) | 1507 | if (_ecore_x_grab_count == 1) |
1508 | XGrabServer(_ecore_x_disp); | 1508 | XGrabServer(_ecore_x_disp); |
1509 | } /* ecore_x_grab */ | 1509 | } |
1510 | 1510 | ||
1511 | EAPI void | 1511 | EAPI void |
1512 | ecore_x_ungrab(void) | 1512 | ecore_x_ungrab(void) |
@@ -1518,32 +1518,32 @@ ecore_x_ungrab(void) | |||
1518 | 1518 | ||
1519 | if (_ecore_x_grab_count == 0) | 1519 | if (_ecore_x_grab_count == 0) |
1520 | XUngrabServer(_ecore_x_disp); | 1520 | XUngrabServer(_ecore_x_disp); |
1521 | } /* ecore_x_ungrab */ | 1521 | } |
1522 | 1522 | ||
1523 | int _ecore_window_grabs_num = 0; | 1523 | int _ecore_window_grabs_num = 0; |
1524 | Window *_ecore_window_grabs = NULL; | 1524 | Window *_ecore_window_grabs = NULL; |
1525 | Eina_Bool (*_ecore_window_grab_replay_func)(void *data, | 1525 | Eina_Bool (*_ecore_window_grab_replay_func)(void *data, |
1526 | int event_type, | 1526 | int event_type, |
1527 | void *event); | 1527 | void *event); |
1528 | void *_ecore_window_grab_replay_data; | 1528 | void *_ecore_window_grab_replay_data; |
1529 | 1529 | ||
1530 | EAPI void | 1530 | EAPI void |
1531 | ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data, | 1531 | ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data, |
1532 | int event_type, | 1532 | int event_type, |
1533 | void *event), | 1533 | void *event), |
1534 | void *data) | 1534 | void *data) |
1535 | { | 1535 | { |
1536 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1536 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1537 | _ecore_window_grab_replay_func = func; | 1537 | _ecore_window_grab_replay_func = func; |
1538 | _ecore_window_grab_replay_data = data; | 1538 | _ecore_window_grab_replay_data = data; |
1539 | } /* ecore_x_passive_grab_replay_func_set */ | 1539 | } |
1540 | 1540 | ||
1541 | EAPI void | 1541 | EAPI void |
1542 | ecore_x_window_button_grab(Ecore_X_Window win, | 1542 | ecore_x_window_button_grab(Ecore_X_Window win, |
1543 | int button, | 1543 | int button, |
1544 | Ecore_X_Event_Mask event_mask, | 1544 | Ecore_X_Event_Mask event_mask, |
1545 | int mod, | 1545 | int mod, |
1546 | int any_mod) | 1546 | int any_mod) |
1547 | { | 1547 | { |
1548 | unsigned int b; | 1548 | unsigned int b; |
1549 | unsigned int m; | 1549 | unsigned int m; |
@@ -1578,10 +1578,10 @@ ecore_x_window_button_grab(Ecore_X_Window win, | |||
1578 | if (!t) return; | 1578 | if (!t) return; |
1579 | _ecore_window_grabs = t; | 1579 | _ecore_window_grabs = t; |
1580 | _ecore_window_grabs[_ecore_window_grabs_num - 1] = win; | 1580 | _ecore_window_grabs[_ecore_window_grabs_num - 1] = win; |
1581 | } /* ecore_x_window_button_grab */ | 1581 | } |
1582 | 1582 | ||
1583 | void | 1583 | void |
1584 | _ecore_x_sync_magic_send(int val, | 1584 | _ecore_x_sync_magic_send(int val, |
1585 | Ecore_X_Window swin) | 1585 | Ecore_X_Window swin) |
1586 | { | 1586 | { |
1587 | XEvent xev; | 1587 | XEvent xev; |
@@ -1597,7 +1597,7 @@ _ecore_x_sync_magic_send(int val, | |||
1597 | xev.xclient.data.l[1] = 0x10000000 + val; | 1597 | xev.xclient.data.l[1] = 0x10000000 + val; |
1598 | xev.xclient.data.l[2] = swin; | 1598 | xev.xclient.data.l[2] = swin; |
1599 | XSendEvent(_ecore_x_disp, _ecore_x_private_win, False, NoEventMask, &xev); | 1599 | XSendEvent(_ecore_x_disp, _ecore_x_private_win, False, NoEventMask, &xev); |
1600 | } /* _ecore_x_sync_magic_send */ | 1600 | } |
1601 | 1601 | ||
1602 | void | 1602 | void |
1603 | _ecore_x_window_grab_remove(Ecore_X_Window win) | 1603 | _ecore_x_window_grab_remove(Ecore_X_Window win) |
@@ -1631,13 +1631,13 @@ _ecore_x_window_grab_remove(Ecore_X_Window win) | |||
1631 | _ecore_window_grabs = t; | 1631 | _ecore_window_grabs = t; |
1632 | } | 1632 | } |
1633 | } | 1633 | } |
1634 | } /* _ecore_x_window_grab_remove */ | 1634 | } |
1635 | 1635 | ||
1636 | EAPI void | 1636 | EAPI void |
1637 | ecore_x_window_button_ungrab(Ecore_X_Window win, | 1637 | ecore_x_window_button_ungrab(Ecore_X_Window win, |
1638 | int button, | 1638 | int button, |
1639 | int mod, | 1639 | int mod, |
1640 | int any_mod) | 1640 | int any_mod) |
1641 | { | 1641 | { |
1642 | unsigned int b; | 1642 | unsigned int b; |
1643 | unsigned int m; | 1643 | unsigned int m; |
@@ -1664,16 +1664,16 @@ ecore_x_window_button_ungrab(Ecore_X_Window win, | |||
1664 | for (i = 0; i < 8; i++) | 1664 | for (i = 0; i < 8; i++) |
1665 | XUngrabButton(_ecore_x_disp, b, m | locks[i], win); | 1665 | XUngrabButton(_ecore_x_disp, b, m | locks[i], win); |
1666 | _ecore_x_sync_magic_send(1, win); | 1666 | _ecore_x_sync_magic_send(1, win); |
1667 | } /* ecore_x_window_button_ungrab */ | 1667 | } |
1668 | 1668 | ||
1669 | int _ecore_key_grabs_num = 0; | 1669 | int _ecore_key_grabs_num = 0; |
1670 | Window *_ecore_key_grabs = NULL; | 1670 | Window *_ecore_key_grabs = NULL; |
1671 | 1671 | ||
1672 | EAPI void | 1672 | EAPI void |
1673 | ecore_x_window_key_grab(Ecore_X_Window win, | 1673 | ecore_x_window_key_grab(Ecore_X_Window win, |
1674 | const char *key, | 1674 | const char *key, |
1675 | int mod, | 1675 | int mod, |
1676 | int any_mod) | 1676 | int any_mod) |
1677 | { | 1677 | { |
1678 | KeyCode keycode = 0; | 1678 | KeyCode keycode = 0; |
1679 | KeySym keysym; | 1679 | KeySym keysym; |
@@ -1718,7 +1718,7 @@ ecore_x_window_key_grab(Ecore_X_Window win, | |||
1718 | if (!t) return; | 1718 | if (!t) return; |
1719 | _ecore_key_grabs = t; | 1719 | _ecore_key_grabs = t; |
1720 | _ecore_key_grabs[_ecore_key_grabs_num - 1] = win; | 1720 | _ecore_key_grabs[_ecore_key_grabs_num - 1] = win; |
1721 | } /* ecore_x_window_key_grab */ | 1721 | } |
1722 | 1722 | ||
1723 | void | 1723 | void |
1724 | _ecore_x_key_grab_remove(Ecore_X_Window win) | 1724 | _ecore_x_key_grab_remove(Ecore_X_Window win) |
@@ -1751,13 +1751,13 @@ _ecore_x_key_grab_remove(Ecore_X_Window win) | |||
1751 | _ecore_key_grabs = t; | 1751 | _ecore_key_grabs = t; |
1752 | } | 1752 | } |
1753 | } | 1753 | } |
1754 | } /* _ecore_x_key_grab_remove */ | 1754 | } |
1755 | 1755 | ||
1756 | EAPI void | 1756 | EAPI void |
1757 | ecore_x_window_key_ungrab(Ecore_X_Window win, | 1757 | ecore_x_window_key_ungrab(Ecore_X_Window win, |
1758 | const char *key, | 1758 | const char *key, |
1759 | int mod, | 1759 | int mod, |
1760 | int any_mod) | 1760 | int any_mod) |
1761 | { | 1761 | { |
1762 | KeyCode keycode = 0; | 1762 | KeyCode keycode = 0; |
1763 | KeySym keysym; | 1763 | KeySym keysym; |
@@ -1795,7 +1795,7 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, | |||
1795 | for (i = 0; i < 8; i++) | 1795 | for (i = 0; i < 8; i++) |
1796 | XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win); | 1796 | XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win); |
1797 | _ecore_x_sync_magic_send(2, win); | 1797 | _ecore_x_sync_magic_send(2, win); |
1798 | } /* ecore_x_window_key_ungrab */ | 1798 | } |
1799 | 1799 | ||
1800 | /** | 1800 | /** |
1801 | * Send client message with given type and format 32. | 1801 | * Send client message with given type and format 32. |
@@ -1811,14 +1811,14 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, | |||
1811 | * @return EINA_TRUE on success EINA_FALSE otherwise. | 1811 | * @return EINA_TRUE on success EINA_FALSE otherwise. |
1812 | */ | 1812 | */ |
1813 | EAPI Eina_Bool | 1813 | EAPI Eina_Bool |
1814 | ecore_x_client_message32_send(Ecore_X_Window win, | 1814 | ecore_x_client_message32_send(Ecore_X_Window win, |
1815 | Ecore_X_Atom type, | 1815 | Ecore_X_Atom type, |
1816 | Ecore_X_Event_Mask mask, | 1816 | Ecore_X_Event_Mask mask, |
1817 | long d0, | 1817 | long d0, |
1818 | long d1, | 1818 | long d1, |
1819 | long d2, | 1819 | long d2, |
1820 | long d3, | 1820 | long d3, |
1821 | long d4) | 1821 | long d4) |
1822 | { | 1822 | { |
1823 | XEvent xev; | 1823 | XEvent xev; |
1824 | 1824 | ||
@@ -1834,7 +1834,7 @@ ecore_x_client_message32_send(Ecore_X_Window win, | |||
1834 | xev.xclient.data.l[4] = d4; | 1834 | xev.xclient.data.l[4] = d4; |
1835 | 1835 | ||
1836 | return XSendEvent(_ecore_x_disp, win, False, mask, &xev) ? EINA_TRUE : EINA_FALSE; | 1836 | return XSendEvent(_ecore_x_disp, win, False, mask, &xev) ? EINA_TRUE : EINA_FALSE; |
1837 | } /* ecore_x_client_message32_send */ | 1837 | } |
1838 | 1838 | ||
1839 | /** | 1839 | /** |
1840 | * Send client message with given type and format 8. | 1840 | * Send client message with given type and format 8. |
@@ -1848,9 +1848,9 @@ ecore_x_client_message32_send(Ecore_X_Window win, | |||
1848 | */ | 1848 | */ |
1849 | EAPI Eina_Bool | 1849 | EAPI Eina_Bool |
1850 | ecore_x_client_message8_send(Ecore_X_Window win, | 1850 | ecore_x_client_message8_send(Ecore_X_Window win, |
1851 | Ecore_X_Atom type, | 1851 | Ecore_X_Atom type, |
1852 | const void *data, | 1852 | const void *data, |
1853 | int len) | 1853 | int len) |
1854 | { | 1854 | { |
1855 | XEvent xev; | 1855 | XEvent xev; |
1856 | 1856 | ||
@@ -1866,12 +1866,12 @@ ecore_x_client_message8_send(Ecore_X_Window win, | |||
1866 | memset(xev.xclient.data.b + len, 0, 20 - len); | 1866 | memset(xev.xclient.data.b + len, 0, 20 - len); |
1867 | 1867 | ||
1868 | return XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev) ? EINA_TRUE : EINA_FALSE; | 1868 | return XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev) ? EINA_TRUE : EINA_FALSE; |
1869 | } /* ecore_x_client_message8_send */ | 1869 | } |
1870 | 1870 | ||
1871 | EAPI Eina_Bool | 1871 | EAPI Eina_Bool |
1872 | ecore_x_mouse_move_send(Ecore_X_Window win, | 1872 | ecore_x_mouse_move_send(Ecore_X_Window win, |
1873 | int x, | 1873 | int x, |
1874 | int y) | 1874 | int y) |
1875 | { | 1875 | { |
1876 | XEvent xev; | 1876 | XEvent xev; |
1877 | XWindowAttributes att; | 1877 | XWindowAttributes att; |
@@ -1894,13 +1894,13 @@ ecore_x_mouse_move_send(Ecore_X_Window win, | |||
1894 | xev.xmotion.is_hint = 0; | 1894 | xev.xmotion.is_hint = 0; |
1895 | xev.xmotion.same_screen = 1; | 1895 | xev.xmotion.same_screen = 1; |
1896 | return XSendEvent(_ecore_x_disp, win, True, PointerMotionMask, &xev) ? EINA_TRUE : EINA_FALSE; | 1896 | return XSendEvent(_ecore_x_disp, win, True, PointerMotionMask, &xev) ? EINA_TRUE : EINA_FALSE; |
1897 | } /* ecore_x_mouse_move_send */ | 1897 | } |
1898 | 1898 | ||
1899 | EAPI Eina_Bool | 1899 | EAPI Eina_Bool |
1900 | ecore_x_mouse_down_send(Ecore_X_Window win, | 1900 | ecore_x_mouse_down_send(Ecore_X_Window win, |
1901 | int x, | 1901 | int x, |
1902 | int y, | 1902 | int y, |
1903 | int b) | 1903 | int b) |
1904 | { | 1904 | { |
1905 | XEvent xev; | 1905 | XEvent xev; |
1906 | XWindowAttributes att; | 1906 | XWindowAttributes att; |
@@ -1923,13 +1923,13 @@ ecore_x_mouse_down_send(Ecore_X_Window win, | |||
1923 | xev.xbutton.button = b; | 1923 | xev.xbutton.button = b; |
1924 | xev.xbutton.same_screen = 1; | 1924 | xev.xbutton.same_screen = 1; |
1925 | return XSendEvent(_ecore_x_disp, win, True, ButtonPressMask, &xev) ? EINA_TRUE : EINA_FALSE; | 1925 | return XSendEvent(_ecore_x_disp, win, True, ButtonPressMask, &xev) ? EINA_TRUE : EINA_FALSE; |
1926 | } /* ecore_x_mouse_down_send */ | 1926 | } |
1927 | 1927 | ||
1928 | EAPI Eina_Bool | 1928 | EAPI Eina_Bool |
1929 | ecore_x_mouse_up_send(Ecore_X_Window win, | 1929 | ecore_x_mouse_up_send(Ecore_X_Window win, |
1930 | int x, | 1930 | int x, |
1931 | int y, | 1931 | int y, |
1932 | int b) | 1932 | int b) |
1933 | { | 1933 | { |
1934 | XEvent xev; | 1934 | XEvent xev; |
1935 | XWindowAttributes att; | 1935 | XWindowAttributes att; |
@@ -1952,21 +1952,21 @@ ecore_x_mouse_up_send(Ecore_X_Window win, | |||
1952 | xev.xbutton.button = b; | 1952 | xev.xbutton.button = b; |
1953 | xev.xbutton.same_screen = 1; | 1953 | xev.xbutton.same_screen = 1; |
1954 | return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev) ? EINA_TRUE : EINA_FALSE; | 1954 | return XSendEvent(_ecore_x_disp, win, True, ButtonReleaseMask, &xev) ? EINA_TRUE : EINA_FALSE; |
1955 | } /* ecore_x_mouse_up_send */ | 1955 | } |
1956 | 1956 | ||
1957 | EAPI void | 1957 | EAPI void |
1958 | ecore_x_focus_reset(void) | 1958 | ecore_x_focus_reset(void) |
1959 | { | 1959 | { |
1960 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1960 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1961 | XSetInputFocus(_ecore_x_disp, PointerRoot, RevertToPointerRoot, CurrentTime); | 1961 | XSetInputFocus(_ecore_x_disp, PointerRoot, RevertToPointerRoot, CurrentTime); |
1962 | } /* ecore_x_focus_reset */ | 1962 | } |
1963 | 1963 | ||
1964 | EAPI void | 1964 | EAPI void |
1965 | ecore_x_events_allow_all(void) | 1965 | ecore_x_events_allow_all(void) |
1966 | { | 1966 | { |
1967 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1967 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1968 | XAllowEvents(_ecore_x_disp, AsyncBoth, CurrentTime); | 1968 | XAllowEvents(_ecore_x_disp, AsyncBoth, CurrentTime); |
1969 | } /* ecore_x_events_allow_all */ | 1969 | } |
1970 | 1970 | ||
1971 | EAPI void | 1971 | EAPI void |
1972 | ecore_x_pointer_last_xy_get(int *x, | 1972 | ecore_x_pointer_last_xy_get(int *x, |
@@ -1977,12 +1977,12 @@ ecore_x_pointer_last_xy_get(int *x, | |||
1977 | 1977 | ||
1978 | if (y) | 1978 | if (y) |
1979 | *y = _ecore_x_event_last_root_y; | 1979 | *y = _ecore_x_event_last_root_y; |
1980 | } /* ecore_x_pointer_last_xy_get */ | 1980 | } |
1981 | 1981 | ||
1982 | EAPI void | 1982 | EAPI void |
1983 | ecore_x_pointer_xy_get(Ecore_X_Window win, | 1983 | ecore_x_pointer_xy_get(Ecore_X_Window win, |
1984 | int *x, | 1984 | int *x, |
1985 | int *y) | 1985 | int *y) |
1986 | { | 1986 | { |
1987 | Window rwin, cwin; | 1987 | Window rwin, cwin; |
1988 | int rx, ry, wx, wy, ret; | 1988 | int rx, ry, wx, wy, ret; |
@@ -1996,7 +1996,7 @@ ecore_x_pointer_xy_get(Ecore_X_Window win, | |||
1996 | 1996 | ||
1997 | if (x) *x = wx; | 1997 | if (x) *x = wx; |
1998 | if (y) *y = wy; | 1998 | if (y) *y = wy; |
1999 | } /* ecore_x_pointer_xy_get */ | 1999 | } |
2000 | 2000 | ||
2001 | /** | 2001 | /** |
2002 | * Retrieve the Visual ID from a given Visual. | 2002 | * Retrieve the Visual ID from a given Visual. |
@@ -2023,7 +2023,7 @@ ecore_x_visual_id_get(Ecore_X_Visual visual) | |||
2023 | */ | 2023 | */ |
2024 | EAPI Ecore_X_Visual | 2024 | EAPI Ecore_X_Visual |
2025 | ecore_x_default_visual_get(Ecore_X_Display *disp, | 2025 | ecore_x_default_visual_get(Ecore_X_Display *disp, |
2026 | Ecore_X_Screen *screen) | 2026 | Ecore_X_Screen *screen) |
2027 | { | 2027 | { |
2028 | return DefaultVisual(disp, ecore_x_screen_index_get(screen)); | 2028 | return DefaultVisual(disp, ecore_x_screen_index_get(screen)); |
2029 | } | 2029 | } |
@@ -2039,7 +2039,7 @@ ecore_x_default_visual_get(Ecore_X_Display *disp, | |||
2039 | */ | 2039 | */ |
2040 | EAPI Ecore_X_Colormap | 2040 | EAPI Ecore_X_Colormap |
2041 | ecore_x_default_colormap_get(Ecore_X_Display *disp, | 2041 | ecore_x_default_colormap_get(Ecore_X_Display *disp, |
2042 | Ecore_X_Screen *screen) | 2042 | Ecore_X_Screen *screen) |
2043 | { | 2043 | { |
2044 | return DefaultColormap(disp, ecore_x_screen_index_get(screen)); | 2044 | return DefaultColormap(disp, ecore_x_screen_index_get(screen)); |
2045 | } | 2045 | } |
@@ -2055,7 +2055,7 @@ ecore_x_default_colormap_get(Ecore_X_Display *disp, | |||
2055 | */ | 2055 | */ |
2056 | EAPI int | 2056 | EAPI int |
2057 | ecore_x_default_depth_get(Ecore_X_Display *disp, | 2057 | ecore_x_default_depth_get(Ecore_X_Display *disp, |
2058 | Ecore_X_Screen *screen) | 2058 | Ecore_X_Screen *screen) |
2059 | { | 2059 | { |
2060 | return DefaultDepth(disp, ecore_x_screen_index_get(screen)); | 2060 | return DefaultDepth(disp, ecore_x_screen_index_get(screen)); |
2061 | } | 2061 | } |
@@ -2094,5 +2094,5 @@ _ecore_x_event_modifier(unsigned int state) | |||
2094 | xmodifiers |= ECORE_X_LOCK_SHIFT; | 2094 | xmodifiers |= ECORE_X_LOCK_SHIFT; |
2095 | 2095 | ||
2096 | return xmodifiers; | 2096 | return xmodifiers; |
2097 | } /* _ecore_x_event_modifier */ | 2097 | } |
2098 | 2098 | ||
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 index fd96d5c..ee981fe 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_atoms.c | |||
@@ -291,10 +291,12 @@ _ecore_x_atoms_init(void) | |||
291 | num = sizeof(items) / sizeof(Atom_Item); | 291 | num = sizeof(items) / sizeof(Atom_Item); |
292 | atoms = alloca(num * sizeof(Atom)); | 292 | atoms = alloca(num * sizeof(Atom)); |
293 | names = alloca(num * sizeof(char *)); | 293 | names = alloca(num * sizeof(char *)); |
294 | for (i = 0; i < num; i++) names[i] = (char *)items[i].name; | 294 | for (i = 0; i < num; i++) |
295 | names[i] = (char *)items[i].name; | ||
295 | XInternAtoms(_ecore_x_disp, names, num, False, atoms); | 296 | XInternAtoms(_ecore_x_disp, names, num, False, atoms); |
296 | for (i = 0; i < num; i++) *(items[i].atom) = atoms[i]; | 297 | for (i = 0; i < num; i++) |
297 | } /* _ecore_x_atoms_init */ | 298 | *(items[i].atom) = atoms[i]; |
299 | } | ||
298 | 300 | ||
299 | /** | 301 | /** |
300 | * Retrieves the atom value associated with the given name. | 302 | * Retrieves the atom value associated with the given name. |
@@ -309,11 +311,11 @@ ecore_x_atom_get(const char *name) | |||
309 | 311 | ||
310 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 312 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
311 | return XInternAtom(_ecore_x_disp, name, False); | 313 | return XInternAtom(_ecore_x_disp, name, False); |
312 | } /* ecore_x_atom_get */ | 314 | } |
313 | 315 | ||
314 | EAPI void | 316 | EAPI void |
315 | ecore_x_atoms_get(const char **names, | 317 | ecore_x_atoms_get(const char **names, |
316 | int num, | 318 | int num, |
317 | Ecore_X_Atom *atoms) | 319 | Ecore_X_Atom *atoms) |
318 | { | 320 | { |
319 | Atom *atoms_int; | 321 | Atom *atoms_int; |
@@ -327,7 +329,7 @@ ecore_x_atoms_get(const char **names, | |||
327 | XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int); | 329 | XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int); |
328 | for (i = 0; i < num; i++) | 330 | for (i = 0; i < num; i++) |
329 | atoms[i] = atoms_int[i]; | 331 | atoms[i] = atoms_int[i]; |
330 | } /* ecore_x_atoms_get */ | 332 | } |
331 | 333 | ||
332 | EAPI char * | 334 | EAPI char * |
333 | ecore_x_atom_name_get(Ecore_X_Atom atom) | 335 | ecore_x_atom_name_get(Ecore_X_Atom atom) |
@@ -348,5 +350,5 @@ ecore_x_atom_name_get(Ecore_X_Atom atom) | |||
348 | XFree(xname); | 350 | XFree(xname); |
349 | 351 | ||
350 | return name; | 352 | return name; |
351 | } /* ecore_x_atom_name_get */ | 353 | } |
352 | 354 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c index 43153ff..b919db9 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_composite.c | |||
@@ -30,24 +30,24 @@ _ecore_x_composite_init(void) | |||
30 | # endif | 30 | # endif |
31 | } | 31 | } |
32 | #endif | 32 | #endif |
33 | } /* _ecore_x_composite_init */ | 33 | } |
34 | 34 | ||
35 | EAPI Eina_Bool | 35 | EAPI Eina_Bool |
36 | ecore_x_composite_query(void) | 36 | ecore_x_composite_query(void) |
37 | { | 37 | { |
38 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 38 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
39 | return _composite_available; | 39 | return _composite_available; |
40 | } /* ecore_x_composite_query */ | 40 | } |
41 | 41 | ||
42 | EAPI void | 42 | EAPI void |
43 | ecore_x_composite_redirect_window(Ecore_X_Window win, | 43 | ecore_x_composite_redirect_window(Ecore_X_Window win, |
44 | Ecore_X_Composite_Update_Type type) | 44 | Ecore_X_Composite_Update_Type type) |
45 | { | 45 | { |
46 | #ifdef ECORE_XCOMPOSITE | 46 | #ifdef ECORE_XCOMPOSITE |
47 | int update = CompositeRedirectAutomatic; | 47 | int update = CompositeRedirectAutomatic; |
48 | 48 | ||
49 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 49 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
50 | switch(type) | 50 | switch (type) |
51 | { | 51 | { |
52 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: | 52 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: |
53 | update = CompositeRedirectAutomatic; | 53 | update = CompositeRedirectAutomatic; |
@@ -56,20 +56,20 @@ ecore_x_composite_redirect_window(Ecore_X_Window win, | |||
56 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: | 56 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: |
57 | update = CompositeRedirectManual; | 57 | update = CompositeRedirectManual; |
58 | break; | 58 | break; |
59 | } /* switch */ | 59 | } |
60 | XCompositeRedirectWindow(_ecore_x_disp, win, update); | 60 | XCompositeRedirectWindow(_ecore_x_disp, win, update); |
61 | #endif /* ifdef ECORE_XCOMPOSITE */ | 61 | #endif /* ifdef ECORE_XCOMPOSITE */ |
62 | } /* ecore_x_composite_redirect_window */ | 62 | } |
63 | 63 | ||
64 | EAPI void | 64 | EAPI void |
65 | ecore_x_composite_redirect_subwindows(Ecore_X_Window win, | 65 | ecore_x_composite_redirect_subwindows(Ecore_X_Window win, |
66 | Ecore_X_Composite_Update_Type type) | 66 | Ecore_X_Composite_Update_Type type) |
67 | { | 67 | { |
68 | #ifdef ECORE_XCOMPOSITE | 68 | #ifdef ECORE_XCOMPOSITE |
69 | int update = CompositeRedirectAutomatic; | 69 | int update = CompositeRedirectAutomatic; |
70 | 70 | ||
71 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 71 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
72 | switch(type) | 72 | switch (type) |
73 | { | 73 | { |
74 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: | 74 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: |
75 | update = CompositeRedirectAutomatic; | 75 | update = CompositeRedirectAutomatic; |
@@ -78,20 +78,20 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win, | |||
78 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: | 78 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: |
79 | update = CompositeRedirectManual; | 79 | update = CompositeRedirectManual; |
80 | break; | 80 | break; |
81 | } /* switch */ | 81 | } |
82 | XCompositeRedirectSubwindows(_ecore_x_disp, win, update); | 82 | XCompositeRedirectSubwindows(_ecore_x_disp, win, update); |
83 | #endif /* ifdef ECORE_XCOMPOSITE */ | 83 | #endif /* ifdef ECORE_XCOMPOSITE */ |
84 | } /* ecore_x_composite_redirect_subwindows */ | 84 | } |
85 | 85 | ||
86 | EAPI void | 86 | EAPI void |
87 | ecore_x_composite_unredirect_window(Ecore_X_Window win, | 87 | ecore_x_composite_unredirect_window(Ecore_X_Window win, |
88 | Ecore_X_Composite_Update_Type type) | 88 | Ecore_X_Composite_Update_Type type) |
89 | { | 89 | { |
90 | #ifdef ECORE_XCOMPOSITE | 90 | #ifdef ECORE_XCOMPOSITE |
91 | int update = CompositeRedirectAutomatic; | 91 | int update = CompositeRedirectAutomatic; |
92 | 92 | ||
93 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 93 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
94 | switch(type) | 94 | switch (type) |
95 | { | 95 | { |
96 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: | 96 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: |
97 | update = CompositeRedirectAutomatic; | 97 | update = CompositeRedirectAutomatic; |
@@ -100,20 +100,20 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win, | |||
100 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: | 100 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: |
101 | update = CompositeRedirectManual; | 101 | update = CompositeRedirectManual; |
102 | break; | 102 | break; |
103 | } /* switch */ | 103 | } |
104 | XCompositeUnredirectWindow(_ecore_x_disp, win, update); | 104 | XCompositeUnredirectWindow(_ecore_x_disp, win, update); |
105 | #endif /* ifdef ECORE_XCOMPOSITE */ | 105 | #endif /* ifdef ECORE_XCOMPOSITE */ |
106 | } /* ecore_x_composite_unredirect_window */ | 106 | } |
107 | 107 | ||
108 | EAPI void | 108 | EAPI void |
109 | ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, | 109 | ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, |
110 | Ecore_X_Composite_Update_Type type) | 110 | Ecore_X_Composite_Update_Type type) |
111 | { | 111 | { |
112 | #ifdef ECORE_XCOMPOSITE | 112 | #ifdef ECORE_XCOMPOSITE |
113 | int update = CompositeRedirectAutomatic; | 113 | int update = CompositeRedirectAutomatic; |
114 | 114 | ||
115 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 115 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
116 | switch(type) | 116 | switch (type) |
117 | { | 117 | { |
118 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: | 118 | case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC: |
119 | update = CompositeRedirectAutomatic; | 119 | update = CompositeRedirectAutomatic; |
@@ -122,10 +122,10 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, | |||
122 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: | 122 | case ECORE_X_COMPOSITE_UPDATE_MANUAL: |
123 | update = CompositeRedirectManual; | 123 | update = CompositeRedirectManual; |
124 | break; | 124 | break; |
125 | } /* switch */ | 125 | } |
126 | XCompositeUnredirectSubwindows(_ecore_x_disp, win, update); | 126 | XCompositeUnredirectSubwindows(_ecore_x_disp, win, update); |
127 | #endif /* ifdef ECORE_XCOMPOSITE */ | 127 | #endif /* ifdef ECORE_XCOMPOSITE */ |
128 | } /* ecore_x_composite_unredirect_subwindows */ | 128 | } |
129 | 129 | ||
130 | EAPI Ecore_X_Pixmap | 130 | EAPI Ecore_X_Pixmap |
131 | ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win) | 131 | ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win) |
@@ -136,7 +136,7 @@ ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win) | |||
136 | pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win); | 136 | pixmap = XCompositeNameWindowPixmap(_ecore_x_disp, win); |
137 | #endif /* ifdef ECORE_XCOMPOSITE */ | 137 | #endif /* ifdef ECORE_XCOMPOSITE */ |
138 | return pixmap; | 138 | return pixmap; |
139 | } /* ecore_x_composite_name_window_pixmap_get */ | 139 | } |
140 | 140 | ||
141 | EAPI void | 141 | EAPI void |
142 | ecore_x_composite_window_events_disable(Ecore_X_Window win) | 142 | ecore_x_composite_window_events_disable(Ecore_X_Window win) |
@@ -163,7 +163,7 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root) | |||
163 | ecore_x_composite_window_events_disable(win); | 163 | ecore_x_composite_window_events_disable(win); |
164 | #endif /* ifdef ECORE_XCOMPOSITE */ | 164 | #endif /* ifdef ECORE_XCOMPOSITE */ |
165 | return win; | 165 | return win; |
166 | } /* ecore_x_composite_render_window_enable */ | 166 | } |
167 | 167 | ||
168 | EAPI void | 168 | EAPI void |
169 | ecore_x_composite_render_window_disable(Ecore_X_Window root) | 169 | ecore_x_composite_render_window_disable(Ecore_X_Window root) |
@@ -172,5 +172,5 @@ ecore_x_composite_render_window_disable(Ecore_X_Window root) | |||
172 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 172 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
173 | XCompositeReleaseOverlayWindow(_ecore_x_disp, root); | 173 | XCompositeReleaseOverlayWindow(_ecore_x_disp, root); |
174 | #endif /* ifdef ECORE_XCOMPOSITE */ | 174 | #endif /* ifdef ECORE_XCOMPOSITE */ |
175 | } /* ecore_x_composite_render_window_disable */ | 175 | } |
176 | 176 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c index 434505c..a968c56 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_cursor.c | |||
@@ -10,15 +10,15 @@ EAPI Eina_Bool | |||
10 | ecore_x_cursor_color_supported_get(void) | 10 | ecore_x_cursor_color_supported_get(void) |
11 | { | 11 | { |
12 | return _ecore_x_xcursor; | 12 | return _ecore_x_xcursor; |
13 | } /* ecore_x_cursor_color_supported_get */ | 13 | } |
14 | 14 | ||
15 | EAPI Ecore_X_Cursor | 15 | EAPI Ecore_X_Cursor |
16 | ecore_x_cursor_new(Ecore_X_Window win, | 16 | ecore_x_cursor_new(Ecore_X_Window win, |
17 | int *pixels, | 17 | int *pixels, |
18 | int w, | 18 | int w, |
19 | int h, | 19 | int h, |
20 | int hot_x, | 20 | int hot_x, |
21 | int hot_y) | 21 | int hot_y) |
22 | { | 22 | { |
23 | #ifdef ECORE_XCURSOR | 23 | #ifdef ECORE_XCURSOR |
24 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 24 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -43,7 +43,7 @@ ecore_x_cursor_new(Ecore_X_Window win, | |||
43 | // r = (((pixels[i] >> 16) & 0xff) * a) / 0xff; | 43 | // r = (((pixels[i] >> 16) & 0xff) * a) / 0xff; |
44 | // g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff; | 44 | // g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff; |
45 | // b = (((pixels[i] ) & 0xff) * a) / 0xff; | 45 | // b = (((pixels[i] ) & 0xff) * a) / 0xff; |
46 | xci->pixels[i] = pixels[i]; | 46 | xci->pixels[i] = pixels[i]; |
47 | // (a << 24) | (r << 16) | (g << 8) | (b); | 47 | // (a << 24) | (r << 16) | (g << 8) | (b); |
48 | } | 48 | } |
49 | c = XcursorImageLoadCursor(_ecore_x_disp, xci); | 49 | c = XcursorImageLoadCursor(_ecore_x_disp, xci); |
@@ -200,14 +200,14 @@ ecore_x_cursor_new(Ecore_X_Window win, | |||
200 | } | 200 | } |
201 | 201 | ||
202 | return 0; | 202 | return 0; |
203 | } /* ecore_x_cursor_new */ | 203 | } |
204 | 204 | ||
205 | EAPI void | 205 | EAPI void |
206 | ecore_x_cursor_free(Ecore_X_Cursor c) | 206 | ecore_x_cursor_free(Ecore_X_Cursor c) |
207 | { | 207 | { |
208 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 208 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
209 | XFreeCursor(_ecore_x_disp, c); | 209 | XFreeCursor(_ecore_x_disp, c); |
210 | } /* ecore_x_cursor_free */ | 210 | } |
211 | 211 | ||
212 | /* | 212 | /* |
213 | * Returns the cursor for the given shape. | 213 | * Returns the cursor for the given shape. |
@@ -220,7 +220,7 @@ ecore_x_cursor_shape_get(int shape) | |||
220 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 220 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
221 | /* Shapes are defined in Ecore_X_Cursor.h */ | 221 | /* Shapes are defined in Ecore_X_Cursor.h */ |
222 | return XCreateFontCursor(_ecore_x_disp, shape); | 222 | return XCreateFontCursor(_ecore_x_disp, shape); |
223 | } /* ecore_x_cursor_shape_get */ | 223 | } |
224 | 224 | ||
225 | EAPI void | 225 | EAPI void |
226 | ecore_x_cursor_size_set(int size) | 226 | ecore_x_cursor_size_set(int size) |
@@ -231,7 +231,7 @@ ecore_x_cursor_size_set(int size) | |||
231 | #else /* ifdef ECORE_XCURSOR */ | 231 | #else /* ifdef ECORE_XCURSOR */ |
232 | size = 0; | 232 | size = 0; |
233 | #endif /* ifdef ECORE_XCURSOR */ | 233 | #endif /* ifdef ECORE_XCURSOR */ |
234 | } /* ecore_x_cursor_size_set */ | 234 | } |
235 | 235 | ||
236 | EAPI int | 236 | EAPI int |
237 | ecore_x_cursor_size_get(void) | 237 | ecore_x_cursor_size_get(void) |
@@ -242,5 +242,5 @@ ecore_x_cursor_size_get(void) | |||
242 | #else /* ifdef ECORE_XCURSOR */ | 242 | #else /* ifdef ECORE_XCURSOR */ |
243 | return 0; | 243 | return 0; |
244 | #endif /* ifdef ECORE_XCURSOR */ | 244 | #endif /* ifdef ECORE_XCURSOR */ |
245 | } /* ecore_x_cursor_size_get */ | 245 | } |
246 | 246 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c index 5e44d07..b094f85 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_damage.c | |||
@@ -26,16 +26,16 @@ _ecore_x_damage_init(void) | |||
26 | #else /* ifdef ECORE_XDAMAGE */ | 26 | #else /* ifdef ECORE_XDAMAGE */ |
27 | _damage_available = EINA_FALSE; | 27 | _damage_available = EINA_FALSE; |
28 | #endif /* ifdef ECORE_XDAMAGE */ | 28 | #endif /* ifdef ECORE_XDAMAGE */ |
29 | } /* _ecore_x_damage_init */ | 29 | } |
30 | 30 | ||
31 | EAPI Eina_Bool | 31 | EAPI Eina_Bool |
32 | ecore_x_damage_query(void) | 32 | ecore_x_damage_query(void) |
33 | { | 33 | { |
34 | return _damage_available; | 34 | return _damage_available; |
35 | } /* ecore_x_damage_query */ | 35 | } |
36 | 36 | ||
37 | EAPI Ecore_X_Damage | 37 | EAPI Ecore_X_Damage |
38 | ecore_x_damage_new(Ecore_X_Drawable d, | 38 | ecore_x_damage_new(Ecore_X_Drawable d, |
39 | Ecore_X_Damage_Report_Level level) | 39 | Ecore_X_Damage_Report_Level level) |
40 | { | 40 | { |
41 | #ifdef ECORE_XDAMAGE | 41 | #ifdef ECORE_XDAMAGE |
@@ -47,7 +47,7 @@ ecore_x_damage_new(Ecore_X_Drawable d, | |||
47 | #else /* ifdef ECORE_XDAMAGE */ | 47 | #else /* ifdef ECORE_XDAMAGE */ |
48 | return 0; | 48 | return 0; |
49 | #endif /* ifdef ECORE_XDAMAGE */ | 49 | #endif /* ifdef ECORE_XDAMAGE */ |
50 | } /* ecore_x_damage_new */ | 50 | } |
51 | 51 | ||
52 | EAPI void | 52 | EAPI void |
53 | ecore_x_damage_free(Ecore_X_Damage damage) | 53 | ecore_x_damage_free(Ecore_X_Damage damage) |
@@ -56,7 +56,7 @@ ecore_x_damage_free(Ecore_X_Damage damage) | |||
56 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 56 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
57 | XDamageDestroy(_ecore_x_disp, damage); | 57 | XDamageDestroy(_ecore_x_disp, damage); |
58 | #endif /* ifdef ECORE_XDAMAGE */ | 58 | #endif /* ifdef ECORE_XDAMAGE */ |
59 | } /* ecore_x_damage_free */ | 59 | } |
60 | 60 | ||
61 | EAPI void | 61 | EAPI void |
62 | ecore_x_damage_subtract(Ecore_X_Damage damage, | 62 | ecore_x_damage_subtract(Ecore_X_Damage damage, |
@@ -67,5 +67,5 @@ ecore_x_damage_subtract(Ecore_X_Damage damage, | |||
67 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 67 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
68 | XDamageSubtract(_ecore_x_disp, damage, repair, parts); | 68 | XDamageSubtract(_ecore_x_disp, damage, repair, parts); |
69 | #endif /* ifdef ECORE_XDAMAGE */ | 69 | #endif /* ifdef ECORE_XDAMAGE */ |
70 | } /* ecore_x_damage_subtract */ | 70 | } |
71 | 71 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c index 7908584..372470a 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dnd.c | |||
@@ -65,7 +65,7 @@ _ecore_x_dnd_init(void) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | _ecore_x_dnd_init_count++; | 67 | _ecore_x_dnd_init_count++; |
68 | } /* _ecore_x_dnd_init */ | 68 | } |
69 | 69 | ||
70 | void | 70 | void |
71 | _ecore_x_dnd_shutdown(void) | 71 | _ecore_x_dnd_shutdown(void) |
@@ -85,16 +85,16 @@ _ecore_x_dnd_shutdown(void) | |||
85 | _target = NULL; | 85 | _target = NULL; |
86 | 86 | ||
87 | _ecore_x_dnd_init_count = 0; | 87 | _ecore_x_dnd_init_count = 0; |
88 | } /* _ecore_x_dnd_shutdown */ | 88 | } |
89 | 89 | ||
90 | static Eina_Bool | 90 | static Eina_Bool |
91 | _ecore_x_dnd_converter_copy(char *target __UNUSED__, | 91 | _ecore_x_dnd_converter_copy(char *target __UNUSED__, |
92 | void *data, | 92 | void *data, |
93 | int size, | 93 | int size, |
94 | void **data_ret, | 94 | void **data_ret, |
95 | int *size_ret, | 95 | int *size_ret, |
96 | Ecore_X_Atom *tprop __UNUSED__, | 96 | Ecore_X_Atom *tprop __UNUSED__, |
97 | int *count __UNUSED__) | 97 | int *count __UNUSED__) |
98 | { | 98 | { |
99 | XTextProperty text_prop; | 99 | XTextProperty text_prop; |
100 | char *mystr; | 100 | char *mystr; |
@@ -130,11 +130,11 @@ _ecore_x_dnd_converter_copy(char *target __UNUSED__, | |||
130 | free(mystr); | 130 | free(mystr); |
131 | return EINA_FALSE; | 131 | return EINA_FALSE; |
132 | } | 132 | } |
133 | } /* _ecore_x_dnd_converter_copy */ | 133 | } |
134 | 134 | ||
135 | EAPI void | 135 | EAPI void |
136 | ecore_x_dnd_aware_set(Ecore_X_Window win, | 136 | ecore_x_dnd_aware_set(Ecore_X_Window win, |
137 | Eina_Bool on) | 137 | Eina_Bool on) |
138 | { | 138 | { |
139 | Ecore_X_Atom prop_data = ECORE_X_DND_VERSION; | 139 | Ecore_X_Atom prop_data = ECORE_X_DND_VERSION; |
140 | 140 | ||
@@ -144,7 +144,7 @@ ecore_x_dnd_aware_set(Ecore_X_Window win, | |||
144 | XA_ATOM, 32, &prop_data, 1); | 144 | XA_ATOM, 32, &prop_data, 1); |
145 | else | 145 | else |
146 | ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE); | 146 | ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE); |
147 | } /* ecore_x_dnd_aware_set */ | 147 | } |
148 | 148 | ||
149 | EAPI int | 149 | EAPI int |
150 | ecore_x_dnd_version_get(Ecore_X_Window win) | 150 | ecore_x_dnd_version_get(Ecore_X_Window win) |
@@ -208,11 +208,11 @@ ecore_x_dnd_version_get(Ecore_X_Window win) | |||
208 | } | 208 | } |
209 | 209 | ||
210 | return 0; | 210 | return 0; |
211 | } /* ecore_x_dnd_version_get */ | 211 | } |
212 | 212 | ||
213 | EAPI Eina_Bool | 213 | EAPI Eina_Bool |
214 | ecore_x_dnd_type_isset(Ecore_X_Window win, | 214 | ecore_x_dnd_type_isset(Ecore_X_Window win, |
215 | const char *type) | 215 | const char *type) |
216 | { | 216 | { |
217 | int num, i, ret = EINA_FALSE; | 217 | int num, i, ret = EINA_FALSE; |
218 | unsigned char *data; | 218 | unsigned char *data; |
@@ -237,12 +237,12 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, | |||
237 | 237 | ||
238 | XFree(data); | 238 | XFree(data); |
239 | return ret; | 239 | return ret; |
240 | } /* ecore_x_dnd_type_isset */ | 240 | } |
241 | 241 | ||
242 | EAPI void | 242 | EAPI void |
243 | ecore_x_dnd_type_set(Ecore_X_Window win, | 243 | ecore_x_dnd_type_set(Ecore_X_Window win, |
244 | const char *type, | 244 | const char *type, |
245 | Eina_Bool on) | 245 | Eina_Bool on) |
246 | { | 246 | { |
247 | Ecore_X_Atom atom; | 247 | Ecore_X_Atom atom; |
248 | Ecore_X_Atom *oldset = NULL, *newset = NULL; | 248 | Ecore_X_Atom *oldset = NULL, *newset = NULL; |
@@ -305,12 +305,12 @@ ecore_x_dnd_type_set(Ecore_X_Window win, | |||
305 | 305 | ||
306 | XFree(oldset); | 306 | XFree(oldset); |
307 | free(newset); | 307 | free(newset); |
308 | } /* ecore_x_dnd_type_set */ | 308 | } |
309 | 309 | ||
310 | EAPI void | 310 | EAPI void |
311 | ecore_x_dnd_types_set(Ecore_X_Window win, | 311 | ecore_x_dnd_types_set(Ecore_X_Window win, |
312 | const char **types, | 312 | const char **types, |
313 | unsigned int num_types) | 313 | unsigned int num_types) |
314 | { | 314 | { |
315 | Ecore_X_Atom *newset = NULL; | 315 | Ecore_X_Atom *newset = NULL; |
316 | unsigned int i; | 316 | unsigned int i; |
@@ -336,12 +336,12 @@ ecore_x_dnd_types_set(Ecore_X_Window win, | |||
336 | XA_ATOM, 32, data, num_types); | 336 | XA_ATOM, 32, data, num_types); |
337 | free(newset); | 337 | free(newset); |
338 | } | 338 | } |
339 | } /* ecore_x_dnd_types_set */ | 339 | } |
340 | 340 | ||
341 | EAPI void | 341 | EAPI void |
342 | ecore_x_dnd_actions_set(Ecore_X_Window win, | 342 | ecore_x_dnd_actions_set(Ecore_X_Window win, |
343 | Ecore_X_Atom *actions, | 343 | Ecore_X_Atom *actions, |
344 | unsigned int num_actions) | 344 | unsigned int num_actions) |
345 | { | 345 | { |
346 | unsigned int i; | 346 | unsigned int i; |
347 | unsigned char *data = NULL; | 347 | unsigned char *data = NULL; |
@@ -360,7 +360,7 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, | |||
360 | ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST, | 360 | ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST, |
361 | XA_ATOM, 32, data, num_actions); | 361 | XA_ATOM, 32, data, num_actions); |
362 | } | 362 | } |
363 | } /* ecore_x_dnd_actions_set */ | 363 | } |
364 | 364 | ||
365 | /** | 365 | /** |
366 | * The DND position update cb is called Ecore_X sends a DND position to a | 366 | * The DND position update cb is called Ecore_X sends a DND position to a |
@@ -378,9 +378,9 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, | |||
378 | */ | 378 | */ |
379 | EAPI void | 379 | EAPI void |
380 | ecore_x_dnd_callback_pos_update_set( | 380 | ecore_x_dnd_callback_pos_update_set( |
381 | void (*cb)(void *, | 381 | void (*cb)(void *, |
382 | Ecore_X_Xdnd_Position *data), | 382 | Ecore_X_Xdnd_Position *data), |
383 | const void *data) | 383 | const void *data) |
384 | { | 384 | { |
385 | _posupdatecb = cb; | 385 | _posupdatecb = cb; |
386 | _posupdatedata = (void *)data; /* Discard the const early */ | 386 | _posupdatedata = (void *)data; /* Discard the const early */ |
@@ -390,18 +390,18 @@ Ecore_X_DND_Source * | |||
390 | _ecore_x_dnd_source_get(void) | 390 | _ecore_x_dnd_source_get(void) |
391 | { | 391 | { |
392 | return _source; | 392 | return _source; |
393 | } /* _ecore_x_dnd_source_get */ | 393 | } |
394 | 394 | ||
395 | Ecore_X_DND_Target * | 395 | Ecore_X_DND_Target * |
396 | _ecore_x_dnd_target_get(void) | 396 | _ecore_x_dnd_target_get(void) |
397 | { | 397 | { |
398 | return _target; | 398 | return _target; |
399 | } /* _ecore_x_dnd_target_get */ | 399 | } |
400 | 400 | ||
401 | EAPI Eina_Bool | 401 | EAPI Eina_Bool |
402 | ecore_x_dnd_begin(Ecore_X_Window source, | 402 | ecore_x_dnd_begin(Ecore_X_Window source, |
403 | unsigned char *data, | 403 | unsigned char *data, |
404 | int size) | 404 | int size) |
405 | { | 405 | { |
406 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 406 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
407 | if (!ecore_x_dnd_version_get(source)) | 407 | if (!ecore_x_dnd_version_get(source)) |
@@ -433,7 +433,7 @@ ecore_x_dnd_begin(Ecore_X_Window source, | |||
433 | _source->dest = None; | 433 | _source->dest = None; |
434 | 434 | ||
435 | return EINA_TRUE; | 435 | return EINA_TRUE; |
436 | } /* ecore_x_dnd_begin */ | 436 | } |
437 | 437 | ||
438 | EAPI Eina_Bool | 438 | EAPI Eina_Bool |
439 | ecore_x_dnd_drop(void) | 439 | ecore_x_dnd_drop(void) |
@@ -471,8 +471,8 @@ ecore_x_dnd_drop(void) | |||
471 | else | 471 | else |
472 | { | 472 | { |
473 | /* Dropping on nothing */ | 473 | /* Dropping on nothing */ |
474 | ecore_x_selection_xdnd_clear(); | 474 | ecore_x_selection_xdnd_clear(); |
475 | _source->state = ECORE_X_DND_SOURCE_IDLE; | 475 | _source->state = ECORE_X_DND_SOURCE_IDLE; |
476 | } | 476 | } |
477 | 477 | ||
478 | ecore_x_window_ignore_set(_source->win, 0); | 478 | ecore_x_window_ignore_set(_source->win, 0); |
@@ -480,13 +480,13 @@ ecore_x_dnd_drop(void) | |||
480 | _source->prev.window = 0; | 480 | _source->prev.window = 0; |
481 | 481 | ||
482 | return status; | 482 | return status; |
483 | } /* ecore_x_dnd_drop */ | 483 | } |
484 | 484 | ||
485 | EAPI void | 485 | EAPI void |
486 | ecore_x_dnd_send_status(Eina_Bool will_accept, | 486 | ecore_x_dnd_send_status(Eina_Bool will_accept, |
487 | Eina_Bool suppress, | 487 | Eina_Bool suppress, |
488 | Ecore_X_Rectangle rectangle, | 488 | Ecore_X_Rectangle rectangle, |
489 | Ecore_X_Atom action) | 489 | Ecore_X_Atom action) |
490 | { | 490 | { |
491 | XEvent xev; | 491 | XEvent xev; |
492 | 492 | ||
@@ -532,7 +532,7 @@ ecore_x_dnd_send_status(Eina_Bool will_accept, | |||
532 | } | 532 | } |
533 | 533 | ||
534 | XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev); | 534 | XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev); |
535 | } /* ecore_x_dnd_send_status */ | 535 | } |
536 | 536 | ||
537 | EAPI void | 537 | EAPI void |
538 | ecore_x_dnd_send_finished(void) | 538 | ecore_x_dnd_send_finished(void) |
@@ -561,7 +561,7 @@ ecore_x_dnd_send_finished(void) | |||
561 | XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev); | 561 | XSendEvent(_ecore_x_disp, _target->source, False, 0, &xev); |
562 | 562 | ||
563 | _target->state = ECORE_X_DND_TARGET_IDLE; | 563 | _target->state = ECORE_X_DND_TARGET_IDLE; |
564 | } /* ecore_x_dnd_send_finished */ | 564 | } |
565 | 565 | ||
566 | EAPI void | 566 | EAPI void |
567 | ecore_x_dnd_source_action_set(Ecore_X_Atom action) | 567 | ecore_x_dnd_source_action_set(Ecore_X_Atom action) |
@@ -569,18 +569,18 @@ ecore_x_dnd_source_action_set(Ecore_X_Atom action) | |||
569 | _source->action = action; | 569 | _source->action = action; |
570 | if (_source->prev.window) | 570 | if (_source->prev.window) |
571 | _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y); | 571 | _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y); |
572 | } /* ecore_x_dnd_source_action_set */ | 572 | } |
573 | 573 | ||
574 | EAPI Ecore_X_Atom | 574 | EAPI Ecore_X_Atom |
575 | ecore_x_dnd_source_action_get(void) | 575 | ecore_x_dnd_source_action_get(void) |
576 | { | 576 | { |
577 | return _source->action; | 577 | return _source->action; |
578 | } /* ecore_x_dnd_source_action_get */ | 578 | } |
579 | 579 | ||
580 | void | 580 | void |
581 | _ecore_x_dnd_drag(Ecore_X_Window root, | 581 | _ecore_x_dnd_drag(Ecore_X_Window root, |
582 | int x, | 582 | int x, |
583 | int y) | 583 | int y) |
584 | { | 584 | { |
585 | XEvent xev; | 585 | XEvent xev; |
586 | Ecore_X_Window win; | 586 | Ecore_X_Window win; |
@@ -701,6 +701,6 @@ _ecore_x_dnd_drag(Ecore_X_Window root, | |||
701 | _source->prev.y = y; | 701 | _source->prev.y = y; |
702 | _source->prev.window = root; | 702 | _source->prev.window = root; |
703 | _source->dest = win; | 703 | _source->dest = win; |
704 | } /* _ecore_x_dnd_drag */ | 704 | } |
705 | 705 | ||
706 | /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ | 706 | /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c index 74d5344..23349f4 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_dpms.c | |||
@@ -23,7 +23,7 @@ _ecore_x_dpms_init(void) | |||
23 | #else /* ifdef ECORE_XDPMS */ | 23 | #else /* ifdef ECORE_XDPMS */ |
24 | _dpms_available = EINA_FALSE; | 24 | _dpms_available = EINA_FALSE; |
25 | #endif /* ifdef ECORE_XDPMS */ | 25 | #endif /* ifdef ECORE_XDPMS */ |
26 | } /* _ecore_x_dpms_init */ | 26 | } |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * @defgroup Ecore_X_DPMS_Group X DPMS Extension Functions | 29 | * @defgroup Ecore_X_DPMS_Group X DPMS Extension Functions |
@@ -40,7 +40,7 @@ EAPI Eina_Bool | |||
40 | ecore_x_dpms_query(void) | 40 | ecore_x_dpms_query(void) |
41 | { | 41 | { |
42 | return _dpms_available; | 42 | return _dpms_available; |
43 | } /* ecore_x_dpms_query */ | 43 | } |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Checks if the X server is capable of DPMS. | 46 | * Checks if the X server is capable of DPMS. |
@@ -56,7 +56,7 @@ ecore_x_dpms_capable_get(void) | |||
56 | #else /* ifdef ECORE_XDPMS */ | 56 | #else /* ifdef ECORE_XDPMS */ |
57 | return EINA_FALSE; | 57 | return EINA_FALSE; |
58 | #endif /* ifdef ECORE_XDPMS */ | 58 | #endif /* ifdef ECORE_XDPMS */ |
59 | } /* ecore_x_dpms_capable_get */ | 59 | } |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Checks the DPMS state of the display. | 62 | * Checks the DPMS state of the display. |
@@ -76,7 +76,7 @@ ecore_x_dpms_enabled_get(void) | |||
76 | #else /* ifdef ECORE_XDPMS */ | 76 | #else /* ifdef ECORE_XDPMS */ |
77 | return EINA_FALSE; | 77 | return EINA_FALSE; |
78 | #endif /* ifdef ECORE_XDPMS */ | 78 | #endif /* ifdef ECORE_XDPMS */ |
79 | } /* ecore_x_dpms_enabled_get */ | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Sets the DPMS state of the display. | 82 | * Sets the DPMS state of the display. |
@@ -94,7 +94,7 @@ ecore_x_dpms_enabled_set(int enabled) | |||
94 | DPMSDisable(_ecore_x_disp); | 94 | DPMSDisable(_ecore_x_disp); |
95 | 95 | ||
96 | #endif /* ifdef ECORE_XDPMS */ | 96 | #endif /* ifdef ECORE_XDPMS */ |
97 | } /* ecore_x_dpms_enabled_set */ | 97 | } |
98 | 98 | ||
99 | /** | 99 | /** |
100 | * Gets the timeouts. The values are in unit of seconds. | 100 | * Gets the timeouts. The values are in unit of seconds. |
@@ -113,7 +113,7 @@ ecore_x_dpms_timeouts_get(unsigned int *standby, | |||
113 | DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby, | 113 | DPMSGetTimeouts(_ecore_x_disp, (unsigned short *)standby, |
114 | (unsigned short *)suspend, (unsigned short *)off); | 114 | (unsigned short *)suspend, (unsigned short *)off); |
115 | #endif /* ifdef ECORE_XDPMS */ | 115 | #endif /* ifdef ECORE_XDPMS */ |
116 | } /* ecore_x_dpms_timeouts_get */ | 116 | } |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Sets the timeouts. The values are in unit of seconds. | 119 | * Sets the timeouts. The values are in unit of seconds. |
@@ -133,7 +133,7 @@ ecore_x_dpms_timeouts_set(unsigned int standby, | |||
133 | #else /* ifdef ECORE_XDPMS */ | 133 | #else /* ifdef ECORE_XDPMS */ |
134 | return EINA_FALSE; | 134 | return EINA_FALSE; |
135 | #endif /* ifdef ECORE_XDPMS */ | 135 | #endif /* ifdef ECORE_XDPMS */ |
136 | } /* ecore_x_dpms_timeouts_set */ | 136 | } |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * Returns the amount of time of inactivity before standby mode is invoked. | 139 | * Returns the amount of time of inactivity before standby mode is invoked. |
@@ -152,7 +152,7 @@ ecore_x_dpms_timeout_standby_get(void) | |||
152 | #else /* ifdef ECORE_XDPMS */ | 152 | #else /* ifdef ECORE_XDPMS */ |
153 | return 0; | 153 | return 0; |
154 | #endif /* ifdef ECORE_XDPMS */ | 154 | #endif /* ifdef ECORE_XDPMS */ |
155 | } /* ecore_x_dpms_timeout_standby_get */ | 155 | } |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * Returns the amount of time of inactivity before the second level of | 158 | * Returns the amount of time of inactivity before the second level of |
@@ -172,7 +172,7 @@ ecore_x_dpms_timeout_suspend_get(void) | |||
172 | #else /* ifdef ECORE_XDPMS */ | 172 | #else /* ifdef ECORE_XDPMS */ |
173 | return 0; | 173 | return 0; |
174 | #endif /* ifdef ECORE_XDPMS */ | 174 | #endif /* ifdef ECORE_XDPMS */ |
175 | } /* ecore_x_dpms_timeout_suspend_get */ | 175 | } |
176 | 176 | ||
177 | /** | 177 | /** |
178 | * Returns the amount of time of inactivity before the third and final | 178 | * Returns the amount of time of inactivity before the third and final |
@@ -192,11 +192,11 @@ ecore_x_dpms_timeout_off_get(void) | |||
192 | #else /* ifdef ECORE_XDPMS */ | 192 | #else /* ifdef ECORE_XDPMS */ |
193 | return 0; | 193 | return 0; |
194 | #endif /* ifdef ECORE_XDPMS */ | 194 | #endif /* ifdef ECORE_XDPMS */ |
195 | } /* ecore_x_dpms_timeout_off_get */ | 195 | } |
196 | 196 | ||
197 | /** | 197 | /** |
198 | * Sets the standby timeout (in unit of seconds). | 198 | * Sets the standby timeout (in unit of seconds). |
199 | * @param new_standby Amount of time of inactivity before standby mode will be invoked. | 199 | * @param new_timeout Amount of time of inactivity before standby mode will be invoked. |
200 | * @ingroup Ecore_X_DPMS_Group | 200 | * @ingroup Ecore_X_DPMS_Group |
201 | */ | 201 | */ |
202 | EAPI void | 202 | EAPI void |
@@ -209,11 +209,11 @@ ecore_x_dpms_timeout_standby_set(unsigned int new_timeout) | |||
209 | DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); | 209 | DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); |
210 | DPMSSetTimeouts(_ecore_x_disp, new_timeout, suspend, off); | 210 | DPMSSetTimeouts(_ecore_x_disp, new_timeout, suspend, off); |
211 | #endif /* ifdef ECORE_XDPMS */ | 211 | #endif /* ifdef ECORE_XDPMS */ |
212 | } /* ecore_x_dpms_timeout_standby_set */ | 212 | } |
213 | 213 | ||
214 | /** | 214 | /** |
215 | * Sets the suspend timeout (in unit of seconds). | 215 | * Sets the suspend timeout (in unit of seconds). |
216 | * @param suspend Amount of time of inactivity before the screen is placed into suspend mode. | 216 | * @param new_timeout Amount of time of inactivity before the screen is placed into suspend mode. |
217 | * @ingroup Ecore_X_DPMS_Group | 217 | * @ingroup Ecore_X_DPMS_Group |
218 | */ | 218 | */ |
219 | EAPI void | 219 | EAPI void |
@@ -226,11 +226,11 @@ ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout) | |||
226 | DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); | 226 | DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); |
227 | DPMSSetTimeouts(_ecore_x_disp, standby, new_timeout, off); | 227 | DPMSSetTimeouts(_ecore_x_disp, standby, new_timeout, off); |
228 | #endif /* ifdef ECORE_XDPMS */ | 228 | #endif /* ifdef ECORE_XDPMS */ |
229 | } /* ecore_x_dpms_timeout_suspend_set */ | 229 | } |
230 | 230 | ||
231 | /** | 231 | /** |
232 | * Sets the off timeout (in unit of seconds). | 232 | * Sets the off timeout (in unit of seconds). |
233 | * @param off Amount of time of inactivity before the monitor is shut off. | 233 | * @param new_timeout Amount of time of inactivity before the monitor is shut off. |
234 | * @ingroup Ecore_X_DPMS_Group | 234 | * @ingroup Ecore_X_DPMS_Group |
235 | */ | 235 | */ |
236 | EAPI void | 236 | EAPI void |
@@ -243,5 +243,5 @@ ecore_x_dpms_timeout_off_set(unsigned int new_timeout) | |||
243 | DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); | 243 | DPMSGetTimeouts(_ecore_x_disp, &standby, &suspend, &off); |
244 | DPMSSetTimeouts(_ecore_x_disp, standby, suspend, new_timeout); | 244 | DPMSSetTimeouts(_ecore_x_disp, standby, suspend, new_timeout); |
245 | #endif /* ifdef ECORE_XDPMS */ | 245 | #endif /* ifdef ECORE_XDPMS */ |
246 | } /* ecore_x_dpms_timeout_off_set */ | 246 | } |
247 | 247 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c index a64060b..d1b4111 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_drawable.c | |||
@@ -21,10 +21,10 @@ | |||
21 | */ | 21 | */ |
22 | EAPI void | 22 | EAPI void |
23 | ecore_x_drawable_geometry_get(Ecore_X_Drawable d, | 23 | ecore_x_drawable_geometry_get(Ecore_X_Drawable d, |
24 | int *x, | 24 | int *x, |
25 | int *y, | 25 | int *y, |
26 | int *w, | 26 | int *w, |
27 | int *h) | 27 | int *h) |
28 | { | 28 | { |
29 | Window dummy_win; | 29 | Window dummy_win; |
30 | int ret_x, ret_y; | 30 | int ret_x, ret_y; |
@@ -51,7 +51,7 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable d, | |||
51 | 51 | ||
52 | if (h) | 52 | if (h) |
53 | *h = (int)ret_h; | 53 | *h = (int)ret_h; |
54 | } /* ecore_x_drawable_geometry_get */ | 54 | } |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * Retrieves the width of the border of the given drawable. | 57 | * Retrieves the width of the border of the given drawable. |
@@ -72,7 +72,7 @@ ecore_x_drawable_border_width_get(Ecore_X_Drawable d) | |||
72 | border_ret = 0; | 72 | border_ret = 0; |
73 | 73 | ||
74 | return (int)border_ret; | 74 | return (int)border_ret; |
75 | } /* ecore_x_drawable_border_width_get */ | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Retrieves the depth of the given drawable. | 78 | * Retrieves the depth of the given drawable. |
@@ -93,7 +93,7 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d) | |||
93 | depth_ret = 0; | 93 | depth_ret = 0; |
94 | 94 | ||
95 | return (int)depth_ret; | 95 | return (int)depth_ret; |
96 | } /* ecore_x_drawable_depth_get */ | 96 | } |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * Fill the specified rectangle on a drawable. | 99 | * Fill the specified rectangle on a drawable. |
@@ -106,13 +106,13 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d) | |||
106 | */ | 106 | */ |
107 | EAPI void | 107 | EAPI void |
108 | ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, | 108 | ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, |
109 | Ecore_X_GC gc, | 109 | Ecore_X_GC gc, |
110 | int x, | 110 | int x, |
111 | int y, | 111 | int y, |
112 | int width, | 112 | int width, |
113 | int height) | 113 | int height) |
114 | { | 114 | { |
115 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 115 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
116 | XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height); | 116 | XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height); |
117 | } /* ecore_x_drawable_rectangle_fill */ | 117 | } |
118 | 118 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c index d357c9b..5966bbd 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_e.c | |||
@@ -14,14 +14,14 @@ | |||
14 | EAPI void | 14 | EAPI void |
15 | ecore_x_e_init(void) | 15 | ecore_x_e_init(void) |
16 | { | 16 | { |
17 | } /* ecore_x_e_init */ | 17 | } |
18 | 18 | ||
19 | EAPI void | 19 | EAPI void |
20 | ecore_x_e_frame_size_set(Ecore_X_Window win, | 20 | ecore_x_e_frame_size_set(Ecore_X_Window win, |
21 | int fl, | 21 | int fl, |
22 | int fr, | 22 | int fr, |
23 | int ft, | 23 | int ft, |
24 | int fb) | 24 | int fb) |
25 | { | 25 | { |
26 | unsigned int frames[4]; | 26 | unsigned int frames[4]; |
27 | 27 | ||
@@ -31,16 +31,16 @@ ecore_x_e_frame_size_set(Ecore_X_Window win, | |||
31 | frames[2] = ft; | 31 | frames[2] = ft; |
32 | frames[3] = fb; | 32 | frames[3] = fb; |
33 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_FRAME_SIZE, frames, 4); | 33 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_FRAME_SIZE, frames, 4); |
34 | } /* ecore_x_e_frame_size_set */ | 34 | } |
35 | 35 | ||
36 | EAPI void | 36 | EAPI void |
37 | ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, | 37 | ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, |
38 | unsigned int is_keyboard) | 38 | unsigned int is_keyboard) |
39 | { | 39 | { |
40 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 40 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
41 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD, | 41 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD, |
42 | &is_keyboard, 1); | 42 | &is_keyboard, 1); |
43 | } /* ecore_x_e_virtual_keyboard_set */ | 43 | } |
44 | 44 | ||
45 | EAPI Eina_Bool | 45 | EAPI Eina_Bool |
46 | ecore_x_e_virtual_keyboard_get(Ecore_X_Window win) | 46 | ecore_x_e_virtual_keyboard_get(Ecore_X_Window win) |
@@ -53,7 +53,7 @@ ecore_x_e_virtual_keyboard_get(Ecore_X_Window win) | |||
53 | return EINA_FALSE; | 53 | return EINA_FALSE; |
54 | 54 | ||
55 | return val ? EINA_TRUE : EINA_FALSE; | 55 | return val ? EINA_TRUE : EINA_FALSE; |
56 | } /* ecore_x_e_virtual_keyboard_get */ | 56 | } |
57 | 57 | ||
58 | static Ecore_X_Virtual_Keyboard_State | 58 | static Ecore_X_Virtual_Keyboard_State |
59 | _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom) | 59 | _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom) |
@@ -104,7 +104,7 @@ _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom) | |||
104 | return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME; | 104 | return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME; |
105 | 105 | ||
106 | return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; | 106 | return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; |
107 | } /* _ecore_x_e_vkbd_state_get */ | 107 | } |
108 | 108 | ||
109 | static Ecore_X_Atom | 109 | static Ecore_X_Atom |
110 | _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state) | 110 | _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state) |
@@ -157,12 +157,12 @@ _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state) | |||
157 | return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME; | 157 | return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME; |
158 | 158 | ||
159 | default: break; | 159 | default: break; |
160 | } /* switch */ | 160 | } |
161 | return 0; | 161 | return 0; |
162 | } /* _ecore_x_e_vkbd_atom_get */ | 162 | } |
163 | 163 | ||
164 | EAPI void | 164 | EAPI void |
165 | ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, | 165 | ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, |
166 | Ecore_X_Virtual_Keyboard_State state) | 166 | Ecore_X_Virtual_Keyboard_State state) |
167 | { | 167 | { |
168 | Ecore_X_Atom atom = 0; | 168 | Ecore_X_Atom atom = 0; |
@@ -171,7 +171,7 @@ ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, | |||
171 | atom = _ecore_x_e_vkbd_atom_get(state); | 171 | atom = _ecore_x_e_vkbd_atom_get(state); |
172 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE, | 172 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE, |
173 | &atom, 1); | 173 | &atom, 1); |
174 | } /* ecore_x_e_virtual_keyboard_state_set */ | 174 | } |
175 | 175 | ||
176 | EAPI Ecore_X_Virtual_Keyboard_State | 176 | EAPI Ecore_X_Virtual_Keyboard_State |
177 | ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win) | 177 | ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win) |
@@ -184,10 +184,10 @@ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win) | |||
184 | return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; | 184 | return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN; |
185 | 185 | ||
186 | return _ecore_x_e_vkbd_state_get(atom); | 186 | return _ecore_x_e_vkbd_state_get(atom); |
187 | } /* ecore_x_e_virtual_keyboard_state_get */ | 187 | } |
188 | 188 | ||
189 | EAPI void | 189 | EAPI void |
190 | ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, | 190 | ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, |
191 | Ecore_X_Virtual_Keyboard_State state) | 191 | Ecore_X_Virtual_Keyboard_State state) |
192 | { | 192 | { |
193 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 193 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -195,7 +195,7 @@ ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, | |||
195 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 195 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
196 | _ecore_x_e_vkbd_atom_get(state), | 196 | _ecore_x_e_vkbd_atom_get(state), |
197 | 0, 0, 0, 0); | 197 | 0, 0, 0, 0); |
198 | } /* ecore_x_e_virtual_keyboard_state_send */ | 198 | } |
199 | 199 | ||
200 | static Ecore_X_Atom | 200 | static Ecore_X_Atom |
201 | _ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode) | 201 | _ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode) |
@@ -213,9 +213,9 @@ _ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode) | |||
213 | 213 | ||
214 | default: | 214 | default: |
215 | break; | 215 | break; |
216 | } /* switch */ | 216 | } |
217 | return ECORE_X_ILLUME_MODE_UNKNOWN; | 217 | return ECORE_X_ILLUME_MODE_UNKNOWN; |
218 | } /* _ecore_x_e_illume_atom_get */ | 218 | } |
219 | 219 | ||
220 | static Ecore_X_Illume_Mode | 220 | static Ecore_X_Illume_Mode |
221 | _ecore_x_e_illume_mode_get(Ecore_X_Atom atom) | 221 | _ecore_x_e_illume_mode_get(Ecore_X_Atom atom) |
@@ -230,7 +230,7 @@ _ecore_x_e_illume_mode_get(Ecore_X_Atom atom) | |||
230 | return ECORE_X_ILLUME_MODE_DUAL_LEFT; | 230 | return ECORE_X_ILLUME_MODE_DUAL_LEFT; |
231 | 231 | ||
232 | return ECORE_X_ILLUME_MODE_UNKNOWN; | 232 | return ECORE_X_ILLUME_MODE_UNKNOWN; |
233 | } /* _ecore_x_e_illume_mode_get */ | 233 | } |
234 | 234 | ||
235 | EAPI void | 235 | EAPI void |
236 | ecore_x_e_illume_zone_set(Ecore_X_Window win, | 236 | ecore_x_e_illume_zone_set(Ecore_X_Window win, |
@@ -239,7 +239,7 @@ ecore_x_e_illume_zone_set(Ecore_X_Window win, | |||
239 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 239 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
240 | ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE, | 240 | ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE, |
241 | &zone, 1); | 241 | &zone, 1); |
242 | } /* ecore_x_e_illume_zone_set */ | 242 | } |
243 | 243 | ||
244 | EAPI Ecore_X_Window | 244 | EAPI Ecore_X_Window |
245 | ecore_x_e_illume_zone_get(Ecore_X_Window win) | 245 | ecore_x_e_illume_zone_get(Ecore_X_Window win) |
@@ -252,26 +252,26 @@ ecore_x_e_illume_zone_get(Ecore_X_Window win) | |||
252 | return 0; | 252 | return 0; |
253 | 253 | ||
254 | return zone; | 254 | return zone; |
255 | } /* ecore_x_e_illume_zone_get */ | 255 | } |
256 | 256 | ||
257 | EAPI void | 257 | EAPI void |
258 | ecore_x_e_illume_zone_list_set(Ecore_X_Window win, | 258 | ecore_x_e_illume_zone_list_set(Ecore_X_Window win, |
259 | Ecore_X_Window *zones, | 259 | Ecore_X_Window *zones, |
260 | unsigned int n_zones) | 260 | unsigned int n_zones) |
261 | { | 261 | { |
262 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 262 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
263 | ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST, | 263 | ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST, |
264 | zones, n_zones); | 264 | zones, n_zones); |
265 | } /* ecore_x_e_illume_zone_list_set */ | 265 | } |
266 | 266 | ||
267 | EAPI void | 267 | EAPI void |
268 | ecore_x_e_illume_conformant_set(Ecore_X_Window win, | 268 | ecore_x_e_illume_conformant_set(Ecore_X_Window win, |
269 | unsigned int is_conformant) | 269 | unsigned int is_conformant) |
270 | { | 270 | { |
271 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 271 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
272 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, | 272 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, |
273 | &is_conformant, 1); | 273 | &is_conformant, 1); |
274 | } /* ecore_x_e_illume_conformant_set */ | 274 | } |
275 | 275 | ||
276 | EAPI Eina_Bool | 276 | EAPI Eina_Bool |
277 | ecore_x_e_illume_conformant_get(Ecore_X_Window win) | 277 | ecore_x_e_illume_conformant_get(Ecore_X_Window win) |
@@ -284,10 +284,10 @@ ecore_x_e_illume_conformant_get(Ecore_X_Window win) | |||
284 | return EINA_FALSE; | 284 | return EINA_FALSE; |
285 | 285 | ||
286 | return val ? EINA_TRUE : EINA_FALSE; | 286 | return val ? EINA_TRUE : EINA_FALSE; |
287 | } /* ecore_x_e_illume_conformant_get */ | 287 | } |
288 | 288 | ||
289 | EAPI void | 289 | EAPI void |
290 | ecore_x_e_illume_mode_set(Ecore_X_Window win, | 290 | ecore_x_e_illume_mode_set(Ecore_X_Window win, |
291 | Ecore_X_Illume_Mode mode) | 291 | Ecore_X_Illume_Mode mode) |
292 | { | 292 | { |
293 | Ecore_X_Atom atom = 0; | 293 | Ecore_X_Atom atom = 0; |
@@ -296,7 +296,7 @@ ecore_x_e_illume_mode_set(Ecore_X_Window win, | |||
296 | atom = _ecore_x_e_illume_atom_get(mode); | 296 | atom = _ecore_x_e_illume_atom_get(mode); |
297 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE, | 297 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE, |
298 | &atom, 1); | 298 | &atom, 1); |
299 | } /* ecore_x_e_illume_mode_set */ | 299 | } |
300 | 300 | ||
301 | EAPI Ecore_X_Illume_Mode | 301 | EAPI Ecore_X_Illume_Mode |
302 | ecore_x_e_illume_mode_get(Ecore_X_Window win) | 302 | ecore_x_e_illume_mode_get(Ecore_X_Window win) |
@@ -308,10 +308,10 @@ ecore_x_e_illume_mode_get(Ecore_X_Window win) | |||
308 | return ECORE_X_ILLUME_MODE_UNKNOWN; | 308 | return ECORE_X_ILLUME_MODE_UNKNOWN; |
309 | 309 | ||
310 | return _ecore_x_e_illume_mode_get(atom); | 310 | return _ecore_x_e_illume_mode_get(atom); |
311 | } /* ecore_x_e_illume_mode_get */ | 311 | } |
312 | 312 | ||
313 | EAPI void | 313 | EAPI void |
314 | ecore_x_e_illume_mode_send(Ecore_X_Window win, | 314 | ecore_x_e_illume_mode_send(Ecore_X_Window win, |
315 | Ecore_X_Illume_Mode mode) | 315 | Ecore_X_Illume_Mode mode) |
316 | { | 316 | { |
317 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 317 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -319,7 +319,7 @@ ecore_x_e_illume_mode_send(Ecore_X_Window win, | |||
319 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 319 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
320 | _ecore_x_e_illume_atom_get(mode), | 320 | _ecore_x_e_illume_atom_get(mode), |
321 | 0, 0, 0, 0); | 321 | 0, 0, 0, 0); |
322 | } /* ecore_x_e_illume_mode_send */ | 322 | } |
323 | 323 | ||
324 | EAPI void | 324 | EAPI void |
325 | ecore_x_e_illume_focus_back_send(Ecore_X_Window win) | 325 | ecore_x_e_illume_focus_back_send(Ecore_X_Window win) |
@@ -328,7 +328,7 @@ ecore_x_e_illume_focus_back_send(Ecore_X_Window win) | |||
328 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK, | 328 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK, |
329 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 329 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
330 | 1, 0, 0, 0, 0); | 330 | 1, 0, 0, 0, 0); |
331 | } /* ecore_x_e_illume_focus_back_send */ | 331 | } |
332 | 332 | ||
333 | EAPI void | 333 | EAPI void |
334 | ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) | 334 | ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) |
@@ -337,7 +337,7 @@ ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) | |||
337 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD, | 337 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD, |
338 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 338 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
339 | 1, 0, 0, 0, 0); | 339 | 1, 0, 0, 0, 0); |
340 | } /* ecore_x_e_illume_focus_forward_send */ | 340 | } |
341 | 341 | ||
342 | EAPI void | 342 | EAPI void |
343 | ecore_x_e_illume_focus_home_send(Ecore_X_Window win) | 343 | ecore_x_e_illume_focus_home_send(Ecore_X_Window win) |
@@ -346,7 +346,7 @@ ecore_x_e_illume_focus_home_send(Ecore_X_Window win) | |||
346 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME, | 346 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME, |
347 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 347 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
348 | 1, 0, 0, 0, 0); | 348 | 1, 0, 0, 0, 0); |
349 | } /* ecore_x_e_illume_focus_home_send */ | 349 | } |
350 | 350 | ||
351 | EAPI void | 351 | EAPI void |
352 | ecore_x_e_illume_close_send(Ecore_X_Window win) | 352 | ecore_x_e_illume_close_send(Ecore_X_Window win) |
@@ -355,7 +355,7 @@ ecore_x_e_illume_close_send(Ecore_X_Window win) | |||
355 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE, | 355 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE, |
356 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 356 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
357 | 1, 0, 0, 0, 0); | 357 | 1, 0, 0, 0, 0); |
358 | } /* ecore_x_e_illume_close_send */ | 358 | } |
359 | 359 | ||
360 | EAPI void | 360 | EAPI void |
361 | ecore_x_e_illume_home_new_send(Ecore_X_Window win) | 361 | ecore_x_e_illume_home_new_send(Ecore_X_Window win) |
@@ -364,7 +364,7 @@ ecore_x_e_illume_home_new_send(Ecore_X_Window win) | |||
364 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW, | 364 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW, |
365 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 365 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
366 | 1, 0, 0, 0, 0); | 366 | 1, 0, 0, 0, 0); |
367 | } /* ecore_x_e_illume_home_new_send */ | 367 | } |
368 | 368 | ||
369 | EAPI void | 369 | EAPI void |
370 | ecore_x_e_illume_home_del_send(Ecore_X_Window win) | 370 | ecore_x_e_illume_home_del_send(Ecore_X_Window win) |
@@ -373,15 +373,15 @@ ecore_x_e_illume_home_del_send(Ecore_X_Window win) | |||
373 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL, | 373 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL, |
374 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 374 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
375 | 1, 0, 0, 0, 0); | 375 | 1, 0, 0, 0, 0); |
376 | } /* ecore_x_e_illume_home_del_send */ | 376 | } |
377 | 377 | ||
378 | EAPI void | 378 | EAPI void |
379 | ecore_x_e_illume_drag_set(Ecore_X_Window win, | 379 | ecore_x_e_illume_drag_set(Ecore_X_Window win, |
380 | unsigned int drag) | 380 | unsigned int drag) |
381 | { | 381 | { |
382 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 382 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
383 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1); | 383 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1); |
384 | } /* ecore_x_e_illume_drag_set */ | 384 | } |
385 | 385 | ||
386 | EAPI Eina_Bool | 386 | EAPI Eina_Bool |
387 | ecore_x_e_illume_drag_get(Ecore_X_Window win) | 387 | ecore_x_e_illume_drag_get(Ecore_X_Window win) |
@@ -393,16 +393,16 @@ ecore_x_e_illume_drag_get(Ecore_X_Window win) | |||
393 | return EINA_FALSE; | 393 | return EINA_FALSE; |
394 | 394 | ||
395 | return val ? EINA_TRUE : EINA_FALSE; | 395 | return val ? EINA_TRUE : EINA_FALSE; |
396 | } /* ecore_x_e_illume_drag_get */ | 396 | } |
397 | 397 | ||
398 | EAPI void | 398 | EAPI void |
399 | ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, | 399 | ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, |
400 | unsigned int is_locked) | 400 | unsigned int is_locked) |
401 | { | 401 | { |
402 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 402 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
403 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, | 403 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, |
404 | &is_locked, 1); | 404 | &is_locked, 1); |
405 | } /* ecore_x_e_illume_drag_locked_set */ | 405 | } |
406 | 406 | ||
407 | EAPI Eina_Bool | 407 | EAPI Eina_Bool |
408 | ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) | 408 | ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) |
@@ -415,7 +415,7 @@ ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) | |||
415 | return EINA_FALSE; | 415 | return EINA_FALSE; |
416 | 416 | ||
417 | return val ? EINA_TRUE : EINA_FALSE; | 417 | return val ? EINA_TRUE : EINA_FALSE; |
418 | } /* ecore_x_e_illume_drag_locked_get */ | 418 | } |
419 | 419 | ||
420 | EAPI void | 420 | EAPI void |
421 | ecore_x_e_illume_drag_start_send(Ecore_X_Window win) | 421 | ecore_x_e_illume_drag_start_send(Ecore_X_Window win) |
@@ -424,7 +424,7 @@ ecore_x_e_illume_drag_start_send(Ecore_X_Window win) | |||
424 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START, | 424 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START, |
425 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 425 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
426 | 1, 0, 0, 0, 0); | 426 | 1, 0, 0, 0, 0); |
427 | } /* ecore_x_e_illume_drag_start_send */ | 427 | } |
428 | 428 | ||
429 | EAPI void | 429 | EAPI void |
430 | ecore_x_e_illume_drag_end_send(Ecore_X_Window win) | 430 | ecore_x_e_illume_drag_end_send(Ecore_X_Window win) |
@@ -433,14 +433,14 @@ ecore_x_e_illume_drag_end_send(Ecore_X_Window win) | |||
433 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END, | 433 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END, |
434 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 434 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
435 | 1, 0, 0, 0, 0); | 435 | 1, 0, 0, 0, 0); |
436 | } /* ecore_x_e_illume_drag_end_send */ | 436 | } |
437 | 437 | ||
438 | EAPI void | 438 | EAPI void |
439 | ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, | 439 | ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, |
440 | int x, | 440 | int x, |
441 | int y, | 441 | int y, |
442 | int w, | 442 | int w, |
443 | int h) | 443 | int h) |
444 | { | 444 | { |
445 | unsigned int geom[4]; | 445 | unsigned int geom[4]; |
446 | 446 | ||
@@ -451,14 +451,14 @@ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, | |||
451 | geom[3] = h; | 451 | geom[3] = h; |
452 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, | 452 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, |
453 | geom, 4); | 453 | geom, 4); |
454 | } /* ecore_x_e_illume_indicator_geometry_set */ | 454 | } |
455 | 455 | ||
456 | EAPI Eina_Bool | 456 | EAPI Eina_Bool |
457 | ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, | 457 | ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, |
458 | int *x, | 458 | int *x, |
459 | int *y, | 459 | int *y, |
460 | int *w, | 460 | int *w, |
461 | int *h) | 461 | int *h) |
462 | { | 462 | { |
463 | int ret = 0; | 463 | int ret = 0; |
464 | unsigned int geom[4]; | 464 | unsigned int geom[4]; |
@@ -484,14 +484,14 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, | |||
484 | *h = geom[3]; | 484 | *h = geom[3]; |
485 | 485 | ||
486 | return EINA_TRUE; | 486 | return EINA_TRUE; |
487 | } /* ecore_x_e_illume_indicator_geometry_get */ | 487 | } |
488 | 488 | ||
489 | EAPI void | 489 | EAPI void |
490 | ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, | 490 | ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, |
491 | int x, | 491 | int x, |
492 | int y, | 492 | int y, |
493 | int w, | 493 | int w, |
494 | int h) | 494 | int h) |
495 | { | 495 | { |
496 | unsigned int geom[4]; | 496 | unsigned int geom[4]; |
497 | 497 | ||
@@ -502,14 +502,14 @@ ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, | |||
502 | geom[3] = h; | 502 | geom[3] = h; |
503 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, | 503 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, |
504 | geom, 4); | 504 | geom, 4); |
505 | } /* ecore_x_e_illume_softkey_geometry_set */ | 505 | } |
506 | 506 | ||
507 | EAPI Eina_Bool | 507 | EAPI Eina_Bool |
508 | ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, | 508 | ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, |
509 | int *x, | 509 | int *x, |
510 | int *y, | 510 | int *y, |
511 | int *w, | 511 | int *w, |
512 | int *h) | 512 | int *h) |
513 | { | 513 | { |
514 | int ret = 0; | 514 | int ret = 0; |
515 | unsigned int geom[4]; | 515 | unsigned int geom[4]; |
@@ -535,14 +535,14 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, | |||
535 | *h = geom[3]; | 535 | *h = geom[3]; |
536 | 536 | ||
537 | return EINA_TRUE; | 537 | return EINA_TRUE; |
538 | } /* ecore_x_e_illume_softkey_geometry_get */ | 538 | } |
539 | 539 | ||
540 | EAPI void | 540 | EAPI void |
541 | ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, | 541 | ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, |
542 | int x, | 542 | int x, |
543 | int y, | 543 | int y, |
544 | int w, | 544 | int w, |
545 | int h) | 545 | int h) |
546 | { | 546 | { |
547 | unsigned int geom[4]; | 547 | unsigned int geom[4]; |
548 | 548 | ||
@@ -553,14 +553,14 @@ ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, | |||
553 | geom[3] = h; | 553 | geom[3] = h; |
554 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, | 554 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, |
555 | geom, 4); | 555 | geom, 4); |
556 | } /* ecore_x_e_illume_keyboard_geometry_set */ | 556 | } |
557 | 557 | ||
558 | EAPI Eina_Bool | 558 | EAPI Eina_Bool |
559 | ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, | 559 | ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, |
560 | int *x, | 560 | int *x, |
561 | int *y, | 561 | int *y, |
562 | int *w, | 562 | int *w, |
563 | int *h) | 563 | int *h) |
564 | { | 564 | { |
565 | int ret = 0; | 565 | int ret = 0; |
566 | unsigned int geom[4]; | 566 | unsigned int geom[4]; |
@@ -586,7 +586,7 @@ ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, | |||
586 | *h = geom[3]; | 586 | *h = geom[3]; |
587 | 587 | ||
588 | return EINA_TRUE; | 588 | return EINA_TRUE; |
589 | } /* ecore_x_e_illume_keyboard_geometry_get */ | 589 | } |
590 | 590 | ||
591 | static Ecore_X_Atom | 591 | static Ecore_X_Atom |
592 | _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state) | 592 | _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state) |
@@ -601,9 +601,9 @@ _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state) | |||
601 | 601 | ||
602 | default: | 602 | default: |
603 | break; | 603 | break; |
604 | } /* switch */ | 604 | } |
605 | return 0; | 605 | return 0; |
606 | } /* _ecore_x_e_quickpanel_atom_get */ | 606 | } |
607 | 607 | ||
608 | static Ecore_X_Illume_Quickpanel_State | 608 | static Ecore_X_Illume_Quickpanel_State |
609 | _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom) | 609 | _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom) |
@@ -615,16 +615,16 @@ _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom) | |||
615 | return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF; | 615 | return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF; |
616 | 616 | ||
617 | return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; | 617 | return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; |
618 | } /* _ecore_x_e_quickpanel_state_get */ | 618 | } |
619 | 619 | ||
620 | EAPI void | 620 | EAPI void |
621 | ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, | 621 | ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, |
622 | unsigned int is_quickpanel) | 622 | unsigned int is_quickpanel) |
623 | { | 623 | { |
624 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 624 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
625 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, | 625 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, |
626 | &is_quickpanel, 1); | 626 | &is_quickpanel, 1); |
627 | } /* ecore_x_e_illume_quickpanel_set */ | 627 | } |
628 | 628 | ||
629 | EAPI Eina_Bool | 629 | EAPI Eina_Bool |
630 | ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) | 630 | ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) |
@@ -637,10 +637,10 @@ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) | |||
637 | return EINA_FALSE; | 637 | return EINA_FALSE; |
638 | 638 | ||
639 | return val ? EINA_TRUE : EINA_FALSE; | 639 | return val ? EINA_TRUE : EINA_FALSE; |
640 | } /* ecore_x_e_illume_quickpanel_get */ | 640 | } |
641 | 641 | ||
642 | EAPI void | 642 | EAPI void |
643 | ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, | 643 | ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, |
644 | Ecore_X_Illume_Quickpanel_State state) | 644 | Ecore_X_Illume_Quickpanel_State state) |
645 | { | 645 | { |
646 | Ecore_X_Atom atom = 0; | 646 | Ecore_X_Atom atom = 0; |
@@ -649,7 +649,7 @@ ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, | |||
649 | atom = _ecore_x_e_quickpanel_atom_get(state); | 649 | atom = _ecore_x_e_quickpanel_atom_get(state); |
650 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE, | 650 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE, |
651 | &atom, 1); | 651 | &atom, 1); |
652 | } /* ecore_x_e_illume_quickpanel_state_set */ | 652 | } |
653 | 653 | ||
654 | EAPI Ecore_X_Illume_Quickpanel_State | 654 | EAPI Ecore_X_Illume_Quickpanel_State |
655 | ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) | 655 | ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) |
@@ -663,10 +663,10 @@ ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) | |||
663 | return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; | 663 | return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN; |
664 | 664 | ||
665 | return _ecore_x_e_quickpanel_state_get(atom); | 665 | return _ecore_x_e_quickpanel_state_get(atom); |
666 | } /* ecore_x_e_illume_quickpanel_state_get */ | 666 | } |
667 | 667 | ||
668 | EAPI void | 668 | EAPI void |
669 | ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, | 669 | ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, |
670 | Ecore_X_Illume_Quickpanel_State state) | 670 | Ecore_X_Illume_Quickpanel_State state) |
671 | { | 671 | { |
672 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 672 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -674,7 +674,7 @@ ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, | |||
674 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 674 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
675 | _ecore_x_e_quickpanel_atom_get(state), | 675 | _ecore_x_e_quickpanel_atom_get(state), |
676 | 0, 0, 0, 0); | 676 | 0, 0, 0, 0); |
677 | } /* ecore_x_e_illume_quickpanel_state_send */ | 677 | } |
678 | 678 | ||
679 | EAPI void | 679 | EAPI void |
680 | ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) | 680 | ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) |
@@ -684,17 +684,17 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) | |||
684 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE, | 684 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE, |
685 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 685 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
686 | 0, 0, 0, 0, 0); | 686 | 0, 0, 0, 0, 0); |
687 | } /* ecore_x_e_illume_quickpanel_state_toggle */ | 687 | } |
688 | 688 | ||
689 | EAPI void | 689 | EAPI void |
690 | ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, | 690 | ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, |
691 | unsigned int priority) | 691 | unsigned int priority) |
692 | { | 692 | { |
693 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 693 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
694 | ecore_x_window_prop_card32_set(win, | 694 | ecore_x_window_prop_card32_set(win, |
695 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, | 695 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, |
696 | &priority, 1); | 696 | &priority, 1); |
697 | } /* ecore_x_e_illume_quickpanel_priority_major_set */ | 697 | } |
698 | 698 | ||
699 | EAPI int | 699 | EAPI int |
700 | ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) | 700 | ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) |
@@ -708,17 +708,17 @@ ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) | |||
708 | return 0; | 708 | return 0; |
709 | 709 | ||
710 | return val; | 710 | return val; |
711 | } /* ecore_x_e_illume_quickpanel_priority_major_get */ | 711 | } |
712 | 712 | ||
713 | EAPI void | 713 | EAPI void |
714 | ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, | 714 | ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, |
715 | unsigned int priority) | 715 | unsigned int priority) |
716 | { | 716 | { |
717 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 717 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
718 | ecore_x_window_prop_card32_set(win, | 718 | ecore_x_window_prop_card32_set(win, |
719 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, | 719 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, |
720 | &priority, 1); | 720 | &priority, 1); |
721 | } /* ecore_x_e_illume_quickpanel_priority_minor_set */ | 721 | } |
722 | 722 | ||
723 | EAPI int | 723 | EAPI int |
724 | ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) | 724 | ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) |
@@ -732,17 +732,17 @@ ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) | |||
732 | return 0; | 732 | return 0; |
733 | 733 | ||
734 | return val; | 734 | return val; |
735 | } /* ecore_x_e_illume_quickpanel_priority_minor_get */ | 735 | } |
736 | 736 | ||
737 | EAPI void | 737 | EAPI void |
738 | ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, | 738 | ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, |
739 | unsigned int zone) | 739 | unsigned int zone) |
740 | { | 740 | { |
741 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 741 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
742 | ecore_x_window_prop_card32_set(win, | 742 | ecore_x_window_prop_card32_set(win, |
743 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, | 743 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, |
744 | &zone, 1); | 744 | &zone, 1); |
745 | } /* ecore_x_e_illume_quickpanel_zone_set */ | 745 | } |
746 | 746 | ||
747 | EAPI int | 747 | EAPI int |
748 | ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) | 748 | ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) |
@@ -756,7 +756,7 @@ ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) | |||
756 | return 0; | 756 | return 0; |
757 | 757 | ||
758 | return val; | 758 | return val; |
759 | } /* ecore_x_e_illume_quickpanel_zone_get */ | 759 | } |
760 | 760 | ||
761 | EAPI void | 761 | EAPI void |
762 | ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) | 762 | ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) |
@@ -766,10 +766,10 @@ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) | |||
766 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE, | 766 | ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE, |
767 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | 767 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, |
768 | 1, 0, 0, 0, 0); | 768 | 1, 0, 0, 0, 0); |
769 | } /* ecore_x_e_illume_quickpanel_position_update_send */ | 769 | } |
770 | 770 | ||
771 | EAPI void | 771 | EAPI void |
772 | ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, | 772 | ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, |
773 | Ecore_X_Sync_Counter counter) | 773 | Ecore_X_Sync_Counter counter) |
774 | { | 774 | { |
775 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 775 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -778,7 +778,7 @@ ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, | |||
778 | ECORE_X_ATOM_CARDINAL, &counter, 1); | 778 | ECORE_X_ATOM_CARDINAL, &counter, 1); |
779 | else | 779 | else |
780 | ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER); | 780 | ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER); |
781 | } /* ecore_x_e_comp_sync_counter_set */ | 781 | } |
782 | 782 | ||
783 | EAPI Ecore_X_Sync_Counter | 783 | EAPI Ecore_X_Sync_Counter |
784 | ecore_x_e_comp_sync_counter_get(Ecore_X_Window win) | 784 | ecore_x_e_comp_sync_counter_get(Ecore_X_Window win) |
@@ -796,7 +796,7 @@ ecore_x_e_comp_sync_counter_get(Ecore_X_Window win) | |||
796 | return 0; | 796 | return 0; |
797 | 797 | ||
798 | return counter; | 798 | return counter; |
799 | } /* ecore_x_e_comp_sync_counter_get */ | 799 | } |
800 | 800 | ||
801 | EAPI void | 801 | EAPI void |
802 | ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, | 802 | ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, |
@@ -822,13 +822,13 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, | |||
822 | XSendEvent(_ecore_x_disp, root, False, | 822 | XSendEvent(_ecore_x_disp, root, False, |
823 | SubstructureRedirectMask | SubstructureNotifyMask, | 823 | SubstructureRedirectMask | SubstructureNotifyMask, |
824 | &xev); | 824 | &xev); |
825 | } /* ecore_x_e_comp_sync_draw_done_send */ | 825 | } |
826 | 826 | ||
827 | EAPI void | 827 | EAPI void |
828 | ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, | 828 | ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, |
829 | Ecore_X_Window win, | 829 | Ecore_X_Window win, |
830 | int w, | 830 | int w, |
831 | int h) | 831 | int h) |
832 | { | 832 | { |
833 | XEvent xev; | 833 | XEvent xev; |
834 | 834 | ||
@@ -850,11 +850,11 @@ ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, | |||
850 | XSendEvent(_ecore_x_disp, root, False, | 850 | XSendEvent(_ecore_x_disp, root, False, |
851 | SubstructureRedirectMask | SubstructureNotifyMask, | 851 | SubstructureRedirectMask | SubstructureNotifyMask, |
852 | &xev); | 852 | &xev); |
853 | } /* ecore_x_e_comp_sync_draw_done_send */ | 853 | } |
854 | 854 | ||
855 | EAPI void | 855 | EAPI void |
856 | ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, | 856 | ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, |
857 | Eina_Bool enabled) | 857 | Eina_Bool enabled) |
858 | { | 858 | { |
859 | Ecore_X_Window win; | 859 | Ecore_X_Window win; |
860 | 860 | ||
@@ -887,7 +887,7 @@ ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, | |||
887 | ecore_x_window_free(win); | 887 | ecore_x_window_free(win); |
888 | } | 888 | } |
889 | } | 889 | } |
890 | } /* ecore_x_e_comp_sync_supported_set */ | 890 | } |
891 | 891 | ||
892 | EAPI Eina_Bool | 892 | EAPI Eina_Bool |
893 | ecore_x_e_comp_sync_supported_get(Ecore_X_Window root) | 893 | ecore_x_e_comp_sync_supported_get(Ecore_X_Window root) |
@@ -916,7 +916,7 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root) | |||
916 | } | 916 | } |
917 | 917 | ||
918 | return EINA_FALSE; | 918 | return EINA_FALSE; |
919 | } /* ecore_x_e_comp_sync_supported_get */ | 919 | } |
920 | 920 | ||
921 | EAPI void | 921 | EAPI void |
922 | ecore_x_e_comp_sync_begin_send(Ecore_X_Window win) | 922 | ecore_x_e_comp_sync_begin_send(Ecore_X_Window win) |
@@ -938,7 +938,7 @@ ecore_x_e_comp_sync_begin_send(Ecore_X_Window win) | |||
938 | XSendEvent(_ecore_x_disp, win, False, | 938 | XSendEvent(_ecore_x_disp, win, False, |
939 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, | 939 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, |
940 | &xev); | 940 | &xev); |
941 | } /* ecore_x_e_comp_sync_begin_send */ | 941 | } |
942 | 942 | ||
943 | EAPI void | 943 | EAPI void |
944 | ecore_x_e_comp_sync_end_send(Ecore_X_Window win) | 944 | ecore_x_e_comp_sync_end_send(Ecore_X_Window win) |
@@ -960,7 +960,7 @@ ecore_x_e_comp_sync_end_send(Ecore_X_Window win) | |||
960 | XSendEvent(_ecore_x_disp, win, False, | 960 | XSendEvent(_ecore_x_disp, win, False, |
961 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, | 961 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, |
962 | &xev); | 962 | &xev); |
963 | } /* ecore_x_e_comp_sync_end_send */ | 963 | } |
964 | 964 | ||
965 | EAPI void | 965 | EAPI void |
966 | ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win) | 966 | ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win) |
@@ -982,7 +982,7 @@ ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win) | |||
982 | XSendEvent(_ecore_x_disp, win, False, | 982 | XSendEvent(_ecore_x_disp, win, False, |
983 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, | 983 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, |
984 | &xev); | 984 | &xev); |
985 | } /* ecore_x_e_comp_sync_cancel_send */ | 985 | } |
986 | 986 | ||
987 | EAPI void | 987 | EAPI void |
988 | ecore_x_e_comp_flush_send(Ecore_X_Window win) | 988 | ecore_x_e_comp_flush_send(Ecore_X_Window win) |
@@ -1004,7 +1004,7 @@ ecore_x_e_comp_flush_send(Ecore_X_Window win) | |||
1004 | XSendEvent(_ecore_x_disp, win, False, | 1004 | XSendEvent(_ecore_x_disp, win, False, |
1005 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, | 1005 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, |
1006 | &xev); | 1006 | &xev); |
1007 | } /* ecore_x_e_comp_flush_send */ | 1007 | } |
1008 | 1008 | ||
1009 | EAPI void | 1009 | EAPI void |
1010 | ecore_x_e_comp_dump_send(Ecore_X_Window win) | 1010 | ecore_x_e_comp_dump_send(Ecore_X_Window win) |
@@ -1026,7 +1026,7 @@ ecore_x_e_comp_dump_send(Ecore_X_Window win) | |||
1026 | XSendEvent(_ecore_x_disp, win, False, | 1026 | XSendEvent(_ecore_x_disp, win, False, |
1027 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, | 1027 | NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, |
1028 | &xev); | 1028 | &xev); |
1029 | } /* ecore_x_e_comp_dump_send */ | 1029 | } |
1030 | 1030 | ||
1031 | EAPI void | 1031 | EAPI void |
1032 | ecore_x_e_comp_pixmap_set(Ecore_X_Window win, | 1032 | ecore_x_e_comp_pixmap_set(Ecore_X_Window win, |
@@ -1038,7 +1038,7 @@ ecore_x_e_comp_pixmap_set(Ecore_X_Window win, | |||
1038 | ECORE_X_ATOM_PIXMAP, &pixmap, 1); | 1038 | ECORE_X_ATOM_PIXMAP, &pixmap, 1); |
1039 | else | 1039 | else |
1040 | ecore_x_window_prop_property_del(win, pixmap); | 1040 | ecore_x_window_prop_property_del(win, pixmap); |
1041 | } /* ecore_x_e_comp_pixmap_set */ | 1041 | } |
1042 | 1042 | ||
1043 | EAPI Ecore_X_Pixmap | 1043 | EAPI Ecore_X_Pixmap |
1044 | ecore_x_e_comp_pixmap_get(Ecore_X_Window win) | 1044 | ecore_x_e_comp_pixmap_get(Ecore_X_Window win) |
@@ -1056,5 +1056,5 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win) | |||
1056 | return 0; | 1056 | return 0; |
1057 | 1057 | ||
1058 | return pixmap; | 1058 | return pixmap; |
1059 | } /* ecore_x_e_comp_pixmap_get */ | 1059 | } |
1060 | 1060 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c index 837ff53..11e9f20 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_error.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include "ecore_x_private.h" | 9 | #include "ecore_x_private.h" |
10 | #include "Ecore_X.h" | 10 | #include "Ecore_X.h" |
11 | 11 | ||
12 | static int _ecore_x_error_handle(Display *d, | 12 | static int _ecore_x_error_handle(Display *d, |
13 | XErrorEvent *ev); | 13 | XErrorEvent *ev); |
14 | static int _ecore_x_io_error_handle(Display *d); | 14 | static int _ecore_x_io_error_handle(Display *d); |
15 | 15 | ||
@@ -19,6 +19,7 @@ static void (*_io_error_func)(void *data) = NULL; | |||
19 | static void *_io_error_data = NULL; | 19 | static void *_io_error_data = NULL; |
20 | static int _error_request_code = 0; | 20 | static int _error_request_code = 0; |
21 | static int _error_code = 0; | 21 | static int _error_code = 0; |
22 | static Ecore_X_ID _error_resource_id = 0; | ||
22 | 23 | ||
23 | /** | 24 | /** |
24 | * Set the error handler. | 25 | * Set the error handler. |
@@ -28,12 +29,12 @@ static int _error_code = 0; | |||
28 | * Set the X error handler function | 29 | * Set the X error handler function |
29 | */ | 30 | */ |
30 | EAPI void | 31 | EAPI void |
31 | ecore_x_error_handler_set(void (*func)(void *data), | 32 | ecore_x_error_handler_set(void (*func)(void *data), |
32 | const void *data) | 33 | const void *data) |
33 | { | 34 | { |
34 | _error_func = func; | 35 | _error_func = func; |
35 | _error_data = (void *)data; | 36 | _error_data = (void *)data; |
36 | } /* ecore_x_error_handler_set */ | 37 | } |
37 | 38 | ||
38 | /** | 39 | /** |
39 | * Set the I/O error handler. | 40 | * Set the I/O error handler. |
@@ -43,12 +44,12 @@ ecore_x_error_handler_set(void (*func)(void *data), | |||
43 | * Set the X I/O error handler function | 44 | * Set the X I/O error handler function |
44 | */ | 45 | */ |
45 | EAPI void | 46 | EAPI void |
46 | ecore_x_io_error_handler_set(void (*func)(void *data), | 47 | ecore_x_io_error_handler_set(void (*func)(void *data), |
47 | const void *data) | 48 | const void *data) |
48 | { | 49 | { |
49 | _io_error_func = func; | 50 | _io_error_func = func; |
50 | _io_error_data = (void *)data; | 51 | _io_error_data = (void *)data; |
51 | } /* ecore_x_io_error_handler_set */ | 52 | } |
52 | 53 | ||
53 | /** | 54 | /** |
54 | * Get the request code that caused the error. | 55 | * Get the request code that caused the error. |
@@ -60,7 +61,7 @@ EAPI int | |||
60 | ecore_x_error_request_get(void) | 61 | ecore_x_error_request_get(void) |
61 | { | 62 | { |
62 | return _error_request_code; | 63 | return _error_request_code; |
63 | } /* ecore_x_error_request_get */ | 64 | } |
64 | 65 | ||
65 | /** | 66 | /** |
66 | * Get the error code from the error. | 67 | * Get the error code from the error. |
@@ -72,28 +73,41 @@ EAPI int | |||
72 | ecore_x_error_code_get(void) | 73 | ecore_x_error_code_get(void) |
73 | { | 74 | { |
74 | return _error_code; | 75 | return _error_code; |
75 | } /* ecore_x_error_code_get */ | 76 | } |
77 | |||
78 | /** | ||
79 | * Get the resource id that caused the error. | ||
80 | * @return The resource id causing the X error | ||
81 | * | ||
82 | * Return the X resource id that caused the last X error | ||
83 | */ | ||
84 | EAPI Ecore_X_ID | ||
85 | ecore_x_error_resource_id_get(void) | ||
86 | { | ||
87 | return _error_resource_id; | ||
88 | } | ||
76 | 89 | ||
77 | void | 90 | void |
78 | _ecore_x_error_handler_init(void) | 91 | _ecore_x_error_handler_init(void) |
79 | { | 92 | { |
80 | XSetErrorHandler((XErrorHandler)_ecore_x_error_handle); | 93 | XSetErrorHandler((XErrorHandler)_ecore_x_error_handle); |
81 | XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle); | 94 | XSetIOErrorHandler((XIOErrorHandler)_ecore_x_io_error_handle); |
82 | } /* _ecore_x_error_handler_init */ | 95 | } |
83 | 96 | ||
84 | static int | 97 | static int |
85 | _ecore_x_error_handle(Display *d, | 98 | _ecore_x_error_handle(Display *d, |
86 | XErrorEvent *ev) | 99 | XErrorEvent *ev) |
87 | { | 100 | { |
88 | if (d == _ecore_x_disp) | 101 | if (d == _ecore_x_disp) |
89 | { | 102 | { |
90 | _error_request_code = ev->request_code; | 103 | _error_request_code = ev->request_code; |
91 | _error_code = ev->error_code; | 104 | _error_code = ev->error_code; |
105 | _error_resource_id = ev->resourceid; | ||
92 | if (_error_func) | 106 | if (_error_func) |
93 | _error_func(_error_data); | 107 | _error_func(_error_data); |
94 | } | 108 | } |
95 | return 0; | 109 | return 0; |
96 | } /* _ecore_x_error_handle */ | 110 | } |
97 | 111 | ||
98 | static int | 112 | static int |
99 | _ecore_x_io_error_handle(Display *d) | 113 | _ecore_x_io_error_handle(Display *d) |
@@ -107,5 +121,5 @@ _ecore_x_io_error_handle(Display *d) | |||
107 | } | 121 | } |
108 | 122 | ||
109 | return 0; | 123 | return 0; |
110 | } /* _ecore_x_io_error_handle */ | 124 | } |
111 | 125 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c index 136cd63..0b06a79 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_events.c | |||
@@ -100,10 +100,10 @@ _ecore_x_event_free_mouse_move(void *data __UNUSED__, | |||
100 | } | 100 | } |
101 | 101 | ||
102 | free(e); | 102 | free(e); |
103 | } /* _ecore_x_event_free_mouse_move */ | 103 | } |
104 | 104 | ||
105 | EAPI void | 105 | EAPI void |
106 | ecore_x_event_mask_set(Ecore_X_Window w, | 106 | ecore_x_event_mask_set(Ecore_X_Window w, |
107 | Ecore_X_Event_Mask mask) | 107 | Ecore_X_Event_Mask mask) |
108 | { | 108 | { |
109 | XWindowAttributes attr; | 109 | XWindowAttributes attr; |
@@ -117,10 +117,10 @@ ecore_x_event_mask_set(Ecore_X_Window w, | |||
117 | XGetWindowAttributes(_ecore_x_disp, w, &attr); | 117 | XGetWindowAttributes(_ecore_x_disp, w, &attr); |
118 | s_attr.event_mask = mask | attr.your_event_mask; | 118 | s_attr.event_mask = mask | attr.your_event_mask; |
119 | XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); | 119 | XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); |
120 | } /* ecore_x_event_mask_set */ | 120 | } |
121 | 121 | ||
122 | EAPI void | 122 | EAPI void |
123 | ecore_x_event_mask_unset(Ecore_X_Window w, | 123 | ecore_x_event_mask_unset(Ecore_X_Window w, |
124 | Ecore_X_Event_Mask mask) | 124 | Ecore_X_Event_Mask mask) |
125 | { | 125 | { |
126 | XWindowAttributes attr; | 126 | XWindowAttributes attr; |
@@ -134,7 +134,7 @@ ecore_x_event_mask_unset(Ecore_X_Window w, | |||
134 | XGetWindowAttributes(_ecore_x_disp, w, &attr); | 134 | XGetWindowAttributes(_ecore_x_disp, w, &attr); |
135 | s_attr.event_mask = attr.your_event_mask & ~mask; | 135 | s_attr.event_mask = attr.your_event_mask & ~mask; |
136 | XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); | 136 | XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr); |
137 | } /* ecore_x_event_mask_unset */ | 137 | } |
138 | 138 | ||
139 | static void | 139 | static void |
140 | _ecore_x_event_free_xdnd_enter(void *data __UNUSED__, | 140 | _ecore_x_event_free_xdnd_enter(void *data __UNUSED__, |
@@ -148,7 +148,7 @@ _ecore_x_event_free_xdnd_enter(void *data __UNUSED__, | |||
148 | XFree(e->types[i]); | 148 | XFree(e->types[i]); |
149 | free(e->types); | 149 | free(e->types); |
150 | free(e); | 150 | free(e); |
151 | } /* _ecore_x_event_free_xdnd_enter */ | 151 | } |
152 | 152 | ||
153 | static void | 153 | static void |
154 | _ecore_x_event_free_selection_notify(void *data __UNUSED__, | 154 | _ecore_x_event_free_selection_notify(void *data __UNUSED__, |
@@ -164,7 +164,7 @@ _ecore_x_event_free_selection_notify(void *data __UNUSED__, | |||
164 | 164 | ||
165 | free(e->target); | 165 | free(e->target); |
166 | free(e); | 166 | free(e); |
167 | } /* _ecore_x_event_free_selection_notify */ | 167 | } |
168 | 168 | ||
169 | static unsigned int | 169 | static unsigned int |
170 | _ecore_x_event_modifiers(unsigned int state) | 170 | _ecore_x_event_modifiers(unsigned int state) |
@@ -196,28 +196,28 @@ _ecore_x_event_modifiers(unsigned int state) | |||
196 | modifiers |= ECORE_EVENT_LOCK_SHIFT; | 196 | modifiers |= ECORE_EVENT_LOCK_SHIFT; |
197 | 197 | ||
198 | return modifiers; | 198 | return modifiers; |
199 | } /* _ecore_x_event_modifiers */ | 199 | } |
200 | 200 | ||
201 | void | 201 | void |
202 | _ecore_mouse_move(unsigned int timestamp, | 202 | _ecore_mouse_move(unsigned int timestamp, |
203 | unsigned int xmodifiers, | 203 | unsigned int xmodifiers, |
204 | int x, | 204 | int x, |
205 | int y, | 205 | int y, |
206 | int x_root, | 206 | int x_root, |
207 | int y_root, | 207 | int y_root, |
208 | unsigned int event_window, | 208 | unsigned int event_window, |
209 | unsigned int window, | 209 | unsigned int window, |
210 | unsigned int root_win, | 210 | unsigned int root_win, |
211 | int same_screen, | 211 | int same_screen, |
212 | int dev, | 212 | int dev, |
213 | double radx, | 213 | double radx, |
214 | double rady, | 214 | double rady, |
215 | double pressure, | 215 | double pressure, |
216 | double angle, | 216 | double angle, |
217 | double mx, | 217 | double mx, |
218 | double my, | 218 | double my, |
219 | double mrx, | 219 | double mrx, |
220 | double mry) | 220 | double mry) |
221 | { | 221 | { |
222 | Ecore_Event_Mouse_Move *e; | 222 | Ecore_Event_Mouse_Move *e; |
223 | Ecore_Event *event; | 223 | Ecore_Event *event; |
@@ -260,10 +260,10 @@ _ecore_mouse_move(unsigned int timestamp, | |||
260 | _ecore_x_event_last_root_y = y_root; | 260 | _ecore_x_event_last_root_y = y_root; |
261 | 261 | ||
262 | _ecore_x_last_event_mouse_move_event = event; | 262 | _ecore_x_last_event_mouse_move_event = event; |
263 | } /* _ecore_mouse_move */ | 263 | } |
264 | 264 | ||
265 | static void | 265 | static void |
266 | _ecore_key_press(int event, | 266 | _ecore_key_press(int event, |
267 | XKeyEvent *xevent) | 267 | XKeyEvent *xevent) |
268 | { | 268 | { |
269 | Ecore_Event_Key *e; | 269 | Ecore_Event_Key *e; |
@@ -343,30 +343,30 @@ _ecore_key_press(int event, | |||
343 | on_error: | 343 | on_error: |
344 | if (tmp) | 344 | if (tmp) |
345 | free(tmp); | 345 | free(tmp); |
346 | } /* _ecore_key_press */ | 346 | } |
347 | 347 | ||
348 | Ecore_Event_Mouse_Button * | 348 | Ecore_Event_Mouse_Button * |
349 | _ecore_mouse_button(int event, | 349 | _ecore_mouse_button(int event, |
350 | unsigned int timestamp, | 350 | unsigned int timestamp, |
351 | unsigned int xmodifiers, | 351 | unsigned int xmodifiers, |
352 | unsigned int buttons, | 352 | unsigned int buttons, |
353 | int x, | 353 | int x, |
354 | int y, | 354 | int y, |
355 | int x_root, | 355 | int x_root, |
356 | int y_root, | 356 | int y_root, |
357 | unsigned int event_window, | 357 | unsigned int event_window, |
358 | unsigned int window, | 358 | unsigned int window, |
359 | unsigned int root_win, | 359 | unsigned int root_win, |
360 | int same_screen, | 360 | int same_screen, |
361 | int dev, | 361 | int dev, |
362 | double radx, | 362 | double radx, |
363 | double rady, | 363 | double rady, |
364 | double pressure, | 364 | double pressure, |
365 | double angle, | 365 | double angle, |
366 | double mx, | 366 | double mx, |
367 | double my, | 367 | double my, |
368 | double mrx, | 368 | double mrx, |
369 | double mry) | 369 | double mry) |
370 | { | 370 | { |
371 | Ecore_Event_Mouse_Button *e; | 371 | Ecore_Event_Mouse_Button *e; |
372 | 372 | ||
@@ -407,37 +407,37 @@ _ecore_mouse_button(int event, | |||
407 | { | 407 | { |
408 | if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN) | 408 | if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN) |
409 | { | 409 | { |
410 | //Check Double Clicked | 410 | //Check Double Clicked |
411 | if (((int)(timestamp - down_info->last_time) <= | 411 | if (((int)(timestamp - down_info->last_time) <= |
412 | (int)(1000 * _ecore_x_double_click_time)) && | 412 | (int)(1000 * _ecore_x_double_click_time)) && |
413 | (window == down_info->last_win) && | 413 | (window == down_info->last_win) && |
414 | (event_window == down_info->last_event_win)) | 414 | (event_window == down_info->last_event_win)) |
415 | { | 415 | { |
416 | e->double_click = 1; | 416 | e->double_click = 1; |
417 | down_info->did_double = EINA_TRUE; | 417 | down_info->did_double = EINA_TRUE; |
418 | } | 418 | } |
419 | else | 419 | else |
420 | { | 420 | { |
421 | down_info->did_double = EINA_FALSE; | 421 | down_info->did_double = EINA_FALSE; |
422 | down_info->did_triple = EINA_FALSE; | 422 | down_info->did_triple = EINA_FALSE; |
423 | } | 423 | } |
424 | 424 | ||
425 | //Check Triple Clicked | 425 | //Check Triple Clicked |
426 | if (((int)(timestamp - down_info->last_last_time) <= | 426 | if (((int)(timestamp - down_info->last_last_time) <= |
427 | (int)(2 * 1000 * _ecore_x_double_click_time)) && | 427 | (int)(2 * 1000 * _ecore_x_double_click_time)) && |
428 | (window == down_info->last_win) && | 428 | (window == down_info->last_win) && |
429 | (window == down_info->last_last_win) && | 429 | (window == down_info->last_last_win) && |
430 | (event_window == down_info->last_event_win) && | 430 | (event_window == down_info->last_event_win) && |
431 | (event_window == down_info->last_last_event_win) | 431 | (event_window == down_info->last_last_event_win) |
432 | ) | 432 | ) |
433 | { | 433 | { |
434 | e->triple_click = 1; | 434 | e->triple_click = 1; |
435 | down_info->did_triple = EINA_TRUE; | 435 | down_info->did_triple = EINA_TRUE; |
436 | } | 436 | } |
437 | else | 437 | else |
438 | { | 438 | { |
439 | down_info->did_triple = EINA_FALSE; | 439 | down_info->did_triple = EINA_FALSE; |
440 | } | 440 | } |
441 | } | 441 | } |
442 | else | 442 | else |
443 | { | 443 | { |
@@ -491,7 +491,7 @@ _ecore_mouse_button(int event, | |||
491 | } | 491 | } |
492 | 492 | ||
493 | return e; | 493 | return e; |
494 | } /* _ecore_mouse_button */ | 494 | } |
495 | 495 | ||
496 | void | 496 | void |
497 | _ecore_x_event_handle_any_event(XEvent *xevent) | 497 | _ecore_x_event_handle_any_event(XEvent *xevent) |
@@ -500,19 +500,19 @@ _ecore_x_event_handle_any_event(XEvent *xevent) | |||
500 | if (!ev) return; | 500 | if (!ev) return; |
501 | memcpy(ev, xevent, sizeof(XEvent)); | 501 | memcpy(ev, xevent, sizeof(XEvent)); |
502 | ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL); | 502 | ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL); |
503 | } /* _ecore_x_event_handle_any_event */ | 503 | } |
504 | 504 | ||
505 | void | 505 | void |
506 | _ecore_x_event_handle_key_press(XEvent *xevent) | 506 | _ecore_x_event_handle_key_press(XEvent *xevent) |
507 | { | 507 | { |
508 | _ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *)xevent); | 508 | _ecore_key_press(ECORE_EVENT_KEY_DOWN, (XKeyEvent *)xevent); |
509 | } /* _ecore_x_event_handle_key_press */ | 509 | } |
510 | 510 | ||
511 | void | 511 | void |
512 | _ecore_x_event_handle_key_release(XEvent *xevent) | 512 | _ecore_x_event_handle_key_release(XEvent *xevent) |
513 | { | 513 | { |
514 | _ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *)xevent); | 514 | _ecore_key_press(ECORE_EVENT_KEY_UP, (XKeyEvent *)xevent); |
515 | } /* _ecore_x_event_handle_key_release */ | 515 | } |
516 | 516 | ||
517 | void | 517 | void |
518 | _ecore_x_event_handle_button_press(XEvent *xevent) | 518 | _ecore_x_event_handle_button_press(XEvent *xevent) |
@@ -541,7 +541,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent) | |||
541 | case 7: e->direction = 1; e->z = 1; break; | 541 | case 7: e->direction = 1; e->z = 1; break; |
542 | 542 | ||
543 | default: e->direction = 0; e->z = 0; break; | 543 | default: e->direction = 0; e->z = 0; break; |
544 | } /* switch */ | 544 | } |
545 | 545 | ||
546 | e->x = xevent->xbutton.x; | 546 | e->x = xevent->xbutton.x; |
547 | e->y = xevent->xbutton.y; | 547 | e->y = xevent->xbutton.y; |
@@ -663,7 +663,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent) | |||
663 | } | 663 | } |
664 | } | 664 | } |
665 | } | 665 | } |
666 | } /* _ecore_x_event_handle_button_press */ | 666 | } |
667 | 667 | ||
668 | void | 668 | void |
669 | _ecore_x_event_handle_button_release(XEvent *xevent) | 669 | _ecore_x_event_handle_button_release(XEvent *xevent) |
@@ -702,7 +702,7 @@ _ecore_x_event_handle_button_release(XEvent *xevent) | |||
702 | xevent->xbutton.x, xevent->xbutton.y, | 702 | xevent->xbutton.x, xevent->xbutton.y, |
703 | xevent->xbutton.x_root, xevent->xbutton.y_root); | 703 | xevent->xbutton.x_root, xevent->xbutton.y_root); |
704 | } | 704 | } |
705 | } /* _ecore_x_event_handle_button_release */ | 705 | } |
706 | 706 | ||
707 | void | 707 | void |
708 | _ecore_x_event_handle_motion_notify(XEvent *xevent) | 708 | _ecore_x_event_handle_motion_notify(XEvent *xevent) |
@@ -715,27 +715,27 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent) | |||
715 | _ecore_x_last_event_mouse_move_event = NULL; | 715 | _ecore_x_last_event_mouse_move_event = NULL; |
716 | } | 716 | } |
717 | */ | 717 | */ |
718 | _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state, | 718 | _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state, |
719 | xevent->xmotion.x, xevent->xmotion.y, | 719 | xevent->xmotion.x, xevent->xmotion.y, |
720 | xevent->xmotion.x_root, xevent->xmotion.y_root, | 720 | xevent->xmotion.x_root, xevent->xmotion.y_root, |
721 | xevent->xmotion.window, | 721 | xevent->xmotion.window, |
722 | (xevent->xmotion.subwindow ? xevent->xmotion.subwindow : | 722 | (xevent->xmotion.subwindow ? xevent->xmotion.subwindow : |
723 | xevent->xmotion.window), | 723 | xevent->xmotion.window), |
724 | xevent->xmotion.root, | 724 | xevent->xmotion.root, |
725 | xevent->xmotion.same_screen, | 725 | xevent->xmotion.same_screen, |
726 | 0, 1, 1, | 726 | 0, 1, 1, |
727 | 1.0, // pressure | 727 | 1.0, // pressure |
728 | 0.0, // angle | 728 | 0.0, // angle |
729 | xevent->xmotion.x, xevent->xmotion.y, | 729 | xevent->xmotion.x, xevent->xmotion.y, |
730 | xevent->xmotion.x_root, xevent->xmotion.y_root); | 730 | xevent->xmotion.x_root, xevent->xmotion.y_root); |
731 | 731 | ||
732 | _ecore_x_last_event_mouse_move = 1; | 732 | _ecore_x_last_event_mouse_move = 1; |
733 | 733 | ||
734 | /* Xdnd handling */ | 734 | /* Xdnd handling */ |
735 | _ecore_x_dnd_drag(xevent->xmotion.root, | 735 | _ecore_x_dnd_drag(xevent->xmotion.root, |
736 | xevent->xmotion.x_root, | 736 | xevent->xmotion.x_root, |
737 | xevent->xmotion.y_root); | 737 | xevent->xmotion.y_root); |
738 | } /* _ecore_x_event_handle_motion_notify */ | 738 | } |
739 | 739 | ||
740 | void | 740 | void |
741 | _ecore_x_event_handle_enter_notify(XEvent *xevent) | 741 | _ecore_x_event_handle_enter_notify(XEvent *xevent) |
@@ -799,7 +799,7 @@ _ecore_x_event_handle_enter_notify(XEvent *xevent) | |||
799 | _ecore_x_event_last_time = e->time; | 799 | _ecore_x_event_last_time = e->time; |
800 | ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL); | 800 | ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL); |
801 | } | 801 | } |
802 | } /* _ecore_x_event_handle_enter_notify */ | 802 | } |
803 | 803 | ||
804 | void | 804 | void |
805 | _ecore_x_event_handle_leave_notify(XEvent *xevent) | 805 | _ecore_x_event_handle_leave_notify(XEvent *xevent) |
@@ -866,7 +866,7 @@ _ecore_x_event_handle_leave_notify(XEvent *xevent) | |||
866 | _ecore_x_event_last_root_y = e->root.y; | 866 | _ecore_x_event_last_root_y = e->root.y; |
867 | ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL); | 867 | ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL); |
868 | } | 868 | } |
869 | } /* _ecore_x_event_handle_leave_notify */ | 869 | } |
870 | 870 | ||
871 | void | 871 | void |
872 | _ecore_x_event_handle_focus_in(XEvent *xevent) | 872 | _ecore_x_event_handle_focus_in(XEvent *xevent) |
@@ -910,7 +910,7 @@ _ecore_x_event_handle_focus_in(XEvent *xevent) | |||
910 | e->time = _ecore_x_event_last_time; | 910 | e->time = _ecore_x_event_last_time; |
911 | _ecore_x_event_last_time = e->time; | 911 | _ecore_x_event_last_time = e->time; |
912 | ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL); | 912 | ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL); |
913 | } /* _ecore_x_event_handle_focus_in */ | 913 | } |
914 | 914 | ||
915 | void | 915 | void |
916 | _ecore_x_event_handle_focus_out(XEvent *xevent) | 916 | _ecore_x_event_handle_focus_out(XEvent *xevent) |
@@ -954,14 +954,14 @@ _ecore_x_event_handle_focus_out(XEvent *xevent) | |||
954 | e->time = _ecore_x_event_last_time; | 954 | e->time = _ecore_x_event_last_time; |
955 | _ecore_x_event_last_time = e->time; | 955 | _ecore_x_event_last_time = e->time; |
956 | ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL); | 956 | ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL); |
957 | } /* _ecore_x_event_handle_focus_out */ | 957 | } |
958 | 958 | ||
959 | void | 959 | void |
960 | _ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__) | 960 | _ecore_x_event_handle_keymap_notify(XEvent *xevent __UNUSED__) |
961 | { | 961 | { |
962 | _ecore_x_last_event_mouse_move = 0; | 962 | _ecore_x_last_event_mouse_move = 0; |
963 | /* FIXME: handle this event type */ | 963 | /* FIXME: handle this event type */ |
964 | } /* _ecore_x_event_handle_keymap_notify */ | 964 | } |
965 | 965 | ||
966 | void | 966 | void |
967 | _ecore_x_event_handle_expose(XEvent *xevent) | 967 | _ecore_x_event_handle_expose(XEvent *xevent) |
@@ -981,7 +981,7 @@ _ecore_x_event_handle_expose(XEvent *xevent) | |||
981 | e->h = xevent->xexpose.height; | 981 | e->h = xevent->xexpose.height; |
982 | e->count = xevent->xexpose.count; | 982 | e->count = xevent->xexpose.count; |
983 | ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL); | 983 | ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL); |
984 | } /* _ecore_x_event_handle_expose */ | 984 | } |
985 | 985 | ||
986 | void | 986 | void |
987 | _ecore_x_event_handle_graphics_expose(XEvent *xevent) | 987 | _ecore_x_event_handle_graphics_expose(XEvent *xevent) |
@@ -1001,7 +1001,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent) | |||
1001 | e->h = xevent->xgraphicsexpose.height; | 1001 | e->h = xevent->xgraphicsexpose.height; |
1002 | e->count = xevent->xgraphicsexpose.count; | 1002 | e->count = xevent->xgraphicsexpose.count; |
1003 | ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL); | 1003 | ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL); |
1004 | } /* _ecore_x_event_handle_graphics_expose */ | 1004 | } |
1005 | 1005 | ||
1006 | void | 1006 | void |
1007 | _ecore_x_event_handle_visibility_notify(XEvent *xevent) | 1007 | _ecore_x_event_handle_visibility_notify(XEvent *xevent) |
@@ -1024,7 +1024,7 @@ _ecore_x_event_handle_visibility_notify(XEvent *xevent) | |||
1024 | 1024 | ||
1025 | ecore_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL); | 1025 | ecore_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL); |
1026 | } | 1026 | } |
1027 | } /* _ecore_x_event_handle_visibility_notify */ | 1027 | } |
1028 | 1028 | ||
1029 | void | 1029 | void |
1030 | _ecore_x_event_handle_create_notify(XEvent *xevent) | 1030 | _ecore_x_event_handle_create_notify(XEvent *xevent) |
@@ -1050,7 +1050,7 @@ _ecore_x_event_handle_create_notify(XEvent *xevent) | |||
1050 | e->border = xevent->xcreatewindow.border_width; | 1050 | e->border = xevent->xcreatewindow.border_width; |
1051 | e->time = _ecore_x_event_last_time; | 1051 | e->time = _ecore_x_event_last_time; |
1052 | ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL); | 1052 | ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL); |
1053 | } /* _ecore_x_event_handle_create_notify */ | 1053 | } |
1054 | 1054 | ||
1055 | void | 1055 | void |
1056 | _ecore_x_event_handle_destroy_notify(XEvent *xevent) | 1056 | _ecore_x_event_handle_destroy_notify(XEvent *xevent) |
@@ -1069,7 +1069,7 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent) | |||
1069 | _ecore_x_event_last_win = 0; | 1069 | _ecore_x_event_last_win = 0; |
1070 | 1070 | ||
1071 | ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL); | 1071 | ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL); |
1072 | } /* _ecore_x_event_handle_destroy_notify */ | 1072 | } |
1073 | 1073 | ||
1074 | void | 1074 | void |
1075 | _ecore_x_event_handle_unmap_notify(XEvent *xevent) | 1075 | _ecore_x_event_handle_unmap_notify(XEvent *xevent) |
@@ -1085,7 +1085,7 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent) | |||
1085 | e->event_win = xevent->xunmap.event; | 1085 | e->event_win = xevent->xunmap.event; |
1086 | e->time = _ecore_x_event_last_time; | 1086 | e->time = _ecore_x_event_last_time; |
1087 | ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL); | 1087 | ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL); |
1088 | } /* _ecore_x_event_handle_unmap_notify */ | 1088 | } |
1089 | 1089 | ||
1090 | void | 1090 | void |
1091 | _ecore_x_event_handle_map_notify(XEvent *xevent) | 1091 | _ecore_x_event_handle_map_notify(XEvent *xevent) |
@@ -1101,7 +1101,7 @@ _ecore_x_event_handle_map_notify(XEvent *xevent) | |||
1101 | e->event_win = xevent->xmap.event; | 1101 | e->event_win = xevent->xmap.event; |
1102 | e->time = _ecore_x_event_last_time; | 1102 | e->time = _ecore_x_event_last_time; |
1103 | ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL); | 1103 | ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL); |
1104 | } /* _ecore_x_event_handle_map_notify */ | 1104 | } |
1105 | 1105 | ||
1106 | void | 1106 | void |
1107 | _ecore_x_event_handle_map_request(XEvent *xevent) | 1107 | _ecore_x_event_handle_map_request(XEvent *xevent) |
@@ -1117,7 +1117,7 @@ _ecore_x_event_handle_map_request(XEvent *xevent) | |||
1117 | e->time = _ecore_x_event_last_time; | 1117 | e->time = _ecore_x_event_last_time; |
1118 | e->parent = xevent->xmaprequest.parent; | 1118 | e->parent = xevent->xmaprequest.parent; |
1119 | ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL); | 1119 | ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL); |
1120 | } /* _ecore_x_event_handle_map_request */ | 1120 | } |
1121 | 1121 | ||
1122 | void | 1122 | void |
1123 | _ecore_x_event_handle_reparent_notify(XEvent *xevent) | 1123 | _ecore_x_event_handle_reparent_notify(XEvent *xevent) |
@@ -1134,7 +1134,7 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent) | |||
1134 | e->parent = xevent->xreparent.parent; | 1134 | e->parent = xevent->xreparent.parent; |
1135 | e->time = _ecore_x_event_last_time; | 1135 | e->time = _ecore_x_event_last_time; |
1136 | ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL); | 1136 | ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL); |
1137 | } /* _ecore_x_event_handle_reparent_notify */ | 1137 | } |
1138 | 1138 | ||
1139 | void | 1139 | void |
1140 | _ecore_x_event_handle_configure_notify(XEvent *xevent) | 1140 | _ecore_x_event_handle_configure_notify(XEvent *xevent) |
@@ -1158,7 +1158,7 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent) | |||
1158 | e->from_wm = xevent->xconfigure.send_event; | 1158 | e->from_wm = xevent->xconfigure.send_event; |
1159 | e->time = _ecore_x_event_last_time; | 1159 | e->time = _ecore_x_event_last_time; |
1160 | ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL); | 1160 | ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL); |
1161 | } /* _ecore_x_event_handle_configure_notify */ | 1161 | } |
1162 | 1162 | ||
1163 | void | 1163 | void |
1164 | _ecore_x_event_handle_configure_request(XEvent *xevent) | 1164 | _ecore_x_event_handle_configure_request(XEvent *xevent) |
@@ -1193,14 +1193,14 @@ _ecore_x_event_handle_configure_request(XEvent *xevent) | |||
1193 | e->detail = ECORE_X_WINDOW_STACK_OPPOSITE; | 1193 | e->detail = ECORE_X_WINDOW_STACK_OPPOSITE; |
1194 | 1194 | ||
1195 | ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL); | 1195 | ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL); |
1196 | } /* _ecore_x_event_handle_configure_request */ | 1196 | } |
1197 | 1197 | ||
1198 | void | 1198 | void |
1199 | _ecore_x_event_handle_gravity_notify(XEvent *xevent __UNUSED__) | 1199 | _ecore_x_event_handle_gravity_notify(XEvent *xevent __UNUSED__) |
1200 | { | 1200 | { |
1201 | _ecore_x_last_event_mouse_move = 0; | 1201 | _ecore_x_last_event_mouse_move = 0; |
1202 | /* FIXME: handle this event type */ | 1202 | /* FIXME: handle this event type */ |
1203 | } /* _ecore_x_event_handle_gravity_notify */ | 1203 | } |
1204 | 1204 | ||
1205 | void | 1205 | void |
1206 | _ecore_x_event_handle_resize_request(XEvent *xevent) | 1206 | _ecore_x_event_handle_resize_request(XEvent *xevent) |
@@ -1217,7 +1217,7 @@ _ecore_x_event_handle_resize_request(XEvent *xevent) | |||
1217 | e->h = xevent->xresizerequest.height; | 1217 | e->h = xevent->xresizerequest.height; |
1218 | e->time = _ecore_x_event_last_time; | 1218 | e->time = _ecore_x_event_last_time; |
1219 | ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL); | 1219 | ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL); |
1220 | } /* _ecore_x_event_handle_resize_request */ | 1220 | } |
1221 | 1221 | ||
1222 | void | 1222 | void |
1223 | _ecore_x_event_handle_circulate_notify(XEvent *xevent) | 1223 | _ecore_x_event_handle_circulate_notify(XEvent *xevent) |
@@ -1238,7 +1238,7 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent) | |||
1238 | 1238 | ||
1239 | e->time = _ecore_x_event_last_time; | 1239 | e->time = _ecore_x_event_last_time; |
1240 | ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL); | 1240 | ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL); |
1241 | } /* _ecore_x_event_handle_circulate_notify */ | 1241 | } |
1242 | 1242 | ||
1243 | void | 1243 | void |
1244 | _ecore_x_event_handle_circulate_request(XEvent *xevent) | 1244 | _ecore_x_event_handle_circulate_request(XEvent *xevent) |
@@ -1259,7 +1259,7 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent) | |||
1259 | 1259 | ||
1260 | e->time = _ecore_x_event_last_time; | 1260 | e->time = _ecore_x_event_last_time; |
1261 | ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL); | 1261 | ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL); |
1262 | } /* _ecore_x_event_handle_circulate_request */ | 1262 | } |
1263 | 1263 | ||
1264 | void | 1264 | void |
1265 | _ecore_x_event_handle_property_notify(XEvent *xevent) | 1265 | _ecore_x_event_handle_property_notify(XEvent *xevent) |
@@ -1278,17 +1278,17 @@ _ecore_x_event_handle_property_notify(XEvent *xevent) | |||
1278 | _ecore_x_event_last_time = e->time; | 1278 | _ecore_x_event_last_time = e->time; |
1279 | ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL); | 1279 | ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL); |
1280 | } | 1280 | } |
1281 | } /* _ecore_x_event_handle_property_notify */ | 1281 | } |
1282 | 1282 | ||
1283 | void | 1283 | void |
1284 | _ecore_x_event_handle_selection_clear(XEvent *xevent) | 1284 | _ecore_x_event_handle_selection_clear(XEvent *xevent) |
1285 | { | 1285 | { |
1286 | // Ecore_X_Selection_Intern *d; | 1286 | // Ecore_X_Selection_Intern *d; |
1287 | Ecore_X_Event_Selection_Clear *e; | 1287 | Ecore_X_Event_Selection_Clear *e; |
1288 | Ecore_X_Atom sel; | 1288 | Ecore_X_Atom sel; |
1289 | 1289 | ||
1290 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1290 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1291 | _ecore_x_last_event_mouse_move = 0; | 1291 | _ecore_x_last_event_mouse_move = 0; |
1292 | /* errr..... why? paranoia. | 1292 | /* errr..... why? paranoia. |
1293 | d = _ecore_x_selection_get(xevent->xselectionclear.selection); | 1293 | d = _ecore_x_selection_get(xevent->xselectionclear.selection); |
1294 | if (d && (xevent->xselectionclear.time > d->time)) | 1294 | if (d && (xevent->xselectionclear.time > d->time)) |
@@ -1298,21 +1298,21 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent) | |||
1298 | } | 1298 | } |
1299 | */ | 1299 | */ |
1300 | /* Generate event for app cleanup */ | 1300 | /* Generate event for app cleanup */ |
1301 | e = malloc(sizeof(Ecore_X_Event_Selection_Clear)); | 1301 | e = malloc(sizeof(Ecore_X_Event_Selection_Clear)); |
1302 | e->win = xevent->xselectionclear.window; | 1302 | e->win = xevent->xselectionclear.window; |
1303 | e->time = xevent->xselectionclear.time; | 1303 | e->time = xevent->xselectionclear.time; |
1304 | e->atom = sel = xevent->xselectionclear.selection; | 1304 | e->atom = sel = xevent->xselectionclear.selection; |
1305 | if (sel == ECORE_X_ATOM_SELECTION_PRIMARY) | 1305 | if (sel == ECORE_X_ATOM_SELECTION_PRIMARY) |
1306 | e->selection = ECORE_X_SELECTION_PRIMARY; | 1306 | e->selection = ECORE_X_SELECTION_PRIMARY; |
1307 | else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY) | 1307 | else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY) |
1308 | e->selection = ECORE_X_SELECTION_SECONDARY; | 1308 | e->selection = ECORE_X_SELECTION_SECONDARY; |
1309 | else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD) | 1309 | else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD) |
1310 | e->selection = ECORE_X_SELECTION_CLIPBOARD; | 1310 | e->selection = ECORE_X_SELECTION_CLIPBOARD; |
1311 | else | 1311 | else |
1312 | e->selection = ECORE_X_SELECTION_OTHER; | 1312 | e->selection = ECORE_X_SELECTION_OTHER; |
1313 | 1313 | ||
1314 | ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL); | 1314 | ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL); |
1315 | } /* _ecore_x_event_handle_selection_clear */ | 1315 | } |
1316 | 1316 | ||
1317 | void | 1317 | void |
1318 | _ecore_x_event_handle_selection_request(XEvent *xevent) | 1318 | _ecore_x_event_handle_selection_request(XEvent *xevent) |
@@ -1360,17 +1360,17 @@ _ecore_x_event_handle_selection_request(XEvent *xevent) | |||
1360 | property = None; | 1360 | property = None; |
1361 | else if (data) | 1361 | else if (data) |
1362 | { | 1362 | { |
1363 | /* FIXME: This does not properly handle large data transfers */ | 1363 | /* FIXME: This does not properly handle large data transfers */ |
1364 | ecore_x_window_prop_property_set( | 1364 | ecore_x_window_prop_property_set( |
1365 | xevent->xselectionrequest.requestor, | 1365 | xevent->xselectionrequest.requestor, |
1366 | xevent->xselectionrequest. | 1366 | xevent->xselectionrequest. |
1367 | property, | 1367 | property, |
1368 | type, | 1368 | type, |
1369 | typesize, | 1369 | typesize, |
1370 | data, | 1370 | data, |
1371 | len); | 1371 | len); |
1372 | property = xevent->xselectionrequest.property; | 1372 | property = xevent->xselectionrequest.property; |
1373 | free(data); | 1373 | free(data); |
1374 | } | 1374 | } |
1375 | 1375 | ||
1376 | ecore_x_selection_notify_send(xevent->xselectionrequest.requestor, | 1376 | ecore_x_selection_notify_send(xevent->xselectionrequest.requestor, |
@@ -1380,7 +1380,7 @@ _ecore_x_event_handle_selection_request(XEvent *xevent) | |||
1380 | xevent->xselectionrequest.time); | 1380 | xevent->xselectionrequest.time); |
1381 | } | 1381 | } |
1382 | } | 1382 | } |
1383 | } /* _ecore_x_event_handle_selection_request */ | 1383 | } |
1384 | 1384 | ||
1385 | void | 1385 | void |
1386 | _ecore_x_event_handle_selection_notify(XEvent *xevent) | 1386 | _ecore_x_event_handle_selection_notify(XEvent *xevent) |
@@ -1436,7 +1436,7 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent) | |||
1436 | 1436 | ||
1437 | ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e, | 1437 | ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e, |
1438 | _ecore_x_event_free_selection_notify, NULL); | 1438 | _ecore_x_event_free_selection_notify, NULL); |
1439 | } /* _ecore_x_event_handle_selection_notify */ | 1439 | } |
1440 | 1440 | ||
1441 | void | 1441 | void |
1442 | _ecore_x_event_handle_colormap_notify(XEvent *xevent) | 1442 | _ecore_x_event_handle_colormap_notify(XEvent *xevent) |
@@ -1457,7 +1457,7 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent) | |||
1457 | e->installed = EINA_FALSE; | 1457 | e->installed = EINA_FALSE; |
1458 | 1458 | ||
1459 | ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL); | 1459 | ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL); |
1460 | } /* _ecore_x_event_handle_colormap_notify */ | 1460 | } |
1461 | 1461 | ||
1462 | void | 1462 | void |
1463 | _ecore_x_event_handle_client_message(XEvent *xevent) | 1463 | _ecore_x_event_handle_client_message(XEvent *xevent) |
@@ -1528,32 +1528,32 @@ _ecore_x_event_handle_client_message(XEvent *xevent) | |||
1528 | if (xevent->xclient.data.l[1] & 0x1UL) | 1528 | if (xevent->xclient.data.l[1] & 0x1UL) |
1529 | { | 1529 | { |
1530 | /* source supports more than 3 types, fetch property */ | 1530 | /* source supports more than 3 types, fetch property */ |
1531 | unsigned char *data; | 1531 | unsigned char *data; |
1532 | Ecore_X_Atom *types; | 1532 | Ecore_X_Atom *types; |
1533 | int i, num_ret; | 1533 | int i, num_ret; |
1534 | 1534 | ||
1535 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1535 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1536 | if (!(ecore_x_window_prop_property_get(target->source, | 1536 | if (!(ecore_x_window_prop_property_get(target->source, |
1537 | ECORE_X_ATOM_XDND_TYPE_LIST, | 1537 | ECORE_X_ATOM_XDND_TYPE_LIST, |
1538 | XA_ATOM, | 1538 | XA_ATOM, |
1539 | 32, &data, &num_ret))) | 1539 | 32, &data, &num_ret))) |
1540 | { | 1540 | { |
1541 | WRN( | 1541 | WRN( |
1542 | "DND: Could not fetch data type list from source window, aborting."); | 1542 | "DND: Could not fetch data type list from source window, aborting."); |
1543 | free(e); | 1543 | free(e); |
1544 | return; | 1544 | return; |
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | types = (Ecore_X_Atom *)data; | 1547 | types = (Ecore_X_Atom *)data; |
1548 | e->types = calloc(num_ret, sizeof(char *)); | 1548 | e->types = calloc(num_ret, sizeof(char *)); |
1549 | if (e->types) | 1549 | if (e->types) |
1550 | { | 1550 | { |
1551 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1551 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1552 | for (i = 0; i < num_ret; i++) | 1552 | for (i = 0; i < num_ret; i++) |
1553 | e->types[i] = XGetAtomName(_ecore_x_disp, types[i]); | 1553 | e->types[i] = XGetAtomName(_ecore_x_disp, types[i]); |
1554 | } | 1554 | } |
1555 | 1555 | ||
1556 | e->num_types = num_ret; | 1556 | e->num_types = num_ret; |
1557 | } | 1557 | } |
1558 | else | 1558 | else |
1559 | { | 1559 | { |
@@ -1774,7 +1774,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent) | |||
1774 | if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN) | 1774 | if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN) |
1775 | { | 1775 | { |
1776 | // char *name; | 1776 | // char *name; |
1777 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1777 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1778 | 1778 | ||
1779 | // name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]); | 1779 | // name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]); |
1780 | // if (name) ERR("Unknown state: %s", name); | 1780 | // if (name) ERR("Unknown state: %s", name); |
@@ -1784,7 +1784,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent) | |||
1784 | if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN) | 1784 | if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN) |
1785 | { | 1785 | { |
1786 | // char *name; | 1786 | // char *name; |
1787 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1787 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1788 | 1788 | ||
1789 | // name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]); | 1789 | // name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]); |
1790 | // if (name) ERR("Unknown state: %s", name); | 1790 | // if (name) ERR("Unknown state: %s", name); |
@@ -1888,10 +1888,10 @@ _ecore_x_event_handle_client_message(XEvent *xevent) | |||
1888 | && (xevent->xclient.window == _ecore_x_private_win)) | 1888 | && (xevent->xclient.window == _ecore_x_private_win)) |
1889 | { | 1889 | { |
1890 | /* a grab sync marker */ | 1890 | /* a grab sync marker */ |
1891 | if (xevent->xclient.data.l[1] == 0x10000001) | 1891 | if (xevent->xclient.data.l[1] == 0x10000001) |
1892 | _ecore_x_window_grab_remove(xevent->xclient.data.l[2]); | 1892 | _ecore_x_window_grab_remove(xevent->xclient.data.l[2]); |
1893 | else if (xevent->xclient.data.l[1] == 0x10000002) | 1893 | else if (xevent->xclient.data.l[1] == 0x10000002) |
1894 | _ecore_x_key_grab_remove(xevent->xclient.data.l[2]); | 1894 | _ecore_x_key_grab_remove(xevent->xclient.data.l[2]); |
1895 | } | 1895 | } |
1896 | else | 1896 | else |
1897 | { | 1897 | { |
@@ -1910,7 +1910,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent) | |||
1910 | 1910 | ||
1911 | ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL); | 1911 | ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL); |
1912 | } | 1912 | } |
1913 | } /* _ecore_x_event_handle_client_message */ | 1913 | } |
1914 | 1914 | ||
1915 | void | 1915 | void |
1916 | _ecore_x_event_handle_mapping_notify(XEvent *xevent) | 1916 | _ecore_x_event_handle_mapping_notify(XEvent *xevent) |
@@ -1940,7 +1940,7 @@ _ecore_x_event_handle_mapping_notify(XEvent *xevent) | |||
1940 | e->keycode = xevent->xmapping.first_keycode; | 1940 | e->keycode = xevent->xmapping.first_keycode; |
1941 | e->num = xevent->xmapping.count; | 1941 | e->num = xevent->xmapping.count; |
1942 | ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL); | 1942 | ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL); |
1943 | } /* _ecore_x_event_handle_mapping_notify */ | 1943 | } |
1944 | 1944 | ||
1945 | void | 1945 | void |
1946 | _ecore_x_event_handle_shape_change(XEvent *xevent) | 1946 | _ecore_x_event_handle_shape_change(XEvent *xevent) |
@@ -1979,7 +1979,7 @@ _ecore_x_event_handle_shape_change(XEvent *xevent) | |||
1979 | e->h = shape_event->height; | 1979 | e->h = shape_event->height; |
1980 | e->shaped = shape_event->shaped; | 1980 | e->shaped = shape_event->shaped; |
1981 | ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL); | 1981 | ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL); |
1982 | } /* _ecore_x_event_handle_shape_change */ | 1982 | } |
1983 | 1983 | ||
1984 | void | 1984 | void |
1985 | _ecore_x_event_handle_screensaver_notify(XEvent *xevent) | 1985 | _ecore_x_event_handle_screensaver_notify(XEvent *xevent) |
@@ -2005,7 +2005,7 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent) | |||
2005 | #else /* ifdef ECORE_XSS */ | 2005 | #else /* ifdef ECORE_XSS */ |
2006 | xevent = NULL; | 2006 | xevent = NULL; |
2007 | #endif /* ifdef ECORE_XSS */ | 2007 | #endif /* ifdef ECORE_XSS */ |
2008 | } /* _ecore_x_event_handle_screensaver_notify */ | 2008 | } |
2009 | 2009 | ||
2010 | void | 2010 | void |
2011 | _ecore_x_event_handle_sync_counter(XEvent *xevent) | 2011 | _ecore_x_event_handle_sync_counter(XEvent *xevent) |
@@ -2021,7 +2021,7 @@ _ecore_x_event_handle_sync_counter(XEvent *xevent) | |||
2021 | 2021 | ||
2022 | e->time = sync_counter_event->time; | 2022 | e->time = sync_counter_event->time; |
2023 | ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL); | 2023 | ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL); |
2024 | } /* _ecore_x_event_handle_sync_counter */ | 2024 | } |
2025 | 2025 | ||
2026 | void | 2026 | void |
2027 | _ecore_x_event_handle_sync_alarm(XEvent *xevent) | 2027 | _ecore_x_event_handle_sync_alarm(XEvent *xevent) |
@@ -2039,7 +2039,7 @@ _ecore_x_event_handle_sync_alarm(XEvent *xevent) | |||
2039 | e->time = sync_alarm_event->time; | 2039 | e->time = sync_alarm_event->time; |
2040 | e->alarm = sync_alarm_event->alarm; | 2040 | e->alarm = sync_alarm_event->alarm; |
2041 | ecore_event_add(ECORE_X_EVENT_SYNC_ALARM, e, NULL, NULL); | 2041 | ecore_event_add(ECORE_X_EVENT_SYNC_ALARM, e, NULL, NULL); |
2042 | } /* _ecore_x_event_handle_sync_alarm */ | 2042 | } |
2043 | 2043 | ||
2044 | #ifdef ECORE_XRANDR | 2044 | #ifdef ECORE_XRANDR |
2045 | void | 2045 | void |
@@ -2068,7 +2068,7 @@ _ecore_x_event_handle_randr_change(XEvent *xevent) | |||
2068 | e->orientation = randr_event->rotation; | 2068 | e->orientation = randr_event->rotation; |
2069 | e->subpixel_order = randr_event->subpixel_order; | 2069 | e->subpixel_order = randr_event->subpixel_order; |
2070 | ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL); | 2070 | ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL); |
2071 | } /* _ecore_x_event_handle_randr_change */ | 2071 | } |
2072 | 2072 | ||
2073 | static void | 2073 | static void |
2074 | _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent) | 2074 | _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent) |
@@ -2091,7 +2091,7 @@ _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent) | |||
2091 | e->geo.w = randr_event->width; | 2091 | e->geo.w = randr_event->width; |
2092 | e->geo.h = randr_event->height; | 2092 | e->geo.h = randr_event->height; |
2093 | ecore_event_add(ECORE_X_EVENT_RANDR_CRTC_CHANGE, e, NULL, NULL); | 2093 | ecore_event_add(ECORE_X_EVENT_RANDR_CRTC_CHANGE, e, NULL, NULL); |
2094 | } /* _ecore_x_event_handle_randr_notify_crtc_change */ | 2094 | } |
2095 | 2095 | ||
2096 | static void | 2096 | static void |
2097 | _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent) | 2097 | _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent) |
@@ -2113,7 +2113,7 @@ _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent) | |||
2113 | e->connection = randr_event->connection; | 2113 | e->connection = randr_event->connection; |
2114 | e->subpixel_order = randr_event->subpixel_order; | 2114 | e->subpixel_order = randr_event->subpixel_order; |
2115 | ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_CHANGE, e, NULL, NULL); | 2115 | ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_CHANGE, e, NULL, NULL); |
2116 | } /* _ecore_x_event_handle_randr_notify_output_change */ | 2116 | } |
2117 | 2117 | ||
2118 | static void | 2118 | static void |
2119 | _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent) | 2119 | _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent) |
@@ -2136,7 +2136,7 @@ _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent) | |||
2136 | else | 2136 | else |
2137 | e->state = ECORE_X_RANDR_PROPERTY_CHANGE_DEL; | 2137 | e->state = ECORE_X_RANDR_PROPERTY_CHANGE_DEL; |
2138 | ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL); | 2138 | ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL); |
2139 | } /* _ecore_x_event_handle_randr_notify_output_property */ | 2139 | } |
2140 | 2140 | ||
2141 | void | 2141 | void |
2142 | _ecore_x_event_handle_randr_notify(XEvent *xevent) | 2142 | _ecore_x_event_handle_randr_notify(XEvent *xevent) |
@@ -2164,8 +2164,8 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent) | |||
2164 | ERR("Unknown XRandR RRNotify subtype: %d.", | 2164 | ERR("Unknown XRandR RRNotify subtype: %d.", |
2165 | randr_event->subtype); | 2165 | randr_event->subtype); |
2166 | break; | 2166 | break; |
2167 | } /* switch */ | 2167 | } |
2168 | } /* _ecore_x_event_handle_randr_notify */ | 2168 | } |
2169 | 2169 | ||
2170 | #endif /* ifdef ECORE_XRANDR */ | 2170 | #endif /* ifdef ECORE_XRANDR */ |
2171 | 2171 | ||
@@ -2201,7 +2201,7 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event) | |||
2201 | e->reason = notify_event->subtype; | 2201 | e->reason = notify_event->subtype; |
2202 | 2202 | ||
2203 | ecore_event_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY, e, NULL, NULL); | 2203 | ecore_event_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY, e, NULL, NULL); |
2204 | } /* _ecore_x_event_handle_fixes_selection_notify */ | 2204 | } |
2205 | 2205 | ||
2206 | #endif /* ifdef ECORE_XFIXES */ | 2206 | #endif /* ifdef ECORE_XFIXES */ |
2207 | 2207 | ||
@@ -2234,7 +2234,7 @@ _ecore_x_event_handle_damage_notify(XEvent *event) | |||
2234 | e->geometry.height = damage_event->geometry.height; | 2234 | e->geometry.height = damage_event->geometry.height; |
2235 | 2235 | ||
2236 | ecore_event_add(ECORE_X_EVENT_DAMAGE_NOTIFY, e, NULL, NULL); | 2236 | ecore_event_add(ECORE_X_EVENT_DAMAGE_NOTIFY, e, NULL, NULL); |
2237 | } /* _ecore_x_event_handle_damage_notify */ | 2237 | } |
2238 | 2238 | ||
2239 | #endif /* ifdef ECORE_XDAMAGE */ | 2239 | #endif /* ifdef ECORE_XDAMAGE */ |
2240 | 2240 | ||
@@ -2256,7 +2256,7 @@ _ecore_x_event_free_generic_event(void *data, | |||
2256 | return; | 2256 | return; |
2257 | data = NULL; ev = NULL; | 2257 | data = NULL; ev = NULL; |
2258 | #endif /* ifdef ECORE_XI2 */ | 2258 | #endif /* ifdef ECORE_XI2 */ |
2259 | } /* _ecore_x_event_free_generic_event */ | 2259 | } |
2260 | 2260 | ||
2261 | void | 2261 | void |
2262 | _ecore_x_event_handle_generic_event(XEvent *event) | 2262 | _ecore_x_event_handle_generic_event(XEvent *event) |
@@ -2300,7 +2300,7 @@ _ecore_x_event_handle_generic_event(XEvent *event) | |||
2300 | return; | 2300 | return; |
2301 | event = NULL; | 2301 | event = NULL; |
2302 | #endif /* ifdef ECORE_XI2 */ | 2302 | #endif /* ifdef ECORE_XI2 */ |
2303 | } /* _ecore_x_event_handle_generic_event */ | 2303 | } |
2304 | 2304 | ||
2305 | #ifdef ECORE_XGESTURE | 2305 | #ifdef ECORE_XGESTURE |
2306 | void | 2306 | void |
@@ -2315,7 +2315,7 @@ _ecore_x_event_handle_gesture_notify_flick(XEvent *xevent) | |||
2315 | xfe = (XGestureNotifyFlickEvent *)xevent; | 2315 | xfe = (XGestureNotifyFlickEvent *)xevent; |
2316 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Flick)); | 2316 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Flick)); |
2317 | if (!e) | 2317 | if (!e) |
2318 | return; | 2318 | return; |
2319 | 2319 | ||
2320 | e->win = xfe->window; | 2320 | e->win = xfe->window; |
2321 | e->time = xfe->time; | 2321 | e->time = xfe->time; |
@@ -2341,7 +2341,7 @@ _ecore_x_event_handle_gesture_notify_pan(XEvent *xevent) | |||
2341 | xpe = (XGestureNotifyPanEvent *)xevent; | 2341 | xpe = (XGestureNotifyPanEvent *)xevent; |
2342 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Pan)); | 2342 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Pan)); |
2343 | if (!e) | 2343 | if (!e) |
2344 | return; | 2344 | return; |
2345 | 2345 | ||
2346 | e->win = xpe->window; | 2346 | e->win = xpe->window; |
2347 | e->time = xpe->time; | 2347 | e->time = xpe->time; |
@@ -2368,7 +2368,7 @@ _ecore_x_event_handle_gesture_notify_pinchrotation(XEvent *xevent) | |||
2368 | xpre = (XGestureNotifyPinchRotationEvent *)xevent; | 2368 | xpre = (XGestureNotifyPinchRotationEvent *)xevent; |
2369 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_PinchRotation)); | 2369 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_PinchRotation)); |
2370 | if (!e) | 2370 | if (!e) |
2371 | return; | 2371 | return; |
2372 | 2372 | ||
2373 | e->win = xpre->window; | 2373 | e->win = xpre->window; |
2374 | e->time = xpre->time; | 2374 | e->time = xpre->time; |
@@ -2395,7 +2395,7 @@ _ecore_x_event_handle_gesture_notify_tap(XEvent *xevent) | |||
2395 | xte = (XGestureNotifyTapEvent *)xevent; | 2395 | xte = (XGestureNotifyTapEvent *)xevent; |
2396 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Tap)); | 2396 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Tap)); |
2397 | if (!e) | 2397 | if (!e) |
2398 | return; | 2398 | return; |
2399 | 2399 | ||
2400 | e->win = xte->window; | 2400 | e->win = xte->window; |
2401 | e->time = xte->time; | 2401 | e->time = xte->time; |
@@ -2421,7 +2421,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent) | |||
2421 | xthe = (XGestureNotifyTapNHoldEvent *)xevent; | 2421 | xthe = (XGestureNotifyTapNHoldEvent *)xevent; |
2422 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_TapNHold)); | 2422 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_TapNHold)); |
2423 | if (!e) | 2423 | if (!e) |
2424 | return; | 2424 | return; |
2425 | 2425 | ||
2426 | e->win = xthe->window; | 2426 | e->win = xthe->window; |
2427 | e->time = xthe->time; | 2427 | e->time = xthe->time; |
@@ -2436,7 +2436,7 @@ _ecore_x_event_handle_gesture_notify_tapnhold(XEvent *xevent) | |||
2436 | } | 2436 | } |
2437 | 2437 | ||
2438 | void | 2438 | void |
2439 | _ecore_x_event_handle_gesture_notify_hold(XEvent *xevent) | 2439 | _ecore_x_event_handle_gesture_notify_hold(XEvent *xevent) |
2440 | { | 2440 | { |
2441 | XGestureNotifyHoldEvent *xhe; | 2441 | XGestureNotifyHoldEvent *xhe; |
2442 | Ecore_X_Event_Gesture_Notify_Hold *e; | 2442 | Ecore_X_Event_Gesture_Notify_Hold *e; |
@@ -2447,7 +2447,7 @@ void | |||
2447 | xhe = (XGestureNotifyHoldEvent *)xevent; | 2447 | xhe = (XGestureNotifyHoldEvent *)xevent; |
2448 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Hold)); | 2448 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Hold)); |
2449 | if (!e) | 2449 | if (!e) |
2450 | return; | 2450 | return; |
2451 | 2451 | ||
2452 | e->win = xhe->window; | 2452 | e->win = xhe->window; |
2453 | e->time = xhe->time; | 2453 | e->time = xhe->time; |
@@ -2461,7 +2461,7 @@ void | |||
2461 | } | 2461 | } |
2462 | 2462 | ||
2463 | void | 2463 | void |
2464 | _ecore_x_event_handle_gesture_notify_group(XEvent *xevent) | 2464 | _ecore_x_event_handle_gesture_notify_group(XEvent *xevent) |
2465 | { | 2465 | { |
2466 | XGestureNotifyGroupEvent *xge; | 2466 | XGestureNotifyGroupEvent *xge; |
2467 | Ecore_X_Event_Gesture_Notify_Group *e; | 2467 | Ecore_X_Event_Gesture_Notify_Group *e; |
@@ -2472,7 +2472,7 @@ void | |||
2472 | xge = (XGestureNotifyGroupEvent *)xevent; | 2472 | xge = (XGestureNotifyGroupEvent *)xevent; |
2473 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Group)); | 2473 | e = calloc(1, sizeof(Ecore_X_Event_Gesture_Notify_Group)); |
2474 | if (!e) | 2474 | if (!e) |
2475 | return; | 2475 | return; |
2476 | 2476 | ||
2477 | e->win = xge->window; | 2477 | e->win = xge->window; |
2478 | e->time = xge->time; | 2478 | e->time = xge->time; |
@@ -2482,5 +2482,6 @@ void | |||
2482 | 2482 | ||
2483 | ecore_event_add(ECORE_X_EVENT_GESTURE_NOTIFY_GROUP, e, NULL, NULL); | 2483 | ecore_event_add(ECORE_X_EVENT_GESTURE_NOTIFY_GROUP, e, NULL, NULL); |
2484 | } | 2484 | } |
2485 | |||
2485 | #endif /* ifdef ECORE_XGESTURE */ | 2486 | #endif /* ifdef ECORE_XGESTURE */ |
2486 | 2487 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c index e81af13..da0a6c3 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_fixes.c | |||
@@ -32,13 +32,13 @@ _ecore_x_fixes_init(void) | |||
32 | #else /* ifdef ECORE_XFIXES */ | 32 | #else /* ifdef ECORE_XFIXES */ |
33 | _fixes_available = 0; | 33 | _fixes_available = 0; |
34 | #endif /* ifdef ECORE_XFIXES */ | 34 | #endif /* ifdef ECORE_XFIXES */ |
35 | } /* _ecore_x_fixes_init */ | 35 | } |
36 | 36 | ||
37 | #ifdef ECORE_XFIXES | 37 | #ifdef ECORE_XFIXES |
38 | /* I don't know what to call this function. */ | 38 | /* I don't know what to call this function. */ |
39 | static XRectangle * | 39 | static XRectangle * |
40 | _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, | 40 | _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, |
41 | int num) | 41 | int num) |
42 | { | 42 | { |
43 | XRectangle *xrect; | 43 | XRectangle *xrect; |
44 | int i; | 44 | int i; |
@@ -58,11 +58,11 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, | |||
58 | xrect[i].height = rects[i].height; | 58 | xrect[i].height = rects[i].height; |
59 | } | 59 | } |
60 | return xrect; | 60 | return xrect; |
61 | } /* _ecore_x_rectangle_ecore_to_x */ | 61 | } |
62 | 62 | ||
63 | static Ecore_X_Rectangle * | 63 | static Ecore_X_Rectangle * |
64 | _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, | 64 | _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, |
65 | int num) | 65 | int num) |
66 | { | 66 | { |
67 | Ecore_X_Rectangle *rects; | 67 | Ecore_X_Rectangle *rects; |
68 | int i; | 68 | int i; |
@@ -82,7 +82,7 @@ _ecore_x_rectangle_x_to_ecore(XRectangle *xrect, | |||
82 | rects[i].height = xrect[i].height; | 82 | rects[i].height = xrect[i].height; |
83 | } | 83 | } |
84 | return rects; | 84 | return rects; |
85 | } /* _ecore_x_rectangle_x_to_ecore */ | 85 | } |
86 | 86 | ||
87 | #endif /* ifdef ECORE_XFIXES */ | 87 | #endif /* ifdef ECORE_XFIXES */ |
88 | 88 | ||
@@ -106,7 +106,7 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection) | |||
106 | 106 | ||
107 | EAPI Ecore_X_Region | 107 | EAPI Ecore_X_Region |
108 | ecore_x_region_new(Ecore_X_Rectangle *rects, | 108 | ecore_x_region_new(Ecore_X_Rectangle *rects, |
109 | int num) | 109 | int num) |
110 | { | 110 | { |
111 | #ifdef ECORE_XFIXES | 111 | #ifdef ECORE_XFIXES |
112 | Ecore_X_Region region; | 112 | Ecore_X_Region region; |
@@ -120,7 +120,7 @@ ecore_x_region_new(Ecore_X_Rectangle *rects, | |||
120 | #else /* ifdef ECORE_XFIXES */ | 120 | #else /* ifdef ECORE_XFIXES */ |
121 | return 0; | 121 | return 0; |
122 | #endif /* ifdef ECORE_XFIXES */ | 122 | #endif /* ifdef ECORE_XFIXES */ |
123 | } /* ecore_x_region_new */ | 123 | } |
124 | 124 | ||
125 | EAPI Ecore_X_Region | 125 | EAPI Ecore_X_Region |
126 | ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) | 126 | ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) |
@@ -134,10 +134,10 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) | |||
134 | #else /* ifdef ECORE_XFIXES */ | 134 | #else /* ifdef ECORE_XFIXES */ |
135 | return 0; | 135 | return 0; |
136 | #endif /* ifdef ECORE_XFIXES */ | 136 | #endif /* ifdef ECORE_XFIXES */ |
137 | } /* ecore_x_region_new_from_bitmap */ | 137 | } |
138 | 138 | ||
139 | EAPI Ecore_X_Region | 139 | EAPI Ecore_X_Region |
140 | ecore_x_region_new_from_window(Ecore_X_Window win, | 140 | ecore_x_region_new_from_window(Ecore_X_Window win, |
141 | Ecore_X_Region_Type type) | 141 | Ecore_X_Region_Type type) |
142 | { | 142 | { |
143 | #ifdef ECORE_XFIXES | 143 | #ifdef ECORE_XFIXES |
@@ -149,7 +149,7 @@ ecore_x_region_new_from_window(Ecore_X_Window win, | |||
149 | #else /* ifdef ECORE_XFIXES */ | 149 | #else /* ifdef ECORE_XFIXES */ |
150 | return 0; | 150 | return 0; |
151 | #endif /* ifdef ECORE_XFIXES */ | 151 | #endif /* ifdef ECORE_XFIXES */ |
152 | } /* ecore_x_region_new_from_window */ | 152 | } |
153 | 153 | ||
154 | EAPI Ecore_X_Region | 154 | EAPI Ecore_X_Region |
155 | ecore_x_region_new_from_gc(Ecore_X_GC gc) | 155 | ecore_x_region_new_from_gc(Ecore_X_GC gc) |
@@ -163,7 +163,7 @@ ecore_x_region_new_from_gc(Ecore_X_GC gc) | |||
163 | #else /* ifdef ECORE_XFIXES */ | 163 | #else /* ifdef ECORE_XFIXES */ |
164 | return 0; | 164 | return 0; |
165 | #endif /* ifdef ECORE_XFIXES */ | 165 | #endif /* ifdef ECORE_XFIXES */ |
166 | } /* ecore_x_region_new_from_gc */ | 166 | } |
167 | 167 | ||
168 | EAPI Ecore_X_Region | 168 | EAPI Ecore_X_Region |
169 | ecore_x_region_new_from_picture(Ecore_X_Picture picture) | 169 | ecore_x_region_new_from_picture(Ecore_X_Picture picture) |
@@ -177,7 +177,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture) | |||
177 | #else /* ifdef ECORE_XFIXES */ | 177 | #else /* ifdef ECORE_XFIXES */ |
178 | return 0; | 178 | return 0; |
179 | #endif /* ifdef ECORE_XFIXES */ | 179 | #endif /* ifdef ECORE_XFIXES */ |
180 | } /* ecore_x_region_new_from_picture */ | 180 | } |
181 | 181 | ||
182 | EAPI void | 182 | EAPI void |
183 | ecore_x_region_free(Ecore_X_Region region) | 183 | ecore_x_region_free(Ecore_X_Region region) |
@@ -186,19 +186,19 @@ ecore_x_region_free(Ecore_X_Region region) | |||
186 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 186 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
187 | XFixesDestroyRegion(_ecore_x_disp, region); | 187 | XFixesDestroyRegion(_ecore_x_disp, region); |
188 | #endif /* ifdef ECORE_XFIXES */ | 188 | #endif /* ifdef ECORE_XFIXES */ |
189 | } /* ecore_x_region_free */ | 189 | } |
190 | 190 | ||
191 | EAPI void | 191 | EAPI void |
192 | ecore_x_region_set(Ecore_X_Region region, | 192 | ecore_x_region_set(Ecore_X_Region region, |
193 | Ecore_X_Rectangle *rects, | 193 | Ecore_X_Rectangle *rects, |
194 | int num) | 194 | int num) |
195 | { | 195 | { |
196 | #ifdef ECORE_XFIXES | 196 | #ifdef ECORE_XFIXES |
197 | XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num); | 197 | XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num); |
198 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 198 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
199 | XFixesSetRegion(_ecore_x_disp, region, xrect, num); | 199 | XFixesSetRegion(_ecore_x_disp, region, xrect, num); |
200 | #endif /* ifdef ECORE_XFIXES */ | 200 | #endif /* ifdef ECORE_XFIXES */ |
201 | } /* ecore_x_region_set */ | 201 | } |
202 | 202 | ||
203 | EAPI void | 203 | EAPI void |
204 | ecore_x_region_copy(Ecore_X_Region dest, | 204 | ecore_x_region_copy(Ecore_X_Region dest, |
@@ -208,7 +208,7 @@ ecore_x_region_copy(Ecore_X_Region dest, | |||
208 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 208 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
209 | XFixesCopyRegion(_ecore_x_disp, dest, source); | 209 | XFixesCopyRegion(_ecore_x_disp, dest, source); |
210 | #endif /* ifdef ECORE_XFIXES */ | 210 | #endif /* ifdef ECORE_XFIXES */ |
211 | } /* ecore_x_region_copy */ | 211 | } |
212 | 212 | ||
213 | EAPI void | 213 | EAPI void |
214 | ecore_x_region_combine(Ecore_X_Region dest, | 214 | ecore_x_region_combine(Ecore_X_Region dest, |
@@ -219,7 +219,7 @@ ecore_x_region_combine(Ecore_X_Region dest, | |||
219 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 219 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
220 | XFixesUnionRegion(_ecore_x_disp, dest, source1, source2); | 220 | XFixesUnionRegion(_ecore_x_disp, dest, source1, source2); |
221 | #endif /* ifdef ECORE_XFIXES */ | 221 | #endif /* ifdef ECORE_XFIXES */ |
222 | } /* ecore_x_region_combine */ | 222 | } |
223 | 223 | ||
224 | EAPI void | 224 | EAPI void |
225 | ecore_x_region_intersect(Ecore_X_Region dest, | 225 | ecore_x_region_intersect(Ecore_X_Region dest, |
@@ -230,7 +230,7 @@ ecore_x_region_intersect(Ecore_X_Region dest, | |||
230 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 230 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
231 | XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2); | 231 | XFixesIntersectRegion(_ecore_x_disp, dest, source1, source2); |
232 | #endif /* ifdef ECORE_XFIXES */ | 232 | #endif /* ifdef ECORE_XFIXES */ |
233 | } /* ecore_x_region_intersect */ | 233 | } |
234 | 234 | ||
235 | EAPI void | 235 | EAPI void |
236 | ecore_x_region_subtract(Ecore_X_Region dest, | 236 | ecore_x_region_subtract(Ecore_X_Region dest, |
@@ -241,35 +241,36 @@ ecore_x_region_subtract(Ecore_X_Region dest, | |||
241 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 241 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
242 | XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2); | 242 | XFixesSubtractRegion(_ecore_x_disp, dest, source1, source2); |
243 | #endif /* ifdef ECORE_XFIXES */ | 243 | #endif /* ifdef ECORE_XFIXES */ |
244 | } /* ecore_x_region_subtract */ | 244 | } |
245 | 245 | ||
246 | EAPI void | 246 | EAPI void |
247 | ecore_x_region_invert(Ecore_X_Region dest, | 247 | ecore_x_region_invert(Ecore_X_Region dest, |
248 | Ecore_X_Rectangle *bounds, | 248 | Ecore_X_Rectangle *bounds, |
249 | Ecore_X_Region source) | 249 | Ecore_X_Region source) |
250 | { | 250 | { |
251 | #ifdef ECORE_XFIXES | 251 | #ifdef ECORE_XFIXES |
252 | XRectangle *xbound; | 252 | XRectangle *xbound; |
253 | int num = 0; | 253 | int num = 0; |
254 | 254 | ||
255 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 255 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
256 | while (bounds + num) num++; | 256 | while (bounds + num) |
257 | num++; | ||
257 | xbound = _ecore_x_rectangle_ecore_to_x(bounds, num); | 258 | xbound = _ecore_x_rectangle_ecore_to_x(bounds, num); |
258 | 259 | ||
259 | XFixesInvertRegion(_ecore_x_disp, dest, xbound, source); | 260 | XFixesInvertRegion(_ecore_x_disp, dest, xbound, source); |
260 | #endif /* ifdef ECORE_XFIXES */ | 261 | #endif /* ifdef ECORE_XFIXES */ |
261 | } /* ecore_x_region_invert */ | 262 | } |
262 | 263 | ||
263 | EAPI void | 264 | EAPI void |
264 | ecore_x_region_translate(Ecore_X_Region region, | 265 | ecore_x_region_translate(Ecore_X_Region region, |
265 | int dx, | 266 | int dx, |
266 | int dy) | 267 | int dy) |
267 | { | 268 | { |
268 | #ifdef ECORE_XFIXES | 269 | #ifdef ECORE_XFIXES |
269 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 270 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
270 | XFixesTranslateRegion(_ecore_x_disp, region, dx, dy); | 271 | XFixesTranslateRegion(_ecore_x_disp, region, dx, dy); |
271 | #endif /* ifdef ECORE_XFIXES */ | 272 | #endif /* ifdef ECORE_XFIXES */ |
272 | } /* ecore_x_region_translate */ | 273 | } |
273 | 274 | ||
274 | EAPI void | 275 | EAPI void |
275 | ecore_x_region_extents(Ecore_X_Region dest, | 276 | ecore_x_region_extents(Ecore_X_Region dest, |
@@ -279,11 +280,11 @@ ecore_x_region_extents(Ecore_X_Region dest, | |||
279 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 280 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
280 | XFixesRegionExtents(_ecore_x_disp, dest, source); | 281 | XFixesRegionExtents(_ecore_x_disp, dest, source); |
281 | #endif /* ifdef ECORE_XFIXES */ | 282 | #endif /* ifdef ECORE_XFIXES */ |
282 | } /* ecore_x_region_extents */ | 283 | } |
283 | 284 | ||
284 | EAPI Ecore_X_Rectangle * | 285 | EAPI Ecore_X_Rectangle * |
285 | ecore_x_region_fetch(Ecore_X_Region region, | 286 | ecore_x_region_fetch(Ecore_X_Region region, |
286 | int *num, | 287 | int *num, |
287 | Ecore_X_Rectangle *bounds){ | 288 | Ecore_X_Rectangle *bounds){ |
288 | #ifdef ECORE_XFIXES | 289 | #ifdef ECORE_XFIXES |
289 | Ecore_X_Rectangle *rects; | 290 | Ecore_X_Rectangle *rects; |
@@ -300,40 +301,40 @@ ecore_x_region_fetch(Ecore_X_Region region, | |||
300 | #else /* ifdef ECORE_XFIXES */ | 301 | #else /* ifdef ECORE_XFIXES */ |
301 | return NULL; | 302 | return NULL; |
302 | #endif /* ifdef ECORE_XFIXES */ | 303 | #endif /* ifdef ECORE_XFIXES */ |
303 | } /* ecore_x_region_fetch */ | 304 | } |
304 | 305 | ||
305 | EAPI void | 306 | EAPI void |
306 | ecore_x_region_expand(Ecore_X_Region dest, | 307 | ecore_x_region_expand(Ecore_X_Region dest, |
307 | Ecore_X_Region source, | 308 | Ecore_X_Region source, |
308 | unsigned int left, | 309 | unsigned int left, |
309 | unsigned int right, | 310 | unsigned int right, |
310 | unsigned int top, | 311 | unsigned int top, |
311 | unsigned int bottom) | 312 | unsigned int bottom) |
312 | { | 313 | { |
313 | #ifdef ECORE_XFIXES | 314 | #ifdef ECORE_XFIXES |
314 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 315 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
315 | XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom); | 316 | XFixesExpandRegion(_ecore_x_disp, dest, source, left, right, top, bottom); |
316 | #endif /* ifdef ECORE_XFIXES */ | 317 | #endif /* ifdef ECORE_XFIXES */ |
317 | } /* ecore_x_region_expand */ | 318 | } |
318 | 319 | ||
319 | EAPI void | 320 | EAPI void |
320 | ecore_x_region_gc_clip_set(Ecore_X_Region region, | 321 | ecore_x_region_gc_clip_set(Ecore_X_Region region, |
321 | Ecore_X_GC gc, | 322 | Ecore_X_GC gc, |
322 | int x_origin, | 323 | int x_origin, |
323 | int y_origin) | 324 | int y_origin) |
324 | { | 325 | { |
325 | #ifdef ECORE_XFIXES | 326 | #ifdef ECORE_XFIXES |
326 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 327 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
327 | XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region); | 328 | XFixesSetGCClipRegion(_ecore_x_disp, gc, x_origin, y_origin, region); |
328 | #endif /* ifdef ECORE_XFIXES */ | 329 | #endif /* ifdef ECORE_XFIXES */ |
329 | } /* ecore_x_region_gc_clip_set */ | 330 | } |
330 | 331 | ||
331 | EAPI void | 332 | EAPI void |
332 | ecore_x_region_window_shape_set(Ecore_X_Region region, | 333 | ecore_x_region_window_shape_set(Ecore_X_Region region, |
333 | Ecore_X_Window win, | 334 | Ecore_X_Window win, |
334 | Ecore_X_Shape_Type type, | 335 | Ecore_X_Shape_Type type, |
335 | int x_offset, | 336 | int x_offset, |
336 | int y_offset) | 337 | int y_offset) |
337 | { | 338 | { |
338 | #ifdef ECORE_XFIXES | 339 | #ifdef ECORE_XFIXES |
339 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 340 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -344,13 +345,13 @@ ecore_x_region_window_shape_set(Ecore_X_Region region, | |||
344 | y_offset, | 345 | y_offset, |
345 | region); | 346 | region); |
346 | #endif /* ifdef ECORE_XFIXES */ | 347 | #endif /* ifdef ECORE_XFIXES */ |
347 | } /* ecore_x_region_window_shape_set */ | 348 | } |
348 | 349 | ||
349 | EAPI void | 350 | EAPI void |
350 | ecore_x_region_picture_clip_set(Ecore_X_Region region, | 351 | ecore_x_region_picture_clip_set(Ecore_X_Region region, |
351 | Ecore_X_Picture picture, | 352 | Ecore_X_Picture picture, |
352 | int x_origin, | 353 | int x_origin, |
353 | int y_origin) | 354 | int y_origin) |
354 | { | 355 | { |
355 | #ifdef ECORE_XFIXES | 356 | #ifdef ECORE_XFIXES |
356 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 357 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -360,5 +361,5 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region, | |||
360 | y_origin, | 361 | y_origin, |
361 | region); | 362 | region); |
362 | #endif /* ifdef ECORE_XFIXES */ | 363 | #endif /* ifdef ECORE_XFIXES */ |
363 | } /* ecore_x_region_picture_clip_set */ | 364 | } |
364 | 365 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c index 10b807b..5396366 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gc.c | |||
@@ -19,9 +19,9 @@ | |||
19 | * @return The new default graphics context. | 19 | * @return The new default graphics context. |
20 | */ | 20 | */ |
21 | EAPI Ecore_X_GC | 21 | EAPI Ecore_X_GC |
22 | ecore_x_gc_new(Ecore_X_Drawable draw, | 22 | ecore_x_gc_new(Ecore_X_Drawable draw, |
23 | Ecore_X_GC_Value_Mask value_mask, | 23 | Ecore_X_GC_Value_Mask value_mask, |
24 | const unsigned int *value_list) | 24 | const unsigned int *value_list) |
25 | { | 25 | { |
26 | XGCValues gcv; | 26 | XGCValues gcv; |
27 | int mask; | 27 | int mask; |
@@ -152,11 +152,11 @@ ecore_x_gc_new(Ecore_X_Drawable draw, | |||
152 | gcv.arc_mode = value_list[idx]; | 152 | gcv.arc_mode = value_list[idx]; |
153 | idx++; | 153 | idx++; |
154 | break; | 154 | break; |
155 | } /* switch */ | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
158 | return XCreateGC(_ecore_x_disp, draw, value_mask, &gcv); | 158 | return XCreateGC(_ecore_x_disp, draw, value_mask, &gcv); |
159 | } /* ecore_x_gc_new */ | 159 | } |
160 | 160 | ||
161 | /** | 161 | /** |
162 | * Deletes and frees the given graphics context. | 162 | * Deletes and frees the given graphics context. |
@@ -167,5 +167,5 @@ ecore_x_gc_free(Ecore_X_GC gc) | |||
167 | { | 167 | { |
168 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 168 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
169 | XFreeGC(_ecore_x_disp, gc); | 169 | XFreeGC(_ecore_x_disp, gc); |
170 | } /* ecore_x_gc_free */ | 170 | } |
171 | 171 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c index e1dc75c..e89421b 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_gesture.c | |||
@@ -26,7 +26,7 @@ _ecore_x_gesture_init(void) | |||
26 | _gesture_available = EINA_TRUE; | 26 | _gesture_available = EINA_TRUE; |
27 | } | 27 | } |
28 | else | 28 | else |
29 | _gesture_available = EINA_FALSE; | 29 | _gesture_available = EINA_FALSE; |
30 | #else /* ifdef ECORE_XGESTURE */ | 30 | #else /* ifdef ECORE_XGESTURE */ |
31 | _gesture_available = EINA_FALSE; | 31 | _gesture_available = EINA_FALSE; |
32 | #endif /* ifdef ECORE_XGESTURE */ | 32 | #endif /* ifdef ECORE_XGESTURE */ |
@@ -48,11 +48,11 @@ ecore_x_gesture_events_select(Ecore_X_Window win, | |||
48 | { | 48 | { |
49 | #ifdef ECORE_XGESTURE | 49 | #ifdef ECORE_XGESTURE |
50 | if (!_gesture_available) | 50 | if (!_gesture_available) |
51 | return EINA_FALSE; | 51 | return EINA_FALSE; |
52 | 52 | ||
53 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 53 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
54 | XGestureSelectEvents(_ecore_x_disp, win, mask); | 54 | XGestureSelectEvents(_ecore_x_disp, win, mask); |
55 | 55 | ||
56 | return EINA_TRUE; | 56 | return EINA_TRUE; |
57 | #else /* ifdef ECORE_XGESTURE */ | 57 | #else /* ifdef ECORE_XGESTURE */ |
58 | return EINA_FALSE; | 58 | return EINA_FALSE; |
@@ -68,7 +68,7 @@ ecore_x_gesture_events_selected_get(Ecore_X_Window win) | |||
68 | Ecore_X_Gesture_Event_Mask mask; | 68 | Ecore_X_Gesture_Event_Mask mask; |
69 | 69 | ||
70 | if (!_gesture_available) | 70 | if (!_gesture_available) |
71 | return ECORE_X_GESTURE_EVENT_MASK_NONE; | 71 | return ECORE_X_GESTURE_EVENT_MASK_NONE; |
72 | 72 | ||
73 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 73 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
74 | if (GestureSuccess != XGestureGetSelectedEvents(_ecore_x_disp, win, &mask)) | 74 | if (GestureSuccess != XGestureGetSelectedEvents(_ecore_x_disp, win, &mask)) |
@@ -76,7 +76,7 @@ ecore_x_gesture_events_selected_get(Ecore_X_Window win) | |||
76 | mask = ECORE_X_GESTURE_EVENT_MASK_NONE; | 76 | mask = ECORE_X_GESTURE_EVENT_MASK_NONE; |
77 | return mask; | 77 | return mask; |
78 | } | 78 | } |
79 | 79 | ||
80 | return mask; | 80 | return mask; |
81 | #else /* ifdef ECORE_XGESTURE */ | 81 | #else /* ifdef ECORE_XGESTURE */ |
82 | return ECORE_X_GESTURE_EVENT_MASK_NONE; | 82 | return ECORE_X_GESTURE_EVENT_MASK_NONE; |
@@ -91,14 +91,14 @@ ecore_x_gesture_event_grab(Ecore_X_Window win, | |||
91 | { | 91 | { |
92 | #ifdef ECORE_XGESTURE | 92 | #ifdef ECORE_XGESTURE |
93 | if (!_gesture_available) | 93 | if (!_gesture_available) |
94 | return EINA_FALSE; | 94 | return EINA_FALSE; |
95 | 95 | ||
96 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 96 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
97 | if (GestureGrabSuccess != XGestureGrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime)) | 97 | if (GestureGrabSuccess != XGestureGrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime)) |
98 | { | 98 | { |
99 | return EINA_FALSE; | 99 | return EINA_FALSE; |
100 | } | 100 | } |
101 | 101 | ||
102 | return EINA_TRUE; | 102 | return EINA_TRUE; |
103 | #else /* ifdef ECORE_XGESTURE */ | 103 | #else /* ifdef ECORE_XGESTURE */ |
104 | return EINA_FALSE; | 104 | return EINA_FALSE; |
@@ -117,14 +117,14 @@ ecore_x_gesture_event_ungrab(Ecore_X_Window win, | |||
117 | Ecore_X_Gesture_Event_Mask mask; | 117 | Ecore_X_Gesture_Event_Mask mask; |
118 | 118 | ||
119 | if (!_gesture_available) | 119 | if (!_gesture_available) |
120 | return EINA_FALSE; | 120 | return EINA_FALSE; |
121 | 121 | ||
122 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 122 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
123 | if (GestureUngrabSuccess != XGestureUngrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime)) | 123 | if (GestureUngrabSuccess != XGestureUngrabEvent(_ecore_x_disp, win, type, num_fingers, CurrentTime)) |
124 | { | 124 | { |
125 | return EINA_FALSE; | 125 | return EINA_FALSE; |
126 | } | 126 | } |
127 | 127 | ||
128 | return EINA_TRUE; | 128 | return EINA_TRUE; |
129 | #else /* ifdef ECORE_XGESTURE */ | 129 | #else /* ifdef ECORE_XGESTURE */ |
130 | return EINA_FALSE; | 130 | return EINA_FALSE; |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c index 3899651..8d6ea1f 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_icccm.c | |||
@@ -21,10 +21,10 @@ EAPI void | |||
21 | ecore_x_icccm_init(void) | 21 | ecore_x_icccm_init(void) |
22 | { | 22 | { |
23 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 23 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
24 | } /* ecore_x_icccm_init */ | 24 | } |
25 | 25 | ||
26 | EAPI void | 26 | EAPI void |
27 | ecore_x_icccm_state_set(Ecore_X_Window win, | 27 | ecore_x_icccm_state_set(Ecore_X_Window win, |
28 | Ecore_X_Window_State_Hint state) | 28 | Ecore_X_Window_State_Hint state) |
29 | { | 29 | { |
30 | unsigned long c[2]; | 30 | unsigned long c[2]; |
@@ -41,7 +41,7 @@ ecore_x_icccm_state_set(Ecore_X_Window win, | |||
41 | XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE, | 41 | XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE, |
42 | ECORE_X_ATOM_WM_STATE, 32, PropModeReplace, | 42 | ECORE_X_ATOM_WM_STATE, 32, PropModeReplace, |
43 | (unsigned char *)c, 2); | 43 | (unsigned char *)c, 2); |
44 | } /* ecore_x_icccm_state_set */ | 44 | } |
45 | 45 | ||
46 | EAPI Ecore_X_Window_State_Hint | 46 | EAPI Ecore_X_Window_State_Hint |
47 | ecore_x_icccm_state_get(Ecore_X_Window win) | 47 | ecore_x_icccm_state_get(Ecore_X_Window win) |
@@ -72,47 +72,47 @@ ecore_x_icccm_state_get(Ecore_X_Window win) | |||
72 | XFree(prop_ret); | 72 | XFree(prop_ret); |
73 | 73 | ||
74 | return hint; | 74 | return hint; |
75 | } /* ecore_x_icccm_state_get */ | 75 | } |
76 | 76 | ||
77 | EAPI void | 77 | EAPI void |
78 | ecore_x_icccm_delete_window_send(Ecore_X_Window win, | 78 | ecore_x_icccm_delete_window_send(Ecore_X_Window win, |
79 | Ecore_X_Time t) | 79 | Ecore_X_Time t) |
80 | { | 80 | { |
81 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 81 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
82 | ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, | 82 | ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, |
83 | ECORE_X_EVENT_MASK_NONE, | 83 | ECORE_X_EVENT_MASK_NONE, |
84 | ECORE_X_ATOM_WM_DELETE_WINDOW, | 84 | ECORE_X_ATOM_WM_DELETE_WINDOW, |
85 | t, 0, 0, 0); | 85 | t, 0, 0, 0); |
86 | } /* ecore_x_icccm_delete_window_send */ | 86 | } |
87 | 87 | ||
88 | EAPI void | 88 | EAPI void |
89 | ecore_x_icccm_take_focus_send(Ecore_X_Window win, | 89 | ecore_x_icccm_take_focus_send(Ecore_X_Window win, |
90 | Ecore_X_Time t) | 90 | Ecore_X_Time t) |
91 | { | 91 | { |
92 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 92 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
93 | ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, | 93 | ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, |
94 | ECORE_X_EVENT_MASK_NONE, | 94 | ECORE_X_EVENT_MASK_NONE, |
95 | ECORE_X_ATOM_WM_TAKE_FOCUS, | 95 | ECORE_X_ATOM_WM_TAKE_FOCUS, |
96 | t, 0, 0, 0); | 96 | t, 0, 0, 0); |
97 | } /* ecore_x_icccm_take_focus_send */ | 97 | } |
98 | 98 | ||
99 | EAPI void | 99 | EAPI void |
100 | ecore_x_icccm_save_yourself_send(Ecore_X_Window win, | 100 | ecore_x_icccm_save_yourself_send(Ecore_X_Window win, |
101 | Ecore_X_Time t) | 101 | Ecore_X_Time t) |
102 | { | 102 | { |
103 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 103 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
104 | ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, | 104 | ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, |
105 | ECORE_X_EVENT_MASK_NONE, | 105 | ECORE_X_EVENT_MASK_NONE, |
106 | ECORE_X_ATOM_WM_SAVE_YOURSELF, | 106 | ECORE_X_ATOM_WM_SAVE_YOURSELF, |
107 | t, 0, 0, 0); | 107 | t, 0, 0, 0); |
108 | } /* ecore_x_icccm_save_yourself_send */ | 108 | } |
109 | 109 | ||
110 | EAPI void | 110 | EAPI void |
111 | ecore_x_icccm_move_resize_send(Ecore_X_Window win, | 111 | ecore_x_icccm_move_resize_send(Ecore_X_Window win, |
112 | int x, | 112 | int x, |
113 | int y, | 113 | int y, |
114 | int w, | 114 | int w, |
115 | int h) | 115 | int h) |
116 | { | 116 | { |
117 | XEvent ev; | 117 | XEvent ev; |
118 | 118 | ||
@@ -129,17 +129,17 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win, | |||
129 | ev.xconfigure.above = None; | 129 | ev.xconfigure.above = None; |
130 | ev.xconfigure.override_redirect = False; | 130 | ev.xconfigure.override_redirect = False; |
131 | XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev); | 131 | XSendEvent(_ecore_x_disp, win, False, StructureNotifyMask, &ev); |
132 | } /* ecore_x_icccm_move_resize_send */ | 132 | } |
133 | 133 | ||
134 | EAPI void | 134 | EAPI void |
135 | ecore_x_icccm_hints_set(Ecore_X_Window win, | 135 | ecore_x_icccm_hints_set(Ecore_X_Window win, |
136 | Eina_Bool accepts_focus, | 136 | Eina_Bool accepts_focus, |
137 | Ecore_X_Window_State_Hint initial_state, | 137 | Ecore_X_Window_State_Hint initial_state, |
138 | Ecore_X_Pixmap icon_pixmap, | 138 | Ecore_X_Pixmap icon_pixmap, |
139 | Ecore_X_Pixmap icon_mask, | 139 | Ecore_X_Pixmap icon_mask, |
140 | Ecore_X_Window icon_window, | 140 | Ecore_X_Window icon_window, |
141 | Ecore_X_Window window_group, | 141 | Ecore_X_Window window_group, |
142 | Eina_Bool is_urgent) | 142 | Eina_Bool is_urgent) |
143 | { | 143 | { |
144 | XWMHints *hints; | 144 | XWMHints *hints; |
145 | 145 | ||
@@ -186,17 +186,17 @@ ecore_x_icccm_hints_set(Ecore_X_Window win, | |||
186 | 186 | ||
187 | XSetWMHints(_ecore_x_disp, win, hints); | 187 | XSetWMHints(_ecore_x_disp, win, hints); |
188 | XFree(hints); | 188 | XFree(hints); |
189 | } /* ecore_x_icccm_hints_set */ | 189 | } |
190 | 190 | ||
191 | EAPI Eina_Bool | 191 | EAPI Eina_Bool |
192 | ecore_x_icccm_hints_get(Ecore_X_Window win, | 192 | ecore_x_icccm_hints_get(Ecore_X_Window win, |
193 | Eina_Bool *accepts_focus, | 193 | Eina_Bool *accepts_focus, |
194 | Ecore_X_Window_State_Hint *initial_state, | 194 | Ecore_X_Window_State_Hint *initial_state, |
195 | Ecore_X_Pixmap *icon_pixmap, | 195 | Ecore_X_Pixmap *icon_pixmap, |
196 | Ecore_X_Pixmap *icon_mask, | 196 | Ecore_X_Pixmap *icon_mask, |
197 | Ecore_X_Window *icon_window, | 197 | Ecore_X_Window *icon_window, |
198 | Ecore_X_Window *window_group, | 198 | Ecore_X_Window *window_group, |
199 | Eina_Bool *is_urgent) | 199 | Eina_Bool *is_urgent) |
200 | { | 200 | { |
201 | XWMHints *hints; | 201 | XWMHints *hints; |
202 | 202 | ||
@@ -263,22 +263,22 @@ ecore_x_icccm_hints_get(Ecore_X_Window win, | |||
263 | } | 263 | } |
264 | 264 | ||
265 | return EINA_FALSE; | 265 | return EINA_FALSE; |
266 | } /* ecore_x_icccm_hints_get */ | 266 | } |
267 | 267 | ||
268 | EAPI void | 268 | EAPI void |
269 | ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, | 269 | ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, |
270 | Eina_Bool request_pos, | 270 | Eina_Bool request_pos, |
271 | Ecore_X_Gravity gravity, | 271 | Ecore_X_Gravity gravity, |
272 | int min_w, | 272 | int min_w, |
273 | int min_h, | 273 | int min_h, |
274 | int max_w, | 274 | int max_w, |
275 | int max_h, | 275 | int max_h, |
276 | int base_w, | 276 | int base_w, |
277 | int base_h, | 277 | int base_h, |
278 | int step_x, | 278 | int step_x, |
279 | int step_y, | 279 | int step_y, |
280 | double min_aspect, | 280 | double min_aspect, |
281 | double max_aspect) | 281 | double max_aspect) |
282 | { | 282 | { |
283 | XSizeHints hint; | 283 | XSizeHints hint; |
284 | long mask; | 284 | long mask; |
@@ -335,22 +335,22 @@ ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, | |||
335 | } | 335 | } |
336 | 336 | ||
337 | XSetWMNormalHints(_ecore_x_disp, win, &hint); | 337 | XSetWMNormalHints(_ecore_x_disp, win, &hint); |
338 | } /* ecore_x_icccm_size_pos_hints_set */ | 338 | } |
339 | 339 | ||
340 | EAPI Eina_Bool | 340 | EAPI Eina_Bool |
341 | ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, | 341 | ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, |
342 | Eina_Bool *request_pos, | 342 | Eina_Bool *request_pos, |
343 | Ecore_X_Gravity *gravity, | 343 | Ecore_X_Gravity *gravity, |
344 | int *min_w, | 344 | int *min_w, |
345 | int *min_h, | 345 | int *min_h, |
346 | int *max_w, | 346 | int *max_w, |
347 | int *max_h, | 347 | int *max_h, |
348 | int *base_w, | 348 | int *base_w, |
349 | int *base_h, | 349 | int *base_h, |
350 | int *step_x, | 350 | int *step_x, |
351 | int *step_y, | 351 | int *step_y, |
352 | double *min_aspect, | 352 | double *min_aspect, |
353 | double *max_aspect) | 353 | double *max_aspect) |
354 | { | 354 | { |
355 | XSizeHints hint; | 355 | XSizeHints hint; |
356 | long mask; | 356 | long mask; |
@@ -460,11 +460,11 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, | |||
460 | *max_aspect = maxa; | 460 | *max_aspect = maxa; |
461 | 461 | ||
462 | return EINA_TRUE; | 462 | return EINA_TRUE; |
463 | } /* ecore_x_icccm_size_pos_hints_get */ | 463 | } |
464 | 464 | ||
465 | EAPI void | 465 | EAPI void |
466 | ecore_x_icccm_title_set(Ecore_X_Window win, | 466 | ecore_x_icccm_title_set(Ecore_X_Window win, |
467 | const char *t) | 467 | const char *t) |
468 | { | 468 | { |
469 | char *list[1]; | 469 | char *list[1]; |
470 | XTextProperty xprop; | 470 | XTextProperty xprop; |
@@ -500,7 +500,7 @@ ecore_x_icccm_title_set(Ecore_X_Window win, | |||
500 | } | 500 | } |
501 | 501 | ||
502 | free(list[0]); | 502 | free(list[0]); |
503 | } /* ecore_x_icccm_title_set */ | 503 | } |
504 | 504 | ||
505 | EAPI char * | 505 | EAPI char * |
506 | ecore_x_icccm_title_get(Ecore_X_Window win) | 506 | ecore_x_icccm_title_get(Ecore_X_Window win) |
@@ -522,23 +522,23 @@ ecore_x_icccm_title_get(Ecore_X_Window win) | |||
522 | t = strdup((char *)xprop.value); | 522 | t = strdup((char *)xprop.value); |
523 | else | 523 | else |
524 | { | 524 | { |
525 | /* convert to utf8 */ | 525 | /* convert to utf8 */ |
526 | #ifdef X_HAVE_UTF8_STRING | 526 | #ifdef X_HAVE_UTF8_STRING |
527 | ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, | 527 | ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, |
528 | &list, &num); | 528 | &list, &num); |
529 | #else /* ifdef X_HAVE_UTF8_STRING */ | 529 | #else /* ifdef X_HAVE_UTF8_STRING */ |
530 | ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, | 530 | ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, |
531 | &list, &num); | 531 | &list, &num); |
532 | #endif /* ifdef X_HAVE_UTF8_STRING */ | 532 | #endif /* ifdef X_HAVE_UTF8_STRING */ |
533 | 533 | ||
534 | if ((ret == XLocaleNotSupported) || | 534 | if ((ret == XLocaleNotSupported) || |
535 | (ret == XNoMemory) || (ret == XConverterNotFound)) | 535 | (ret == XNoMemory) || (ret == XConverterNotFound)) |
536 | t = strdup((char *)xprop.value); | 536 | t = strdup((char *)xprop.value); |
537 | else if ((ret >= Success) && (num > 0)) | 537 | else if ((ret >= Success) && (num > 0)) |
538 | t = strdup(list[0]); | 538 | t = strdup(list[0]); |
539 | 539 | ||
540 | if (list) | 540 | if (list) |
541 | XFreeStringList(list); | 541 | XFreeStringList(list); |
542 | } | 542 | } |
543 | 543 | ||
544 | if (xprop.value) | 544 | if (xprop.value) |
@@ -549,7 +549,7 @@ ecore_x_icccm_title_get(Ecore_X_Window win) | |||
549 | } | 549 | } |
550 | 550 | ||
551 | return NULL; | 551 | return NULL; |
552 | } /* ecore_x_icccm_title_get */ | 552 | } |
553 | 553 | ||
554 | /** | 554 | /** |
555 | * Set protocol atoms explicitly | 555 | * Set protocol atoms explicitly |
@@ -559,15 +559,15 @@ ecore_x_icccm_title_get(Ecore_X_Window win) | |||
559 | */ | 559 | */ |
560 | EAPI void | 560 | EAPI void |
561 | ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, | 561 | ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, |
562 | Ecore_X_Atom *protos, | 562 | Ecore_X_Atom *protos, |
563 | int num) | 563 | int num) |
564 | { | 564 | { |
565 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 565 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
566 | if (num > 0) | 566 | if (num > 0) |
567 | XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num); | 567 | XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num); |
568 | else | 568 | else |
569 | XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS); | 569 | XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS); |
570 | } /* ecore_x_icccm_protocol_atoms_set */ | 570 | } |
571 | 571 | ||
572 | /** | 572 | /** |
573 | * Set or unset a wm protocol property. | 573 | * Set or unset a wm protocol property. |
@@ -576,9 +576,9 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, | |||
576 | * @param on On/Off | 576 | * @param on On/Off |
577 | */ | 577 | */ |
578 | EAPI void | 578 | EAPI void |
579 | ecore_x_icccm_protocol_set(Ecore_X_Window win, | 579 | ecore_x_icccm_protocol_set(Ecore_X_Window win, |
580 | Ecore_X_WM_Protocol protocol, | 580 | Ecore_X_WM_Protocol protocol, |
581 | Eina_Bool on) | 581 | Eina_Bool on) |
582 | { | 582 | { |
583 | Atom *protos = NULL; | 583 | Atom *protos = NULL; |
584 | Atom proto; | 584 | Atom proto; |
@@ -653,7 +653,7 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win, | |||
653 | leave: | 653 | leave: |
654 | if (protos) | 654 | if (protos) |
655 | XFree(protos); | 655 | XFree(protos); |
656 | } /* ecore_x_icccm_protocol_set */ | 656 | } |
657 | 657 | ||
658 | /** | 658 | /** |
659 | * Determines whether a protocol is set for a window. | 659 | * Determines whether a protocol is set for a window. |
@@ -662,7 +662,7 @@ leave: | |||
662 | * @return 1 if the protocol is set, else 0. | 662 | * @return 1 if the protocol is set, else 0. |
663 | */ | 663 | */ |
664 | EAPI Eina_Bool | 664 | EAPI Eina_Bool |
665 | ecore_x_icccm_protocol_isset(Ecore_X_Window win, | 665 | ecore_x_icccm_protocol_isset(Ecore_X_Window win, |
666 | Ecore_X_WM_Protocol protocol) | 666 | Ecore_X_WM_Protocol protocol) |
667 | { | 667 | { |
668 | Atom proto, *protos = NULL; | 668 | Atom proto, *protos = NULL; |
@@ -690,7 +690,7 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, | |||
690 | XFree(protos); | 690 | XFree(protos); |
691 | 691 | ||
692 | return ret; | 692 | return ret; |
693 | } /* ecore_x_icccm_protocol_isset */ | 693 | } |
694 | 694 | ||
695 | /** | 695 | /** |
696 | * Set a window name & class. | 696 | * Set a window name & class. |
@@ -702,8 +702,8 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, | |||
702 | */ | 702 | */ |
703 | EAPI void | 703 | EAPI void |
704 | ecore_x_icccm_name_class_set(Ecore_X_Window win, | 704 | ecore_x_icccm_name_class_set(Ecore_X_Window win, |
705 | const char *n, | 705 | const char *n, |
706 | const char *c) | 706 | const char *c) |
707 | { | 707 | { |
708 | XClassHint *xch; | 708 | XClassHint *xch; |
709 | 709 | ||
@@ -716,7 +716,7 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, | |||
716 | xch->res_class = (char *)c; | 716 | xch->res_class = (char *)c; |
717 | XSetClassHint(_ecore_x_disp, win, xch); | 717 | XSetClassHint(_ecore_x_disp, win, xch); |
718 | XFree(xch); | 718 | XFree(xch); |
719 | } /* ecore_x_icccm_name_class_set */ | 719 | } |
720 | 720 | ||
721 | /** | 721 | /** |
722 | * Get a window name & class. | 722 | * Get a window name & class. |
@@ -728,8 +728,8 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, | |||
728 | */ | 728 | */ |
729 | EAPI void | 729 | EAPI void |
730 | ecore_x_icccm_name_class_get(Ecore_X_Window win, | 730 | ecore_x_icccm_name_class_get(Ecore_X_Window win, |
731 | char **n, | 731 | char **n, |
732 | char **c) | 732 | char **c) |
733 | { | 733 | { |
734 | XClassHint xch; | 734 | XClassHint xch; |
735 | 735 | ||
@@ -755,7 +755,7 @@ ecore_x_icccm_name_class_get(Ecore_X_Window win, | |||
755 | XFree(xch.res_name); | 755 | XFree(xch.res_name); |
756 | XFree(xch.res_class); | 756 | XFree(xch.res_class); |
757 | } | 757 | } |
758 | } /* ecore_x_icccm_name_class_get */ | 758 | } |
759 | 759 | ||
760 | /** | 760 | /** |
761 | * Get a window client machine string. | 761 | * Get a window client machine string. |
@@ -772,7 +772,7 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win) | |||
772 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 772 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
773 | name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_CLIENT_MACHINE); | 773 | name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_CLIENT_MACHINE); |
774 | return name; | 774 | return name; |
775 | } /* ecore_x_icccm_client_machine_get */ | 775 | } |
776 | 776 | ||
777 | /** | 777 | /** |
778 | * Sets the WM_COMMAND property for @a win. | 778 | * Sets the WM_COMMAND property for @a win. |
@@ -783,12 +783,12 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win) | |||
783 | */ | 783 | */ |
784 | EAPI void | 784 | EAPI void |
785 | ecore_x_icccm_command_set(Ecore_X_Window win, | 785 | ecore_x_icccm_command_set(Ecore_X_Window win, |
786 | int argc, | 786 | int argc, |
787 | char **argv) | 787 | char **argv) |
788 | { | 788 | { |
789 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 789 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
790 | XSetCommand(_ecore_x_disp, win, argv, argc); | 790 | XSetCommand(_ecore_x_disp, win, argv, argc); |
791 | } /* ecore_x_icccm_command_set */ | 791 | } |
792 | 792 | ||
793 | /** | 793 | /** |
794 | * Get the WM_COMMAND property for @a win. | 794 | * Get the WM_COMMAND property for @a win. |
@@ -801,8 +801,8 @@ ecore_x_icccm_command_set(Ecore_X_Window win, | |||
801 | */ | 801 | */ |
802 | EAPI void | 802 | EAPI void |
803 | ecore_x_icccm_command_get(Ecore_X_Window win, | 803 | ecore_x_icccm_command_get(Ecore_X_Window win, |
804 | int *argc, | 804 | int *argc, |
805 | char ***argv) | 805 | char ***argv) |
806 | { | 806 | { |
807 | int i, c; | 807 | int i, c; |
808 | char **v; | 808 | char **v; |
@@ -850,7 +850,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, | |||
850 | } | 850 | } |
851 | 851 | ||
852 | XFreeStringList(v); | 852 | XFreeStringList(v); |
853 | } /* ecore_x_icccm_command_get */ | 853 | } |
854 | 854 | ||
855 | /** | 855 | /** |
856 | * Set a window icon name. | 856 | * Set a window icon name. |
@@ -861,7 +861,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, | |||
861 | */ | 861 | */ |
862 | EAPI void | 862 | EAPI void |
863 | ecore_x_icccm_icon_name_set(Ecore_X_Window win, | 863 | ecore_x_icccm_icon_name_set(Ecore_X_Window win, |
864 | const char *t) | 864 | const char *t) |
865 | { | 865 | { |
866 | char *list[1]; | 866 | char *list[1]; |
867 | XTextProperty xprop; | 867 | XTextProperty xprop; |
@@ -892,7 +892,7 @@ ecore_x_icccm_icon_name_set(Ecore_X_Window win, | |||
892 | } | 892 | } |
893 | 893 | ||
894 | free(list[0]); | 894 | free(list[0]); |
895 | } /* ecore_x_icccm_icon_name_set */ | 895 | } |
896 | 896 | ||
897 | /** | 897 | /** |
898 | * Get a window icon name. | 898 | * Get a window icon name. |
@@ -921,26 +921,26 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win) | |||
921 | t = strdup((char *)xprop.value); | 921 | t = strdup((char *)xprop.value); |
922 | else | 922 | else |
923 | { | 923 | { |
924 | /* convert to utf8 */ | 924 | /* convert to utf8 */ |
925 | #ifdef X_HAVE_UTF8_STRING | 925 | #ifdef X_HAVE_UTF8_STRING |
926 | ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, | 926 | ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop, |
927 | &list, &num); | 927 | &list, &num); |
928 | #else /* ifdef X_HAVE_UTF8_STRING */ | 928 | #else /* ifdef X_HAVE_UTF8_STRING */ |
929 | ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, | 929 | ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop, |
930 | &list, &num); | 930 | &list, &num); |
931 | #endif /* ifdef X_HAVE_UTF8_STRING */ | 931 | #endif /* ifdef X_HAVE_UTF8_STRING */ |
932 | 932 | ||
933 | if ((ret == XLocaleNotSupported) || | 933 | if ((ret == XLocaleNotSupported) || |
934 | (ret == XNoMemory) || (ret == XConverterNotFound)) | 934 | (ret == XNoMemory) || (ret == XConverterNotFound)) |
935 | t = strdup((char *)xprop.value); | 935 | t = strdup((char *)xprop.value); |
936 | else if (ret >= Success) | 936 | else if (ret >= Success) |
937 | { | 937 | { |
938 | if ((num >= 1) && (list)) | 938 | if ((num >= 1) && (list)) |
939 | t = strdup(list[0]); | 939 | t = strdup(list[0]); |
940 | 940 | ||
941 | if (list) | 941 | if (list) |
942 | XFreeStringList(list); | 942 | XFreeStringList(list); |
943 | } | 943 | } |
944 | } | 944 | } |
945 | 945 | ||
946 | if (xprop.value) | 946 | if (xprop.value) |
@@ -951,7 +951,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win) | |||
951 | } | 951 | } |
952 | 952 | ||
953 | return NULL; | 953 | return NULL; |
954 | } /* ecore_x_icccm_icon_name_get */ | 954 | } |
955 | 955 | ||
956 | /** | 956 | /** |
957 | * Add a subwindow to the list of windows that need a different colormap installed. | 957 | * Add a subwindow to the list of windows that need a different colormap installed. |
@@ -1014,7 +1014,7 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, | |||
1014 | ECORE_X_ATOM_WM_COLORMAP_WINDOWS, | 1014 | ECORE_X_ATOM_WM_COLORMAP_WINDOWS, |
1015 | XA_WINDOW, 32, data, num); | 1015 | XA_WINDOW, 32, data, num); |
1016 | free(newset); | 1016 | free(newset); |
1017 | } /* ecore_x_icccm_colormap_window_set */ | 1017 | } |
1018 | 1018 | ||
1019 | /** | 1019 | /** |
1020 | * Remove a window from the list of colormap windows. | 1020 | * Remove a window from the list of colormap windows. |
@@ -1079,7 +1079,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, | |||
1079 | 1079 | ||
1080 | if (old_data) | 1080 | if (old_data) |
1081 | XFree(old_data); | 1081 | XFree(old_data); |
1082 | } /* ecore_x_icccm_colormap_window_unset */ | 1082 | } |
1083 | 1083 | ||
1084 | /** | 1084 | /** |
1085 | * Specify that a window is transient for another top-level window and should be handled accordingly. | 1085 | * Specify that a window is transient for another top-level window and should be handled accordingly. |
@@ -1092,18 +1092,18 @@ ecore_x_icccm_transient_for_set(Ecore_X_Window win, | |||
1092 | { | 1092 | { |
1093 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1093 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1094 | XSetTransientForHint(_ecore_x_disp, win, forwin); | 1094 | XSetTransientForHint(_ecore_x_disp, win, forwin); |
1095 | } /* ecore_x_icccm_transient_for_set */ | 1095 | } |
1096 | 1096 | ||
1097 | /** | 1097 | /** |
1098 | * Remove the transient_for setting from a window. | 1098 | * Remove the transient_for setting from a window. |
1099 | * @param The window | 1099 | * @param win The window |
1100 | */ | 1100 | */ |
1101 | EAPI void | 1101 | EAPI void |
1102 | ecore_x_icccm_transient_for_unset(Ecore_X_Window win) | 1102 | ecore_x_icccm_transient_for_unset(Ecore_X_Window win) |
1103 | { | 1103 | { |
1104 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1104 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1105 | XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_TRANSIENT_FOR); | 1105 | XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_TRANSIENT_FOR); |
1106 | } /* ecore_x_icccm_transient_for_unset */ | 1106 | } |
1107 | 1107 | ||
1108 | /** | 1108 | /** |
1109 | * Get the window this window is transient for, if any. | 1109 | * Get the window this window is transient for, if any. |
@@ -1120,7 +1120,7 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win) | |||
1120 | return (Ecore_X_Window)forwin; | 1120 | return (Ecore_X_Window)forwin; |
1121 | else | 1121 | else |
1122 | return 0; | 1122 | return 0; |
1123 | } /* ecore_x_icccm_transient_for_get */ | 1123 | } |
1124 | 1124 | ||
1125 | /** | 1125 | /** |
1126 | * Set the window role hint. | 1126 | * Set the window role hint. |
@@ -1129,12 +1129,12 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win) | |||
1129 | */ | 1129 | */ |
1130 | EAPI void | 1130 | EAPI void |
1131 | ecore_x_icccm_window_role_set(Ecore_X_Window win, | 1131 | ecore_x_icccm_window_role_set(Ecore_X_Window win, |
1132 | const char *role) | 1132 | const char *role) |
1133 | { | 1133 | { |
1134 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1134 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1135 | ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE, | 1135 | ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE, |
1136 | (char *)role); | 1136 | (char *)role); |
1137 | } /* ecore_x_icccm_window_role_set */ | 1137 | } |
1138 | 1138 | ||
1139 | /** | 1139 | /** |
1140 | * Get the window role. | 1140 | * Get the window role. |
@@ -1146,7 +1146,7 @@ ecore_x_icccm_window_role_get(Ecore_X_Window win) | |||
1146 | { | 1146 | { |
1147 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1147 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1148 | return ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_WINDOW_ROLE); | 1148 | return ecore_x_window_prop_string_get(win, ECORE_X_ATOM_WM_WINDOW_ROLE); |
1149 | } /* ecore_x_icccm_window_role_get */ | 1149 | } |
1150 | 1150 | ||
1151 | /** | 1151 | /** |
1152 | * Set the window's client leader. | 1152 | * Set the window's client leader. |
@@ -1163,7 +1163,7 @@ ecore_x_icccm_client_leader_set(Ecore_X_Window win, | |||
1163 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1163 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1164 | ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER, | 1164 | ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER, |
1165 | &l, 1); | 1165 | &l, 1); |
1166 | } /* ecore_x_icccm_client_leader_set */ | 1166 | } |
1167 | 1167 | ||
1168 | /** | 1168 | /** |
1169 | * Get the window's client leader. | 1169 | * Get the window's client leader. |
@@ -1180,7 +1180,7 @@ ecore_x_icccm_client_leader_get(Ecore_X_Window win) | |||
1180 | return l; | 1180 | return l; |
1181 | 1181 | ||
1182 | return 0; | 1182 | return 0; |
1183 | } /* ecore_x_icccm_client_leader_get */ | 1183 | } |
1184 | 1184 | ||
1185 | EAPI void | 1185 | EAPI void |
1186 | ecore_x_icccm_iconic_request_send(Ecore_X_Window win, | 1186 | ecore_x_icccm_iconic_request_send(Ecore_X_Window win, |
@@ -1206,7 +1206,7 @@ ecore_x_icccm_iconic_request_send(Ecore_X_Window win, | |||
1206 | 1206 | ||
1207 | XSendEvent(_ecore_x_disp, root, False, | 1207 | XSendEvent(_ecore_x_disp, root, False, |
1208 | SubstructureNotifyMask | SubstructureRedirectMask, &xev); | 1208 | SubstructureNotifyMask | SubstructureRedirectMask, &xev); |
1209 | } /* ecore_x_icccm_iconic_request_send */ | 1209 | } |
1210 | 1210 | ||
1211 | /* FIXME: there are older E hints, gnome hints and mwm hints and new netwm */ | 1211 | /* FIXME: there are older E hints, gnome hints and mwm hints and new netwm */ |
1212 | /* hints. each should go in their own file/section so we know which */ | 1212 | /* hints. each should go in their own file/section so we know which */ |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c index 2de5319..b8e720c 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_image.c | |||
@@ -1,26 +1,28 @@ | |||
1 | #ifdef HAVE_CONFIG_H | 1 | #ifdef HAVE_CONFIG_H |
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif /* ifdef HAVE_CONFIG_H */ | 3 | #endif |
4 | |||
5 | #include <stdlib.h> | ||
6 | #include <string.h> | ||
7 | #include <sys/ipc.h> | ||
8 | #include <sys/shm.h> | ||
4 | 9 | ||
5 | #include "ecore_x_private.h" | 10 | #include "ecore_x_private.h" |
6 | #include "Ecore_X.h" | 11 | #include "Ecore_X.h" |
7 | 12 | ||
8 | #include <X11/extensions/XShm.h> | 13 | #include <X11/extensions/XShm.h> |
9 | #include <X11/Xutil.h> | 14 | #include <X11/Xutil.h> |
10 | #include <sys/ipc.h> | ||
11 | #include <sys/shm.h> | ||
12 | #include <string.h> | ||
13 | 15 | ||
14 | static int _ecore_x_image_shm_can = -1; | 16 | static int _ecore_x_image_shm_can = -1; |
15 | static int _ecore_x_image_err = 0; | 17 | static int _ecore_x_image_err = 0; |
16 | 18 | ||
17 | static int | 19 | static int |
18 | _ecore_x_image_error_handler(Display *d __UNUSED__, | 20 | _ecore_x_image_error_handler(Display *d __UNUSED__, |
19 | XErrorEvent *ev __UNUSED__) | 21 | XErrorEvent *ev __UNUSED__) |
20 | { | 22 | { |
21 | _ecore_x_image_err = 1; | 23 | _ecore_x_image_err = 1; |
22 | return 0; | 24 | return 0; |
23 | } /* _ecore_x_image_error_handler */ | 25 | } |
24 | 26 | ||
25 | static void | 27 | static void |
26 | _ecore_x_image_shm_check(void) | 28 | _ecore_x_image_shm_check(void) |
@@ -90,7 +92,7 @@ _ecore_x_image_shm_check(void) | |||
90 | shmctl(shminfo.shmid, IPC_RMID, 0); | 92 | shmctl(shminfo.shmid, IPC_RMID, 0); |
91 | 93 | ||
92 | _ecore_x_image_shm_can = 1; | 94 | _ecore_x_image_shm_can = 1; |
93 | } /* _ecore_x_image_shm_check */ | 95 | } |
94 | 96 | ||
95 | struct _Ecore_X_Image | 97 | struct _Ecore_X_Image |
96 | { | 98 | { |
@@ -105,10 +107,10 @@ struct _Ecore_X_Image | |||
105 | }; | 107 | }; |
106 | 108 | ||
107 | EAPI Ecore_X_Image * | 109 | EAPI Ecore_X_Image * |
108 | ecore_x_image_new(int w, | 110 | ecore_x_image_new(int w, |
109 | int h, | 111 | int h, |
110 | Ecore_X_Visual vis, | 112 | Ecore_X_Visual vis, |
111 | int depth) | 113 | int depth) |
112 | { | 114 | { |
113 | Ecore_X_Image *im; | 115 | Ecore_X_Image *im; |
114 | 116 | ||
@@ -124,7 +126,7 @@ ecore_x_image_new(int w, | |||
124 | _ecore_x_image_shm_check(); | 126 | _ecore_x_image_shm_check(); |
125 | im->shm = _ecore_x_image_shm_can; | 127 | im->shm = _ecore_x_image_shm_can; |
126 | return im; | 128 | return im; |
127 | } /* ecore_x_image_new */ | 129 | } |
128 | 130 | ||
129 | EAPI void | 131 | EAPI void |
130 | ecore_x_image_free(Ecore_X_Image *im) | 132 | ecore_x_image_free(Ecore_X_Image *im) |
@@ -148,7 +150,7 @@ ecore_x_image_free(Ecore_X_Image *im) | |||
148 | } | 150 | } |
149 | 151 | ||
150 | free(im); | 152 | free(im); |
151 | } /* ecore_x_image_free */ | 153 | } |
152 | 154 | ||
153 | static void | 155 | static void |
154 | _ecore_x_image_shm_create(Ecore_X_Image *im) | 156 | _ecore_x_image_shm_create(Ecore_X_Image *im) |
@@ -192,17 +194,17 @@ _ecore_x_image_shm_create(Ecore_X_Image *im) | |||
192 | im->bpp = 2; | 194 | im->bpp = 2; |
193 | else | 195 | else |
194 | im->bpp = 4; | 196 | im->bpp = 4; |
195 | } /* _ecore_x_image_shm_create */ | 197 | } |
196 | 198 | ||
197 | EAPI Eina_Bool | 199 | EAPI Eina_Bool |
198 | ecore_x_image_get(Ecore_X_Image *im, | 200 | ecore_x_image_get(Ecore_X_Image *im, |
199 | Ecore_X_Drawable draw, | 201 | Ecore_X_Drawable draw, |
200 | int x, | 202 | int x, |
201 | int y, | 203 | int y, |
202 | int sx, | 204 | int sx, |
203 | int sy, | 205 | int sy, |
204 | int w, | 206 | int w, |
205 | int h) | 207 | int h) |
206 | { | 208 | { |
207 | Eina_Bool ret = EINA_TRUE; | 209 | Eina_Bool ret = EINA_TRUE; |
208 | XErrorHandler ph; | 210 | XErrorHandler ph; |
@@ -278,18 +280,18 @@ ecore_x_image_get(Ecore_X_Image *im, | |||
278 | } | 280 | } |
279 | 281 | ||
280 | return ret; | 282 | return ret; |
281 | } /* ecore_x_image_get */ | 283 | } |
282 | 284 | ||
283 | EAPI void | 285 | EAPI void |
284 | ecore_x_image_put(Ecore_X_Image *im, | 286 | ecore_x_image_put(Ecore_X_Image *im, |
285 | Ecore_X_Drawable draw, | 287 | Ecore_X_Drawable draw, |
286 | Ecore_X_GC gc, | 288 | Ecore_X_GC gc, |
287 | int x, | 289 | int x, |
288 | int y, | 290 | int y, |
289 | int sx, | 291 | int sx, |
290 | int sy, | 292 | int sy, |
291 | int w, | 293 | int w, |
292 | int h) | 294 | int h) |
293 | { | 295 | { |
294 | Ecore_X_GC tgc = 0; | 296 | Ecore_X_GC tgc = 0; |
295 | 297 | ||
@@ -306,13 +308,13 @@ ecore_x_image_put(Ecore_X_Image *im, | |||
306 | if (im->xim) | 308 | if (im->xim) |
307 | XShmPutImage(_ecore_x_disp, draw, gc, im->xim, sx, sy, x, y, w, h, False); | 309 | XShmPutImage(_ecore_x_disp, draw, gc, im->xim, sx, sy, x, y, w, h, False); |
308 | if (tgc) ecore_x_gc_free(tgc); | 310 | if (tgc) ecore_x_gc_free(tgc); |
309 | } /* ecore_x_image_put */ | 311 | } |
310 | 312 | ||
311 | EAPI void * | 313 | EAPI void * |
312 | ecore_x_image_data_get(Ecore_X_Image *im, | 314 | ecore_x_image_data_get(Ecore_X_Image *im, |
313 | int *bpl, | 315 | int *bpl, |
314 | int *rows, | 316 | int *rows, |
315 | int *bpp) | 317 | int *bpp) |
316 | { | 318 | { |
317 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 319 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
318 | if (!im->xim) _ecore_x_image_shm_create(im); | 320 | if (!im->xim) _ecore_x_image_shm_create(im); |
@@ -321,7 +323,7 @@ ecore_x_image_data_get(Ecore_X_Image *im, | |||
321 | if (rows) *rows = im->rows; | 323 | if (rows) *rows = im->rows; |
322 | if (bpp) *bpp = im->bpp; | 324 | if (bpp) *bpp = im->bpp; |
323 | return im->data; | 325 | return im->data; |
324 | } /* ecore_x_image_data_get */ | 326 | } |
325 | 327 | ||
326 | EAPI Eina_Bool | 328 | EAPI Eina_Bool |
327 | ecore_x_image_is_argb32_get(Ecore_X_Image *im) | 329 | ecore_x_image_is_argb32_get(Ecore_X_Image *im) |
@@ -345,19 +347,19 @@ ecore_x_image_is_argb32_get(Ecore_X_Image *im) | |||
345 | } | 347 | } |
346 | 348 | ||
347 | EAPI Eina_Bool | 349 | EAPI Eina_Bool |
348 | ecore_x_image_to_argb_convert(void *src, | 350 | ecore_x_image_to_argb_convert(void *src, |
349 | int sbpp, | 351 | int sbpp, |
350 | int sbpl, | 352 | int sbpl, |
351 | Ecore_X_Colormap c, | 353 | Ecore_X_Colormap c, |
352 | Ecore_X_Visual v, | 354 | Ecore_X_Visual v, |
353 | int x, | 355 | int x, |
354 | int y, | 356 | int y, |
355 | int w, | 357 | int w, |
356 | int h, | 358 | int h, |
357 | unsigned int *dst, | 359 | unsigned int *dst, |
358 | int dbpl, | 360 | int dbpl, |
359 | int dx, | 361 | int dx, |
360 | int dy) | 362 | int dy) |
361 | { | 363 | { |
362 | Visual *vis = v; | 364 | Visual *vis = v; |
363 | XColor *cols = NULL; | 365 | XColor *cols = NULL; |
@@ -411,9 +413,9 @@ ecore_x_image_to_argb_convert(void *src, | |||
411 | else if ((vis->class == TrueColor) || | 413 | else if ((vis->class == TrueColor) || |
412 | (vis->class == DirectColor)) | 414 | (vis->class == DirectColor)) |
413 | { | 415 | { |
414 | if ((vis->red_mask == 0x00ff0000) && | 416 | if ((vis->red_mask == 0x00ff0000) && |
415 | (vis->green_mask == 0x0000ff00) && | 417 | (vis->green_mask == 0x0000ff00) && |
416 | (vis->blue_mask == 0x000000ff)) | 418 | (vis->blue_mask == 0x000000ff)) |
417 | mode = argbx888; | 419 | mode = argbx888; |
418 | else if ((vis->red_mask == 0x000000ff) && | 420 | else if ((vis->red_mask == 0x000000ff) && |
419 | (vis->green_mask == 0x0000ff00) && | 421 | (vis->green_mask == 0x0000ff00) && |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c index 7459a8b..7812cc2 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_mwm.c | |||
@@ -32,8 +32,8 @@ typedef struct _mwmhints | |||
32 | MWMHints; | 32 | MWMHints; |
33 | 33 | ||
34 | EAPI Eina_Bool | 34 | EAPI Eina_Bool |
35 | ecore_x_mwm_hints_get(Ecore_X_Window win, | 35 | ecore_x_mwm_hints_get(Ecore_X_Window win, |
36 | Ecore_X_MWM_Hint_Func *fhint, | 36 | Ecore_X_MWM_Hint_Func *fhint, |
37 | Ecore_X_MWM_Hint_Decor *dhint, | 37 | Ecore_X_MWM_Hint_Decor *dhint, |
38 | Ecore_X_MWM_Hint_Input *ihint) | 38 | Ecore_X_MWM_Hint_Input *ihint) |
39 | { | 39 | { |
@@ -86,11 +86,11 @@ ecore_x_mwm_hints_get(Ecore_X_Window win, | |||
86 | } | 86 | } |
87 | 87 | ||
88 | return ret; | 88 | return ret; |
89 | } /* ecore_x_mwm_hints_get */ | 89 | } |
90 | 90 | ||
91 | EAPI void | 91 | EAPI void |
92 | ecore_x_mwm_borderless_set(Ecore_X_Window win, | 92 | ecore_x_mwm_borderless_set(Ecore_X_Window win, |
93 | Eina_Bool borderless) | 93 | Eina_Bool borderless) |
94 | { | 94 | { |
95 | unsigned int data[5] = {0, 0, 0, 0, 0}; | 95 | unsigned int data[5] = {0, 0, 0, 0, 0}; |
96 | 96 | ||
@@ -102,5 +102,5 @@ ecore_x_mwm_borderless_set(Ecore_X_Window win, | |||
102 | ECORE_X_ATOM_MOTIF_WM_HINTS, | 102 | ECORE_X_ATOM_MOTIF_WM_HINTS, |
103 | ECORE_X_ATOM_MOTIF_WM_HINTS, | 103 | ECORE_X_ATOM_MOTIF_WM_HINTS, |
104 | 32, (void *)data, 5); | 104 | 32, (void *)data, 5); |
105 | } /* ecore_x_mwm_borderless_set */ | 105 | } |
106 | 106 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c index 1a6fc9a..9fc428a 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c | |||
@@ -4,8 +4,9 @@ | |||
4 | 4 | ||
5 | #ifdef HAVE_CONFIG_H | 5 | #ifdef HAVE_CONFIG_H |
6 | # include <config.h> | 6 | # include <config.h> |
7 | #endif /* ifdef HAVE_CONFIG_H */ | 7 | #endif |
8 | 8 | ||
9 | #include <stdlib.h> | ||
9 | #include <stdio.h> | 10 | #include <stdio.h> |
10 | #include <string.h> | 11 | #include <string.h> |
11 | 12 | ||
@@ -39,17 +40,17 @@ struct _Ecore_X_Startup_Info | |||
39 | int silent; | 40 | int silent; |
40 | }; | 41 | }; |
41 | 42 | ||
42 | static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, | 43 | static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, |
43 | Ecore_X_Atom atom, | 44 | Ecore_X_Atom atom, |
44 | const char *str); | 45 | const char *str); |
45 | static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, | 46 | static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, |
46 | Ecore_X_Atom atom); | 47 | Ecore_X_Atom atom); |
47 | #if 0 /* Unused */ | 48 | #if 0 /* Unused */ |
48 | static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info); | 49 | static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info); |
49 | static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, | 50 | static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, |
50 | char *data); | 51 | char *data); |
51 | #endif /* if 0 */ | 52 | #endif /* if 0 */ |
52 | static void _ecore_x_netwm_startup_info_free(void *data); | 53 | static void _ecore_x_netwm_startup_info_free(void *data); |
53 | 54 | ||
54 | /* | 55 | /* |
55 | * Convenience macros | 56 | * Convenience macros |
@@ -76,7 +77,7 @@ ecore_x_netwm_init(void) | |||
76 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 77 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
77 | startup_info = eina_hash_string_superfast_new( | 78 | startup_info = eina_hash_string_superfast_new( |
78 | _ecore_x_netwm_startup_info_free); | 79 | _ecore_x_netwm_startup_info_free); |
79 | } /* ecore_x_netwm_init */ | 80 | } |
80 | 81 | ||
81 | EAPI void | 82 | EAPI void |
82 | ecore_x_netwm_shutdown(void) | 83 | ecore_x_netwm_shutdown(void) |
@@ -86,7 +87,7 @@ ecore_x_netwm_shutdown(void) | |||
86 | eina_hash_free(startup_info); | 87 | eina_hash_free(startup_info); |
87 | 88 | ||
88 | startup_info = NULL; | 89 | startup_info = NULL; |
89 | } /* ecore_x_netwm_shutdown */ | 90 | } |
90 | 91 | ||
91 | /* | 92 | /* |
92 | * WM identification | 93 | * WM identification |
@@ -94,7 +95,7 @@ ecore_x_netwm_shutdown(void) | |||
94 | EAPI void | 95 | EAPI void |
95 | ecore_x_netwm_wm_identify(Ecore_X_Window root, | 96 | ecore_x_netwm_wm_identify(Ecore_X_Window root, |
96 | Ecore_X_Window check, | 97 | Ecore_X_Window check, |
97 | const char *wm_name) | 98 | const char *wm_name) |
98 | { | 99 | { |
99 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 100 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
100 | ecore_x_window_prop_window_set(root, | 101 | ecore_x_window_prop_window_set(root, |
@@ -112,27 +113,27 @@ ecore_x_netwm_wm_identify(Ecore_X_Window root, | |||
112 | _ecore_x_window_prop_string_utf8_set(root, | 113 | _ecore_x_window_prop_string_utf8_set(root, |
113 | ECORE_X_ATOM_NET_WM_NAME, | 114 | ECORE_X_ATOM_NET_WM_NAME, |
114 | wm_name); | 115 | wm_name); |
115 | } /* ecore_x_netwm_wm_identify */ | 116 | } |
116 | 117 | ||
117 | /* | 118 | /* |
118 | * Set supported atoms | 119 | * Set supported atoms |
119 | */ | 120 | */ |
120 | EAPI void | 121 | EAPI void |
121 | ecore_x_netwm_supported_set(Ecore_X_Window root, | 122 | ecore_x_netwm_supported_set(Ecore_X_Window root, |
122 | Ecore_X_Atom *supported, | 123 | Ecore_X_Atom *supported, |
123 | int num) | 124 | int num) |
124 | { | 125 | { |
125 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 126 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
126 | ecore_x_window_prop_atom_set(root, | 127 | ecore_x_window_prop_atom_set(root, |
127 | ECORE_X_ATOM_NET_SUPPORTED, | 128 | ECORE_X_ATOM_NET_SUPPORTED, |
128 | supported, | 129 | supported, |
129 | num); | 130 | num); |
130 | } /* ecore_x_netwm_supported_set */ | 131 | } |
131 | 132 | ||
132 | EAPI Eina_Bool | 133 | EAPI Eina_Bool |
133 | ecore_x_netwm_supported_get(Ecore_X_Window root, | 134 | ecore_x_netwm_supported_get(Ecore_X_Window root, |
134 | Ecore_X_Atom **supported, | 135 | Ecore_X_Atom **supported, |
135 | int *num) | 136 | int *num) |
136 | { | 137 | { |
137 | int num_ret; | 138 | int num_ret; |
138 | 139 | ||
@@ -152,36 +153,36 @@ ecore_x_netwm_supported_get(Ecore_X_Window root, | |||
152 | *num = num_ret; | 153 | *num = num_ret; |
153 | 154 | ||
154 | return EINA_TRUE; | 155 | return EINA_TRUE; |
155 | } /* ecore_x_netwm_supported_get */ | 156 | } |
156 | 157 | ||
157 | /* | 158 | /* |
158 | * Desktop configuration and status | 159 | * Desktop configuration and status |
159 | */ | 160 | */ |
160 | EAPI void | 161 | EAPI void |
161 | ecore_x_netwm_desk_count_set(Ecore_X_Window root, | 162 | ecore_x_netwm_desk_count_set(Ecore_X_Window root, |
162 | unsigned int n_desks) | 163 | unsigned int n_desks) |
163 | { | 164 | { |
164 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 165 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
165 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS, | 166 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS, |
166 | &n_desks, 1); | 167 | &n_desks, 1); |
167 | } /* ecore_x_netwm_desk_count_set */ | 168 | } |
168 | 169 | ||
169 | EAPI void | 170 | EAPI void |
170 | ecore_x_netwm_desk_roots_set(Ecore_X_Window root, | 171 | ecore_x_netwm_desk_roots_set(Ecore_X_Window root, |
171 | Ecore_X_Window *vroots, | 172 | Ecore_X_Window *vroots, |
172 | unsigned int n_desks) | 173 | unsigned int n_desks) |
173 | { | 174 | { |
174 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 175 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
175 | ecore_x_window_prop_window_set(root, | 176 | ecore_x_window_prop_window_set(root, |
176 | ECORE_X_ATOM_NET_VIRTUAL_ROOTS, | 177 | ECORE_X_ATOM_NET_VIRTUAL_ROOTS, |
177 | vroots, | 178 | vroots, |
178 | n_desks); | 179 | n_desks); |
179 | } /* ecore_x_netwm_desk_roots_set */ | 180 | } |
180 | 181 | ||
181 | EAPI void | 182 | EAPI void |
182 | ecore_x_netwm_desk_names_set(Ecore_X_Window root, | 183 | ecore_x_netwm_desk_names_set(Ecore_X_Window root, |
183 | const char **names, | 184 | const char **names, |
184 | unsigned int n_desks) | 185 | unsigned int n_desks) |
185 | { | 186 | { |
186 | char ss[32], *buf, *t; | 187 | char ss[32], *buf, *t; |
187 | const char *s; | 188 | const char *s; |
@@ -198,8 +199,8 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root, | |||
198 | if (!s) | 199 | if (!s) |
199 | { | 200 | { |
200 | /* Default to "Desk-<number>" */ | 201 | /* Default to "Desk-<number>" */ |
201 | sprintf(ss, "Desk-%d", i); | 202 | sprintf(ss, "Desk-%d", i); |
202 | s = ss; | 203 | s = ss; |
203 | } | 204 | } |
204 | 205 | ||
205 | l = strlen(s) + 1; | 206 | l = strlen(s) + 1; |
@@ -215,12 +216,12 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root, | |||
215 | _ATOM_SET_UTF8_STRING_LIST(root, ECORE_X_ATOM_NET_DESKTOP_NAMES, buf, len); | 216 | _ATOM_SET_UTF8_STRING_LIST(root, ECORE_X_ATOM_NET_DESKTOP_NAMES, buf, len); |
216 | 217 | ||
217 | free(buf); | 218 | free(buf); |
218 | } /* ecore_x_netwm_desk_names_set */ | 219 | } |
219 | 220 | ||
220 | EAPI void | 221 | EAPI void |
221 | ecore_x_netwm_desk_size_set(Ecore_X_Window root, | 222 | ecore_x_netwm_desk_size_set(Ecore_X_Window root, |
222 | unsigned int width, | 223 | unsigned int width, |
223 | unsigned int height) | 224 | unsigned int height) |
224 | { | 225 | { |
225 | unsigned int size[2]; | 226 | unsigned int size[2]; |
226 | 227 | ||
@@ -229,24 +230,24 @@ ecore_x_netwm_desk_size_set(Ecore_X_Window root, | |||
229 | size[1] = height; | 230 | size[1] = height; |
230 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, size, | 231 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, size, |
231 | 2); | 232 | 2); |
232 | } /* ecore_x_netwm_desk_size_set */ | 233 | } |
233 | 234 | ||
234 | EAPI void | 235 | EAPI void |
235 | ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, | 236 | ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, |
236 | unsigned int *origins, | 237 | unsigned int *origins, |
237 | unsigned int n_desks) | 238 | unsigned int n_desks) |
238 | { | 239 | { |
239 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 240 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
240 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT, | 241 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT, |
241 | origins, 2 * n_desks); | 242 | origins, 2 * n_desks); |
242 | } /* ecore_x_netwm_desk_viewports_set */ | 243 | } |
243 | 244 | ||
244 | EAPI void | 245 | EAPI void |
245 | ecore_x_netwm_desk_layout_set(Ecore_X_Window root, | 246 | ecore_x_netwm_desk_layout_set(Ecore_X_Window root, |
246 | int orientation, | 247 | int orientation, |
247 | int columns, | 248 | int columns, |
248 | int rows, | 249 | int rows, |
249 | int starting_corner) | 250 | int starting_corner) |
250 | { | 251 | { |
251 | unsigned int layout[4]; | 252 | unsigned int layout[4]; |
252 | 253 | ||
@@ -257,26 +258,26 @@ ecore_x_netwm_desk_layout_set(Ecore_X_Window root, | |||
257 | layout[3] = starting_corner; | 258 | layout[3] = starting_corner; |
258 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT, | 259 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT, |
259 | layout, 4); | 260 | layout, 4); |
260 | } /* ecore_x_netwm_desk_layout_set */ | 261 | } |
261 | 262 | ||
262 | EAPI void | 263 | EAPI void |
263 | ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, | 264 | ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, |
264 | unsigned int *areas, | 265 | unsigned int *areas, |
265 | unsigned int n_desks) | 266 | unsigned int n_desks) |
266 | { | 267 | { |
267 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 268 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
268 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas, | 269 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas, |
269 | 4 * n_desks); | 270 | 4 * n_desks); |
270 | } /* ecore_x_netwm_desk_workareas_set */ | 271 | } |
271 | 272 | ||
272 | EAPI unsigned int * | 273 | EAPI unsigned int * |
273 | ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks) | 274 | ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks) |
274 | { | 275 | { |
275 | int ret; | 276 | int ret; |
276 | unsigned int *areas = NULL; | 277 | unsigned int *areas = NULL; |
277 | 278 | ||
278 | if (!root) root = DefaultRootWindow(_ecore_x_disp); | 279 | if (!root) root = DefaultRootWindow(_ecore_x_disp); |
279 | 280 | ||
280 | ret = ecore_x_window_prop_card32_list_get(root, ECORE_X_ATOM_NET_WORKAREA, | 281 | ret = ecore_x_window_prop_card32_list_get(root, ECORE_X_ATOM_NET_WORKAREA, |
281 | &areas); | 282 | &areas); |
282 | if (!areas) | 283 | if (!areas) |
@@ -290,16 +291,16 @@ ecore_x_netwm_desk_workareas_get(Ecore_X_Window root, unsigned int *n_desks) | |||
290 | 291 | ||
291 | EAPI void | 292 | EAPI void |
292 | ecore_x_netwm_desk_current_set(Ecore_X_Window root, | 293 | ecore_x_netwm_desk_current_set(Ecore_X_Window root, |
293 | unsigned int desk) | 294 | unsigned int desk) |
294 | { | 295 | { |
295 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 296 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
296 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk, | 297 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk, |
297 | 1); | 298 | 1); |
298 | } /* ecore_x_netwm_desk_current_set */ | 299 | } |
299 | 300 | ||
300 | EAPI void | 301 | EAPI void |
301 | ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, | 302 | ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, |
302 | Eina_Bool on) | 303 | Eina_Bool on) |
303 | { | 304 | { |
304 | unsigned int val; | 305 | unsigned int val; |
305 | 306 | ||
@@ -307,7 +308,7 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, | |||
307 | val = (on) ? 1 : 0; | 308 | val = (on) ? 1 : 0; |
308 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val, | 309 | ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, &val, |
309 | 1); | 310 | 1); |
310 | } /* ecore_x_netwm_showing_desktop_set */ | 311 | } |
311 | 312 | ||
312 | /* | 313 | /* |
313 | * Client status | 314 | * Client status |
@@ -315,25 +316,25 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, | |||
315 | 316 | ||
316 | /* Mapping order */ | 317 | /* Mapping order */ |
317 | EAPI void | 318 | EAPI void |
318 | ecore_x_netwm_client_list_set(Ecore_X_Window root, | 319 | ecore_x_netwm_client_list_set(Ecore_X_Window root, |
319 | Ecore_X_Window *p_clients, | 320 | Ecore_X_Window *p_clients, |
320 | unsigned int n_clients) | 321 | unsigned int n_clients) |
321 | { | 322 | { |
322 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 323 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
323 | ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST, | 324 | ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST, |
324 | p_clients, n_clients); | 325 | p_clients, n_clients); |
325 | } /* ecore_x_netwm_client_list_set */ | 326 | } |
326 | 327 | ||
327 | /* Stacking order */ | 328 | /* Stacking order */ |
328 | EAPI void | 329 | EAPI void |
329 | ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, | 330 | ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, |
330 | Ecore_X_Window *p_clients, | 331 | Ecore_X_Window *p_clients, |
331 | unsigned int n_clients) | 332 | unsigned int n_clients) |
332 | { | 333 | { |
333 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 334 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
334 | ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, | 335 | ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, |
335 | p_clients, n_clients); | 336 | p_clients, n_clients); |
336 | } /* ecore_x_netwm_client_list_stacking_set */ | 337 | } |
337 | 338 | ||
338 | EAPI void | 339 | EAPI void |
339 | ecore_x_netwm_client_active_set(Ecore_X_Window root, | 340 | ecore_x_netwm_client_active_set(Ecore_X_Window root, |
@@ -342,12 +343,12 @@ ecore_x_netwm_client_active_set(Ecore_X_Window root, | |||
342 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 343 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
343 | ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW, | 344 | ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW, |
344 | &win, 1); | 345 | &win, 1); |
345 | } /* ecore_x_netwm_client_active_set */ | 346 | } |
346 | 347 | ||
347 | EAPI void | 348 | EAPI void |
348 | ecore_x_netwm_client_active_request(Ecore_X_Window root, | 349 | ecore_x_netwm_client_active_request(Ecore_X_Window root, |
349 | Ecore_X_Window win, | 350 | Ecore_X_Window win, |
350 | int type, | 351 | int type, |
351 | Ecore_X_Window current_win) | 352 | Ecore_X_Window current_win) |
352 | { | 353 | { |
353 | XEvent xev; | 354 | XEvent xev; |
@@ -369,19 +370,19 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root, | |||
369 | 370 | ||
370 | XSendEvent(_ecore_x_disp, root, False, | 371 | XSendEvent(_ecore_x_disp, root, False, |
371 | SubstructureRedirectMask | SubstructureNotifyMask, &xev); | 372 | SubstructureRedirectMask | SubstructureNotifyMask, &xev); |
372 | } /* ecore_x_netwm_client_active_request */ | 373 | } |
373 | 374 | ||
374 | EAPI void | 375 | EAPI void |
375 | ecore_x_netwm_name_set(Ecore_X_Window win, | 376 | ecore_x_netwm_name_set(Ecore_X_Window win, |
376 | const char *name) | 377 | const char *name) |
377 | { | 378 | { |
378 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 379 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
379 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name); | 380 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name); |
380 | } /* ecore_x_netwm_name_set */ | 381 | } |
381 | 382 | ||
382 | EAPI int | 383 | EAPI int |
383 | ecore_x_netwm_name_get(Ecore_X_Window win, | 384 | ecore_x_netwm_name_get(Ecore_X_Window win, |
384 | char **name) | 385 | char **name) |
385 | { | 386 | { |
386 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 387 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
387 | if (name) | 388 | if (name) |
@@ -389,19 +390,19 @@ ecore_x_netwm_name_get(Ecore_X_Window win, | |||
389 | ECORE_X_ATOM_NET_WM_NAME); | 390 | ECORE_X_ATOM_NET_WM_NAME); |
390 | 391 | ||
391 | return 1; | 392 | return 1; |
392 | } /* ecore_x_netwm_name_get */ | 393 | } |
393 | 394 | ||
394 | EAPI void | 395 | EAPI void |
395 | ecore_x_netwm_startup_id_set(Ecore_X_Window win, | 396 | ecore_x_netwm_startup_id_set(Ecore_X_Window win, |
396 | const char *id) | 397 | const char *id) |
397 | { | 398 | { |
398 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 399 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
399 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id); | 400 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id); |
400 | } /* ecore_x_netwm_startup_id_set */ | 401 | } |
401 | 402 | ||
402 | EAPI int | 403 | EAPI int |
403 | ecore_x_netwm_startup_id_get(Ecore_X_Window win, | 404 | ecore_x_netwm_startup_id_get(Ecore_X_Window win, |
404 | char **id) | 405 | char **id) |
405 | { | 406 | { |
406 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 407 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
407 | if (id) | 408 | if (id) |
@@ -409,20 +410,20 @@ ecore_x_netwm_startup_id_get(Ecore_X_Window win, | |||
409 | ECORE_X_ATOM_NET_STARTUP_ID); | 410 | ECORE_X_ATOM_NET_STARTUP_ID); |
410 | 411 | ||
411 | return 1; | 412 | return 1; |
412 | } /* ecore_x_netwm_startup_id_get */ | 413 | } |
413 | 414 | ||
414 | EAPI void | 415 | EAPI void |
415 | ecore_x_netwm_visible_name_set(Ecore_X_Window win, | 416 | ecore_x_netwm_visible_name_set(Ecore_X_Window win, |
416 | const char *name) | 417 | const char *name) |
417 | { | 418 | { |
418 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 419 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
419 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME, | 420 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME, |
420 | name); | 421 | name); |
421 | } /* ecore_x_netwm_visible_name_set */ | 422 | } |
422 | 423 | ||
423 | EAPI int | 424 | EAPI int |
424 | ecore_x_netwm_visible_name_get(Ecore_X_Window win, | 425 | ecore_x_netwm_visible_name_get(Ecore_X_Window win, |
425 | char **name) | 426 | char **name) |
426 | { | 427 | { |
427 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 428 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
428 | if (name) | 429 | if (name) |
@@ -431,20 +432,20 @@ ecore_x_netwm_visible_name_get(Ecore_X_Window win, | |||
431 | ECORE_X_ATOM_NET_WM_VISIBLE_NAME); | 432 | ECORE_X_ATOM_NET_WM_VISIBLE_NAME); |
432 | 433 | ||
433 | return 1; | 434 | return 1; |
434 | } /* ecore_x_netwm_visible_name_get */ | 435 | } |
435 | 436 | ||
436 | EAPI void | 437 | EAPI void |
437 | ecore_x_netwm_icon_name_set(Ecore_X_Window win, | 438 | ecore_x_netwm_icon_name_set(Ecore_X_Window win, |
438 | const char *name) | 439 | const char *name) |
439 | { | 440 | { |
440 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 441 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
441 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, | 442 | _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, |
442 | name); | 443 | name); |
443 | } /* ecore_x_netwm_icon_name_set */ | 444 | } |
444 | 445 | ||
445 | EAPI int | 446 | EAPI int |
446 | ecore_x_netwm_icon_name_get(Ecore_X_Window win, | 447 | ecore_x_netwm_icon_name_get(Ecore_X_Window win, |
447 | char **name) | 448 | char **name) |
448 | { | 449 | { |
449 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 450 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
450 | if (name) | 451 | if (name) |
@@ -453,21 +454,21 @@ ecore_x_netwm_icon_name_get(Ecore_X_Window win, | |||
453 | ECORE_X_ATOM_NET_WM_ICON_NAME); | 454 | ECORE_X_ATOM_NET_WM_ICON_NAME); |
454 | 455 | ||
455 | return 1; | 456 | return 1; |
456 | } /* ecore_x_netwm_icon_name_get */ | 457 | } |
457 | 458 | ||
458 | EAPI void | 459 | EAPI void |
459 | ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, | 460 | ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, |
460 | const char *name) | 461 | const char *name) |
461 | { | 462 | { |
462 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 463 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
463 | _ecore_x_window_prop_string_utf8_set(win, | 464 | _ecore_x_window_prop_string_utf8_set(win, |
464 | ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, | 465 | ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, |
465 | name); | 466 | name); |
466 | } /* ecore_x_netwm_visible_icon_name_set */ | 467 | } |
467 | 468 | ||
468 | EAPI int | 469 | EAPI int |
469 | ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, | 470 | ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, |
470 | char **name) | 471 | char **name) |
471 | { | 472 | { |
472 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 473 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
473 | if (name) | 474 | if (name) |
@@ -476,19 +477,19 @@ ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, | |||
476 | ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME); | 477 | ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME); |
477 | 478 | ||
478 | return 1; | 479 | return 1; |
479 | } /* ecore_x_netwm_visible_icon_name_get */ | 480 | } |
480 | 481 | ||
481 | EAPI void | 482 | EAPI void |
482 | ecore_x_netwm_desktop_set(Ecore_X_Window win, | 483 | ecore_x_netwm_desktop_set(Ecore_X_Window win, |
483 | unsigned int desk) | 484 | unsigned int desk) |
484 | { | 485 | { |
485 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 486 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
486 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1); | 487 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1); |
487 | } /* ecore_x_netwm_desktop_set */ | 488 | } |
488 | 489 | ||
489 | EAPI Eina_Bool | 490 | EAPI Eina_Bool |
490 | ecore_x_netwm_desktop_get(Ecore_X_Window win, | 491 | ecore_x_netwm_desktop_get(Ecore_X_Window win, |
491 | unsigned int *desk) | 492 | unsigned int *desk) |
492 | { | 493 | { |
493 | int ret; | 494 | int ret; |
494 | unsigned int tmp; | 495 | unsigned int tmp; |
@@ -501,17 +502,17 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, | |||
501 | *desk = tmp; | 502 | *desk = tmp; |
502 | 503 | ||
503 | return ret == 1 ? EINA_TRUE : EINA_FALSE; | 504 | return ret == 1 ? EINA_TRUE : EINA_FALSE; |
504 | } /* ecore_x_netwm_desktop_get */ | 505 | } |
505 | 506 | ||
506 | /* | 507 | /* |
507 | * _NET_WM_STRUT is deprecated | 508 | * _NET_WM_STRUT is deprecated |
508 | */ | 509 | */ |
509 | EAPI void | 510 | EAPI void |
510 | ecore_x_netwm_strut_set(Ecore_X_Window win, | 511 | ecore_x_netwm_strut_set(Ecore_X_Window win, |
511 | int left, | 512 | int left, |
512 | int right, | 513 | int right, |
513 | int top, | 514 | int top, |
514 | int bottom) | 515 | int bottom) |
515 | { | 516 | { |
516 | unsigned int strut[4]; | 517 | unsigned int strut[4]; |
517 | 518 | ||
@@ -521,17 +522,17 @@ ecore_x_netwm_strut_set(Ecore_X_Window win, | |||
521 | strut[2] = top; | 522 | strut[2] = top; |
522 | strut[3] = bottom; | 523 | strut[3] = bottom; |
523 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4); | 524 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4); |
524 | } /* ecore_x_netwm_strut_set */ | 525 | } |
525 | 526 | ||
526 | /* | 527 | /* |
527 | * _NET_WM_STRUT is deprecated | 528 | * _NET_WM_STRUT is deprecated |
528 | */ | 529 | */ |
529 | EAPI Eina_Bool | 530 | EAPI Eina_Bool |
530 | ecore_x_netwm_strut_get(Ecore_X_Window win, | 531 | ecore_x_netwm_strut_get(Ecore_X_Window win, |
531 | int *left, | 532 | int *left, |
532 | int *right, | 533 | int *right, |
533 | int *top, | 534 | int *top, |
534 | int *bottom) | 535 | int *bottom) |
535 | { | 536 | { |
536 | int ret = 0; | 537 | int ret = 0; |
537 | unsigned int strut[4]; | 538 | unsigned int strut[4]; |
@@ -557,22 +558,22 @@ ecore_x_netwm_strut_get(Ecore_X_Window win, | |||
557 | *bottom = strut[3]; | 558 | *bottom = strut[3]; |
558 | 559 | ||
559 | return EINA_TRUE; | 560 | return EINA_TRUE; |
560 | } /* ecore_x_netwm_strut_get */ | 561 | } |
561 | 562 | ||
562 | EAPI void | 563 | EAPI void |
563 | ecore_x_netwm_strut_partial_set(Ecore_X_Window win, | 564 | ecore_x_netwm_strut_partial_set(Ecore_X_Window win, |
564 | int left, | 565 | int left, |
565 | int right, | 566 | int right, |
566 | int top, | 567 | int top, |
567 | int bottom, | 568 | int bottom, |
568 | int left_start_y, | 569 | int left_start_y, |
569 | int left_end_y, | 570 | int left_end_y, |
570 | int right_start_y, | 571 | int right_start_y, |
571 | int right_end_y, | 572 | int right_end_y, |
572 | int top_start_x, | 573 | int top_start_x, |
573 | int top_end_x, | 574 | int top_end_x, |
574 | int bottom_start_x, | 575 | int bottom_start_x, |
575 | int bottom_end_x) | 576 | int bottom_end_x) |
576 | { | 577 | { |
577 | unsigned int strut[12]; | 578 | unsigned int strut[12]; |
578 | 579 | ||
@@ -593,22 +594,22 @@ ecore_x_netwm_strut_partial_set(Ecore_X_Window win, | |||
593 | ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, | 594 | ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, |
594 | strut, | 595 | strut, |
595 | 12); | 596 | 12); |
596 | } /* ecore_x_netwm_strut_partial_set */ | 597 | } |
597 | 598 | ||
598 | EAPI Eina_Bool | 599 | EAPI Eina_Bool |
599 | ecore_x_netwm_strut_partial_get(Ecore_X_Window win, | 600 | ecore_x_netwm_strut_partial_get(Ecore_X_Window win, |
600 | int *left, | 601 | int *left, |
601 | int *right, | 602 | int *right, |
602 | int *top, | 603 | int *top, |
603 | int *bottom, | 604 | int *bottom, |
604 | int *left_start_y, | 605 | int *left_start_y, |
605 | int *left_end_y, | 606 | int *left_end_y, |
606 | int *right_start_y, | 607 | int *right_start_y, |
607 | int *right_end_y, | 608 | int *right_end_y, |
608 | int *top_start_x, | 609 | int *top_start_x, |
609 | int *top_end_x, | 610 | int *top_end_x, |
610 | int *bottom_start_x, | 611 | int *bottom_start_x, |
611 | int *bottom_end_x) | 612 | int *bottom_end_x) |
612 | { | 613 | { |
613 | int ret = 0; | 614 | int ret = 0; |
614 | unsigned int strut[12]; | 615 | unsigned int strut[12]; |
@@ -658,12 +659,12 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win, | |||
658 | *bottom_end_x = strut[11]; | 659 | *bottom_end_x = strut[11]; |
659 | 660 | ||
660 | return EINA_TRUE; | 661 | return EINA_TRUE; |
661 | } /* ecore_x_netwm_strut_partial_get */ | 662 | } |
662 | 663 | ||
663 | EAPI Eina_Bool | 664 | EAPI Eina_Bool |
664 | ecore_x_netwm_icons_get(Ecore_X_Window win, | 665 | ecore_x_netwm_icons_get(Ecore_X_Window win, |
665 | Ecore_X_Icon **icon, | 666 | Ecore_X_Icon **icon, |
666 | int *num) | 667 | int *num) |
667 | { | 668 | { |
668 | unsigned int *data, *p; | 669 | unsigned int *data, *p; |
669 | unsigned int *src; | 670 | unsigned int *src; |
@@ -767,14 +768,14 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, | |||
767 | free(data); | 768 | free(data); |
768 | 769 | ||
769 | return EINA_TRUE; | 770 | return EINA_TRUE; |
770 | } /* ecore_x_netwm_icons_get */ | 771 | } |
771 | 772 | ||
772 | EAPI void | 773 | EAPI void |
773 | ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, | 774 | ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, |
774 | int x, | 775 | int x, |
775 | int y, | 776 | int y, |
776 | int width, | 777 | int width, |
777 | int height) | 778 | int height) |
778 | { | 779 | { |
779 | unsigned int geometry[4]; | 780 | unsigned int geometry[4]; |
780 | 781 | ||
@@ -787,14 +788,14 @@ ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, | |||
787 | ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, | 788 | ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, |
788 | geometry, | 789 | geometry, |
789 | 4); | 790 | 4); |
790 | } /* ecore_x_netwm_icon_geometry_set */ | 791 | } |
791 | 792 | ||
792 | EAPI Eina_Bool | 793 | EAPI Eina_Bool |
793 | ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, | 794 | ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, |
794 | int *x, | 795 | int *x, |
795 | int *y, | 796 | int *y, |
796 | int *width, | 797 | int *width, |
797 | int *height) | 798 | int *height) |
798 | { | 799 | { |
799 | int ret; | 800 | int ret; |
800 | unsigned int geometry[4]; | 801 | unsigned int geometry[4]; |
@@ -820,11 +821,11 @@ ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, | |||
820 | *height = geometry[3]; | 821 | *height = geometry[3]; |
821 | 822 | ||
822 | return EINA_TRUE; | 823 | return EINA_TRUE; |
823 | } /* ecore_x_netwm_icon_geometry_get */ | 824 | } |
824 | 825 | ||
825 | EAPI void | 826 | EAPI void |
826 | ecore_x_netwm_pid_set(Ecore_X_Window win, | 827 | ecore_x_netwm_pid_set(Ecore_X_Window win, |
827 | int pid) | 828 | int pid) |
828 | { | 829 | { |
829 | unsigned int tmp; | 830 | unsigned int tmp; |
830 | 831 | ||
@@ -832,11 +833,11 @@ ecore_x_netwm_pid_set(Ecore_X_Window win, | |||
832 | tmp = pid; | 833 | tmp = pid; |
833 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID, | 834 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID, |
834 | &tmp, 1); | 835 | &tmp, 1); |
835 | } /* ecore_x_netwm_pid_set */ | 836 | } |
836 | 837 | ||
837 | EAPI Eina_Bool | 838 | EAPI Eina_Bool |
838 | ecore_x_netwm_pid_get(Ecore_X_Window win, | 839 | ecore_x_netwm_pid_get(Ecore_X_Window win, |
839 | int *pid) | 840 | int *pid) |
840 | { | 841 | { |
841 | int ret; | 842 | int ret; |
842 | unsigned int tmp; | 843 | unsigned int tmp; |
@@ -848,7 +849,7 @@ ecore_x_netwm_pid_get(Ecore_X_Window win, | |||
848 | *pid = tmp; | 849 | *pid = tmp; |
849 | 850 | ||
850 | return ret == 1 ? EINA_TRUE : EINA_FALSE; | 851 | return ret == 1 ? EINA_TRUE : EINA_FALSE; |
851 | } /* ecore_x_netwm_pid_get */ | 852 | } |
852 | 853 | ||
853 | EAPI void | 854 | EAPI void |
854 | ecore_x_netwm_handled_icons_set(Ecore_X_Window win) | 855 | ecore_x_netwm_handled_icons_set(Ecore_X_Window win) |
@@ -856,7 +857,7 @@ ecore_x_netwm_handled_icons_set(Ecore_X_Window win) | |||
856 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 857 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
857 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, | 858 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, |
858 | NULL, 0); | 859 | NULL, 0); |
859 | } /* ecore_x_netwm_handled_icons_set */ | 860 | } |
860 | 861 | ||
861 | EAPI Eina_Bool | 862 | EAPI Eina_Bool |
862 | ecore_x_netwm_handled_icons_get(Ecore_X_Window win) | 863 | ecore_x_netwm_handled_icons_get(Ecore_X_Window win) |
@@ -866,20 +867,20 @@ ecore_x_netwm_handled_icons_get(Ecore_X_Window win) | |||
866 | ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, | 867 | ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, |
867 | NULL, 0); | 868 | NULL, 0); |
868 | return ret == 0 ? EINA_TRUE : EINA_FALSE; | 869 | return ret == 0 ? EINA_TRUE : EINA_FALSE; |
869 | } /* ecore_x_netwm_handled_icons_get */ | 870 | } |
870 | 871 | ||
871 | EAPI void | 872 | EAPI void |
872 | ecore_x_netwm_user_time_set(Ecore_X_Window win, | 873 | ecore_x_netwm_user_time_set(Ecore_X_Window win, |
873 | unsigned int tim) | 874 | unsigned int tim) |
874 | { | 875 | { |
875 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 876 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
876 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME, | 877 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME, |
877 | &tim, 1); | 878 | &tim, 1); |
878 | } /* ecore_x_netwm_user_time_set */ | 879 | } |
879 | 880 | ||
880 | EAPI Eina_Bool | 881 | EAPI Eina_Bool |
881 | ecore_x_netwm_user_time_get(Ecore_X_Window win, | 882 | ecore_x_netwm_user_time_get(Ecore_X_Window win, |
882 | unsigned int *tim) | 883 | unsigned int *tim) |
883 | { | 884 | { |
884 | int ret; | 885 | int ret; |
885 | unsigned int tmp; | 886 | unsigned int tmp; |
@@ -891,7 +892,7 @@ ecore_x_netwm_user_time_get(Ecore_X_Window win, | |||
891 | *tim = tmp; | 892 | *tim = tmp; |
892 | 893 | ||
893 | return ret == 1 ? EINA_TRUE : EINA_FALSE; | 894 | return ret == 1 ? EINA_TRUE : EINA_FALSE; |
894 | } /* ecore_x_netwm_user_time_get */ | 895 | } |
895 | 896 | ||
896 | Ecore_X_Window_State | 897 | Ecore_X_Window_State |
897 | _ecore_x_netwm_state_get(Ecore_X_Atom a) | 898 | _ecore_x_netwm_state_get(Ecore_X_Atom a) |
@@ -922,12 +923,12 @@ _ecore_x_netwm_state_get(Ecore_X_Atom a) | |||
922 | return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION; | 923 | return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION; |
923 | else | 924 | else |
924 | return ECORE_X_WINDOW_STATE_UNKNOWN; | 925 | return ECORE_X_WINDOW_STATE_UNKNOWN; |
925 | } /* _ecore_x_netwm_state_get */ | 926 | } |
926 | 927 | ||
927 | static Ecore_X_Atom | 928 | static Ecore_X_Atom |
928 | _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s) | 929 | _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s) |
929 | { | 930 | { |
930 | switch(s) | 931 | switch (s) |
931 | { | 932 | { |
932 | case ECORE_X_WINDOW_STATE_MODAL: | 933 | case ECORE_X_WINDOW_STATE_MODAL: |
933 | return ECORE_X_ATOM_NET_WM_STATE_MODAL; | 934 | return ECORE_X_ATOM_NET_WM_STATE_MODAL; |
@@ -967,13 +968,13 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s) | |||
967 | 968 | ||
968 | default: | 969 | default: |
969 | return 0; | 970 | return 0; |
970 | } /* switch */ | 971 | } |
971 | } /* _ecore_x_netwm_state_atom_get */ | 972 | } |
972 | 973 | ||
973 | EAPI void | 974 | EAPI void |
974 | ecore_x_netwm_window_state_set(Ecore_X_Window win, | 975 | ecore_x_netwm_window_state_set(Ecore_X_Window win, |
975 | Ecore_X_Window_State *state, | 976 | Ecore_X_Window_State *state, |
976 | unsigned int num) | 977 | unsigned int num) |
977 | { | 978 | { |
978 | Ecore_X_Atom *set; | 979 | Ecore_X_Atom *set; |
979 | unsigned int i; | 980 | unsigned int i; |
@@ -995,12 +996,12 @@ ecore_x_netwm_window_state_set(Ecore_X_Window win, | |||
995 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num); | 996 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num); |
996 | 997 | ||
997 | free(set); | 998 | free(set); |
998 | } /* ecore_x_netwm_window_state_set */ | 999 | } |
999 | 1000 | ||
1000 | EAPI Eina_Bool | 1001 | EAPI Eina_Bool |
1001 | ecore_x_netwm_window_state_get(Ecore_X_Window win, | 1002 | ecore_x_netwm_window_state_get(Ecore_X_Window win, |
1002 | Ecore_X_Window_State **state, | 1003 | Ecore_X_Window_State **state, |
1003 | unsigned int *num) | 1004 | unsigned int *num) |
1004 | { | 1005 | { |
1005 | int num_ret, i; | 1006 | int num_ret, i; |
1006 | Ecore_X_Atom *atoms; | 1007 | Ecore_X_Atom *atoms; |
@@ -1030,7 +1031,7 @@ ecore_x_netwm_window_state_get(Ecore_X_Window win, | |||
1030 | 1031 | ||
1031 | free(atoms); | 1032 | free(atoms); |
1032 | return EINA_TRUE; | 1033 | return EINA_TRUE; |
1033 | } /* ecore_x_netwm_window_state_get */ | 1034 | } |
1034 | 1035 | ||
1035 | static Ecore_X_Window_Type | 1036 | static Ecore_X_Window_Type |
1036 | _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom) | 1037 | _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom) |
@@ -1065,7 +1066,7 @@ _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom) | |||
1065 | return ECORE_X_WINDOW_TYPE_DND; | 1066 | return ECORE_X_WINDOW_TYPE_DND; |
1066 | else | 1067 | else |
1067 | return ECORE_X_WINDOW_TYPE_UNKNOWN; | 1068 | return ECORE_X_WINDOW_TYPE_UNKNOWN; |
1068 | } /* _ecore_x_netwm_window_type_type_get */ | 1069 | } |
1069 | 1070 | ||
1070 | static Ecore_X_Atom | 1071 | static Ecore_X_Atom |
1071 | _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type) | 1072 | _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type) |
@@ -1116,15 +1117,15 @@ _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type) | |||
1116 | 1117 | ||
1117 | default: | 1118 | default: |
1118 | return 0; | 1119 | return 0; |
1119 | } /* switch */ | 1120 | } |
1120 | } /* _ecore_x_netwm_window_type_atom_get */ | 1121 | } |
1121 | 1122 | ||
1122 | /* | 1123 | /* |
1123 | * FIXME: We should set WM_TRANSIENT_FOR if type is ECORE_X_WINDOW_TYPE_TOOLBAR | 1124 | * FIXME: We should set WM_TRANSIENT_FOR if type is ECORE_X_WINDOW_TYPE_TOOLBAR |
1124 | * , ECORE_X_WINDOW_TYPE_MENU or ECORE_X_WINDOW_TYPE_DIALOG | 1125 | * , ECORE_X_WINDOW_TYPE_MENU or ECORE_X_WINDOW_TYPE_DIALOG |
1125 | */ | 1126 | */ |
1126 | EAPI void | 1127 | EAPI void |
1127 | ecore_x_netwm_window_type_set(Ecore_X_Window win, | 1128 | ecore_x_netwm_window_type_set(Ecore_X_Window win, |
1128 | Ecore_X_Window_Type type) | 1129 | Ecore_X_Window_Type type) |
1129 | { | 1130 | { |
1130 | Ecore_X_Atom atom; | 1131 | Ecore_X_Atom atom; |
@@ -1133,11 +1134,11 @@ ecore_x_netwm_window_type_set(Ecore_X_Window win, | |||
1133 | atom = _ecore_x_netwm_window_type_atom_get(type); | 1134 | atom = _ecore_x_netwm_window_type_atom_get(type); |
1134 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE, | 1135 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE, |
1135 | &atom, 1); | 1136 | &atom, 1); |
1136 | } /* ecore_x_netwm_window_type_set */ | 1137 | } |
1137 | 1138 | ||
1138 | /* FIXME: Maybe return 0 on some conditions? */ | 1139 | /* FIXME: Maybe return 0 on some conditions? */ |
1139 | EAPI Eina_Bool | 1140 | EAPI Eina_Bool |
1140 | ecore_x_netwm_window_type_get(Ecore_X_Window win, | 1141 | ecore_x_netwm_window_type_get(Ecore_X_Window win, |
1141 | Ecore_X_Window_Type *type) | 1142 | Ecore_X_Window_Type *type) |
1142 | { | 1143 | { |
1143 | int num; | 1144 | int num; |
@@ -1158,10 +1159,10 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win, | |||
1158 | return EINA_TRUE; | 1159 | return EINA_TRUE; |
1159 | 1160 | ||
1160 | return EINA_FALSE; | 1161 | return EINA_FALSE; |
1161 | } /* ecore_x_netwm_window_type_get */ | 1162 | } |
1162 | 1163 | ||
1163 | EAPI int | 1164 | EAPI int |
1164 | ecore_x_netwm_window_types_get(Ecore_X_Window win, | 1165 | ecore_x_netwm_window_types_get(Ecore_X_Window win, |
1165 | Ecore_X_Window_Type **types) | 1166 | Ecore_X_Window_Type **types) |
1166 | { | 1167 | { |
1167 | int num, i; | 1168 | int num, i; |
@@ -1196,7 +1197,7 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, | |||
1196 | free(atoms2); | 1197 | free(atoms2); |
1197 | 1198 | ||
1198 | return num; | 1199 | return num; |
1199 | } /* ecore_x_netwm_window_types_get */ | 1200 | } |
1200 | 1201 | ||
1201 | static Ecore_X_Atom | 1202 | static Ecore_X_Atom |
1202 | _ecore_x_netwm_action_atom_get(Ecore_X_Action action) | 1203 | _ecore_x_netwm_action_atom_get(Ecore_X_Action action) |
@@ -1241,8 +1242,8 @@ _ecore_x_netwm_action_atom_get(Ecore_X_Action action) | |||
1241 | 1242 | ||
1242 | default: | 1243 | default: |
1243 | return 0; | 1244 | return 0; |
1244 | } /* switch */ | 1245 | } |
1245 | } /* _ecore_x_netwm_action_atom_get */ | 1246 | } |
1246 | 1247 | ||
1247 | /* FIXME: Get complete list */ | 1248 | /* FIXME: Get complete list */ |
1248 | EAPI Eina_Bool | 1249 | EAPI Eina_Bool |
@@ -1272,13 +1273,13 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, | |||
1272 | 1273 | ||
1273 | free(atoms); | 1274 | free(atoms); |
1274 | return ret; | 1275 | return ret; |
1275 | } /* ecore_x_netwm_allowed_action_isset */ | 1276 | } |
1276 | 1277 | ||
1277 | /* FIXME: Set complete list */ | 1278 | /* FIXME: Set complete list */ |
1278 | EAPI void | 1279 | EAPI void |
1279 | ecore_x_netwm_allowed_action_set(Ecore_X_Window win, | 1280 | ecore_x_netwm_allowed_action_set(Ecore_X_Window win, |
1280 | Ecore_X_Action *action, | 1281 | Ecore_X_Action *action, |
1281 | unsigned int num) | 1282 | unsigned int num) |
1282 | { | 1283 | { |
1283 | Ecore_X_Atom *set; | 1284 | Ecore_X_Atom *set; |
1284 | unsigned int i; | 1285 | unsigned int i; |
@@ -1304,12 +1305,12 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window win, | |||
1304 | num); | 1305 | num); |
1305 | 1306 | ||
1306 | free(set); | 1307 | free(set); |
1307 | } /* ecore_x_netwm_allowed_action_set */ | 1308 | } |
1308 | 1309 | ||
1309 | EAPI Eina_Bool | 1310 | EAPI Eina_Bool |
1310 | ecore_x_netwm_allowed_action_get(Ecore_X_Window win, | 1311 | ecore_x_netwm_allowed_action_get(Ecore_X_Window win, |
1311 | Ecore_X_Action **action, | 1312 | Ecore_X_Action **action, |
1312 | unsigned int *num) | 1313 | unsigned int *num) |
1313 | { | 1314 | { |
1314 | int num_ret, i; | 1315 | int num_ret, i; |
1315 | Ecore_X_Atom *atoms; | 1316 | Ecore_X_Atom *atoms; |
@@ -1341,20 +1342,20 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window win, | |||
1341 | 1342 | ||
1342 | free(atoms); | 1343 | free(atoms); |
1343 | return EINA_TRUE; | 1344 | return EINA_TRUE; |
1344 | } /* ecore_x_netwm_allowed_action_get */ | 1345 | } |
1345 | 1346 | ||
1346 | EAPI void | 1347 | EAPI void |
1347 | ecore_x_netwm_opacity_set(Ecore_X_Window win, | 1348 | ecore_x_netwm_opacity_set(Ecore_X_Window win, |
1348 | unsigned int opacity) | 1349 | unsigned int opacity) |
1349 | { | 1350 | { |
1350 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1351 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1351 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, | 1352 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, |
1352 | &opacity, 1); | 1353 | &opacity, 1); |
1353 | } /* ecore_x_netwm_opacity_set */ | 1354 | } |
1354 | 1355 | ||
1355 | EAPI Eina_Bool | 1356 | EAPI Eina_Bool |
1356 | ecore_x_netwm_opacity_get(Ecore_X_Window win, | 1357 | ecore_x_netwm_opacity_get(Ecore_X_Window win, |
1357 | unsigned int *opacity) | 1358 | unsigned int *opacity) |
1358 | { | 1359 | { |
1359 | int ret; | 1360 | int ret; |
1360 | unsigned int tmp; | 1361 | unsigned int tmp; |
@@ -1366,14 +1367,14 @@ ecore_x_netwm_opacity_get(Ecore_X_Window win, | |||
1366 | *opacity = tmp; | 1367 | *opacity = tmp; |
1367 | 1368 | ||
1368 | return ret == 1 ? EINA_TRUE : EINA_FALSE; | 1369 | return ret == 1 ? EINA_TRUE : EINA_FALSE; |
1369 | } /* ecore_x_netwm_opacity_get */ | 1370 | } |
1370 | 1371 | ||
1371 | EAPI void | 1372 | EAPI void |
1372 | ecore_x_netwm_frame_size_set(Ecore_X_Window win, | 1373 | ecore_x_netwm_frame_size_set(Ecore_X_Window win, |
1373 | int fl, | 1374 | int fl, |
1374 | int fr, | 1375 | int fr, |
1375 | int ft, | 1376 | int ft, |
1376 | int fb) | 1377 | int fb) |
1377 | { | 1378 | { |
1378 | unsigned int frames[4]; | 1379 | unsigned int frames[4]; |
1379 | 1380 | ||
@@ -1386,14 +1387,14 @@ ecore_x_netwm_frame_size_set(Ecore_X_Window win, | |||
1386 | ECORE_X_ATOM_NET_FRAME_EXTENTS, | 1387 | ECORE_X_ATOM_NET_FRAME_EXTENTS, |
1387 | frames, | 1388 | frames, |
1388 | 4); | 1389 | 4); |
1389 | } /* ecore_x_netwm_frame_size_set */ | 1390 | } |
1390 | 1391 | ||
1391 | EAPI Eina_Bool | 1392 | EAPI Eina_Bool |
1392 | ecore_x_netwm_frame_size_get(Ecore_X_Window win, | 1393 | ecore_x_netwm_frame_size_get(Ecore_X_Window win, |
1393 | int *fl, | 1394 | int *fl, |
1394 | int *fr, | 1395 | int *fr, |
1395 | int *ft, | 1396 | int *ft, |
1396 | int *fb) | 1397 | int *fb) |
1397 | { | 1398 | { |
1398 | int ret = 0; | 1399 | int ret = 0; |
1399 | unsigned int frames[4]; | 1400 | unsigned int frames[4]; |
@@ -1419,10 +1420,10 @@ ecore_x_netwm_frame_size_get(Ecore_X_Window win, | |||
1419 | *fb = frames[3]; | 1420 | *fb = frames[3]; |
1420 | 1421 | ||
1421 | return EINA_TRUE; | 1422 | return EINA_TRUE; |
1422 | } /* ecore_x_netwm_frame_size_get */ | 1423 | } |
1423 | 1424 | ||
1424 | EAPI Eina_Bool | 1425 | EAPI Eina_Bool |
1425 | ecore_x_netwm_sync_counter_get(Ecore_X_Window win, | 1426 | ecore_x_netwm_sync_counter_get(Ecore_X_Window win, |
1426 | Ecore_X_Sync_Counter *counter) | 1427 | Ecore_X_Sync_Counter *counter) |
1427 | { | 1428 | { |
1428 | int ret; | 1429 | int ret; |
@@ -1439,7 +1440,7 @@ ecore_x_netwm_sync_counter_get(Ecore_X_Window win, | |||
1439 | *counter = tmp; | 1440 | *counter = tmp; |
1440 | 1441 | ||
1441 | return ret == 1 ? EINA_TRUE : EINA_FALSE; | 1442 | return ret == 1 ? EINA_TRUE : EINA_FALSE; |
1442 | } /* ecore_x_netwm_sync_counter_get */ | 1443 | } |
1443 | 1444 | ||
1444 | EAPI void | 1445 | EAPI void |
1445 | ecore_x_netwm_ping_send(Ecore_X_Window win) | 1446 | ecore_x_netwm_ping_send(Ecore_X_Window win) |
@@ -1462,11 +1463,11 @@ ecore_x_netwm_ping_send(Ecore_X_Window win) | |||
1462 | xev.xclient.data.l[4] = 0; | 1463 | xev.xclient.data.l[4] = 0; |
1463 | 1464 | ||
1464 | XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); | 1465 | XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); |
1465 | } /* ecore_x_netwm_ping_send */ | 1466 | } |
1466 | 1467 | ||
1467 | EAPI void | 1468 | EAPI void |
1468 | ecore_x_netwm_sync_request_send(Ecore_X_Window win, | 1469 | ecore_x_netwm_sync_request_send(Ecore_X_Window win, |
1469 | unsigned int serial) | 1470 | unsigned int serial) |
1470 | { | 1471 | { |
1471 | XSyncValue value; | 1472 | XSyncValue value; |
1472 | XEvent xev; | 1473 | XEvent xev; |
@@ -1489,14 +1490,14 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win, | |||
1489 | xev.xclient.data.l[4] = 0; | 1490 | xev.xclient.data.l[4] = 0; |
1490 | 1491 | ||
1491 | XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); | 1492 | XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); |
1492 | } /* ecore_x_netwm_sync_request_send */ | 1493 | } |
1493 | 1494 | ||
1494 | EAPI void | 1495 | EAPI void |
1495 | ecore_x_netwm_state_request_send(Ecore_X_Window win, | 1496 | ecore_x_netwm_state_request_send(Ecore_X_Window win, |
1496 | Ecore_X_Window root, | 1497 | Ecore_X_Window root, |
1497 | Ecore_X_Window_State s1, | 1498 | Ecore_X_Window_State s1, |
1498 | Ecore_X_Window_State s2, | 1499 | Ecore_X_Window_State s2, |
1499 | Eina_Bool set) | 1500 | Eina_Bool set) |
1500 | { | 1501 | { |
1501 | XEvent xev; | 1502 | XEvent xev; |
1502 | 1503 | ||
@@ -1524,12 +1525,12 @@ ecore_x_netwm_state_request_send(Ecore_X_Window win, | |||
1524 | 1525 | ||
1525 | XSendEvent(_ecore_x_disp, root, False, | 1526 | XSendEvent(_ecore_x_disp, root, False, |
1526 | SubstructureNotifyMask | SubstructureRedirectMask, &xev); | 1527 | SubstructureNotifyMask | SubstructureRedirectMask, &xev); |
1527 | } /* ecore_x_netwm_state_request_send */ | 1528 | } |
1528 | 1529 | ||
1529 | EAPI void | 1530 | EAPI void |
1530 | ecore_x_netwm_desktop_request_send(Ecore_X_Window win, | 1531 | ecore_x_netwm_desktop_request_send(Ecore_X_Window win, |
1531 | Ecore_X_Window root, | 1532 | Ecore_X_Window root, |
1532 | unsigned int desktop) | 1533 | unsigned int desktop) |
1533 | { | 1534 | { |
1534 | XEvent xev; | 1535 | XEvent xev; |
1535 | 1536 | ||
@@ -1551,11 +1552,11 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win, | |||
1551 | 1552 | ||
1552 | XSendEvent(_ecore_x_disp, root, False, | 1553 | XSendEvent(_ecore_x_disp, root, False, |
1553 | SubstructureNotifyMask | SubstructureRedirectMask, &xev); | 1554 | SubstructureNotifyMask | SubstructureRedirectMask, &xev); |
1554 | } /* ecore_x_netwm_desktop_request_send */ | 1555 | } |
1555 | 1556 | ||
1556 | int | 1557 | int |
1557 | _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, | 1558 | _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, |
1558 | char *data __UNUSED__) | 1559 | char *data __UNUSED__) |
1559 | { | 1560 | { |
1560 | #if 0 | 1561 | #if 0 |
1561 | Ecore_X_Startup_Info *info; | 1562 | Ecore_X_Startup_Info *info; |
@@ -1600,11 +1601,11 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, | |||
1600 | 1601 | ||
1601 | #endif /* if 0 */ | 1602 | #endif /* if 0 */ |
1602 | return 1; | 1603 | return 1; |
1603 | } /* _ecore_x_netwm_startup_info_begin */ | 1604 | } |
1604 | 1605 | ||
1605 | int | 1606 | int |
1606 | _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, | 1607 | _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, |
1607 | char *data __UNUSED__) | 1608 | char *data __UNUSED__) |
1608 | { | 1609 | { |
1609 | #if 0 | 1610 | #if 0 |
1610 | Ecore_X_Startup_Info *info; | 1611 | Ecore_X_Startup_Info *info; |
@@ -1639,26 +1640,26 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__, | |||
1639 | 1640 | ||
1640 | #endif /* if 0 */ | 1641 | #endif /* if 0 */ |
1641 | return 1; | 1642 | return 1; |
1642 | } /* _ecore_x_netwm_startup_info */ | 1643 | } |
1643 | 1644 | ||
1644 | /* | 1645 | /* |
1645 | * Set UTF-8 string property | 1646 | * Set UTF-8 string property |
1646 | */ | 1647 | */ |
1647 | static void | 1648 | static void |
1648 | _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, | 1649 | _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, |
1649 | Ecore_X_Atom atom, | 1650 | Ecore_X_Atom atom, |
1650 | const char *str) | 1651 | const char *str) |
1651 | { | 1652 | { |
1652 | XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8, | 1653 | XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8, |
1653 | PropModeReplace, (unsigned char *)str, strlen(str)); | 1654 | PropModeReplace, (unsigned char *)str, strlen(str)); |
1654 | } /* _ecore_x_window_prop_string_utf8_set */ | 1655 | } |
1655 | 1656 | ||
1656 | /* | 1657 | /* |
1657 | * Get UTF-8 string property | 1658 | * Get UTF-8 string property |
1658 | */ | 1659 | */ |
1659 | static char * | 1660 | static char * |
1660 | _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, | 1661 | _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, |
1661 | Ecore_X_Atom atom) | 1662 | Ecore_X_Atom atom) |
1662 | { | 1663 | { |
1663 | char *str; | 1664 | char *str; |
1664 | unsigned char *prop_ret; | 1665 | unsigned char *prop_ret; |
@@ -1685,7 +1686,7 @@ _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, | |||
1685 | XFree(prop_ret); | 1686 | XFree(prop_ret); |
1686 | 1687 | ||
1687 | return str; | 1688 | return str; |
1688 | } /* _ecore_x_window_prop_string_utf8_get */ | 1689 | } |
1689 | 1690 | ||
1690 | #if 0 /* Unused */ | 1691 | #if 0 /* Unused */ |
1691 | /* | 1692 | /* |
@@ -1758,19 +1759,19 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info) | |||
1758 | else | 1759 | else |
1759 | { | 1760 | { |
1760 | /* Discard buffer */ | 1761 | /* Discard buffer */ |
1761 | info->length = 0; | 1762 | info->length = 0; |
1762 | info->buffer[0] = 0; | 1763 | info->buffer[0] = 0; |
1763 | } | 1764 | } |
1764 | 1765 | ||
1765 | return 1; | 1766 | return 1; |
1766 | } /* _ecore_x_netwm_startup_info_process */ | 1767 | } |
1767 | 1768 | ||
1768 | /* | 1769 | /* |
1769 | * Parse startup info | 1770 | * Parse startup info |
1770 | */ | 1771 | */ |
1771 | static int | 1772 | static int |
1772 | _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, | 1773 | _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, |
1773 | char *data) | 1774 | char *data) |
1774 | { | 1775 | { |
1775 | while (*data) | 1776 | while (*data) |
1776 | { | 1777 | { |
@@ -1780,7 +1781,8 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, | |||
1780 | char value[1024]; | 1781 | char value[1024]; |
1781 | 1782 | ||
1782 | /* Skip space */ | 1783 | /* Skip space */ |
1783 | while (*data == ' ') data++; | 1784 | while (*data == ' ') |
1785 | data++; | ||
1784 | /* Get key */ | 1786 | /* Get key */ |
1785 | key = data; | 1787 | key = data; |
1786 | data = strchr(key, '='); | 1788 | data = strchr(key, '='); |
@@ -1920,7 +1922,7 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, | |||
1920 | return 0; | 1922 | return 0; |
1921 | 1923 | ||
1922 | return 1; | 1924 | return 1; |
1923 | } /* _ecore_x_netwm_startup_info_parse */ | 1925 | } |
1924 | 1926 | ||
1925 | #endif /* if 0 */ | 1927 | #endif /* if 0 */ |
1926 | 1928 | ||
@@ -1958,7 +1960,7 @@ _ecore_x_netwm_startup_info_free(void *data) | |||
1958 | free(info->wmclass); | 1960 | free(info->wmclass); |
1959 | 1961 | ||
1960 | free(info); | 1962 | free(info); |
1961 | } /* _ecore_x_netwm_startup_info_free */ | 1963 | } |
1962 | 1964 | ||
1963 | /* | 1965 | /* |
1964 | * Is screen composited? | 1966 | * Is screen composited? |
@@ -1981,10 +1983,10 @@ ecore_x_screen_is_composited(int screen) | |||
1981 | win = XGetSelectionOwner(_ecore_x_disp, atom); | 1983 | win = XGetSelectionOwner(_ecore_x_disp, atom); |
1982 | 1984 | ||
1983 | return (win != None) ? EINA_TRUE : EINA_FALSE; | 1985 | return (win != None) ? EINA_TRUE : EINA_FALSE; |
1984 | } /* ecore_x_screen_is_composited */ | 1986 | } |
1985 | 1987 | ||
1986 | EAPI void | 1988 | EAPI void |
1987 | ecore_x_screen_is_composited_set(int screen, | 1989 | ecore_x_screen_is_composited_set(int screen, |
1988 | Ecore_X_Window win) | 1990 | Ecore_X_Window win) |
1989 | { | 1991 | { |
1990 | static Ecore_X_Atom atom = None; | 1992 | static Ecore_X_Atom atom = None; |
@@ -1999,5 +2001,5 @@ ecore_x_screen_is_composited_set(int screen, | |||
1999 | return; | 2001 | return; |
2000 | 2002 | ||
2001 | XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time); | 2003 | XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time); |
2002 | } /* ecore_x_screen_is_composited_set */ | 2004 | } |
2003 | 2005 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c index b81d06c..7b13615 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_pixmap.c | |||
@@ -26,9 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | EAPI Ecore_X_Pixmap | 27 | EAPI Ecore_X_Pixmap |
28 | ecore_x_pixmap_new(Ecore_X_Window win, | 28 | ecore_x_pixmap_new(Ecore_X_Window win, |
29 | int w, | 29 | int w, |
30 | int h, | 30 | int h, |
31 | int dep) | 31 | int dep) |
32 | { | 32 | { |
33 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 33 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
34 | if (win == 0) | 34 | if (win == 0) |
@@ -38,7 +38,7 @@ ecore_x_pixmap_new(Ecore_X_Window win, | |||
38 | dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)); | 38 | dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)); |
39 | 39 | ||
40 | return XCreatePixmap(_ecore_x_disp, win, w, h, dep); | 40 | return XCreatePixmap(_ecore_x_disp, win, w, h, dep); |
41 | } /* ecore_x_pixmap_new */ | 41 | } |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * Deletes the reference to the given pixmap. | 44 | * Deletes the reference to the given pixmap. |
@@ -54,7 +54,7 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap) | |||
54 | { | 54 | { |
55 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 55 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
56 | XFreePixmap(_ecore_x_disp, pmap); | 56 | XFreePixmap(_ecore_x_disp, pmap); |
57 | } /* ecore_x_pixmap_free */ | 57 | } |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Pastes a rectangular area of the given pixmap onto the given drawable. | 60 | * Pastes a rectangular area of the given pixmap onto the given drawable. |
@@ -71,19 +71,19 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap) | |||
71 | * @ingroup Ecore_X_Pixmap_Group | 71 | * @ingroup Ecore_X_Pixmap_Group |
72 | */ | 72 | */ |
73 | EAPI void | 73 | EAPI void |
74 | ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, | 74 | ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, |
75 | Ecore_X_Drawable dest, | 75 | Ecore_X_Drawable dest, |
76 | Ecore_X_GC gc, | 76 | Ecore_X_GC gc, |
77 | int sx, | 77 | int sx, |
78 | int sy, | 78 | int sy, |
79 | int w, | 79 | int w, |
80 | int h, | 80 | int h, |
81 | int dx, | 81 | int dx, |
82 | int dy) | 82 | int dy) |
83 | { | 83 | { |
84 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 84 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
85 | XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy); | 85 | XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy); |
86 | } /* ecore_x_pixmap_paste */ | 86 | } |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Retrieves the size of the given pixmap. | 89 | * Retrieves the size of the given pixmap. |
@@ -96,15 +96,15 @@ ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, | |||
96 | */ | 96 | */ |
97 | EAPI void | 97 | EAPI void |
98 | ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, | 98 | ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, |
99 | int *x, | 99 | int *x, |
100 | int *y, | 100 | int *y, |
101 | int *w, | 101 | int *w, |
102 | int *h) | 102 | int *h) |
103 | { | 103 | { |
104 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 104 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
105 | if (pmap) | 105 | if (pmap) |
106 | ecore_x_drawable_geometry_get(pmap, x, y, w, h); | 106 | ecore_x_drawable_geometry_get(pmap, x, y, w, h); |
107 | } /* ecore_x_pixmap_geometry_get */ | 107 | } |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Retrieves the depth of the given pixmap. | 110 | * Retrieves the depth of the given pixmap. |
@@ -117,5 +117,5 @@ ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap) | |||
117 | { | 117 | { |
118 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 118 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
119 | return ecore_x_drawable_depth_get(pmap); | 119 | return ecore_x_drawable_depth_get(pmap); |
120 | } /* ecore_x_pixmap_depth_get */ | 120 | } |
121 | 121 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c index a6bafb6..816f8d5 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_11.c | |||
@@ -8,6 +8,10 @@ | |||
8 | 8 | ||
9 | #include "ecore_x_private.h" | 9 | #include "ecore_x_private.h" |
10 | #include "ecore_x_randr.h" | 10 | #include "ecore_x_randr.h" |
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <string.h> | ||
11 | 15 | ||
12 | #define Ecore_X_Randr_None 0 | 16 | #define Ecore_X_Randr_None 0 |
13 | #ifdef ECORE_XRANDR | 17 | #ifdef ECORE_XRANDR |
@@ -18,7 +22,8 @@ | |||
18 | root) ((screen = \ | 22 | root) ((screen = \ |
19 | XRRRootToScreen(_ecore_x_disp, \ | 23 | XRRRootToScreen(_ecore_x_disp, \ |
20 | root)) != -1) | 24 | root)) != -1) |
21 | #define RANDR_CHECK_1_1_RET(ret) if(_randr_version < RANDR_1_1) return ret | 25 | #define RANDR_CHECK_1_1_RET(ret) if (_randr_version < RANDR_1_1) \ |
26 | return ret | ||
22 | 27 | ||
23 | extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * | 28 | extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * |
24 | dpy, | 29 | dpy, |
@@ -44,7 +49,7 @@ ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root) | |||
44 | #else /* ifdef ECORE_XRANDR */ | 49 | #else /* ifdef ECORE_XRANDR */ |
45 | return Ecore_X_Randr_None; | 50 | return Ecore_X_Randr_None; |
46 | #endif /* ifdef ECORE_XRANDR */ | 51 | #endif /* ifdef ECORE_XRANDR */ |
47 | } /* ecore_x_randr_screen_primary_output_orientations_get */ | 52 | } |
48 | 53 | ||
49 | /* | 54 | /* |
50 | * @param root window which's primary output will be queried | 55 | * @param root window which's primary output will be queried |
@@ -61,7 +66,7 @@ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root) | |||
61 | #else /* ifdef ECORE_XRANDR */ | 66 | #else /* ifdef ECORE_XRANDR */ |
62 | return Ecore_X_Randr_None; | 67 | return Ecore_X_Randr_None; |
63 | #endif /* ifdef ECORE_XRANDR */ | 68 | #endif /* ifdef ECORE_XRANDR */ |
64 | } /* ecore_x_randr_screen_primary_output_orientation_get */ | 69 | } |
65 | 70 | ||
66 | /* | 71 | /* |
67 | * @brief sets a given screen's primary output's orientation | 72 | * @brief sets a given screen's primary output's orientation |
@@ -95,7 +100,7 @@ ecore_x_randr_screen_primary_output_orientation_set( | |||
95 | #else /* ifdef ECORE_XRANDR */ | 100 | #else /* ifdef ECORE_XRANDR */ |
96 | return EINA_FALSE; | 101 | return EINA_FALSE; |
97 | #endif /* ifdef ECORE_XRANDR */ | 102 | #endif /* ifdef ECORE_XRANDR */ |
98 | } /* ecore_x_randr_screen_primary_output_orientation_set */ | 103 | } |
99 | 104 | ||
100 | /* | 105 | /* |
101 | * @brief gets a screen's primary output's possible sizes | 106 | * @brief gets a screen's primary output's possible sizes |
@@ -105,7 +110,7 @@ ecore_x_randr_screen_primary_output_orientation_set( | |||
105 | */ | 110 | */ |
106 | EAPI Ecore_X_Randr_Screen_Size_MM * | 111 | EAPI Ecore_X_Randr_Screen_Size_MM * |
107 | ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, | 112 | ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, |
108 | int *num) | 113 | int *num) |
109 | { | 114 | { |
110 | #ifdef ECORE_XRANDR | 115 | #ifdef ECORE_XRANDR |
111 | Ecore_X_Randr_Screen_Size_MM *ret = NULL; | 116 | Ecore_X_Randr_Screen_Size_MM *ret = NULL; |
@@ -135,7 +140,7 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, | |||
135 | #else /* ifdef ECORE_XRANDR */ | 140 | #else /* ifdef ECORE_XRANDR */ |
136 | return NULL; | 141 | return NULL; |
137 | #endif /* ifdef ECORE_XRANDR */ | 142 | #endif /* ifdef ECORE_XRANDR */ |
138 | } /* ecore_x_randr_screen_primary_output_sizes_get */ | 143 | } |
139 | 144 | ||
140 | /* | 145 | /* |
141 | * @brief get the current set size of a given screen's primary output | 146 | * @brief get the current set size of a given screen's primary output |
@@ -148,11 +153,11 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, | |||
148 | */ | 153 | */ |
149 | EAPI void | 154 | EAPI void |
150 | ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, | 155 | ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, |
151 | int *w, | 156 | int *w, |
152 | int *h, | 157 | int *h, |
153 | int *w_mm, | 158 | int *w_mm, |
154 | int *h_mm, | 159 | int *h_mm, |
155 | int *size_index) | 160 | int *size_index) |
156 | { | 161 | { |
157 | #ifdef ECORE_XRANDR | 162 | #ifdef ECORE_XRANDR |
158 | XRRScreenSize *sizes; | 163 | XRRScreenSize *sizes; |
@@ -192,7 +197,7 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, | |||
192 | 197 | ||
193 | XRRFreeScreenConfigInfo(sc); | 198 | XRRFreeScreenConfigInfo(sc); |
194 | #endif /* ifdef ECORE_XRANDR */ | 199 | #endif /* ifdef ECORE_XRANDR */ |
195 | } /* ecore_x_randr_screen_primary_output_current_size_get */ | 200 | } |
196 | 201 | ||
197 | /* | 202 | /* |
198 | * @brief sets a given screen's primary output size, but disables all other outputs at the same time | 203 | * @brief sets a given screen's primary output size, but disables all other outputs at the same time |
@@ -202,18 +207,16 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, | |||
202 | */ | 207 | */ |
203 | EAPI Eina_Bool | 208 | EAPI Eina_Bool |
204 | ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, | 209 | ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, |
205 | int size_index) | 210 | int size_index) |
206 | { | 211 | { |
207 | #ifdef ECORE_XRANDR | 212 | #ifdef ECORE_XRANDR |
208 | XRRScreenConfiguration *sc = NULL; | 213 | XRRScreenConfiguration *sc = NULL; |
209 | XRRScreenSize *sizes; | ||
210 | Eina_Bool ret = EINA_FALSE; | 214 | Eina_Bool ret = EINA_FALSE; |
211 | int nsizes = 0; | 215 | int nsizes = 0; |
212 | 216 | ||
213 | if (size_index >= 0 && _ecore_x_randr_root_validate(root)) | 217 | if (size_index >= 0 && _ecore_x_randr_root_validate(root)) |
214 | { | 218 | { |
215 | sizes = | 219 | XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, |
216 | XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp, | ||
217 | root), &nsizes); | 220 | root), &nsizes); |
218 | 221 | ||
219 | if (size_index < nsizes) | 222 | if (size_index < nsizes) |
@@ -235,7 +238,7 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, | |||
235 | #else /* ifdef ECORE_XRANDR */ | 238 | #else /* ifdef ECORE_XRANDR */ |
236 | return EINA_FALSE; | 239 | return EINA_FALSE; |
237 | #endif /* ifdef ECORE_XRANDR */ | 240 | #endif /* ifdef ECORE_XRANDR */ |
238 | } /* ecore_x_randr_screen_primary_output_size_set */ | 241 | } |
239 | 242 | ||
240 | /* | 243 | /* |
241 | * @param root window which's primary output will be queried | 244 | * @param root window which's primary output will be queried |
@@ -261,7 +264,7 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get( | |||
261 | #else /* ifdef ECORE_XRANDR */ | 264 | #else /* ifdef ECORE_XRANDR */ |
262 | return 0.0; | 265 | return 0.0; |
263 | #endif /* ifdef ECORE_XRANDR */ | 266 | #endif /* ifdef ECORE_XRANDR */ |
264 | } /* ecore_x_randr_screen_primary_output_current_refresh_rate_get */ | 267 | } |
265 | 268 | ||
266 | /* | 269 | /* |
267 | * @param root window which's primary output will be queried | 270 | * @param root window which's primary output will be queried |
@@ -270,8 +273,8 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get( | |||
270 | */ | 273 | */ |
271 | EAPI Ecore_X_Randr_Refresh_Rate * | 274 | EAPI Ecore_X_Randr_Refresh_Rate * |
272 | ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, | 275 | ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, |
273 | int size_index, | 276 | int size_index, |
274 | int *num) | 277 | int *num) |
275 | { | 278 | { |
276 | #ifdef ECORE_XRANDR | 279 | #ifdef ECORE_XRANDR |
277 | Ecore_X_Randr_Refresh_Rate *ret = NULL, *rates = NULL; | 280 | Ecore_X_Randr_Refresh_Rate *ret = NULL, *rates = NULL; |
@@ -293,7 +296,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, | |||
293 | #else /* ifdef ECORE_XRANDR */ | 296 | #else /* ifdef ECORE_XRANDR */ |
294 | return NULL; | 297 | return NULL; |
295 | #endif /* ifdef ECORE_XRANDR */ | 298 | #endif /* ifdef ECORE_XRANDR */ |
296 | } /* ecore_x_randr_screen_primary_output_refresh_rates_get */ | 299 | } |
297 | 300 | ||
298 | //>= 1.1 | 301 | //>= 1.1 |
299 | /* | 302 | /* |
@@ -306,7 +309,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, | |||
306 | EAPI Eina_Bool | 309 | EAPI Eina_Bool |
307 | ecore_x_randr_screen_primary_output_refresh_rate_set( | 310 | ecore_x_randr_screen_primary_output_refresh_rate_set( |
308 | Ecore_X_Window root, | 311 | Ecore_X_Window root, |
309 | int size_index, | 312 | int size_index, |
310 | Ecore_X_Randr_Refresh_Rate | 313 | Ecore_X_Randr_Refresh_Rate |
311 | rate) | 314 | rate) |
312 | { | 315 | { |
@@ -328,5 +331,5 @@ ecore_x_randr_screen_primary_output_refresh_rate_set( | |||
328 | #else /* ifdef ECORE_XRANDR */ | 331 | #else /* ifdef ECORE_XRANDR */ |
329 | return EINA_FALSE; | 332 | return EINA_FALSE; |
330 | #endif /* ifdef ECORE_XRANDR */ | 333 | #endif /* ifdef ECORE_XRANDR */ |
331 | } /* ecore_x_randr_screen_primary_output_refresh_rate_set */ | 334 | } |
332 | 335 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c index fb607d1..38218a5 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c | |||
@@ -8,6 +8,10 @@ | |||
8 | 8 | ||
9 | #include "ecore_x_private.h" | 9 | #include "ecore_x_private.h" |
10 | #include "ecore_x_randr.h" | 10 | #include "ecore_x_randr.h" |
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <string.h> | ||
11 | 15 | ||
12 | #define Ecore_X_Randr_None (Ecore_X_Randr_Crtc)0 | 16 | #define Ecore_X_Randr_None (Ecore_X_Randr_Crtc)0 |
13 | #define Ecore_X_Randr_Unset (Ecore_X_Randr_Crtc) - 1 | 17 | #define Ecore_X_Randr_Unset (Ecore_X_Randr_Crtc) - 1 |
@@ -19,7 +23,8 @@ | |||
19 | #define RANDR_VALIDATE_ROOT(screen, root) \ | 23 | #define RANDR_VALIDATE_ROOT(screen, root) \ |
20 | ((screen = XRRRootToScreen(_ecore_x_disp, root)) != -1) | 24 | ((screen = XRRRootToScreen(_ecore_x_disp, root)) != -1) |
21 | 25 | ||
22 | #define RANDR_CHECK_1_2_RET(ret) if(_randr_version < RANDR_1_2) return ret | 26 | #define RANDR_CHECK_1_2_RET(ret) if (_randr_version < RANDR_1_2) \ |
27 | return ret | ||
23 | 28 | ||
24 | #define RANDR_PROPERTY_EDID "EDID" | 29 | #define RANDR_PROPERTY_EDID "EDID" |
25 | #define RANDR_PROPERTY_BACKLIGHT "Backlight" | 30 | #define RANDR_PROPERTY_BACKLIGHT "Backlight" |
@@ -45,7 +50,7 @@ extern int _randr_version; | |||
45 | */ | 50 | */ |
46 | EAPI void | 51 | EAPI void |
47 | ecore_x_randr_events_select(Ecore_X_Window win, | 52 | ecore_x_randr_events_select(Ecore_X_Window win, |
48 | Eina_Bool on) | 53 | Eina_Bool on) |
49 | { | 54 | { |
50 | #ifdef ECORE_XRANDR | 55 | #ifdef ECORE_XRANDR |
51 | int mask; | 56 | int mask; |
@@ -73,7 +78,7 @@ ecore_x_randr_events_select(Ecore_X_Window win, | |||
73 | * @return in case it is found EINA_TRUE will be returned. Else EINA_FALSE is returned. | 78 | * @return in case it is found EINA_TRUE will be returned. Else EINA_FALSE is returned. |
74 | */ | 79 | */ |
75 | static inline Eina_Bool | 80 | static inline Eina_Bool |
76 | _ecore_x_randr_crtc_validate(Ecore_X_Window root, | 81 | _ecore_x_randr_crtc_validate(Ecore_X_Window root, |
77 | Ecore_X_Randr_Crtc crtc) | 82 | Ecore_X_Randr_Crtc crtc) |
78 | { | 83 | { |
79 | #ifdef ECORE_XRANDR | 84 | #ifdef ECORE_XRANDR |
@@ -108,7 +113,7 @@ _ecore_x_randr_crtc_validate(Ecore_X_Window root, | |||
108 | } | 113 | } |
109 | 114 | ||
110 | Eina_Bool | 115 | Eina_Bool |
111 | _ecore_x_randr_output_validate(Ecore_X_Window root, | 116 | _ecore_x_randr_output_validate(Ecore_X_Window root, |
112 | Ecore_X_Randr_Output output) | 117 | Ecore_X_Randr_Output output) |
113 | { | 118 | { |
114 | #ifdef ECORE_XRANDR | 119 | #ifdef ECORE_XRANDR |
@@ -139,7 +144,7 @@ _ecore_x_randr_output_validate(Ecore_X_Window root, | |||
139 | } | 144 | } |
140 | 145 | ||
141 | static inline Eina_Bool | 146 | static inline Eina_Bool |
142 | _ecore_x_randr_mode_validate(Ecore_X_Window root, | 147 | _ecore_x_randr_mode_validate(Ecore_X_Window root, |
143 | Ecore_X_Randr_Mode mode) | 148 | Ecore_X_Randr_Mode mode) |
144 | { | 149 | { |
145 | #ifdef ECORE_XRANDR | 150 | #ifdef ECORE_XRANDR |
@@ -175,10 +180,10 @@ _ecore_x_randr_mode_validate(Ecore_X_Window root, | |||
175 | */ | 180 | */ |
176 | EAPI void | 181 | EAPI void |
177 | ecore_x_randr_screen_current_size_get(Ecore_X_Window root, | 182 | ecore_x_randr_screen_current_size_get(Ecore_X_Window root, |
178 | int *w, | 183 | int *w, |
179 | int *h, | 184 | int *h, |
180 | int *w_mm, | 185 | int *w_mm, |
181 | int *h_mm) | 186 | int *h_mm) |
182 | { | 187 | { |
183 | #ifdef ECORE_XRANDR | 188 | #ifdef ECORE_XRANDR |
184 | RANDR_CHECK_1_2_RET(); | 189 | RANDR_CHECK_1_2_RET(); |
@@ -211,10 +216,10 @@ ecore_x_randr_screen_current_size_get(Ecore_X_Window root, | |||
211 | */ | 216 | */ |
212 | EAPI void | 217 | EAPI void |
213 | ecore_x_randr_screen_size_range_get(Ecore_X_Window root, | 218 | ecore_x_randr_screen_size_range_get(Ecore_X_Window root, |
214 | int *wmin, | 219 | int *wmin, |
215 | int *hmin, | 220 | int *hmin, |
216 | int *wmax, | 221 | int *wmax, |
217 | int *hmax) | 222 | int *hmax) |
218 | { | 223 | { |
219 | #ifdef ECORE_XRANDR | 224 | #ifdef ECORE_XRANDR |
220 | RANDR_CHECK_1_2_RET(); | 225 | RANDR_CHECK_1_2_RET(); |
@@ -249,10 +254,10 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root, | |||
249 | */ | 254 | */ |
250 | EAPI Eina_Bool | 255 | EAPI Eina_Bool |
251 | ecore_x_randr_screen_current_size_set(Ecore_X_Window root, | 256 | ecore_x_randr_screen_current_size_set(Ecore_X_Window root, |
252 | int w, | 257 | int w, |
253 | int h, | 258 | int h, |
254 | int w_mm, | 259 | int w_mm, |
255 | int h_mm) | 260 | int h_mm) |
256 | { | 261 | { |
257 | #ifdef ECORE_XRANDR | 262 | #ifdef ECORE_XRANDR |
258 | RANDR_CHECK_1_2_RET(EINA_FALSE); | 263 | RANDR_CHECK_1_2_RET(EINA_FALSE); |
@@ -281,14 +286,14 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, | |||
281 | if (h <= 0) | 286 | if (h <= 0) |
282 | h = DisplayHeight(_ecore_x_disp, scr); | 287 | h = DisplayHeight(_ecore_x_disp, scr); |
283 | 288 | ||
284 | if(w_mm <= 0) | 289 | if (w_mm <= 0) |
285 | w_mm = | 290 | w_mm = |
286 | (int)(((double)(DisplayWidthMM(_ecore_x_disp, | 291 | (int)(((double)(DisplayWidthMM(_ecore_x_disp, |
287 | scr) / | 292 | scr) / |
288 | (double)DisplayWidth(_ecore_x_disp, | 293 | (double)DisplayWidth(_ecore_x_disp, |
289 | scr))) * (double)w); | 294 | scr))) * (double)w); |
290 | 295 | ||
291 | if(h_mm <= 0) | 296 | if (h_mm <= 0) |
292 | h_mm = | 297 | h_mm = |
293 | (int)(((double)(DisplayHeightMM(_ecore_x_disp, | 298 | (int)(((double)(DisplayHeightMM(_ecore_x_disp, |
294 | scr) / | 299 | scr) / |
@@ -310,7 +315,7 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, | |||
310 | */ | 315 | */ |
311 | EAPI Ecore_X_Randr_Mode_Info ** | 316 | EAPI Ecore_X_Randr_Mode_Info ** |
312 | ecore_x_randr_modes_info_get(Ecore_X_Window root, | 317 | ecore_x_randr_modes_info_get(Ecore_X_Window root, |
313 | int *num) | 318 | int *num) |
314 | { | 319 | { |
315 | #ifdef ECORE_XRANDR | 320 | #ifdef ECORE_XRANDR |
316 | RANDR_CHECK_1_2_RET(NULL); | 321 | RANDR_CHECK_1_2_RET(NULL); |
@@ -353,7 +358,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, | |||
353 | } | 358 | } |
354 | else | 359 | else |
355 | { | 360 | { |
356 | while(i > 0) | 361 | while (i > 0) |
357 | free(ret[--i]); | 362 | free(ret[--i]); |
358 | free(ret); | 363 | free(ret); |
359 | ret = NULL; | 364 | ret = NULL; |
@@ -381,7 +386,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, | |||
381 | * @return mode's detailed information | 386 | * @return mode's detailed information |
382 | */ | 387 | */ |
383 | EAPI Ecore_X_Randr_Mode_Info * | 388 | EAPI Ecore_X_Randr_Mode_Info * |
384 | ecore_x_randr_mode_info_get(Ecore_X_Window root, | 389 | ecore_x_randr_mode_info_get(Ecore_X_Window root, |
385 | Ecore_X_Randr_Mode mode) | 390 | Ecore_X_Randr_Mode mode) |
386 | { | 391 | { |
387 | #ifdef ECORE_XRANDR | 392 | #ifdef ECORE_XRANDR |
@@ -461,7 +466,7 @@ ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info) | |||
461 | */ | 466 | */ |
462 | EAPI Ecore_X_Randr_Crtc * | 467 | EAPI Ecore_X_Randr_Crtc * |
463 | ecore_x_randr_crtcs_get(Ecore_X_Window root, | 468 | ecore_x_randr_crtcs_get(Ecore_X_Window root, |
464 | int *num) | 469 | int *num) |
465 | { | 470 | { |
466 | #ifdef ECORE_XRANDR | 471 | #ifdef ECORE_XRANDR |
467 | RANDR_CHECK_1_2_RET(NULL); | 472 | RANDR_CHECK_1_2_RET(NULL); |
@@ -488,7 +493,7 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, | |||
488 | 493 | ||
489 | EAPI Ecore_X_Randr_Output * | 494 | EAPI Ecore_X_Randr_Output * |
490 | ecore_x_randr_outputs_get(Ecore_X_Window root, | 495 | ecore_x_randr_outputs_get(Ecore_X_Window root, |
491 | int *num) | 496 | int *num) |
492 | { | 497 | { |
493 | #ifdef ECORE_XRANDR | 498 | #ifdef ECORE_XRANDR |
494 | RANDR_CHECK_1_2_RET(NULL); | 499 | RANDR_CHECK_1_2_RET(NULL); |
@@ -523,9 +528,9 @@ ecore_x_randr_outputs_get(Ecore_X_Window root, | |||
523 | * @param num number of outputs referenced by given CRTC | 528 | * @param num number of outputs referenced by given CRTC |
524 | */ | 529 | */ |
525 | EAPI Ecore_X_Randr_Output * | 530 | EAPI Ecore_X_Randr_Output * |
526 | ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, | 531 | ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, |
527 | Ecore_X_Randr_Crtc crtc, | 532 | Ecore_X_Randr_Crtc crtc, |
528 | int *num) | 533 | int *num) |
529 | { | 534 | { |
530 | #ifdef ECORE_XRANDR | 535 | #ifdef ECORE_XRANDR |
531 | RANDR_CHECK_1_2_RET(NULL); | 536 | RANDR_CHECK_1_2_RET(NULL); |
@@ -567,9 +572,9 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, | |||
567 | * @param num number of possible outputs referenced by given CRTC | 572 | * @param num number of possible outputs referenced by given CRTC |
568 | */ | 573 | */ |
569 | EAPI Ecore_X_Randr_Output * | 574 | EAPI Ecore_X_Randr_Output * |
570 | ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, | 575 | ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, |
571 | Ecore_X_Randr_Crtc crtc, | 576 | Ecore_X_Randr_Crtc crtc, |
572 | int *num) | 577 | int *num) |
573 | { | 578 | { |
574 | #ifdef ECORE_XRANDR | 579 | #ifdef ECORE_XRANDR |
575 | RANDR_CHECK_1_2_RET(NULL); | 580 | RANDR_CHECK_1_2_RET(NULL); |
@@ -581,7 +586,7 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, | |||
581 | crtc) && | 586 | crtc) && |
582 | (res = _ecore_x_randr_get_screen_resources (_ecore_x_disp, root))) | 587 | (res = _ecore_x_randr_get_screen_resources (_ecore_x_disp, root))) |
583 | { | 588 | { |
584 | if((crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc))) | 589 | if ((crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc))) |
585 | { | 590 | { |
586 | if ((ret = | 591 | if ((ret = |
587 | malloc(sizeof(Ecore_X_Randr_Output) * crtc_info->npossible))) | 592 | malloc(sizeof(Ecore_X_Randr_Output) * crtc_info->npossible))) |
@@ -605,12 +610,12 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, | |||
605 | } | 610 | } |
606 | 611 | ||
607 | EAPI void | 612 | EAPI void |
608 | ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, | 613 | ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, |
609 | Ecore_X_Randr_Crtc crtc, | 614 | Ecore_X_Randr_Crtc crtc, |
610 | int *x, | 615 | int *x, |
611 | int *y, | 616 | int *y, |
612 | int *w, | 617 | int *w, |
613 | int *h) | 618 | int *h) |
614 | { | 619 | { |
615 | #ifdef ECORE_XRANDR | 620 | #ifdef ECORE_XRANDR |
616 | RANDR_CHECK_1_2_RET(); | 621 | RANDR_CHECK_1_2_RET(); |
@@ -652,10 +657,10 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, | |||
652 | * @return EINA_TRUE if position could be successfully be altered. | 657 | * @return EINA_TRUE if position could be successfully be altered. |
653 | */ | 658 | */ |
654 | EAPI Eina_Bool | 659 | EAPI Eina_Bool |
655 | ecore_x_randr_crtc_pos_set(Ecore_X_Window root, | 660 | ecore_x_randr_crtc_pos_set(Ecore_X_Window root, |
656 | Ecore_X_Randr_Crtc crtc, | 661 | Ecore_X_Randr_Crtc crtc, |
657 | int x, | 662 | int x, |
658 | int y) | 663 | int y) |
659 | { | 664 | { |
660 | #ifdef ECORE_XRANDR | 665 | #ifdef ECORE_XRANDR |
661 | RANDR_CHECK_1_2_RET(EINA_FALSE); | 666 | RANDR_CHECK_1_2_RET(EINA_FALSE); |
@@ -706,7 +711,7 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root, | |||
706 | * Ecore_X_Randr_Unset | 711 | * Ecore_X_Randr_Unset |
707 | */ | 712 | */ |
708 | EAPI Ecore_X_Randr_Mode | 713 | EAPI Ecore_X_Randr_Mode |
709 | ecore_x_randr_crtc_mode_get(Ecore_X_Window root, | 714 | ecore_x_randr_crtc_mode_get(Ecore_X_Window root, |
710 | Ecore_X_Randr_Crtc crtc) | 715 | Ecore_X_Randr_Crtc crtc) |
711 | { | 716 | { |
712 | #ifdef ECORE_XRANDR | 717 | #ifdef ECORE_XRANDR |
@@ -746,11 +751,11 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root, | |||
746 | * @return EINA_TRUE if mode setting was successful. Else EINA_FALSE | 751 | * @return EINA_TRUE if mode setting was successful. Else EINA_FALSE |
747 | */ | 752 | */ |
748 | EAPI Eina_Bool | 753 | EAPI Eina_Bool |
749 | ecore_x_randr_crtc_mode_set(Ecore_X_Window root, | 754 | ecore_x_randr_crtc_mode_set(Ecore_X_Window root, |
750 | Ecore_X_Randr_Crtc crtc, | 755 | Ecore_X_Randr_Crtc crtc, |
751 | Ecore_X_Randr_Output *outputs, | 756 | Ecore_X_Randr_Output *outputs, |
752 | int noutputs, | 757 | int noutputs, |
753 | Ecore_X_Randr_Mode mode) | 758 | Ecore_X_Randr_Mode mode) |
754 | { | 759 | { |
755 | #ifdef ECORE_XRANDR | 760 | #ifdef ECORE_XRANDR |
756 | RANDR_CHECK_1_2_RET(EINA_FALSE); | 761 | RANDR_CHECK_1_2_RET(EINA_FALSE); |
@@ -772,10 +777,10 @@ ecore_x_randr_crtc_mode_set(Ecore_X_Window root, | |||
772 | } | 777 | } |
773 | 778 | ||
774 | EAPI void | 779 | EAPI void |
775 | ecore_x_randr_crtc_size_get(Ecore_X_Window root, | 780 | ecore_x_randr_crtc_size_get(Ecore_X_Window root, |
776 | Ecore_X_Randr_Crtc crtc, | 781 | Ecore_X_Randr_Crtc crtc, |
777 | int *w, | 782 | int *w, |
778 | int *h) | 783 | int *h) |
779 | { | 784 | { |
780 | #ifdef ECORE_XRANDR | 785 | #ifdef ECORE_XRANDR |
781 | RANDR_CHECK_1_2_RET(); | 786 | RANDR_CHECK_1_2_RET(); |
@@ -784,7 +789,7 @@ ecore_x_randr_crtc_size_get(Ecore_X_Window root, | |||
784 | } | 789 | } |
785 | 790 | ||
786 | EAPI Ecore_X_Randr_Refresh_Rate | 791 | EAPI Ecore_X_Randr_Refresh_Rate |
787 | ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, | 792 | ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, |
788 | Ecore_X_Randr_Crtc crtc, | 793 | Ecore_X_Randr_Crtc crtc, |
789 | Ecore_X_Randr_Mode mode) | 794 | Ecore_X_Randr_Mode mode) |
790 | { | 795 | { |
@@ -824,7 +829,7 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, | |||
824 | } | 829 | } |
825 | 830 | ||
826 | EAPI Ecore_X_Randr_Orientation | 831 | EAPI Ecore_X_Randr_Orientation |
827 | ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, | 832 | ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, |
828 | Ecore_X_Randr_Crtc crtc) | 833 | Ecore_X_Randr_Crtc crtc) |
829 | { | 834 | { |
830 | #ifdef ECORE_XRANDR | 835 | #ifdef ECORE_XRANDR |
@@ -855,7 +860,7 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, | |||
855 | } | 860 | } |
856 | 861 | ||
857 | EAPI Ecore_X_Randr_Orientation | 862 | EAPI Ecore_X_Randr_Orientation |
858 | ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, | 863 | ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, |
859 | Ecore_X_Randr_Crtc crtc) | 864 | Ecore_X_Randr_Crtc crtc) |
860 | { | 865 | { |
861 | #ifdef ECORE_XRANDR | 866 | #ifdef ECORE_XRANDR |
@@ -886,8 +891,8 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, | |||
886 | } | 891 | } |
887 | 892 | ||
888 | EAPI Eina_Bool | 893 | EAPI Eina_Bool |
889 | ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, | 894 | ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, |
890 | Ecore_X_Randr_Crtc crtc, | 895 | Ecore_X_Randr_Crtc crtc, |
891 | Ecore_X_Randr_Orientation orientation) | 896 | Ecore_X_Randr_Orientation orientation) |
892 | { | 897 | { |
893 | #ifdef ECORE_XRANDR | 898 | #ifdef ECORE_XRANDR |
@@ -913,10 +918,10 @@ ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, | |||
913 | } | 918 | } |
914 | 919 | ||
915 | EAPI void | 920 | EAPI void |
916 | ecore_x_randr_crtc_pos_get(Ecore_X_Window root, | 921 | ecore_x_randr_crtc_pos_get(Ecore_X_Window root, |
917 | Ecore_X_Randr_Crtc crtc, | 922 | Ecore_X_Randr_Crtc crtc, |
918 | int *x, | 923 | int *x, |
919 | int *y) | 924 | int *y) |
920 | { | 925 | { |
921 | #ifdef ECORE_XRANDR | 926 | #ifdef ECORE_XRANDR |
922 | RANDR_CHECK_1_2_RET(); | 927 | RANDR_CHECK_1_2_RET(); |
@@ -926,7 +931,7 @@ ecore_x_randr_crtc_pos_get(Ecore_X_Window root, | |||
926 | } | 931 | } |
927 | 932 | ||
928 | EAPI Eina_Bool | 933 | EAPI Eina_Bool |
929 | ecore_x_randr_crtc_clone_set(Ecore_X_Window root, | 934 | ecore_x_randr_crtc_clone_set(Ecore_X_Window root, |
930 | Ecore_X_Randr_Crtc original, | 935 | Ecore_X_Randr_Crtc original, |
931 | Ecore_X_Randr_Crtc clon) | 936 | Ecore_X_Randr_Crtc clon) |
932 | { | 937 | { |
@@ -993,13 +998,13 @@ ecore_x_randr_crtc_clone_set(Ecore_X_Window root, | |||
993 | * EINA_FALSE | 998 | * EINA_FALSE |
994 | */ | 999 | */ |
995 | EAPI Eina_Bool | 1000 | EAPI Eina_Bool |
996 | ecore_x_randr_crtc_settings_set(Ecore_X_Window root, | 1001 | ecore_x_randr_crtc_settings_set(Ecore_X_Window root, |
997 | Ecore_X_Randr_Crtc crtc, | 1002 | Ecore_X_Randr_Crtc crtc, |
998 | Ecore_X_Randr_Output *outputs, | 1003 | Ecore_X_Randr_Output *outputs, |
999 | int noutputs, | 1004 | int noutputs, |
1000 | int x, | 1005 | int x, |
1001 | int y, | 1006 | int y, |
1002 | Ecore_X_Randr_Mode mode, | 1007 | Ecore_X_Randr_Mode mode, |
1003 | Ecore_X_Randr_Orientation orientation) | 1008 | Ecore_X_Randr_Orientation orientation) |
1004 | { | 1009 | { |
1005 | #ifdef ECORE_XRANDR | 1010 | #ifdef ECORE_XRANDR |
@@ -1059,17 +1064,17 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root, | |||
1059 | * @brief sets a CRTC relative to another one. | 1064 | * @brief sets a CRTC relative to another one. |
1060 | * @param crtc_r1 the CRTC to be positioned. | 1065 | * @param crtc_r1 the CRTC to be positioned. |
1061 | * @param crtc_r2 the CRTC the position should be relative to | 1066 | * @param crtc_r2 the CRTC the position should be relative to |
1062 | * @param position the relation between the crtcs | 1067 | * @param policy the relation between the crtcs |
1063 | * @param alignment in case CRTCs size differ, aligns CRTC1 accordingly at CRTC2's | 1068 | * @param alignment in case CRTCs size differ, aligns CRTC1 accordingly at CRTC2's |
1064 | * borders | 1069 | * borders |
1065 | * @return EINA_TRUE if crtc could be successfully positioned. EINA_FALSE if | 1070 | * @return EINA_TRUE if crtc could be successfully positioned. EINA_FALSE if |
1066 | * repositioning failed or if position of new crtc would be out of given screen's min/max bounds. | 1071 | * repositioning failed or if position of new crtc would be out of given screen's min/max bounds. |
1067 | */ | 1072 | */ |
1068 | EAPI Eina_Bool | 1073 | EAPI Eina_Bool |
1069 | ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, | 1074 | ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, |
1070 | Ecore_X_Randr_Crtc crtc_r1, | 1075 | Ecore_X_Randr_Crtc crtc_r1, |
1071 | Ecore_X_Randr_Crtc crtc_r2, | 1076 | Ecore_X_Randr_Crtc crtc_r2, |
1072 | Ecore_X_Randr_Output_Policy policy, | 1077 | Ecore_X_Randr_Output_Policy policy, |
1073 | Ecore_X_Randr_Relative_Alignment alignment) | 1078 | Ecore_X_Randr_Relative_Alignment alignment) |
1074 | { | 1079 | { |
1075 | #ifdef ECORE_XRANDR | 1080 | #ifdef ECORE_XRANDR |
@@ -1360,10 +1365,10 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, | |||
1360 | } | 1365 | } |
1361 | 1366 | ||
1362 | EAPI Ecore_X_Randr_Mode * | 1367 | EAPI Ecore_X_Randr_Mode * |
1363 | ecore_x_randr_output_modes_get(Ecore_X_Window root, | 1368 | ecore_x_randr_output_modes_get(Ecore_X_Window root, |
1364 | Ecore_X_Randr_Output output, | 1369 | Ecore_X_Randr_Output output, |
1365 | int *num, | 1370 | int *num, |
1366 | int *npreferred) | 1371 | int *npreferred) |
1367 | { | 1372 | { |
1368 | #ifdef ECORE_XRANDR | 1373 | #ifdef ECORE_XRANDR |
1369 | RANDR_CHECK_1_2_RET(NULL); | 1374 | RANDR_CHECK_1_2_RET(NULL); |
@@ -1401,9 +1406,9 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root, | |||
1401 | } | 1406 | } |
1402 | 1407 | ||
1403 | EAPI Ecore_X_Randr_Crtc * | 1408 | EAPI Ecore_X_Randr_Crtc * |
1404 | ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, | 1409 | ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, |
1405 | Ecore_X_Randr_Output output, | 1410 | Ecore_X_Randr_Output output, |
1406 | int *num) | 1411 | int *num) |
1407 | { | 1412 | { |
1408 | #ifdef ECORE_XRANDR | 1413 | #ifdef ECORE_XRANDR |
1409 | RANDR_CHECK_1_2_RET(NULL); | 1414 | RANDR_CHECK_1_2_RET(NULL); |
@@ -1441,9 +1446,9 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, | |||
1441 | * @param num number of possible clones | 1446 | * @param num number of possible clones |
1442 | */ | 1447 | */ |
1443 | EAPI Ecore_X_Randr_Output * | 1448 | EAPI Ecore_X_Randr_Output * |
1444 | ecore_x_randr_output_clones_get(Ecore_X_Window root, | 1449 | ecore_x_randr_output_clones_get(Ecore_X_Window root, |
1445 | Ecore_X_Randr_Output output, | 1450 | Ecore_X_Randr_Output output, |
1446 | int *num) | 1451 | int *num) |
1447 | { | 1452 | { |
1448 | #ifdef ECORE_XRANDR | 1453 | #ifdef ECORE_XRANDR |
1449 | RANDR_CHECK_1_2_RET(NULL); | 1454 | RANDR_CHECK_1_2_RET(NULL); |
@@ -1474,7 +1479,7 @@ ecore_x_randr_output_clones_get(Ecore_X_Window root, | |||
1474 | } | 1479 | } |
1475 | 1480 | ||
1476 | EAPI Ecore_X_Randr_Crtc | 1481 | EAPI Ecore_X_Randr_Crtc |
1477 | ecore_x_randr_output_crtc_get(Ecore_X_Window root, | 1482 | ecore_x_randr_output_crtc_get(Ecore_X_Window root, |
1478 | Ecore_X_Randr_Output output) | 1483 | Ecore_X_Randr_Output output) |
1479 | { | 1484 | { |
1480 | #ifdef ECORE_XRANDR | 1485 | #ifdef ECORE_XRANDR |
@@ -1509,9 +1514,9 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, | |||
1509 | * @return name of the output as reported by X | 1514 | * @return name of the output as reported by X |
1510 | */ | 1515 | */ |
1511 | EAPI char * | 1516 | EAPI char * |
1512 | ecore_x_randr_output_name_get(Ecore_X_Window root, | 1517 | ecore_x_randr_output_name_get(Ecore_X_Window root, |
1513 | Ecore_X_Randr_Output output, | 1518 | Ecore_X_Randr_Output output, |
1514 | int *len) | 1519 | int *len) |
1515 | { | 1520 | { |
1516 | #ifdef ECORE_XRANDR | 1521 | #ifdef ECORE_XRANDR |
1517 | RANDR_CHECK_1_2_RET(NULL); | 1522 | RANDR_CHECK_1_2_RET(NULL); |
@@ -1532,10 +1537,10 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, | |||
1532 | * *len = output_info->nameLen; | 1537 | * *len = output_info->nameLen; |
1533 | * | 1538 | * |
1534 | */ | 1539 | */ |
1535 | if ((ret = strdup(output_info->name)) && len) | 1540 | if ((ret = strdup(output_info->name)) && len) |
1536 | *len = strlen(ret); | 1541 | *len = strlen(ret); |
1537 | 1542 | ||
1538 | XRRFreeOutputInfo(output_info); | 1543 | XRRFreeOutputInfo(output_info); |
1539 | } | 1544 | } |
1540 | 1545 | ||
1541 | if (res) | 1546 | if (res) |
@@ -1554,10 +1559,10 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, | |||
1554 | * @param h height of given mode in px | 1559 | * @param h height of given mode in px |
1555 | */ | 1560 | */ |
1556 | EAPI void | 1561 | EAPI void |
1557 | ecore_x_randr_mode_size_get(Ecore_X_Window root, | 1562 | ecore_x_randr_mode_size_get(Ecore_X_Window root, |
1558 | Ecore_X_Randr_Mode mode, | 1563 | Ecore_X_Randr_Mode mode, |
1559 | int *w, | 1564 | int *w, |
1560 | int *h) | 1565 | int *h) |
1561 | { | 1566 | { |
1562 | #ifdef ECORE_XRANDR | 1567 | #ifdef ECORE_XRANDR |
1563 | RANDR_CHECK_1_2_RET(); | 1568 | RANDR_CHECK_1_2_RET(); |
@@ -1598,9 +1603,9 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root, | |||
1598 | * @param length length of the byte-array. If NULL, request will fail. | 1603 | * @param length length of the byte-array. If NULL, request will fail. |
1599 | */ | 1604 | */ |
1600 | EAPI unsigned char * | 1605 | EAPI unsigned char * |
1601 | ecore_x_randr_output_edid_get(Ecore_X_Window root, | 1606 | ecore_x_randr_output_edid_get(Ecore_X_Window root, |
1602 | Ecore_X_Randr_Output output, | 1607 | Ecore_X_Randr_Output output, |
1603 | unsigned long *length) | 1608 | unsigned long *length) |
1604 | { | 1609 | { |
1605 | #ifdef ECORE_XRANDR | 1610 | #ifdef ECORE_XRANDR |
1606 | RANDR_CHECK_1_2_RET(NULL); | 1611 | RANDR_CHECK_1_2_RET(NULL); |
@@ -1613,18 +1618,18 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root, | |||
1613 | if (!length || !_ecore_x_randr_output_validate(root, output)) | 1618 | if (!length || !_ecore_x_randr_output_validate(root, output)) |
1614 | return NULL; | 1619 | return NULL; |
1615 | 1620 | ||
1616 | if(XRRGetOutputProperty (_ecore_x_disp, output, name, | 1621 | if (XRRGetOutputProperty (_ecore_x_disp, output, name, |
1617 | 0, 100, False, False, | 1622 | 0, 100, False, False, |
1618 | AnyPropertyType, | 1623 | AnyPropertyType, |
1619 | &actual_type, &actual_format, | 1624 | &actual_type, &actual_format, |
1620 | &nitems, &bytes_after, &prop_data) == Success) | 1625 | &nitems, &bytes_after, &prop_data) == Success) |
1621 | { | 1626 | { |
1622 | if (actual_type == XA_INTEGER && actual_format == 8) | 1627 | if (actual_type == XA_INTEGER && actual_format == 8) |
1623 | { | 1628 | { |
1624 | if ((ret = malloc(nitems * sizeof(unsigned char)))) | 1629 | if ((ret = malloc(nitems * sizeof(unsigned char)))) |
1625 | { | 1630 | { |
1626 | if(length && | 1631 | if (length && |
1627 | (memcpy(ret, prop_data, (nitems * sizeof(unsigned char))))) | 1632 | (memcpy(ret, prop_data, (nitems * sizeof(unsigned char))))) |
1628 | *length = nitems; | 1633 | *length = nitems; |
1629 | 1634 | ||
1630 | return ret; | 1635 | return ret; |
@@ -1639,7 +1644,7 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root, | |||
1639 | } | 1644 | } |
1640 | 1645 | ||
1641 | EAPI Ecore_X_Randr_Connection_Status | 1646 | EAPI Ecore_X_Randr_Connection_Status |
1642 | ecore_x_randr_output_connection_status_get(Ecore_X_Window root, | 1647 | ecore_x_randr_output_connection_status_get(Ecore_X_Window root, |
1643 | Ecore_X_Randr_Output output) | 1648 | Ecore_X_Randr_Output output) |
1644 | { | 1649 | { |
1645 | #ifdef ECORE_XRANDR | 1650 | #ifdef ECORE_XRANDR |
@@ -1669,10 +1674,10 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root, | |||
1669 | } | 1674 | } |
1670 | 1675 | ||
1671 | EAPI void | 1676 | EAPI void |
1672 | ecore_x_randr_output_size_mm_get(Ecore_X_Window root, | 1677 | ecore_x_randr_output_size_mm_get(Ecore_X_Window root, |
1673 | Ecore_X_Randr_Output output, | 1678 | Ecore_X_Randr_Output output, |
1674 | int *w_mm, | 1679 | int *w_mm, |
1675 | int *h_mm) | 1680 | int *h_mm) |
1676 | { | 1681 | { |
1677 | #ifdef ECORE_XRANDR | 1682 | #ifdef ECORE_XRANDR |
1678 | RANDR_CHECK_1_2_RET(); | 1683 | RANDR_CHECK_1_2_RET(); |
@@ -1701,11 +1706,11 @@ ecore_x_randr_output_size_mm_get(Ecore_X_Window root, | |||
1701 | } | 1706 | } |
1702 | 1707 | ||
1703 | EAPI Eina_Bool | 1708 | EAPI Eina_Bool |
1704 | ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, | 1709 | ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, |
1705 | const Ecore_X_Randr_Crtc *not_moved, | 1710 | const Ecore_X_Randr_Crtc *not_moved, |
1706 | int nnot_moved, | 1711 | int nnot_moved, |
1707 | int dx, | 1712 | int dx, |
1708 | int dy) | 1713 | int dy) |
1709 | { | 1714 | { |
1710 | #ifdef ECORE_XRANDR | 1715 | #ifdef ECORE_XRANDR |
1711 | Ecore_X_Randr_Crtc *crtcs_to_be_moved = NULL; | 1716 | Ecore_X_Randr_Crtc *crtcs_to_be_moved = NULL; |
@@ -1754,11 +1759,11 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, | |||
1754 | * @return EINA_TRUE if all crtcs could be moved successfully. | 1759 | * @return EINA_TRUE if all crtcs could be moved successfully. |
1755 | */ | 1760 | */ |
1756 | EAPI Eina_Bool | 1761 | EAPI Eina_Bool |
1757 | ecore_x_randr_move_crtcs(Ecore_X_Window root, | 1762 | ecore_x_randr_move_crtcs(Ecore_X_Window root, |
1758 | const Ecore_X_Randr_Crtc *crtcs, | 1763 | const Ecore_X_Randr_Crtc *crtcs, |
1759 | int ncrtc, | 1764 | int ncrtc, |
1760 | int dx, | 1765 | int dx, |
1761 | int dy) | 1766 | int dy) |
1762 | { | 1767 | { |
1763 | #ifdef ECORE_XRANDR | 1768 | #ifdef ECORE_XRANDR |
1764 | RANDR_CHECK_1_2_RET(EINA_FALSE); | 1769 | RANDR_CHECK_1_2_RET(EINA_FALSE); |
@@ -1821,18 +1826,18 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, | |||
1821 | { | 1826 | { |
1822 | //something went wrong, let's try to move the already moved crtcs | 1827 | //something went wrong, let's try to move the already moved crtcs |
1823 | //back. | 1828 | //back. |
1824 | while ((i--) >= 0) | 1829 | while ((i--) >= 0) |
1825 | { | 1830 | { |
1826 | if (crtc_info[i]) | 1831 | if (crtc_info[i]) |
1827 | ecore_x_randr_crtc_settings_set(root, | 1832 | ecore_x_randr_crtc_settings_set(root, |
1828 | crtcs[i], | 1833 | crtcs[i], |
1829 | NULL, | 1834 | NULL, |
1830 | Ecore_X_Randr_Unset, | 1835 | Ecore_X_Randr_Unset, |
1831 | (crtc_info[i]->x - dx), | 1836 | (crtc_info[i]->x - dx), |
1832 | (crtc_info[i]->y - dy), | 1837 | (crtc_info[i]->y - dy), |
1833 | crtc_info[i]->mode, | 1838 | crtc_info[i]->mode, |
1834 | crtc_info[i]->rotation); | 1839 | crtc_info[i]->rotation); |
1835 | } | 1840 | } |
1836 | } | 1841 | } |
1837 | 1842 | ||
1838 | for (i = 0; i < ncrtc; i++) | 1843 | for (i = 0; i < ncrtc; i++) |
@@ -1923,7 +1928,7 @@ ecore_x_randr_screen_reset(Ecore_X_Window root) | |||
1923 | 1928 | ||
1924 | EAPI void | 1929 | EAPI void |
1925 | ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, | 1930 | ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, |
1926 | double level) | 1931 | double level) |
1927 | { | 1932 | { |
1928 | #ifdef ECORE_XRANDR | 1933 | #ifdef ECORE_XRANDR |
1929 | RANDR_CHECK_1_2_RET(); | 1934 | RANDR_CHECK_1_2_RET(); |
@@ -1965,6 +1970,26 @@ ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, | |||
1965 | } | 1970 | } |
1966 | 1971 | ||
1967 | /* | 1972 | /* |
1973 | * @brief check if a backlight is available | ||
1974 | * @return whether a blacklight is available | ||
1975 | */ | ||
1976 | |||
1977 | EAPI Eina_Bool | ||
1978 | ecore_x_randr_output_backlight_available(void) | ||
1979 | { | ||
1980 | #ifdef ECORE_XRANDR | ||
1981 | RANDR_CHECK_1_2_RET(-1); | ||
1982 | Atom _backlight; | ||
1983 | |||
1984 | _backlight = XInternAtom(_ecore_x_disp, RANDR_PROPERTY_BACKLIGHT, True); | ||
1985 | |||
1986 | return (_backlight == None) ? EINA_FALSE : EINA_TRUE; | ||
1987 | |||
1988 | #endif | ||
1989 | return EINA_FALSE; | ||
1990 | } | ||
1991 | |||
1992 | /* | ||
1968 | * @brief get the backlight level of the given output | 1993 | * @brief get the backlight level of the given output |
1969 | * @param root window which's screen should be queried | 1994 | * @param root window which's screen should be queried |
1970 | * @param output from which the backlight level should be retrieved | 1995 | * @param output from which the backlight level should be retrieved |
@@ -1972,7 +1997,7 @@ ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, | |||
1972 | */ | 1997 | */ |
1973 | 1998 | ||
1974 | EAPI double | 1999 | EAPI double |
1975 | ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, | 2000 | ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, |
1976 | Ecore_X_Randr_Output output) | 2001 | Ecore_X_Randr_Output output) |
1977 | { | 2002 | { |
1978 | #ifdef ECORE_XRANDR | 2003 | #ifdef ECORE_XRANDR |
@@ -2025,9 +2050,9 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, | |||
2025 | if ((info->range) && (info->num_values == 2)) | 2050 | if ((info->range) && (info->num_values == 2)) |
2026 | { | 2051 | { |
2027 | /* finally convert the current value in the interval [0..1] */ | 2052 | /* finally convert the current value in the interval [0..1] */ |
2028 | min = info->values[0]; | 2053 | min = info->values[0]; |
2029 | max = info->values[1]; | 2054 | max = info->values[1]; |
2030 | dvalue = ((double)(value - min)) / ((double)(max - min)); | 2055 | dvalue = ((double)(value - min)) / ((double)(max - min)); |
2031 | } | 2056 | } |
2032 | free(info); | 2057 | free(info); |
2033 | return dvalue; | 2058 | return dvalue; |
@@ -2045,9 +2070,9 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, | |||
2045 | */ | 2070 | */ |
2046 | 2071 | ||
2047 | EAPI Eina_Bool | 2072 | EAPI Eina_Bool |
2048 | ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, | 2073 | ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, |
2049 | Ecore_X_Randr_Output output, | 2074 | Ecore_X_Randr_Output output, |
2050 | double level) | 2075 | double level) |
2051 | { | 2076 | { |
2052 | #ifdef ECORE_XRANDR | 2077 | #ifdef ECORE_XRANDR |
2053 | RANDR_CHECK_1_2_RET(EINA_FALSE); | 2078 | RANDR_CHECK_1_2_RET(EINA_FALSE); |
@@ -2107,7 +2132,7 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, | |||
2107 | 2132 | ||
2108 | EAPI Ecore_X_Randr_Output * | 2133 | EAPI Ecore_X_Randr_Output * |
2109 | ecore_x_randr_window_outputs_get(Ecore_X_Window window, | 2134 | ecore_x_randr_window_outputs_get(Ecore_X_Window window, |
2110 | int *num) | 2135 | int *num) |
2111 | { | 2136 | { |
2112 | #ifdef ECORE_XRANDR | 2137 | #ifdef ECORE_XRANDR |
2113 | Ecore_X_Window root; | 2138 | Ecore_X_Window root; |
@@ -2136,39 +2161,39 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, | |||
2136 | for (i = 0; i < ncrtcs; i++) | 2161 | for (i = 0; i < ncrtcs; i++) |
2137 | { | 2162 | { |
2138 | /* if crtc is not enabled, don't bother about it any further */ | 2163 | /* if crtc is not enabled, don't bother about it any further */ |
2139 | mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); | 2164 | mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); |
2140 | if (mode == Ecore_X_Randr_None) continue; | 2165 | if (mode == Ecore_X_Randr_None) continue; |
2141 | 2166 | ||
2142 | ecore_x_randr_crtc_geometry_get(root, crtcs[i], | 2167 | ecore_x_randr_crtc_geometry_get(root, crtcs[i], |
2143 | &c_geo.x, &c_geo.y, | 2168 | &c_geo.x, &c_geo.y, |
2144 | &c_geo.w, &c_geo.h); | 2169 | &c_geo.w, &c_geo.h); |
2145 | if (eina_rectangles_intersect(&w_geo, &c_geo)) | 2170 | if (eina_rectangles_intersect(&w_geo, &c_geo)) |
2146 | { | 2171 | { |
2147 | outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], | 2172 | outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], |
2148 | &noutputs); | 2173 | &noutputs); |
2149 | /* The case below should be impossible, but for safety reasons | 2174 | /* The case below should be impossible, but for safety reasons |
2150 | * remains */ | 2175 | * remains */ |
2151 | if (!outputs) | 2176 | if (!outputs) |
2152 | { | 2177 | { |
2153 | if (num) *num = 0; | 2178 | if (num) *num = 0; |
2154 | free(ret); | 2179 | free(ret); |
2155 | free(crtcs); | 2180 | free(crtcs); |
2156 | return NULL; | 2181 | return NULL; |
2157 | } | 2182 | } |
2158 | tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output))); | 2183 | tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output))); |
2159 | if (!tret) | 2184 | if (!tret) |
2160 | { | 2185 | { |
2161 | if (num) *num = 0; | 2186 | if (num) *num = 0; |
2162 | free(outputs); | 2187 | free(outputs); |
2163 | free(ret); | 2188 | free(ret); |
2164 | free(crtcs); | 2189 | free(crtcs); |
2165 | return NULL; | 2190 | return NULL; |
2166 | } | 2191 | } |
2167 | ret = tret; | 2192 | ret = tret; |
2168 | memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); | 2193 | memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); |
2169 | nret += noutputs; | 2194 | nret += noutputs; |
2170 | free(outputs); | 2195 | free(outputs); |
2171 | } | 2196 | } |
2172 | } | 2197 | } |
2173 | free(crtcs); | 2198 | free(crtcs); |
2174 | 2199 | ||
@@ -2192,7 +2217,7 @@ _ecore_x_randr_current_output_get_fail: | |||
2192 | 2217 | ||
2193 | EINA_DEPRECATED EAPI Ecore_X_Randr_Output * | 2218 | EINA_DEPRECATED EAPI Ecore_X_Randr_Output * |
2194 | ecore_x_randr_current_output_get(Ecore_X_Window window, | 2219 | ecore_x_randr_current_output_get(Ecore_X_Window window, |
2195 | int *num) | 2220 | int *num) |
2196 | { | 2221 | { |
2197 | return ecore_x_randr_window_outputs_get(window, num); | 2222 | return ecore_x_randr_window_outputs_get(window, num); |
2198 | } | 2223 | } |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c index d434f2f..5bda332 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c | |||
@@ -23,6 +23,10 @@ | |||
23 | /* Heavily modified by: Leif Middelschulte <leif.middelschulte@gmail.com> */ | 23 | /* Heavily modified by: Leif Middelschulte <leif.middelschulte@gmail.com> */ |
24 | 24 | ||
25 | #include "Ecore_X.h" | 25 | #include "Ecore_X.h" |
26 | #include <stdio.h> | ||
27 | #include <stdlib.h> | ||
28 | #include <unistd.h> | ||
29 | #include <string.h> | ||
26 | 30 | ||
27 | /* TODO: | 31 | /* TODO: |
28 | * - see other TODO's within this file. | 32 | * - see other TODO's within this file. |
@@ -100,7 +104,7 @@ typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio_Preferred { | |||
100 | 104 | ||
101 | EAPI Eina_Bool | 105 | EAPI Eina_Bool |
102 | ecore_x_randr_edid_has_valid_header(unsigned char *edid, | 106 | ecore_x_randr_edid_has_valid_header(unsigned char *edid, |
103 | unsigned long edid_length) | 107 | unsigned long edid_length) |
104 | { | 108 | { |
105 | const unsigned char header[] = | 109 | const unsigned char header[] = |
106 | { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; | 110 | { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; |
@@ -112,7 +116,7 @@ ecore_x_randr_edid_has_valid_header(unsigned char *edid, | |||
112 | 116 | ||
113 | EAPI int | 117 | EAPI int |
114 | ecore_x_randr_edid_version_get(unsigned char *edid, | 118 | ecore_x_randr_edid_version_get(unsigned char *edid, |
115 | unsigned long edid_length) | 119 | unsigned long edid_length) |
116 | { | 120 | { |
117 | if ((edid_length > _ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR) && | 121 | if ((edid_length > _ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR) && |
118 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) | 122 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) |
@@ -123,7 +127,7 @@ ecore_x_randr_edid_version_get(unsigned char *edid, | |||
123 | 127 | ||
124 | EAPI int | 128 | EAPI int |
125 | ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, | 129 | ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, |
126 | unsigned long edid_length) | 130 | unsigned long edid_length) |
127 | { | 131 | { |
128 | if ((edid_length > 0x0b) && | 132 | if ((edid_length > 0x0b) && |
129 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) | 133 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) |
@@ -133,7 +137,7 @@ ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, | |||
133 | 137 | ||
134 | EAPI int | 138 | EAPI int |
135 | ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, | 139 | ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, |
136 | unsigned long edid_length) | 140 | unsigned long edid_length) |
137 | { | 141 | { |
138 | if ((edid_length > 0x0f) && | 142 | if ((edid_length > 0x0f) && |
139 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) | 143 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) |
@@ -144,7 +148,7 @@ ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, | |||
144 | 148 | ||
145 | EAPI char * | 149 | EAPI char * |
146 | ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, | 150 | ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, |
147 | unsigned long edid_length) | 151 | unsigned long edid_length) |
148 | { | 152 | { |
149 | if ((edid_length > (_ECORE_X_RANDR_EDID_OFFSET_MANUFACTURER + 1)) && | 153 | if ((edid_length > (_ECORE_X_RANDR_EDID_OFFSET_MANUFACTURER + 1)) && |
150 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) | 154 | (ecore_x_randr_edid_has_valid_header(edid, edid_length))) |
@@ -166,7 +170,7 @@ ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, | |||
166 | 170 | ||
167 | EAPI char * | 171 | EAPI char * |
168 | ecore_x_randr_edid_display_name_get(unsigned char *edid, | 172 | ecore_x_randr_edid_display_name_get(unsigned char *edid, |
169 | unsigned long edid_length) | 173 | unsigned long edid_length) |
170 | { | 174 | { |
171 | unsigned char *block = NULL; | 175 | unsigned char *block = NULL; |
172 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 176 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
@@ -196,7 +200,7 @@ ecore_x_randr_edid_display_name_get(unsigned char *edid, | |||
196 | 200 | ||
197 | EAPI Ecore_X_Randr_Edid_Aspect_Ratio | 201 | EAPI Ecore_X_Randr_Edid_Aspect_Ratio |
198 | ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, | 202 | ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, |
199 | unsigned long edid_length) | 203 | unsigned long edid_length) |
200 | { | 204 | { |
201 | unsigned char *block = NULL; | 205 | unsigned char *block = NULL; |
202 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 206 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
@@ -238,7 +242,7 @@ ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, | |||
238 | 242 | ||
239 | EAPI Ecore_X_Randr_Edid_Aspect_Ratio | 243 | EAPI Ecore_X_Randr_Edid_Aspect_Ratio |
240 | ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, | 244 | ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, |
241 | unsigned long edid_length) | 245 | unsigned long edid_length) |
242 | { | 246 | { |
243 | Ecore_X_Randr_Edid_Aspect_Ratio ret = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; | 247 | Ecore_X_Randr_Edid_Aspect_Ratio ret = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; |
244 | unsigned char *block = NULL; | 248 | unsigned char *block = NULL; |
@@ -267,7 +271,7 @@ ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, | |||
267 | 271 | ||
268 | EAPI char * | 272 | EAPI char * |
269 | ecore_x_randr_edid_display_ascii_get(unsigned char *edid, | 273 | ecore_x_randr_edid_display_ascii_get(unsigned char *edid, |
270 | unsigned long edid_length) | 274 | unsigned long edid_length) |
271 | { | 275 | { |
272 | unsigned char *block = NULL; | 276 | unsigned char *block = NULL; |
273 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 277 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
@@ -300,7 +304,7 @@ ecore_x_randr_edid_display_ascii_get(unsigned char *edid, | |||
300 | 304 | ||
301 | EAPI char * | 305 | EAPI char * |
302 | ecore_x_randr_edid_display_serial_get(unsigned char *edid, | 306 | ecore_x_randr_edid_display_serial_get(unsigned char *edid, |
303 | unsigned long edid_length) | 307 | unsigned long edid_length) |
304 | { | 308 | { |
305 | unsigned char *block = NULL; | 309 | unsigned char *block = NULL; |
306 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 310 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
@@ -333,7 +337,7 @@ ecore_x_randr_edid_display_serial_get(unsigned char *edid, | |||
333 | 337 | ||
334 | EAPI Eina_Bool | 338 | EAPI Eina_Bool |
335 | ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, | 339 | ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, |
336 | unsigned long edid_length) | 340 | unsigned long edid_length) |
337 | { | 341 | { |
338 | unsigned char *cea_block_iter = NULL; | 342 | unsigned char *cea_block_iter = NULL; |
339 | char sum = 0; | 343 | char sum = 0; |
@@ -344,13 +348,15 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, | |||
344 | if (edid_length < 128) return EINA_FALSE; | 348 | if (edid_length < 128) return EINA_FALSE; |
345 | 349 | ||
346 | /* Check the EDID block itself */ | 350 | /* Check the EDID block itself */ |
347 | for (i = 0; i < 128; i++) sum += edid[i]; | 351 | for (i = 0; i < 128; i++) |
352 | sum += edid[i]; | ||
348 | if (sum) return EINA_FALSE; | 353 | if (sum) return EINA_FALSE; |
349 | 354 | ||
350 | /* Check the cea extension blocks */ | 355 | /* Check the cea extension blocks */ |
351 | _ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter) | 356 | _ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter) |
352 | { | 357 | { |
353 | for (i = 0, sum = 0; i < 128; i++) sum += cea_block_iter[i]; | 358 | for (i = 0, sum = 0; i < 128; i++) |
359 | sum += cea_block_iter[i]; | ||
354 | } | 360 | } |
355 | if (sum) return EINA_FALSE; | 361 | if (sum) return EINA_FALSE; |
356 | return EINA_TRUE; | 362 | return EINA_TRUE; |
@@ -358,7 +364,7 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, | |||
358 | 364 | ||
359 | EAPI Eina_Bool | 365 | EAPI Eina_Bool |
360 | ecore_x_randr_edid_dpms_available_get(unsigned char *edid, | 366 | ecore_x_randr_edid_dpms_available_get(unsigned char *edid, |
361 | unsigned long edid_length) | 367 | unsigned long edid_length) |
362 | { | 368 | { |
363 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 369 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
364 | 370 | ||
@@ -369,7 +375,7 @@ ecore_x_randr_edid_dpms_available_get(unsigned char *edid, | |||
369 | 375 | ||
370 | EAPI Eina_Bool | 376 | EAPI Eina_Bool |
371 | ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, | 377 | ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, |
372 | unsigned long edid_length) | 378 | unsigned long edid_length) |
373 | { | 379 | { |
374 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 380 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
375 | 381 | ||
@@ -382,7 +388,7 @@ ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, | |||
382 | 388 | ||
383 | EAPI Eina_Bool | 389 | EAPI Eina_Bool |
384 | ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, | 390 | ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, |
385 | unsigned long edid_length) | 391 | unsigned long edid_length) |
386 | { | 392 | { |
387 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 393 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
388 | 394 | ||
@@ -395,7 +401,7 @@ ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, | |||
395 | 401 | ||
396 | EAPI Eina_Bool | 402 | EAPI Eina_Bool |
397 | ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, | 403 | ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, |
398 | unsigned long edid_length) | 404 | unsigned long edid_length) |
399 | { | 405 | { |
400 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 406 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
401 | 407 | ||
@@ -408,7 +414,7 @@ ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, | |||
408 | 414 | ||
409 | EAPI Eina_Bool | 415 | EAPI Eina_Bool |
410 | ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, | 416 | ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, |
411 | unsigned long edid_length) | 417 | unsigned long edid_length) |
412 | { | 418 | { |
413 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 419 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
414 | 420 | ||
@@ -419,7 +425,7 @@ ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, | |||
419 | 425 | ||
420 | EAPI Ecore_X_Randr_Edid_Display_Colorscheme | 426 | EAPI Ecore_X_Randr_Edid_Display_Colorscheme |
421 | ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, | 427 | ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, |
422 | unsigned long edid_length) | 428 | unsigned long edid_length) |
423 | { | 429 | { |
424 | Ecore_X_Randr_Edid_Display_Colorscheme colorscheme = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; | 430 | Ecore_X_Randr_Edid_Display_Colorscheme colorscheme = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; |
425 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 431 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
@@ -442,7 +448,7 @@ ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, | |||
442 | 448 | ||
443 | EAPI Ecore_X_Randr_Edid_Display_Interface_Type | 449 | EAPI Ecore_X_Randr_Edid_Display_Interface_Type |
444 | ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, | 450 | ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, |
445 | unsigned long edid_length) | 451 | unsigned long edid_length) |
446 | { | 452 | { |
447 | Ecore_X_Randr_Edid_Display_Interface_Type type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; | 453 | Ecore_X_Randr_Edid_Display_Interface_Type type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE; |
448 | int version = ecore_x_randr_edid_version_get(edid, edid_length); | 454 | int version = ecore_x_randr_edid_version_get(edid, edid_length); |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c index ab242f7..5d1c8e9 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_randr_13.c | |||
@@ -8,6 +8,10 @@ | |||
8 | 8 | ||
9 | #include "ecore_x_private.h" | 9 | #include "ecore_x_private.h" |
10 | #include "ecore_x_randr.h" | 10 | #include "ecore_x_randr.h" |
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <string.h> | ||
11 | 15 | ||
12 | #define Ecore_X_Randr_None 0 | 16 | #define Ecore_X_Randr_None 0 |
13 | #define Ecore_X_Randr_Unset -1 | 17 | #define Ecore_X_Randr_Unset -1 |
@@ -15,7 +19,8 @@ | |||
15 | #ifdef ECORE_XRANDR | 19 | #ifdef ECORE_XRANDR |
16 | 20 | ||
17 | #define RANDR_1_3 ((1 << 16) | 3) | 21 | #define RANDR_1_3 ((1 << 16) | 3) |
18 | #define RANDR_CHECK_1_3_RET(ret) if(_randr_version < RANDR_1_3) return ret | 22 | #define RANDR_CHECK_1_3_RET(ret) if (_randr_version < RANDR_1_3) \ |
23 | return ret | ||
19 | 24 | ||
20 | extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * | 25 | extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * |
21 | dpy, | 26 | dpy, |
@@ -47,7 +52,7 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root) | |||
47 | * @param output that should be set as given root window's screen primary output | 52 | * @param output that should be set as given root window's screen primary output |
48 | */ | 53 | */ |
49 | EAPI void | 54 | EAPI void |
50 | ecore_x_randr_primary_output_set(Ecore_X_Window root, | 55 | ecore_x_randr_primary_output_set(Ecore_X_Window root, |
51 | Ecore_X_Randr_Output output) | 56 | Ecore_X_Randr_Output output) |
52 | { | 57 | { |
53 | #ifdef ECORE_XRANDR | 58 | #ifdef ECORE_XRANDR |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c index 7cc66e3..81d7eea 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_region.c | |||
@@ -32,7 +32,7 @@ ecore_x_xregion_new() | |||
32 | { | 32 | { |
33 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 33 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
34 | return (Ecore_X_XRegion *)XCreateRegion(); | 34 | return (Ecore_X_XRegion *)XCreateRegion(); |
35 | } /* ecore_x_xregion_new */ | 35 | } |
36 | 36 | ||
37 | EAPI void | 37 | EAPI void |
38 | ecore_x_xregion_free(Ecore_X_XRegion *region) | 38 | ecore_x_xregion_free(Ecore_X_XRegion *region) |
@@ -42,20 +42,20 @@ ecore_x_xregion_free(Ecore_X_XRegion *region) | |||
42 | return; | 42 | return; |
43 | 43 | ||
44 | XDestroyRegion((Region)region); | 44 | XDestroyRegion((Region)region); |
45 | } /* ecore_x_xregion_free */ | 45 | } |
46 | 46 | ||
47 | EAPI Eina_Bool | 47 | EAPI Eina_Bool |
48 | ecore_x_xregion_set(Ecore_X_XRegion *region, | 48 | ecore_x_xregion_set(Ecore_X_XRegion *region, |
49 | Ecore_X_GC gc) | 49 | Ecore_X_GC gc) |
50 | { | 50 | { |
51 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 51 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
52 | return XSetRegion(_ecore_x_disp, gc, (Region)region) ? EINA_TRUE : EINA_FALSE; | 52 | return XSetRegion(_ecore_x_disp, gc, (Region)region) ? EINA_TRUE : EINA_FALSE; |
53 | } /* ecore_x_xregion_set */ | 53 | } |
54 | 54 | ||
55 | EAPI void | 55 | EAPI void |
56 | ecore_x_xregion_translate(Ecore_X_XRegion *region, | 56 | ecore_x_xregion_translate(Ecore_X_XRegion *region, |
57 | int x, | 57 | int x, |
58 | int y) | 58 | int y) |
59 | { | 59 | { |
60 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 60 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
61 | if (!region) | 61 | if (!region) |
@@ -63,7 +63,7 @@ ecore_x_xregion_translate(Ecore_X_XRegion *region, | |||
63 | 63 | ||
64 | /* return value not used */ | 64 | /* return value not used */ |
65 | XOffsetRegion((Region)region, x, y); | 65 | XOffsetRegion((Region)region, x, y); |
66 | } /* ecore_x_xregion_translate */ | 66 | } |
67 | 67 | ||
68 | EAPI Eina_Bool | 68 | EAPI Eina_Bool |
69 | ecore_x_xregion_intersect(Ecore_X_XRegion *dst, | 69 | ecore_x_xregion_intersect(Ecore_X_XRegion *dst, |
@@ -72,7 +72,7 @@ ecore_x_xregion_intersect(Ecore_X_XRegion *dst, | |||
72 | { | 72 | { |
73 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 73 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
74 | return XIntersectRegion((Region)r1, (Region)r2, (Region)dst) ? EINA_TRUE : EINA_FALSE; | 74 | return XIntersectRegion((Region)r1, (Region)r2, (Region)dst) ? EINA_TRUE : EINA_FALSE; |
75 | } /* ecore_x_xregion_intersect */ | 75 | } |
76 | 76 | ||
77 | EAPI Eina_Bool | 77 | EAPI Eina_Bool |
78 | ecore_x_xregion_union(Ecore_X_XRegion *dst, | 78 | ecore_x_xregion_union(Ecore_X_XRegion *dst, |
@@ -81,11 +81,11 @@ ecore_x_xregion_union(Ecore_X_XRegion *dst, | |||
81 | { | 81 | { |
82 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 82 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
83 | return XUnionRegion((Region)r1, (Region)r2, (Region)dst) ? EINA_TRUE : EINA_FALSE; | 83 | return XUnionRegion((Region)r1, (Region)r2, (Region)dst) ? EINA_TRUE : EINA_FALSE; |
84 | } /* ecore_x_xregion_union */ | 84 | } |
85 | 85 | ||
86 | EAPI Eina_Bool | 86 | EAPI Eina_Bool |
87 | ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, | 87 | ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, |
88 | Ecore_X_XRegion *src, | 88 | Ecore_X_XRegion *src, |
89 | Ecore_X_Rectangle *rect) | 89 | Ecore_X_Rectangle *rect) |
90 | { | 90 | { |
91 | XRectangle xr; | 91 | XRectangle xr; |
@@ -97,7 +97,7 @@ ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, | |||
97 | xr.height = rect->height; | 97 | xr.height = rect->height; |
98 | 98 | ||
99 | return XUnionRectWithRegion(&xr, (Region)src, (Region)dst) ? EINA_TRUE : EINA_FALSE; | 99 | return XUnionRectWithRegion(&xr, (Region)src, (Region)dst) ? EINA_TRUE : EINA_FALSE; |
100 | } /* ecore_x_xregion_union_rect */ | 100 | } |
101 | 101 | ||
102 | EAPI Eina_Bool | 102 | EAPI Eina_Bool |
103 | ecore_x_xregion_subtract(Ecore_X_XRegion *dst, | 103 | ecore_x_xregion_subtract(Ecore_X_XRegion *dst, |
@@ -106,7 +106,7 @@ ecore_x_xregion_subtract(Ecore_X_XRegion *dst, | |||
106 | { | 106 | { |
107 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 107 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
108 | return XSubtractRegion((Region)rm, (Region)rs, (Region)dst) ? EINA_TRUE : EINA_FALSE; | 108 | return XSubtractRegion((Region)rm, (Region)rs, (Region)dst) ? EINA_TRUE : EINA_FALSE; |
109 | } /* ecore_x_xregion_subtract */ | 109 | } |
110 | 110 | ||
111 | EAPI Eina_Bool | 111 | EAPI Eina_Bool |
112 | ecore_x_xregion_is_empty(Ecore_X_XRegion *region) | 112 | ecore_x_xregion_is_empty(Ecore_X_XRegion *region) |
@@ -116,7 +116,7 @@ ecore_x_xregion_is_empty(Ecore_X_XRegion *region) | |||
116 | 116 | ||
117 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 117 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
118 | return XEmptyRegion((Region)region) ? EINA_TRUE : EINA_FALSE; | 118 | return XEmptyRegion((Region)region) ? EINA_TRUE : EINA_FALSE; |
119 | } /* ecore_x_xregion_is_empty */ | 119 | } |
120 | 120 | ||
121 | EAPI Eina_Bool | 121 | EAPI Eina_Bool |
122 | ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, | 122 | ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, |
@@ -127,22 +127,22 @@ ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, | |||
127 | 127 | ||
128 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 128 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
129 | return XEqualRegion((Region)r1, (Region)r1) ? EINA_TRUE : EINA_FALSE; | 129 | return XEqualRegion((Region)r1, (Region)r1) ? EINA_TRUE : EINA_FALSE; |
130 | } /* ecore_x_xregion_is_equal */ | 130 | } |
131 | 131 | ||
132 | EAPI Eina_Bool | 132 | EAPI Eina_Bool |
133 | ecore_x_xregion_point_contain(Ecore_X_XRegion *region, | 133 | ecore_x_xregion_point_contain(Ecore_X_XRegion *region, |
134 | int x, | 134 | int x, |
135 | int y) | 135 | int y) |
136 | { | 136 | { |
137 | if (!region) | 137 | if (!region) |
138 | return EINA_FALSE; | 138 | return EINA_FALSE; |
139 | 139 | ||
140 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 140 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
141 | return XPointInRegion((Region)region, x, y) ? EINA_TRUE : EINA_FALSE; | 141 | return XPointInRegion((Region)region, x, y) ? EINA_TRUE : EINA_FALSE; |
142 | } /* ecore_x_xregion_point_contain */ | 142 | } |
143 | 143 | ||
144 | EAPI Eina_Bool | 144 | EAPI Eina_Bool |
145 | ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, | 145 | ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, |
146 | Ecore_X_Rectangle *rect) | 146 | Ecore_X_Rectangle *rect) |
147 | { | 147 | { |
148 | if (!region || !rect) | 148 | if (!region || !rect) |
@@ -154,5 +154,5 @@ ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, | |||
154 | rect->y, | 154 | rect->y, |
155 | rect->width, | 155 | rect->width, |
156 | rect->height) ? EINA_TRUE : EINA_FALSE; | 156 | rect->height) ? EINA_TRUE : EINA_FALSE; |
157 | } /* ecore_x_xregion_rect_contain */ | 157 | } |
158 | 158 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c index a3bca67..40dd738 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_screensaver.c | |||
@@ -36,7 +36,7 @@ ecore_x_screensaver_event_available_get(void) | |||
36 | _screensaver_available = 0; | 36 | _screensaver_available = 0; |
37 | #endif /* ifdef ECORE_XSS */ | 37 | #endif /* ifdef ECORE_XSS */ |
38 | return _screensaver_available; | 38 | return _screensaver_available; |
39 | } /* ecore_x_screensaver_event_available_get */ | 39 | } |
40 | 40 | ||
41 | EAPI int | 41 | EAPI int |
42 | ecore_x_screensaver_idle_time_get(void) | 42 | ecore_x_screensaver_idle_time_get(void) |
@@ -57,7 +57,7 @@ ecore_x_screensaver_idle_time_get(void) | |||
57 | #else | 57 | #else |
58 | return 0; | 58 | return 0; |
59 | #endif /* ifdef ECORE_XSS */ | 59 | #endif /* ifdef ECORE_XSS */ |
60 | } /* ecore_x_screensaver_idle_time_get */ | 60 | } |
61 | 61 | ||
62 | EAPI void | 62 | EAPI void |
63 | ecore_x_screensaver_set(int timeout, | 63 | ecore_x_screensaver_set(int timeout, |
@@ -71,7 +71,7 @@ ecore_x_screensaver_set(int timeout, | |||
71 | interval, | 71 | interval, |
72 | prefer_blanking, | 72 | prefer_blanking, |
73 | allow_exposures); | 73 | allow_exposures); |
74 | } /* ecore_x_screensaver_set */ | 74 | } |
75 | 75 | ||
76 | EAPI void | 76 | EAPI void |
77 | ecore_x_screensaver_timeout_set(int timeout) | 77 | ecore_x_screensaver_timeout_set(int timeout) |
@@ -81,7 +81,7 @@ ecore_x_screensaver_timeout_set(int timeout) | |||
81 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 81 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
82 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 82 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
83 | XSetScreenSaver(_ecore_x_disp, timeout, pint, pblank, pexpo); | 83 | XSetScreenSaver(_ecore_x_disp, timeout, pint, pblank, pexpo); |
84 | } /* ecore_x_screensaver_timeout_set */ | 84 | } |
85 | 85 | ||
86 | EAPI int | 86 | EAPI int |
87 | ecore_x_screensaver_timeout_get(void) | 87 | ecore_x_screensaver_timeout_get(void) |
@@ -91,7 +91,7 @@ ecore_x_screensaver_timeout_get(void) | |||
91 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 91 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
92 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 92 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
93 | return pto; | 93 | return pto; |
94 | } /* ecore_x_screensaver_timeout_get */ | 94 | } |
95 | 95 | ||
96 | EAPI void | 96 | EAPI void |
97 | ecore_x_screensaver_blank_set(int blank) | 97 | ecore_x_screensaver_blank_set(int blank) |
@@ -101,7 +101,7 @@ ecore_x_screensaver_blank_set(int blank) | |||
101 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 101 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
102 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 102 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
103 | XSetScreenSaver(_ecore_x_disp, pto, pint, blank, pexpo); | 103 | XSetScreenSaver(_ecore_x_disp, pto, pint, blank, pexpo); |
104 | } /* ecore_x_screensaver_blank_set */ | 104 | } |
105 | 105 | ||
106 | EAPI int | 106 | EAPI int |
107 | ecore_x_screensaver_blank_get(void) | 107 | ecore_x_screensaver_blank_get(void) |
@@ -111,7 +111,7 @@ ecore_x_screensaver_blank_get(void) | |||
111 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 111 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
112 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 112 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
113 | return pblank; | 113 | return pblank; |
114 | } /* ecore_x_screensaver_blank_get */ | 114 | } |
115 | 115 | ||
116 | EAPI void | 116 | EAPI void |
117 | ecore_x_screensaver_expose_set(int expose) | 117 | ecore_x_screensaver_expose_set(int expose) |
@@ -121,7 +121,7 @@ ecore_x_screensaver_expose_set(int expose) | |||
121 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 121 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
122 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 122 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
123 | XSetScreenSaver(_ecore_x_disp, pto, pint, pblank, expose); | 123 | XSetScreenSaver(_ecore_x_disp, pto, pint, pblank, expose); |
124 | } /* ecore_x_screensaver_expose_set */ | 124 | } |
125 | 125 | ||
126 | EAPI int | 126 | EAPI int |
127 | ecore_x_screensaver_expose_get(void) | 127 | ecore_x_screensaver_expose_get(void) |
@@ -131,7 +131,7 @@ ecore_x_screensaver_expose_get(void) | |||
131 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 131 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
132 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 132 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
133 | return pexpo; | 133 | return pexpo; |
134 | } /* ecore_x_screensaver_expose_get */ | 134 | } |
135 | 135 | ||
136 | EAPI void | 136 | EAPI void |
137 | ecore_x_screensaver_interval_set(int interval) | 137 | ecore_x_screensaver_interval_set(int interval) |
@@ -141,7 +141,7 @@ ecore_x_screensaver_interval_set(int interval) | |||
141 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 141 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
142 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 142 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
143 | XSetScreenSaver(_ecore_x_disp, pto, interval, pblank, pexpo); | 143 | XSetScreenSaver(_ecore_x_disp, pto, interval, pblank, pexpo); |
144 | } /* ecore_x_screensaver_interval_set */ | 144 | } |
145 | 145 | ||
146 | EAPI int | 146 | EAPI int |
147 | ecore_x_screensaver_interval_get(void) | 147 | ecore_x_screensaver_interval_get(void) |
@@ -151,7 +151,7 @@ ecore_x_screensaver_interval_get(void) | |||
151 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 151 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
152 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); | 152 | XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo); |
153 | return pint; | 153 | return pint; |
154 | } /* ecore_x_screensaver_interval_get */ | 154 | } |
155 | 155 | ||
156 | EAPI void | 156 | EAPI void |
157 | ecore_x_screensaver_event_listen_set(Eina_Bool on) | 157 | ecore_x_screensaver_event_listen_set(Eina_Bool on) |
@@ -169,5 +169,5 @@ ecore_x_screensaver_event_listen_set(Eina_Bool on) | |||
169 | return; | 169 | return; |
170 | on = EINA_FALSE; | 170 | on = EINA_FALSE; |
171 | #endif /* ifdef ECORE_XSS */ | 171 | #endif /* ifdef ECORE_XSS */ |
172 | } /* ecore_x_screensaver_event_listen_set */ | 172 | } |
173 | 173 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c index b1aa611..fa177c3 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_selection.c | |||
@@ -15,29 +15,29 @@ static Ecore_X_Selection_Intern selections[4]; | |||
15 | static Ecore_X_Selection_Converter *converters = NULL; | 15 | static Ecore_X_Selection_Converter *converters = NULL; |
16 | static Ecore_X_Selection_Parser *parsers = NULL; | 16 | static Ecore_X_Selection_Parser *parsers = NULL; |
17 | 17 | ||
18 | static Eina_Bool _ecore_x_selection_converter_text(char *target, | 18 | static Eina_Bool _ecore_x_selection_converter_text(char *target, |
19 | void *data, | 19 | void *data, |
20 | int size, | 20 | int size, |
21 | void **data_ret, | 21 | void **data_ret, |
22 | int *size_ret, | 22 | int *size_ret, |
23 | Ecore_X_Atom *tprop, | 23 | Ecore_X_Atom *tprop, |
24 | int *); | 24 | int *); |
25 | static int _ecore_x_selection_data_default_free(void *data); | 25 | static int _ecore_x_selection_data_default_free(void *data); |
26 | static void *_ecore_x_selection_parser_files(const char *target, | 26 | static void *_ecore_x_selection_parser_files(const char *target, |
27 | void *data, | 27 | void *data, |
28 | int size, | 28 | int size, |
29 | int format); | 29 | int format); |
30 | static int _ecore_x_selection_data_files_free(void *data); | 30 | static int _ecore_x_selection_data_files_free(void *data); |
31 | static void *_ecore_x_selection_parser_text(const char *target, | 31 | static void *_ecore_x_selection_parser_text(const char *target, |
32 | void *data, | 32 | void *data, |
33 | int size, | 33 | int size, |
34 | int format); | 34 | int format); |
35 | static int _ecore_x_selection_data_text_free(void *data); | 35 | static int _ecore_x_selection_data_text_free(void *data); |
36 | static void *_ecore_x_selection_parser_targets(const char *target, | 36 | static void *_ecore_x_selection_parser_targets(const char *target, |
37 | void *data, | 37 | void *data, |
38 | int size, | 38 | int size, |
39 | int format); | 39 | int format); |
40 | static int _ecore_x_selection_data_targets_free(void *data); | 40 | static int _ecore_x_selection_data_targets_free(void *data); |
41 | 41 | ||
42 | #define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x)) | 42 | #define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x)) |
43 | 43 | ||
@@ -45,32 +45,32 @@ void | |||
45 | _ecore_x_selection_data_init(void) | 45 | _ecore_x_selection_data_init(void) |
46 | { | 46 | { |
47 | /* Initialize global data */ | 47 | /* Initialize global data */ |
48 | memset(selections, 0, sizeof(selections)); | 48 | memset(selections, 0, sizeof(selections)); |
49 | 49 | ||
50 | /* Initialize converters */ | 50 | /* Initialize converters */ |
51 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT, | 51 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT, |
52 | _ecore_x_selection_converter_text); | 52 | _ecore_x_selection_converter_text); |
53 | #ifdef X_HAVE_UTF8_STRING | 53 | #ifdef X_HAVE_UTF8_STRING |
54 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING, | 54 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING, |
55 | _ecore_x_selection_converter_text); | 55 | _ecore_x_selection_converter_text); |
56 | #endif /* ifdef X_HAVE_UTF8_STRING */ | 56 | #endif /* ifdef X_HAVE_UTF8_STRING */ |
57 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT, | 57 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT, |
58 | _ecore_x_selection_converter_text); | 58 | _ecore_x_selection_converter_text); |
59 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING, | 59 | ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING, |
60 | _ecore_x_selection_converter_text); | 60 | _ecore_x_selection_converter_text); |
61 | 61 | ||
62 | /* Initialize parsers */ | 62 | /* Initialize parsers */ |
63 | ecore_x_selection_parser_add("text/plain", | 63 | ecore_x_selection_parser_add("text/plain", |
64 | _ecore_x_selection_parser_text); | 64 | _ecore_x_selection_parser_text); |
65 | ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING, | 65 | ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING, |
66 | _ecore_x_selection_parser_text); | 66 | _ecore_x_selection_parser_text); |
67 | ecore_x_selection_parser_add("text/uri-list", | 67 | ecore_x_selection_parser_add("text/uri-list", |
68 | _ecore_x_selection_parser_files); | 68 | _ecore_x_selection_parser_files); |
69 | ecore_x_selection_parser_add("_NETSCAPE_URL", | 69 | ecore_x_selection_parser_add("_NETSCAPE_URL", |
70 | _ecore_x_selection_parser_files); | 70 | _ecore_x_selection_parser_files); |
71 | ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS, | 71 | ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS, |
72 | _ecore_x_selection_parser_targets); | 72 | _ecore_x_selection_parser_targets); |
73 | } /* _ecore_x_selection_data_init */ | 73 | } |
74 | 74 | ||
75 | void | 75 | void |
76 | _ecore_x_selection_shutdown(void) | 76 | _ecore_x_selection_shutdown(void) |
@@ -102,7 +102,7 @@ _ecore_x_selection_shutdown(void) | |||
102 | free(tmp); | 102 | free(tmp); |
103 | } | 103 | } |
104 | parsers = NULL; | 104 | parsers = NULL; |
105 | } /* _ecore_x_selection_shutdown */ | 105 | } |
106 | 106 | ||
107 | Ecore_X_Selection_Intern * | 107 | Ecore_X_Selection_Intern * |
108 | _ecore_x_selection_get(Ecore_X_Atom selection) | 108 | _ecore_x_selection_get(Ecore_X_Atom selection) |
@@ -117,12 +117,12 @@ _ecore_x_selection_get(Ecore_X_Atom selection) | |||
117 | return &selections[3]; | 117 | return &selections[3]; |
118 | else | 118 | else |
119 | return NULL; | 119 | return NULL; |
120 | } /* _ecore_x_selection_get */ | 120 | } |
121 | 121 | ||
122 | Eina_Bool | 122 | Eina_Bool |
123 | _ecore_x_selection_set(Window w, | 123 | _ecore_x_selection_set(Window w, |
124 | const void *data, | 124 | const void *data, |
125 | int size, | 125 | int size, |
126 | Ecore_X_Atom selection) | 126 | Ecore_X_Atom selection) |
127 | { | 127 | { |
128 | int in; | 128 | int in; |
@@ -162,7 +162,7 @@ _ecore_x_selection_set(Window w, | |||
162 | } | 162 | } |
163 | 163 | ||
164 | return EINA_TRUE; | 164 | return EINA_TRUE; |
165 | } /* _ecore_x_selection_set */ | 165 | } |
166 | 166 | ||
167 | /** | 167 | /** |
168 | * Claim ownership of the PRIMARY selection and set its data. | 168 | * Claim ownership of the PRIMARY selection and set its data. |
@@ -174,12 +174,12 @@ _ecore_x_selection_set(Window w, | |||
174 | */ | 174 | */ |
175 | EAPI Eina_Bool | 175 | EAPI Eina_Bool |
176 | ecore_x_selection_primary_set(Ecore_X_Window w, | 176 | ecore_x_selection_primary_set(Ecore_X_Window w, |
177 | const void *data, | 177 | const void *data, |
178 | int size) | 178 | int size) |
179 | { | 179 | { |
180 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 180 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
181 | return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY); | 181 | return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY); |
182 | } /* ecore_x_selection_primary_set */ | 182 | } |
183 | 183 | ||
184 | /** | 184 | /** |
185 | * Release ownership of the primary selection | 185 | * Release ownership of the primary selection |
@@ -192,7 +192,7 @@ ecore_x_selection_primary_clear(void) | |||
192 | { | 192 | { |
193 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 193 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
194 | return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_PRIMARY); | 194 | return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_PRIMARY); |
195 | } /* ecore_x_selection_primary_clear */ | 195 | } |
196 | 196 | ||
197 | /** | 197 | /** |
198 | * Claim ownership of the SECONDARY selection and set its data. | 198 | * Claim ownership of the SECONDARY selection and set its data. |
@@ -204,15 +204,15 @@ ecore_x_selection_primary_clear(void) | |||
204 | */ | 204 | */ |
205 | EAPI Eina_Bool | 205 | EAPI Eina_Bool |
206 | ecore_x_selection_secondary_set(Ecore_X_Window w, | 206 | ecore_x_selection_secondary_set(Ecore_X_Window w, |
207 | const void *data, | 207 | const void *data, |
208 | int size) | 208 | int size) |
209 | { | 209 | { |
210 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 210 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
211 | return _ecore_x_selection_set(w, | 211 | return _ecore_x_selection_set(w, |
212 | data, | 212 | data, |
213 | size, | 213 | size, |
214 | ECORE_X_ATOM_SELECTION_SECONDARY); | 214 | ECORE_X_ATOM_SELECTION_SECONDARY); |
215 | } /* ecore_x_selection_secondary_set */ | 215 | } |
216 | 216 | ||
217 | /** | 217 | /** |
218 | * Release ownership of the secondary selection | 218 | * Release ownership of the secondary selection |
@@ -228,7 +228,7 @@ ecore_x_selection_secondary_clear(void) | |||
228 | NULL, | 228 | NULL, |
229 | 0, | 229 | 0, |
230 | ECORE_X_ATOM_SELECTION_SECONDARY); | 230 | ECORE_X_ATOM_SELECTION_SECONDARY); |
231 | } /* ecore_x_selection_secondary_clear */ | 231 | } |
232 | 232 | ||
233 | /** | 233 | /** |
234 | * Claim ownership of the XDND selection and set its data. | 234 | * Claim ownership of the XDND selection and set its data. |
@@ -240,12 +240,12 @@ ecore_x_selection_secondary_clear(void) | |||
240 | */ | 240 | */ |
241 | EAPI Eina_Bool | 241 | EAPI Eina_Bool |
242 | ecore_x_selection_xdnd_set(Ecore_X_Window w, | 242 | ecore_x_selection_xdnd_set(Ecore_X_Window w, |
243 | const void *data, | 243 | const void *data, |
244 | int size) | 244 | int size) |
245 | { | 245 | { |
246 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 246 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
247 | return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND); | 247 | return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND); |
248 | } /* ecore_x_selection_xdnd_set */ | 248 | } |
249 | 249 | ||
250 | /** | 250 | /** |
251 | * Release ownership of the XDND selection | 251 | * Release ownership of the XDND selection |
@@ -258,7 +258,7 @@ ecore_x_selection_xdnd_clear(void) | |||
258 | { | 258 | { |
259 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 259 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
260 | return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_XDND); | 260 | return _ecore_x_selection_set(None, NULL, 0, ECORE_X_ATOM_SELECTION_XDND); |
261 | } /* ecore_x_selection_xdnd_clear */ | 261 | } |
262 | 262 | ||
263 | /** | 263 | /** |
264 | * Claim ownership of the CLIPBOARD selection and set its data. | 264 | * Claim ownership of the CLIPBOARD selection and set its data. |
@@ -273,15 +273,15 @@ ecore_x_selection_xdnd_clear(void) | |||
273 | */ | 273 | */ |
274 | EAPI Eina_Bool | 274 | EAPI Eina_Bool |
275 | ecore_x_selection_clipboard_set(Ecore_X_Window w, | 275 | ecore_x_selection_clipboard_set(Ecore_X_Window w, |
276 | const void *data, | 276 | const void *data, |
277 | int size) | 277 | int size) |
278 | { | 278 | { |
279 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 279 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
280 | return _ecore_x_selection_set(w, | 280 | return _ecore_x_selection_set(w, |
281 | data, | 281 | data, |
282 | size, | 282 | size, |
283 | ECORE_X_ATOM_SELECTION_CLIPBOARD); | 283 | ECORE_X_ATOM_SELECTION_CLIPBOARD); |
284 | } /* ecore_x_selection_clipboard_set */ | 284 | } |
285 | 285 | ||
286 | /** | 286 | /** |
287 | * Release ownership of the clipboard selection | 287 | * Release ownership of the clipboard selection |
@@ -297,7 +297,7 @@ ecore_x_selection_clipboard_clear(void) | |||
297 | NULL, | 297 | NULL, |
298 | 0, | 298 | 0, |
299 | ECORE_X_ATOM_SELECTION_CLIPBOARD); | 299 | ECORE_X_ATOM_SELECTION_CLIPBOARD); |
300 | } /* ecore_x_selection_clipboard_clear */ | 300 | } |
301 | 301 | ||
302 | Ecore_X_Atom | 302 | Ecore_X_Atom |
303 | _ecore_x_selection_target_atom_get(const char *target) | 303 | _ecore_x_selection_target_atom_get(const char *target) |
@@ -318,29 +318,29 @@ _ecore_x_selection_target_atom_get(const char *target) | |||
318 | x_target = ecore_x_atom_get(target); | 318 | x_target = ecore_x_atom_get(target); |
319 | 319 | ||
320 | return x_target; | 320 | return x_target; |
321 | } /* _ecore_x_selection_target_atom_get */ | 321 | } |
322 | 322 | ||
323 | char * | 323 | char * |
324 | _ecore_x_selection_target_get(Ecore_X_Atom target) | 324 | _ecore_x_selection_target_get(Ecore_X_Atom target) |
325 | { | 325 | { |
326 | /* FIXME: Should not return mem allocated with strdup or X mixed, | 326 | /* FIXME: Should not return mem allocated with strdup or X mixed, |
327 | * one should use free to free, the other XFree */ | 327 | * one should use free to free, the other XFree */ |
328 | if (target == ECORE_X_ATOM_FILE_NAME) | 328 | if (target == ECORE_X_ATOM_FILE_NAME) |
329 | return strdup(ECORE_X_SELECTION_TARGET_FILENAME); | 329 | return strdup(ECORE_X_SELECTION_TARGET_FILENAME); |
330 | else if (target == ECORE_X_ATOM_STRING) | 330 | else if (target == ECORE_X_ATOM_STRING) |
331 | return strdup(ECORE_X_SELECTION_TARGET_STRING); | 331 | return strdup(ECORE_X_SELECTION_TARGET_STRING); |
332 | else if (target == ECORE_X_ATOM_UTF8_STRING) | 332 | else if (target == ECORE_X_ATOM_UTF8_STRING) |
333 | return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING); | 333 | return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING); |
334 | else if (target == ECORE_X_ATOM_TEXT) | 334 | else if (target == ECORE_X_ATOM_TEXT) |
335 | return strdup(ECORE_X_SELECTION_TARGET_TEXT); | 335 | return strdup(ECORE_X_SELECTION_TARGET_TEXT); |
336 | else | 336 | else |
337 | return XGetAtomName(_ecore_x_disp, target); | 337 | return XGetAtomName(_ecore_x_disp, target); |
338 | } /* _ecore_x_selection_target_get */ | 338 | } |
339 | 339 | ||
340 | static void | 340 | static void |
341 | _ecore_x_selection_request(Ecore_X_Window w, | 341 | _ecore_x_selection_request(Ecore_X_Window w, |
342 | Ecore_X_Atom selection, | 342 | Ecore_X_Atom selection, |
343 | const char *target_str) | 343 | const char *target_str) |
344 | { | 344 | { |
345 | Ecore_X_Atom target, prop; | 345 | Ecore_X_Atom target, prop; |
346 | 346 | ||
@@ -357,27 +357,27 @@ _ecore_x_selection_request(Ecore_X_Window w, | |||
357 | 357 | ||
358 | XConvertSelection(_ecore_x_disp, selection, target, prop, | 358 | XConvertSelection(_ecore_x_disp, selection, target, prop, |
359 | w, CurrentTime); | 359 | w, CurrentTime); |
360 | } /* _ecore_x_selection_request */ | 360 | } |
361 | 361 | ||
362 | EAPI void | 362 | EAPI void |
363 | ecore_x_selection_primary_request(Ecore_X_Window w, | 363 | ecore_x_selection_primary_request(Ecore_X_Window w, |
364 | const char *target) | 364 | const char *target) |
365 | { | 365 | { |
366 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 366 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
367 | _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target); | 367 | _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target); |
368 | } /* ecore_x_selection_primary_request */ | 368 | } |
369 | 369 | ||
370 | EAPI void | 370 | EAPI void |
371 | ecore_x_selection_secondary_request(Ecore_X_Window w, | 371 | ecore_x_selection_secondary_request(Ecore_X_Window w, |
372 | const char *target) | 372 | const char *target) |
373 | { | 373 | { |
374 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 374 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
375 | _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target); | 375 | _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target); |
376 | } /* ecore_x_selection_secondary_request */ | 376 | } |
377 | 377 | ||
378 | EAPI void | 378 | EAPI void |
379 | ecore_x_selection_xdnd_request(Ecore_X_Window w, | 379 | ecore_x_selection_xdnd_request(Ecore_X_Window w, |
380 | const char *target) | 380 | const char *target) |
381 | { | 381 | { |
382 | Ecore_X_Atom atom; | 382 | Ecore_X_Atom atom; |
383 | Ecore_X_DND_Target *_target; | 383 | Ecore_X_DND_Target *_target; |
@@ -388,25 +388,25 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w, | |||
388 | XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom, | 388 | XConvertSelection(_ecore_x_disp, ECORE_X_ATOM_SELECTION_XDND, atom, |
389 | ECORE_X_ATOM_SELECTION_PROP_XDND, w, | 389 | ECORE_X_ATOM_SELECTION_PROP_XDND, w, |
390 | _target->time); | 390 | _target->time); |
391 | } /* ecore_x_selection_xdnd_request */ | 391 | } |
392 | 392 | ||
393 | EAPI void | 393 | EAPI void |
394 | ecore_x_selection_clipboard_request(Ecore_X_Window w, | 394 | ecore_x_selection_clipboard_request(Ecore_X_Window w, |
395 | const char *target) | 395 | const char *target) |
396 | { | 396 | { |
397 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 397 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
398 | _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target); | 398 | _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target); |
399 | } /* ecore_x_selection_clipboard_request */ | 399 | } |
400 | 400 | ||
401 | EAPI void | 401 | EAPI void |
402 | ecore_x_selection_converter_atom_add(Ecore_X_Atom target, | 402 | ecore_x_selection_converter_atom_add(Ecore_X_Atom target, |
403 | Eina_Bool (*func)(char *target, | 403 | Eina_Bool (*func)(char *target, |
404 | void *data, | 404 | void *data, |
405 | int size, | 405 | int size, |
406 | void **data_ret, | 406 | void **data_ret, |
407 | int *size_ret, | 407 | int *size_ret, |
408 | Ecore_X_Atom *ttype, | 408 | Ecore_X_Atom *ttype, |
409 | int *tsize)) | 409 | int *tsize)) |
410 | { | 410 | { |
411 | Ecore_X_Selection_Converter *cnv; | 411 | Ecore_X_Selection_Converter *cnv; |
412 | 412 | ||
@@ -441,17 +441,17 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom | |||
441 | 441 | ||
442 | cnv->target = target; | 442 | cnv->target = target; |
443 | cnv->convert = func; | 443 | cnv->convert = func; |
444 | } /* ecore_x_selection_converter_atom_add */ | 444 | } |
445 | 445 | ||
446 | EAPI void | 446 | EAPI void |
447 | ecore_x_selection_converter_add(char *target, | 447 | ecore_x_selection_converter_add(char *target, |
448 | Eina_Bool (*func)(char *target, | 448 | Eina_Bool (*func)(char *target, |
449 | void *data, | 449 | void *data, |
450 | int size, | 450 | int size, |
451 | void **data_ret, | 451 | void **data_ret, |
452 | int *size_ret, | 452 | int *size_ret, |
453 | Ecore_X_Atom *, | 453 | Ecore_X_Atom *, |
454 | int *)) | 454 | int *)) |
455 | { | 455 | { |
456 | Ecore_X_Atom x_target; | 456 | Ecore_X_Atom x_target; |
457 | 457 | ||
@@ -462,7 +462,7 @@ ecore_x_selection_converter_add(char *target, | |||
462 | x_target = _ecore_x_selection_target_atom_get(target); | 462 | x_target = _ecore_x_selection_target_atom_get(target); |
463 | 463 | ||
464 | ecore_x_selection_converter_atom_add(x_target, func); | 464 | ecore_x_selection_converter_atom_add(x_target, func); |
465 | } /* ecore_x_selection_converter_add */ | 465 | } |
466 | 466 | ||
467 | EAPI void | 467 | EAPI void |
468 | ecore_x_selection_converter_atom_del(Ecore_X_Atom target) | 468 | ecore_x_selection_converter_atom_del(Ecore_X_Atom target) |
@@ -492,7 +492,7 @@ ecore_x_selection_converter_atom_del(Ecore_X_Atom target) | |||
492 | prev_cnv = cnv; | 492 | prev_cnv = cnv; |
493 | cnv = cnv->next; | 493 | cnv = cnv->next; |
494 | } | 494 | } |
495 | } /* ecore_x_selection_converter_atom_del */ | 495 | } |
496 | 496 | ||
497 | EAPI void | 497 | EAPI void |
498 | ecore_x_selection_converter_del(char *target) | 498 | ecore_x_selection_converter_del(char *target) |
@@ -505,14 +505,14 @@ ecore_x_selection_converter_del(char *target) | |||
505 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 505 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
506 | x_target = _ecore_x_selection_target_atom_get(target); | 506 | x_target = _ecore_x_selection_target_atom_get(target); |
507 | ecore_x_selection_converter_atom_del(x_target); | 507 | ecore_x_selection_converter_atom_del(x_target); |
508 | } /* ecore_x_selection_converter_del */ | 508 | } |
509 | 509 | ||
510 | EAPI Eina_Bool | 510 | EAPI Eina_Bool |
511 | ecore_x_selection_notify_send(Ecore_X_Window requestor, | 511 | ecore_x_selection_notify_send(Ecore_X_Window requestor, |
512 | Ecore_X_Atom selection, | 512 | Ecore_X_Atom selection, |
513 | Ecore_X_Atom target, | 513 | Ecore_X_Atom target, |
514 | Ecore_X_Atom property, | 514 | Ecore_X_Atom property, |
515 | Ecore_X_Time tim) | 515 | Ecore_X_Time tim) |
516 | { | 516 | { |
517 | XEvent xev; | 517 | XEvent xev; |
518 | XSelectionEvent xnotify; | 518 | XSelectionEvent xnotify; |
@@ -530,16 +530,16 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor, | |||
530 | 530 | ||
531 | xev.xselection = xnotify; | 531 | xev.xselection = xnotify; |
532 | return (XSendEvent(_ecore_x_disp, requestor, False, 0, &xev) > 0) ? EINA_TRUE : EINA_FALSE; | 532 | return (XSendEvent(_ecore_x_disp, requestor, False, 0, &xev) > 0) ? EINA_TRUE : EINA_FALSE; |
533 | } /* ecore_x_selection_notify_send */ | 533 | } |
534 | 534 | ||
535 | /* Locate and run conversion callback for specified selection target */ | 535 | /* Locate and run conversion callback for specified selection target */ |
536 | EAPI Eina_Bool | 536 | EAPI Eina_Bool |
537 | ecore_x_selection_convert(Ecore_X_Atom selection, | 537 | ecore_x_selection_convert(Ecore_X_Atom selection, |
538 | Ecore_X_Atom target, | 538 | Ecore_X_Atom target, |
539 | void **data_ret, | 539 | void **data_ret, |
540 | int *size, | 540 | int *size, |
541 | Ecore_X_Atom *targtype, | 541 | Ecore_X_Atom *targtype, |
542 | int *typesize) | 542 | int *typesize) |
543 | { | 543 | { |
544 | Ecore_X_Selection_Intern *sel; | 544 | Ecore_X_Selection_Intern *sel; |
545 | Ecore_X_Selection_Converter *cnv; | 545 | Ecore_X_Selection_Converter *cnv; |
@@ -572,24 +572,24 @@ ecore_x_selection_convert(Ecore_X_Atom selection, | |||
572 | return EINA_FALSE; | 572 | return EINA_FALSE; |
573 | 573 | ||
574 | /* Default, just return the data | 574 | /* Default, just return the data |
575 | *data_ret = malloc(sel->length); | 575 | * data_ret = malloc(sel->length); |
576 | memcpy(*data_ret, sel->data, sel->length); | 576 | memcpy(*data_ret, sel->data, sel->length); |
577 | free(tgt_str); | 577 | free(tgt_str); |
578 | return 1; | 578 | return 1; |
579 | */ | 579 | */ |
580 | } /* ecore_x_selection_convert */ | 580 | } |
581 | 581 | ||
582 | /* TODO: We need to work out a mechanism for automatic conversion to any requested | 582 | /* TODO: We need to work out a mechanism for automatic conversion to any requested |
583 | * locale using Ecore_Txt functions */ | 583 | * locale using Ecore_Txt functions */ |
584 | /* Converter for standard non-utf8 text targets */ | 584 | /* Converter for standard non-utf8 text targets */ |
585 | static Eina_Bool | 585 | static Eina_Bool |
586 | _ecore_x_selection_converter_text(char *target, | 586 | _ecore_x_selection_converter_text(char *target, |
587 | void *data, | 587 | void *data, |
588 | int size, | 588 | int size, |
589 | void **data_ret, | 589 | void **data_ret, |
590 | int *size_ret, | 590 | int *size_ret, |
591 | Ecore_X_Atom *targprop __UNUSED__, | 591 | Ecore_X_Atom *targprop __UNUSED__, |
592 | int *s __UNUSED__) | 592 | int *s __UNUSED__) |
593 | { | 593 | { |
594 | XTextProperty text_prop; | 594 | XTextProperty text_prop; |
595 | char *mystr; | 595 | char *mystr; |
@@ -651,7 +651,7 @@ _ecore_x_selection_converter_text(char *target, | |||
651 | { | 651 | { |
652 | return EINA_TRUE; | 652 | return EINA_TRUE; |
653 | } | 653 | } |
654 | } /* _ecore_x_selection_converter_text */ | 654 | } |
655 | 655 | ||
656 | EAPI void | 656 | EAPI void |
657 | ecore_x_selection_parser_add(const char *target, | 657 | ecore_x_selection_parser_add(const char *target, |
@@ -692,7 +692,7 @@ ecore_x_selection_parser_add(const char *target, | |||
692 | 692 | ||
693 | prs->target = strdup(target); | 693 | prs->target = strdup(target); |
694 | prs->parse = func; | 694 | prs->parse = func; |
695 | } /* ecore_x_selection_parser_add */ | 695 | } |
696 | 696 | ||
697 | EAPI void | 697 | EAPI void |
698 | ecore_x_selection_parser_del(const char *target) | 698 | ecore_x_selection_parser_del(const char *target) |
@@ -726,19 +726,19 @@ ecore_x_selection_parser_del(const char *target) | |||
726 | prev_prs = prs; | 726 | prev_prs = prs; |
727 | prs = prs->next; | 727 | prs = prs->next; |
728 | } | 728 | } |
729 | } /* ecore_x_selection_parser_del */ | 729 | } |
730 | 730 | ||
731 | /** | 731 | /** |
732 | * Change the owner and last-change time for the specified selection. | 732 | * Change the owner and last-change time for the specified selection. |
733 | * @param win The owner of the specified atom. | 733 | * @param win The owner of the specified atom. |
734 | * @param atom The selection atom | 734 | * @param atom The selection atom |
735 | * @param time Specifies the time | 735 | * @param tim Specifies the time |
736 | * @since 1.1.0 | 736 | * @since 1.1.0 |
737 | */ | 737 | */ |
738 | EAPI void | 738 | EAPI void |
739 | ecore_x_selection_owner_set(Ecore_X_Window win, | 739 | ecore_x_selection_owner_set(Ecore_X_Window win, |
740 | Ecore_X_Atom atom, | 740 | Ecore_X_Atom atom, |
741 | Ecore_X_Time tim) | 741 | Ecore_X_Time tim) |
742 | { | 742 | { |
743 | XSetSelectionOwner(_ecore_x_disp, atom, win, tim); | 743 | XSetSelectionOwner(_ecore_x_disp, atom, win, tim); |
744 | } | 744 | } |
@@ -760,9 +760,9 @@ ecore_x_selection_owner_get(Ecore_X_Atom atom) | |||
760 | /* Locate and run conversion callback for specified selection target */ | 760 | /* Locate and run conversion callback for specified selection target */ |
761 | void * | 761 | void * |
762 | _ecore_x_selection_parse(const char *target, | 762 | _ecore_x_selection_parse(const char *target, |
763 | void *data, | 763 | void *data, |
764 | int size, | 764 | int size, |
765 | int format) | 765 | int format) |
766 | { | 766 | { |
767 | Ecore_X_Selection_Parser *prs; | 767 | Ecore_X_Selection_Parser *prs; |
768 | Ecore_X_Selection_Data *sel; | 768 | Ecore_X_Selection_Data *sel; |
@@ -784,7 +784,7 @@ _ecore_x_selection_parse(const char *target, | |||
784 | sel->format = format; | 784 | sel->format = format; |
785 | sel->data = data; | 785 | sel->data = data; |
786 | return sel; | 786 | return sel; |
787 | } /* _ecore_x_selection_parse */ | 787 | } |
788 | 788 | ||
789 | static int | 789 | static int |
790 | _ecore_x_selection_data_default_free(void *data) | 790 | _ecore_x_selection_data_default_free(void *data) |
@@ -795,13 +795,13 @@ _ecore_x_selection_data_default_free(void *data) | |||
795 | free(sel->data); | 795 | free(sel->data); |
796 | free(sel); | 796 | free(sel); |
797 | return 1; | 797 | return 1; |
798 | } /* _ecore_x_selection_data_default_free */ | 798 | } |
799 | 799 | ||
800 | static void * | 800 | static void * |
801 | _ecore_x_selection_parser_files(const char *target, | 801 | _ecore_x_selection_parser_files(const char *target, |
802 | void *_data, | 802 | void *_data, |
803 | int size, | 803 | int size, |
804 | int format __UNUSED__) | 804 | int format __UNUSED__) |
805 | { | 805 | { |
806 | Ecore_X_Selection_Data_Files *sel; | 806 | Ecore_X_Selection_Data_Files *sel; |
807 | char *t, *data = _data; | 807 | char *t, *data = _data; |
@@ -820,15 +820,15 @@ _ecore_x_selection_parser_files(const char *target, | |||
820 | if (data[size - 1]) | 820 | if (data[size - 1]) |
821 | { | 821 | { |
822 | /* Isn't nul terminated */ | 822 | /* Isn't nul terminated */ |
823 | size++; | 823 | size++; |
824 | t = realloc(data, size); | 824 | t = realloc(data, size); |
825 | if (!t) | 825 | if (!t) |
826 | { | 826 | { |
827 | free(sel); | 827 | free(sel); |
828 | return NULL; | 828 | return NULL; |
829 | } | 829 | } |
830 | data = t; | 830 | data = t; |
831 | data[size - 1] = 0; | 831 | data[size - 1] = 0; |
832 | } | 832 | } |
833 | 833 | ||
834 | tmp = malloc(size); | 834 | tmp = malloc(size); |
@@ -850,7 +850,8 @@ _ecore_x_selection_parser_files(const char *target, | |||
850 | tmp[i++] = data[is++]; | 850 | tmp[i++] = data[is++]; |
851 | else | 851 | else |
852 | { | 852 | { |
853 | while ((data[is] == '\r') || (data[is] == '\n')) is++; | 853 | while ((data[is] == '\r') || (data[is] == '\n')) |
854 | is++; | ||
854 | tmp[i] = 0; | 855 | tmp[i] = 0; |
855 | sel->num_files++; | 856 | sel->num_files++; |
856 | t2 = realloc(sel->files, sel->num_files * sizeof(char *)); | 857 | t2 = realloc(sel->files, sel->num_files * sizeof(char *)); |
@@ -883,7 +884,7 @@ _ecore_x_selection_parser_files(const char *target, | |||
883 | ECORE_X_SELECTION_DATA(sel)->length = sel->num_files; | 884 | ECORE_X_SELECTION_DATA(sel)->length = sel->num_files; |
884 | 885 | ||
885 | return ECORE_X_SELECTION_DATA(sel); | 886 | return ECORE_X_SELECTION_DATA(sel); |
886 | } /* _ecore_x_selection_parser_files */ | 887 | } |
887 | 888 | ||
888 | static int | 889 | static int |
889 | _ecore_x_selection_data_files_free(void *data) | 890 | _ecore_x_selection_data_files_free(void *data) |
@@ -901,13 +902,13 @@ _ecore_x_selection_data_files_free(void *data) | |||
901 | 902 | ||
902 | free(sel); | 903 | free(sel); |
903 | return 0; | 904 | return 0; |
904 | } /* _ecore_x_selection_data_files_free */ | 905 | } |
905 | 906 | ||
906 | static void * | 907 | static void * |
907 | _ecore_x_selection_parser_text(const char *target __UNUSED__, | 908 | _ecore_x_selection_parser_text(const char *target __UNUSED__, |
908 | void *_data, | 909 | void *_data, |
909 | int size, | 910 | int size, |
910 | int format __UNUSED__) | 911 | int format __UNUSED__) |
911 | { | 912 | { |
912 | Ecore_X_Selection_Data_Text *sel; | 913 | Ecore_X_Selection_Data_Text *sel; |
913 | unsigned char *data = _data; | 914 | unsigned char *data = _data; |
@@ -918,15 +919,15 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__, | |||
918 | if (data[size - 1]) | 919 | if (data[size - 1]) |
919 | { | 920 | { |
920 | /* Isn't nul terminated */ | 921 | /* Isn't nul terminated */ |
921 | size++; | 922 | size++; |
922 | t = realloc(data, size); | 923 | t = realloc(data, size); |
923 | if (!t) | 924 | if (!t) |
924 | { | 925 | { |
925 | free(sel); | 926 | free(sel); |
926 | return NULL; | 927 | return NULL; |
927 | } | 928 | } |
928 | data = t; | 929 | data = t; |
929 | data[size - 1] = 0; | 930 | data[size - 1] = 0; |
930 | } | 931 | } |
931 | 932 | ||
932 | sel->text = (char *)data; | 933 | sel->text = (char *)data; |
@@ -935,7 +936,7 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__, | |||
935 | ECORE_X_SELECTION_DATA(sel)->data = data; | 936 | ECORE_X_SELECTION_DATA(sel)->data = data; |
936 | ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_text_free; | 937 | ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_text_free; |
937 | return sel; | 938 | return sel; |
938 | } /* _ecore_x_selection_parser_text */ | 939 | } |
939 | 940 | ||
940 | static int | 941 | static int |
941 | _ecore_x_selection_data_text_free(void *data) | 942 | _ecore_x_selection_data_text_free(void *data) |
@@ -946,13 +947,13 @@ _ecore_x_selection_data_text_free(void *data) | |||
946 | free(sel->text); | 947 | free(sel->text); |
947 | free(sel); | 948 | free(sel); |
948 | return 1; | 949 | return 1; |
949 | } /* _ecore_x_selection_data_text_free */ | 950 | } |
950 | 951 | ||
951 | static void * | 952 | static void * |
952 | _ecore_x_selection_parser_targets(const char *target __UNUSED__, | 953 | _ecore_x_selection_parser_targets(const char *target __UNUSED__, |
953 | void *data, | 954 | void *data, |
954 | int size, | 955 | int size, |
955 | int format __UNUSED__) | 956 | int format __UNUSED__) |
956 | { | 957 | { |
957 | Ecore_X_Selection_Data_Targets *sel; | 958 | Ecore_X_Selection_Data_Targets *sel; |
958 | unsigned long *targets; | 959 | unsigned long *targets; |
@@ -977,7 +978,7 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__, | |||
977 | ECORE_X_SELECTION_DATA(sel)->length = size; | 978 | ECORE_X_SELECTION_DATA(sel)->length = size; |
978 | ECORE_X_SELECTION_DATA(sel)->data = data; | 979 | ECORE_X_SELECTION_DATA(sel)->data = data; |
979 | return sel; | 980 | return sel; |
980 | } /* _ecore_x_selection_parser_targets */ | 981 | } |
981 | 982 | ||
982 | static int | 983 | static int |
983 | _ecore_x_selection_data_targets_free(void *data) | 984 | _ecore_x_selection_data_targets_free(void *data) |
@@ -997,5 +998,5 @@ _ecore_x_selection_data_targets_free(void *data) | |||
997 | free(ECORE_X_SELECTION_DATA(sel)->data); | 998 | free(ECORE_X_SELECTION_DATA(sel)->data); |
998 | free(sel); | 999 | free(sel); |
999 | return 1; | 1000 | return 1; |
1000 | } /* _ecore_x_selection_data_targets_free */ | 1001 | } |
1001 | 1002 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c index e49fede..0c7f546 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_sync.c | |||
@@ -42,18 +42,18 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter) | |||
42 | 42 | ||
43 | ecore_x_sync(); | 43 | ecore_x_sync(); |
44 | return alarm; | 44 | return alarm; |
45 | } /* ecore_x_sync_alarm_new */ | 45 | } |
46 | 46 | ||
47 | EAPI Eina_Bool | 47 | EAPI Eina_Bool |
48 | ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm) | 48 | ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm) |
49 | { | 49 | { |
50 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 50 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
51 | return XSyncDestroyAlarm(_ecore_x_disp, alarm); | 51 | return XSyncDestroyAlarm(_ecore_x_disp, alarm); |
52 | } /* ecore_x_sync_alarm_free */ | 52 | } |
53 | 53 | ||
54 | EAPI Eina_Bool | 54 | EAPI Eina_Bool |
55 | ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, | 55 | ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, |
56 | unsigned int *val) | 56 | unsigned int *val) |
57 | { | 57 | { |
58 | XSyncValue value; | 58 | XSyncValue value; |
59 | 59 | ||
@@ -65,7 +65,7 @@ ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, | |||
65 | } | 65 | } |
66 | 66 | ||
67 | return EINA_FALSE; | 67 | return EINA_FALSE; |
68 | } /* ecore_x_sync_counter_query */ | 68 | } |
69 | 69 | ||
70 | EAPI Ecore_X_Sync_Counter | 70 | EAPI Ecore_X_Sync_Counter |
71 | ecore_x_sync_counter_new(int val) | 71 | ecore_x_sync_counter_new(int val) |
@@ -77,29 +77,29 @@ ecore_x_sync_counter_new(int val) | |||
77 | XSyncIntToValue(&v, val); | 77 | XSyncIntToValue(&v, val); |
78 | counter = XSyncCreateCounter(_ecore_x_disp, v); | 78 | counter = XSyncCreateCounter(_ecore_x_disp, v); |
79 | return counter; | 79 | return counter; |
80 | } /* ecore_x_sync_counter_new */ | 80 | } |
81 | 81 | ||
82 | EAPI void | 82 | EAPI void |
83 | ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter) | 83 | ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter) |
84 | { | 84 | { |
85 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 85 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
86 | XSyncDestroyCounter(_ecore_x_disp, counter); | 86 | XSyncDestroyCounter(_ecore_x_disp, counter); |
87 | } /* ecore_x_sync_counter_free */ | 87 | } |
88 | 88 | ||
89 | EAPI void | 89 | EAPI void |
90 | ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, | 90 | ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, |
91 | int by) | 91 | int by) |
92 | { | 92 | { |
93 | XSyncValue v; | 93 | XSyncValue v; |
94 | 94 | ||
95 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 95 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
96 | XSyncIntToValue(&v, by); | 96 | XSyncIntToValue(&v, by); |
97 | XSyncChangeCounter(_ecore_x_disp, counter, v); | 97 | XSyncChangeCounter(_ecore_x_disp, counter, v); |
98 | } /* ecore_x_sync_counter_inc */ | 98 | } |
99 | 99 | ||
100 | EAPI void | 100 | EAPI void |
101 | ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, | 101 | ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, |
102 | int val) | 102 | int val) |
103 | { | 103 | { |
104 | XSyncWaitCondition cond; | 104 | XSyncWaitCondition cond; |
105 | XSyncValue v, v2; | 105 | XSyncValue v, v2; |
@@ -115,11 +115,11 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, | |||
115 | cond.event_threshold = v2; | 115 | cond.event_threshold = v2; |
116 | XSyncAwait(_ecore_x_disp, &cond, 1); | 116 | XSyncAwait(_ecore_x_disp, &cond, 1); |
117 | // XSync(_ecore_x_disp, False); // dont need this | 117 | // XSync(_ecore_x_disp, False); // dont need this |
118 | } /* ecore_x_sync_counter_val_wait */ | 118 | } |
119 | 119 | ||
120 | EAPI void | 120 | EAPI void |
121 | ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, | 121 | ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, |
122 | int val) | 122 | int val) |
123 | { | 123 | { |
124 | XSyncValue v; | 124 | XSyncValue v; |
125 | 125 | ||
@@ -130,8 +130,8 @@ ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, | |||
130 | 130 | ||
131 | EAPI void | 131 | EAPI void |
132 | ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, | 132 | ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, |
133 | int val_hi, | 133 | int val_hi, |
134 | unsigned int val_lo) | 134 | unsigned int val_lo) |
135 | { | 135 | { |
136 | XSyncValue v; | 136 | XSyncValue v; |
137 | 137 | ||
@@ -142,8 +142,8 @@ ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, | |||
142 | 142 | ||
143 | EAPI Eina_Bool | 143 | EAPI Eina_Bool |
144 | ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, | 144 | ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, |
145 | int *val_hi, | 145 | int *val_hi, |
146 | unsigned int *val_lo) | 146 | unsigned int *val_lo) |
147 | { | 147 | { |
148 | XSyncValue value; | 148 | XSyncValue value; |
149 | 149 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c index c4576f9..c8c04e4 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_test.c | |||
@@ -42,7 +42,7 @@ ecore_x_test_fake_key_down(const char *key __UNUSED__) | |||
42 | #else /* ifdef ECORE_XTEST */ | 42 | #else /* ifdef ECORE_XTEST */ |
43 | return EINA_FALSE; | 43 | return EINA_FALSE; |
44 | #endif /* ifdef ECORE_XTEST */ | 44 | #endif /* ifdef ECORE_XTEST */ |
45 | } /* ecore_x_test_fake_key_down */ | 45 | } |
46 | 46 | ||
47 | EAPI Eina_Bool | 47 | EAPI Eina_Bool |
48 | #ifdef ECORE_XTEST | 48 | #ifdef ECORE_XTEST |
@@ -74,7 +74,7 @@ ecore_x_test_fake_key_up(const char *key __UNUSED__) | |||
74 | #else /* ifdef ECORE_XTEST */ | 74 | #else /* ifdef ECORE_XTEST */ |
75 | return EINA_FALSE; | 75 | return EINA_FALSE; |
76 | #endif /* ifdef ECORE_XTEST */ | 76 | #endif /* ifdef ECORE_XTEST */ |
77 | } /* ecore_x_test_fake_key_up */ | 77 | } |
78 | 78 | ||
79 | EAPI Eina_Bool | 79 | EAPI Eina_Bool |
80 | #ifdef ECORE_XTEST | 80 | #ifdef ECORE_XTEST |
@@ -145,11 +145,11 @@ ecore_x_test_fake_key_press(const char *key __UNUSED__) | |||
145 | #else /* ifdef ECORE_XTEST */ | 145 | #else /* ifdef ECORE_XTEST */ |
146 | return EINA_FALSE; | 146 | return EINA_FALSE; |
147 | #endif /* ifdef ECORE_XTEST */ | 147 | #endif /* ifdef ECORE_XTEST */ |
148 | } /* ecore_x_test_fake_key_press */ | 148 | } |
149 | 149 | ||
150 | EAPI const char * | 150 | EAPI const char * |
151 | ecore_x_keysym_string_get(int keysym) | 151 | ecore_x_keysym_string_get(int keysym) |
152 | { | 152 | { |
153 | return XKeysymToString(keysym); | 153 | return XKeysymToString(keysym); |
154 | } /* ecore_x_keysym_string_get */ | 154 | } |
155 | 155 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c index f054298..4296bb2 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_vsync.c | |||
@@ -61,40 +61,40 @@ typedef union _drmVBlank | |||
61 | typedef struct _drmEventContext | 61 | typedef struct _drmEventContext |
62 | { | 62 | { |
63 | int version; | 63 | int version; |
64 | void (*vblank_handler)(int fd, | 64 | void (*vblank_handler)(int fd, |
65 | unsigned int sequence, | 65 | unsigned int sequence, |
66 | unsigned int tv_sec, | 66 | unsigned int tv_sec, |
67 | unsigned int tv_usec, | 67 | unsigned int tv_usec, |
68 | void *user_data); | 68 | void *user_data); |
69 | void (*page_flip_handler)(int fd, | 69 | void (*page_flip_handler)(int fd, |
70 | unsigned int sequence, | 70 | unsigned int sequence, |
71 | unsigned int tv_sec, | 71 | unsigned int tv_sec, |
72 | unsigned int tv_usec, | 72 | unsigned int tv_usec, |
73 | void *user_data); | 73 | void *user_data); |
74 | } drmEventContext; | 74 | } drmEventContext; |
75 | 75 | ||
76 | static int (*sym_drmClose)(int fd) = NULL; | 76 | static int (*sym_drmClose)(int fd) = NULL; |
77 | static int (*sym_drmGetMagic)(int fd, | 77 | static int (*sym_drmGetMagic)(int fd, |
78 | drm_magic_t *magic) = NULL; | 78 | drm_magic_t *magic) = NULL; |
79 | static int (*sym_drmWaitVBlank)(int fd, | 79 | static int (*sym_drmWaitVBlank)(int fd, |
80 | drmVBlank *vbl) = NULL; | 80 | drmVBlank *vbl) = NULL; |
81 | static int (*sym_drmHandleEvent)(int fd, | 81 | static int (*sym_drmHandleEvent)(int fd, |
82 | drmEventContext *evctx) = NULL; | 82 | drmEventContext *evctx) = NULL; |
83 | 83 | ||
84 | //// dri | 84 | //// dri |
85 | 85 | ||
86 | static Bool (*sym_DRI2QueryExtension)(Display *display, | 86 | static Bool (*sym_DRI2QueryExtension)(Display *display, |
87 | int *eventBase, | 87 | int *eventBase, |
88 | int *errorBase) = NULL; | 88 | int *errorBase) = NULL; |
89 | static Bool (*sym_DRI2QueryVersion)(Display *display, | 89 | static Bool (*sym_DRI2QueryVersion)(Display *display, |
90 | int *major, | 90 | int *major, |
91 | int *minor) = NULL; | 91 | int *minor) = NULL; |
92 | static Bool (*sym_DRI2Connect)(Display *display, | 92 | static Bool (*sym_DRI2Connect)(Display *display, |
93 | XID window, | 93 | XID window, |
94 | char **driverName, | 94 | char **driverName, |
95 | char **deviceName) = NULL; | 95 | char **deviceName) = NULL; |
96 | static Bool (*sym_DRI2Authenticate)(Display *display, | 96 | static Bool (*sym_DRI2Authenticate)(Display *display, |
97 | XID window, | 97 | XID window, |
98 | drm_magic_t magic) = NULL; | 98 | drm_magic_t magic) = NULL; |
99 | 99 | ||
100 | //// dri/drm data needed | 100 | //// dri/drm data needed |
@@ -142,18 +142,18 @@ _dri_drm_tick_end(void *data __UNUSED__) | |||
142 | } | 142 | } |
143 | 143 | ||
144 | static void | 144 | static void |
145 | _dri_drm_vblank_handler(int fd __UNUSED__, | 145 | _dri_drm_vblank_handler(int fd __UNUSED__, |
146 | unsigned int frame __UNUSED__, | 146 | unsigned int frame __UNUSED__, |
147 | unsigned int sec __UNUSED__, | 147 | unsigned int sec __UNUSED__, |
148 | unsigned int usec __UNUSED__, | 148 | unsigned int usec __UNUSED__, |
149 | void *data __UNUSED__) | 149 | void *data __UNUSED__) |
150 | { | 150 | { |
151 | ecore_animator_custom_tick(); | 151 | ecore_animator_custom_tick(); |
152 | if (drm_event_is_busy) _dri_drm_tick_schedule(); | 152 | if (drm_event_is_busy) _dri_drm_tick_schedule(); |
153 | } | 153 | } |
154 | 154 | ||
155 | static Eina_Bool | 155 | static Eina_Bool |
156 | _dri_drm_cb(void *data __UNUSED__, | 156 | _dri_drm_cb(void *data __UNUSED__, |
157 | Ecore_Fd_Handler *fd_handler __UNUSED__) | 157 | Ecore_Fd_Handler *fd_handler __UNUSED__) |
158 | { | 158 | { |
159 | sym_drmHandleEvent(drm_fd, &drm_evctx); | 159 | sym_drmHandleEvent(drm_fd, &drm_evctx); |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c index 76670d3..1adb36b 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window.c | |||
@@ -33,10 +33,10 @@ static Ecore_X_Window *ignore_list = NULL; | |||
33 | */ | 33 | */ |
34 | EAPI Ecore_X_Window | 34 | EAPI Ecore_X_Window |
35 | ecore_x_window_new(Ecore_X_Window parent, | 35 | ecore_x_window_new(Ecore_X_Window parent, |
36 | int x, | 36 | int x, |
37 | int y, | 37 | int y, |
38 | int w, | 38 | int w, |
39 | int h) | 39 | int h) |
40 | { | 40 | { |
41 | Window win; | 41 | Window win; |
42 | XSetWindowAttributes attr; | 42 | XSetWindowAttributes attr; |
@@ -87,7 +87,7 @@ ecore_x_window_new(Ecore_X_Window parent, | |||
87 | ecore_x_window_defaults_set(win); | 87 | ecore_x_window_defaults_set(win); |
88 | 88 | ||
89 | return win; | 89 | return win; |
90 | } /* ecore_x_window_new */ | 90 | } |
91 | 91 | ||
92 | /** | 92 | /** |
93 | * Creates a window with the override redirect attribute set to @c True. | 93 | * Creates a window with the override redirect attribute set to @c True. |
@@ -102,10 +102,10 @@ ecore_x_window_new(Ecore_X_Window parent, | |||
102 | */ | 102 | */ |
103 | EAPI Ecore_X_Window | 103 | EAPI Ecore_X_Window |
104 | ecore_x_window_override_new(Ecore_X_Window parent, | 104 | ecore_x_window_override_new(Ecore_X_Window parent, |
105 | int x, | 105 | int x, |
106 | int y, | 106 | int y, |
107 | int w, | 107 | int w, |
108 | int h) | 108 | int h) |
109 | { | 109 | { |
110 | Window win; | 110 | Window win; |
111 | XSetWindowAttributes attr; | 111 | XSetWindowAttributes attr; |
@@ -152,7 +152,7 @@ ecore_x_window_override_new(Ecore_X_Window parent, | |||
152 | CWWinGravity, | 152 | CWWinGravity, |
153 | &attr); | 153 | &attr); |
154 | return win; | 154 | return win; |
155 | } /* ecore_x_window_override_new */ | 155 | } |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * Creates a new input window. | 158 | * Creates a new input window. |
@@ -167,10 +167,10 @@ ecore_x_window_override_new(Ecore_X_Window parent, | |||
167 | */ | 167 | */ |
168 | EAPI Ecore_X_Window | 168 | EAPI Ecore_X_Window |
169 | ecore_x_window_input_new(Ecore_X_Window parent, | 169 | ecore_x_window_input_new(Ecore_X_Window parent, |
170 | int x, | 170 | int x, |
171 | int y, | 171 | int y, |
172 | int w, | 172 | int w, |
173 | int h) | 173 | int h) |
174 | { | 174 | { |
175 | Window win; | 175 | Window win; |
176 | XSetWindowAttributes attr; | 176 | XSetWindowAttributes attr; |
@@ -209,7 +209,7 @@ ecore_x_window_input_new(Ecore_X_Window parent, | |||
209 | } | 209 | } |
210 | 210 | ||
211 | return win; | 211 | return win; |
212 | } /* ecore_x_window_input_new */ | 212 | } |
213 | 213 | ||
214 | /** | 214 | /** |
215 | * @defgroup Ecore_X_Window_Properties_Group X Window Property Functions | 215 | * @defgroup Ecore_X_Window_Properties_Group X Window Property Functions |
@@ -263,18 +263,18 @@ ecore_x_window_defaults_set(Ecore_X_Window win) | |||
263 | 263 | ||
264 | ecore_app_args_get(&argc, &argv); | 264 | ecore_app_args_get(&argc, &argv); |
265 | ecore_x_icccm_command_set(win, argc, argv); | 265 | ecore_x_icccm_command_set(win, argc, argv); |
266 | } /* ecore_x_window_defaults_set */ | 266 | } |
267 | 267 | ||
268 | EAPI void | 268 | EAPI void |
269 | ecore_x_window_configure(Ecore_X_Window win, | 269 | ecore_x_window_configure(Ecore_X_Window win, |
270 | Ecore_X_Window_Configure_Mask mask, | 270 | Ecore_X_Window_Configure_Mask mask, |
271 | int x, | 271 | int x, |
272 | int y, | 272 | int y, |
273 | int w, | 273 | int w, |
274 | int h, | 274 | int h, |
275 | int border_width, | 275 | int border_width, |
276 | Ecore_X_Window sibling, | 276 | Ecore_X_Window sibling, |
277 | int stack_mode) | 277 | int stack_mode) |
278 | { | 278 | { |
279 | XWindowChanges xwc; | 279 | XWindowChanges xwc; |
280 | 280 | ||
@@ -292,7 +292,7 @@ ecore_x_window_configure(Ecore_X_Window win, | |||
292 | xwc.stack_mode = stack_mode; | 292 | xwc.stack_mode = stack_mode; |
293 | 293 | ||
294 | XConfigureWindow(_ecore_x_disp, win, mask, &xwc); | 294 | XConfigureWindow(_ecore_x_disp, win, mask, &xwc); |
295 | } /* ecore_x_window_configure */ | 295 | } |
296 | 296 | ||
297 | /** | 297 | /** |
298 | * @defgroup Ecore_X_Window_Destroy_Group X Window Destroy Functions | 298 | * @defgroup Ecore_X_Window_Destroy_Group X Window Destroy Functions |
@@ -311,10 +311,10 @@ ecore_x_window_free(Ecore_X_Window win) | |||
311 | /* sorry sir, deleting the root window doesn't sound like | 311 | /* sorry sir, deleting the root window doesn't sound like |
312 | * a smart idea. | 312 | * a smart idea. |
313 | */ | 313 | */ |
314 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 314 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
315 | if (win) | 315 | if (win) |
316 | XDestroyWindow(_ecore_x_disp, win); | 316 | XDestroyWindow(_ecore_x_disp, win); |
317 | } /* ecore_x_window_free */ | 317 | } |
318 | 318 | ||
319 | /** | 319 | /** |
320 | * Set if a window should be ignored. | 320 | * Set if a window should be ignored. |
@@ -323,7 +323,7 @@ ecore_x_window_free(Ecore_X_Window win) | |||
323 | */ | 323 | */ |
324 | EAPI void | 324 | EAPI void |
325 | ecore_x_window_ignore_set(Ecore_X_Window win, | 325 | ecore_x_window_ignore_set(Ecore_X_Window win, |
326 | int ignore) | 326 | int ignore) |
327 | { | 327 | { |
328 | int i, j, cnt; | 328 | int i, j, cnt; |
329 | Ecore_X_Window *t; | 329 | Ecore_X_Window *t; |
@@ -373,7 +373,7 @@ ecore_x_window_ignore_set(Ecore_X_Window win, | |||
373 | t = realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window)); | 373 | t = realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window)); |
374 | if (t) ignore_list = t; | 374 | if (t) ignore_list = t; |
375 | } | 375 | } |
376 | } /* ecore_x_window_ignore_set */ | 376 | } |
377 | 377 | ||
378 | /** | 378 | /** |
379 | * Get the ignore list | 379 | * Get the ignore list |
@@ -387,7 +387,7 @@ ecore_x_window_ignore_list(int *num) | |||
387 | *num = ignore_num; | 387 | *num = ignore_num; |
388 | 388 | ||
389 | return ignore_list; | 389 | return ignore_list; |
390 | } /* ecore_x_window_ignore_list */ | 390 | } |
391 | 391 | ||
392 | /** | 392 | /** |
393 | * Sends a delete request to the given window. | 393 | * Sends a delete request to the given window. |
@@ -415,7 +415,7 @@ ecore_x_window_delete_request_send(Ecore_X_Window win) | |||
415 | xev.xclient.data.l[1] = CurrentTime; | 415 | xev.xclient.data.l[1] = CurrentTime; |
416 | 416 | ||
417 | XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); | 417 | XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev); |
418 | } /* ecore_x_window_delete_request_send */ | 418 | } |
419 | 419 | ||
420 | /** | 420 | /** |
421 | * @defgroup Ecore_X_Window_Visibility_Group X Window Visibility Functions | 421 | * @defgroup Ecore_X_Window_Visibility_Group X Window Visibility Functions |
@@ -436,7 +436,7 @@ ecore_x_window_show(Ecore_X_Window win) | |||
436 | { | 436 | { |
437 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 437 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
438 | XMapWindow(_ecore_x_disp, win); | 438 | XMapWindow(_ecore_x_disp, win); |
439 | } /* ecore_x_window_show */ | 439 | } |
440 | 440 | ||
441 | /** | 441 | /** |
442 | * Hides a window. | 442 | * Hides a window. |
@@ -480,7 +480,7 @@ ecore_x_window_hide(Ecore_X_Window win) | |||
480 | XSendEvent(_ecore_x_disp, xev.xunmap.event, False, | 480 | XSendEvent(_ecore_x_disp, xev.xunmap.event, False, |
481 | SubstructureRedirectMask | SubstructureNotifyMask, &xev); | 481 | SubstructureRedirectMask | SubstructureNotifyMask, &xev); |
482 | XUnmapWindow(_ecore_x_disp, win); | 482 | XUnmapWindow(_ecore_x_disp, win); |
483 | } /* ecore_x_window_hide */ | 483 | } |
484 | 484 | ||
485 | /** | 485 | /** |
486 | * @defgroup Ecore_X_Window_Geometry_Group X Window Geometry Functions | 486 | * @defgroup Ecore_X_Window_Geometry_Group X Window Geometry Functions |
@@ -501,12 +501,12 @@ ecore_x_window_hide(Ecore_X_Window win) | |||
501 | */ | 501 | */ |
502 | EAPI void | 502 | EAPI void |
503 | ecore_x_window_move(Ecore_X_Window win, | 503 | ecore_x_window_move(Ecore_X_Window win, |
504 | int x, | 504 | int x, |
505 | int y) | 505 | int y) |
506 | { | 506 | { |
507 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 507 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
508 | XMoveWindow(_ecore_x_disp, win, x, y); | 508 | XMoveWindow(_ecore_x_disp, win, x, y); |
509 | } /* ecore_x_window_move */ | 509 | } |
510 | 510 | ||
511 | /** | 511 | /** |
512 | * Resizes a window. | 512 | * Resizes a window. |
@@ -517,8 +517,8 @@ ecore_x_window_move(Ecore_X_Window win, | |||
517 | */ | 517 | */ |
518 | EAPI void | 518 | EAPI void |
519 | ecore_x_window_resize(Ecore_X_Window win, | 519 | ecore_x_window_resize(Ecore_X_Window win, |
520 | int w, | 520 | int w, |
521 | int h) | 521 | int h) |
522 | { | 522 | { |
523 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 523 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
524 | if (w < 1) | 524 | if (w < 1) |
@@ -528,7 +528,7 @@ ecore_x_window_resize(Ecore_X_Window win, | |||
528 | h = 1; | 528 | h = 1; |
529 | 529 | ||
530 | XResizeWindow(_ecore_x_disp, win, w, h); | 530 | XResizeWindow(_ecore_x_disp, win, w, h); |
531 | } /* ecore_x_window_resize */ | 531 | } |
532 | 532 | ||
533 | /** | 533 | /** |
534 | * Moves and resizes a window. | 534 | * Moves and resizes a window. |
@@ -541,10 +541,10 @@ ecore_x_window_resize(Ecore_X_Window win, | |||
541 | */ | 541 | */ |
542 | EAPI void | 542 | EAPI void |
543 | ecore_x_window_move_resize(Ecore_X_Window win, | 543 | ecore_x_window_move_resize(Ecore_X_Window win, |
544 | int x, | 544 | int x, |
545 | int y, | 545 | int y, |
546 | int w, | 546 | int w, |
547 | int h) | 547 | int h) |
548 | { | 548 | { |
549 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 549 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
550 | if (w < 1) | 550 | if (w < 1) |
@@ -554,7 +554,7 @@ ecore_x_window_move_resize(Ecore_X_Window win, | |||
554 | h = 1; | 554 | h = 1; |
555 | 555 | ||
556 | XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h); | 556 | XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h); |
557 | } /* ecore_x_window_move_resize */ | 557 | } |
558 | 558 | ||
559 | /** | 559 | /** |
560 | * @defgroup Ecore_X_Window_Focus_Functions X Window Focus Functions | 560 | * @defgroup Ecore_X_Window_Focus_Functions X Window Focus Functions |
@@ -576,7 +576,7 @@ ecore_x_window_focus(Ecore_X_Window win) | |||
576 | 576 | ||
577 | // XSetInputFocus(_ecore_x_disp, win, RevertToPointerRoot, CurrentTime); | 577 | // XSetInputFocus(_ecore_x_disp, win, RevertToPointerRoot, CurrentTime); |
578 | XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime); | 578 | XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime); |
579 | } /* ecore_x_window_focus */ | 579 | } |
580 | 580 | ||
581 | /** | 581 | /** |
582 | * Sets the focus to the given window at a specific time. | 582 | * Sets the focus to the given window at a specific time. |
@@ -586,7 +586,7 @@ ecore_x_window_focus(Ecore_X_Window win) | |||
586 | */ | 586 | */ |
587 | EAPI void | 587 | EAPI void |
588 | ecore_x_window_focus_at_time(Ecore_X_Window win, | 588 | ecore_x_window_focus_at_time(Ecore_X_Window win, |
589 | Ecore_X_Time t) | 589 | Ecore_X_Time t) |
590 | { | 590 | { |
591 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 591 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
592 | if (win == 0) | 592 | if (win == 0) |
@@ -594,7 +594,7 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, | |||
594 | 594 | ||
595 | // XSetInputFocus(_ecore_x_disp, win, PointerRoot, t); | 595 | // XSetInputFocus(_ecore_x_disp, win, PointerRoot, t); |
596 | XSetInputFocus(_ecore_x_disp, win, RevertToParent, t); | 596 | XSetInputFocus(_ecore_x_disp, win, RevertToParent, t); |
597 | } /* ecore_x_window_focus_at_time */ | 597 | } |
598 | 598 | ||
599 | /** | 599 | /** |
600 | * gets the focus to the window @p win. | 600 | * gets the focus to the window @p win. |
@@ -611,7 +611,7 @@ ecore_x_window_focus_get(void) | |||
611 | win = 0; | 611 | win = 0; |
612 | XGetInputFocus(_ecore_x_disp, &win, &revert_mode); | 612 | XGetInputFocus(_ecore_x_disp, &win, &revert_mode); |
613 | return win; | 613 | return win; |
614 | } /* ecore_x_window_focus_get */ | 614 | } |
615 | 615 | ||
616 | /** | 616 | /** |
617 | * @defgroup Ecore_X_Window_Z_Order_Group X Window Z Order Functions | 617 | * @defgroup Ecore_X_Window_Z_Order_Group X Window Z Order Functions |
@@ -629,7 +629,7 @@ ecore_x_window_raise(Ecore_X_Window win) | |||
629 | { | 629 | { |
630 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 630 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
631 | XRaiseWindow(_ecore_x_disp, win); | 631 | XRaiseWindow(_ecore_x_disp, win); |
632 | } /* ecore_x_window_raise */ | 632 | } |
633 | 633 | ||
634 | /** | 634 | /** |
635 | * Lowers the given window. | 635 | * Lowers the given window. |
@@ -641,7 +641,7 @@ ecore_x_window_lower(Ecore_X_Window win) | |||
641 | { | 641 | { |
642 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 642 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
643 | XLowerWindow(_ecore_x_disp, win); | 643 | XLowerWindow(_ecore_x_disp, win); |
644 | } /* ecore_x_window_lower */ | 644 | } |
645 | 645 | ||
646 | /** | 646 | /** |
647 | * @defgroup Ecore_X_Window_Parent_Group X Window Parent Functions | 647 | * @defgroup Ecore_X_Window_Parent_Group X Window Parent Functions |
@@ -660,15 +660,15 @@ ecore_x_window_lower(Ecore_X_Window win) | |||
660 | EAPI void | 660 | EAPI void |
661 | ecore_x_window_reparent(Ecore_X_Window win, | 661 | ecore_x_window_reparent(Ecore_X_Window win, |
662 | Ecore_X_Window new_parent, | 662 | Ecore_X_Window new_parent, |
663 | int x, | 663 | int x, |
664 | int y) | 664 | int y) |
665 | { | 665 | { |
666 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 666 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
667 | if (new_parent == 0) | 667 | if (new_parent == 0) |
668 | new_parent = DefaultRootWindow(_ecore_x_disp); | 668 | new_parent = DefaultRootWindow(_ecore_x_disp); |
669 | 669 | ||
670 | XReparentWindow(_ecore_x_disp, win, new_parent, x, y); | 670 | XReparentWindow(_ecore_x_disp, win, new_parent, x, y); |
671 | } /* ecore_x_window_reparent */ | 671 | } |
672 | 672 | ||
673 | /** | 673 | /** |
674 | * Retrieves the size of the given window. | 674 | * Retrieves the size of the given window. |
@@ -679,8 +679,8 @@ ecore_x_window_reparent(Ecore_X_Window win, | |||
679 | */ | 679 | */ |
680 | EAPI void | 680 | EAPI void |
681 | ecore_x_window_size_get(Ecore_X_Window win, | 681 | ecore_x_window_size_get(Ecore_X_Window win, |
682 | int *w, | 682 | int *w, |
683 | int *h) | 683 | int *h) |
684 | { | 684 | { |
685 | int dummy_x, dummy_y; | 685 | int dummy_x, dummy_y; |
686 | 686 | ||
@@ -689,7 +689,7 @@ ecore_x_window_size_get(Ecore_X_Window win, | |||
689 | win = DefaultRootWindow(_ecore_x_disp); | 689 | win = DefaultRootWindow(_ecore_x_disp); |
690 | 690 | ||
691 | ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h); | 691 | ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h); |
692 | } /* ecore_x_window_size_get */ | 692 | } |
693 | 693 | ||
694 | /** | 694 | /** |
695 | * Retrieves the geometry of the given window. | 695 | * Retrieves the geometry of the given window. |
@@ -709,17 +709,17 @@ ecore_x_window_size_get(Ecore_X_Window win, | |||
709 | */ | 709 | */ |
710 | EAPI void | 710 | EAPI void |
711 | ecore_x_window_geometry_get(Ecore_X_Window win, | 711 | ecore_x_window_geometry_get(Ecore_X_Window win, |
712 | int *x, | 712 | int *x, |
713 | int *y, | 713 | int *y, |
714 | int *w, | 714 | int *w, |
715 | int *h) | 715 | int *h) |
716 | { | 716 | { |
717 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 717 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
718 | if (!win) | 718 | if (!win) |
719 | win = DefaultRootWindow(_ecore_x_disp); | 719 | win = DefaultRootWindow(_ecore_x_disp); |
720 | 720 | ||
721 | ecore_x_drawable_geometry_get(win, x, y, w, h); | 721 | ecore_x_drawable_geometry_get(win, x, y, w, h); |
722 | } /* ecore_x_window_geometry_get */ | 722 | } |
723 | 723 | ||
724 | /** | 724 | /** |
725 | * Retrieves the width of the border of the given window. | 725 | * Retrieves the width of the border of the given window. |
@@ -736,7 +736,7 @@ ecore_x_window_border_width_get(Ecore_X_Window win) | |||
736 | return 0; | 736 | return 0; |
737 | 737 | ||
738 | return ecore_x_drawable_border_width_get(win); | 738 | return ecore_x_drawable_border_width_get(win); |
739 | } /* ecore_x_window_border_width_get */ | 739 | } |
740 | 740 | ||
741 | /** | 741 | /** |
742 | * Sets the width of the border of the given window. | 742 | * Sets the width of the border of the given window. |
@@ -746,7 +746,7 @@ ecore_x_window_border_width_get(Ecore_X_Window win) | |||
746 | */ | 746 | */ |
747 | EAPI void | 747 | EAPI void |
748 | ecore_x_window_border_width_set(Ecore_X_Window win, | 748 | ecore_x_window_border_width_set(Ecore_X_Window win, |
749 | int width) | 749 | int width) |
750 | { | 750 | { |
751 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 751 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
752 | /* doesn't make sense to call this on a root window */ | 752 | /* doesn't make sense to call this on a root window */ |
@@ -754,7 +754,7 @@ ecore_x_window_border_width_set(Ecore_X_Window win, | |||
754 | return; | 754 | return; |
755 | 755 | ||
756 | XSetWindowBorderWidth (_ecore_x_disp, win, width); | 756 | XSetWindowBorderWidth (_ecore_x_disp, win, width); |
757 | } /* ecore_x_window_border_width_set */ | 757 | } |
758 | 758 | ||
759 | /** | 759 | /** |
760 | * Retrieves the depth of the given window. | 760 | * Retrieves the depth of the given window. |
@@ -766,7 +766,7 @@ ecore_x_window_depth_get(Ecore_X_Window win) | |||
766 | { | 766 | { |
767 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 767 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
768 | return ecore_x_drawable_depth_get(win); | 768 | return ecore_x_drawable_depth_get(win); |
769 | } /* ecore_x_window_depth_get */ | 769 | } |
770 | 770 | ||
771 | /** | 771 | /** |
772 | * To be documented. | 772 | * To be documented. |
@@ -775,7 +775,7 @@ ecore_x_window_depth_get(Ecore_X_Window win) | |||
775 | */ | 775 | */ |
776 | EAPI void | 776 | EAPI void |
777 | ecore_x_window_cursor_show(Ecore_X_Window win, | 777 | ecore_x_window_cursor_show(Ecore_X_Window win, |
778 | Eina_Bool show) | 778 | Eina_Bool show) |
779 | { | 779 | { |
780 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 780 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
781 | if (win == 0) | 781 | if (win == 0) |
@@ -803,7 +803,7 @@ ecore_x_window_cursor_show(Ecore_X_Window win, | |||
803 | } | 803 | } |
804 | else | 804 | else |
805 | XDefineCursor(_ecore_x_disp, win, 0); | 805 | XDefineCursor(_ecore_x_disp, win, 0); |
806 | } /* ecore_x_window_cursor_show */ | 806 | } |
807 | 807 | ||
808 | EAPI void | 808 | EAPI void |
809 | ecore_x_window_cursor_set(Ecore_X_Window win, | 809 | ecore_x_window_cursor_set(Ecore_X_Window win, |
@@ -814,7 +814,7 @@ ecore_x_window_cursor_set(Ecore_X_Window win, | |||
814 | XUndefineCursor(_ecore_x_disp, win); | 814 | XUndefineCursor(_ecore_x_disp, win); |
815 | else | 815 | else |
816 | XDefineCursor(_ecore_x_disp, win, c); | 816 | XDefineCursor(_ecore_x_disp, win, c); |
817 | } /* ecore_x_window_cursor_set */ | 817 | } |
818 | 818 | ||
819 | /** | 819 | /** |
820 | * Finds out whether the given window is currently visible. | 820 | * Finds out whether the given window is currently visible. |
@@ -830,7 +830,7 @@ ecore_x_window_visible_get(Ecore_X_Window win) | |||
830 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 830 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
831 | return XGetWindowAttributes(_ecore_x_disp, win, &attr) && | 831 | return XGetWindowAttributes(_ecore_x_disp, win, &attr) && |
832 | (attr.map_state == IsViewable); | 832 | (attr.map_state == IsViewable); |
833 | } /* ecore_x_window_visible_get */ | 833 | } |
834 | 834 | ||
835 | typedef struct _Shadow Shadow; | 835 | typedef struct _Shadow Shadow; |
836 | struct _Shadow | 836 | struct _Shadow |
@@ -914,7 +914,7 @@ _ecore_x_window_tree_walk(Window win) | |||
914 | XFree(list); | 914 | XFree(list); |
915 | 915 | ||
916 | return s; | 916 | return s; |
917 | } /* _ecore_x_window_tree_walk */ | 917 | } |
918 | 918 | ||
919 | static void | 919 | static void |
920 | _ecore_x_window_tree_shadow_free1(Shadow *s) | 920 | _ecore_x_window_tree_shadow_free1(Shadow *s) |
@@ -935,7 +935,7 @@ _ecore_x_window_tree_shadow_free1(Shadow *s) | |||
935 | } | 935 | } |
936 | 936 | ||
937 | free(s); | 937 | free(s); |
938 | } /* _ecore_x_window_tree_shadow_free1 */ | 938 | } |
939 | 939 | ||
940 | static void | 940 | static void |
941 | _ecore_x_window_tree_shadow_free(void) | 941 | _ecore_x_window_tree_shadow_free(void) |
@@ -955,7 +955,7 @@ _ecore_x_window_tree_shadow_free(void) | |||
955 | free(shadow_base); | 955 | free(shadow_base); |
956 | shadow_base = NULL; | 956 | shadow_base = NULL; |
957 | shadow_num = 0; | 957 | shadow_num = 0; |
958 | } /* _ecore_x_window_tree_shadow_free */ | 958 | } |
959 | 959 | ||
960 | static void | 960 | static void |
961 | _ecore_x_window_tree_shadow_populate(void) | 961 | _ecore_x_window_tree_shadow_populate(void) |
@@ -976,7 +976,7 @@ _ecore_x_window_tree_shadow_populate(void) | |||
976 | 976 | ||
977 | free(roots); | 977 | free(roots); |
978 | } | 978 | } |
979 | } /* _ecore_x_window_tree_shadow_populate */ | 979 | } |
980 | 980 | ||
981 | /* | 981 | /* |
982 | static int shadow_count = 0; | 982 | static int shadow_count = 0; |
@@ -1000,7 +1000,7 @@ _ecore_x_window_tree_shadow_populate(void) | |||
1000 | 1000 | ||
1001 | static Shadow * | 1001 | static Shadow * |
1002 | _ecore_x_window_shadow_tree_find_shadow(Shadow *s, | 1002 | _ecore_x_window_shadow_tree_find_shadow(Shadow *s, |
1003 | Window win) | 1003 | Window win) |
1004 | { | 1004 | { |
1005 | Shadow *ss; | 1005 | Shadow *ss; |
1006 | int i; | 1006 | int i; |
@@ -1020,7 +1020,7 @@ _ecore_x_window_shadow_tree_find_shadow(Shadow *s, | |||
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | return NULL; | 1022 | return NULL; |
1023 | } /* _ecore_x_window_shadow_tree_find_shadow */ | 1023 | } |
1024 | 1024 | ||
1025 | static Shadow * | 1025 | static Shadow * |
1026 | _ecore_x_window_shadow_tree_find(Window base) | 1026 | _ecore_x_window_shadow_tree_find(Window base) |
@@ -1037,16 +1037,16 @@ _ecore_x_window_shadow_tree_find(Window base) | |||
1037 | return s; | 1037 | return s; |
1038 | } | 1038 | } |
1039 | return NULL; | 1039 | return NULL; |
1040 | } /* _ecore_x_window_shadow_tree_find */ | 1040 | } |
1041 | 1041 | ||
1042 | static int | 1042 | static int |
1043 | _inside_rects(Shadow *s, | 1043 | _inside_rects(Shadow *s, |
1044 | int x, | 1044 | int x, |
1045 | int y, | 1045 | int y, |
1046 | int bx, | 1046 | int bx, |
1047 | int by, | 1047 | int by, |
1048 | Ecore_X_Rectangle *rects, | 1048 | Ecore_X_Rectangle *rects, |
1049 | int num) | 1049 | int num) |
1050 | { | 1050 | { |
1051 | int i, inside; | 1051 | int i, inside; |
1052 | 1052 | ||
@@ -1068,13 +1068,13 @@ _inside_rects(Shadow *s, | |||
1068 | } | 1068 | } |
1069 | 1069 | ||
1070 | static Window | 1070 | static Window |
1071 | _ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, | 1071 | _ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, |
1072 | int bx, | 1072 | int bx, |
1073 | int by, | 1073 | int by, |
1074 | int x, | 1074 | int x, |
1075 | int y, | 1075 | int y, |
1076 | Ecore_X_Window *skip, | 1076 | Ecore_X_Window *skip, |
1077 | int skip_num) | 1077 | int skip_num) |
1078 | { | 1078 | { |
1079 | Window child; | 1079 | Window child; |
1080 | int i, j; | 1080 | int i, j; |
@@ -1131,16 +1131,16 @@ onward: | |||
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | return s->win; | 1133 | return s->win; |
1134 | } /* _ecore_x_window_shadow_tree_at_xy_get_shadow */ | 1134 | } |
1135 | 1135 | ||
1136 | static Window | 1136 | static Window |
1137 | _ecore_x_window_shadow_tree_at_xy_get(Window base, | 1137 | _ecore_x_window_shadow_tree_at_xy_get(Window base, |
1138 | int bx, | 1138 | int bx, |
1139 | int by, | 1139 | int by, |
1140 | int x, | 1140 | int x, |
1141 | int y, | 1141 | int y, |
1142 | Ecore_X_Window *skip, | 1142 | Ecore_X_Window *skip, |
1143 | int skip_num) | 1143 | int skip_num) |
1144 | { | 1144 | { |
1145 | Shadow *s; | 1145 | Shadow *s; |
1146 | 1146 | ||
@@ -1162,7 +1162,7 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, | |||
1162 | y, | 1162 | y, |
1163 | skip, | 1163 | skip, |
1164 | skip_num); | 1164 | skip_num); |
1165 | } /* _ecore_x_window_shadow_tree_at_xy_get */ | 1165 | } |
1166 | 1166 | ||
1167 | /** | 1167 | /** |
1168 | * Retrieves the top, visible window at the given location, | 1168 | * Retrieves the top, visible window at the given location, |
@@ -1177,11 +1177,11 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, | |||
1177 | * @ingroup Ecore_X_Window_Geometry_Group | 1177 | * @ingroup Ecore_X_Window_Geometry_Group |
1178 | */ | 1178 | */ |
1179 | EAPI Ecore_X_Window | 1179 | EAPI Ecore_X_Window |
1180 | ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, | 1180 | ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, |
1181 | int x, | 1181 | int x, |
1182 | int y, | 1182 | int y, |
1183 | Ecore_X_Window *skip, | 1183 | Ecore_X_Window *skip, |
1184 | int skip_num) | 1184 | int skip_num) |
1185 | { | 1185 | { |
1186 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1186 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1187 | return _ecore_x_window_shadow_tree_at_xy_get(base, | 1187 | return _ecore_x_window_shadow_tree_at_xy_get(base, |
@@ -1191,7 +1191,7 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, | |||
1191 | y, | 1191 | y, |
1192 | skip, | 1192 | skip, |
1193 | skip_num); | 1193 | skip_num); |
1194 | } /* ecore_x_window_shadow_tree_at_xy_with_skip_get */ | 1194 | } |
1195 | 1195 | ||
1196 | /** | 1196 | /** |
1197 | * Retrieves the parent window a given window has. This uses the shadow window | 1197 | * Retrieves the parent window a given window has. This uses the shadow window |
@@ -1231,7 +1231,7 @@ ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__, | |||
1231 | } | 1231 | } |
1232 | } | 1232 | } |
1233 | return 0; | 1233 | return 0; |
1234 | } /* ecore_x_window_shadow_parent_get */ | 1234 | } |
1235 | 1235 | ||
1236 | /** | 1236 | /** |
1237 | * Flushes the window shadow tree so nothing is stored. | 1237 | * Flushes the window shadow tree so nothing is stored. |
@@ -1242,7 +1242,7 @@ ecore_x_window_shadow_tree_flush(void) | |||
1242 | { | 1242 | { |
1243 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1243 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1244 | _ecore_x_window_tree_shadow_free(); | 1244 | _ecore_x_window_tree_shadow_free(); |
1245 | } /* ecore_x_window_shadow_tree_flush */ | 1245 | } |
1246 | 1246 | ||
1247 | /** | 1247 | /** |
1248 | * Retrieves the root window a given window is on. | 1248 | * Retrieves the root window a given window is on. |
@@ -1260,16 +1260,16 @@ ecore_x_window_root_get(Ecore_X_Window win) | |||
1260 | return 0; | 1260 | return 0; |
1261 | 1261 | ||
1262 | return att.root; | 1262 | return att.root; |
1263 | } /* ecore_x_window_root_get */ | 1263 | } |
1264 | 1264 | ||
1265 | static Window | 1265 | static Window |
1266 | _ecore_x_window_at_xy_get(Window base, | 1266 | _ecore_x_window_at_xy_get(Window base, |
1267 | int bx, | 1267 | int bx, |
1268 | int by, | 1268 | int by, |
1269 | int x, | 1269 | int x, |
1270 | int y, | 1270 | int y, |
1271 | Ecore_X_Window *skip, | 1271 | Ecore_X_Window *skip, |
1272 | int skip_num) | 1272 | int skip_num) |
1273 | { | 1273 | { |
1274 | Window *list = NULL; | 1274 | Window *list = NULL; |
1275 | Window parent_win = 0, child = 0, root_win = 0; | 1275 | Window parent_win = 0, child = 0, root_win = 0; |
@@ -1324,7 +1324,7 @@ onward: | |||
1324 | } | 1324 | } |
1325 | 1325 | ||
1326 | return base; | 1326 | return base; |
1327 | } /* _ecore_x_window_at_xy_get */ | 1327 | } |
1328 | 1328 | ||
1329 | /** | 1329 | /** |
1330 | * Retrieves the top, visible window at the given location. | 1330 | * Retrieves the top, visible window at the given location. |
@@ -1349,7 +1349,7 @@ ecore_x_window_at_xy_get(int x, | |||
1349 | ecore_x_ungrab(); | 1349 | ecore_x_ungrab(); |
1350 | 1350 | ||
1351 | return win ? win : root; | 1351 | return win ? win : root; |
1352 | } /* ecore_x_window_at_xy_get */ | 1352 | } |
1353 | 1353 | ||
1354 | /** | 1354 | /** |
1355 | * Retrieves the top, visible window at the given location, | 1355 | * Retrieves the top, visible window at the given location, |
@@ -1360,10 +1360,10 @@ ecore_x_window_at_xy_get(int x, | |||
1360 | * @ingroup Ecore_X_Window_Geometry_Group | 1360 | * @ingroup Ecore_X_Window_Geometry_Group |
1361 | */ | 1361 | */ |
1362 | EAPI Ecore_X_Window | 1362 | EAPI Ecore_X_Window |
1363 | ecore_x_window_at_xy_with_skip_get(int x, | 1363 | ecore_x_window_at_xy_with_skip_get(int x, |
1364 | int y, | 1364 | int y, |
1365 | Ecore_X_Window *skip, | 1365 | Ecore_X_Window *skip, |
1366 | int skip_num) | 1366 | int skip_num) |
1367 | { | 1367 | { |
1368 | Ecore_X_Window win, root; | 1368 | Ecore_X_Window win, root; |
1369 | 1369 | ||
@@ -1377,12 +1377,12 @@ ecore_x_window_at_xy_with_skip_get(int x, | |||
1377 | ecore_x_ungrab(); | 1377 | ecore_x_ungrab(); |
1378 | 1378 | ||
1379 | return win ? win : root; | 1379 | return win ? win : root; |
1380 | } /* ecore_x_window_at_xy_with_skip_get */ | 1380 | } |
1381 | 1381 | ||
1382 | EAPI Ecore_X_Window | 1382 | EAPI Ecore_X_Window |
1383 | ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, | 1383 | ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, |
1384 | int x, | 1384 | int x, |
1385 | int y) | 1385 | int y) |
1386 | { | 1386 | { |
1387 | Ecore_X_Window win; | 1387 | Ecore_X_Window win; |
1388 | 1388 | ||
@@ -1392,7 +1392,7 @@ ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, | |||
1392 | ecore_x_ungrab(); | 1392 | ecore_x_ungrab(); |
1393 | 1393 | ||
1394 | return win ? win : begin; | 1394 | return win ? win : begin; |
1395 | } /* ecore_x_window_at_xy_begin_get */ | 1395 | } |
1396 | 1396 | ||
1397 | /** | 1397 | /** |
1398 | * Retrieves the parent window of the given window. | 1398 | * Retrieves the parent window of the given window. |
@@ -1414,7 +1414,7 @@ ecore_x_window_parent_get(Ecore_X_Window win) | |||
1414 | XFree(children); | 1414 | XFree(children); |
1415 | 1415 | ||
1416 | return parent; | 1416 | return parent; |
1417 | } /* ecore_x_window_parent_get */ | 1417 | } |
1418 | 1418 | ||
1419 | /** | 1419 | /** |
1420 | * Sets the background color of the given window. | 1420 | * Sets the background color of the given window. |
@@ -1443,10 +1443,10 @@ ecore_x_window_background_color_set(Ecore_X_Window win, | |||
1443 | 1443 | ||
1444 | attr.background_pixel = col.pixel; | 1444 | attr.background_pixel = col.pixel; |
1445 | XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr); | 1445 | XChangeWindowAttributes(_ecore_x_disp, win, CWBackPixel, &attr); |
1446 | } /* ecore_x_window_background_color_set */ | 1446 | } |
1447 | 1447 | ||
1448 | EAPI void | 1448 | EAPI void |
1449 | ecore_x_window_gravity_set(Ecore_X_Window win, | 1449 | ecore_x_window_gravity_set(Ecore_X_Window win, |
1450 | Ecore_X_Gravity grav) | 1450 | Ecore_X_Gravity grav) |
1451 | { | 1451 | { |
1452 | XSetWindowAttributes att; | 1452 | XSetWindowAttributes att; |
@@ -1454,10 +1454,10 @@ ecore_x_window_gravity_set(Ecore_X_Window win, | |||
1454 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1454 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1455 | att.win_gravity = grav; | 1455 | att.win_gravity = grav; |
1456 | XChangeWindowAttributes(_ecore_x_disp, win, CWWinGravity, &att); | 1456 | XChangeWindowAttributes(_ecore_x_disp, win, CWWinGravity, &att); |
1457 | } /* ecore_x_window_gravity_set */ | 1457 | } |
1458 | 1458 | ||
1459 | EAPI void | 1459 | EAPI void |
1460 | ecore_x_window_pixel_gravity_set(Ecore_X_Window win, | 1460 | ecore_x_window_pixel_gravity_set(Ecore_X_Window win, |
1461 | Ecore_X_Gravity grav) | 1461 | Ecore_X_Gravity grav) |
1462 | { | 1462 | { |
1463 | XSetWindowAttributes att; | 1463 | XSetWindowAttributes att; |
@@ -1465,7 +1465,7 @@ ecore_x_window_pixel_gravity_set(Ecore_X_Window win, | |||
1465 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1465 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1466 | att.bit_gravity = grav; | 1466 | att.bit_gravity = grav; |
1467 | XChangeWindowAttributes(_ecore_x_disp, win, CWBitGravity, &att); | 1467 | XChangeWindowAttributes(_ecore_x_disp, win, CWBitGravity, &att); |
1468 | } /* ecore_x_window_pixel_gravity_set */ | 1468 | } |
1469 | 1469 | ||
1470 | EAPI void | 1470 | EAPI void |
1471 | ecore_x_window_pixmap_set(Ecore_X_Window win, | 1471 | ecore_x_window_pixmap_set(Ecore_X_Window win, |
@@ -1473,50 +1473,50 @@ ecore_x_window_pixmap_set(Ecore_X_Window win, | |||
1473 | { | 1473 | { |
1474 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1474 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1475 | XSetWindowBackgroundPixmap(_ecore_x_disp, win, pmap); | 1475 | XSetWindowBackgroundPixmap(_ecore_x_disp, win, pmap); |
1476 | } /* ecore_x_window_pixmap_set */ | 1476 | } |
1477 | 1477 | ||
1478 | EAPI void | 1478 | EAPI void |
1479 | ecore_x_window_area_clear(Ecore_X_Window win, | 1479 | ecore_x_window_area_clear(Ecore_X_Window win, |
1480 | int x, | 1480 | int x, |
1481 | int y, | 1481 | int y, |
1482 | int w, | 1482 | int w, |
1483 | int h) | 1483 | int h) |
1484 | { | 1484 | { |
1485 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1485 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1486 | XClearArea(_ecore_x_disp, win, x, y, w, h, False); | 1486 | XClearArea(_ecore_x_disp, win, x, y, w, h, False); |
1487 | } /* ecore_x_window_area_clear */ | 1487 | } |
1488 | 1488 | ||
1489 | EAPI void | 1489 | EAPI void |
1490 | ecore_x_window_area_expose(Ecore_X_Window win, | 1490 | ecore_x_window_area_expose(Ecore_X_Window win, |
1491 | int x, | 1491 | int x, |
1492 | int y, | 1492 | int y, |
1493 | int w, | 1493 | int w, |
1494 | int h) | 1494 | int h) |
1495 | { | 1495 | { |
1496 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1496 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1497 | XClearArea(_ecore_x_disp, win, x, y, w, h, True); | 1497 | XClearArea(_ecore_x_disp, win, x, y, w, h, True); |
1498 | } /* ecore_x_window_area_expose */ | 1498 | } |
1499 | 1499 | ||
1500 | EAPI void | 1500 | EAPI void |
1501 | ecore_x_window_override_set(Ecore_X_Window win, | 1501 | ecore_x_window_override_set(Ecore_X_Window win, |
1502 | Eina_Bool override) | 1502 | Eina_Bool override) |
1503 | { | 1503 | { |
1504 | XSetWindowAttributes att; | 1504 | XSetWindowAttributes att; |
1505 | 1505 | ||
1506 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1506 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
1507 | att.override_redirect = override; | 1507 | att.override_redirect = override; |
1508 | XChangeWindowAttributes(_ecore_x_disp, win, CWOverrideRedirect, &att); | 1508 | XChangeWindowAttributes(_ecore_x_disp, win, CWOverrideRedirect, &att); |
1509 | } /* ecore_x_window_override_set */ | 1509 | } |
1510 | 1510 | ||
1511 | #ifdef ECORE_XRENDER | 1511 | #ifdef ECORE_XRENDER |
1512 | static Ecore_X_Window | 1512 | static Ecore_X_Window |
1513 | _ecore_x_window_argb_internal_new(Ecore_X_Window parent, | 1513 | _ecore_x_window_argb_internal_new(Ecore_X_Window parent, |
1514 | int x, | 1514 | int x, |
1515 | int y, | 1515 | int y, |
1516 | int w, | 1516 | int w, |
1517 | int h, | 1517 | int h, |
1518 | Eina_Bool override, | 1518 | Eina_Bool override, |
1519 | Eina_Bool saveunder) | 1519 | Eina_Bool saveunder) |
1520 | { | 1520 | { |
1521 | Window win; | 1521 | Window win; |
1522 | XSetWindowAttributes attr; | 1522 | XSetWindowAttributes attr; |
@@ -1535,15 +1535,15 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent, | |||
1535 | else | 1535 | else |
1536 | { | 1536 | { |
1537 | /* ewww - round trip */ | 1537 | /* ewww - round trip */ |
1538 | XGetWindowAttributes(_ecore_x_disp, parent, &att); | 1538 | XGetWindowAttributes(_ecore_x_disp, parent, &att); |
1539 | for (i = 0; i < ScreenCount(_ecore_x_disp); i++) | 1539 | for (i = 0; i < ScreenCount(_ecore_x_disp); i++) |
1540 | { | 1540 | { |
1541 | if (att.screen == ScreenOfDisplay(_ecore_x_disp, i)) | 1541 | if (att.screen == ScreenOfDisplay(_ecore_x_disp, i)) |
1542 | { | 1542 | { |
1543 | scr = i; | 1543 | scr = i; |
1544 | break; | 1544 | break; |
1545 | } | 1545 | } |
1546 | } | 1546 | } |
1547 | } | 1547 | } |
1548 | 1548 | ||
1549 | vi_in.screen = scr; | 1549 | vi_in.screen = scr; |
@@ -1615,7 +1615,7 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent, | |||
1615 | ecore_x_window_defaults_set(win); | 1615 | ecore_x_window_defaults_set(win); |
1616 | 1616 | ||
1617 | return win; | 1617 | return win; |
1618 | } /* _ecore_x_window_argb_internal_new */ | 1618 | } |
1619 | 1619 | ||
1620 | #endif /* ifdef ECORE_XRENDER */ | 1620 | #endif /* ifdef ECORE_XRENDER */ |
1621 | 1621 | ||
@@ -1641,7 +1641,7 @@ ecore_x_window_argb_get(Ecore_X_Window win) | |||
1641 | #else /* ifdef ECORE_XRENDER */ | 1641 | #else /* ifdef ECORE_XRENDER */ |
1642 | return 0; | 1642 | return 0; |
1643 | #endif /* ifdef ECORE_XRENDER */ | 1643 | #endif /* ifdef ECORE_XRENDER */ |
1644 | } /* ecore_x_window_argb_get */ | 1644 | } |
1645 | 1645 | ||
1646 | /** | 1646 | /** |
1647 | * Creates a new window. | 1647 | * Creates a new window. |
@@ -1656,10 +1656,10 @@ ecore_x_window_argb_get(Ecore_X_Window win) | |||
1656 | */ | 1656 | */ |
1657 | EAPI Ecore_X_Window | 1657 | EAPI Ecore_X_Window |
1658 | ecore_x_window_manager_argb_new(Ecore_X_Window parent, | 1658 | ecore_x_window_manager_argb_new(Ecore_X_Window parent, |
1659 | int x, | 1659 | int x, |
1660 | int y, | 1660 | int y, |
1661 | int w, | 1661 | int w, |
1662 | int h) | 1662 | int h) |
1663 | { | 1663 | { |
1664 | #ifdef ECORE_XRENDER | 1664 | #ifdef ECORE_XRENDER |
1665 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1665 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -1667,7 +1667,7 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent, | |||
1667 | #else /* ifdef ECORE_XRENDER */ | 1667 | #else /* ifdef ECORE_XRENDER */ |
1668 | return 0; | 1668 | return 0; |
1669 | #endif /* ifdef ECORE_XRENDER */ | 1669 | #endif /* ifdef ECORE_XRENDER */ |
1670 | } /* ecore_x_window_manager_argb_new */ | 1670 | } |
1671 | 1671 | ||
1672 | /** | 1672 | /** |
1673 | * Creates a new window. | 1673 | * Creates a new window. |
@@ -1682,10 +1682,10 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent, | |||
1682 | */ | 1682 | */ |
1683 | EAPI Ecore_X_Window | 1683 | EAPI Ecore_X_Window |
1684 | ecore_x_window_argb_new(Ecore_X_Window parent, | 1684 | ecore_x_window_argb_new(Ecore_X_Window parent, |
1685 | int x, | 1685 | int x, |
1686 | int y, | 1686 | int y, |
1687 | int w, | 1687 | int w, |
1688 | int h) | 1688 | int h) |
1689 | { | 1689 | { |
1690 | #ifdef ECORE_XRENDER | 1690 | #ifdef ECORE_XRENDER |
1691 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1691 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -1693,7 +1693,7 @@ ecore_x_window_argb_new(Ecore_X_Window parent, | |||
1693 | #else /* ifdef ECORE_XRENDER */ | 1693 | #else /* ifdef ECORE_XRENDER */ |
1694 | return 0; | 1694 | return 0; |
1695 | #endif /* ifdef ECORE_XRENDER */ | 1695 | #endif /* ifdef ECORE_XRENDER */ |
1696 | } /* ecore_x_window_argb_new */ | 1696 | } |
1697 | 1697 | ||
1698 | /** | 1698 | /** |
1699 | * Creates a window with the override redirect attribute set to @c True. | 1699 | * Creates a window with the override redirect attribute set to @c True. |
@@ -1708,10 +1708,10 @@ ecore_x_window_argb_new(Ecore_X_Window parent, | |||
1708 | */ | 1708 | */ |
1709 | EAPI Ecore_X_Window | 1709 | EAPI Ecore_X_Window |
1710 | ecore_x_window_override_argb_new(Ecore_X_Window parent, | 1710 | ecore_x_window_override_argb_new(Ecore_X_Window parent, |
1711 | int x, | 1711 | int x, |
1712 | int y, | 1712 | int y, |
1713 | int w, | 1713 | int w, |
1714 | int h) | 1714 | int h) |
1715 | { | 1715 | { |
1716 | #ifdef ECORE_XRENDER | 1716 | #ifdef ECORE_XRENDER |
1717 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 1717 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -1719,5 +1719,5 @@ ecore_x_window_override_argb_new(Ecore_X_Window parent, | |||
1719 | #else /* ifdef ECORE_XRENDER */ | 1719 | #else /* ifdef ECORE_XRENDER */ |
1720 | return 0; | 1720 | return 0; |
1721 | #endif /* ifdef ECORE_XRENDER */ | 1721 | #endif /* ifdef ECORE_XRENDER */ |
1722 | } /* ecore_x_window_override_argb_new */ | 1722 | } |
1723 | 1723 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c index 8d5c757..b581a0e 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c | |||
@@ -21,9 +21,9 @@ | |||
21 | */ | 21 | */ |
22 | EAPI void | 22 | EAPI void |
23 | ecore_x_window_prop_card32_set(Ecore_X_Window win, | 23 | ecore_x_window_prop_card32_set(Ecore_X_Window win, |
24 | Ecore_X_Atom atom, | 24 | Ecore_X_Atom atom, |
25 | unsigned int *val, | 25 | unsigned int *val, |
26 | unsigned int num) | 26 | unsigned int num) |
27 | { | 27 | { |
28 | #if SIZEOF_INT == SIZEOF_LONG | 28 | #if SIZEOF_INT == SIZEOF_LONG |
29 | _ATOM_SET_CARD32(win, atom, val, num); | 29 | _ATOM_SET_CARD32(win, atom, val, num); |
@@ -41,7 +41,7 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, | |||
41 | _ATOM_SET_CARD32(win, atom, v2, num); | 41 | _ATOM_SET_CARD32(win, atom, v2, num); |
42 | free(v2); | 42 | free(v2); |
43 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ | 43 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ |
44 | } /* ecore_x_window_prop_card32_set */ | 44 | } |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Get CARD32 (array) property | 47 | * Get CARD32 (array) property |
@@ -53,9 +53,9 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, | |||
53 | */ | 53 | */ |
54 | EAPI int | 54 | EAPI int |
55 | ecore_x_window_prop_card32_get(Ecore_X_Window win, | 55 | ecore_x_window_prop_card32_get(Ecore_X_Window win, |
56 | Ecore_X_Atom atom, | 56 | Ecore_X_Atom atom, |
57 | unsigned int *val, | 57 | unsigned int *val, |
58 | unsigned int len) | 58 | unsigned int len) |
59 | { | 59 | { |
60 | unsigned char *prop_ret; | 60 | unsigned char *prop_ret; |
61 | Atom type_ret; | 61 | Atom type_ret; |
@@ -89,7 +89,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, | |||
89 | XFree(prop_ret); | 89 | XFree(prop_ret); |
90 | 90 | ||
91 | return num; | 91 | return num; |
92 | } /* ecore_x_window_prop_card32_get */ | 92 | } |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Get CARD32 (array) property of any length | 95 | * Get CARD32 (array) property of any length |
@@ -100,7 +100,7 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, | |||
100 | */ | 100 | */ |
101 | EAPI int | 101 | EAPI int |
102 | ecore_x_window_prop_card32_list_get(Ecore_X_Window win, | 102 | ecore_x_window_prop_card32_list_get(Ecore_X_Window win, |
103 | Ecore_X_Atom atom, | 103 | Ecore_X_Atom atom, |
104 | unsigned int **plst) | 104 | unsigned int **plst) |
105 | { | 105 | { |
106 | unsigned char *prop_ret; | 106 | unsigned char *prop_ret; |
@@ -125,7 +125,7 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, | |||
125 | else | 125 | else |
126 | { | 126 | { |
127 | val = malloc(num_ret * sizeof(unsigned int)); | 127 | val = malloc(num_ret * sizeof(unsigned int)); |
128 | if (!val) | 128 | if (!val) |
129 | { | 129 | { |
130 | if (prop_ret) XFree(prop_ret); | 130 | if (prop_ret) XFree(prop_ret); |
131 | return -1; | 131 | return -1; |
@@ -140,17 +140,17 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, | |||
140 | XFree(prop_ret); | 140 | XFree(prop_ret); |
141 | 141 | ||
142 | return num; | 142 | return num; |
143 | } /* ecore_x_window_prop_card32_list_get */ | 143 | } |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * Set X ID (array) property | 146 | * Set X ID (array) property |
147 | */ | 147 | */ |
148 | EAPI void | 148 | EAPI void |
149 | ecore_x_window_prop_xid_set(Ecore_X_Window win, | 149 | ecore_x_window_prop_xid_set(Ecore_X_Window win, |
150 | Ecore_X_Atom atom, | 150 | Ecore_X_Atom atom, |
151 | Ecore_X_Atom type, | 151 | Ecore_X_Atom type, |
152 | Ecore_X_ID *lst, | 152 | Ecore_X_ID *lst, |
153 | unsigned int num) | 153 | unsigned int num) |
154 | { | 154 | { |
155 | #if SIZEOF_INT == SIZEOF_LONG | 155 | #if SIZEOF_INT == SIZEOF_LONG |
156 | XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace, | 156 | XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace, |
@@ -170,7 +170,7 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, | |||
170 | (unsigned char *)pl, num); | 170 | (unsigned char *)pl, num); |
171 | free(pl); | 171 | free(pl); |
172 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ | 172 | #endif /* if SIZEOF_INT == SIZEOF_LONG */ |
173 | } /* ecore_x_window_prop_xid_set */ | 173 | } |
174 | 174 | ||
175 | /* | 175 | /* |
176 | * Get X ID (array) property | 176 | * Get X ID (array) property |
@@ -182,10 +182,10 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, | |||
182 | */ | 182 | */ |
183 | EAPI int | 183 | EAPI int |
184 | ecore_x_window_prop_xid_get(Ecore_X_Window win, | 184 | ecore_x_window_prop_xid_get(Ecore_X_Window win, |
185 | Ecore_X_Atom atom, | 185 | Ecore_X_Atom atom, |
186 | Ecore_X_Atom type, | 186 | Ecore_X_Atom type, |
187 | Ecore_X_ID *lst, | 187 | Ecore_X_ID *lst, |
188 | unsigned int len) | 188 | unsigned int len) |
189 | { | 189 | { |
190 | unsigned char *prop_ret; | 190 | unsigned char *prop_ret; |
191 | Atom type_ret; | 191 | Atom type_ret; |
@@ -219,7 +219,7 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, | |||
219 | XFree(prop_ret); | 219 | XFree(prop_ret); |
220 | 220 | ||
221 | return num; | 221 | return num; |
222 | } /* ecore_x_window_prop_xid_get */ | 222 | } |
223 | 223 | ||
224 | /* | 224 | /* |
225 | * Get X ID (array) property | 225 | * Get X ID (array) property |
@@ -231,9 +231,9 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, | |||
231 | */ | 231 | */ |
232 | EAPI int | 232 | EAPI int |
233 | ecore_x_window_prop_xid_list_get(Ecore_X_Window win, | 233 | ecore_x_window_prop_xid_list_get(Ecore_X_Window win, |
234 | Ecore_X_Atom atom, | 234 | Ecore_X_Atom atom, |
235 | Ecore_X_Atom type, | 235 | Ecore_X_Atom type, |
236 | Ecore_X_ID **val) | 236 | Ecore_X_ID **val) |
237 | { | 237 | { |
238 | unsigned char *prop_ret; | 238 | unsigned char *prop_ret; |
239 | Atom type_ret; | 239 | Atom type_ret; |
@@ -268,17 +268,17 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, | |||
268 | XFree(prop_ret); | 268 | XFree(prop_ret); |
269 | 269 | ||
270 | return num; | 270 | return num; |
271 | } /* ecore_x_window_prop_xid_list_get */ | 271 | } |
272 | 272 | ||
273 | /* | 273 | /* |
274 | * Remove/add/toggle X ID list item. | 274 | * Remove/add/toggle X ID list item. |
275 | */ | 275 | */ |
276 | EAPI void | 276 | EAPI void |
277 | ecore_x_window_prop_xid_list_change(Ecore_X_Window win, | 277 | ecore_x_window_prop_xid_list_change(Ecore_X_Window win, |
278 | Ecore_X_Atom atom, | 278 | Ecore_X_Atom atom, |
279 | Ecore_X_Atom type, | 279 | Ecore_X_Atom type, |
280 | Ecore_X_ID item, | 280 | Ecore_X_ID item, |
281 | int op) | 281 | int op) |
282 | { | 282 | { |
283 | Ecore_X_ID *lst; | 283 | Ecore_X_ID *lst; |
284 | int i, num; | 284 | int i, num; |
@@ -300,22 +300,22 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, | |||
300 | if (i < num) | 300 | if (i < num) |
301 | { | 301 | { |
302 | /* Was in list */ | 302 | /* Was in list */ |
303 | if (op == ECORE_X_PROP_LIST_ADD) | 303 | if (op == ECORE_X_PROP_LIST_ADD) |
304 | goto done; /* Remove it */ | 304 | goto done; /* Remove it */ |
305 | 305 | ||
306 | num--; | 306 | num--; |
307 | for (; i < num; i++) | 307 | for (; i < num; i++) |
308 | lst[i] = lst[i + 1]; | 308 | lst[i] = lst[i + 1]; |
309 | } | 309 | } |
310 | else | 310 | else |
311 | { | 311 | { |
312 | /* Was not in list */ | 312 | /* Was not in list */ |
313 | if (op == ECORE_X_PROP_LIST_REMOVE) | 313 | if (op == ECORE_X_PROP_LIST_REMOVE) |
314 | goto done; /* Add it */ | 314 | goto done; /* Add it */ |
315 | 315 | ||
316 | num++; | 316 | num++; |
317 | lst = realloc(lst, num * sizeof(Ecore_X_ID)); | 317 | lst = realloc(lst, num * sizeof(Ecore_X_ID)); |
318 | lst[i] = item; | 318 | lst[i] = item; |
319 | } | 319 | } |
320 | 320 | ||
321 | ecore_x_window_prop_xid_set(win, atom, type, lst, num); | 321 | ecore_x_window_prop_xid_set(win, atom, type, lst, num); |
@@ -323,20 +323,20 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, | |||
323 | done: | 323 | done: |
324 | if (lst) | 324 | if (lst) |
325 | free(lst); | 325 | free(lst); |
326 | } /* ecore_x_window_prop_xid_list_change */ | 326 | } |
327 | 327 | ||
328 | /* | 328 | /* |
329 | * Set Atom (array) property | 329 | * Set Atom (array) property |
330 | */ | 330 | */ |
331 | EAPI void | 331 | EAPI void |
332 | ecore_x_window_prop_atom_set(Ecore_X_Window win, | 332 | ecore_x_window_prop_atom_set(Ecore_X_Window win, |
333 | Ecore_X_Atom atom, | 333 | Ecore_X_Atom atom, |
334 | Ecore_X_Atom *lst, | 334 | Ecore_X_Atom *lst, |
335 | unsigned int num) | 335 | unsigned int num) |
336 | { | 336 | { |
337 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 337 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
338 | ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num); | 338 | ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num); |
339 | } /* ecore_x_window_prop_atom_set */ | 339 | } |
340 | 340 | ||
341 | /* | 341 | /* |
342 | * Get Atom (array) property | 342 | * Get Atom (array) property |
@@ -348,13 +348,13 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, | |||
348 | */ | 348 | */ |
349 | EAPI int | 349 | EAPI int |
350 | ecore_x_window_prop_atom_get(Ecore_X_Window win, | 350 | ecore_x_window_prop_atom_get(Ecore_X_Window win, |
351 | Ecore_X_Atom atom, | 351 | Ecore_X_Atom atom, |
352 | Ecore_X_Atom *lst, | 352 | Ecore_X_Atom *lst, |
353 | unsigned int len) | 353 | unsigned int len) |
354 | { | 354 | { |
355 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 355 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
356 | return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len); | 356 | return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len); |
357 | } /* ecore_x_window_prop_atom_get */ | 357 | } |
358 | 358 | ||
359 | /* | 359 | /* |
360 | * Get Atom (array) property | 360 | * Get Atom (array) property |
@@ -366,38 +366,38 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win, | |||
366 | */ | 366 | */ |
367 | EAPI int | 367 | EAPI int |
368 | ecore_x_window_prop_atom_list_get(Ecore_X_Window win, | 368 | ecore_x_window_prop_atom_list_get(Ecore_X_Window win, |
369 | Ecore_X_Atom atom, | 369 | Ecore_X_Atom atom, |
370 | Ecore_X_Atom **plst) | 370 | Ecore_X_Atom **plst) |
371 | { | 371 | { |
372 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 372 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
373 | return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst); | 373 | return ecore_x_window_prop_xid_list_get(win, atom, XA_ATOM, plst); |
374 | } /* ecore_x_window_prop_atom_list_get */ | 374 | } |
375 | 375 | ||
376 | /* | 376 | /* |
377 | * Remove/add/toggle atom list item. | 377 | * Remove/add/toggle atom list item. |
378 | */ | 378 | */ |
379 | EAPI void | 379 | EAPI void |
380 | ecore_x_window_prop_atom_list_change(Ecore_X_Window win, | 380 | ecore_x_window_prop_atom_list_change(Ecore_X_Window win, |
381 | Ecore_X_Atom atom, | 381 | Ecore_X_Atom atom, |
382 | Ecore_X_Atom item, | 382 | Ecore_X_Atom item, |
383 | int op) | 383 | int op) |
384 | { | 384 | { |
385 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 385 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
386 | ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op); | 386 | ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op); |
387 | } /* ecore_x_window_prop_atom_list_change */ | 387 | } |
388 | 388 | ||
389 | /* | 389 | /* |
390 | * Set Window (array) property | 390 | * Set Window (array) property |
391 | */ | 391 | */ |
392 | EAPI void | 392 | EAPI void |
393 | ecore_x_window_prop_window_set(Ecore_X_Window win, | 393 | ecore_x_window_prop_window_set(Ecore_X_Window win, |
394 | Ecore_X_Atom atom, | 394 | Ecore_X_Atom atom, |
395 | Ecore_X_Window *lst, | 395 | Ecore_X_Window *lst, |
396 | unsigned int num) | 396 | unsigned int num) |
397 | { | 397 | { |
398 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 398 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
399 | ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num); | 399 | ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num); |
400 | } /* ecore_x_window_prop_window_set */ | 400 | } |
401 | 401 | ||
402 | /* | 402 | /* |
403 | * Get Window (array) property | 403 | * Get Window (array) property |
@@ -408,14 +408,14 @@ ecore_x_window_prop_window_set(Ecore_X_Window win, | |||
408 | * Note: Return value 0 means that the property exists but has no elements. | 408 | * Note: Return value 0 means that the property exists but has no elements. |
409 | */ | 409 | */ |
410 | EAPI int | 410 | EAPI int |
411 | ecore_x_window_prop_window_get(Ecore_X_Window win, | 411 | ecore_x_window_prop_window_get(Ecore_X_Window win, |
412 | Ecore_X_Atom atom, | 412 | Ecore_X_Atom atom, |
413 | Ecore_X_Window *lst, | 413 | Ecore_X_Window *lst, |
414 | unsigned int len) | 414 | unsigned int len) |
415 | { | 415 | { |
416 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 416 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
417 | return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len); | 417 | return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len); |
418 | } /* ecore_x_window_prop_window_get */ | 418 | } |
419 | 419 | ||
420 | /* | 420 | /* |
421 | * Get Window (array) property | 421 | * Get Window (array) property |
@@ -426,13 +426,13 @@ ecore_x_window_prop_window_get(Ecore_X_Window win, | |||
426 | * Note: Return value 0 means that the property exists but has no elements. | 426 | * Note: Return value 0 means that the property exists but has no elements. |
427 | */ | 427 | */ |
428 | EAPI int | 428 | EAPI int |
429 | ecore_x_window_prop_window_list_get(Ecore_X_Window win, | 429 | ecore_x_window_prop_window_list_get(Ecore_X_Window win, |
430 | Ecore_X_Atom atom, | 430 | Ecore_X_Atom atom, |
431 | Ecore_X_Window **plst) | 431 | Ecore_X_Window **plst) |
432 | { | 432 | { |
433 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 433 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
434 | return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst); | 434 | return ecore_x_window_prop_xid_list_get(win, atom, XA_WINDOW, plst); |
435 | } /* ecore_x_window_prop_window_list_get */ | 435 | } |
436 | 436 | ||
437 | /** | 437 | /** |
438 | * To be documented. | 438 | * To be documented. |
@@ -443,7 +443,7 @@ EAPI Ecore_X_Atom | |||
443 | ecore_x_window_prop_any_type(void) | 443 | ecore_x_window_prop_any_type(void) |
444 | { | 444 | { |
445 | return AnyPropertyType; | 445 | return AnyPropertyType; |
446 | } /* ecore_x_window_prop_any_type */ | 446 | } |
447 | 447 | ||
448 | /** | 448 | /** |
449 | * To be documented. | 449 | * To be documented. |
@@ -452,11 +452,11 @@ ecore_x_window_prop_any_type(void) | |||
452 | */ | 452 | */ |
453 | EAPI void | 453 | EAPI void |
454 | ecore_x_window_prop_property_set(Ecore_X_Window win, | 454 | ecore_x_window_prop_property_set(Ecore_X_Window win, |
455 | Ecore_X_Atom property, | 455 | Ecore_X_Atom property, |
456 | Ecore_X_Atom type, | 456 | Ecore_X_Atom type, |
457 | int size, | 457 | int size, |
458 | void *data, | 458 | void *data, |
459 | int number) | 459 | int number) |
460 | { | 460 | { |
461 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 461 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
462 | if (win == 0) | 462 | if (win == 0) |
@@ -479,13 +479,14 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, | |||
479 | dat = malloc(sizeof(unsigned long) * number); | 479 | dat = malloc(sizeof(unsigned long) * number); |
480 | if (dat) | 480 | if (dat) |
481 | { | 481 | { |
482 | for (ptr = (int *)data, i = 0; i < number; i++) dat[i] = ptr[i]; | 482 | for (ptr = (int *)data, i = 0; i < number; i++) |
483 | dat[i] = ptr[i]; | ||
483 | XChangeProperty(_ecore_x_disp, win, property, type, size, | 484 | XChangeProperty(_ecore_x_disp, win, property, type, size, |
484 | PropModeReplace, (unsigned char *)dat, number); | 485 | PropModeReplace, (unsigned char *)dat, number); |
485 | free(dat); | 486 | free(dat); |
486 | } | 487 | } |
487 | } | 488 | } |
488 | } /* ecore_x_window_prop_property_set */ | 489 | } |
489 | 490 | ||
490 | /** | 491 | /** |
491 | * To be documented. | 492 | * To be documented. |
@@ -493,12 +494,12 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, | |||
493 | * FIXME: To be fixed. | 494 | * FIXME: To be fixed. |
494 | */ | 495 | */ |
495 | EAPI int | 496 | EAPI int |
496 | ecore_x_window_prop_property_get(Ecore_X_Window win, | 497 | ecore_x_window_prop_property_get(Ecore_X_Window win, |
497 | Ecore_X_Atom property, | 498 | Ecore_X_Atom property, |
498 | Ecore_X_Atom type, | 499 | Ecore_X_Atom type, |
499 | int size __UNUSED__, | 500 | int size __UNUSED__, |
500 | unsigned char **data, | 501 | unsigned char **data, |
501 | int *num) | 502 | int *num) |
502 | { | 503 | { |
503 | Atom type_ret = 0; | 504 | Atom type_ret = 0; |
504 | int ret, size_ret = 0; | 505 | int ret, size_ret = 0; |
@@ -552,7 +553,7 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, | |||
552 | for (i = 0; i < num_ret; i++) | 553 | for (i = 0; i < num_ret; i++) |
553 | ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i]; | 554 | ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i]; |
554 | break; | 555 | break; |
555 | } /* switch */ | 556 | } |
556 | 557 | ||
557 | XFree(prop_ret); | 558 | XFree(prop_ret); |
558 | 559 | ||
@@ -560,19 +561,19 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, | |||
560 | *num = num_ret; | 561 | *num = num_ret; |
561 | 562 | ||
562 | return size_ret; | 563 | return size_ret; |
563 | } /* ecore_x_window_prop_property_get */ | 564 | } |
564 | 565 | ||
565 | EAPI void | 566 | EAPI void |
566 | ecore_x_window_prop_property_del(Ecore_X_Window win, | 567 | ecore_x_window_prop_property_del(Ecore_X_Window win, |
567 | Ecore_X_Atom property) | 568 | Ecore_X_Atom property) |
568 | { | 569 | { |
569 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 570 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
570 | XDeleteProperty(_ecore_x_disp, win, property); | 571 | XDeleteProperty(_ecore_x_disp, win, property); |
571 | } /* ecore_x_window_prop_property_del */ | 572 | } |
572 | 573 | ||
573 | EAPI Ecore_X_Atom * | 574 | EAPI Ecore_X_Atom * |
574 | ecore_x_window_prop_list(Ecore_X_Window win, | 575 | ecore_x_window_prop_list(Ecore_X_Window win, |
575 | int *num_ret) | 576 | int *num_ret) |
576 | { | 577 | { |
577 | Ecore_X_Atom *atoms; | 578 | Ecore_X_Atom *atoms; |
578 | Atom *atom_ret; | 579 | Atom *atom_ret; |
@@ -589,14 +590,15 @@ ecore_x_window_prop_list(Ecore_X_Window win, | |||
589 | atoms = malloc(num * sizeof(Ecore_X_Atom)); | 590 | atoms = malloc(num * sizeof(Ecore_X_Atom)); |
590 | if (atoms) | 591 | if (atoms) |
591 | { | 592 | { |
592 | for (i = 0; i < num; i++) atoms[i] = atom_ret[i]; | 593 | for (i = 0; i < num; i++) |
594 | atoms[i] = atom_ret[i]; | ||
593 | if (num_ret) | 595 | if (num_ret) |
594 | *num_ret = num; | 596 | *num_ret = num; |
595 | } | 597 | } |
596 | 598 | ||
597 | XFree(atom_ret); | 599 | XFree(atom_ret); |
598 | return atoms; | 600 | return atoms; |
599 | } /* ecore_x_window_prop_list */ | 601 | } |
600 | 602 | ||
601 | /** | 603 | /** |
602 | * Set a window string property. | 604 | * Set a window string property. |
@@ -608,8 +610,8 @@ ecore_x_window_prop_list(Ecore_X_Window win, | |||
608 | */ | 610 | */ |
609 | EAPI void | 611 | EAPI void |
610 | ecore_x_window_prop_string_set(Ecore_X_Window win, | 612 | ecore_x_window_prop_string_set(Ecore_X_Window win, |
611 | Ecore_X_Atom type, | 613 | Ecore_X_Atom type, |
612 | const char *str) | 614 | const char *str) |
613 | { | 615 | { |
614 | XTextProperty xtp; | 616 | XTextProperty xtp; |
615 | 617 | ||
@@ -622,7 +624,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, | |||
622 | xtp.encoding = ECORE_X_ATOM_UTF8_STRING; | 624 | xtp.encoding = ECORE_X_ATOM_UTF8_STRING; |
623 | xtp.nitems = strlen(str); | 625 | xtp.nitems = strlen(str); |
624 | XSetTextProperty(_ecore_x_disp, win, &xtp, type); | 626 | XSetTextProperty(_ecore_x_disp, win, &xtp, type); |
625 | } /* ecore_x_window_prop_string_set */ | 627 | } |
626 | 628 | ||
627 | /** | 629 | /** |
628 | * Get a window string property. | 630 | * Get a window string property. |
@@ -633,7 +635,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win, | |||
633 | */ | 635 | */ |
634 | EAPI char * | 636 | EAPI char * |
635 | ecore_x_window_prop_string_get(Ecore_X_Window win, | 637 | ecore_x_window_prop_string_get(Ecore_X_Window win, |
636 | Ecore_X_Atom type) | 638 | Ecore_X_Atom type) |
637 | { | 639 | { |
638 | XTextProperty xtp; | 640 | XTextProperty xtp; |
639 | char *str = NULL; | 641 | char *str = NULL; |
@@ -673,10 +675,10 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, | |||
673 | } | 675 | } |
674 | 676 | ||
675 | return str; | 677 | return str; |
676 | } /* ecore_x_window_prop_string_get */ | 678 | } |
677 | 679 | ||
678 | EAPI Eina_Bool | 680 | EAPI Eina_Bool |
679 | ecore_x_window_prop_protocol_isset(Ecore_X_Window win, | 681 | ecore_x_window_prop_protocol_isset(Ecore_X_Window win, |
680 | Ecore_X_WM_Protocol protocol) | 682 | Ecore_X_WM_Protocol protocol) |
681 | { | 683 | { |
682 | Atom proto, *protos = NULL; | 684 | Atom proto, *protos = NULL; |
@@ -703,7 +705,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, | |||
703 | XFree(protos); | 705 | XFree(protos); |
704 | 706 | ||
705 | return ret; | 707 | return ret; |
706 | } /* ecore_x_window_prop_protocol_isset */ | 708 | } |
707 | 709 | ||
708 | /** | 710 | /** |
709 | * To be documented. | 711 | * To be documented. |
@@ -712,7 +714,7 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, | |||
712 | */ | 714 | */ |
713 | EAPI Ecore_X_WM_Protocol * | 715 | EAPI Ecore_X_WM_Protocol * |
714 | ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, | 716 | ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, |
715 | int *num_ret) | 717 | int *num_ret) |
716 | { | 718 | { |
717 | Atom *protos = NULL; | 719 | Atom *protos = NULL; |
718 | int i, protos_count = 0; | 720 | int i, protos_count = 0; |
@@ -746,5 +748,5 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, | |||
746 | XFree(protos); | 748 | XFree(protos); |
747 | *num_ret = protos_count; | 749 | *num_ret = protos_count; |
748 | return prot_ret; | 750 | return prot_ret; |
749 | } /* ecore_x_window_prop_protocol_list_get */ | 751 | } |
750 | 752 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c index 2e8f8ce..71718cf 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_window_shape.c | |||
@@ -28,7 +28,7 @@ ecore_x_window_shape_mask_set(Ecore_X_Window win, | |||
28 | { | 28 | { |
29 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 29 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
30 | XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet); | 30 | XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet); |
31 | } /* ecore_x_window_shape_mask_set */ | 31 | } |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Sets the input shape of the given window to that given by the pixmap @p mask. | 34 | * Sets the input shape of the given window to that given by the pixmap @p mask. |
@@ -48,7 +48,7 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, | |||
48 | return; | 48 | return; |
49 | win = mask = 0; | 49 | win = mask = 0; |
50 | #endif /* ifdef ShapeInput */ | 50 | #endif /* ifdef ShapeInput */ |
51 | } /* ecore_x_window_shape_input_mask_set */ | 51 | } |
52 | 52 | ||
53 | EAPI void | 53 | EAPI void |
54 | ecore_x_window_shape_window_set(Ecore_X_Window win, | 54 | ecore_x_window_shape_window_set(Ecore_X_Window win, |
@@ -63,7 +63,7 @@ ecore_x_window_shape_window_set(Ecore_X_Window win, | |||
63 | shape_win, | 63 | shape_win, |
64 | ShapeBounding, | 64 | ShapeBounding, |
65 | ShapeSet); | 65 | ShapeSet); |
66 | } /* ecore_x_window_shape_window_set */ | 66 | } |
67 | 67 | ||
68 | EAPI void | 68 | EAPI void |
69 | ecore_x_window_shape_input_window_set(Ecore_X_Window win, | 69 | ecore_x_window_shape_input_window_set(Ecore_X_Window win, |
@@ -83,13 +83,13 @@ ecore_x_window_shape_input_window_set(Ecore_X_Window win, | |||
83 | return; | 83 | return; |
84 | win = shape_win = 0; | 84 | win = shape_win = 0; |
85 | #endif | 85 | #endif |
86 | } /* ecore_x_window_shape_input_window_set */ | 86 | } |
87 | 87 | ||
88 | EAPI void | 88 | EAPI void |
89 | ecore_x_window_shape_window_set_xy(Ecore_X_Window win, | 89 | ecore_x_window_shape_window_set_xy(Ecore_X_Window win, |
90 | Ecore_X_Window shape_win, | 90 | Ecore_X_Window shape_win, |
91 | int x, | 91 | int x, |
92 | int y) | 92 | int y) |
93 | { | 93 | { |
94 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 94 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
95 | XShapeCombineShape(_ecore_x_disp, | 95 | XShapeCombineShape(_ecore_x_disp, |
@@ -100,13 +100,13 @@ ecore_x_window_shape_window_set_xy(Ecore_X_Window win, | |||
100 | shape_win, | 100 | shape_win, |
101 | ShapeBounding, | 101 | ShapeBounding, |
102 | ShapeSet); | 102 | ShapeSet); |
103 | } /* ecore_x_window_shape_window_set_xy */ | 103 | } |
104 | 104 | ||
105 | EAPI void | 105 | EAPI void |
106 | ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, | 106 | ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, |
107 | Ecore_X_Window shape_win, | 107 | Ecore_X_Window shape_win, |
108 | int x, | 108 | int x, |
109 | int y) | 109 | int y) |
110 | { | 110 | { |
111 | #ifdef ShapeInput | 111 | #ifdef ShapeInput |
112 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 112 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -122,14 +122,14 @@ ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, | |||
122 | return; | 122 | return; |
123 | win = shape_win = x = y = 0; | 123 | win = shape_win = x = y = 0; |
124 | #endif | 124 | #endif |
125 | } /* ecore_x_window_shape_input_window_set_xy */ | 125 | } |
126 | 126 | ||
127 | EAPI void | 127 | EAPI void |
128 | ecore_x_window_shape_rectangle_set(Ecore_X_Window win, | 128 | ecore_x_window_shape_rectangle_set(Ecore_X_Window win, |
129 | int x, | 129 | int x, |
130 | int y, | 130 | int y, |
131 | int w, | 131 | int w, |
132 | int h) | 132 | int h) |
133 | { | 133 | { |
134 | XRectangle rect; | 134 | XRectangle rect; |
135 | 135 | ||
@@ -147,14 +147,14 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win, | |||
147 | 1, | 147 | 1, |
148 | ShapeSet, | 148 | ShapeSet, |
149 | Unsorted); | 149 | Unsorted); |
150 | } /* ecore_x_window_shape_rectangle_set */ | 150 | } |
151 | 151 | ||
152 | EAPI void | 152 | EAPI void |
153 | ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, | 153 | ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, |
154 | int x, | 154 | int x, |
155 | int y, | 155 | int y, |
156 | int w, | 156 | int w, |
157 | int h) | 157 | int h) |
158 | { | 158 | { |
159 | #ifdef ShapeInput | 159 | #ifdef ShapeInput |
160 | XRectangle rect; | 160 | XRectangle rect; |
@@ -177,12 +177,12 @@ ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, | |||
177 | return; | 177 | return; |
178 | win = x = y = w = h = 0; | 178 | win = x = y = w = h = 0; |
179 | #endif | 179 | #endif |
180 | } /* ecore_x_window_shape_input_rectangle_set */ | 180 | } |
181 | 181 | ||
182 | EAPI void | 182 | EAPI void |
183 | ecore_x_window_shape_rectangles_set(Ecore_X_Window win, | 183 | ecore_x_window_shape_rectangles_set(Ecore_X_Window win, |
184 | Ecore_X_Rectangle *rects, | 184 | Ecore_X_Rectangle *rects, |
185 | int num) | 185 | int num) |
186 | { | 186 | { |
187 | #ifdef ShapeInput | 187 | #ifdef ShapeInput |
188 | XRectangle *rect = NULL; | 188 | XRectangle *rect = NULL; |
@@ -216,12 +216,12 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, | |||
216 | return; | 216 | return; |
217 | win = rects = num = 0; | 217 | win = rects = num = 0; |
218 | #endif | 218 | #endif |
219 | } /* ecore_x_window_shape_rectangles_set */ | 219 | } |
220 | 220 | ||
221 | EAPI void | 221 | EAPI void |
222 | ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, | 222 | ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, |
223 | Ecore_X_Rectangle *rects, | 223 | Ecore_X_Rectangle *rects, |
224 | int num) | 224 | int num) |
225 | { | 225 | { |
226 | #ifdef ShapeInput | 226 | #ifdef ShapeInput |
227 | XRectangle *rect = NULL; | 227 | XRectangle *rect = NULL; |
@@ -255,14 +255,14 @@ ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, | |||
255 | return; | 255 | return; |
256 | win = rects = num = 0; | 256 | win = rects = num = 0; |
257 | #endif | 257 | #endif |
258 | } /* ecore_x_window_shape_input_rectangles_set */ | 258 | } |
259 | 259 | ||
260 | EAPI void | 260 | EAPI void |
261 | ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, | 261 | ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, |
262 | int x, | 262 | int x, |
263 | int y, | 263 | int y, |
264 | int w, | 264 | int w, |
265 | int h) | 265 | int h) |
266 | { | 266 | { |
267 | XRectangle rect; | 267 | XRectangle rect; |
268 | 268 | ||
@@ -280,14 +280,14 @@ ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, | |||
280 | 1, | 280 | 1, |
281 | ShapeSubtract, | 281 | ShapeSubtract, |
282 | Unsorted); | 282 | Unsorted); |
283 | } /* ecore_x_window_shape_rectangle_subtract */ | 283 | } |
284 | 284 | ||
285 | EAPI void | 285 | EAPI void |
286 | ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, | 286 | ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, |
287 | int x, | 287 | int x, |
288 | int y, | 288 | int y, |
289 | int w, | 289 | int w, |
290 | int h) | 290 | int h) |
291 | { | 291 | { |
292 | #ifdef ShapeInput | 292 | #ifdef ShapeInput |
293 | XRectangle rect; | 293 | XRectangle rect; |
@@ -310,7 +310,7 @@ ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, | |||
310 | return; | 310 | return; |
311 | win = x = y = w = h = 0; | 311 | win = x = y = w = h = 0; |
312 | #endif | 312 | #endif |
313 | } /* ecore_x_window_shape_input_rectangle_subtract */ | 313 | } |
314 | 314 | ||
315 | EAPI void | 315 | EAPI void |
316 | ecore_x_window_shape_window_add(Ecore_X_Window win, | 316 | ecore_x_window_shape_window_add(Ecore_X_Window win, |
@@ -325,13 +325,13 @@ ecore_x_window_shape_window_add(Ecore_X_Window win, | |||
325 | shape_win, | 325 | shape_win, |
326 | ShapeBounding, | 326 | ShapeBounding, |
327 | ShapeUnion); | 327 | ShapeUnion); |
328 | } /* ecore_x_window_shape_window_add */ | 328 | } |
329 | 329 | ||
330 | EAPI void | 330 | EAPI void |
331 | ecore_x_window_shape_window_add_xy(Ecore_X_Window win, | 331 | ecore_x_window_shape_window_add_xy(Ecore_X_Window win, |
332 | Ecore_X_Window shape_win, | 332 | Ecore_X_Window shape_win, |
333 | int x, | 333 | int x, |
334 | int y) | 334 | int y) |
335 | { | 335 | { |
336 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 336 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
337 | XShapeCombineShape(_ecore_x_disp, | 337 | XShapeCombineShape(_ecore_x_disp, |
@@ -342,13 +342,13 @@ ecore_x_window_shape_window_add_xy(Ecore_X_Window win, | |||
342 | shape_win, | 342 | shape_win, |
343 | ShapeBounding, | 343 | ShapeBounding, |
344 | ShapeUnion); | 344 | ShapeUnion); |
345 | } /* ecore_x_window_shape_window_add_xy */ | 345 | } |
346 | 346 | ||
347 | EAPI void | 347 | EAPI void |
348 | ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, | 348 | ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, |
349 | Ecore_X_Window shape_win, | 349 | Ecore_X_Window shape_win, |
350 | int x, | 350 | int x, |
351 | int y) | 351 | int y) |
352 | { | 352 | { |
353 | #ifdef ShapeInput | 353 | #ifdef ShapeInput |
354 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 354 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -364,14 +364,14 @@ ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, | |||
364 | return; | 364 | return; |
365 | win = shape_win = x = y = 0; | 365 | win = shape_win = x = y = 0; |
366 | #endif | 366 | #endif |
367 | } /* ecore_x_window_shape_input_window_add_xy */ | 367 | } |
368 | 368 | ||
369 | EAPI void | 369 | EAPI void |
370 | ecore_x_window_shape_rectangle_add(Ecore_X_Window win, | 370 | ecore_x_window_shape_rectangle_add(Ecore_X_Window win, |
371 | int x, | 371 | int x, |
372 | int y, | 372 | int y, |
373 | int w, | 373 | int w, |
374 | int h) | 374 | int h) |
375 | { | 375 | { |
376 | XRectangle rect; | 376 | XRectangle rect; |
377 | 377 | ||
@@ -389,14 +389,14 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win, | |||
389 | 1, | 389 | 1, |
390 | ShapeUnion, | 390 | ShapeUnion, |
391 | Unsorted); | 391 | Unsorted); |
392 | } /* ecore_x_window_shape_rectangle_add */ | 392 | } |
393 | 393 | ||
394 | EAPI void | 394 | EAPI void |
395 | ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, | 395 | ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, |
396 | int x, | 396 | int x, |
397 | int y, | 397 | int y, |
398 | int w, | 398 | int w, |
399 | int h) | 399 | int h) |
400 | { | 400 | { |
401 | #ifdef ShapeInput | 401 | #ifdef ShapeInput |
402 | XRectangle rect; | 402 | XRectangle rect; |
@@ -419,14 +419,14 @@ ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, | |||
419 | return; | 419 | return; |
420 | win = x = y = w = h = 0; | 420 | win = x = y = w = h = 0; |
421 | #endif | 421 | #endif |
422 | } /* ecore_x_window_shape_input_rectangle_add */ | 422 | } |
423 | 423 | ||
424 | EAPI void | 424 | EAPI void |
425 | ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, | 425 | ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, |
426 | int x, | 426 | int x, |
427 | int y, | 427 | int y, |
428 | int w, | 428 | int w, |
429 | int h) | 429 | int h) |
430 | { | 430 | { |
431 | XRectangle rect; | 431 | XRectangle rect; |
432 | 432 | ||
@@ -444,14 +444,14 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, | |||
444 | 1, | 444 | 1, |
445 | ShapeIntersect, | 445 | ShapeIntersect, |
446 | Unsorted); | 446 | Unsorted); |
447 | } /* ecore_x_window_shape_rectangle_clip */ | 447 | } |
448 | 448 | ||
449 | EAPI void | 449 | EAPI void |
450 | ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, | 450 | ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, |
451 | int x, | 451 | int x, |
452 | int y, | 452 | int y, |
453 | int w, | 453 | int w, |
454 | int h) | 454 | int h) |
455 | { | 455 | { |
456 | #ifdef ShapeInput | 456 | #ifdef ShapeInput |
457 | XRectangle rect; | 457 | XRectangle rect; |
@@ -474,12 +474,12 @@ ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, | |||
474 | return; | 474 | return; |
475 | win = x = y = w = h = 0; | 475 | win = x = y = w = h = 0; |
476 | #endif | 476 | #endif |
477 | } /* ecore_x_window_shape_input_rectangle_clip */ | 477 | } |
478 | 478 | ||
479 | EAPI void | 479 | EAPI void |
480 | ecore_x_window_shape_rectangles_add(Ecore_X_Window win, | 480 | ecore_x_window_shape_rectangles_add(Ecore_X_Window win, |
481 | Ecore_X_Rectangle *rects, | 481 | Ecore_X_Rectangle *rects, |
482 | int num) | 482 | int num) |
483 | { | 483 | { |
484 | XRectangle *rect = NULL; | 484 | XRectangle *rect = NULL; |
485 | int i; | 485 | int i; |
@@ -508,12 +508,12 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, | |||
508 | ShapeUnion, | 508 | ShapeUnion, |
509 | Unsorted); | 509 | Unsorted); |
510 | if (rect) free(rect); | 510 | if (rect) free(rect); |
511 | } /* ecore_x_window_shape_rectangles_add */ | 511 | } |
512 | 512 | ||
513 | EAPI void | 513 | EAPI void |
514 | ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, | 514 | ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, |
515 | Ecore_X_Rectangle *rects, | 515 | Ecore_X_Rectangle *rects, |
516 | int num) | 516 | int num) |
517 | { | 517 | { |
518 | #ifdef ShapeInput | 518 | #ifdef ShapeInput |
519 | XRectangle *rect = NULL; | 519 | XRectangle *rect = NULL; |
@@ -547,11 +547,11 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, | |||
547 | return; | 547 | return; |
548 | win = rects = num = 0; | 548 | win = rects = num = 0; |
549 | #endif | 549 | #endif |
550 | } /* ecore_x_window_shape_input_rectangles_add */ | 550 | } |
551 | 551 | ||
552 | EAPI Ecore_X_Rectangle * | 552 | EAPI Ecore_X_Rectangle * |
553 | ecore_x_window_shape_rectangles_get(Ecore_X_Window win, | 553 | ecore_x_window_shape_rectangles_get(Ecore_X_Window win, |
554 | int *num_ret) | 554 | int *num_ret) |
555 | { | 555 | { |
556 | XRectangle *rect; | 556 | XRectangle *rect; |
557 | Ecore_X_Rectangle *rects = NULL; | 557 | Ecore_X_Rectangle *rects = NULL; |
@@ -585,11 +585,11 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, | |||
585 | } | 585 | } |
586 | if (num_ret) *num_ret = num; | 586 | if (num_ret) *num_ret = num; |
587 | return rects; | 587 | return rects; |
588 | } /* ecore_x_window_shape_rectangles_get */ | 588 | } |
589 | 589 | ||
590 | EAPI Ecore_X_Rectangle * | 590 | EAPI Ecore_X_Rectangle * |
591 | ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, | 591 | ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, |
592 | int *num_ret) | 592 | int *num_ret) |
593 | { | 593 | { |
594 | Ecore_X_Rectangle *rects = NULL; | 594 | Ecore_X_Rectangle *rects = NULL; |
595 | #ifdef ShapeInput | 595 | #ifdef ShapeInput |
@@ -643,16 +643,16 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, | |||
643 | if (num_ret) *num_ret = 1; | 643 | if (num_ret) *num_ret = 1; |
644 | return rects; | 644 | return rects; |
645 | #endif | 645 | #endif |
646 | } /* ecore_x_window_shape_input_rectangles_get */ | 646 | } |
647 | 647 | ||
648 | EAPI void | 648 | EAPI void |
649 | ecore_x_window_shape_events_select(Ecore_X_Window win, | 649 | ecore_x_window_shape_events_select(Ecore_X_Window win, |
650 | Eina_Bool on) | 650 | Eina_Bool on) |
651 | { | 651 | { |
652 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 652 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
653 | if (on) | 653 | if (on) |
654 | XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); | 654 | XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask); |
655 | else | 655 | else |
656 | XShapeSelectInput(_ecore_x_disp, win, 0); | 656 | XShapeSelectInput(_ecore_x_disp, win, 0); |
657 | } /* ecore_x_window_shape_events_select */ | 657 | } |
658 | 658 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c index 38a81dd..fbfbd43 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xi2.c | |||
@@ -46,7 +46,7 @@ _ecore_x_input_init(void) | |||
46 | _ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices, | 46 | _ecore_x_xi2_devs = XIQueryDevice(_ecore_x_disp, XIAllDevices, |
47 | &_ecore_x_xi2_num); | 47 | &_ecore_x_xi2_num); |
48 | #endif /* ifdef ECORE_XI2 */ | 48 | #endif /* ifdef ECORE_XI2 */ |
49 | } /* _ecore_x_input_init */ | 49 | } |
50 | 50 | ||
51 | void | 51 | void |
52 | _ecore_x_input_shutdown(void) | 52 | _ecore_x_input_shutdown(void) |
@@ -61,7 +61,7 @@ _ecore_x_input_shutdown(void) | |||
61 | _ecore_x_xi2_num = 0; | 61 | _ecore_x_xi2_num = 0; |
62 | _ecore_x_xi2_opcode = -1; | 62 | _ecore_x_xi2_opcode = -1; |
63 | #endif /* ifdef ECORE_XI2 */ | 63 | #endif /* ifdef ECORE_XI2 */ |
64 | } /* _ecore_x_input_shutdown */ | 64 | } |
65 | 65 | ||
66 | void | 66 | void |
67 | _ecore_x_input_handler(XEvent *xevent) | 67 | _ecore_x_input_handler(XEvent *xevent) |
@@ -205,9 +205,9 @@ _ecore_x_input_handler(XEvent *xevent) | |||
205 | #endif | 205 | #endif |
206 | default: | 206 | default: |
207 | break; | 207 | break; |
208 | } /* switch */ | 208 | } |
209 | #endif /* ifdef ECORE_XI2 */ | 209 | #endif /* ifdef ECORE_XI2 */ |
210 | } /* _ecore_x_input_handler */ | 210 | } |
211 | 211 | ||
212 | EAPI Eina_Bool | 212 | EAPI Eina_Bool |
213 | ecore_x_input_multi_select(Ecore_X_Window win) | 213 | ecore_x_input_multi_select(Ecore_X_Window win) |
@@ -279,5 +279,5 @@ ecore_x_input_multi_select(Ecore_X_Window win) | |||
279 | #else /* ifdef ECORE_XI2 */ | 279 | #else /* ifdef ECORE_XI2 */ |
280 | return EINA_FALSE; | 280 | return EINA_FALSE; |
281 | #endif /* ifdef ECORE_XI2 */ | 281 | #endif /* ifdef ECORE_XI2 */ |
282 | } /* ecore_x_input_multi_select */ | 282 | } |
283 | 283 | ||
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c index 1d956b7..f49a4d3 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c +++ b/libraries/ecore/src/lib/ecore_x/xlib/ecore_x_xinerama.c | |||
@@ -36,10 +36,10 @@ ecore_x_xinerama_screen_count_get(void) | |||
36 | 36 | ||
37 | #endif /* ifdef ECORE_XINERAMA */ | 37 | #endif /* ifdef ECORE_XINERAMA */ |
38 | return 0; | 38 | return 0; |
39 | } /* ecore_x_xinerama_screen_count_get */ | 39 | } |
40 | 40 | ||
41 | EAPI Eina_Bool | 41 | EAPI Eina_Bool |
42 | ecore_x_xinerama_screen_geometry_get(int screen, | 42 | ecore_x_xinerama_screen_geometry_get(int screen, |
43 | int *x, | 43 | int *x, |
44 | int *y, | 44 | int *y, |
45 | int *w, | 45 | int *w, |
@@ -87,5 +87,5 @@ ecore_x_xinerama_screen_geometry_get(int screen, | |||
87 | 87 | ||
88 | return EINA_FALSE; | 88 | return EINA_FALSE; |
89 | screen = 0; | 89 | screen = 0; |
90 | } /* ecore_x_xinerama_screen_geometry_get */ | 90 | } |
91 | 91 | ||