summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2015-10-20 22:04:46 +0200
committerAndrzej Hunt <andrzej@ahunt.org>2015-10-20 22:05:12 +0200
commit00a78f6102bf17b8f723467be4d1e8eac05962a5 (patch)
treeea4cbc4ca0e7731b1c7e34d4d158f42e1281915f /vcl
parentd2d5a00e0e3972c0021e2e664301a32da6e54c1a (diff)
ScreenSaverInhibitor: Don't depend on glib type definitions
We also include this header from the kde and tde backends, it seems to be saner just to use the base definitions of these types rather than depending on glib there. Change-Id: Ib270fd33290f9c213dea72a8e20618007470d882
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/screensaverinhibitor.hxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/vcl/inc/unx/screensaverinhibitor.hxx b/vcl/inc/unx/screensaverinhibitor.hxx
index 286c18d00707..7b5af6d4a85d 100644
--- a/vcl/inc/unx/screensaverinhibitor.hxx
+++ b/vcl/inc/unx/screensaverinhibitor.hxx
@@ -21,19 +21,20 @@
#include <boost/optional.hpp>
-#include <glib.h>
-
class VCL_PLUGIN_PUBLIC ScreenSaverInhibitor
{
public:
void inhibit( bool bInhibit, const rtl::OUString& sReason,
- bool bIsX11, const boost::optional<guint> xid, boost::optional<Display*> pDisplay );
+ bool bIsX11, const boost::optional<unsigned int> xid, boost::optional<Display*> pDisplay );
private:
- boost::optional<guint> mnFDOCookie; // FDO ScreenSaver Inhibit
- boost::optional<guint> mnFDOPMCookie; // FDO PowerManagement Inhibit
- boost::optional<guint> mnGSMCookie;
- boost::optional<guint> mnMSMCookie;
+ // These are all used as guint, however this header may be included
+ // in kde/tde/etc backends, where we would ideally avoid having
+ // any glib dependencies, hence the direct use of unsigned int.
+ boost::optional<unsigned int> mnFDOCookie; // FDO ScreenSaver Inhibit
+ boost::optional<unsigned int> mnFDOPMCookie; // FDO PowerManagement Inhibit
+ boost::optional<unsigned int> mnGSMCookie;
+ boost::optional<unsigned int> mnMSMCookie;
boost::optional<int> mnXScreenSaverTimeout;
@@ -58,10 +59,10 @@ private:
// (This is replaced by the GSM interface from Mate 1.12 onwards)
//
// Note: the Uninhibit call has different spelling in FDO (UnInhibit) vs GSM (Uninhibit)
- void inhibitFDO( bool bInhibit, const gchar* appname, const gchar* reason );
- void inhibitFDOPM( bool bInhibit, const gchar* appname, const gchar* reason );
- void inhibitGSM( bool bInhibit, const gchar* appname, const gchar* reason, const guint xid );
- void inhibitMSM( bool bInhibit, const gchar* appname, const gchar* reason, const guint xid );
+ void inhibitFDO( bool bInhibit, const char* appname, const char* reason );
+ void inhibitFDOPM( bool bInhibit, const char* appname, const char* reason );
+ void inhibitGSM( bool bInhibit, const char* appname, const char* reason, const unsigned int xid );
+ void inhibitMSM( bool bInhibit, const char* appname, const char* reason, const unsigned int xid );
void inhibitXScreenSaver( bool bInhibit, Display* pDisplay );
static void inhibitXAutoLock( bool bInhibit, Display* pDisplay );