[mutter] monitor-manager: Expose MetaMonitorManager to introspection
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] monitor-manager: Expose MetaMonitorManager to introspection
- Date: Fri, 30 Jan 2015 18:14:04 +0000 (UTC)
commit 3f2d658f202df0fbd70fe1368fef26bd66d218f0
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Jan 30 14:51:18 2015 +0100
monitor-manager: Expose MetaMonitorManager to introspection
This just exposes the type and the singleton getter necessary to make
it available to introspection. We'll expose more functionality as it
becomes needed.
https://bugzilla.gnome.org/show_bug.cgi?id=743745
src/Makefile.am | 4 ++-
src/backends/meta-backend-private.h | 2 +-
src/backends/meta-monitor-config.h | 2 +-
src/backends/meta-monitor-manager-dummy.h | 2 +-
...or-manager.h => meta-monitor-manager-private.h} | 9 +----
src/backends/meta-monitor-manager.c | 9 +++++-
src/backends/native/meta-cursor-renderer-native.c | 2 +-
src/backends/native/meta-monitor-manager-kms.h | 2 +-
src/backends/x11/meta-monitor-manager-xrandr.h | 2 +-
src/compositor/meta-plugin.c | 2 +-
src/compositor/meta-window-actor.c | 2 +-
src/core/screen-private.h | 2 +-
src/meta/meta-monitor-manager.h | 34 ++++++++++++++++++++
src/wayland/meta-wayland-outputs.c | 2 +-
14 files changed, 57 insertions(+), 19 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index d397ee2..20ed3e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -80,7 +80,8 @@ libmutter_la_SOURCES = \
backends/meta-monitor-config.c \
backends/meta-monitor-config.h \
backends/meta-monitor-manager.c \
- backends/meta-monitor-manager.h \
+ meta/meta-monitor-manager.h \
+ backends/meta-monitor-manager-private.h \
backends/meta-monitor-manager-dummy.c \
backends/meta-monitor-manager-dummy.h \
backends/meta-stage.h \
@@ -315,6 +316,7 @@ libmutterinclude_headers = \
meta/meta-cursor-tracker.h \
meta/meta-idle-monitor.h \
meta/meta-plugin.h \
+ meta/meta-monitor-manager.h \
meta/meta-shaped-texture.h \
meta/meta-shadow-factory.h \
meta/meta-window-actor.h \
diff --git a/src/backends/meta-backend-private.h b/src/backends/meta-backend-private.h
index f9c9a30..9a0c806 100644
--- a/src/backends/meta-backend-private.h
+++ b/src/backends/meta-backend-private.h
@@ -33,7 +33,7 @@
#include <meta/meta-backend.h>
#include <meta/meta-idle-monitor.h>
#include "meta-cursor-renderer.h"
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#define DEFAULT_XKB_RULES_FILE "evdev"
#define DEFAULT_XKB_MODEL "pc105+inet"
diff --git a/src/backends/meta-monitor-config.h b/src/backends/meta-monitor-config.h
index 5599b6a..10b95d2 100644
--- a/src/backends/meta-monitor-config.h
+++ b/src/backends/meta-monitor-config.h
@@ -23,7 +23,7 @@
#ifndef META_MONITOR_CONFIG_H
#define META_MONITOR_CONFIG_H
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_CONFIG (meta_monitor_config_get_type ())
#define META_MONITOR_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MONITOR_CONFIG,
MetaMonitorConfig))
diff --git a/src/backends/meta-monitor-manager-dummy.h b/src/backends/meta-monitor-manager-dummy.h
index 4f1fb34..0625590 100644
--- a/src/backends/meta-monitor-manager-dummy.h
+++ b/src/backends/meta-monitor-manager-dummy.h
@@ -23,7 +23,7 @@
#ifndef META_MONITOR_MANAGER_DUMMY_H
#define META_MONITOR_MANAGER_DUMMY_H
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_MANAGER_DUMMY (meta_monitor_manager_dummy_get_type ())
#define META_MONITOR_MANAGER_DUMMY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
META_TYPE_MONITOR_MANAGER_DUMMY, MetaMonitorManagerDummy))
diff --git a/src/backends/meta-monitor-manager.h b/src/backends/meta-monitor-manager-private.h
similarity index 98%
rename from src/backends/meta-monitor-manager.h
rename to src/backends/meta-monitor-manager-private.h
index d1f1530..b3c2e8d 100644
--- a/src/backends/meta-monitor-manager.h
+++ b/src/backends/meta-monitor-manager-private.h
@@ -41,18 +41,17 @@
#include "display-private.h"
#include <meta/screen.h>
#include "stack-tracker.h"
+#include <meta/meta-monitor-manager.h>
#include "meta-display-config-shared.h"
#include "meta-dbus-display-config.h"
#include "meta-cursor.h"
-typedef struct _MetaMonitorManagerClass MetaMonitorManagerClass;
-typedef struct _MetaMonitorManager MetaMonitorManager;
typedef struct _MetaMonitorConfigClass MetaMonitorConfigClass;
typedef struct _MetaMonitorConfig MetaMonitorConfig;
-typedef struct _MetaOutput MetaOutput;
typedef struct _MetaCRTC MetaCRTC;
+typedef struct _MetaOutput MetaOutput;
typedef struct _MetaMonitorMode MetaMonitorMode;
typedef struct _MetaMonitorInfo MetaMonitorInfo;
typedef struct _MetaCRTCInfo MetaCRTCInfo;
@@ -322,10 +321,6 @@ struct _MetaMonitorManagerClass
unsigned short *);
};
-GType meta_monitor_manager_get_type (void);
-
-MetaMonitorManager *meta_monitor_manager_get (void);
-
void meta_monitor_manager_rebuild_derived (MetaMonitorManager *manager);
MetaMonitorInfo *meta_monitor_manager_get_monitor_infos (MetaMonitorManager *manager,
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index 352a182..d955af7 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -25,7 +25,7 @@
#include "config.h"
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#include <string.h>
#include <math.h>
@@ -1107,6 +1107,13 @@ initialize_dbus_interface (MetaMonitorManager *manager)
g_object_unref);
}
+/**
+ * meta_monitor_manager_get:
+ *
+ * Accessor for the singleton MetaMonitorManager.
+ *
+ * Returns: (transfer none): The only #MetaMonitorManager there is.
+ */
MetaMonitorManager *
meta_monitor_manager_get (void)
{
diff --git a/src/backends/native/meta-cursor-renderer-native.c
b/src/backends/native/meta-cursor-renderer-native.c
index ca29882..f0863f6 100644
--- a/src/backends/native/meta-cursor-renderer-native.c
+++ b/src/backends/native/meta-cursor-renderer-native.c
@@ -30,7 +30,7 @@
#include <xf86drm.h>
#include "meta-cursor-private.h"
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#ifndef DRM_CAP_CURSOR_WIDTH
#define DRM_CAP_CURSOR_WIDTH 0x8
diff --git a/src/backends/native/meta-monitor-manager-kms.h b/src/backends/native/meta-monitor-manager-kms.h
index 4794e31..294fb4f 100644
--- a/src/backends/native/meta-monitor-manager-kms.h
+++ b/src/backends/native/meta-monitor-manager-kms.h
@@ -23,7 +23,7 @@
#ifndef META_MONITOR_MANAGER_KMS_H
#define META_MONITOR_MANAGER_KMS_H
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_MANAGER_KMS (meta_monitor_manager_kms_get_type ())
#define META_MONITOR_MANAGER_KMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
META_TYPE_MONITOR_MANAGER_KMS, MetaMonitorManagerKms))
diff --git a/src/backends/x11/meta-monitor-manager-xrandr.h b/src/backends/x11/meta-monitor-manager-xrandr.h
index f440b0a..9443ab0 100644
--- a/src/backends/x11/meta-monitor-manager-xrandr.h
+++ b/src/backends/x11/meta-monitor-manager-xrandr.h
@@ -23,7 +23,7 @@
#ifndef META_MONITOR_MANAGER_XRANDR_H
#define META_MONITOR_MANAGER_XRANDR_H
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#define META_TYPE_MONITOR_MANAGER_XRANDR (meta_monitor_manager_xrandr_get_type ())
#define META_MONITOR_MANAGER_XRANDR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandr))
diff --git a/src/compositor/meta-plugin.c b/src/compositor/meta-plugin.c
index 170fa69..26b9c26 100644
--- a/src/compositor/meta-plugin.c
+++ b/src/compositor/meta-plugin.c
@@ -40,7 +40,7 @@
#include "compositor-private.h"
#include "meta-window-actor-private.h"
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
G_DEFINE_ABSTRACT_TYPE (MetaPlugin, meta_plugin, G_TYPE_OBJECT);
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 3d6fab1..d61c2fb 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -27,7 +27,7 @@
#include "meta-window-actor-private.h"
#include "meta-texture-rectangle.h"
#include "region-utils.h"
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#include "meta-cullable.h"
#include "meta-surface-actor.h"
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index 9d520e5..322dfb4 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -36,7 +36,7 @@
#include <X11/Xutil.h>
#include "stack-tracker.h"
#include "ui.h"
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
typedef void (* MetaScreenWindowFunc) (MetaWindow *window,
gpointer user_data);
diff --git a/src/meta/meta-monitor-manager.h b/src/meta/meta-monitor-manager.h
new file mode 100644
index 0000000..84f77fb
--- /dev/null
+++ b/src/meta/meta-monitor-manager.h
@@ -0,0 +1,34 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
+/*
+ * Copyright (C) 2015 Red Hat
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef META_MONITOR_MANAGER_H
+#define META_MONITOR_MANAGER_H
+
+#include <glib-object.h>
+
+typedef struct _MetaMonitorManagerClass MetaMonitorManagerClass;
+typedef struct _MetaMonitorManager MetaMonitorManager;
+
+GType meta_monitor_manager_get_type (void);
+
+MetaMonitorManager *meta_monitor_manager_get (void);
+
+#endif /* META_MONITOR_MANAGER_H */
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
index 7ed3ae1..e83bee2 100644
--- a/src/wayland/meta-wayland-outputs.c
+++ b/src/wayland/meta-wayland-outputs.c
@@ -27,7 +27,7 @@
#include "meta-wayland-outputs.h"
#include "meta-wayland-private.h"
-#include "meta-monitor-manager.h"
+#include "meta-monitor-manager-private.h"
#include <string.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]