From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/ecore/src/lib/ecore_x/xcb/Makefile.in | 14 ++++++- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c | 2 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c | 5 +-- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c | 6 +-- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c | 14 +++++++ .../ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c | 3 +- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_randr.c | 45 ++++++++++++++++++++-- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_window.c | 5 ++- .../ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c | 14 +++---- 9 files changed, 86 insertions(+), 22 deletions(-) (limited to 'libraries/ecore/src/lib/ecore_x/xcb') diff --git a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in index 0213aea..9108f23 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in +++ b/libraries/ecore/src/lib/ecore_x/xcb/Makefile.in @@ -261,10 +261,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SCIM_CFLAGS = @SCIM_CFLAGS@ +SCIM_LIBS = @SCIM_LIBS@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_CONFIG = @SDL_CONFIG@ SDL_LIBS = @SDL_LIBS@ @@ -283,6 +283,10 @@ TSLIB_LIBS = @TSLIB_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ VMAJ = @VMAJ@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ +WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ WIN32_CFLAGS = @WIN32_CFLAGS@ WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ WIN32_LIBS = @WIN32_LIBS@ @@ -396,6 +400,8 @@ ecore_imf_cflags = @ecore_imf_cflags@ ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ ecore_imf_evas_libs = @ecore_imf_evas_libs@ ecore_imf_libs = @ecore_imf_libs@ +ecore_imf_scim_cflags = @ecore_imf_scim_cflags@ +ecore_imf_scim_libs = @ecore_imf_scim_libs@ ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ ecore_imf_xim_libs = @ecore_imf_xim_libs@ ecore_input_cflags = @ecore_input_cflags@ @@ -408,6 +414,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@ ecore_psl1ght_libs = @ecore_psl1ght_libs@ ecore_sdl_cflags = @ecore_sdl_cflags@ ecore_sdl_libs = @ecore_sdl_libs@ +ecore_wayland_cflags = @ecore_wayland_cflags@ +ecore_wayland_libs = @ecore_wayland_libs@ ecore_win32_cflags = @ecore_win32_cflags@ ecore_win32_libs = @ecore_win32_libs@ ecore_wince_cflags = @ecore_wince_cflags@ @@ -452,12 +460,14 @@ requirements_ecore_fb = @requirements_ecore_fb@ requirements_ecore_file = @requirements_ecore_file@ requirements_ecore_imf = @requirements_ecore_imf@ requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ +requirements_ecore_imf_scim = @requirements_ecore_imf_scim@ requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ requirements_ecore_input = @requirements_ecore_input@ requirements_ecore_input_evas = @requirements_ecore_input_evas@ requirements_ecore_ipc = @requirements_ecore_ipc@ requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ requirements_ecore_sdl = @requirements_ecore_sdl@ +requirements_ecore_wayland = @requirements_ecore_wayland@ requirements_ecore_win32 = @requirements_ecore_win32@ requirements_ecore_wince = @requirements_ecore_wince@ requirements_ecore_x = @requirements_ecore_x@ diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c index d0ffde1..bbab308 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_damage.c @@ -99,7 +99,7 @@ ecore_x_damage_new(Ecore_X_Drawable drawable, /** * Destroy a damage object * - * @param The damage object to destroy + * @param damage The damage object to destroy * * Destroys the damage object @p damage * diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c index 677de38..177e61d 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dnd.c @@ -422,9 +422,8 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, * @param data User data. */ EAPI void -ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, - Ecore_X_Xdnd_Position *data), - const void *data) +ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, Ecore_X_Xdnd_Position *data), + const void *data) { _posupdatecb = cb; _posupdatedata = (void *)data; diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c index 63b7f1e..324717c 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_dpms.c @@ -270,7 +270,7 @@ ecore_x_dpms_timeout_off_get(void) /** * Sets the standby timeout (in unit of seconds). - * @param new_standby Amount of time of inactivity before standby mode will be invoked. + * @param new_timeout Amount of time of inactivity before standby mode will be invoked. * @ingroup Ecore_X_DPMS_Group */ EAPI void @@ -286,7 +286,7 @@ ecore_x_dpms_timeout_standby_set(unsigned int new_timeout) /** * Sets the suspend timeout (in unit of seconds). - * @param suspend Amount of time of inactivity before the screen is placed into suspend mode. + * @param new_timeout Amount of time of inactivity before the screen is placed into suspend mode. * @ingroup Ecore_X_DPMS_Group */ EAPI void @@ -302,7 +302,7 @@ ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout) /** * Sets the off timeout (in unit of seconds). - * @param off Amount of time of inactivity before the monitor is shut off. + * @param new_timeout Amount of time of inactivity before the monitor is shut off. * @ingroup Ecore_X_DPMS_Group */ EAPI void diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c index bbd9c2a..fc32926 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c @@ -8,6 +8,7 @@ static void (*_io_error_func)(void *data) = NULL; static void *_io_error_data = NULL; static int _error_request_code = 0; static int _error_code = 0; +static Ecore_X_ID _error_resource_id = 0; /** * Set the error handler. @@ -63,6 +64,18 @@ ecore_x_error_code_get(void) return _error_code; } +/** + * Get the resource id that caused the error. + * @return The resource id causing the X error + * + * Return the X resource id that caused the last X error + */ +EAPI Ecore_X_ID +ecore_x_error_resource_id_get(void) +{ + return _error_resource_id; +} + int _ecore_xcb_error_handle(xcb_generic_error_t *err) { @@ -84,6 +97,7 @@ _ecore_xcb_error_handle(xcb_generic_error_t *err) _error_request_code = err->sequence; _error_code = err->error_code; + _error_resource_id = err->resource_id; if (_error_func) _error_func(_error_data); diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c index 6459db7..8dea861 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c @@ -396,7 +396,7 @@ ecore_x_icccm_transient_for_set(Ecore_X_Window win, /** * Remove the transient_for setting from a window. - * @param The window + * @param win The window */ EAPI void ecore_x_icccm_transient_for_unset(Ecore_X_Window win) @@ -1452,6 +1452,7 @@ ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t) { LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, XCB_EVENT_MASK_NO_EVENT, 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 510da49..62f7618 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 @@ -1528,9 +1528,9 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, /** * @brief sets a CRTC relative to another one. - * @param crtc_r1 the CRTC to be positioned. - * @param crtc_r2 the CRTC the position should be relative to - * @param position the relation between the crtcs + * @param crtc1 the CRTC to be positioned. + * @param crtc2 the CRTC the position should be relative to + * @param policy the relation between the crtcs * @param alignment in case CRTCs size differ, aligns CRTC1 accordingly at CRTC2's * borders * @return EINA_TRUE if crtc could be successfully positioned. EINA_FALSE if @@ -2449,6 +2449,45 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, return EINA_FALSE; } +/* + * @brief check if a backlight is available + * @return whether a blacklight is available + */ +EAPI Eina_Bool +ecore_x_randr_output_backlight_available(void) +{ +#ifdef ECORE_XCB_RANDR + Ecore_X_Atom _backlight; + xcb_intern_atom_cookie_t acookie; + xcb_intern_atom_reply_t *areply; +#endif + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + CHECK_XCB_CONN; + +#ifdef ECORE_XCB_RANDR + RANDR_CHECK_1_2_RET(EINA_FALSE); + + acookie = + xcb_intern_atom_unchecked(_ecore_xcb_conn, 1, + strlen("Backlight"), "Backlight"); + areply = xcb_intern_atom_reply(_ecore_xcb_conn, acookie, NULL); + + if (!areply) + { + ERR("Backlight property is not suppported on this server or driver"); + return EINA_FALSE; + } + else + { + _backlight = areply->atom; + free(areply); + return EINA_TRUE; + } +#endif + return EINA_FALSE; +} + EAPI int ecore_x_randr_edid_version_get(unsigned char *edid, unsigned long edid_length) { 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 2616c93..27bceaf 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 @@ -783,13 +783,14 @@ ecore_x_window_focus(Ecore_X_Window win) */ EAPI void ecore_x_window_focus_at_time(Ecore_X_Window win, - Ecore_X_Time time) + Ecore_X_Time time __UNUSED__) { LOGFN(__FILE__, __LINE__, __FUNCTION__); CHECK_XCB_CONN; if (!win) win = ((xcb_screen_t *)_ecore_xcb_screen)->root; - xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_PARENT, win, time); + xcb_set_input_focus(_ecore_xcb_conn, + XCB_INPUT_FOCUS_PARENT, win, XCB_CURRENT_TIME); // ecore_x_flush(); } diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c index bf9d5ee..bbca2a5 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_xfixes.c @@ -178,7 +178,7 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) /** * Create a region from a window. - * @param window The window used to initialize the region. + * @param win The window used to initialize the region. * @param type The type of the region. * @return The newly created region. * @@ -609,8 +609,8 @@ ecore_x_region_expand(Ecore_X_Region dest, * Change clip-mask in a graphic context to the specified region. * @param region The region to change. * @param gc The clip-mask graphic context. - * @param x_origin The horizontal translation. - * @param y_origin The vertical translation. + * @param x The horizontal translation. + * @param y The vertical translation. * * Changes clip-mask in @p gc to the specified @p region and * sets the clip origin with the values of @p x_origin and @p y_origin. @@ -643,8 +643,8 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region, * @param region The region. * @param dest The window whose shape is changed. * @param type The kind of shape. - * @param x_offset The horizontal offset. - * @param y_offset The vertical offset. + * @param x The horizontal offset. + * @param y The vertical offset. * * Set the specified Shape extension region of @p window to @p region, * offset by @p x_offset and @p y_offset. Future changes to region @@ -673,8 +673,8 @@ ecore_x_region_window_shape_set(Ecore_X_Region region, * Change clip-mask in picture to the specified region. * @param region The region. * @param picture The picture. - * @param x_origin The X coordinate of the origin. - * @param y_origin The Y coordinate of the origin. + * @param x The X coordinate of the origin. + * @param y The Y coordinate of the origin. * * Changes clip-mask in picture to the specified @p region * and sets the clip origin. Input and output will be clipped to -- cgit v1.1