+ g_type_class_add_private (klass, sizeof (TotemScrsaverPrivate));
+
+ object_class->set_property = totem_scrsaver_set_property;
+ object_class->get_property = totem_scrsaver_get_property;
+ object_class->finalize = totem_scrsaver_finalize;
+
+ g_object_class_install_property (object_class, PROP_REASON,
+ g_param_spec_string ("reason", NULL, NULL,
+ NULL, G_PARAM_READWRITE));
+ g_object_class_install_property (object_class, PROP_WINDOW,
+ g_param_spec_object ("window", NULL, NULL,
+ GTK_TYPE_WINDOW, G_PARAM_READWRITE));
+}
+
+/**
+ * totem_scrsaver_new:
+ *
+ * Creates a #TotemScrsaver object.
+ * If the GNOME screen saver is running, it uses its DBUS interface to
+ * inhibit the screensaver; otherwise it falls back to using the X
+ * screensaver functionality for this.
+ *
+ * Returns: a newly created #TotemScrsaver
+ */
+TotemScrsaver *
+totem_scrsaver_new (void)
+{
+ return TOTEM_SCRSAVER (g_object_new (TOTEM_TYPE_SCRSAVER, NULL));