diff options
author | puppetmaster <puppetmaster> | 2005-07-25 12:39:40 +0000 |
---|---|---|
committer | puppetmaster <puppetmaster> | 2005-07-25 12:39:40 +0000 |
commit | d6f22dff8d66e47dbfa0b37f890562ce421057f7 (patch) | |
tree | d0efcdcfee598a722f4218387f128b97a56a9a43 | |
parent | fix fore pointer args of query extention (diff) | |
download | elock-d6f22dff8d66e47dbfa0b37f890562ce421057f7.tar.xz |
added XscreenSaverQueryVersion to ecore_x_screensaver_query
added struct to Ecore_X_ScreenSaver.h for retruns of status and versions ...
-rw-r--r-- | Ecore_X_ScreenSaver.h | 12 | ||||
-rw-r--r-- | ecore_x_scrnsaver.c | 22 |
2 files changed, 25 insertions, 9 deletions
diff --git a/Ecore_X_ScreenSaver.h b/Ecore_X_ScreenSaver.h index 156d7da..b7637c1 100644 --- a/Ecore_X_ScreenSaver.h +++ b/Ecore_X_ScreenSaver.h @@ -12,6 +12,18 @@ #include "Ecore_X_ScreenSaver.h" #include "X11/extentions/scrnsaver.h" +typedef struct s_Ecore_X_Screensaver_Query +{ + int *event_basep; + int *error_basep; + int *major_ver; + int *minor_ver; + Status ScreenSaver_status; + +} Ecore_X_Screensaver_Query ; + + + #endif diff --git a/ecore_x_scrnsaver.c b/ecore_x_scrnsaver.c index 629e001..d524086 100644 --- a/ecore_x_scrnsaver.c +++ b/ecore_x_scrnsaver.c @@ -6,16 +6,20 @@ #include "Ecore_X_ScreenSaver.h" +/* Make a query for extention presence */ -int -ecore_x_scrnsaver_query_extension(void) -{ - Bool Queryresult; - int *event_basep; - int *error_basep; - - Queryresult = XScreenSaverQueryExtension(ecore_x_disp, &event_basep, &error_basep); - +/*Ecore_X_ScreenSaver */ +int +ecore_x_scrnsaver_query(Ecore_X_Screensaver_Query *info_query) +{ + Bool ext_result; + /* Query extention */ + + ext_result = XScreenSaverQueryExtension(ecore_x_disp, &info_query.event_basep, &info_query.error_basep); + /* Query version and status */ + + info_query.ScreenSaver_status = XScreenSaverQueryVersion(ecore_x_disp, &info_query.major_version, &info_query.major_version); + if (Queryresult == 0) return 0; else |