clutter: StageWindow: Use G_DECLARE_INTERFACE()

It cuts away a bit of the GObject boilerplate, gives us support for
`g_autoptr`, and removes the typedef hack inside clutter-stage-window.c.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/380
This commit is contained in:
Niels De Graef
2019-01-08 13:51:47 +01:00
committed by Jonas Ådahl
parent f9e33a89fd
commit b67394dcd1
7 changed files with 43 additions and 56 deletions

View File

@ -45,7 +45,7 @@ struct _MetaStageNative
};
static void
clutter_stage_window_iface_init (ClutterStageWindowIface *iface);
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface);
G_DEFINE_TYPE_WITH_CODE (MetaStageNative, meta_stage_native,
CLUTTER_TYPE_STAGE_COGL,
@ -219,7 +219,7 @@ meta_stage_native_class_init (MetaStageNativeClass *klass)
}
static void
clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface)
{
iface->can_clip_redraws = meta_stage_native_can_clip_redraws;
iface->get_geometry = meta_stage_native_get_geometry;

View File

@ -35,7 +35,7 @@
#include "backends/x11/nested/meta-renderer-x11-nested.h"
#include "clutter/clutter-mutter.h"
static ClutterStageWindowIface *clutter_stage_window_parent_iface = NULL;
static ClutterStageWindowInterface *clutter_stage_window_parent_iface = NULL;
struct _MetaStageX11Nested
{
@ -45,7 +45,7 @@ struct _MetaStageX11Nested
};
static void
clutter_stage_window_iface_init (ClutterStageWindowIface *iface);
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface);
G_DEFINE_TYPE_WITH_CODE (MetaStageX11Nested, meta_stage_x11_nested,
CLUTTER_TYPE_STAGE_X11,
@ -350,7 +350,7 @@ meta_stage_x11_nested_class_init (MetaStageX11NestedClass *klass)
}
static void
clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface)
{
clutter_stage_window_parent_iface = g_type_interface_peek_parent (iface);