From d6f22dff8d66e47dbfa0b37f890562ce421057f7 Mon Sep 17 00:00:00 2001 From: puppetmaster Date: Mon, 25 Jul 2005 12:39:40 +0000 Subject: added XscreenSaverQueryVersion to ecore_x_screensaver_query added struct to Ecore_X_ScreenSaver.h for retruns of status and versions ... --- Ecore_X_ScreenSaver.h | 12 ++++++++++++ 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 -- cgit v1.2.3