[gnome-settings-daemon/randr-osd: 1/2] Add enum for stock configuration types as generated by the XF86Config hotkey
- From: Federico Mena Quintero <federico src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/randr-osd: 1/2] Add enum for stock configuration types as generated by the XF86Config hotkey
- Date: Sat, 9 Jan 2010 00:09:31 +0000 (UTC)
commit ec5641760ef658a8e8e767ce72b4e615e7b6974c
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 | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xrandr/gsd-xrandr-manager.c b/plugins/xrandr/gsd-xrandr-manager.c
index 6ef956c..ad9c97b 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,23 @@ 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;
+}
+
static GnomeRRConfig *
make_clone_setup (GnomeRRScreen *screen)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]