forked from enlightenment/efl
For all who writes X wrappers. If a user decides to not link against a
library, the functions will not resolve at link time. So we need to wrap them in cpp #ifdef's. SVN revision: 28709
This commit is contained in:
parent
9973e523f0
commit
70be3f56aa
|
@ -14,90 +14,117 @@ ecore_x_screensaver_event_available_get(void)
|
|||
{
|
||||
#ifdef ECORE_XSS
|
||||
return 1;
|
||||
#endif
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_set(int timeout, int interval, int blank, int expose)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
XSetScreenSaver(_ecore_x_disp, timeout, interval, blank, expose);
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_timeout_set(double timeout)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, (int)timeout,
|
||||
pint, pblank, pexpo);
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI double
|
||||
ecore_x_screensaver_timeout_get(void)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return (double)pto;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_blank_set(double blank)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, pto,
|
||||
pint, (int)blank, pexpo);
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI double
|
||||
ecore_x_screensaver_blank_get(void)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return (double)pblank;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_expose_set(double expose)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, pto,
|
||||
pint, pblank, (int)expose);
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI double
|
||||
ecore_x_screensaver_expose_get(void)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return (double)pexpo;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_interval_set(double interval)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
XSetScreenSaver(_ecore_x_disp, pto,
|
||||
(int)interval, pblank, pexpo);
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI double
|
||||
ecore_x_screensaver_interval_get(void)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
int pto, pint, pblank, pexpo;
|
||||
|
||||
XGetScreenSaver(_ecore_x_disp, &pto, &pint, &pblank, &pexpo);
|
||||
return (double)pint;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
Loading…
Reference in New Issue