[mutter/wayland] Move monitor manager headers to their own files



commit b2405b701a82d5a4306ea75a6c3f63efa4a29949
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Mar 30 20:25:31 2014 -0400

    Move monitor manager headers to their own files
    
    Instead of having them in monitor-private.h.
    
    This way, it's easier to move our own backend when the chance arises.

 src/Makefile.am                        |    2 +
 src/core/meta-monitor-manager-kms.c    |    3 +-
 src/core/meta-monitor-manager-kms.h    |   40 ++++++++++++++++++++++++++++++++
 src/core/meta-monitor-manager-xrandr.c |    4 +-
 src/core/meta-monitor-manager-xrandr.h |   40 ++++++++++++++++++++++++++++++++
 src/core/monitor-private.h             |   24 -------------------
 src/core/monitor.c                     |    2 +
 7 files changed, 88 insertions(+), 27 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 4b5cf74..df5e040 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -136,7 +136,9 @@ libmutter_wayland_la_SOURCES =                      \
        core/monitor-config.c                   \
        core/monitor-private.h                  \
        core/meta-monitor-manager-kms.c         \
+       core/meta-monitor-manager-kms.h         \
        core/meta-monitor-manager-xrandr.c      \
+       core/meta-monitor-manager-xrandr.h      \
        core/mutter-Xatomtype.h                 \
        core/place.c                            \
        core/place.h                            \
diff --git a/src/core/meta-monitor-manager-kms.c b/src/core/meta-monitor-manager-kms.c
index a44df83..698c606 100644
--- a/src/core/meta-monitor-manager-kms.c
+++ b/src/core/meta-monitor-manager-kms.c
@@ -23,6 +23,8 @@
 
 #include "config.h"
 
+#include "meta-monitor-manager-kms.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <clutter/clutter.h>
@@ -36,7 +38,6 @@
 
 #include <meta/main.h>
 #include <meta/errors.h>
-#include "monitor-private.h"
 #include "edid.h"
 
 #define ALL_WL_TRANSFORMS ((1 << (WL_OUTPUT_TRANSFORM_FLIPPED_270 + 1)) - 1)
diff --git a/src/core/meta-monitor-manager-kms.h b/src/core/meta-monitor-manager-kms.h
new file mode 100644
index 0000000..ef75dd6
--- /dev/null
+++ b/src/core/meta-monitor-manager-kms.h
@@ -0,0 +1,40 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
+/*
+ * Copyright (C) 2001 Havoc Pennington
+ * Copyright (C) 2003 Rob Adams
+ * Copyright (C) 2004-2006 Elijah Newren
+ * Copyright (C) 2013 Red Hat Inc.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef META_MONITOR_MANAGER_KMS_H
+#define META_MONITOR_MANAGER_KMS_H
+
+#include "monitor-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))
+#define META_MONITOR_MANAGER_KMS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_MONITOR_MANAGER_KMS, MetaMonitorManagerKmsClass))
+#define META_IS_MONITOR_MANAGER_KMS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_MONITOR_MANAGER_KMS))
+#define META_IS_MONITOR_MANAGER_KMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_MONITOR_MANAGER_KMS))
+#define META_MONITOR_MANAGER_KMS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_MONITOR_MANAGER_KMS, MetaMonitorManagerKmsClass))
+
+typedef struct _MetaMonitorManagerKmsClass    MetaMonitorManagerKmsClass;
+typedef struct _MetaMonitorManagerKms         MetaMonitorManagerKms;
+
+GType meta_monitor_manager_kms_get_type (void);
+
+#endif /* META_MONITOR_MANAGER_KMS_H */
diff --git a/src/core/meta-monitor-manager-xrandr.c b/src/core/meta-monitor-manager-xrandr.c
index 66d8953..59b5fba 100644
--- a/src/core/meta-monitor-manager-xrandr.c
+++ b/src/core/meta-monitor-manager-xrandr.c
@@ -25,6 +25,8 @@
 
 #include "config.h"
 
+#include "meta-monitor-manager-xrandr.h"
+
 #include <string.h>
 #include <stdlib.h>
 #include <math.h>
@@ -36,8 +38,6 @@
 
 #include <meta/main.h>
 #include <meta/errors.h>
-#include "monitor-private.h"
-
 #include "edid.h"
 
 #define ALL_WL_TRANSFORMS ((1 << (WL_OUTPUT_TRANSFORM_FLIPPED_270 + 1)) - 1)
diff --git a/src/core/meta-monitor-manager-xrandr.h b/src/core/meta-monitor-manager-xrandr.h
new file mode 100644
index 0000000..15268e1
--- /dev/null
+++ b/src/core/meta-monitor-manager-xrandr.h
@@ -0,0 +1,40 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
+/*
+ * Copyright (C) 2001 Havoc Pennington
+ * Copyright (C) 2003 Rob Adams
+ * Copyright (C) 2004-2006 Elijah Newren
+ * Copyright (C) 2013 Red Hat Inc.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef META_MONITOR_MANAGER_XRANDR_H
+#define META_MONITOR_MANAGER_XRANDR_H
+
+#include "monitor-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))
+#define META_MONITOR_MANAGER_XRANDR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
+#define META_IS_MONITOR_MANAGER_XRANDR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_MONITOR_MANAGER_XRANDR))
+#define META_IS_MONITOR_MANAGER_XRANDR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_MONITOR_MANAGER_XRANDR))
+#define META_MONITOR_MANAGER_XRANDR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
+
+typedef struct _MetaMonitorManagerXrandrClass    MetaMonitorManagerXrandrClass;
+typedef struct _MetaMonitorManagerXrandr         MetaMonitorManagerXrandr;
+
+GType meta_monitor_manager_xrandr_get_type (void);
+
+#endif /* META_MONITOR_MANAGER_XRANDR_H */
diff --git a/src/core/monitor-private.h b/src/core/monitor-private.h
index 842ab97..7f215b5 100644
--- a/src/core/monitor-private.h
+++ b/src/core/monitor-private.h
@@ -335,30 +335,6 @@ void                meta_monitor_manager_apply_configuration (MetaMonitorManager
 void                meta_monitor_manager_confirm_configuration (MetaMonitorManager *manager,
                                                                 gboolean            ok);
 
-#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))
-#define META_MONITOR_MANAGER_XRANDR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
-#define META_IS_MONITOR_MANAGER_XRANDR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_MONITOR_MANAGER_XRANDR))
-#define META_IS_MONITOR_MANAGER_XRANDR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_MONITOR_MANAGER_XRANDR))
-#define META_MONITOR_MANAGER_XRANDR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_MONITOR_MANAGER_XRANDR, MetaMonitorManagerXrandrClass))
-
-typedef struct _MetaMonitorManagerXrandrClass    MetaMonitorManagerXrandrClass;
-typedef struct _MetaMonitorManagerXrandr         MetaMonitorManagerXrandr;
-
-GType meta_monitor_manager_xrandr_get_type (void);
-
-#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))
-#define META_MONITOR_MANAGER_KMS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_MONITOR_MANAGER_KMS, MetaMonitorManagerKmsClass))
-#define META_IS_MONITOR_MANAGER_KMS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_MONITOR_MANAGER_KMS))
-#define META_IS_MONITOR_MANAGER_KMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_MONITOR_MANAGER_KMS))
-#define META_MONITOR_MANAGER_KMS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_MONITOR_MANAGER_KMS, MetaMonitorManagerKmsClass))
-
-typedef struct _MetaMonitorManagerKmsClass    MetaMonitorManagerKmsClass;
-typedef struct _MetaMonitorManagerKms         MetaMonitorManagerKms;
-
-GType meta_monitor_manager_kms_get_type (void);
-
 #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))
 #define META_MONITOR_CONFIG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  META_TYPE_MONITOR_CONFIG, 
MetaMonitorConfigClass))
diff --git a/src/core/monitor.c b/src/core/monitor.c
index 2b2c1f7..51fb280 100644
--- a/src/core/monitor.c
+++ b/src/core/monitor.c
@@ -34,6 +34,8 @@
 #include "util-private.h"
 #include <meta/errors.h>
 #include "monitor-private.h"
+#include "meta-monitor-manager-kms.h"
+#include "meta-monitor-manager-xrandr.h"
 
 #include "meta-dbus-xrandr.h"
 


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