summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ecore_X_ScreenSaver.h12
-rw-r--r--ecore_x_scrnsaver.c22
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