1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- 2 * 3 * Copyright (C) 2004-2006 William Jon McCann <mccann@jhu.edu> 4 * Copyright (C) 2012-2021 MATE Developers 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 19 * 20 * Authors: William Jon McCann <mccann@jhu.edu> 21 * 22 */ 23 24 #ifndef __GS_PREFS_H 25 #define __GS_PREFS_H 26 27 #include <glib.h> 28 29 G_BEGIN_DECLS 30 31 #define GS_TYPE_PREFS (gs_prefs_get_type ()) 32 #define GS_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GS_TYPE_PREFS, GSPrefs)) 33 #define GS_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GS_TYPE_PREFS, GSPrefsClass)) 34 #define GS_IS_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GS_TYPE_PREFS)) 35 #define GS_IS_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GS_TYPE_PREFS)) 36 #define GS_PREFS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GS_TYPE_PREFS, GSPrefsClass)) 37 38 typedef enum 39 { 40 GS_MODE_BLANK_ONLY, 41 GS_MODE_RANDOM, 42 GS_MODE_SINGLE 43 } GSSaverMode; 44 45 typedef struct GSPrefsPrivate GSPrefsPrivate; 46 47 typedef struct 48 { 49 GObject parent; 50 51 GSPrefsPrivate *priv; 52 53 guint idle_activation_enabled : 1; /* whether to activate when idle */ 54 guint lock_enabled : 1; /* whether to lock when active */ 55 guint logout_enabled : 1; /* Whether to offer the logout option */ 56 guint lock_disabled : 1; /* Whether locking the system is disabled */ 57 guint user_switch_disabled : 1; /* Whether user switching is disabled */ 58 guint user_switch_enabled : 1; /* Whether to offer the user switch option */ 59 guint keyboard_enabled : 1; /* Whether to try to embed a keyboard */ 60 guint status_message_enabled : 1; /* show the status message in the lock */ 61 62 guint power_timeout; /* how much idle time before power management */ 63 guint timeout; /* how much idle time before activation */ 64 guint lock_timeout; /* how long after activation locking starts */ 65 guint logout_timeout; /* how long until the logout option appears */ 66 guint cycle; /* how long each theme should run */ 67 68 char *logout_command; /* command to use to logout */ 69 char *keyboard_command; /* command to use to embed a keyboard */ 70 71 GSList *themes; /* the screensaver themes to run */ 72 GSSaverMode mode; /* theme selection mode */ 73 } GSPrefs; 74 75 typedef struct 76 { 77 GObjectClass parent_class; 78 79 void (* changed) (GSPrefs *prefs); 80 } GSPrefsClass; 81 82 GType gs_prefs_get_type (void); 83 GSPrefs * gs_prefs_new (void); 84 void gs_prefs_load (GSPrefs *prefs); 85 86 G_END_DECLS 87 88 #endif /* __GS_PREFS_H */ 89