From: discomfitor Date: Sat, 3 Dec 2011 04:24:02 +0000 (+0000) Subject: +ecore_x_randr_output_backlight_available() from Term X-Git-Tag: 2.0_alpha~108^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7fbc3288e6adad3c800366bba305e1128779c26;p=framework%2Fuifw%2Fecore.git +ecore_x_randr_output_backlight_available() from Term also corresponding e17 usage git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@65837 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index 0bcd928..4575941 100644 --- a/ChangeLog +++ b/ChangeLog @@ -364,3 +364,7 @@ 2011-12-02 Mike Blumenkrantz * Use mempools for allocations + +2011-12-02 Term + + * added ecore_x_randr_output_backlight_available() diff --git a/NEWS b/NEWS index d716761..209d733 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,10 @@ Ecore 1.2.0 Changes since Ecore 1.1.0: -------------------------- +Additions: + * ecore_x: + - ecore_x_randr_output_backlight_available() + Improvements: * ecore: - most allocations moved to mempools diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index 6588a75..ecd19f3 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -3114,7 +3114,10 @@ EAPI Ecore_X_Randr_Edid_Display_Interface_Type ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, unsigned long edid_length); -/* ecore_x_randr_13.c */ +/* ecore_x_randr_12.c */ + +EAPI Eina_Bool +ecore_x_randr_output_backlight_available(void); EAPI void ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, double level); diff --git a/src/lib/ecore_x/xlib/ecore_x_randr_12.c b/src/lib/ecore_x/xlib/ecore_x_randr_12.c index fb607d1..319f09f 100644 --- a/src/lib/ecore_x/xlib/ecore_x_randr_12.c +++ b/src/lib/ecore_x/xlib/ecore_x_randr_12.c @@ -1965,6 +1965,26 @@ ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, } /* + * @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_XRANDR + RANDR_CHECK_1_2_RET(-1); + Atom _backlight; + + _backlight = XInternAtom(_ecore_x_disp, RANDR_PROPERTY_BACKLIGHT, True); + + return (_backlight == None) ? EINA_FALSE : EINA_TRUE; + +#endif + return EINA_FALSE; +} + +/* * @brief get the backlight level of the given output * @param root window which's screen should be queried * @param output from which the backlight level should be retrieved