[gnome-settings-daemon/randr-osd: 1/15] Add enum for stock configuration types as generated by the XF86Config hotkey



commit 17856080646ec9604a70a1187737905be26a6a36
Author: Federico Mena Quintero <federico novell com>
Date:   Fri Jan 8 17:30:34 2010 -0600

    Add enum for stock configuration types as generated by the XF86Config hotkey
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 plugins/xrandr/gsd-xrandr-manager.c |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 6ef956c..283c43b 100644
--- a/plugins/xrandr/gsd-xrandr-manager.c
+++ b/plugins/xrandr/gsd-xrandr-manager.c
@@ -84,6 +84,22 @@
 #define GSD_XRANDR_DBUS_PATH GSD_DBUS_PATH "/XRANDR"
 #define GSD_XRANDR_DBUS_NAME GSD_DBUS_NAME ".XRANDR"
 
+/* The stock configuration types that we generate for the XF86Display hotkey */
+typedef enum {
+        STOCK_CONFIG_CURRENT,
+        STOCK_CONFIG_LAPTOP,
+        STOCK_CONFIG_CLONE,
+        STOCK_CONFIG_EXTEND,
+        STOCK_CONFIG_OTHER,
+        STOCK_CONFIG_CUSTOM
+} StockConfigType;
+
+/* One of the stock configurations that we generate for the XFDisplay hotkey */
+typedef struct {
+        StockConfigType type;
+        GnomeRRConfig *rr_config;
+} StockConfig;
+
 struct GsdXrandrManagerPrivate
 {
         DBusGConnection *dbus_connection;
@@ -537,6 +553,25 @@ print_configuration (GnomeRRConfig *config, const char *header)
                 print_output (config->outputs[i]);
 }
 
+static void
+stock_config_free (StockConfig *config)
+{
+        gnome_rr_config_free (config->rr_config);
+        g_slice_free (StockConfig, config);
+}
+
+StockConfig *
+stock_config_new (StockConfigType type, GnomeRRConfig *rr_config)
+{
+        StockConfig *config;
+
+        config = g_slice_new (StockConfig);
+        config->type = type;
+        config->rr_config = rr_config;
+
+        return config;
+}
+
 static GnomeRRConfig *
 make_clone_setup (GnomeRRScreen *screen)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]