mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[layout] Rename Box::add to Box::pack
Since ClutterBox is a ClutterContainer we should avoid naming collisions between methods.
This commit is contained in:
parent
c6f67bf872
commit
f58bdbad15
@ -443,7 +443,7 @@ clutter_box_get_layout_manager (ClutterBox *box)
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_box_addv:
|
||||
* clutter_box_packv:
|
||||
* @box: a #ClutterBox
|
||||
* @actor: a #ClutterActor
|
||||
* @n_properties: the number of properties to set
|
||||
@ -452,17 +452,17 @@ clutter_box_get_layout_manager (ClutterBox *box)
|
||||
* @values: (array length=n_properties): a vector containing the property
|
||||
* values to set
|
||||
*
|
||||
* Vector-based variant of clutter_box_add(), intended for language
|
||||
* Vector-based variant of clutter_box_pack(), intended for language
|
||||
* bindings to use
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
void
|
||||
clutter_box_addv (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
guint n_properties,
|
||||
const gchar * const properties[],
|
||||
const GValue *values)
|
||||
clutter_box_packv (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
guint n_properties,
|
||||
const gchar * const properties[],
|
||||
const GValue *values)
|
||||
{
|
||||
ClutterContainer *container;
|
||||
ClutterBoxPrivate *priv;
|
||||
@ -522,7 +522,7 @@ clutter_box_addv (ClutterBox *box,
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_box_add:
|
||||
* clutter_box_pack:
|
||||
* @box: a #ClutterBox
|
||||
* @actor: a #ClutterActor
|
||||
* @first_property: the name of the first property to set, or %NULL
|
||||
@ -540,10 +540,10 @@ clutter_box_addv (ClutterBox *box,
|
||||
* Since: 1.2
|
||||
*/
|
||||
void
|
||||
clutter_box_add (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
const gchar *first_property,
|
||||
...)
|
||||
clutter_box_pack (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
const gchar *first_property,
|
||||
...)
|
||||
{
|
||||
ClutterBoxPrivate *priv;
|
||||
ClutterContainer *container;
|
||||
|
@ -40,11 +40,11 @@ ClutterActor * clutter_box_new (ClutterLayoutManager *mana
|
||||
|
||||
ClutterLayoutManager *clutter_box_get_layout_manager (ClutterBox *box);
|
||||
|
||||
void clutter_box_add (ClutterBox *box,
|
||||
void clutter_box_pack (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
const gchar *first_property,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void clutter_box_addv (ClutterBox *box,
|
||||
void clutter_box_packv (ClutterBox *box,
|
||||
ClutterActor *actor,
|
||||
guint n_properties,
|
||||
const gchar * const properties[],
|
||||
|
@ -1806,8 +1806,8 @@ ClutterBox
|
||||
ClutterBoxClass
|
||||
clutter_box_new
|
||||
clutter_box_get_layout_manager
|
||||
clutter_box_add
|
||||
clutter_box_addv
|
||||
clutter_box_pack
|
||||
clutter_box_packv
|
||||
|
||||
<SUBSECTION Standard>
|
||||
CLUTTER_TYPE_BOX
|
||||
|
@ -117,10 +117,10 @@ test_box_main (int argc, char *argv[])
|
||||
clutter_actor_set_name (box, "box");
|
||||
|
||||
rect = make_background (&bg_color, 200, 200);
|
||||
clutter_box_add (CLUTTER_BOX (box), rect,
|
||||
"x-align", CLUTTER_BIN_ALIGNMENT_FILL,
|
||||
"y-align", CLUTTER_BIN_ALIGNMENT_FILL,
|
||||
NULL);
|
||||
clutter_box_pack (CLUTTER_BOX (box), rect,
|
||||
"x-align", CLUTTER_BIN_ALIGNMENT_FILL,
|
||||
"y-align", CLUTTER_BIN_ALIGNMENT_FILL,
|
||||
NULL);
|
||||
clutter_actor_lower_bottom (rect);
|
||||
clutter_actor_set_name (rect, "background");
|
||||
|
||||
@ -135,10 +135,10 @@ test_box_main (int argc, char *argv[])
|
||||
g_error ("Unable to create texture: %s", error->message);
|
||||
|
||||
clutter_texture_set_keep_aspect_ratio (CLUTTER_TEXTURE (tex), TRUE);
|
||||
clutter_box_add (CLUTTER_BOX (box), tex,
|
||||
"x-align", CLUTTER_BIN_ALIGNMENT_CENTER,
|
||||
"y-align", CLUTTER_BIN_ALIGNMENT_CENTER,
|
||||
NULL);
|
||||
clutter_box_pack (CLUTTER_BOX (box), tex,
|
||||
"x-align", CLUTTER_BIN_ALIGNMENT_CENTER,
|
||||
"y-align", CLUTTER_BIN_ALIGNMENT_CENTER,
|
||||
NULL);
|
||||
clutter_actor_raise (tex, rect);
|
||||
clutter_actor_set_width (tex, 175);
|
||||
clutter_actor_set_name (tex, "texture");
|
||||
@ -150,10 +150,10 @@ test_box_main (int argc, char *argv[])
|
||||
224);
|
||||
|
||||
rect = clutter_rectangle_new_with_color (color);
|
||||
clutter_box_add (CLUTTER_BOX (box), rect,
|
||||
"x-align", CLUTTER_BIN_ALIGNMENT_END,
|
||||
"y-align", CLUTTER_BIN_ALIGNMENT_END,
|
||||
NULL);
|
||||
clutter_box_pack (CLUTTER_BOX (box), rect,
|
||||
"x-align", CLUTTER_BIN_ALIGNMENT_END,
|
||||
"y-align", CLUTTER_BIN_ALIGNMENT_END,
|
||||
NULL);
|
||||
clutter_actor_set_size (rect, 50, 50);
|
||||
clutter_actor_set_opacity (rect, 0);
|
||||
clutter_actor_raise_top (rect);
|
||||
|
Loading…
Reference in New Issue
Block a user