summary'>refslog'>tree'>commit'>diff'>stats
diff options
context:
space:
mode:
authorpuppetmaster <puppetmaster>2005-07-29 19:08:46 +0000
committerpuppetmaster <puppetmaster>2005-07-29 19:08:46 +0000
commit'>67debbc0f54da0ceb7712ed419d308f8a233aa32 ( (patch)
treec430f02e027977e1563e4615f1fd9f368ac67c76
parentAdded ecore_x_screensaver_unset_attributes (diff)
downloadelock-67debbc0f54da0ceb7712ed419d308f8a233aa32.tar.gz
Coding Style
-rw-r--r--ecore/src/lib/ecore_x/ecore_x_screensaver.c147
1 files changed, 73 insertions, 74 deletions
diff --git a/ecore/src/lib/ecore_x/ecore_x_screensaver.c b/ecore/src/lib/ecore_x/ecore_x_screensaver.c
index 4552e84..9b7a214 100644
--- a/ecore/src/lib/ecore_x/ecore_x_screensaver.c
+++ b/ecore/src/lib/ecore_x/ecore_x_screensaver.c
@@ -9,101 +9,100 @@
#endif
-XScreenSaverInfo *
-ecore_x_screensaver_get_alloc_info (void)
+XScreenSaverInfo *
+ecore_x_screensaver_get_alloc_info(void)
{
- XScreenSaverInfo *info;
- Ecore_X_Window root;
+ XScreenSaverInfo *info;
+ Ecore_X_Window root;
- info = XScreenSaverAllocInfo ();
+ info = XScreenSaverAllocInfo();
- if (!info)
- return NULL;
+ if (!info)
+ return NULL;
- root = DefaultRootWindow (_ecore_x_disp);
+ root = DefaultRootWindow(_ecore_x_disp);
- if (!XScreenSaverQueryInfo (_ecore_x_disp, root, info))
- return info;
- else
- return NULL;
+ if (!XScreenSaverQueryInfo(_ecore_x_disp, root, info))
+ return info;
+ else
+ return NULL;
}
void
-ecore_x_screensaver_free_alloc_info (XScreenSaverQueryInfo * info)
+ecore_x_screensaver_free_alloc_info(XScreenSaverQueryInfo * info)
{
- XFree (info);
- return;
+ XFree(info);
+ return;
}
int
-ecore_x_screensaver_set_attributes (XSetWindowAttributes attr)
+ecore_x_screensaver_set_attributes(XSetWindowAttributes attr)
{
- Ecore_X_Window root;
- int screen;
+ Ecore_X_Window root;
+ int screen;
- root = DefaultRootWindow (_ecore_x_disp);
+ root = DefaultRootWindow(_ecore_x_disp);
- screen = DefaultScreen (_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),
+ 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 1;
- else
- return 0;
+ CopyFromParent, CopyFromParent, mask, &attr))
+ return 1;
+ else
+ return 0;
}
int
-ecore_x_screensaver_add (void)
+ecore_x_screensaver_add(void)
{
- GC gc;
- int screen;
- XEvent event;
- Ecore_X_Window root;
- XScreenSaverNotifyEvent *se;
- XSetWindowAttributes attributes;
-
- root = DefaultRootWindow (_ecore_x_disp);
- screen = DefaultScreen (_ecore_x_disp);
- gc = DefaultGC (_ecore_x_disp, screen);
-
- if (!XScreenSaverSelectInput
- (_ecore_x_disp, root, ScreenSaverNotifyMask | ScreenSaverCycleMask))
- return 1;
-
- if (!ecore_x_screensaver_set_attributes (attributes))
- return 1;
-
- if (!XSetForeground (_ecore_x_disp, gc, WhitePixel (_ecore_x_disp, screen)))
- return 1;
-
- while (1)
- {
- if (!XNextEvent (_ecore_x_disp, &event))
- return 1;
- if (event.type == _ecore_x_event_scrnsaver_id)
- {
- se = (XScreenSaverNotifyEvent *) & pe;
-
- if (se->state == ScreenSaverOn && se->kind == ScreenSaverExternal)
- {
- XDrawString (_ecore_x_disp, 100, 100, "Ecore ScreeSaver", 17);
- XSync (_ecore_x_disp, False);
- }
- }
- }
- return 0
-}
-
-int
-ecore_x_screensaver_unset_attributes
+ GC gc;
+ int screen;
+ XEvent event;
+ Ecore_X_Window root;
+ XScreenSaverNotifyEvent *se;
+ XSetWindowAttributes attributes;
+
+ root = DefaultRootWindow(_ecore_x_disp);
+ screen = DefaultScreen(_ecore_x_disp);
+ gc = DefaultGC(_ecore_x_disp, screen);
+
+ if (!XScreenSaverSelectInput
+ (_ecore_x_disp, root, ScreenSaverNotifyMask | ScreenSaverCycleMask))
+ return 1;
+
+ if (!ecore_x_screensaver_set_attributes(attributes))
+ return 1;
+
+ if (!XSetForeground(_ecore_x_disp, gc, WhitePixel(_ecore_x_disp, screen)))
+ return 1;
+
+ while (1)
+ {
+ if (!XNextEvent(_ecore_x_disp, &event))
+ return 1;
+ if (event.type == _ecore_x_event_scrnsaver_id)
+ {
+ se = (XScreenSaverNotifyEvent *) & pe;
+
+ if (se->state == ScreenSaverOn && se->kind == ScreenSaverExternal)
+ {
+ /*START THE EDJE SCREENSAVER PROBABLY HERE */
+ XDrawString(_ecore_x_disp, 100, 100, "Ecore ScreeSaver", 17);
+ XSync(_ecore_x_disp, False);
+ }
+ }
+ }
+return 0}
+
+int ecore_x_screensaver_unset_attributes
{
- if (!XScreenSaverUnsetAttributes(_ecore_x_disp, DefaultRootWindow(_ecore_x_disp)))
- return 1;
- else
- return 0;
+ if (!XScreenSaverUnsetAttributes
+ (_ecore_x_disp, DefaultRootWindow(_ecore_x_disp)))
+ return 1;
+ else
+ return 0;
}