add api to detect backlight availability
SVN revision: 62444
This commit is contained in:
parent
2d551c551c
commit
24888fe946
|
@ -4,13 +4,14 @@
|
|||
// a signleton right now as thats 99% of use cases. but api supports
|
||||
// doing more. for now make it work in the singleton
|
||||
|
||||
#define MODE_NONE -1
|
||||
#define MODE_RANDR 0
|
||||
#define MODE_SYS 1
|
||||
|
||||
static double bl_val = 1.0;
|
||||
static double bl_animval = 1.0;
|
||||
static E_Backlight_Mode bl_mode = E_BACKLIGHT_MODE_NORMAL;
|
||||
static int sysmode = MODE_RANDR;
|
||||
static int sysmode = MODE_NONE;
|
||||
static Ecore_Animator *bl_anim = NULL;
|
||||
static const char *bl_sysval = NULL;
|
||||
static Ecore_Event_Handler *bl_sys_exit_handler = NULL;
|
||||
|
@ -50,6 +51,13 @@ e_backlight_shutdown(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
e_backlight_exists(void)
|
||||
{
|
||||
if (sysmode == MODE_NONE) return EINA_FALSE;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_backlight_update(void)
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@ typedef enum _E_Backlight_Mode
|
|||
|
||||
EINTERN int e_backlight_init(void);
|
||||
EINTERN int e_backlight_shutdown(void);
|
||||
EAPI Eina_Bool e_backlight_exists(void);
|
||||
EAPI void e_backlight_update(void);
|
||||
EAPI void e_backlight_level_set(E_Zone *zone, double val, double tim);
|
||||
EAPI double e_backlight_level_get(E_Zone *zone);
|
||||
|
|
Loading…
Reference in New Issue