clutter_actor_meta_class_init (ClutterActorMetaClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterActorMetaPrivate));
klass->set_actor = clutter_actor_meta_real_set_actor;
- gobject_class->set_property = clutter_actor_meta_set_property;
- gobject_class->get_property = clutter_actor_meta_get_property;
- gobject_class->finalize = clutter_actor_meta_finalize;
-
/**
* ClutterActorMeta:actor:
*
*
* Since: 1.4
*/
- pspec = g_param_spec_object ("actor",
- P_("Actor"),
- P_("The actor attached to the meta"),
- CLUTTER_TYPE_ACTOR,
- CLUTTER_PARAM_READABLE);
- obj_props[PROP_ACTOR] = pspec;
- g_object_class_install_property (gobject_class, PROP_ACTOR, pspec);
+ obj_props[PROP_ACTOR] =
+ g_param_spec_object ("actor",
+ P_("Actor"),
+ P_("The actor attached to the meta"),
+ CLUTTER_TYPE_ACTOR,
+ CLUTTER_PARAM_READABLE);
/**
* ClutterActorMeta:name:
*
* Since: 1.4
*/
- pspec = g_param_spec_string ("name",
- P_("Name"),
- P_("The name of the meta"),
- NULL,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_NAME] = pspec;
- g_object_class_install_property (gobject_class, PROP_NAME, pspec);
+ obj_props[PROP_NAME] =
+ g_param_spec_string ("name",
+ P_("Name"),
+ P_("The name of the meta"),
+ NULL,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterActorMeta:enabled:
*
* Since: 1.4
*/
- pspec = g_param_spec_boolean ("enabled",
- P_("Enabled"),
- P_("Whether the meta is enabled"),
- TRUE,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_ENABLED] = pspec;
- g_object_class_install_property (gobject_class, PROP_ENABLED, pspec);
+ obj_props[PROP_ENABLED] =
+ g_param_spec_boolean ("enabled",
+ P_("Enabled"),
+ P_("Whether the meta is enabled"),
+ TRUE,
+ CLUTTER_PARAM_READWRITE);
+
+ gobject_class->finalize = clutter_actor_meta_finalize;
+ gobject_class->set_property = clutter_actor_meta_set_property;
+ gobject_class->get_property = clutter_actor_meta_get_property;
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
void
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorMetaClass *meta_class = CLUTTER_ACTOR_META_CLASS (klass);
ClutterConstraintClass *constraint_class = CLUTTER_CONSTRAINT_CLASS (klass);
- GParamSpec *pspec;
-
- gobject_class->set_property = clutter_align_constraint_set_property;
- gobject_class->get_property = clutter_align_constraint_get_property;
meta_class->set_actor = clutter_align_constraint_set_actor;
*
* Since: 1.4
*/
- pspec = g_param_spec_object ("source",
- P_("Source"),
- P_("The source of the alignment"),
- CLUTTER_TYPE_ACTOR,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- obj_props[PROP_SOURCE] = pspec;
- g_object_class_install_property (gobject_class, PROP_SOURCE, pspec);
+ obj_props[PROP_SOURCE] =
+ g_param_spec_object ("source",
+ P_("Source"),
+ P_("The source of the alignment"),
+ CLUTTER_TYPE_ACTOR,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT);
/**
* ClutterAlignConstraint:align-axis:
*
* Since: 1.4
*/
- pspec = g_param_spec_enum ("align-axis",
- P_("Align Axis"),
- P_("The axis to align the position to"),
- CLUTTER_TYPE_ALIGN_AXIS,
- CLUTTER_ALIGN_X_AXIS,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- obj_props[PROP_ALIGN_AXIS] = pspec;
- g_object_class_install_property (gobject_class, PROP_ALIGN_AXIS, pspec);
+ obj_props[PROP_ALIGN_AXIS] =
+ g_param_spec_enum ("align-axis",
+ P_("Align Axis"),
+ P_("The axis to align the position to"),
+ CLUTTER_TYPE_ALIGN_AXIS,
+ CLUTTER_ALIGN_X_AXIS,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT);
/**
* ClutterAlignConstraint:factor:
*
* Since: 1.4
*/
- pspec = g_param_spec_float ("factor",
- P_("Factor"),
- P_("The alignment factor, between 0.0 and 1.0"),
- 0.0, 1.0,
- 0.0,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- obj_props[PROP_FACTOR] = pspec;
- g_object_class_install_property (gobject_class, PROP_FACTOR, pspec);
+ obj_props[PROP_FACTOR] =
+ g_param_spec_float ("factor",
+ P_("Factor"),
+ P_("The alignment factor, between 0.0 and 1.0"),
+ 0.0, 1.0,
+ 0.0,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+
+ gobject_class->set_property = clutter_align_constraint_set_property;
+ gobject_class->get_property = clutter_align_constraint_get_property;
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
clutter_alpha_class_init (ClutterAlphaClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
object_class->set_property = clutter_alpha_set_property;
object_class->get_property = clutter_alpha_get_property;
*
* Since: 0.2
*/
- pspec = g_param_spec_object ("timeline",
+ obj_props[PROP_TIMELINE] =
+ g_param_spec_object ("timeline",
P_("Timeline"),
P_("Timeline used by the alpha"),
CLUTTER_TYPE_TIMELINE,
CLUTTER_PARAM_READWRITE);
- obj_props[PROP_TIMELINE] = pspec;
- g_object_class_install_property (object_class, PROP_TIMELINE, pspec);
/**
* ClutterAlpha:alpha:
*
* Since: 0.2
*/
- pspec = g_param_spec_double ("alpha",
+ obj_props[PROP_ALPHA] =
+ g_param_spec_double ("alpha",
P_("Alpha value"),
P_("Alpha value as computed by the alpha"),
-1.0, 2.0,
0.0,
CLUTTER_PARAM_READABLE);
- obj_props[PROP_ALPHA] = pspec;
- g_object_class_install_property (object_class, PROP_ALPHA, pspec);
/**
* ClutterAlpha:mode:
*
* Since: 1.0
*/
- pspec = g_param_spec_ulong ("mode",
+ obj_props[PROP_MODE] =
+ g_param_spec_ulong ("mode",
P_("Mode"),
P_("Progress mode"),
0, G_MAXULONG,
CLUTTER_CUSTOM_MODE,
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE);
- obj_props[PROP_MODE] = pspec;
- g_object_class_install_property (object_class, PROP_MODE, pspec);
+
+ _clutter_object_class_install_properties (object_class,
+ PROP_LAST,
+ obj_props);
}
static void
clutter_animation_class_init (ClutterAnimationClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
quark_object_animation =
g_quark_from_static_string ("clutter-actor-animation");
*
* Since: 1.0
*/
- pspec = g_param_spec_object ("object",
- P_("Object"),
- P_("Object to which the animation applies"),
- G_TYPE_OBJECT,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_OBJECT] = pspec;
- g_object_class_install_property (gobject_class, PROP_OBJECT, pspec);
+ obj_props[PROP_OBJECT] =
+ g_param_spec_object ("object",
+ P_("Object"),
+ P_("Object to which the animation applies"),
+ G_TYPE_OBJECT,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterAnimation:mode:
*
* Since: 1.0
*/
- pspec = g_param_spec_ulong ("mode",
- P_("Mode"),
- P_("The mode of the animation"),
- 0, G_MAXULONG,
- CLUTTER_LINEAR,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_MODE] = pspec;
- g_object_class_install_property (gobject_class, PROP_MODE, pspec);
+ obj_props[PROP_MODE] =
+ g_param_spec_ulong ("mode",
+ P_("Mode"),
+ P_("The mode of the animation"),
+ 0, G_MAXULONG,
+ CLUTTER_LINEAR,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterAnimation:duration:
*
* Since: 1.0
*/
- pspec = g_param_spec_uint ("duration",
- P_("Duration"),
- P_("Duration of the animation, in milliseconds"),
- 0, G_MAXUINT, 0,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_DURATION] = pspec;
- g_object_class_install_property (gobject_class, PROP_DURATION, pspec);
+ obj_props[PROP_DURATION] =
+ g_param_spec_uint ("duration",
+ P_("Duration"),
+ P_("Duration of the animation, in milliseconds"),
+ 0, G_MAXUINT,
+ 0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterAnimation:loop:
*
* Since: 1.0
*/
- pspec = g_param_spec_boolean ("loop",
- P_("Loop"),
- P_("Whether the animation should loop"),
- FALSE,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_LOOP] = pspec;
- g_object_class_install_property (gobject_class, PROP_LOOP, pspec);
+ obj_props[PROP_LOOP] =
+ g_param_spec_boolean ("loop",
+ P_("Loop"),
+ P_("Whether the animation should loop"),
+ FALSE,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterAnimation:timeline:
*
* Since: 1.0
*/
- pspec = g_param_spec_object ("timeline",
- P_("Timeline"),
- P_("The timeline used by the animation"),
- CLUTTER_TYPE_TIMELINE,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_TIMELINE] = pspec;
- g_object_class_install_property (gobject_class, PROP_TIMELINE, pspec);
+ obj_props[PROP_TIMELINE] =
+ g_param_spec_object ("timeline",
+ P_("Timeline"),
+ P_("The timeline used by the animation"),
+ CLUTTER_TYPE_TIMELINE,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterAnimation:alpha:
*
* Since: 1.0
*/
- pspec = g_param_spec_object ("alpha",
- P_("Alpha"),
- P_("The alpha used by the animation"),
- CLUTTER_TYPE_ALPHA,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_ALPHA] = pspec;
- g_object_class_install_property (gobject_class, PROP_ALPHA, pspec);
+ obj_props[PROP_ALPHA] =
+ g_param_spec_object ("alpha",
+ P_("Alpha"),
+ P_("The alpha used by the animation"),
+ CLUTTER_TYPE_ALPHA,
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
/**
* ClutterAnimation::started:
clutter_animator_class_init (ClutterAnimatorClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterAnimatorPrivate));
*
* Since: 1.2
*/
- pspec = g_param_spec_uint ("duration",
- P_("Duration"),
- P_("The duration of the animation"),
- 0, G_MAXUINT,
- 2000,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_DURATION] = pspec;
- g_object_class_install_property (gobject_class, PROP_DURATION, pspec);
+ obj_props[PROP_DURATION] =
+ g_param_spec_uint ("duration",
+ P_("Duration"),
+ P_("The duration of the animation"),
+ 0, G_MAXUINT,
+ 2000,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterAnimator:timeline:
*
* Since: 1.2
*/
- pspec = g_param_spec_object ("timeline",
- P_("Timeline"),
- P_("The timeline of the animation"),
- CLUTTER_TYPE_TIMELINE,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_TIMELINE] = pspec;
- g_object_class_install_property (gobject_class, PROP_TIMELINE, pspec);
+ obj_props[PROP_TIMELINE] =
+ g_param_spec_object ("timeline",
+ P_("Timeline"),
+ P_("The timeline of the animation"),
+ CLUTTER_TYPE_TIMELINE,
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
clutter_behaviour_class_init (ClutterBehaviourClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
object_class->dispose = clutter_behaviour_dispose;
object_class->set_property = clutter_behaviour_set_property;
*
* Since: 0.2
*/
- pspec = g_param_spec_object ("alpha",
- P_("Alpha"),
- P_("Alpha Object to drive the behaviour"),
- CLUTTER_TYPE_ALPHA,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_ALPHA] = pspec;
- g_object_class_install_property (object_class, PROP_ALPHA, pspec);
+ obj_props[PROP_ALPHA] =
+ g_param_spec_object ("alpha",
+ P_("Alpha"),
+ P_("Alpha Object to drive the behaviour"),
+ CLUTTER_TYPE_ALPHA,
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (object_class,
+ PROP_LAST,
+ obj_props);
klass->alpha_notify = clutter_behaviour_alpha_notify_unimplemented;
PROP_LAYER_0,
PROP_LAYER_X_ALIGN,
- PROP_LAYER_Y_ALIGN
+ PROP_LAYER_Y_ALIGN,
+
+ PROP_LAYER_LAST
};
enum
PROP_LAST
};
-static GParamSpec *obj_props[PROP_LAST];
+static GParamSpec *layer_props[PROP_LAYER_LAST] = { NULL, };
+static GParamSpec *bin_props[PROP_LAST] = { NULL, };
G_DEFINE_TYPE (ClutterBinLayer,
clutter_bin_layer,
manager = clutter_layout_meta_get_manager (meta);
clutter_layout_manager_layout_changed (manager);
- _clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_X_ALIGN]);
+ _clutter_notify_by_pspec (G_OBJECT (self), layer_props[PROP_LAYER_X_ALIGN]);
}
static void
manager = clutter_layout_meta_get_manager (meta);
clutter_layout_manager_layout_changed (manager);
- _clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_Y_ALIGN]);
+ _clutter_notify_by_pspec (G_OBJECT (self), layer_props[PROP_LAYER_Y_ALIGN]);
}
static void
clutter_bin_layer_class_init (ClutterBinLayerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
gobject_class->set_property = clutter_bin_layer_set_property;
gobject_class->get_property = clutter_bin_layer_get_property;
- pspec = g_param_spec_enum ("x-align",
- P_("Horizontal Alignment"),
- P_("Horizontal alignment for the actor "
- "inside the layout manager"),
- CLUTTER_TYPE_BIN_ALIGNMENT,
- CLUTTER_BIN_ALIGNMENT_CENTER,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_LAYER_X_ALIGN] = pspec;
- g_object_class_install_property (gobject_class,
- PROP_LAYER_X_ALIGN,
- pspec);
-
- pspec = g_param_spec_enum ("y-align",
- P_("Vertical Alignment"),
- P_("Vertical alignment for the actor "
- "inside the layout manager"),
- CLUTTER_TYPE_BIN_ALIGNMENT,
- CLUTTER_BIN_ALIGNMENT_CENTER,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_LAYER_Y_ALIGN] = pspec;
- g_object_class_install_property (gobject_class,
- PROP_LAYER_Y_ALIGN,
- pspec);
+ layer_props[PROP_LAYER_X_ALIGN] =
+ g_param_spec_enum ("x-align",
+ P_("Horizontal Alignment"),
+ P_("Horizontal alignment for the actor "
+ "inside the layout manager"),
+ CLUTTER_TYPE_BIN_ALIGNMENT,
+ CLUTTER_BIN_ALIGNMENT_CENTER,
+ CLUTTER_PARAM_READWRITE);
+
+ layer_props[PROP_LAYER_Y_ALIGN] =
+ g_param_spec_enum ("y-align",
+ P_("Vertical Alignment"),
+ P_("Vertical alignment for the actor "
+ "inside the layout manager"),
+ CLUTTER_TYPE_BIN_ALIGNMENT,
+ CLUTTER_BIN_ALIGNMENT_CENTER,
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAYER_LAST,
+ layer_props);
}
static void
manager = CLUTTER_LAYOUT_MANAGER (self);
clutter_layout_manager_layout_changed (manager);
- _clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_X_ALIGN]);
+ _clutter_notify_by_pspec (G_OBJECT (self), bin_props[PROP_X_ALIGN]);
}
}
manager = CLUTTER_LAYOUT_MANAGER (self);
clutter_layout_manager_layout_changed (manager);
- _clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_Y_ALIGN]);
+ _clutter_notify_by_pspec (G_OBJECT (self), bin_props[PROP_Y_ALIGN]);
}
}
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterLayoutManagerClass *layout_class =
CLUTTER_LAYOUT_MANAGER_CLASS (klass);
- GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterBinLayoutPrivate));
- gobject_class->set_property = clutter_bin_layout_set_property;
- gobject_class->get_property = clutter_bin_layout_get_property;
-
/**
* ClutterBinLayout:x-align:
*
*
* Since: 1.2
*/
- pspec = g_param_spec_enum ("x-align",
- P_("Horizontal Alignment"),
- P_("Default horizontal alignment for the actors "
- "inside the layout manager"),
- CLUTTER_TYPE_BIN_ALIGNMENT,
- CLUTTER_BIN_ALIGNMENT_CENTER,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_X_ALIGN] = pspec;
- g_object_class_install_property (gobject_class, PROP_X_ALIGN, pspec);
+ bin_props[PROP_X_ALIGN] =
+ g_param_spec_enum ("x-align",
+ P_("Horizontal Alignment"),
+ P_("Default horizontal alignment for the actors "
+ "inside the layout manager"),
+ CLUTTER_TYPE_BIN_ALIGNMENT,
+ CLUTTER_BIN_ALIGNMENT_CENTER,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterBinLayout:y-align:
*
* Since: 1.2
*/
- pspec = g_param_spec_enum ("y-align",
- P_("Vertical Alignment"),
- P_("Default vertical alignment for the actors "
- "inside the layout manager"),
- CLUTTER_TYPE_BIN_ALIGNMENT,
- CLUTTER_BIN_ALIGNMENT_CENTER,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_Y_ALIGN] = pspec;
- g_object_class_install_property (gobject_class, PROP_Y_ALIGN, pspec);
+ bin_props[PROP_Y_ALIGN] =
+ g_param_spec_enum ("y-align",
+ P_("Vertical Alignment"),
+ P_("Default vertical alignment for the actors "
+ "inside the layout manager"),
+ CLUTTER_TYPE_BIN_ALIGNMENT,
+ CLUTTER_BIN_ALIGNMENT_CENTER,
+ CLUTTER_PARAM_READWRITE);
+
+ gobject_class->set_property = clutter_bin_layout_set_property;
+ gobject_class->get_property = clutter_bin_layout_get_property;
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ bin_props);
layout_class->get_preferred_width =
clutter_bin_layout_get_preferred_width;
ClutterActorMetaClass *meta_class = CLUTTER_ACTOR_META_CLASS (klass);
ClutterConstraintClass *constraint_class = CLUTTER_CONSTRAINT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
gobject_class->set_property = clutter_bind_constraint_set_property;
gobject_class->get_property = clutter_bind_constraint_get_property;
*
* Since: 1.4
*/
- pspec = g_param_spec_object ("source",
- P_("Source"),
- P_("The source of the binding"),
- CLUTTER_TYPE_ACTOR,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- obj_props[PROP_SOURCE] = pspec;
- g_object_class_install_property (gobject_class, PROP_SOURCE, pspec);
+ obj_props[PROP_SOURCE] =
+ g_param_spec_object ("source",
+ P_("Source"),
+ P_("The source of the binding"),
+ CLUTTER_TYPE_ACTOR,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT);
/**
* ClutterBindConstraint:coordinate:
*
* Since: 1.4
*/
- pspec = g_param_spec_enum ("coordinate",
- P_("Coordinate"),
- P_("The coordinate to bind"),
- CLUTTER_TYPE_BIND_COORDINATE,
- CLUTTER_BIND_X,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- obj_props[PROP_COORDINATE] = pspec;
- g_object_class_install_property (gobject_class, PROP_COORDINATE, pspec);
+ obj_props[PROP_COORDINATE] =
+ g_param_spec_enum ("coordinate",
+ P_("Coordinate"),
+ P_("The coordinate to bind"),
+ CLUTTER_TYPE_BIND_COORDINATE,
+ CLUTTER_BIND_X,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT);
/**
* ClutterBindConstraint:offset:
*
* Since: 1.4
*/
- pspec = g_param_spec_float ("offset",
- P_("Offset"),
- P_("The offset in pixels to apply to the binding"),
- -G_MAXFLOAT, G_MAXFLOAT,
- 0.0f,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- obj_props[PROP_OFFSET] = pspec;
- g_object_class_install_property (gobject_class, PROP_OFFSET, pspec);
+ obj_props[PROP_OFFSET] =
+ g_param_spec_float ("offset",
+ P_("Offset"),
+ P_("The offset in pixels to apply to the binding"),
+ -G_MAXFLOAT, G_MAXFLOAT,
+ 0.0f,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
clutter_binding_pool_class_init (ClutterBindingPoolClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec = NULL;
gobject_class->constructed = clutter_binding_pool_constructed;
gobject_class->set_property = clutter_binding_pool_set_property;
*
* Since: 1.0
*/
- pspec = g_param_spec_string ("name",
- P_("Name"),
- P_("The unique name of the binding pool"),
- NULL,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY);
- obj_props[PROP_NAME] = pspec;
- g_object_class_install_property (gobject_class, PROP_NAME, pspec);
+ obj_props[PROP_NAME] =
+ g_param_spec_string ("name",
+ P_("Name"),
+ P_("The unique name of the binding pool"),
+ NULL,
+ CLUTTER_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT_ONLY);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
- GParamSpec *pspec;
gobject_class->finalize = clutter_cairo_texture_finalize;
gobject_class->set_property = clutter_cairo_texture_set_property;
*
* Since: 1.0
*/
- pspec = g_param_spec_uint ("surface-width",
- P_("Surface Width"),
- P_("The width of the Cairo surface"),
- 0, G_MAXUINT,
- 0,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_SURFACE_WIDTH] = pspec;
- g_object_class_install_property (gobject_class,
- PROP_SURFACE_WIDTH,
- pspec);
+ obj_props[PROP_SURFACE_WIDTH] =
+ g_param_spec_uint ("surface-width",
+ P_("Surface Width"),
+ P_("The width of the Cairo surface"),
+ 0, G_MAXUINT,
+ 0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterCairoTexture:surface-height:
*
*
* Since: 1.0
*/
- pspec = g_param_spec_uint ("surface-height",
- P_("Surface Height"),
- P_("The height of the Cairo surface"),
- 0, G_MAXUINT,
- 0,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_SURFACE_HEIGHT] = pspec;
- g_object_class_install_property (gobject_class,
- PROP_SURFACE_HEIGHT,
- pspec);
+ obj_props[PROP_SURFACE_HEIGHT] =
+ g_param_spec_uint ("surface-height",
+ P_("Surface Height"),
+ P_("The height of the Cairo surface"),
+ 0, G_MAXUINT,
+ 0,
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
clutter_child_meta_class_init (ClutterChildMetaClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
gobject_class->set_property = clutter_child_meta_set_property;
gobject_class->get_property = clutter_child_meta_get_property;
*
* Since: 0.8
*/
- pspec = g_param_spec_object ("container",
- P_("Container"),
- P_("The container that created this data"),
- CLUTTER_TYPE_CONTAINER,
- G_PARAM_CONSTRUCT_ONLY |
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_CONTAINER] = pspec;
- g_object_class_install_property (gobject_class, PROP_CONTAINER, pspec);
+ obj_props[PROP_CONTAINER] =
+ g_param_spec_object ("container",
+ P_("Container"),
+ P_("The container that created this data"),
+ CLUTTER_TYPE_CONTAINER,
+ G_PARAM_CONSTRUCT_ONLY |
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterChildMeta:actor:
*
* Since: 0.8
*/
- pspec = g_param_spec_object ("actor",
- P_("Actor"),
- P_("The actor wrapped by this data"),
- CLUTTER_TYPE_ACTOR,
- G_PARAM_CONSTRUCT_ONLY |
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_ACTOR] = pspec;
- g_object_class_install_property (gobject_class, PROP_ACTOR, pspec);
+ obj_props[PROP_ACTOR] =
+ g_param_spec_object ("actor",
+ P_("Actor"),
+ P_("The actor wrapped by this data"),
+ CLUTTER_TYPE_ACTOR,
+ G_PARAM_CONSTRUCT_ONLY |
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorMetaClass *meta_class = CLUTTER_ACTOR_META_CLASS (klass);
- GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterClickActionPrivate));
*
* Since: 1.4
*/
- pspec = g_param_spec_boolean ("pressed",
- P_("Pressed"),
- P_("Whether the clickable should be in pressed state"),
- FALSE,
- CLUTTER_PARAM_READABLE);
- obj_props[PROP_PRESSED] = pspec;
- g_object_class_install_property (gobject_class, PROP_PRESSED, pspec);
+ obj_props[PROP_PRESSED] =
+ g_param_spec_boolean ("pressed",
+ P_("Pressed"),
+ P_("Whether the clickable should be in pressed state"),
+ FALSE,
+ CLUTTER_PARAM_READABLE);
/**
* ClutterClickAction:held:
*
* Since: 1.4
*/
- pspec = g_param_spec_boolean ("held",
- P_("Held"),
- P_("Whether the clickable has a grab"),
- FALSE,
- CLUTTER_PARAM_READABLE);
- obj_props[PROP_HELD] = pspec;
- g_object_class_install_property (gobject_class, PROP_HELD, pspec);
+ obj_props[PROP_HELD] =
+ g_param_spec_boolean ("held",
+ P_("Held"),
+ P_("Whether the clickable has a grab"),
+ FALSE,
+ CLUTTER_PARAM_READABLE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
/**
* ClutterClickAction::clicked:
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
- GParamSpec *pspec = NULL;
g_type_class_add_private (gobject_class, sizeof (ClutterClonePrivate));
*
* Since: 1.0
*/
- pspec = g_param_spec_object ("source",
- P_("Source"),
- P_("Specifies the actor to be cloned"),
- CLUTTER_TYPE_ACTOR,
- G_PARAM_CONSTRUCT |
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_SOURCE] = pspec;
- g_object_class_install_property (gobject_class, PROP_SOURCE, pspec);
+ obj_props[PROP_SOURCE] =
+ g_param_spec_object ("source",
+ P_("Source"),
+ P_("Specifies the actor to be cloned"),
+ CLUTTER_TYPE_ACTOR,
+ G_PARAM_CONSTRUCT |
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterOffscreenEffectClass *offscreen_class;
- GParamSpec *pspec;
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
offscreen_class->paint_target = clutter_colorize_effect_paint_target;
*
* Since: 1.4
*/
- pspec = clutter_param_spec_color ("tint",
- P_("Tint"),
- P_("The tint to apply"),
- &default_tint,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_TINT] = pspec;
- g_object_class_install_property (gobject_class, PROP_TINT, pspec);
+ obj_props[PROP_TINT] =
+ clutter_param_spec_color ("tint",
+ P_("Tint"),
+ P_("The tint to apply"),
+ &default_tint,
+ CLUTTER_PARAM_READWRITE);
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterActorMetaClass *meta_class = CLUTTER_ACTOR_META_CLASS (klass);
ClutterOffscreenEffectClass *offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
- GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterDeformEffectPrivate));
klass->deform_vertex = clutter_deform_effect_real_deform_vertex;
- gobject_class->set_property = clutter_deform_effect_set_property;
- gobject_class->get_property = clutter_deform_effect_get_property;
- gobject_class->finalize = clutter_deform_effect_finalize;
-
/**
* ClutterDeformEffect:x-tiles:
*
*
* Since: 1.4
*/
- pspec = g_param_spec_uint ("x-tiles",
- P_("Horizontal Tiles"),
- P_("The number of horizontal tiles"),
- 1, G_MAXUINT,
- DEFAULT_N_TILES,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_X_TILES] = pspec;
- g_object_class_install_property (gobject_class, PROP_X_TILES, pspec);
+ obj_props[PROP_X_TILES] =
+ g_param_spec_uint ("x-tiles",
+ P_("Horizontal Tiles"),
+ P_("The number of horizontal tiles"),
+ 1, G_MAXUINT,
+ DEFAULT_N_TILES,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterDeformEffect:y-tiles:
*
* Since: 1.4
*/
- pspec = g_param_spec_uint ("y-tiles",
- P_("Vertical Tiles"),
- P_("The number of vertical tiles"),
- 1, G_MAXUINT,
- DEFAULT_N_TILES,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_Y_TILES] = pspec;
- g_object_class_install_property (gobject_class, PROP_Y_TILES, pspec);
+ obj_props[PROP_Y_TILES] =
+ g_param_spec_uint ("y-tiles",
+ P_("Vertical Tiles"),
+ P_("The number of vertical tiles"),
+ 1, G_MAXUINT,
+ DEFAULT_N_TILES,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterDeformEffect:back-material:
*
* Since: 1.4
*/
- pspec = g_param_spec_boxed ("back-material",
- P_("Back Material"),
- P_("The material to be used when painting the back of the actor"),
- COGL_TYPE_HANDLE,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_BACK_MATERIAL] = pspec;
- g_object_class_install_property (gobject_class, PROP_BACK_MATERIAL, pspec);
+ obj_props[PROP_BACK_MATERIAL] =
+ g_param_spec_boxed ("back-material",
+ P_("Back Material"),
+ P_("The material to be used when painting the back of the actor"),
+ COGL_TYPE_HANDLE,
+ CLUTTER_PARAM_READWRITE);
+
+ gobject_class->finalize = clutter_deform_effect_finalize;
+ gobject_class->set_property = clutter_deform_effect_set_property;
+ gobject_class->get_property = clutter_deform_effect_get_property;
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
meta_class->set_actor = clutter_deform_effect_set_actor;
ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterOffscreenEffectClass *offscreen_class;
- GParamSpec *pspec;
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
offscreen_class->paint_target = clutter_desaturate_effect_paint_target;
effect_class->pre_paint = clutter_desaturate_effect_pre_paint;
- gobject_class->set_property = clutter_desaturate_effect_set_property;
- gobject_class->get_property = clutter_desaturate_effect_get_property;
- gobject_class->dispose = clutter_desaturate_effect_dispose;
-
/**
* ClutterDesaturateEffect:factor:
*
*
* Since: 1.4
*/
- pspec = g_param_spec_double ("factor",
- P_("Factor"),
- P_("The desaturation factor"),
- 0.0, 1.0,
- 1.0,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_FACTOR] = pspec;
- g_object_class_install_property (gobject_class, PROP_FACTOR, pspec);
+ obj_props[PROP_FACTOR] =
+ g_param_spec_double ("factor",
+ P_("Factor"),
+ P_("The desaturation factor"),
+ 0.0, 1.0,
+ 1.0,
+ CLUTTER_PARAM_READWRITE);
+
+ gobject_class->dispose = clutter_desaturate_effect_dispose;
+ gobject_class->set_property = clutter_desaturate_effect_set_property;
+ gobject_class->get_property = clutter_desaturate_effect_get_property;
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
clutter_device_manager_class_init (ClutterDeviceManagerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterDeviceManagerPrivate));
+ obj_props[PROP_BACKEND] =
+ g_param_spec_object ("backend",
+ P_("Backend"),
+ P_("The ClutterBackend of the device manager"),
+ CLUTTER_TYPE_BACKEND,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
+
gobject_class->set_property = clutter_device_manager_set_property;
gobject_class->get_property = clutter_device_manager_get_property;
-
- pspec = g_param_spec_object ("backend",
- P_("Backend"),
- P_("The ClutterBackend of the device manager"),
- CLUTTER_TYPE_BACKEND,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY);
- obj_props[PROP_BACKEND] = pspec;
- g_object_class_install_property (gobject_class, PROP_BACKEND, pspec);
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
/**
* ClutterDeviceManager::device-added:
PROP_MIN_COLUMN_WIDTH,
PROP_MAX_COLUMN_WIDTH,
PROP_MIN_ROW_HEGHT,
- PROP_MAX_ROW_HEIGHT
+ PROP_MAX_ROW_HEIGHT,
+
+ N_PROPERTIES
};
+static GParamSpec *flow_properties[N_PROPERTIES] = { NULL, };
+
G_DEFINE_TYPE (ClutterFlowLayout,
clutter_flow_layout,
CLUTTER_TYPE_LAYOUT_MANAGER);
{
GObjectClass *gobject_class;
ClutterLayoutManagerClass *layout_class;
- GParamSpec *pspec;
g_type_class_add_private (klass, sizeof (ClutterFlowLayoutPrivate));
gobject_class = G_OBJECT_CLASS (klass);
layout_class = CLUTTER_LAYOUT_MANAGER_CLASS (klass);
- gobject_class->set_property = clutter_flow_layout_set_property;
- gobject_class->get_property = clutter_flow_layout_get_property;
- gobject_class->finalize = clutter_flow_layout_finalize;
-
layout_class->get_preferred_width =
clutter_flow_layout_get_preferred_width;
layout_class->get_preferred_height =
*
* Since: 1.2
*/
- pspec = g_param_spec_enum ("orientation",
- P_("Orientation"),
- P_("The orientation of the layout"),
- CLUTTER_TYPE_FLOW_ORIENTATION,
- CLUTTER_FLOW_HORIZONTAL,
- CLUTTER_PARAM_READWRITE |
- G_PARAM_CONSTRUCT);
- g_object_class_install_property (gobject_class, PROP_ORIENTATION, pspec);
+ flow_properties[PROP_ORIENTATION] =
+ g_param_spec_enum ("orientation",
+ P_("Orientation"),
+ P_("The orientation of the layout"),
+ CLUTTER_TYPE_FLOW_ORIENTATION,
+ CLUTTER_FLOW_HORIZONTAL,
+ CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT);
/**
* ClutterFlowLayout:homogeneous:
*
* Since: 1.2
*/
- pspec = g_param_spec_boolean ("homogeneous",
- P_("Homogeneous"),
- P_("Whether each item should receive the same allocation"),
- FALSE,
- CLUTTER_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_HOMOGENEOUS, pspec);
+ flow_properties[PROP_HOMOGENEOUS] =
+ g_param_spec_boolean ("homogeneous",
+ P_("Homogeneous"),
+ P_("Whether each item should receive the same allocation"),
+ FALSE,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterFlowLayout:column-spacing:
*
* Since: 1.2
*/
- pspec = g_param_spec_float ("column-spacing",
- P_("Column Spacing"),
- P_("The spacing between columns"),
- 0.0, G_MAXFLOAT,
- 0.0,
- CLUTTER_PARAM_READWRITE);
- g_object_class_install_property (gobject_class,
- PROP_COLUMN_SPACING,
- pspec);
+ flow_properties[PROP_COLUMN_SPACING] =
+ g_param_spec_float ("column-spacing",
+ P_("Column Spacing"),
+ P_("The spacing between columns"),
+ 0.0, G_MAXFLOAT,
+ 0.0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterFlowLayout:row-spacing:
*
* Since: 1.2
*/
- pspec = g_param_spec_float ("row-spacing",
- P_("Row Spacing"),
- P_("The spacing between rows"),
- 0.0, G_MAXFLOAT,
- 0.0,
- CLUTTER_PARAM_READWRITE);
- g_object_class_install_property (gobject_class,
- PROP_ROW_SPACING,
- pspec);
+ flow_properties[PROP_ROW_SPACING] =
+ g_param_spec_float ("row-spacing",
+ P_("Row Spacing"),
+ P_("The spacing between rows"),
+ 0.0, G_MAXFLOAT,
+ 0.0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterFlowLayout:min-column-width:
*
* Since: 1.2
*/
- pspec = g_param_spec_float ("min-column-width",
- P_("Minimum Column Width"),
- P_("Minimum width for each column"),
- 0.0, G_MAXFLOAT,
- 0.0,
- CLUTTER_PARAM_READWRITE);
- g_object_class_install_property (gobject_class,
- PROP_MIN_COLUMN_WIDTH,
- pspec);
+ flow_properties[PROP_MIN_COLUMN_WIDTH] =
+ g_param_spec_float ("min-column-width",
+ P_("Minimum Column Width"),
+ P_("Minimum width for each column"),
+ 0.0, G_MAXFLOAT,
+ 0.0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterFlowLayout:max-column-width:
*
* Since: 1.2
*/
- pspec = g_param_spec_float ("max-column-width",
- P_("Maximum Column Width"),
- P_("Maximum width for each column"),
- -1.0, G_MAXFLOAT,
- -1.0,
- CLUTTER_PARAM_READWRITE);
- g_object_class_install_property (gobject_class,
- PROP_MAX_COLUMN_WIDTH,
- pspec);
+ flow_properties[PROP_MAX_COLUMN_WIDTH] =
+ g_param_spec_float ("max-column-width",
+ P_("Maximum Column Width"),
+ P_("Maximum width for each column"),
+ -1.0, G_MAXFLOAT,
+ -1.0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterFlowLayout:min-row-height:
*
* Since: 1.2
*/
- pspec = g_param_spec_float ("min-row-height",
- P_("Minimum Row Height"),
- P_("Minimum height for each row"),
- 0.0, G_MAXFLOAT,
- 0.0,
- CLUTTER_PARAM_READWRITE);
- g_object_class_install_property (gobject_class,
- PROP_MIN_ROW_HEGHT,
- pspec);
+ flow_properties[PROP_MIN_ROW_HEGHT] =
+ g_param_spec_float ("min-row-height",
+ P_("Minimum Row Height"),
+ P_("Minimum height for each row"),
+ 0.0, G_MAXFLOAT,
+ 0.0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterFlowLayout:max-row-height:
*
* Since: 1.2
*/
- pspec = g_param_spec_float ("max-row-height",
- P_("Maximum Row Height"),
- P_("Maximum height for each row"),
- -1.0, G_MAXFLOAT,
- -1.0,
- CLUTTER_PARAM_READWRITE);
- g_object_class_install_property (gobject_class,
- PROP_MAX_ROW_HEIGHT,
- pspec);
+ flow_properties[PROP_MAX_ROW_HEIGHT] =
+ g_param_spec_float ("max-row-height",
+ P_("Maximum Row Height"),
+ P_("Maximum height for each row"),
+ -1.0, G_MAXFLOAT,
+ -1.0,
+ CLUTTER_PARAM_READWRITE);
+
+ gobject_class->finalize = clutter_flow_layout_finalize;
+ gobject_class->set_property = clutter_flow_layout_set_property;
+ gobject_class->get_property = clutter_flow_layout_get_property;
+ _clutter_object_class_install_properties (gobject_class,
+ N_PROPERTIES,
+ flow_properties);
}
static void
manager = CLUTTER_LAYOUT_MANAGER (layout);
clutter_layout_manager_layout_changed (manager);
- g_object_notify (G_OBJECT (layout), "orientation");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_ORIENTATION]);
}
}
manager = CLUTTER_LAYOUT_MANAGER (layout);
clutter_layout_manager_layout_changed (manager);
- g_object_notify (G_OBJECT (layout), "homogeneous");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_HOMOGENEOUS]);
}
}
manager = CLUTTER_LAYOUT_MANAGER (layout);
clutter_layout_manager_layout_changed (manager);
- g_object_notify (G_OBJECT (layout), "column-spacing");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_COLUMN_SPACING]);
}
}
manager = CLUTTER_LAYOUT_MANAGER (layout);
clutter_layout_manager_layout_changed (manager);
- g_object_notify (G_OBJECT (layout), "row-spacing");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_ROW_SPACING]);
}
}
}
if (notify_min)
- g_object_notify (G_OBJECT (layout), "min-column-width");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_MIN_COLUMN_WIDTH]);
if (notify_max)
- g_object_notify (G_OBJECT (layout), "max-column-width");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_MAX_COLUMN_WIDTH]);
g_object_thaw_notify (G_OBJECT (layout));
}
}
if (notify_min)
- g_object_notify (G_OBJECT (layout), "min-row-height");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_MIN_ROW_HEGHT]);
if (notify_max)
- g_object_notify (G_OBJECT (layout), "max-row-height");
+ _clutter_notify_by_pspec (G_OBJECT (layout),
+ flow_properties[PROP_MAX_ROW_HEIGHT]);
g_object_thaw_notify (G_OBJECT (layout));
}
klass->get_type_from_name = clutter_script_real_get_type_from_name;
- gobject_class->get_property = clutter_script_get_property;
- gobject_class->finalize = clutter_script_finalize;
-
/**
* ClutterScript:filename-set:
*
*
* Since: 0.6
*/
- pspec = g_param_spec_boolean ("filename-set",
- P_("Filename Set"),
- P_("Whether the :filename property is set"),
- FALSE,
- CLUTTER_PARAM_READABLE);
- obj_props[PROP_FILENAME_SET] = pspec;
- g_object_class_install_property (gobject_class, PROP_FILENAME_SET, pspec);
+ obj_props[PROP_FILENAME_SET] =
+ g_param_spec_boolean ("filename-set",
+ P_("Filename Set"),
+ P_("Whether the :filename property is set"),
+ FALSE,
+ CLUTTER_PARAM_READABLE);
/**
* ClutterScript:filename:
*
* Since: 0.6
*/
- pspec = g_param_spec_string ("filename",
- P_("Filename"),
- P_("The path of the currently parsed file"),
- NULL,
- CLUTTER_PARAM_READABLE);
- obj_props[PROP_FILENAME] = pspec;
- g_object_class_install_property (gobject_class, PROP_FILENAME, pspec);
+ obj_props[PROP_FILENAME] =
+ g_param_spec_string ("filename",
+ P_("Filename"),
+ P_("The path of the currently parsed file"),
+ NULL,
+ CLUTTER_PARAM_READABLE);
+
+ gobject_class->get_property = clutter_script_get_property;
+ gobject_class->finalize = clutter_script_finalize;
+
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
}
static void
g_type_class_add_private (klass, sizeof (ClutterShaderEffectPrivate));
- gobject_class->set_property = clutter_shader_effect_set_property;
- gobject_class->finalize = clutter_shader_effect_finalize;
-
/**
* ClutterShaderEffect:shader-type:
*
*
* Since: 1.4
*/
- pspec = g_param_spec_enum ("shader-type",
- P_("Shader Type"),
- P_("The type of shader used"),
- CLUTTER_TYPE_SHADER_TYPE,
- CLUTTER_FRAGMENT_SHADER,
- CLUTTER_PARAM_WRITABLE |
- G_PARAM_CONSTRUCT_ONLY);
- obj_props[PROP_SHADER_TYPE] = pspec;
- g_object_class_install_property (gobject_class, PROP_SHADER_TYPE, pspec);
+ obj_props[PROP_SHADER_TYPE] =
+ g_param_spec_enum ("shader-type",
+ P_("Shader Type"),
+ P_("The type of shader used"),
+ CLUTTER_TYPE_SHADER_TYPE,
+ CLUTTER_FRAGMENT_SHADER,
+ CLUTTER_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY);
+
+ gobject_class->set_property = clutter_shader_effect_set_property;
+ gobject_class->finalize = clutter_shader_effect_finalize;
+ _clutter_object_class_install_properties (gobject_class,
+ PROP_LAST,
+ obj_props);
meta_class->set_actor = clutter_shader_effect_set_actor;
clutter_timeline_class_init (ClutterTimelineClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GParamSpec *pspec;
-
- object_class->set_property = clutter_timeline_set_property;
- object_class->get_property = clutter_timeline_get_property;
- object_class->finalize = clutter_timeline_finalize;
- object_class->dispose = clutter_timeline_dispose;
g_type_class_add_private (klass, sizeof (ClutterTimelinePrivate));
*
* Whether the timeline should automatically rewind and restart.
*/
- pspec = g_param_spec_boolean ("loop",
- "Loop",
- "Should the timeline automatically restart",
- FALSE,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_LOOP] = pspec;
- g_object_class_install_property (object_class, PROP_LOOP, pspec);
+ obj_props[PROP_LOOP] =
+ g_param_spec_boolean ("loop",
+ P_("Loop"),
+ P_("Should the timeline automatically restart"),
+ FALSE,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterTimeline:delay:
*
* Since: 0.4
*/
- pspec = g_param_spec_uint ("delay",
- "Delay",
- "Delay before start",
- 0, G_MAXUINT,
- 0,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_DELAY] = pspec;
- g_object_class_install_property (object_class, PROP_DELAY, pspec);
+ obj_props[PROP_DELAY] =
+ g_param_spec_uint ("delay",
+ P_("Delay"),
+ P_("Delay before start"),
+ 0, G_MAXUINT,
+ 0,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterTimeline:duration:
*
* Since: 0.6
*/
- pspec = g_param_spec_uint ("duration",
- "Duration",
- "Duration of the timeline in milliseconds",
- 0, G_MAXUINT,
- 1000,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_DURATION] = pspec;
- g_object_class_install_property (object_class, PROP_DURATION, pspec);
+ obj_props[PROP_DURATION] =
+ g_param_spec_uint ("duration",
+ P_("Duration"),
+ P_("Duration of the timeline in milliseconds"),
+ 0, G_MAXUINT,
+ 1000,
+ CLUTTER_PARAM_READWRITE);
/**
* ClutterTimeline:direction:
*
* Since: 0.6
*/
- pspec = g_param_spec_enum ("direction",
- "Direction",
- "Direction of the timeline",
- CLUTTER_TYPE_TIMELINE_DIRECTION,
- CLUTTER_TIMELINE_FORWARD,
- CLUTTER_PARAM_READWRITE);
- obj_props[PROP_DIRECTION] = pspec;
- g_object_class_install_property (object_class, PROP_DIRECTION, pspec);
+ obj_props[PROP_DIRECTION] =
+ g_param_spec_enum ("direction",
+ P_("Direction"),
+ P_("Direction of the timeline"),
+ CLUTTER_TYPE_TIMELINE_DIRECTION,
+ CLUTTER_TIMELINE_FORWARD,
+ CLUTTER_PARAM_READWRITE);
+
+ object_class->dispose = clutter_timeline_dispose;
+ object_class->finalize = clutter_timeline_finalize;
+ object_class->set_property = clutter_timeline_set_property;
+ object_class->get_property = clutter_timeline_get_property;
+ _clutter_object_class_install_properties (object_class,
+ PROP_LAST,
+ obj_props);
/**
* ClutterTimeline::new-frame: