mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
Split off LayoutManager deprecated functions to a separate file
This should make it easier to clean up later when we branch off for 1.99.
This commit is contained in:
parent
9faed5eba4
commit
f99abad4a4
@ -302,6 +302,7 @@ deprecated_c = \
|
||||
$(srcdir)/deprecated/clutter-frame-source.c \
|
||||
$(srcdir)/deprecated/clutter-group.c \
|
||||
$(srcdir)/deprecated/clutter-input-device-deprecated.c \
|
||||
$(srcdir)/deprecated/clutter-layout-manager-deprecated.c \
|
||||
$(srcdir)/deprecated/clutter-media.c \
|
||||
$(srcdir)/deprecated/clutter-rectangle.c \
|
||||
$(srcdir)/deprecated/clutter-score.c \
|
||||
|
@ -499,6 +499,7 @@ layout_manager_real_get_child_meta_type (ClutterLayoutManager *manager)
|
||||
return G_TYPE_INVALID;
|
||||
}
|
||||
|
||||
/* XXX:2.0 - Remove */
|
||||
static ClutterAlpha *
|
||||
layout_manager_real_begin_animation (ClutterLayoutManager *manager,
|
||||
guint duration,
|
||||
@ -542,6 +543,7 @@ layout_manager_real_begin_animation (ClutterLayoutManager *manager,
|
||||
return alpha;
|
||||
}
|
||||
|
||||
/* XXX:2.0 - Remove */
|
||||
static gdouble
|
||||
layout_manager_real_get_animation_progress (ClutterLayoutManager *manager)
|
||||
{
|
||||
@ -554,6 +556,7 @@ layout_manager_real_get_animation_progress (ClutterLayoutManager *manager)
|
||||
return clutter_alpha_get_alpha (alpha);
|
||||
}
|
||||
|
||||
/* XXX:2.0 - Remove */
|
||||
static void
|
||||
layout_manager_real_end_animation (ClutterLayoutManager *manager)
|
||||
{
|
||||
@ -587,6 +590,8 @@ clutter_layout_manager_class_init (ClutterLayoutManagerClass *klass)
|
||||
{
|
||||
quark_layout_meta =
|
||||
g_quark_from_static_string ("clutter-layout-manager-child-meta");
|
||||
|
||||
/* XXX:2.0 - Remove */
|
||||
quark_layout_alpha =
|
||||
g_quark_from_static_string ("clutter-layout-manager-alpha");
|
||||
|
||||
@ -597,6 +602,8 @@ clutter_layout_manager_class_init (ClutterLayoutManagerClass *klass)
|
||||
klass->allocate = layout_manager_real_allocate;
|
||||
klass->create_child_meta = layout_manager_real_create_child_meta;
|
||||
klass->get_child_meta_type = layout_manager_real_get_child_meta_type;
|
||||
|
||||
/* XXX:2.0 - Remove */
|
||||
klass->begin_animation = layout_manager_real_begin_animation;
|
||||
klass->get_animation_progress = layout_manager_real_get_animation_progress;
|
||||
klass->end_animation = layout_manager_real_end_animation;
|
||||
@ -1304,87 +1311,3 @@ clutter_layout_manager_list_child_properties (ClutterLayoutManager *manager,
|
||||
|
||||
return pspecs;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_layout_manager_begin_animation:
|
||||
* @manager: a #ClutterLayoutManager
|
||||
* @duration: the duration of the animation, in milliseconds
|
||||
* @mode: the easing mode of the animation
|
||||
*
|
||||
* Begins an animation of @duration milliseconds, using the provided
|
||||
* easing @mode
|
||||
*
|
||||
* The easing mode can be specified either as a #ClutterAnimationMode
|
||||
* or as a logical id returned by clutter_alpha_register_func()
|
||||
*
|
||||
* The result of this function depends on the @manager implementation
|
||||
*
|
||||
* Return value: (transfer none): The #ClutterAlpha created by the
|
||||
* layout manager; the returned instance is owned by the layout
|
||||
* manager and should not be unreferenced
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
ClutterAlpha *
|
||||
clutter_layout_manager_begin_animation (ClutterLayoutManager *manager,
|
||||
guint duration,
|
||||
gulong mode)
|
||||
{
|
||||
ClutterLayoutManagerClass *klass;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager), NULL);
|
||||
|
||||
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager);
|
||||
|
||||
return klass->begin_animation (manager, duration, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_layout_manager_end_animation:
|
||||
* @manager: a #ClutterLayoutManager
|
||||
*
|
||||
* Ends an animation started by clutter_layout_manager_begin_animation()
|
||||
*
|
||||
* The result of this call depends on the @manager implementation
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_layout_manager_end_animation (ClutterLayoutManager *manager)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager));
|
||||
|
||||
CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager)->end_animation (manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_layout_manager_get_animation_progress:
|
||||
* @manager: a #ClutterLayoutManager
|
||||
*
|
||||
* Retrieves the progress of the animation, if one has been started by
|
||||
* clutter_layout_manager_begin_animation()
|
||||
*
|
||||
* The returned value has the same semantics of the #ClutterAlpha:alpha
|
||||
* value
|
||||
*
|
||||
* Return value: the progress of the animation
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gdouble
|
||||
clutter_layout_manager_get_animation_progress (ClutterLayoutManager *manager)
|
||||
{
|
||||
ClutterLayoutManagerClass *klass;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager), 1.0);
|
||||
|
||||
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager);
|
||||
|
||||
return klass->get_animation_progress (manager);
|
||||
}
|
||||
|
89
clutter/deprecated/clutter-layout-manager-deprecated.c
Normal file
89
clutter/deprecated/clutter-layout-manager-deprecated.c
Normal file
@ -0,0 +1,89 @@
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "clutter-layout-manager.h"
|
||||
|
||||
/**
|
||||
* clutter_layout_manager_begin_animation:
|
||||
* @manager: a #ClutterLayoutManager
|
||||
* @duration: the duration of the animation, in milliseconds
|
||||
* @mode: the easing mode of the animation
|
||||
*
|
||||
* Begins an animation of @duration milliseconds, using the provided
|
||||
* easing @mode
|
||||
*
|
||||
* The easing mode can be specified either as a #ClutterAnimationMode
|
||||
* or as a logical id returned by clutter_alpha_register_func()
|
||||
*
|
||||
* The result of this function depends on the @manager implementation
|
||||
*
|
||||
* Return value: (transfer none): The #ClutterAlpha created by the
|
||||
* layout manager; the returned instance is owned by the layout
|
||||
* manager and should not be unreferenced
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
ClutterAlpha *
|
||||
clutter_layout_manager_begin_animation (ClutterLayoutManager *manager,
|
||||
guint duration,
|
||||
gulong mode)
|
||||
{
|
||||
ClutterLayoutManagerClass *klass;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager), NULL);
|
||||
|
||||
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager);
|
||||
|
||||
return klass->begin_animation (manager, duration, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_layout_manager_end_animation:
|
||||
* @manager: a #ClutterLayoutManager
|
||||
*
|
||||
* Ends an animation started by clutter_layout_manager_begin_animation()
|
||||
*
|
||||
* The result of this call depends on the @manager implementation
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
void
|
||||
clutter_layout_manager_end_animation (ClutterLayoutManager *manager)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager));
|
||||
|
||||
CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager)->end_animation (manager);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_layout_manager_get_animation_progress:
|
||||
* @manager: a #ClutterLayoutManager
|
||||
*
|
||||
* Retrieves the progress of the animation, if one has been started by
|
||||
* clutter_layout_manager_begin_animation()
|
||||
*
|
||||
* The returned value has the same semantics of the #ClutterAlpha:alpha
|
||||
* value
|
||||
*
|
||||
* Return value: the progress of the animation
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.12
|
||||
*/
|
||||
gdouble
|
||||
clutter_layout_manager_get_animation_progress (ClutterLayoutManager *manager)
|
||||
{
|
||||
ClutterLayoutManagerClass *klass;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_LAYOUT_MANAGER (manager), 1.0);
|
||||
|
||||
klass = CLUTTER_LAYOUT_MANAGER_GET_CLASS (manager);
|
||||
|
||||
return klass->get_animation_progress (manager);
|
||||
}
|
Loading…
Reference in New Issue
Block a user