powersave - add getter for screen mode

devs/bu5hm4n/mixerfun
Carsten Haitzler 2 years ago
parent 99dd752b10
commit e87ee674d3
  1. 9
      src/bin/e_powersave.c
  2. 1
      src/bin/e_powersave.h

@ -144,8 +144,6 @@ e_powersave_mode_unforce(void)
powersave_mode_force = E_POWERSAVE_MODE_NONE;
}
// XXX: need a get for this
E_API void
e_powersave_mode_screen_set(E_Powersave_Mode mode)
{
@ -166,6 +164,13 @@ e_powersave_mode_screen_unset(void)
_e_powersave_mode_eval();
}
E_API E_Powersave_Mode
e_powersave_mode_screen_get(void)
{
if (!powersave_screen) return E_POWERSAVE_MODE_NONE;
return powersave_mode_screen;
}
E_API E_Powersave_Sleeper *
e_powersave_sleeper_new(void)
{

@ -44,6 +44,7 @@ E_API void e_powersave_mode_unforce(void);
// are off/not visible
E_API void e_powersave_mode_screen_set(E_Powersave_Mode mode);
E_API void e_powersave_mode_screen_unset(void);
E_API E_Powersave_Mode e_powersave_mode_screen_get(void);
E_API void e_powersave_defer_suspend(void);
E_API void e_powersave_defer_hibernate(void);

Loading…
Cancel
Save