forked from enlightenment/efl
Ecore_X(cb): Add function for backlight_available so that E will work
again :) SVN revision: 65838
This commit is contained in:
parent
952b5f6326
commit
191659da9a
|
@ -2449,6 +2449,45 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root,
|
||||||
return EINA_FALSE;
|
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
|
EAPI int
|
||||||
ecore_x_randr_edid_version_get(unsigned char *edid, unsigned long edid_length)
|
ecore_x_randr_edid_version_get(unsigned char *edid, unsigned long edid_length)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue