mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
Deprecate ClutterBox
ClutterBox functionality has been implemented by ClutterActor, and proxied by the Box subclass; with the removal of the abstract bit on ClutterActor, we can safely deprecated ClutterBox.
This commit is contained in:
parent
a6df0b6a53
commit
b4d269705e
@ -62,7 +62,6 @@ source_h = \
|
||||
$(srcdir)/clutter-binding-pool.h \
|
||||
$(srcdir)/clutter-bin-layout.h \
|
||||
$(srcdir)/clutter-blur-effect.h \
|
||||
$(srcdir)/clutter-box.h \
|
||||
$(srcdir)/clutter-box-layout.h \
|
||||
$(srcdir)/clutter-cairo-texture.h \
|
||||
$(srcdir)/clutter-child-meta.h \
|
||||
@ -137,7 +136,6 @@ source_c = \
|
||||
$(srcdir)/clutter-binding-pool.c \
|
||||
$(srcdir)/clutter-bin-layout.c \
|
||||
$(srcdir)/clutter-blur-effect.c \
|
||||
$(srcdir)/clutter-box.c \
|
||||
$(srcdir)/clutter-box-layout.c \
|
||||
$(srcdir)/clutter-cairo-texture.c \
|
||||
$(srcdir)/clutter-child-meta.c \
|
||||
@ -239,6 +237,7 @@ deprecated_h = \
|
||||
$(srcdir)/deprecated/clutter-behaviour-path.h \
|
||||
$(srcdir)/deprecated/clutter-behaviour-rotate.h \
|
||||
$(srcdir)/deprecated/clutter-behaviour-scale.h \
|
||||
$(srcdir)/deprecated/clutter-box.h \
|
||||
$(srcdir)/deprecated/clutter-fixed.h \
|
||||
$(srcdir)/deprecated/clutter-frame-source.h \
|
||||
$(srcdir)/deprecated/clutter-group.h \
|
||||
@ -259,6 +258,7 @@ deprecated_c = \
|
||||
$(srcdir)/deprecated/clutter-behaviour-path.c \
|
||||
$(srcdir)/deprecated/clutter-behaviour-rotate.c \
|
||||
$(srcdir)/deprecated/clutter-behaviour-scale.c \
|
||||
$(srcdir)/deprecated/clutter-box.c \
|
||||
$(srcdir)/deprecated/clutter-fixed.c \
|
||||
$(srcdir)/deprecated/clutter-frame-source.c \
|
||||
$(srcdir)/deprecated/clutter-timeout-pool.c \
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "deprecated/clutter-behaviour-path.h"
|
||||
#include "deprecated/clutter-behaviour-rotate.h"
|
||||
#include "deprecated/clutter-behaviour-scale.h"
|
||||
#include "deprecated/clutter-box.h"
|
||||
#include "deprecated/clutter-fixed.h"
|
||||
#include "deprecated/clutter-frame-source.h"
|
||||
#include "deprecated/clutter-group.h"
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "clutter-binding-pool.h"
|
||||
#include "clutter-bin-layout.h"
|
||||
#include "clutter-blur-effect.h"
|
||||
#include "clutter-box.h"
|
||||
#include "clutter-box-layout.h"
|
||||
#include "clutter-cairo-texture.h"
|
||||
#include "clutter-child-meta.h"
|
||||
|
@ -66,6 +66,8 @@
|
||||
* layout properties while adding the new child to the box.
|
||||
*
|
||||
* #ClutterBox is available since Clutter 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use #ClutterActor instead.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -108,6 +110,16 @@ static const ClutterColor default_box_color = { 255, 255, 255, 255 };
|
||||
|
||||
G_DEFINE_TYPE (ClutterBox, clutter_box, CLUTTER_TYPE_ACTOR);
|
||||
|
||||
static inline void
|
||||
clutter_box_set_color_internal (ClutterBox *box,
|
||||
const ClutterColor *color)
|
||||
{
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (box), color);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (box), obj_props[PROP_COLOR_SET]);
|
||||
g_object_notify_by_pspec (G_OBJECT (box), obj_props[PROP_COLOR]);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
clutter_box_real_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
@ -173,7 +185,7 @@ clutter_box_set_property (GObject *gobject,
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_COLOR:
|
||||
clutter_box_set_color (self, clutter_value_get_color (value));
|
||||
clutter_box_set_color_internal (self, clutter_value_get_color (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -277,7 +289,9 @@ clutter_box_init (ClutterBox *self)
|
||||
*
|
||||
* Return value: the newly created #ClutterBox actor
|
||||
*
|
||||
* Since: 1.0
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_new() instead.
|
||||
*/
|
||||
ClutterActor *
|
||||
clutter_box_new (ClutterLayoutManager *manager)
|
||||
@ -300,6 +314,8 @@ clutter_box_new (ClutterLayoutManager *manager)
|
||||
* layout of the children of @box
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_set_layout_manager() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_set_layout_manager (ClutterBox *box,
|
||||
@ -319,6 +335,8 @@ clutter_box_set_layout_manager (ClutterBox *box,
|
||||
* be unreferenced
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_get_layout_manager() instead.
|
||||
*/
|
||||
ClutterLayoutManager *
|
||||
clutter_box_get_layout_manager (ClutterBox *box)
|
||||
@ -340,6 +358,8 @@ clutter_box_get_layout_manager (ClutterBox *box)
|
||||
* bindings to use
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_add_child() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_packv (ClutterBox *box,
|
||||
@ -500,6 +520,8 @@ clutter_box_set_property_valist (ClutterBox *box,
|
||||
* variant instead
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_add_child() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_pack (ClutterBox *box,
|
||||
@ -541,6 +563,8 @@ clutter_box_pack (ClutterBox *box,
|
||||
* clutter_container_raise_child() and clutter_layout_manager_child_set()
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_insert_child_above() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_pack_after (ClutterBox *box,
|
||||
@ -585,6 +609,8 @@ clutter_box_pack_after (ClutterBox *box,
|
||||
* clutter_container_lower_child() and clutter_layout_manager_child_set()
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_insert_child_below() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_pack_before (ClutterBox *box,
|
||||
@ -627,6 +653,8 @@ clutter_box_pack_before (ClutterBox *box,
|
||||
* children
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_insert_child_at_index() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_pack_at (ClutterBox *box,
|
||||
@ -667,6 +695,8 @@ clutter_box_pack_at (ClutterBox *box,
|
||||
* Sets (or unsets) the background color for @box
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_set_background_color() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_set_color (ClutterBox *box,
|
||||
@ -674,10 +704,7 @@ clutter_box_set_color (ClutterBox *box,
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_BOX (box));
|
||||
|
||||
clutter_actor_set_background_color (CLUTTER_ACTOR (box), color);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (box), obj_props[PROP_COLOR_SET]);
|
||||
g_object_notify_by_pspec (G_OBJECT (box), obj_props[PROP_COLOR]);
|
||||
clutter_box_set_color_internal (box, color);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -691,6 +718,8 @@ clutter_box_set_color (ClutterBox *box,
|
||||
* returned #ClutterColor is undefined
|
||||
*
|
||||
* Since: 1.2
|
||||
*
|
||||
* Deprecated: 1.10: Use clutter_actor_get_background_color() instead.
|
||||
*/
|
||||
void
|
||||
clutter_box_get_color (ClutterBox *box,
|
@ -85,37 +85,52 @@ struct _ClutterBoxClass
|
||||
|
||||
GType clutter_box_get_type (void) G_GNUC_CONST;
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_new)
|
||||
ClutterActor * clutter_box_new (ClutterLayoutManager *manager);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_set_layout_manager)
|
||||
void clutter_box_set_layout_manager (ClutterBox *box,
|
||||
ClutterLayoutManager *manager);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_get_layout_manager)
|
||||
ClutterLayoutManager *clutter_box_get_layout_manager (ClutterBox *box);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_set_background_color)
|
||||
void clutter_box_set_color (ClutterBox *box,
|
||||
const ClutterColor *color);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_get_background_color)
|
||||
void clutter_box_get_color (ClutterBox *box,
|
||||
ClutterColor *color);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_add_child)
|
||||
void clutter_box_pack (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
const gchar *first_property,
|
||||
...);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_add_child)
|
||||
void clutter_box_packv (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
guint n_properties,
|
||||
const gchar * const properties[],
|
||||
const GValue *values);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_insert_child_above)
|
||||
void clutter_box_pack_after (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
ClutterActor *sibling,
|
||||
const gchar *first_property,
|
||||
...);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_insert_child_below)
|
||||
void clutter_box_pack_before (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
ClutterActor *sibling,
|
||||
const gchar *first_property,
|
||||
...);
|
||||
|
||||
CLUTTER_DEPRECATED_FOR(clutter_actor_insert_child_at_index)
|
||||
void clutter_box_pack_at (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
gint position,
|
Loading…
Reference in New Issue
Block a user