diff options
author | puppetmaster <puppetmaster> | 2005-07-28 22:42:35 +0000 |
---|---|---|
committer | puppetmaster <puppetmaster> | 2005-07-28 22:42:35 +0000 |
commit | 6a6471bfe19a9f5714263671ecbdea55e81f6deb (patch) | |
tree | b1d515750ab3c1e07d80c2029f355f5271f19221 | |
parent | adding condition for alloc of info (diff) | |
download | elock-6a6471bfe19a9f5714263671ecbdea55e81f6deb.tar.xz |
Added ecore_x_screensaver_set_attributes()
-rw-r--r-- | ecore/src/lib/ecore_x/ecore_x_screensaver.c | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/ecore/src/lib/ecore_x/ecore_x_screensaver.c b/ecore/src/lib/ecore_x/ecore_x_screensaver.c index 3fe987e..739350e 100644 --- a/ecore/src/lib/ecore_x/ecore_x_screensaver.c +++ b/ecore/src/lib/ecore_x/ecore_x_screensaver.c @@ -9,17 +9,17 @@ #endif -XScreenSaverInfo* +XScreenSaverInfo * ecore_x_screensaver_get_alloc_info(void) { - XScreenSaverInfo *info; + XScreenSaverInfo *info; Ecore_X_Window root; - - info = XScreenSaverAllocInfo (); - + + info = XScreenSaverAllocInfo(); + if (!info) - return NULL; - + return NULL; + root = DefaultRootWindow(_ecore_x_disp); if (!XScreenSaverQueryInfo(_ecore_x_disp, root, info)) @@ -29,14 +29,46 @@ ecore_x_screensaver_get_alloc_info(void) } void -ecore_x_screensaver_free_alloc_info(XScreenSaverQueryInfo info) +ecore_x_screensaver_free_alloc_info(XScreenSaverQueryInfo * info) { XFree(info); return; } -/* - * FIXME -void ecore_x_screensaver_select_input(void) + +XSetWindowAttributes* +ecore_x_screensaver_set_attributes() { - if (!XScreenSaverSelectInput(_ecore_x_disp, + Ecore_X_Window root; + int screen; + XSetWindowAttributes *attr; + + root = DefaultRootWindow(_ecore_x_disp); + + screen = DefaultScreen(_ecore_x_disp); + + if (!XScreenSaverSetAttributes (_ecore_x_disp,root, 0,0, + DisplayWidth (_ecore_x_disp, screen), + DisplayHeight(_ecore_x_disp, screen), + 0, + CopyFromParent, + CopyFromParent, + CopyFromParent, + mask, &attr)) + return NULL + else + return attr; +} + +/*int +ecore_x_screensaver_event_handler_add(void) +{ + Ecore_X_Window root; + + root = DefaultRootWindow(_ecore_x_disp); + + if (!XScreenSaverSelectInput + (_ecore_x_disp, root, ScreenSaverNotifyMask | ScreenSaverCycleMask)) + return 1; +FIXME + }*/ |