mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
stage-impl: Move properties from the stage window here
The stage window is an interface, that added properties, that were only then actually managed by MetaStageImpl. Shuffle things slightly, and let the MetaStageImpl object deal with these things itself. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2014>
This commit is contained in:
parent
ed112fe0c6
commit
c0fb52cfe6
@ -20,25 +20,6 @@ G_DEFINE_INTERFACE (ClutterStageWindow, clutter_stage_window, G_TYPE_OBJECT);
|
|||||||
static void
|
static void
|
||||||
clutter_stage_window_default_init (ClutterStageWindowInterface *iface)
|
clutter_stage_window_default_init (ClutterStageWindowInterface *iface)
|
||||||
{
|
{
|
||||||
GParamSpec *pspec;
|
|
||||||
|
|
||||||
pspec = g_param_spec_object ("backend",
|
|
||||||
"Backend",
|
|
||||||
"Back pointer to the Backend instance",
|
|
||||||
CLUTTER_TYPE_BACKEND,
|
|
||||||
G_PARAM_WRITABLE |
|
|
||||||
G_PARAM_CONSTRUCT_ONLY |
|
|
||||||
G_PARAM_STATIC_STRINGS);
|
|
||||||
g_object_interface_install_property (iface, pspec);
|
|
||||||
|
|
||||||
pspec = g_param_spec_object ("wrapper",
|
|
||||||
"Wrapper",
|
|
||||||
"Back pointer to the Stage actor",
|
|
||||||
CLUTTER_TYPE_STAGE,
|
|
||||||
G_PARAM_WRITABLE |
|
|
||||||
G_PARAM_CONSTRUCT_ONLY |
|
|
||||||
G_PARAM_STATIC_STRINGS);
|
|
||||||
g_object_interface_install_property (iface, pspec);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,11 +57,15 @@ G_DEFINE_TYPE_WITH_CODE (MetaStageImpl,
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
|
||||||
PROP_WRAPPER,
|
PROP_WRAPPER,
|
||||||
PROP_BACKEND,
|
PROP_BACKEND,
|
||||||
PROP_LAST
|
|
||||||
|
N_PROPS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static GParamSpec *obj_props[N_PROPS];
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_stage_impl_unrealize (ClutterStageWindow *stage_window)
|
meta_stage_impl_unrealize (ClutterStageWindow *stage_window)
|
||||||
{
|
{
|
||||||
@ -790,8 +794,23 @@ meta_stage_impl_class_init (MetaStageImplClass *klass)
|
|||||||
|
|
||||||
gobject_class->set_property = meta_stage_impl_set_property;
|
gobject_class->set_property = meta_stage_impl_set_property;
|
||||||
|
|
||||||
g_object_class_override_property (gobject_class, PROP_WRAPPER, "wrapper");
|
obj_props[PROP_WRAPPER] =
|
||||||
g_object_class_override_property (gobject_class, PROP_BACKEND, "backend");
|
g_param_spec_object ("wrapper",
|
||||||
|
"Wrapper",
|
||||||
|
"Back pointer to the Stage actor",
|
||||||
|
CLUTTER_TYPE_STAGE,
|
||||||
|
G_PARAM_WRITABLE |
|
||||||
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_BACKEND] =
|
||||||
|
g_param_spec_object ("backend",
|
||||||
|
"ClutterBackend",
|
||||||
|
"ClutterBackend",
|
||||||
|
CLUTTER_TYPE_BACKEND,
|
||||||
|
G_PARAM_WRITABLE |
|
||||||
|
G_PARAM_CONSTRUCT_ONLY |
|
||||||
|
G_PARAM_STATIC_STRINGS);
|
||||||
|
g_object_class_install_properties (gobject_class, N_PROPS, obj_props);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user