On Mon, 03 Jul 2017 22:50:57 -0700 Carsten Haitzler <[email protected]> said:
i know it's a freeze. but waiting another 3+ months to get a function that simply calls another function (dpms) to force it on or off isn't exactly nice... i sneaked this in because it has zero impact on any existing efl code (not a new feature in an existing widget that could interfere etc.) and really... i have found a new situation with e where you have to manually force dpms on (or off) because the device literally cannot suspend at all. you have to do this yourself and rely on cpu idle (or freeze mode). kind of key functionality... that i'm fixing/ > raster pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=52fdb5e830e02ad19b9418be3bb35ea1bd0ed5c0 > > commit 52fdb5e830e02ad19b9418be3bb35ea1bd0ed5c0 > Author: Carsten Haitzler (Rasterman) <[email protected]> > Date: Tue Jul 4 14:49:37 2017 +0900 > > ecore-x - add ecore x dpms force api > > add api that allows us to force dpms on or off. needed to fix e > support for non-suspend new systems that don't do S3 ... > > @feature > --- > src/lib/ecore_x/Ecore_X.h | 1 + > src/lib/ecore_x/ecore_x_dpms.c | 16 ++++++++++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h > index 8c0c7d3ef1..03e3dec743 100644 > --- a/src/lib/ecore_x/Ecore_X.h > +++ b/src/lib/ecore_x/Ecore_X.h > @@ -2526,6 +2526,7 @@ EAPI unsigned int ecore_x_dpms_timeout_off_get(void); > EAPI void ecore_x_dpms_timeout_standby_set(unsigned int > new_timeout); EAPI void ecore_x_dpms_timeout_suspend_set(unsigned > int new_timeout); EAPI void ecore_x_dpms_timeout_off_set(unsigned > int new_timeout); +EAPI void ecore_x_dpms_force(Eina_Bool on); > > EAPI Eina_Bool ecore_x_test_fake_key_down(const char *key); > EAPI Eina_Bool ecore_x_test_fake_key_up(const char *key); > diff --git a/src/lib/ecore_x/ecore_x_dpms.c b/src/lib/ecore_x/ecore_x_dpms.c > index a44825c4c7..ad946d45c9 100644 > --- a/src/lib/ecore_x/ecore_x_dpms.c > +++ b/src/lib/ecore_x/ecore_x_dpms.c > @@ -283,3 +283,19 @@ ecore_x_dpms_timeout_off_set(unsigned int new_timeout) > DPMSSetTimeouts(_ecore_x_disp, standby, suspend, new_timeout); > #endif /* ifdef ECORE_XDPMS */ > } > + > +/** > + * Forces DPMS on or off > + * @param on If DPMS is to be forced on (EINA_TRUE) or forced off > + * @ingroup Ecore_X_DPMS_Group > + */ > +EAPI void > +ecore_x_dpms_force(Eina_Bool on) > +{ > +#ifdef ECORE_XDPMS > + LOGFN(__FILE__, __LINE__, __FUNCTION__); > + EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); > + if (on) DPMSForceLevel(_ecore_x_disp, DPMSModeOn); > + else DPMSForceLevel(_ecore_x_disp, DPMSModeOff); > +#endif /* ifdef ECORE_XDPMS */ > +} > > -- > > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
