diff options
author | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
commit | c963d75dfdeec11f82e79e727062fbf89afa2c04 (patch) | |
tree | 895633dbf641110be46f117c29890c49b3ffc0bd /libraries/ecore/src/lib/ecore_x | |
parent | Adding the new extantz viewer and grid manager. (diff) | |
download | SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2 SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz |
Update EFL to latest beta.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_x')
18 files changed, 1206 insertions, 141 deletions
diff --git a/libraries/ecore/src/lib/ecore_x/Ecore_X.h b/libraries/ecore/src/lib/ecore_x/Ecore_X.h index b5d2c3f..336b656 100644 --- a/libraries/ecore/src/lib/ecore_x/Ecore_X.h +++ b/libraries/ecore/src/lib/ecore_x/Ecore_X.h | |||
@@ -1104,6 +1104,28 @@ typedef enum _Ecore_X_Illume_Quickpanel_State | |||
1104 | ECORE_X_ILLUME_QUICKPANEL_STATE_ON | 1104 | ECORE_X_ILLUME_QUICKPANEL_STATE_ON |
1105 | } Ecore_X_Illume_Quickpanel_State; | 1105 | } Ecore_X_Illume_Quickpanel_State; |
1106 | 1106 | ||
1107 | typedef enum _Ecore_X_Illume_Indicator_State | ||
1108 | { | ||
1109 | ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN = 0, | ||
1110 | ECORE_X_ILLUME_INDICATOR_STATE_OFF, | ||
1111 | ECORE_X_ILLUME_INDICATOR_STATE_ON | ||
1112 | } Ecore_X_Illume_Indicator_State; | ||
1113 | |||
1114 | typedef enum _Ecore_X_Illume_Clipboard_State | ||
1115 | { | ||
1116 | ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN = 0, | ||
1117 | ECORE_X_ILLUME_CLIPBOARD_STATE_OFF, | ||
1118 | ECORE_X_ILLUME_CLIPBOARD_STATE_ON | ||
1119 | } Ecore_X_Illume_Clipboard_State; | ||
1120 | |||
1121 | typedef enum _Ecore_X_Illume_Indicator_Opacity_Mode | ||
1122 | { | ||
1123 | ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN = 0, | ||
1124 | ECORE_X_ILLUME_INDICATOR_OPAQUE, | ||
1125 | ECORE_X_ILLUME_INDICATOR_TRANSLUCENT, | ||
1126 | ECORE_X_ILLUME_INDICATOR_TRANSPARENT | ||
1127 | } Ecore_X_Illume_Indicator_Opacity_Mode; | ||
1128 | |||
1107 | /* Window layer constants */ | 1129 | /* Window layer constants */ |
1108 | #define ECORE_X_WINDOW_LAYER_BELOW 2 | 1130 | #define ECORE_X_WINDOW_LAYER_BELOW 2 |
1109 | #define ECORE_X_WINDOW_LAYER_NORMAL 4 | 1131 | #define ECORE_X_WINDOW_LAYER_NORMAL 4 |
@@ -2159,6 +2181,11 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win, | |||
2159 | int *bottom_start_x, | 2181 | int *bottom_start_x, |
2160 | int *bottom_end_x); | 2182 | int *bottom_end_x); |
2161 | 2183 | ||
2184 | EAPI void | ||
2185 | ecore_x_netwm_icons_set(Ecore_X_Window win, | ||
2186 | Ecore_X_Icon *icon, | ||
2187 | int num); | ||
2188 | |||
2162 | EAPI Eina_Bool | 2189 | EAPI Eina_Bool |
2163 | ecore_x_netwm_icons_get(Ecore_X_Window win, | 2190 | ecore_x_netwm_icons_get(Ecore_X_Window win, |
2164 | Ecore_X_Icon **icon, | 2191 | Ecore_X_Icon **icon, |
@@ -2399,6 +2426,25 @@ EAPI void | |||
2399 | ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win); | 2426 | ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win); |
2400 | 2427 | ||
2401 | EAPI void | 2428 | EAPI void |
2429 | ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, | ||
2430 | Ecore_X_Illume_Clipboard_State state); | ||
2431 | |||
2432 | EAPI Ecore_X_Illume_Clipboard_State | ||
2433 | ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win); | ||
2434 | |||
2435 | EAPI void | ||
2436 | ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, | ||
2437 | int x, | ||
2438 | int y, | ||
2439 | int w, | ||
2440 | int h); | ||
2441 | EAPI Eina_Bool | ||
2442 | ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, | ||
2443 | int *x, | ||
2444 | int *y, | ||
2445 | int *w, | ||
2446 | int *h); | ||
2447 | EAPI void | ||
2402 | ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, | 2448 | ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, |
2403 | Ecore_X_Sync_Counter counter); | 2449 | Ecore_X_Sync_Counter counter); |
2404 | EAPI Ecore_X_Sync_Counter | 2450 | EAPI Ecore_X_Sync_Counter |
@@ -2657,7 +2703,7 @@ ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, | |||
2657 | /* The usage of 'Ecore_X_Randr_None' or 'Ecore_X_Randr_Unset' | 2703 | /* The usage of 'Ecore_X_Randr_None' or 'Ecore_X_Randr_Unset' |
2658 | * depends on the context. In most cases 'Ecore_X_Randr_Unset' | 2704 | * depends on the context. In most cases 'Ecore_X_Randr_Unset' |
2659 | * can be used, but in some cases -1 is a special value to | 2705 | * can be used, but in some cases -1 is a special value to |
2660 | * functions, thus 'Ecore_X_Randr_None' (=0) musst be used. | 2706 | * functions, thus 'Ecore_X_Randr_None' (=0) must be used. |
2661 | */ | 2707 | */ |
2662 | 2708 | ||
2663 | typedef short Ecore_X_Randr_Refresh_Rate; | 2709 | typedef short Ecore_X_Randr_Refresh_Rate; |
@@ -2749,6 +2795,11 @@ EAPI Eina_Bool | |||
2749 | EAPI Ecore_X_Randr_Mode_Info ** | 2795 | EAPI Ecore_X_Randr_Mode_Info ** |
2750 | ecore_x_randr_modes_info_get(Ecore_X_Window root, | 2796 | ecore_x_randr_modes_info_get(Ecore_X_Window root, |
2751 | int *num); | 2797 | int *num); |
2798 | EAPI Ecore_X_Randr_Mode | ||
2799 | ecore_x_randr_mode_info_add(Ecore_X_Window root, | ||
2800 | Ecore_X_Randr_Mode_Info *mode_info); | ||
2801 | EAPI void | ||
2802 | ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode); | ||
2752 | EAPI Ecore_X_Randr_Mode_Info * | 2803 | EAPI Ecore_X_Randr_Mode_Info * |
2753 | ecore_x_randr_mode_info_get(Ecore_X_Window root, | 2804 | ecore_x_randr_mode_info_get(Ecore_X_Window root, |
2754 | Ecore_X_Randr_Mode mode); | 2805 | Ecore_X_Randr_Mode mode); |
@@ -2762,10 +2813,13 @@ EAPI Ecore_X_Randr_Output *ecore_x_randr_outputs_get(Ecore_X_Window root, | |||
2762 | EAPI Ecore_X_Randr_Output * | 2813 | EAPI Ecore_X_Randr_Output * |
2763 | ecore_x_randr_window_outputs_get(Ecore_X_Window window, | 2814 | ecore_x_randr_window_outputs_get(Ecore_X_Window window, |
2764 | int *num); | 2815 | int *num); |
2765 | EINA_DEPRECATED EAPI Ecore_X_Randr_Output * | 2816 | EAPI Ecore_X_Randr_Output * |
2766 | ecore_x_randr_current_output_get(Ecore_X_Window window, | 2817 | ecore_x_randr_current_output_get(Ecore_X_Window window, |
2767 | int *num); | 2818 | int *num); |
2768 | EAPI Ecore_X_Randr_Crtc * | 2819 | EAPI Ecore_X_Randr_Crtc * |
2820 | ecore_x_randr_window_crtcs_get(Ecore_X_Window window, | ||
2821 | int *num); | ||
2822 | EAPI Ecore_X_Randr_Crtc * | ||
2769 | ecore_x_randr_current_crtc_get(Ecore_X_Window window, | 2823 | ecore_x_randr_current_crtc_get(Ecore_X_Window window, |
2770 | int *num); | 2824 | int *num); |
2771 | EAPI Ecore_X_Randr_Output * | 2825 | EAPI Ecore_X_Randr_Output * |
@@ -2840,6 +2894,12 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, | |||
2840 | Ecore_X_Randr_Crtc crtc_r2, | 2894 | Ecore_X_Randr_Crtc crtc_r2, |
2841 | Ecore_X_Randr_Output_Policy policy, | 2895 | Ecore_X_Randr_Output_Policy policy, |
2842 | Ecore_X_Randr_Relative_Alignment alignment); | 2896 | Ecore_X_Randr_Relative_Alignment alignment); |
2897 | EAPI Eina_Bool | ||
2898 | ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, | ||
2899 | Ecore_X_Randr_Mode mode); | ||
2900 | EAPI void | ||
2901 | ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output, | ||
2902 | Ecore_X_Randr_Mode mode); | ||
2843 | EAPI Ecore_X_Randr_Mode * | 2903 | EAPI Ecore_X_Randr_Mode * |
2844 | ecore_x_randr_output_modes_get(Ecore_X_Window root, | 2904 | ecore_x_randr_output_modes_get(Ecore_X_Window root, |
2845 | Ecore_X_Randr_Output output, | 2905 | Ecore_X_Randr_Output output, |
@@ -3408,6 +3468,13 @@ EAPI Eina_Bool | |||
3408 | EAPI const char * | 3468 | EAPI const char * |
3409 | ecore_x_keysym_string_get(int keysym); | 3469 | ecore_x_keysym_string_get(int keysym); |
3410 | 3470 | ||
3471 | /** | ||
3472 | * Given a keyname, return the keycode representing that key | ||
3473 | * | ||
3474 | * @since 1.2.0 | ||
3475 | */ | ||
3476 | EAPI int ecore_x_keysym_keycode_get(const char *keyname); | ||
3477 | |||
3411 | typedef struct _Ecore_X_Image Ecore_X_Image; | 3478 | typedef struct _Ecore_X_Image Ecore_X_Image; |
3412 | 3479 | ||
3413 | EAPI Ecore_X_Image * | 3480 | EAPI Ecore_X_Image * |
@@ -3617,6 +3684,26 @@ ecore_x_gesture_event_ungrab(Ecore_X_Window win, | |||
3617 | Ecore_X_Gesture_Event_Type type, | 3684 | Ecore_X_Gesture_Event_Type type, |
3618 | int num_fingers); | 3685 | int num_fingers); |
3619 | 3686 | ||
3687 | EAPI void | ||
3688 | ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, | ||
3689 | Ecore_X_Illume_Indicator_State state); | ||
3690 | EAPI Ecore_X_Illume_Indicator_State | ||
3691 | ecore_x_e_illume_indicator_state_get(Ecore_X_Window win); | ||
3692 | EAPI void | ||
3693 | ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, | ||
3694 | Ecore_X_Illume_Indicator_State state); | ||
3695 | |||
3696 | EAPI void | ||
3697 | ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, | ||
3698 | Ecore_X_Illume_Indicator_Opacity_Mode mode); | ||
3699 | |||
3700 | EAPI Ecore_X_Illume_Indicator_Opacity_Mode | ||
3701 | ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win); | ||
3702 | |||
3703 | EAPI void | ||
3704 | ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, | ||
3705 | Ecore_X_Illume_Indicator_Opacity_Mode mode); | ||
3706 | |||
3620 | #ifdef __cplusplus | 3707 | #ifdef __cplusplus |
3621 | } | 3708 | } |
3622 | #endif // ifdef __cplusplus | 3709 | #endif // ifdef __cplusplus |
diff --git a/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h b/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h index 6788a5e..1341716 100644 --- a/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/libraries/ecore/src/lib/ecore_x/Ecore_X_Atoms.h | |||
@@ -238,6 +238,20 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR; | |||
238 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR; | 238 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR; |
239 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE; | 239 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE; |
240 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE; | 240 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE; |
241 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE; | ||
242 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; | ||
243 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; | ||
244 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE; | ||
245 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE; | ||
246 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT; | ||
247 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT; | ||
248 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE; | ||
249 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE; | ||
250 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE; | ||
251 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE; | ||
252 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON; | ||
253 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF; | ||
254 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY; | ||
241 | 255 | ||
242 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER; | 256 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER; |
243 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE; | 257 | EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE; |
diff --git a/libraries/ecore/src/lib/ecore_x/Makefile.in b/libraries/ecore/src/lib/ecore_x/Makefile.in index 3b53cfe..fb446ef 100644 --- a/libraries/ecore/src/lib/ecore_x/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/Makefile.in | |||
@@ -50,16 +50,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | |||
50 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | 50 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ |
51 | $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ | 51 | $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ |
52 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ | 52 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ |
53 | $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ | 53 | $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ |
54 | $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ | 54 | $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ |
55 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ | 55 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ |
56 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ | 56 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ |
57 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ | 57 | $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ |
58 | $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ | 58 | $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac |
59 | $(top_srcdir)/configure.ac | ||
60 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | 59 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
61 | $(ACLOCAL_M4) | 60 | $(ACLOCAL_M4) |
62 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs | 61 | mkinstalldirs = $(install_sh) -d |
63 | CONFIG_HEADER = $(top_builddir)/config.h | 62 | CONFIG_HEADER = $(top_builddir)/config.h |
64 | CONFIG_CLEAN_FILES = | 63 | CONFIG_CLEAN_FILES = |
65 | CONFIG_CLEAN_VPATH_FILES = | 64 | CONFIG_CLEAN_VPATH_FILES = |
@@ -224,6 +223,8 @@ EVAS_LIBS = @EVAS_LIBS@ | |||
224 | EVIL_CFLAGS = @EVIL_CFLAGS@ | 223 | EVIL_CFLAGS = @EVIL_CFLAGS@ |
225 | EVIL_LIBS = @EVIL_LIBS@ | 224 | EVIL_LIBS = @EVIL_LIBS@ |
226 | EXEEXT = @EXEEXT@ | 225 | EXEEXT = @EXEEXT@ |
226 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
227 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
227 | FGREP = @FGREP@ | 228 | FGREP = @FGREP@ |
228 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ | 229 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ |
229 | GLIB_CFLAGS = @GLIB_CFLAGS@ | 230 | GLIB_CFLAGS = @GLIB_CFLAGS@ |
@@ -279,6 +280,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ | |||
279 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | 280 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ |
280 | PIXMAN_LIBS = @PIXMAN_LIBS@ | 281 | PIXMAN_LIBS = @PIXMAN_LIBS@ |
281 | PKG_CONFIG = @PKG_CONFIG@ | 282 | PKG_CONFIG = @PKG_CONFIG@ |
283 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
284 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
282 | POSUB = @POSUB@ | 285 | POSUB = @POSUB@ |
283 | RANLIB = @RANLIB@ | 286 | RANLIB = @RANLIB@ |
284 | SCIM_CFLAGS = @SCIM_CFLAGS@ | 287 | SCIM_CFLAGS = @SCIM_CFLAGS@ |
@@ -289,6 +292,7 @@ SDL_LIBS = @SDL_LIBS@ | |||
289 | SED = @SED@ | 292 | SED = @SED@ |
290 | SET_MAKE = @SET_MAKE@ | 293 | SET_MAKE = @SET_MAKE@ |
291 | SHELL = @SHELL@ | 294 | SHELL = @SHELL@ |
295 | SHM_OPEN_LIBS = @SHM_OPEN_LIBS@ | ||
292 | SSL_CFLAGS = @SSL_CFLAGS@ | 296 | SSL_CFLAGS = @SSL_CFLAGS@ |
293 | SSL_LIBS = @SSL_LIBS@ | 297 | SSL_LIBS = @SSL_LIBS@ |
294 | STRIP = @STRIP@ | 298 | STRIP = @STRIP@ |
diff --git a/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h b/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h index 3f22356..8952df3 100644 --- a/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/libraries/ecore/src/lib/ecore_x/ecore_x_atoms_decl.h | |||
@@ -264,6 +264,20 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR = 0; | |||
264 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0; | 264 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0; |
265 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0; | 265 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0; |
266 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0; | 266 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0; |
267 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE = 0; | ||
268 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_ON = 0; | ||
269 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF = 0; | ||
270 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE = 0; | ||
271 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE= 0; | ||
272 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT = 0; | ||
273 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT = 0; | ||
274 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE = 0; | ||
275 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE = 0; | ||
276 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE = 0; | ||
277 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE = 0; | ||
278 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY = 0; | ||
279 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON = 0; | ||
280 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF = 0; | ||
267 | 281 | ||
268 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0; | 282 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0; |
269 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE = 0; | 283 | EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE = 0; |
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in index 9108f23..ff2227c 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in | |||
@@ -48,16 +48,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | |||
48 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | 48 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ |
49 | $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ | 49 | $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ |
50 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ | 50 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ |
51 | $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ | 51 | $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ |
52 | $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ | 52 | $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ |
53 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ | 53 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ |
54 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ | 54 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ |
55 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ | 55 | $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ |
56 | $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ | 56 | $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac |
57 | $(top_srcdir)/configure.ac | ||
58 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | 57 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
59 | $(ACLOCAL_M4) | 58 | $(ACLOCAL_M4) |
60 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs | 59 | mkinstalldirs = $(install_sh) -d |
61 | CONFIG_HEADER = $(top_builddir)/config.h | 60 | CONFIG_HEADER = $(top_builddir)/config.h |
62 | CONFIG_CLEAN_FILES = | 61 | CONFIG_CLEAN_FILES = |
63 | CONFIG_CLEAN_VPATH_FILES = | 62 | CONFIG_CLEAN_VPATH_FILES = |
@@ -206,6 +205,8 @@ EVAS_LIBS = @EVAS_LIBS@ | |||
206 | EVIL_CFLAGS = @EVIL_CFLAGS@ | 205 | EVIL_CFLAGS = @EVIL_CFLAGS@ |
207 | EVIL_LIBS = @EVIL_LIBS@ | 206 | EVIL_LIBS = @EVIL_LIBS@ |
208 | EXEEXT = @EXEEXT@ | 207 | EXEEXT = @EXEEXT@ |
208 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
209 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
209 | FGREP = @FGREP@ | 210 | FGREP = @FGREP@ |
210 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ | 211 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ |
211 | GLIB_CFLAGS = @GLIB_CFLAGS@ | 212 | GLIB_CFLAGS = @GLIB_CFLAGS@ |
@@ -261,6 +262,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ | |||
261 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | 262 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ |
262 | PIXMAN_LIBS = @PIXMAN_LIBS@ | 263 | PIXMAN_LIBS = @PIXMAN_LIBS@ |
263 | PKG_CONFIG = @PKG_CONFIG@ | 264 | PKG_CONFIG = @PKG_CONFIG@ |
265 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
266 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
264 | POSUB = @POSUB@ | 267 | POSUB = @POSUB@ |
265 | RANLIB = @RANLIB@ | 268 | RANLIB = @RANLIB@ |
266 | SCIM_CFLAGS = @SCIM_CFLAGS@ | 269 | SCIM_CFLAGS = @SCIM_CFLAGS@ |
@@ -271,6 +274,7 @@ SDL_LIBS = @SDL_LIBS@ | |||
271 | SED = @SED@ | 274 | SED = @SED@ |
272 | SET_MAKE = @SET_MAKE@ | 275 | SET_MAKE = @SET_MAKE@ |
273 | SHELL = @SHELL@ | 276 | SHELL = @SHELL@ |
277 | SHM_OPEN_LIBS = @SHM_OPEN_LIBS@ | ||
274 | SSL_CFLAGS = @SSL_CFLAGS@ | 278 | SSL_CFLAGS = @SSL_CFLAGS@ |
275 | SSL_LIBS = @SSL_LIBS@ | 279 | SSL_LIBS = @SSL_LIBS@ |
276 | STRIP = @STRIP@ | 280 | STRIP = @STRIP@ |
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c index 769ffac..ec2daaf 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_atoms.c | |||
@@ -249,7 +249,20 @@ static Xcb_Atom atoms[] = | |||
249 | { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, | 249 | { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, |
250 | { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", | 250 | { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", |
251 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, | 251 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, |
252 | 252 | { "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE }, | |
253 | { "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON }, | ||
254 | { "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF }, | ||
255 | { "_E_ILLUME_INDICATOR_OPACITY_MODE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE }, | ||
256 | { "_E_ILLUME_INDICATOR_OPAQUE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE }, | ||
257 | { "_E_ILLUME_INDICATOR_TRANSLUCENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT }, | ||
258 | { "_E_ILLUME_INDICATOR_TRANSPARENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT }, | ||
259 | { "_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLES", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE }, | ||
260 | { "_E_ILLUME_ROTATE_WINDOW_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE }, | ||
261 | { "_E_ILLUME_ROTATE_ROOT_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE }, | ||
262 | { "_E_ILLUME_CLIPBOARD_STATE", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE }, | ||
263 | { "_E_ILLUME_CLIPBOARD_ON", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON }, | ||
264 | { "_E_ILLUME_CLIPBOARD_OFF", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF }, | ||
265 | { "_E_ILLUME_CLIPBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY }, | ||
253 | { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER }, | 266 | { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER }, |
254 | { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE }, | 267 | { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE }, |
255 | { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED }, | 268 | { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED }, |
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c index c868f5e..60bfc9c 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c | |||
@@ -7,6 +7,8 @@ static Ecore_X_Atom _ecore_xcb_e_quickpanel_atom_get(Ecore_X_ | |||
7 | static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom); | 7 | static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom); |
8 | static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode); | 8 | static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode); |
9 | static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom); | 9 | static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom); |
10 | static Ecore_X_Atom _ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state); | ||
11 | static Ecore_X_Illume_Indicator_State _ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom); | ||
10 | 12 | ||
11 | EAPI void | 13 | EAPI void |
12 | ecore_x_e_init(void) | 14 | ecore_x_e_init(void) |
@@ -719,6 +721,99 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) | |||
719 | 0, 0, 0, 0, 0); | 721 | 0, 0, 0, 0, 0); |
720 | } | 722 | } |
721 | 723 | ||
724 | static Ecore_X_Atom | ||
725 | _ecore_xcb_e_clipboard_atom_get(Ecore_X_Illume_Clipboard_State state) | ||
726 | { | ||
727 | switch (state) | ||
728 | { | ||
729 | case ECORE_X_ILLUME_CLIPBOARD_STATE_ON: | ||
730 | return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON; | ||
731 | case ECORE_X_ILLUME_CLIPBOARD_STATE_OFF: | ||
732 | return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF; | ||
733 | default: | ||
734 | break; | ||
735 | } | ||
736 | return 0; | ||
737 | } | ||
738 | |||
739 | static Ecore_X_Illume_Clipboard_State | ||
740 | _ecore_xcb_e_clipboard_state_get(Ecore_X_Atom atom) | ||
741 | { | ||
742 | if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON) | ||
743 | return ECORE_X_ILLUME_CLIPBOARD_STATE_ON; | ||
744 | |||
745 | if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF) | ||
746 | return ECORE_X_ILLUME_CLIPBOARD_STATE_OFF; | ||
747 | |||
748 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
749 | } | ||
750 | |||
751 | EAPI void | ||
752 | ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, | ||
753 | Ecore_X_Illume_Clipboard_State state) | ||
754 | { | ||
755 | Ecore_X_Atom atom = 0; | ||
756 | |||
757 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
758 | atom = _ecore_xcb_e_clipboard_atom_get(state); | ||
759 | |||
760 | ecore_x_window_prop_atom_set(win, | ||
761 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, | ||
762 | &atom, 1); | ||
763 | } | ||
764 | |||
765 | EAPI Ecore_X_Illume_Clipboard_State | ||
766 | ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win) | ||
767 | { | ||
768 | Ecore_X_Atom atom = 0; | ||
769 | |||
770 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
771 | |||
772 | if (!ecore_x_window_prop_atom_get(win, | ||
773 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, | ||
774 | &atom, 1)) | ||
775 | return ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN; | ||
776 | return _ecore_xcb_e_clipboard_state_get(atom); | ||
777 | } | ||
778 | |||
779 | EAPI void | ||
780 | ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, | ||
781 | int x, int y, int w, int h) | ||
782 | { | ||
783 | unsigned int geom[4]; | ||
784 | |||
785 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
786 | geom[0] = x; | ||
787 | geom[1] = y; | ||
788 | geom[2] = w; | ||
789 | geom[3] = h; | ||
790 | ecore_x_window_prop_card32_set(win, | ||
791 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, | ||
792 | geom, 4); | ||
793 | } | ||
794 | |||
795 | EAPI Eina_Bool | ||
796 | ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, | ||
797 | int *x, int *y, int *w, int *h) | ||
798 | { | ||
799 | int ret = 0; | ||
800 | unsigned int geom[4]; | ||
801 | |||
802 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
803 | ret = | ||
804 | ecore_x_window_prop_card32_get(win, | ||
805 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, | ||
806 | geom, 4); | ||
807 | if (ret != 4) return EINA_FALSE; | ||
808 | |||
809 | if (x) *x = geom[0]; | ||
810 | if (y) *y = geom[1]; | ||
811 | if (w) *w = geom[2]; | ||
812 | if (h) *h = geom[3]; | ||
813 | |||
814 | return EINA_TRUE; | ||
815 | } | ||
816 | |||
722 | EAPI void | 817 | EAPI void |
723 | ecore_x_e_illume_mode_set(Ecore_X_Window win, | 818 | ecore_x_e_illume_mode_set(Ecore_X_Window win, |
724 | Ecore_X_Illume_Mode mode) | 819 | Ecore_X_Illume_Mode mode) |
@@ -1069,3 +1164,144 @@ _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom) | |||
1069 | return ECORE_X_ILLUME_MODE_UNKNOWN; | 1164 | return ECORE_X_ILLUME_MODE_UNKNOWN; |
1070 | } | 1165 | } |
1071 | 1166 | ||
1167 | static Ecore_X_Atom | ||
1168 | _ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state) | ||
1169 | { | ||
1170 | switch (state) | ||
1171 | { | ||
1172 | case ECORE_X_ILLUME_INDICATOR_STATE_ON: | ||
1173 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; | ||
1174 | |||
1175 | case ECORE_X_ILLUME_INDICATOR_STATE_OFF: | ||
1176 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; | ||
1177 | |||
1178 | default: | ||
1179 | break; | ||
1180 | } | ||
1181 | return 0; | ||
1182 | } | ||
1183 | |||
1184 | static Ecore_X_Illume_Indicator_State | ||
1185 | _ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom) | ||
1186 | { | ||
1187 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON) | ||
1188 | return ECORE_X_ILLUME_INDICATOR_STATE_ON; | ||
1189 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF) | ||
1190 | return ECORE_X_ILLUME_INDICATOR_STATE_OFF; | ||
1191 | |||
1192 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
1193 | } | ||
1194 | |||
1195 | EAPI void | ||
1196 | ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, | ||
1197 | Ecore_X_Illume_Indicator_State state) | ||
1198 | { | ||
1199 | Ecore_X_Atom atom = 0; | ||
1200 | |||
1201 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1202 | |||
1203 | atom = _ecore_xcb_e_indicator_atom_get(state); | ||
1204 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1205 | &atom, 1); | ||
1206 | } | ||
1207 | |||
1208 | EAPI Ecore_X_Illume_Indicator_State | ||
1209 | ecore_x_e_illume_indicator_state_get(Ecore_X_Window win) | ||
1210 | { | ||
1211 | Ecore_X_Atom atom = 0; | ||
1212 | |||
1213 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1214 | |||
1215 | if (!ecore_x_window_prop_atom_get(win, | ||
1216 | ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1217 | &atom, 1)) | ||
1218 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
1219 | |||
1220 | return _ecore_xcb_e_indicator_state_get(atom); | ||
1221 | } | ||
1222 | |||
1223 | EAPI void | ||
1224 | ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, | ||
1225 | Ecore_X_Illume_Indicator_State state) | ||
1226 | { | ||
1227 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1228 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1229 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | ||
1230 | _ecore_xcb_e_indicator_atom_get(state), | ||
1231 | 0, 0, 0, 0); | ||
1232 | } | ||
1233 | |||
1234 | static Ecore_X_Atom | ||
1235 | _ecore_x_e_indicator_opacity_atom_get(Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1236 | { | ||
1237 | switch (mode) | ||
1238 | { | ||
1239 | case ECORE_X_ILLUME_INDICATOR_OPAQUE: | ||
1240 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE; | ||
1241 | |||
1242 | case ECORE_X_ILLUME_INDICATOR_TRANSLUCENT: | ||
1243 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT; | ||
1244 | |||
1245 | case ECORE_X_ILLUME_INDICATOR_TRANSPARENT: | ||
1246 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT; | ||
1247 | |||
1248 | default: | ||
1249 | break; | ||
1250 | } | ||
1251 | return 0; | ||
1252 | } | ||
1253 | |||
1254 | static Ecore_X_Illume_Indicator_Opacity_Mode | ||
1255 | _ecore_x_e_indicator_opacity_get(Ecore_X_Atom atom) | ||
1256 | { | ||
1257 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE) | ||
1258 | return ECORE_X_ILLUME_INDICATOR_OPAQUE; | ||
1259 | |||
1260 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT) | ||
1261 | return ECORE_X_ILLUME_INDICATOR_TRANSLUCENT; | ||
1262 | |||
1263 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT) | ||
1264 | return ECORE_X_ILLUME_INDICATOR_TRANSPARENT; | ||
1265 | |||
1266 | return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; | ||
1267 | } | ||
1268 | |||
1269 | EAPI void | ||
1270 | ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, | ||
1271 | Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1272 | { | ||
1273 | Ecore_X_Atom atom = 0; | ||
1274 | |||
1275 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1276 | atom = _ecore_x_e_indicator_opacity_atom_get(mode); | ||
1277 | ecore_x_window_prop_atom_set(win, | ||
1278 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1279 | &atom, 1); | ||
1280 | } | ||
1281 | |||
1282 | EAPI Ecore_X_Illume_Indicator_Opacity_Mode | ||
1283 | ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win) | ||
1284 | { | ||
1285 | Ecore_X_Atom atom; | ||
1286 | |||
1287 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1288 | if (!ecore_x_window_prop_atom_get(win, | ||
1289 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1290 | &atom, 1)) | ||
1291 | return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; | ||
1292 | |||
1293 | return _ecore_x_e_indicator_opacity_get(atom); | ||
1294 | } | ||
1295 | |||
1296 | EAPI void | ||
1297 | ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, | ||
1298 | Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1299 | { | ||
1300 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1301 | ecore_x_client_message32_send(win, | ||
1302 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1303 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | ||
1304 | _ecore_x_e_indicator_opacity_atom_get(mode), | ||
1305 | 0, 0, 0, 0); | ||
1306 | } | ||
1307 | |||
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c index 40304df..b1c7528 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_keymap.c | |||
@@ -279,6 +279,14 @@ ecore_x_keysym_string_get(int keysym) | |||
279 | return _ecore_xcb_keymap_keysym_to_string(keysym); | 279 | return _ecore_xcb_keymap_keysym_to_string(keysym); |
280 | } | 280 | } |
281 | 281 | ||
282 | EAPI int | ||
283 | ecore_x_keysym_keycode_get(const char *keyname) | ||
284 | { | ||
285 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
286 | |||
287 | return _ecore_xcb_keymap_string_to_keycode(keyname); | ||
288 | } | ||
289 | |||
282 | /* local functions */ | 290 | /* local functions */ |
283 | static int | 291 | static int |
284 | _ecore_xcb_keymap_mask_get(void *reply, | 292 | _ecore_xcb_keymap_mask_get(void *reply, |
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c index 0a523b9..b1e0622 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c | |||
@@ -838,6 +838,56 @@ ecore_x_netwm_icon_name_set(Ecore_X_Window win, | |||
838 | ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, name); | 838 | ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, name); |
839 | } | 839 | } |
840 | 840 | ||
841 | EAPI void | ||
842 | ecore_x_netwm_icons_set(Ecore_X_Window win, | ||
843 | Ecore_X_Icon *icon, | ||
844 | int num) | ||
845 | { | ||
846 | unsigned int *data, *p, *p2; | ||
847 | unsigned int i, size, x, y; | ||
848 | |||
849 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
850 | size = 0; | ||
851 | for (i = 0; i < (unsigned int)num; i++) | ||
852 | { | ||
853 | size += 2 + (icon[i].width * icon[i].height); | ||
854 | } | ||
855 | data = malloc(size * sizeof(unsigned int)); | ||
856 | if (!data) return; | ||
857 | p = data; | ||
858 | for (i = 0; i < (unsigned int)num; i++) | ||
859 | { | ||
860 | p[0] = icon[i].width; | ||
861 | p[1] = icon[i].height; | ||
862 | p += 2; | ||
863 | p2 = icon[i].data; | ||
864 | for (y = 0; y < icon[i].height; y++) | ||
865 | { | ||
866 | for (x = 0; x < icon[i].width; x++) | ||
867 | { | ||
868 | unsigned int r, g, b, a; | ||
869 | |||
870 | a = (*p2 >> 24) & 0xff; | ||
871 | r = (*p2 >> 16) & 0xff; | ||
872 | g = (*p2 >> 8 ) & 0xff; | ||
873 | b = (*p2 ) & 0xff; | ||
874 | if ((a > 0) && (a < 255)) | ||
875 | { | ||
876 | r = (r * 255) / a; | ||
877 | g = (g * 255) / a; | ||
878 | b = (b * 255) / a; | ||
879 | } | ||
880 | *p = (a << 24) | (r << 16) | (g << 8) | b; | ||
881 | p++; | ||
882 | p2++; | ||
883 | } | ||
884 | } | ||
885 | } | ||
886 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON, | ||
887 | data, size); | ||
888 | free(data); | ||
889 | } | ||
890 | |||
841 | EAPI Eina_Bool | 891 | EAPI Eina_Bool |
842 | ecore_x_netwm_icons_get(Ecore_X_Window win, | 892 | ecore_x_netwm_icons_get(Ecore_X_Window win, |
843 | Ecore_X_Icon **icon, | 893 | Ecore_X_Icon **icon, |
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c index 62f7618..81a7c3f 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* TODO: List of missing functions | 1 | /* TODO: List of missing functions |
2 | * | 2 | * |
3 | * ecore_x_randr_crtc_clone_set | 3 | * ecore_x_randr_crtc_clone_set |
4 | * ecore_x_randr_output_size_mm_get | ||
5 | * ecore_x_randr_output_crtc_set | 4 | * ecore_x_randr_output_crtc_set |
6 | * ecore_x_randr_edid_version_get | 5 | * ecore_x_randr_edid_version_get |
7 | * ecore_x_randr_edid_info_has_valid_checksum | 6 | * ecore_x_randr_edid_info_has_valid_checksum |
@@ -776,6 +775,24 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root, | |||
776 | return modes; | 775 | return modes; |
777 | } | 776 | } |
778 | 777 | ||
778 | EAPI Eina_Bool | ||
779 | ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, Ecore_X_Randr_Mode mode) | ||
780 | { | ||
781 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
782 | CHECK_XCB_CONN; | ||
783 | |||
784 | #ifdef ECORE_XCB_RANDR | ||
785 | RANDR_CHECK_1_2_RET(EINA_FALSE); | ||
786 | |||
787 | if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None)) | ||
788 | return EINA_FALSE; | ||
789 | |||
790 | xcb_randr_add_output_mode(_ecore_xcb_conn, output, mode); | ||
791 | return EINA_TRUE; | ||
792 | #endif | ||
793 | return EINA_FALSE; | ||
794 | } | ||
795 | |||
779 | /* | 796 | /* |
780 | * @brief get detailed information for a given mode id | 797 | * @brief get detailed information for a given mode id |
781 | * @param root window which's screen's ressources are queried | 798 | * @param root window which's screen's ressources are queried |
@@ -805,6 +822,63 @@ ecore_x_randr_mode_info_get(Ecore_X_Window root, | |||
805 | } | 822 | } |
806 | 823 | ||
807 | /* | 824 | /* |
825 | * @brief add a mode to a display | ||
826 | * @param root window to which's screen's ressources are added | ||
827 | * @param mode_info | ||
828 | * @return Ecore_X_Randr_Mode of the added mode. Ecore_X_Randr_None if mode | ||
829 | * adding failed. | ||
830 | * @since 1.2.0 | ||
831 | */ | ||
832 | EAPI Ecore_X_Randr_Mode | ||
833 | ecore_x_randr_mode_info_add(Ecore_X_Window root, Ecore_X_Randr_Mode_Info *mode_info) | ||
834 | { | ||
835 | #ifdef ECORE_XCB_RANDR | ||
836 | Ecore_X_Randr_Mode mode = Ecore_X_Randr_None; | ||
837 | xcb_randr_create_mode_cookie_t cookie; | ||
838 | xcb_randr_create_mode_reply_t *reply; | ||
839 | xcb_randr_mode_info_t info; | ||
840 | int namelen = 0; | ||
841 | #endif | ||
842 | |||
843 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
844 | CHECK_XCB_CONN; | ||
845 | |||
846 | #ifdef ECORE_XCB_RANDR | ||
847 | RANDR_CHECK_1_2_RET(EINA_FALSE); | ||
848 | |||
849 | if (!mode_info) return Ecore_X_Randr_None; | ||
850 | if (!_ecore_xcb_randr_root_validate(root)) return Ecore_X_Randr_None; | ||
851 | |||
852 | namelen = strlen(mode_info->name); | ||
853 | |||
854 | memset(&info, 0, sizeof(info)); | ||
855 | info.width = mode_info->width; | ||
856 | info.height = mode_info->height; | ||
857 | info.dot_clock = mode_info->dotClock; | ||
858 | info.hsync_start = mode_info->hSyncStart; | ||
859 | info.hsync_end = mode_info->hSyncEnd; | ||
860 | info.htotal = mode_info->hTotal; | ||
861 | info.hskew = mode_info->hSkew; | ||
862 | info.vsync_start = mode_info->vSyncStart; | ||
863 | info.vsync_end = mode_info->vSyncEnd; | ||
864 | info.vtotal = mode_info->vTotal; | ||
865 | info.mode_flags = mode_info->modeFlags; | ||
866 | info.name_len = namelen; | ||
867 | |||
868 | cookie = | ||
869 | xcb_randr_create_mode_unchecked(_ecore_xcb_conn, root, info, | ||
870 | namelen, mode_info->name); | ||
871 | reply = xcb_randr_create_mode_reply(_ecore_xcb_conn, cookie, NULL); | ||
872 | if (reply) | ||
873 | { | ||
874 | mode = mode_info->xid; | ||
875 | free(reply); | ||
876 | } | ||
877 | #endif | ||
878 | return mode; | ||
879 | } | ||
880 | |||
881 | /* | ||
808 | * @brief get detailed information for all modes related to a root window's screen | 882 | * @brief get detailed information for all modes related to a root window's screen |
809 | * @param root window which's screen's ressources are queried | 883 | * @param root window which's screen's ressources are queried |
810 | * @param num number of modes returned | 884 | * @param num number of modes returned |
@@ -1057,6 +1131,53 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, | |||
1057 | return Ecore_X_Randr_None; | 1131 | return Ecore_X_Randr_None; |
1058 | } | 1132 | } |
1059 | 1133 | ||
1134 | EAPI void | ||
1135 | ecore_x_randr_output_size_mm_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *w_mm, int *h_mm) | ||
1136 | { | ||
1137 | #ifdef ECORE_XCB_RANDR | ||
1138 | xcb_randr_get_output_info_cookie_t ocookie; | ||
1139 | xcb_randr_get_output_info_reply_t *oreply; | ||
1140 | xcb_timestamp_t timestamp = 0; | ||
1141 | #endif | ||
1142 | |||
1143 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1144 | CHECK_XCB_CONN; | ||
1145 | |||
1146 | if (w_mm) *w_mm = 0; | ||
1147 | if (h_mm) *h_mm = 0; | ||
1148 | |||
1149 | #ifdef ECORE_XCB_RANDR | ||
1150 | RANDR_CHECK_1_2_RET(); | ||
1151 | |||
1152 | if ((output != Ecore_X_Randr_None) && (_randr_version >= RANDR_1_3)) | ||
1153 | { | ||
1154 | xcb_randr_get_screen_resources_current_reply_t *reply; | ||
1155 | |||
1156 | reply = _ecore_xcb_randr_13_get_resources(root); | ||
1157 | timestamp = reply->config_timestamp; | ||
1158 | free(reply); | ||
1159 | } | ||
1160 | else if ((output != Ecore_X_Randr_None) && (_randr_version == RANDR_1_2)) | ||
1161 | { | ||
1162 | xcb_randr_get_screen_resources_reply_t *reply; | ||
1163 | |||
1164 | reply = _ecore_xcb_randr_12_get_resources(root); | ||
1165 | timestamp = reply->config_timestamp; | ||
1166 | free(reply); | ||
1167 | } | ||
1168 | |||
1169 | ocookie = | ||
1170 | xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, timestamp); | ||
1171 | oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, ocookie, NULL); | ||
1172 | if (oreply) | ||
1173 | { | ||
1174 | if (w_mm) *w_mm = oreply->mm_width; | ||
1175 | if (h_mm) *h_mm = oreply->mm_height; | ||
1176 | free(oreply); | ||
1177 | } | ||
1178 | #endif | ||
1179 | } | ||
1180 | |||
1060 | /** | 1181 | /** |
1061 | * @brief sets the demanded parameters for a given CRTC. Note that the CRTC is | 1182 | * @brief sets the demanded parameters for a given CRTC. Note that the CRTC is |
1062 | * auto enabled in it's preferred mode, when it was disabled before. | 1183 | * auto enabled in it's preferred mode, when it was disabled before. |
@@ -1439,6 +1560,87 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, | |||
1439 | } | 1560 | } |
1440 | 1561 | ||
1441 | /* | 1562 | /* |
1563 | * @deprecated bad naming. Use ecore_x_randr_window_crtcs_get instead. | ||
1564 | * @brief get the CRTCs, which display a certain window | ||
1565 | * @param window window the displaying CRTCs shall be found for | ||
1566 | * @param num the number of CRTCs displaying the window | ||
1567 | * @return array of CRTCs that display a certain window. NULL if no CRTCs | ||
1568 | * was found that displays the specified window. | ||
1569 | */ | ||
1570 | EAPI Ecore_X_Randr_Crtc * | ||
1571 | ecore_x_randr_current_crtc_get(Ecore_X_Window window, | ||
1572 | int *num) | ||
1573 | { | ||
1574 | return ecore_x_randr_window_crtcs_get(window, num); | ||
1575 | } | ||
1576 | |||
1577 | /* | ||
1578 | * @brief get the CRTCs, which display a certain window | ||
1579 | * @param window window the displaying crtcs shall be found for | ||
1580 | * @param num the number of crtcs displaying the window | ||
1581 | * @return array of crtcs that display a certain window. NULL if no crtcs | ||
1582 | * was found that displays the specified window. | ||
1583 | * @since 1.2.0 | ||
1584 | */ | ||
1585 | EAPI Ecore_X_Randr_Crtc * | ||
1586 | ecore_x_randr_window_crtcs_get(Ecore_X_Window window, | ||
1587 | int *num) | ||
1588 | { | ||
1589 | #ifdef ECORE_XCB_RANDR | ||
1590 | Ecore_X_Window root; | ||
1591 | Eina_Rectangle w_geo, c_geo; | ||
1592 | Ecore_X_Randr_Crtc *crtcs, *ret = NULL; | ||
1593 | Ecore_X_Randr_Mode mode; | ||
1594 | int ncrtcs, i, nret = 0; | ||
1595 | xcb_translate_coordinates_cookie_t cookie; | ||
1596 | xcb_translate_coordinates_reply_t *trans; | ||
1597 | #endif | ||
1598 | |||
1599 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1600 | CHECK_XCB_CONN; | ||
1601 | |||
1602 | #ifdef ECORE_XCB_RANDR | ||
1603 | RANDR_CHECK_1_2_RET(NULL); | ||
1604 | |||
1605 | ecore_x_window_geometry_get(window, &w_geo.x, &w_geo.y, &w_geo.w, &w_geo.h); | ||
1606 | |||
1607 | root = ecore_x_window_root_get(window); | ||
1608 | crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); | ||
1609 | if (!crtcs) return NULL; | ||
1610 | |||
1611 | /* now get window RELATIVE to root window - thats what matters. */ | ||
1612 | cookie = xcb_translate_coordinates(_ecore_xcb_conn, window, root, 0, 0); | ||
1613 | trans = xcb_translate_coordinates_reply(_ecore_xcb_conn, cookie, NULL); | ||
1614 | w_geo.x = trans->dst_x; | ||
1615 | w_geo.y = trans->dst_y; | ||
1616 | free(trans); | ||
1617 | |||
1618 | for (i = 0, nret = 0; i < ncrtcs; i++) | ||
1619 | { | ||
1620 | /* if crtc is not enabled, don't bother about it any further */ | ||
1621 | mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); | ||
1622 | if (mode == Ecore_X_Randr_None) continue; | ||
1623 | |||
1624 | ecore_x_randr_crtc_geometry_get(root, crtcs[i], &c_geo.x, &c_geo.y, | ||
1625 | &c_geo.w, &c_geo.h); | ||
1626 | if (eina_rectangles_intersect(&w_geo, &c_geo)) | ||
1627 | { | ||
1628 | ret = realloc(ret, (++nret * | ||
1629 | sizeof(Ecore_X_Randr_Output))); | ||
1630 | ret[nret] = crtcs[i]; | ||
1631 | } | ||
1632 | } | ||
1633 | free(crtcs); | ||
1634 | |||
1635 | if (num) *num = nret; | ||
1636 | return ret; | ||
1637 | |||
1638 | #endif | ||
1639 | if (num) *num = 0; | ||
1640 | return NULL; | ||
1641 | } | ||
1642 | |||
1643 | /* | ||
1442 | * @brief get a CRTC's outputs. | 1644 | * @brief get a CRTC's outputs. |
1443 | * @param root the root window which's screen will be queried | 1645 | * @param root the root window which's screen will be queried |
1444 | * @param num number of outputs referenced by given CRTC | 1646 | * @param num number of outputs referenced by given CRTC |
@@ -2172,6 +2374,22 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, | |||
2172 | } | 2374 | } |
2173 | 2375 | ||
2174 | /* | 2376 | /* |
2377 | * @deprecated bad naming. Use ecore_x_randr_window_outputs_get instead. | ||
2378 | * @brief get the outputs, which display a certain window | ||
2379 | * @param window window the displaying outputs shall be found for | ||
2380 | * @param num the number of outputs displaying the window | ||
2381 | * @return array of outputs that display a certain window. NULL if no outputs | ||
2382 | * was found that displays the specified window. | ||
2383 | */ | ||
2384 | |||
2385 | Ecore_X_Randr_Output * | ||
2386 | ecore_x_randr_current_output_get(Ecore_X_Window window, | ||
2387 | int *num) | ||
2388 | { | ||
2389 | return ecore_x_randr_window_outputs_get(window, num); | ||
2390 | } | ||
2391 | |||
2392 | /* | ||
2175 | * @brief get the outputs, which display a certain window | 2393 | * @brief get the outputs, which display a certain window |
2176 | * @param window window the displaying outputs shall be found for | 2394 | * @param window window the displaying outputs shall be found for |
2177 | * @param num the number of outputs displaying the window | 2395 | * @param num the number of outputs displaying the window |
@@ -2184,13 +2402,9 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, | |||
2184 | { | 2402 | { |
2185 | #ifdef ECORE_XCB_RANDR | 2403 | #ifdef ECORE_XCB_RANDR |
2186 | Ecore_X_Window root; | 2404 | Ecore_X_Window root; |
2187 | Eina_Rectangle w_geo, c_geo; | ||
2188 | Ecore_X_Randr_Crtc *crtcs; | 2405 | Ecore_X_Randr_Crtc *crtcs; |
2189 | Ecore_X_Randr_Mode mode; | 2406 | Ecore_X_Randr_Output *outputs, *ret = NULL; |
2190 | Ecore_X_Randr_Output *outputs, *ret = NULL, *tret; | ||
2191 | int ncrtcs, noutputs, i, nret = 0; | 2407 | int ncrtcs, noutputs, i, nret = 0; |
2192 | xcb_translate_coordinates_cookie_t cookie; | ||
2193 | xcb_translate_coordinates_reply_t *trans; | ||
2194 | #endif | 2408 | #endif |
2195 | 2409 | ||
2196 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | 2410 | LOGFN(__FILE__, __LINE__, __FUNCTION__); |
@@ -2199,64 +2413,36 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, | |||
2199 | if (num) *num = 0; | 2413 | if (num) *num = 0; |
2200 | 2414 | ||
2201 | #ifdef ECORE_XCB_RANDR | 2415 | #ifdef ECORE_XCB_RANDR |
2202 | RANDR_CHECK_1_2_RET(NULL); | 2416 | if (_randr_version < RANDR_1_2) goto _ecore_x_randr_current_output_get_fail; |
2203 | |||
2204 | ecore_x_window_geometry_get(window, &w_geo.x, &w_geo.y, &w_geo.w, &w_geo.h); | ||
2205 | 2417 | ||
2206 | root = ecore_x_window_root_get(window); | 2418 | root = ecore_x_window_root_get(window); |
2207 | crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); | 2419 | if (!(crtcs = ecore_x_randr_window_crtcs_get(window, &ncrtcs))) |
2208 | if (!crtcs) return NULL; | 2420 | goto _ecore_x_randr_current_output_get_fail; |
2209 | 2421 | ||
2210 | /* now get window RELATIVE to root window - thats what matters. */ | 2422 | for (i = 0, nret = 0; i < ncrtcs; i++) |
2211 | cookie = xcb_translate_coordinates(_ecore_xcb_conn, window, root, 0, 0); | ||
2212 | trans = xcb_translate_coordinates_reply(_ecore_xcb_conn, cookie, NULL); | ||
2213 | w_geo.x = trans->dst_x; | ||
2214 | w_geo.y = trans->dst_y; | ||
2215 | free(trans); | ||
2216 | |||
2217 | for (i = 0; i < ncrtcs; i++) | ||
2218 | { | 2423 | { |
2219 | /* if crtc is not enabled, don't bother about it any further */ | ||
2220 | mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); | ||
2221 | if (mode == Ecore_X_Randr_None) continue; | ||
2222 | 2424 | ||
2223 | ecore_x_randr_crtc_geometry_get(root, crtcs[i], &c_geo.x, &c_geo.y, | 2425 | outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], |
2224 | &c_geo.w, &c_geo.h); | 2426 | &noutputs); |
2225 | if (eina_rectangles_intersect(&w_geo, &c_geo)) | 2427 | if (!outputs) |
2226 | { | 2428 | goto _ecore_x_randr_current_output_get_fail_free; |
2227 | outputs = | 2429 | nret += noutputs; |
2228 | ecore_x_randr_crtc_outputs_get(root, crtcs[i], &noutputs); | 2430 | ret = realloc(ret, (nret * sizeof(Ecore_X_Randr_Output))); |
2229 | /* The case below should be impossible, but for safety reasons | 2431 | memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); |
2230 | * remains */ | 2432 | free(outputs); |
2231 | if (!outputs) | ||
2232 | { | ||
2233 | if (num) *num = 0; | ||
2234 | free(ret); | ||
2235 | free(crtcs); | ||
2236 | return NULL; | ||
2237 | } | ||
2238 | tret = realloc(ret, ((nret + noutputs) * | ||
2239 | sizeof(Ecore_X_Randr_Output))); | ||
2240 | if (!tret) | ||
2241 | { | ||
2242 | if (num) *num = 0; | ||
2243 | free(outputs); | ||
2244 | free(ret); | ||
2245 | free(crtcs); | ||
2246 | return NULL; | ||
2247 | } | ||
2248 | ret = tret; | ||
2249 | memcpy(&ret[nret], outputs, | ||
2250 | (noutputs * sizeof(Ecore_X_Randr_Output))); | ||
2251 | nret += noutputs; | ||
2252 | free(outputs); | ||
2253 | } | ||
2254 | } | 2433 | } |
2255 | free(crtcs); | 2434 | free(crtcs); |
2256 | 2435 | ||
2257 | if (num) *num = nret; | 2436 | if (num) |
2437 | *num = nret; | ||
2438 | |||
2258 | return ret; | 2439 | return ret; |
2259 | 2440 | ||
2441 | _ecore_x_randr_current_output_get_fail_free: | ||
2442 | free(outputs); | ||
2443 | free(crtcs); | ||
2444 | free(ret); | ||
2445 | _ecore_x_randr_current_output_get_fail: | ||
2260 | #endif | 2446 | #endif |
2261 | if (num) *num = 0; | 2447 | if (num) *num = 0; |
2262 | return NULL; | 2448 | return NULL; |
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c index 27bceaf..3458729 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c | |||
@@ -651,7 +651,7 @@ ecore_x_window_depth_get(Ecore_X_Window win) | |||
651 | * @c _NET_WM_PID. | 651 | * @c _NET_WM_PID. |
652 | * | 652 | * |
653 | * @param win The given window. | 653 | * @param win The given window. |
654 | * @ingroup Ecore_X_Window_Properties_Groups | 654 | * @ingroup Ecore_X_Window_Properties_Group |
655 | */ | 655 | */ |
656 | EAPI void | 656 | EAPI void |
657 | ecore_x_window_defaults_set(Ecore_X_Window win) | 657 | ecore_x_window_defaults_set(Ecore_X_Window win) |
@@ -1119,7 +1119,7 @@ ecore_x_window_save_set_del(Ecore_X_Window win) | |||
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | /** | 1121 | /** |
1122 | * gets the focus to the window @p win. | 1122 | * gets the window that has focus. |
1123 | * @return The window that has focus. | 1123 | * @return The window that has focus. |
1124 | * @ingroup Ecore_X_Window_Focus_Functions | 1124 | * @ingroup Ecore_X_Window_Focus_Functions |
1125 | */ | 1125 | */ |
diff --git a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in index 27a2841..cada69a 100644 --- a/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xlib/Makefile.in | |||
@@ -48,16 +48,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \ | |||
48 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | 48 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ |
49 | $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ | 49 | $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \ |
50 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ | 50 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ |
51 | $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \ | 51 | $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ |
52 | $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ | 52 | $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \ |
53 | $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ | 53 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ |
54 | $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ | 54 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ |
55 | $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ | 55 | $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ |
56 | $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ | 56 | $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac |
57 | $(top_srcdir)/configure.ac | ||
58 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | 57 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
59 | $(ACLOCAL_M4) | 58 | $(ACLOCAL_M4) |
60 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs | 59 | mkinstalldirs = $(install_sh) -d |
61 | CONFIG_HEADER = $(top_builddir)/config.h | 60 | CONFIG_HEADER = $(top_builddir)/config.h |
62 | CONFIG_CLEAN_FILES = | 61 | CONFIG_CLEAN_FILES = |
63 | CONFIG_CLEAN_VPATH_FILES = | 62 | CONFIG_CLEAN_VPATH_FILES = |
@@ -197,6 +196,8 @@ EVAS_LIBS = @EVAS_LIBS@ | |||
197 | EVIL_CFLAGS = @EVIL_CFLAGS@ | 196 | EVIL_CFLAGS = @EVIL_CFLAGS@ |
198 | EVIL_LIBS = @EVIL_LIBS@ | 197 | EVIL_LIBS = @EVIL_LIBS@ |
199 | EXEEXT = @EXEEXT@ | 198 | EXEEXT = @EXEEXT@ |
199 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
200 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
200 | FGREP = @FGREP@ | 201 | FGREP = @FGREP@ |
201 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ | 202 | GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ |
202 | GLIB_CFLAGS = @GLIB_CFLAGS@ | 203 | GLIB_CFLAGS = @GLIB_CFLAGS@ |
@@ -252,6 +253,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ | |||
252 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | 253 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ |
253 | PIXMAN_LIBS = @PIXMAN_LIBS@ | 254 | PIXMAN_LIBS = @PIXMAN_LIBS@ |
254 | PKG_CONFIG = @PKG_CONFIG@ | 255 | PKG_CONFIG = @PKG_CONFIG@ |
256 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
257 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
255 | POSUB = @POSUB@ | 258 | POSUB = @POSUB@ |
256 | RANLIB = @RANLIB@ | 259 | RANLIB = @RANLIB@ |
257 | SCIM_CFLAGS = @SCIM_CFLAGS@ | 260 | SCIM_CFLAGS = @SCIM_CFLAGS@ |
@@ -262,6 +265,7 @@ SDL_LIBS = @SDL_LIBS@ | |||
262 | SED = @SED@ | 265 | SED = @SED@ |
263 | SET_MAKE = @SET_MAKE@ | 266 | SET_MAKE = @SET_MAKE@ |
264 | SHELL = @SHELL@ | 267 | SHELL = @SHELL@ |
268 | SHM_OPEN_LIBS = @SHM_OPEN_LIBS@ | ||
265 | SSL_CFLAGS = @SSL_CFLAGS@ | 269 | SSL_CFLAGS = @SSL_CFLAGS@ |
266 | SSL_LIBS = @SSL_LIBS@ | 270 | SSL_LIBS = @SSL_LIBS@ |
267 | STRIP = @STRIP@ | 271 | STRIP = @STRIP@ |
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 ee981fe..7a8bffa 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 | |||
@@ -270,7 +270,20 @@ _ecore_x_atoms_init(void) | |||
270 | { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, | 270 | { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE }, |
271 | { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", | 271 | { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE", |
272 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, | 272 | &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE }, |
273 | 273 | { "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE }, | |
274 | { "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON }, | ||
275 | { "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF }, | ||
276 | { "_E_ILLUME_INDICATOR_OPACITY_MODE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE }, | ||
277 | { "_E_ILLUME_INDICATOR_OPAQUE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE }, | ||
278 | { "_E_ILLUME_INDICATOR_TRANSLUCENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT }, | ||
279 | { "_E_ILLUME_INDICATOR_TRANSPARENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT }, | ||
280 | { "_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLES", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE }, | ||
281 | { "_E_ILLUME_ROTATE_WINDOW_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE }, | ||
282 | { "_E_ILLUME_ROTATE_ROOT_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE }, | ||
283 | { "_E_ILLUME_CLIPBOARD_STATE", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE }, | ||
284 | { "_E_ILLUME_CLIPBOARD_ON", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON }, | ||
285 | { "_E_ILLUME_CLIPBOARD_OFF", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF }, | ||
286 | { "_E_ILLUME_CLIPBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY }, | ||
274 | { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER }, | 287 | { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER }, |
275 | { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE }, | 288 | { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE }, |
276 | { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED }, | 289 | { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED }, |
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 5966bbd..4bd5218 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 | |||
@@ -768,6 +768,99 @@ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) | |||
768 | 1, 0, 0, 0, 0); | 768 | 1, 0, 0, 0, 0); |
769 | } | 769 | } |
770 | 770 | ||
771 | static Ecore_X_Atom | ||
772 | _ecore_x_e_clipboard_atom_get(Ecore_X_Illume_Clipboard_State state) | ||
773 | { | ||
774 | switch (state) | ||
775 | { | ||
776 | case ECORE_X_ILLUME_CLIPBOARD_STATE_ON: | ||
777 | return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON; | ||
778 | case ECORE_X_ILLUME_CLIPBOARD_STATE_OFF: | ||
779 | return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF; | ||
780 | default: | ||
781 | break; | ||
782 | } | ||
783 | return 0; | ||
784 | } | ||
785 | |||
786 | static Ecore_X_Illume_Clipboard_State | ||
787 | _ecore_x_e_clipboard_state_get(Ecore_X_Atom atom) | ||
788 | { | ||
789 | if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON) | ||
790 | return ECORE_X_ILLUME_CLIPBOARD_STATE_ON; | ||
791 | |||
792 | if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF) | ||
793 | return ECORE_X_ILLUME_CLIPBOARD_STATE_OFF; | ||
794 | |||
795 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
796 | } | ||
797 | |||
798 | EAPI void | ||
799 | ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, | ||
800 | Ecore_X_Illume_Clipboard_State state) | ||
801 | { | ||
802 | Ecore_X_Atom atom = 0; | ||
803 | |||
804 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
805 | atom = _ecore_x_e_clipboard_atom_get(state); | ||
806 | |||
807 | ecore_x_window_prop_atom_set(win, | ||
808 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, | ||
809 | &atom, 1); | ||
810 | } | ||
811 | |||
812 | EAPI Ecore_X_Illume_Clipboard_State | ||
813 | ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win) | ||
814 | { | ||
815 | Ecore_X_Atom atom = 0; | ||
816 | |||
817 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
818 | |||
819 | if (!ecore_x_window_prop_atom_get(win, | ||
820 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, | ||
821 | &atom, 1)) | ||
822 | return ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN; | ||
823 | return _ecore_x_e_clipboard_state_get(atom); | ||
824 | } | ||
825 | |||
826 | EAPI void | ||
827 | ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, | ||
828 | int x, int y, int w, int h) | ||
829 | { | ||
830 | unsigned int geom[4]; | ||
831 | |||
832 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
833 | geom[0] = x; | ||
834 | geom[1] = y; | ||
835 | geom[2] = w; | ||
836 | geom[3] = h; | ||
837 | ecore_x_window_prop_card32_set(win, | ||
838 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, | ||
839 | geom, 4); | ||
840 | } | ||
841 | |||
842 | EAPI Eina_Bool | ||
843 | ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, | ||
844 | int *x, int *y, int *w, int *h) | ||
845 | { | ||
846 | int ret = 0; | ||
847 | unsigned int geom[4]; | ||
848 | |||
849 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
850 | ret = | ||
851 | ecore_x_window_prop_card32_get(win, | ||
852 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, | ||
853 | geom, 4); | ||
854 | if (ret != 4) return EINA_FALSE; | ||
855 | |||
856 | if (x) *x = geom[0]; | ||
857 | if (y) *y = geom[1]; | ||
858 | if (w) *w = geom[2]; | ||
859 | if (h) *h = geom[3]; | ||
860 | |||
861 | return EINA_TRUE; | ||
862 | } | ||
863 | |||
771 | EAPI void | 864 | EAPI void |
772 | ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, | 865 | ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, |
773 | Ecore_X_Sync_Counter counter) | 866 | Ecore_X_Sync_Counter counter) |
@@ -1058,3 +1151,143 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win) | |||
1058 | return pixmap; | 1151 | return pixmap; |
1059 | } | 1152 | } |
1060 | 1153 | ||
1154 | static Ecore_X_Atom | ||
1155 | _ecore_x_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state) | ||
1156 | { | ||
1157 | switch (state) | ||
1158 | { | ||
1159 | case ECORE_X_ILLUME_INDICATOR_STATE_ON: | ||
1160 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; | ||
1161 | |||
1162 | case ECORE_X_ILLUME_INDICATOR_STATE_OFF: | ||
1163 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; | ||
1164 | |||
1165 | default: | ||
1166 | break; | ||
1167 | } | ||
1168 | return 0; | ||
1169 | } | ||
1170 | |||
1171 | static Ecore_X_Illume_Indicator_State | ||
1172 | _ecore_x_e_indicator_state_get(Ecore_X_Atom atom) | ||
1173 | { | ||
1174 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON) | ||
1175 | return ECORE_X_ILLUME_INDICATOR_STATE_ON; | ||
1176 | |||
1177 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF) | ||
1178 | return ECORE_X_ILLUME_INDICATOR_STATE_OFF; | ||
1179 | |||
1180 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
1181 | } | ||
1182 | |||
1183 | EAPI void | ||
1184 | ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, | ||
1185 | Ecore_X_Illume_Indicator_State state) | ||
1186 | { | ||
1187 | Ecore_X_Atom atom = 0; | ||
1188 | |||
1189 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1190 | atom = _ecore_x_e_indicator_atom_get(state); | ||
1191 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1192 | &atom, 1); | ||
1193 | } | ||
1194 | |||
1195 | EAPI Ecore_X_Illume_Indicator_State | ||
1196 | ecore_x_e_illume_indicator_state_get(Ecore_X_Window win) | ||
1197 | { | ||
1198 | Ecore_X_Atom atom; | ||
1199 | |||
1200 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1201 | if (!ecore_x_window_prop_atom_get(win, | ||
1202 | ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1203 | &atom, 1)) | ||
1204 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
1205 | |||
1206 | return _ecore_x_e_indicator_state_get(atom); | ||
1207 | } | ||
1208 | |||
1209 | EAPI void | ||
1210 | ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, | ||
1211 | Ecore_X_Illume_Indicator_State state) | ||
1212 | { | ||
1213 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1214 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1215 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | ||
1216 | _ecore_x_e_indicator_atom_get(state), | ||
1217 | 0, 0, 0, 0); | ||
1218 | } | ||
1219 | |||
1220 | static Ecore_X_Atom | ||
1221 | _ecore_x_e_indicator_opacity_atom_get(Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1222 | { | ||
1223 | switch (mode) | ||
1224 | { | ||
1225 | case ECORE_X_ILLUME_INDICATOR_OPAQUE: | ||
1226 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE; | ||
1227 | |||
1228 | case ECORE_X_ILLUME_INDICATOR_TRANSLUCENT: | ||
1229 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT; | ||
1230 | |||
1231 | case ECORE_X_ILLUME_INDICATOR_TRANSPARENT: | ||
1232 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT; | ||
1233 | |||
1234 | default: | ||
1235 | break; | ||
1236 | } | ||
1237 | return 0; | ||
1238 | } | ||
1239 | |||
1240 | static Ecore_X_Illume_Indicator_Opacity_Mode | ||
1241 | _ecore_x_e_indicator_opacity_get(Ecore_X_Atom atom) | ||
1242 | { | ||
1243 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE) | ||
1244 | return ECORE_X_ILLUME_INDICATOR_OPAQUE; | ||
1245 | |||
1246 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT) | ||
1247 | return ECORE_X_ILLUME_INDICATOR_TRANSLUCENT; | ||
1248 | |||
1249 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT) | ||
1250 | return ECORE_X_ILLUME_INDICATOR_TRANSPARENT; | ||
1251 | |||
1252 | return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; | ||
1253 | } | ||
1254 | |||
1255 | EAPI void | ||
1256 | ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, | ||
1257 | Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1258 | { | ||
1259 | Ecore_X_Atom atom = 0; | ||
1260 | |||
1261 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1262 | atom = _ecore_x_e_indicator_opacity_atom_get(mode); | ||
1263 | ecore_x_window_prop_atom_set(win, | ||
1264 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1265 | &atom, 1); | ||
1266 | } | ||
1267 | |||
1268 | EAPI Ecore_X_Illume_Indicator_Opacity_Mode | ||
1269 | ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win) | ||
1270 | { | ||
1271 | Ecore_X_Atom atom; | ||
1272 | |||
1273 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1274 | if (!ecore_x_window_prop_atom_get(win, | ||
1275 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1276 | &atom, 1)) | ||
1277 | return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; | ||
1278 | |||
1279 | return _ecore_x_e_indicator_opacity_get(atom); | ||
1280 | } | ||
1281 | |||
1282 | EAPI void | ||
1283 | ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, | ||
1284 | Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1285 | { | ||
1286 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1287 | ecore_x_client_message32_send(win, | ||
1288 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1289 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | ||
1290 | _ecore_x_e_indicator_opacity_atom_get(mode), | ||
1291 | 0, 0, 0, 0); | ||
1292 | } | ||
1293 | |||
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 9fc428a..3076c3c 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 | |||
@@ -661,6 +661,57 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win, | |||
661 | return EINA_TRUE; | 661 | return EINA_TRUE; |
662 | } | 662 | } |
663 | 663 | ||
664 | EAPI void | ||
665 | ecore_x_netwm_icons_set(Ecore_X_Window win, | ||
666 | Ecore_X_Icon *icon, | ||
667 | int num) | ||
668 | { | ||
669 | unsigned int *data, *p, *p2; | ||
670 | unsigned int i, size, x, y; | ||
671 | |||
672 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
673 | size = 0; | ||
674 | for (i = 0; i < (unsigned int)num; i++) | ||
675 | { | ||
676 | size += 2 + (icon[i].width * icon[i].height); | ||
677 | } | ||
678 | data = malloc(size * sizeof(unsigned int)); | ||
679 | if (!data) return; | ||
680 | p = data; | ||
681 | for (i = 0; i < (unsigned int)num; i++) | ||
682 | { | ||
683 | p[0] = icon[i].width; | ||
684 | p[1] = icon[i].height; | ||
685 | p += 2; | ||
686 | p2 = icon[i].data; | ||
687 | for (y = 0; y < icon[i].height; y++) | ||
688 | { | ||
689 | for (x = 0; x < icon[i].width; x++) | ||
690 | { | ||
691 | unsigned int r, g, b, a; | ||
692 | |||
693 | a = (*p2 >> 24) & 0xff; | ||
694 | r = (*p2 >> 16) & 0xff; | ||
695 | g = (*p2 >> 8 ) & 0xff; | ||
696 | b = (*p2 ) & 0xff; | ||
697 | if ((a > 0) && (a < 255)) | ||
698 | { | ||
699 | // unpremul | ||
700 | r = (r * 255) / a; | ||
701 | g = (g * 255) / a; | ||
702 | b = (b * 255) / a; | ||
703 | } | ||
704 | *p = (a << 24) | (r << 16) | (g << 8) | b; | ||
705 | p++; | ||
706 | p2++; | ||
707 | } | ||
708 | } | ||
709 | } | ||
710 | ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON, | ||
711 | data, size); | ||
712 | free(data); | ||
713 | } | ||
714 | |||
664 | EAPI Eina_Bool | 715 | EAPI Eina_Bool |
665 | ecore_x_netwm_icons_get(Ecore_X_Window win, | 716 | ecore_x_netwm_icons_get(Ecore_X_Window win, |
666 | Ecore_X_Icon **icon, | 717 | Ecore_X_Icon **icon, |
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 38218a5..ec23b3c 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 | |||
@@ -347,9 +347,9 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, | |||
347 | ret[i]->vSyncStart = res->modes[i].vSyncStart; | 347 | ret[i]->vSyncStart = res->modes[i].vSyncStart; |
348 | ret[i]->vSyncEnd = res->modes[i].vSyncEnd; | 348 | ret[i]->vSyncEnd = res->modes[i].vSyncEnd; |
349 | ret[i]->vTotal = res->modes[i].vTotal; | 349 | ret[i]->vTotal = res->modes[i].vTotal; |
350 | if ((ret[i]->name = (malloc(res->modes[i].nameLength)))) | 350 | if ((ret[i]->name = (malloc(res->modes[i].nameLength + 1)))) |
351 | strncpy(ret[i]->name, res->modes[i].name, | 351 | strncpy(ret[i]->name, res->modes[i].name, |
352 | res->modes[i].nameLength); | 352 | (res->modes[i].nameLength + 1)); |
353 | else | 353 | else |
354 | ret[i]->name = NULL; | 354 | ret[i]->name = NULL; |
355 | 355 | ||
@@ -380,6 +380,48 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, | |||
380 | } | 380 | } |
381 | 381 | ||
382 | /* | 382 | /* |
383 | * @brief add a mode to a display | ||
384 | * @param root window to which's screen's ressources are added | ||
385 | * @param mode_info | ||
386 | * @return Ecore_X_Randr_Mode of the added mode. Ecore_X_Randr_None if mode | ||
387 | * adding failed. | ||
388 | * @since 1.2.0 | ||
389 | */ | ||
390 | EAPI Ecore_X_Randr_Mode | ||
391 | ecore_x_randr_mode_info_add(Ecore_X_Window root, | ||
392 | Ecore_X_Randr_Mode_Info *mode_info) | ||
393 | { | ||
394 | #ifdef ECORE_XRANDR | ||
395 | RANDR_CHECK_1_2_RET(EINA_FALSE); | ||
396 | Ecore_X_Randr_Mode mode = Ecore_X_Randr_None; | ||
397 | |||
398 | if (_ecore_x_randr_root_validate(root) && mode_info) | ||
399 | mode = XRRCreateMode(_ecore_x_disp, root, (XRRModeInfo*)mode_info); | ||
400 | |||
401 | return mode; | ||
402 | #else | ||
403 | return Ecore_X_Randr_None; | ||
404 | #endif | ||
405 | } | ||
406 | |||
407 | /* | ||
408 | * @brief delete a mode from the display | ||
409 | * @param mode_info | ||
410 | * @since 1.2.0 | ||
411 | */ | ||
412 | EAPI void | ||
413 | ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode) | ||
414 | { | ||
415 | #ifdef ECORE_XRANDR | ||
416 | RANDR_CHECK_1_2_RET(); | ||
417 | |||
418 | XRRDestroyMode(_ecore_x_disp, mode); | ||
419 | #else | ||
420 | return; | ||
421 | #endif | ||
422 | } | ||
423 | |||
424 | /* | ||
383 | * @brief get detailed information for a given mode id | 425 | * @brief get detailed information for a given mode id |
384 | * @param root window which's screen's ressources are queried | 426 | * @param root window which's screen's ressources are queried |
385 | * @param mode the XID which identifies the mode of interest | 427 | * @param mode the XID which identifies the mode of interest |
@@ -491,6 +533,83 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, | |||
491 | #endif | 533 | #endif |
492 | } | 534 | } |
493 | 535 | ||
536 | /* | ||
537 | * @deprecated bad naming. Use ecore_x_randr_window_crtcs_get instead. | ||
538 | * @brief get the CRTCs, which display a certain window | ||
539 | * @param window window the displaying crtcs shall be found for | ||
540 | * @param num the number of crtcs displaying the window | ||
541 | * @return array of crtcs that display a certain window. NULL if no crtcs | ||
542 | * was found that displays the specified window. | ||
543 | */ | ||
544 | EAPI Ecore_X_Randr_Crtc * | ||
545 | ecore_x_randr_current_crtc_get(Ecore_X_Window window, | ||
546 | int *num) | ||
547 | { | ||
548 | return ecore_x_randr_window_crtcs_get(window, num); | ||
549 | } | ||
550 | |||
551 | /* | ||
552 | * @brief get the CRTCs, which display a certain window | ||
553 | * @param window window the displaying crtcs shall be found for | ||
554 | * @param num the number of crtcs displaying the window | ||
555 | * @return array of crtcs that display a certain window. NULL if no crtcs | ||
556 | * was found that displays the specified window. | ||
557 | * @since 1.2.0 | ||
558 | */ | ||
559 | EAPI Ecore_X_Randr_Crtc * | ||
560 | ecore_x_randr_window_crtcs_get(Ecore_X_Window window, | ||
561 | int *num) | ||
562 | { | ||
563 | #ifdef ECORE_XRANDR | ||
564 | Ecore_X_Window root; | ||
565 | Eina_Rectangle w_geo, c_geo; | ||
566 | Ecore_X_Randr_Crtc *crtcs; | ||
567 | Ecore_X_Randr_Mode mode; | ||
568 | Ecore_X_Randr_Output *ret = NULL; | ||
569 | Window tw; | ||
570 | int ncrtcs, i, nret = 0, rx = 0, ry = 0; | ||
571 | |||
572 | if (_randr_version < RANDR_1_2) goto _ecore_x_randr_window_crtcs_get_fail; | ||
573 | |||
574 | ecore_x_window_geometry_get(window, | ||
575 | &w_geo.x, &w_geo.y, | ||
576 | &w_geo.w, &w_geo.h); | ||
577 | |||
578 | root = ecore_x_window_root_get(window); | ||
579 | crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); | ||
580 | if (!crtcs) goto _ecore_x_randr_window_crtcs_get_fail; | ||
581 | |||
582 | /* now get window RELATIVE to root window - thats what matters. */ | ||
583 | XTranslateCoordinates(_ecore_x_disp, window, root, 0, 0, &rx, &ry, &tw); | ||
584 | w_geo.x = rx; | ||
585 | w_geo.y = ry; | ||
586 | |||
587 | for (i = 0, nret = 0; i < ncrtcs; i++) | ||
588 | { | ||
589 | /* if crtc is not enabled, don't bother about it any further */ | ||
590 | mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); | ||
591 | if (mode == Ecore_X_Randr_None) continue; | ||
592 | |||
593 | ecore_x_randr_crtc_geometry_get(root, crtcs[i], | ||
594 | &c_geo.x, &c_geo.y, | ||
595 | &c_geo.w, &c_geo.h); | ||
596 | if (eina_rectangles_intersect(&w_geo, &c_geo)) | ||
597 | { | ||
598 | ret = realloc(ret, (sizeof(Ecore_X_Randr_Crtc) * ++nret)); | ||
599 | ret[nret] = crtcs[i]; | ||
600 | } | ||
601 | } | ||
602 | free(crtcs); | ||
603 | |||
604 | if (num) *num = nret; | ||
605 | return ret; | ||
606 | |||
607 | _ecore_x_randr_window_crtcs_get_fail: | ||
608 | #endif | ||
609 | if (num) *num = 0; | ||
610 | return NULL; | ||
611 | } | ||
612 | |||
494 | EAPI Ecore_X_Randr_Output * | 613 | EAPI Ecore_X_Randr_Output * |
495 | ecore_x_randr_outputs_get(Ecore_X_Window root, | 614 | ecore_x_randr_outputs_get(Ecore_X_Window root, |
496 | int *num) | 615 | int *num) |
@@ -1364,6 +1483,54 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, | |||
1364 | #endif | 1483 | #endif |
1365 | } | 1484 | } |
1366 | 1485 | ||
1486 | /* | ||
1487 | * @brief add given mode to given output | ||
1488 | * @param output the output the mode is added to | ||
1489 | * @param mode the mode added to the output | ||
1490 | * @return EINA_FALSE if output or mode equal Ecore_X_Randr_None, else EINA_TRUE | ||
1491 | * Additionally, if xcb backend is used, the success of the addition is reported | ||
1492 | * back directly. | ||
1493 | * @since 1.2.0 | ||
1494 | */ | ||
1495 | EAPI Eina_Bool | ||
1496 | ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output, | ||
1497 | Ecore_X_Randr_Mode mode) | ||
1498 | { | ||
1499 | #ifdef ECORE_XRANDR | ||
1500 | RANDR_CHECK_1_2_RET(EINA_FALSE); | ||
1501 | |||
1502 | if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None)) | ||
1503 | return EINA_FALSE; | ||
1504 | |||
1505 | XRRAddOutputMode(_ecore_x_disp, output, mode); | ||
1506 | return EINA_TRUE; | ||
1507 | #else | ||
1508 | return EINA_FALSE; | ||
1509 | #endif | ||
1510 | } | ||
1511 | |||
1512 | /* | ||
1513 | * @brief delete given mode from given output | ||
1514 | * @param output the output the mode is removed from | ||
1515 | * @param mode the mode removed from the output | ||
1516 | * @since 1.2.0 | ||
1517 | */ | ||
1518 | EAPI void | ||
1519 | ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output, | ||
1520 | Ecore_X_Randr_Mode mode) | ||
1521 | { | ||
1522 | #ifdef ECORE_XRANDR | ||
1523 | RANDR_CHECK_1_2_RET(); | ||
1524 | |||
1525 | if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None)) | ||
1526 | return; | ||
1527 | |||
1528 | XRRDeleteOutputMode(_ecore_x_disp, output, mode); | ||
1529 | #else | ||
1530 | return; | ||
1531 | #endif | ||
1532 | } | ||
1533 | |||
1367 | EAPI Ecore_X_Randr_Mode * | 1534 | EAPI Ecore_X_Randr_Mode * |
1368 | ecore_x_randr_output_modes_get(Ecore_X_Window root, | 1535 | ecore_x_randr_output_modes_get(Ecore_X_Window root, |
1369 | Ecore_X_Randr_Output output, | 1536 | Ecore_X_Randr_Output output, |
@@ -2136,70 +2303,39 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, | |||
2136 | { | 2303 | { |
2137 | #ifdef ECORE_XRANDR | 2304 | #ifdef ECORE_XRANDR |
2138 | Ecore_X_Window root; | 2305 | Ecore_X_Window root; |
2139 | Eina_Rectangle w_geo, c_geo; | ||
2140 | Ecore_X_Randr_Crtc *crtcs; | 2306 | Ecore_X_Randr_Crtc *crtcs; |
2141 | Ecore_X_Randr_Mode mode; | 2307 | Ecore_X_Randr_Output *outputs, *ret = NULL; |
2142 | Ecore_X_Randr_Output *outputs, *ret = NULL, *tret; | 2308 | int ncrtcs, noutputs, i, nret = 0; |
2143 | Window tw; | ||
2144 | int ncrtcs, noutputs, i, nret = 0, rx = 0, ry = 0; | ||
2145 | 2309 | ||
2146 | if (_randr_version < RANDR_1_2) goto _ecore_x_randr_current_output_get_fail; | 2310 | if (_randr_version < RANDR_1_2) goto _ecore_x_randr_current_output_get_fail; |
2147 | 2311 | ||
2148 | ecore_x_window_geometry_get(window, | ||
2149 | &w_geo.x, &w_geo.y, | ||
2150 | &w_geo.w, &w_geo.h); | ||
2151 | |||
2152 | root = ecore_x_window_root_get(window); | 2312 | root = ecore_x_window_root_get(window); |
2153 | crtcs = ecore_x_randr_crtcs_get(root, &ncrtcs); | 2313 | if (!(crtcs = ecore_x_randr_window_crtcs_get(window, &ncrtcs))) |
2154 | if (!crtcs) goto _ecore_x_randr_current_output_get_fail; | 2314 | goto _ecore_x_randr_current_output_get_fail; |
2155 | |||
2156 | /* now get window RELATIVE to root window - thats what matters. */ | ||
2157 | XTranslateCoordinates(_ecore_x_disp, window, root, 0, 0, &rx, &ry, &tw); | ||
2158 | w_geo.x = rx; | ||
2159 | w_geo.y = ry; | ||
2160 | 2315 | ||
2161 | for (i = 0; i < ncrtcs; i++) | 2316 | for (i = 0, nret = 0; i < ncrtcs; i++) |
2162 | { | 2317 | { |
2163 | /* if crtc is not enabled, don't bother about it any further */ | ||
2164 | mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]); | ||
2165 | if (mode == Ecore_X_Randr_None) continue; | ||
2166 | 2318 | ||
2167 | ecore_x_randr_crtc_geometry_get(root, crtcs[i], | 2319 | outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], |
2168 | &c_geo.x, &c_geo.y, | 2320 | &noutputs); |
2169 | &c_geo.w, &c_geo.h); | 2321 | if (!outputs) |
2170 | if (eina_rectangles_intersect(&w_geo, &c_geo)) | 2322 | goto _ecore_x_randr_current_output_get_fail_free; |
2171 | { | 2323 | nret += noutputs; |
2172 | outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i], | 2324 | ret = realloc(ret, (nret * sizeof(Ecore_X_Randr_Output))); |
2173 | &noutputs); | 2325 | memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); |
2174 | /* The case below should be impossible, but for safety reasons | 2326 | free(outputs); |
2175 | * remains */ | ||
2176 | if (!outputs) | ||
2177 | { | ||
2178 | if (num) *num = 0; | ||
2179 | free(ret); | ||
2180 | free(crtcs); | ||
2181 | return NULL; | ||
2182 | } | ||
2183 | tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output))); | ||
2184 | if (!tret) | ||
2185 | { | ||
2186 | if (num) *num = 0; | ||
2187 | free(outputs); | ||
2188 | free(ret); | ||
2189 | free(crtcs); | ||
2190 | return NULL; | ||
2191 | } | ||
2192 | ret = tret; | ||
2193 | memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output))); | ||
2194 | nret += noutputs; | ||
2195 | free(outputs); | ||
2196 | } | ||
2197 | } | 2327 | } |
2198 | free(crtcs); | 2328 | free(crtcs); |
2199 | 2329 | ||
2200 | if (num) *num = nret; | 2330 | if (num) |
2331 | *num = nret; | ||
2332 | |||
2201 | return ret; | 2333 | return ret; |
2202 | 2334 | ||
2335 | _ecore_x_randr_current_output_get_fail_free: | ||
2336 | free(outputs); | ||
2337 | free(crtcs); | ||
2338 | free(ret); | ||
2203 | _ecore_x_randr_current_output_get_fail: | 2339 | _ecore_x_randr_current_output_get_fail: |
2204 | #endif | 2340 | #endif |
2205 | if (num) *num = 0; | 2341 | if (num) *num = 0; |
@@ -2207,7 +2343,7 @@ _ecore_x_randr_current_output_get_fail: | |||
2207 | } | 2343 | } |
2208 | 2344 | ||
2209 | /* | 2345 | /* |
2210 | * @depricated bad naming. Use ecore_x_randr_window_outputs_get instead. | 2346 | * @deprecated bad naming. Use ecore_x_randr_window_outputs_get instead. |
2211 | * @brief get the outputs, which display a certain window | 2347 | * @brief get the outputs, which display a certain window |
2212 | * @param window window the displaying outputs shall be found for | 2348 | * @param window window the displaying outputs shall be found for |
2213 | * @param num the number of outputs displaying the window | 2349 | * @param num the number of outputs displaying the window |
@@ -2215,7 +2351,7 @@ _ecore_x_randr_current_output_get_fail: | |||
2215 | * was found that displays the specified window. | 2351 | * was found that displays the specified window. |
2216 | */ | 2352 | */ |
2217 | 2353 | ||
2218 | EINA_DEPRECATED EAPI Ecore_X_Randr_Output * | 2354 | EAPI Ecore_X_Randr_Output * |
2219 | ecore_x_randr_current_output_get(Ecore_X_Window window, | 2355 | ecore_x_randr_current_output_get(Ecore_X_Window window, |
2220 | int *num) | 2356 | int *num) |
2221 | { | 2357 | { |
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 c8c04e4..23eea10 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 | |||
@@ -153,3 +153,15 @@ ecore_x_keysym_string_get(int keysym) | |||
153 | return XKeysymToString(keysym); | 153 | return XKeysymToString(keysym); |
154 | } | 154 | } |
155 | 155 | ||
156 | EAPI int | ||
157 | ecore_x_keysym_keycode_get(const char *keyname) | ||
158 | { | ||
159 | int keycode = 0; | ||
160 | |||
161 | if (!strncmp(keyname, "Keycode-", 8)) | ||
162 | keycode = atoi(keyname + 8); | ||
163 | else | ||
164 | keycode = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(keyname)); | ||
165 | |||
166 | return keycode; | ||
167 | } | ||
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 1adb36b..90392bf 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 | |||
@@ -224,7 +224,7 @@ ecore_x_window_input_new(Ecore_X_Window parent, | |||
224 | * @c _NET_WM_PID. | 224 | * @c _NET_WM_PID. |
225 | * | 225 | * |
226 | * @param win The given window. | 226 | * @param win The given window. |
227 | * @ingroup Ecore_X_Window_Properties_Groups | 227 | * @ingroup Ecore_X_Window_Properties_Group |
228 | */ | 228 | */ |
229 | EAPI void | 229 | EAPI void |
230 | ecore_x_window_defaults_set(Ecore_X_Window win) | 230 | ecore_x_window_defaults_set(Ecore_X_Window win) |
@@ -597,7 +597,7 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, | |||
597 | } | 597 | } |
598 | 598 | ||
599 | /** | 599 | /** |
600 | * gets the focus to the window @p win. | 600 | * gets the window that has focus. |
601 | * @return The window that has focus. | 601 | * @return The window that has focus. |
602 | * @ingroup Ecore_X_Window_Focus_Functions | 602 | * @ingroup Ecore_X_Window_Focus_Functions |
603 | */ | 603 | */ |