forked from enlightenment/enlightenment
+ecore_x_randr_output_backlight_available() from Term <term@twistedpath.org>
also corresponding e17 usage SVN revision: 65837
This commit is contained in:
parent
a9427d207b
commit
9f70d6d9da
|
@ -20,6 +20,7 @@ static Ecore_Animator *bl_anim = NULL;
|
|||
static void _e_backlight_update(E_Zone *zone);
|
||||
static void _e_backlight_set(E_Zone *zone, double val);
|
||||
static Eina_Bool _bl_anim(void *data, double pos);
|
||||
static Eina_Bool bl_avail = EINA_FALSE;
|
||||
#ifdef HAVE_EEZE
|
||||
static const char *bl_sysval = NULL;
|
||||
static Ecore_Event_Handler *bl_sys_exit_handler = NULL;
|
||||
|
@ -39,9 +40,14 @@ e_backlight_init(void)
|
|||
#ifdef HAVE_EEZE
|
||||
eeze_init();
|
||||
#endif
|
||||
bl_avail = ecore_x_randr_output_backlight_available();
|
||||
|
||||
if (bl_avail == EINA_TRUE)
|
||||
{
|
||||
e_backlight_update();
|
||||
e_backlight_level_set(NULL, 0.0, 0.0);
|
||||
e_backlight_level_set(NULL, e_config->backlight.normal, 1.0);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -77,6 +83,8 @@ e_backlight_update(void)
|
|||
E_Container *con;
|
||||
E_Zone *zone;
|
||||
|
||||
if (bl_avail == EINA_TRUE)
|
||||
{
|
||||
EINA_LIST_FOREACH(e_manager_list(), m, man)
|
||||
{
|
||||
EINA_LIST_FOREACH(man->containers, c, con)
|
||||
|
@ -88,6 +96,7 @@ e_backlight_update(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_backlight_level_set(E_Zone *zone, double val, double tim)
|
||||
|
|
Loading…
Reference in New Issue