]> www.fi.muni.cz Git - evince.git/blobdiff - cut-n-paste/totem-screensaver/totem-scrsaver.h
[shell] Pass the GDBusConnection to TotemScrsaver
[evince.git] / cut-n-paste / totem-screensaver / totem-scrsaver.h
index ba01bc5f29359e31a09d2b0c1919b5958ff862f9..d175896bef639bee74b30c5833a2490d8e505841 100644 (file)
    Author: Bastien Nocera <hadess@hadess.net>
  */
 
+#ifndef TOTEM_SCRSAVER_H
+#define TOTEM_SCRSAVER_H
+
 #include <glib.h>
 #include <glib-object.h>
+#ifdef ENABLE_DBUS
+#include <gio/gio.h>
+#endif
+
+G_BEGIN_DECLS
 
 #define TOTEM_TYPE_SCRSAVER            (totem_scrsaver_get_type ())
 #define TOTEM_SCRSAVER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOTEM_TYPE_SCRSAVER, TotemScrsaver))
@@ -28,7 +36,6 @@
 #define TOTEM_IS_SCRSAVER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOTEM_TYPE_SCRSAVER))
 #define TOTEM_IS_SCRSAVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOTEM_TYPE_SCRSAVER))
 
-
 typedef struct TotemScrsaver TotemScrsaver;
 typedef struct TotemScrsaverClass TotemScrsaverClass;
 typedef struct TotemScrsaverPrivate TotemScrsaverPrivate;
@@ -43,9 +50,16 @@ struct TotemScrsaverClass {
 };
 
 GType totem_scrsaver_get_type          (void);
+#ifdef ENABLE_DBUS
+TotemScrsaver *totem_scrsaver_new      (GDBusConnection *connection);
+#else
 TotemScrsaver *totem_scrsaver_new      (void);
+#endif
 void totem_scrsaver_enable             (TotemScrsaver *scr);
 void totem_scrsaver_disable            (TotemScrsaver *scr);
 void totem_scrsaver_set_state          (TotemScrsaver *scr,
                                         gboolean enable);
 
+G_END_DECLS
+
+#endif /* !TOTEM_SCRSAVER_H */