add api to detect backlight availability

SVN revision: 62444
This commit is contained in:
Carsten Haitzler 2011-08-14 14:35:41 +00:00
parent 2d551c551c
commit 24888fe946
2 changed files with 10 additions and 1 deletions

View File

@ -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)
{

View File

@ -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);