clutter/box-layout: Make 'easing-mode' be an enum
In the past, it was a odd mix of possible different types, all coalesced into an unsigned integer. Now, hovewer, it's always a ClutterAnimationType, so lets change the name of getter, setter and property to what it really is. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1192
This commit is contained in:
parent
e3c0fcf7d5
commit
bc18438cb0
@ -77,7 +77,7 @@ struct _ClutterBoxLayoutPrivate
|
|||||||
|
|
||||||
guint spacing;
|
guint spacing;
|
||||||
|
|
||||||
gulong easing_mode;
|
ClutterAnimationMode easing_mode;
|
||||||
guint easing_duration;
|
guint easing_duration;
|
||||||
|
|
||||||
ClutterOrientation orientation;
|
ClutterOrientation orientation;
|
||||||
@ -1266,7 +1266,7 @@ clutter_box_layout_set_property (GObject *gobject,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_EASING_MODE:
|
case PROP_EASING_MODE:
|
||||||
clutter_box_layout_set_easing_mode (self, g_value_get_ulong (value));
|
clutter_box_layout_set_easing_mode (self, g_value_get_enum (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_EASING_DURATION:
|
case PROP_EASING_DURATION:
|
||||||
@ -1315,7 +1315,7 @@ clutter_box_layout_get_property (GObject *gobject,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_EASING_MODE:
|
case PROP_EASING_MODE:
|
||||||
g_value_set_ulong (value, priv->easing_mode);
|
g_value_set_enum (value, priv->easing_mode);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_EASING_DURATION:
|
case PROP_EASING_DURATION:
|
||||||
@ -1448,11 +1448,6 @@ clutter_box_layout_class_init (ClutterBoxLayoutClass *klass)
|
|||||||
* The easing mode for the animations, in case
|
* The easing mode for the animations, in case
|
||||||
* #ClutterBoxLayout:use-animations is set to %TRUE.
|
* #ClutterBoxLayout:use-animations is set to %TRUE.
|
||||||
*
|
*
|
||||||
* The easing mode has the same semantics of #ClutterAnimation:mode: it can
|
|
||||||
* either be a value from the #ClutterAnimationMode enumeration, like
|
|
||||||
* %CLUTTER_EASE_OUT_CUBIC, or a logical id as returned by
|
|
||||||
* clutter_alpha_register_func().
|
|
||||||
*
|
|
||||||
* The default value is %CLUTTER_EASE_OUT_CUBIC.
|
* The default value is %CLUTTER_EASE_OUT_CUBIC.
|
||||||
*
|
*
|
||||||
* Since: 1.2
|
* Since: 1.2
|
||||||
@ -1461,10 +1456,10 @@ clutter_box_layout_class_init (ClutterBoxLayoutClass *klass)
|
|||||||
* the children when allocating them.
|
* the children when allocating them.
|
||||||
*/
|
*/
|
||||||
obj_props[PROP_EASING_MODE] =
|
obj_props[PROP_EASING_MODE] =
|
||||||
g_param_spec_ulong ("easing-mode",
|
g_param_spec_enum ("easing-mode",
|
||||||
P_("Easing Mode"),
|
P_("Easing Mode"),
|
||||||
P_("The easing mode of the animations"),
|
P_("The easing mode of the animations"),
|
||||||
0, G_MAXULONG,
|
CLUTTER_TYPE_ANIMATION_MODE,
|
||||||
CLUTTER_EASE_OUT_CUBIC,
|
CLUTTER_EASE_OUT_CUBIC,
|
||||||
CLUTTER_PARAM_READWRITE);
|
CLUTTER_PARAM_READWRITE);
|
||||||
|
|
||||||
@ -2243,8 +2238,7 @@ clutter_box_layout_get_use_animations (ClutterBoxLayout *layout)
|
|||||||
/**
|
/**
|
||||||
* clutter_box_layout_set_easing_mode:
|
* clutter_box_layout_set_easing_mode:
|
||||||
* @layout: a #ClutterBoxLayout
|
* @layout: a #ClutterBoxLayout
|
||||||
* @mode: an easing mode, either from #ClutterAnimationMode or a logical id
|
* @mode: a #ClutterAnimationMode
|
||||||
* from clutter_alpha_register_func()
|
|
||||||
*
|
*
|
||||||
* Sets the easing mode to be used by @layout when animating changes in layout
|
* Sets the easing mode to be used by @layout when animating changes in layout
|
||||||
* properties.
|
* properties.
|
||||||
@ -2256,7 +2250,7 @@ clutter_box_layout_get_use_animations (ClutterBoxLayout *layout)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_box_layout_set_easing_mode (ClutterBoxLayout *layout,
|
clutter_box_layout_set_easing_mode (ClutterBoxLayout *layout,
|
||||||
gulong mode)
|
ClutterAnimationMode mode)
|
||||||
{
|
{
|
||||||
ClutterBoxLayoutPrivate *priv;
|
ClutterBoxLayoutPrivate *priv;
|
||||||
|
|
||||||
@ -2284,7 +2278,7 @@ clutter_box_layout_set_easing_mode (ClutterBoxLayout *layout,
|
|||||||
*
|
*
|
||||||
* Deprecated: 1.12
|
* Deprecated: 1.12
|
||||||
*/
|
*/
|
||||||
gulong
|
ClutterAnimationMode
|
||||||
clutter_box_layout_get_easing_mode (ClutterBoxLayout *layout)
|
clutter_box_layout_get_easing_mode (ClutterBoxLayout *layout)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_BOX_LAYOUT (layout),
|
g_return_val_if_fail (CLUTTER_IS_BOX_LAYOUT (layout),
|
||||||
|
@ -154,9 +154,9 @@ CLUTTER_DEPRECATED
|
|||||||
gboolean clutter_box_layout_get_use_animations (ClutterBoxLayout *layout);
|
gboolean clutter_box_layout_get_use_animations (ClutterBoxLayout *layout);
|
||||||
CLUTTER_DEPRECATED
|
CLUTTER_DEPRECATED
|
||||||
void clutter_box_layout_set_easing_mode (ClutterBoxLayout *layout,
|
void clutter_box_layout_set_easing_mode (ClutterBoxLayout *layout,
|
||||||
gulong mode);
|
ClutterAnimationMode mode);
|
||||||
CLUTTER_DEPRECATED
|
CLUTTER_DEPRECATED
|
||||||
gulong clutter_box_layout_get_easing_mode (ClutterBoxLayout *layout);
|
ClutterAnimationMode clutter_box_layout_get_easing_mode (ClutterBoxLayout *layout);
|
||||||
CLUTTER_DEPRECATED
|
CLUTTER_DEPRECATED
|
||||||
void clutter_box_layout_set_easing_duration (ClutterBoxLayout *layout,
|
void clutter_box_layout_set_easing_duration (ClutterBoxLayout *layout,
|
||||||
guint msecs);
|
guint msecs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user