summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-rr.h
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-05-09 23:10:14 +0200
committerinfirit <[email protected]>2014-11-28 08:44:02 +0100
commit7056b2ab291f998496cf7ceb3cf24b37f407eb7f (patch)
tree64000a3ee90022de10c9d8c74e72de31a5b594db /libmate-desktop/mate-rr.h
parent48df7a0c71a2df4050abae40ec9ca2b35dee7988 (diff)
downloadmate-desktop-7056b2ab291f998496cf7ceb3cf24b37f407eb7f.tar.bz2
mate-desktop-7056b2ab291f998496cf7ceb3cf24b37f407eb7f.tar.xz
Turn MateRRScreen into a GObject
Rework MateRRScreen so that it is a full GObject, and all its data is moved to MateScreenPrivate. GObject's are more supported when it comes to introspection and bindings, in particular wrt constructors. Therefore, this is a necessary step for useful introspection generation. https://bugzilla.gnome.org/show_bug.cgi?id=630913 Based on gnome commit 4d2a27d55bcf9bb8de170ae6c6540724125aafa3 url: https://git.gnome.org/browse/gnome-desktop/commit/?id=4d2a27d55bcf9bb8de170ae6c6540724125aafa3
Diffstat (limited to 'libmate-desktop/mate-rr.h')
-rw-r--r--libmate-desktop/mate-rr.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/libmate-desktop/mate-rr.h b/libmate-desktop/mate-rr.h
index 3559560..08ca1b7 100644
--- a/libmate-desktop/mate-rr.h
+++ b/libmate-desktop/mate-rr.h
@@ -31,11 +31,22 @@
#include <glib.h>
#include <gdk/gdk.h>
-typedef struct MateRRScreen MateRRScreen;
+typedef struct MateRRScreenPrivate MateRRScreenPrivate;
typedef struct MateRROutput MateRROutput;
typedef struct MateRRCrtc MateRRCrtc;
typedef struct MateRRMode MateRRMode;
+typedef struct {
+ GObject parent;
+
+ MateRRScreenPrivate* priv;
+} MateRRScreen;
+
+typedef struct {
+ GObjectClass parent_class;
+
+} MateRRScreenClass;
+
typedef void (* MateRRScreenChanged) (MateRRScreen *screen, gpointer data);
typedef enum
@@ -65,6 +76,19 @@ typedef enum {
#define MATE_RR_CONNECTOR_TYPE_PANEL "Panel" /* This is a laptop's built-in LCD */
+#define MATE_RR_TYPE_SCREEN (mate_rr_screen_get_type())
+#define MATE_RR_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_RR_TYPE_SCREEN, MateRRScreen))
+#define MATE_RR_IS_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_RR_TYPE_SCREEN))
+#define MATE_RR_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_RR_TYPE_SCREEN, MateRRScreenClass))
+#define MATE_RR_IS_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_RR_TYPE_SCREEN))
+#define MATE_RR_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_RR_TYPE_SCREEN, MateRRScreenClass))
+
+#define MATE_RR_TYPE_OUTPUT (mate_rr_output_get_type())
+#define MATE_RR_TYPE_CRTC (mate_rr_crtc_get_type())
+#define MATE_RR_TYPE_MODE (mate_rr_mode_get_type())
+
+GType mate_rr_screen_get_type (void);
+
/* MateRRScreen */
MateRRScreen * mate_rr_screen_new (GdkScreen *screen,
MateRRScreenChanged callback,