summaryrefslogtreecommitdiff
path: root/clutter
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2018-07-19 13:45:13 +0200
committerFlorian Müllner <fmuellner@gnome.org>2018-07-31 23:40:01 +0200
commit4fe594bf9c6df73c3db2e9147c657b9cd2106395 (patch)
treeccb4d43b47babd966c1b899b2995efd9050dca16 /clutter
parentec451b46748745a38db3e607b1d7aad4eae481c3 (diff)
downloadmutter-4fe594bf9c6df73c3db2e9147c657b9cd2106395.tar.gz
clutter: Stop using g_type_class_add_private()
It is now deprecated in favor of the G_ADD_PRIVATE() macro (usually called via G_DEFINE_WITH_PRIVATE()). https://gitlab.gnome.org/GNOME/mutter/merge_requests/176
Diffstat (limited to 'clutter')
-rw-r--r--clutter/tests/interactive/test-cogl-offscreen.c12
-rw-r--r--clutter/tests/interactive/test-cogl-tex-convert.c12
-rw-r--r--clutter/tests/interactive/test-cogl-tex-foreign.c12
-rw-r--r--clutter/tests/interactive/test-cogl-tex-polygon.c12
-rw-r--r--clutter/tests/interactive/test-cogl-tex-tile.c12
-rw-r--r--clutter/tests/interactive/test-layout.c12
6 files changed, 30 insertions, 42 deletions
diff --git a/clutter/tests/interactive/test-cogl-offscreen.c b/clutter/tests/interactive/test-cogl-offscreen.c
index 72aeb7933..1589b180e 100644
--- a/clutter/tests/interactive/test-cogl-offscreen.c
+++ b/clutter/tests/interactive/test-cogl-offscreen.c
@@ -61,11 +61,6 @@ G_END_DECLS
/* Coglbox private declaration
*--------------------------------------------------*/
-G_DEFINE_TYPE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
-
-#define TEST_COGLBOX_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
-
struct _TestCoglboxPrivate
{
CoglHandle texhand_id;
@@ -73,6 +68,11 @@ struct _TestCoglboxPrivate
CoglHandle offscreen_id;
};
+G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
+
+#define TEST_COGLBOX_GET_PRIVATE(obj) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
+
/* Coglbox implementation
*--------------------------------------------------*/
@@ -290,8 +290,6 @@ test_coglbox_class_init (TestCoglboxClass *klass)
actor_class->map = test_coglbox_map;
actor_class->paint = test_coglbox_paint;
-
- g_type_class_add_private (gobject_class, sizeof (TestCoglboxPrivate));
}
static ClutterActor*
diff --git a/clutter/tests/interactive/test-cogl-tex-convert.c b/clutter/tests/interactive/test-cogl-tex-convert.c
index 84aa9d6b7..661ed1544 100644
--- a/clutter/tests/interactive/test-cogl-tex-convert.c
+++ b/clutter/tests/interactive/test-cogl-tex-convert.c
@@ -61,17 +61,17 @@ G_END_DECLS
/* Coglbox private declaration
*--------------------------------------------------*/
-G_DEFINE_TYPE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
-
-#define TEST_COGLBOX_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
-
struct _TestCoglboxPrivate
{
CoglHandle cogl_tex_id[4];
gint frame;
};
+G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
+
+#define TEST_COGLBOX_GET_PRIVATE(obj) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
+
/* Coglbox implementation
*--------------------------------------------------*/
@@ -182,8 +182,6 @@ test_coglbox_class_init (TestCoglboxClass *klass)
gobject_class->finalize = test_coglbox_finalize;
gobject_class->dispose = test_coglbox_dispose;
actor_class->paint = test_coglbox_paint;
-
- g_type_class_add_private (gobject_class, sizeof (TestCoglboxPrivate));
}
static ClutterActor*
diff --git a/clutter/tests/interactive/test-cogl-tex-foreign.c b/clutter/tests/interactive/test-cogl-tex-foreign.c
index b499abbbe..247c74968 100644
--- a/clutter/tests/interactive/test-cogl-tex-foreign.c
+++ b/clutter/tests/interactive/test-cogl-tex-foreign.c
@@ -86,11 +86,6 @@ G_END_DECLS
/* Coglbox private declaration
*--------------------------------------------------*/
-G_DEFINE_TYPE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
-
-#define TEST_COGLBOX_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
-
struct _TestCoglboxPrivate
{
guint gl_handle;
@@ -116,6 +111,11 @@ struct _TestCoglboxPrivate
(* glBindTexture) (guint target, guint texture);
};
+G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
+
+#define TEST_COGLBOX_GET_PRIVATE(obj) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
+
/* Coglbox implementation
*--------------------------------------------------*/
@@ -229,8 +229,6 @@ test_coglbox_class_init (TestCoglboxClass *klass)
gobject_class->finalize = test_coglbox_finalize;
gobject_class->dispose = test_coglbox_dispose;
actor_class->paint = test_coglbox_paint;
-
- g_type_class_add_private (gobject_class, sizeof (TestCoglboxPrivate));
}
static ClutterActor*
diff --git a/clutter/tests/interactive/test-cogl-tex-polygon.c b/clutter/tests/interactive/test-cogl-tex-polygon.c
index 1b4f6004c..44f13c731 100644
--- a/clutter/tests/interactive/test-cogl-tex-polygon.c
+++ b/clutter/tests/interactive/test-cogl-tex-polygon.c
@@ -61,11 +61,6 @@ G_END_DECLS
/* Coglbox private declaration
*--------------------------------------------------*/
-G_DEFINE_TYPE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
-
-#define TEST_COGLBOX_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
-
struct _TestCoglboxPrivate
{
CoglHandle sliced_tex, not_sliced_tex;
@@ -74,6 +69,11 @@ struct _TestCoglboxPrivate
gboolean use_linear_filtering;
};
+G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
+
+#define TEST_COGLBOX_GET_PRIVATE(obj) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
+
/* Coglbox implementation
*--------------------------------------------------*/
@@ -293,8 +293,6 @@ test_coglbox_class_init (TestCoglboxClass *klass)
gobject_class->finalize = test_coglbox_finalize;
gobject_class->dispose = test_coglbox_dispose;
actor_class->paint = test_coglbox_paint;
-
- g_type_class_add_private (gobject_class, sizeof (TestCoglboxPrivate));
}
static ClutterActor*
diff --git a/clutter/tests/interactive/test-cogl-tex-tile.c b/clutter/tests/interactive/test-cogl-tex-tile.c
index 025e804ea..bb9b2f591 100644
--- a/clutter/tests/interactive/test-cogl-tex-tile.c
+++ b/clutter/tests/interactive/test-cogl-tex-tile.c
@@ -62,17 +62,17 @@ G_END_DECLS
/* Coglbox private declaration
*--------------------------------------------------*/
-G_DEFINE_TYPE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
-
-#define TEST_COGLBOX_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
-
struct _TestCoglboxPrivate
{
CoglHandle cogl_tex_id;
gdouble animation_progress;
};
+G_DEFINE_TYPE_WITH_PRIVATE (TestCoglbox, test_coglbox, CLUTTER_TYPE_ACTOR);
+
+#define TEST_COGLBOX_GET_PRIVATE(obj) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((obj), TEST_TYPE_COGLBOX, TestCoglboxPrivate))
+
/* Coglbox implementation
*--------------------------------------------------*/
@@ -158,8 +158,6 @@ test_coglbox_class_init (TestCoglboxClass *klass)
gobject_class->finalize = test_coglbox_finalize;
gobject_class->dispose = test_coglbox_dispose;
actor_class->paint = test_coglbox_paint;
-
- g_type_class_add_private (gobject_class, sizeof (TestCoglboxPrivate));
}
static ClutterActor*
diff --git a/clutter/tests/interactive/test-layout.c b/clutter/tests/interactive/test-layout.c
index ec3ebada0..fbc405c40 100644
--- a/clutter/tests/interactive/test-layout.c
+++ b/clutter/tests/interactive/test-layout.c
@@ -40,11 +40,6 @@ enum
PROP_USE_TRANSFORMED_BOX
};
-G_DEFINE_TYPE (MyThing, my_thing, CLUTTER_TYPE_ACTOR)
-
-#define MY_THING_GET_PRIVATE(obj) \
-(G_TYPE_INSTANCE_GET_PRIVATE ((obj), MY_TYPE_THING, MyThingPrivate))
-
struct _MyThingPrivate
{
gfloat spacing;
@@ -53,6 +48,11 @@ struct _MyThingPrivate
guint use_transformed_box : 1;
};
+G_DEFINE_TYPE_WITH_PRIVATE (MyThing, my_thing, CLUTTER_TYPE_ACTOR)
+
+#define MY_THING_GET_PRIVATE(obj) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((obj), MY_TYPE_THING, MyThingPrivate))
+
static void
my_thing_set_property (GObject *gobject,
guint prop_id,
@@ -409,8 +409,6 @@ my_thing_class_init (MyThingClass *klass)
"Use transformed box when allocating",
FALSE,
G_PARAM_READWRITE));
-
- g_type_class_add_private (klass, sizeof (MyThingPrivate));
}
static void