mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 11:02:05 +00:00
2006-07-06 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.h: * clutter/clutter-actor.c: (clutter_actor_class_init), (clutter_actor_set_property), (clutter_actor_get_property): Add the "clip" and "has-clip" properties. (clutter_actor_set_clip), (clutter_actor_remove_clip): Emit the notification for the changed properties. (clutter_actor_has_clip): Simple accessor to the "has-clip" property.
This commit is contained in:
parent
212c4a0ee8
commit
5fa9fc161b
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
||||
2006-07-06 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-actor.h:
|
||||
* clutter/clutter-actor.c:
|
||||
|
||||
(clutter_actor_class_init), (clutter_actor_set_property),
|
||||
(clutter_actor_get_property): Add the "clip" and "has-clip"
|
||||
properties.
|
||||
|
||||
(clutter_actor_set_clip), (clutter_actor_remove_clip): Emit
|
||||
the notification for the changed properties.
|
||||
|
||||
(clutter_actor_has_clip): Simple accessor to the "has-clip"
|
||||
property.
|
||||
|
||||
2006-07-06 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
Big rework of the actor management semantics: now ClutterActor
|
||||
|
@ -476,6 +476,15 @@ clutter_actor_set_property (GObject *object,
|
||||
else
|
||||
clutter_actor_hide (actor);
|
||||
break;
|
||||
case PROP_CLIP:
|
||||
{
|
||||
ClutterGeometry *geom = g_value_get_boxed (value);
|
||||
|
||||
clutter_actor_set_clip (actor,
|
||||
geom->x, geom->y,
|
||||
geom->width, geom->height);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -518,6 +527,12 @@ clutter_actor_get_property (GObject *object,
|
||||
g_value_set_boolean (value,
|
||||
(CLUTTER_ACTOR_IS_VISIBLE (actor) != FALSE));
|
||||
break;
|
||||
case PROP_HAS_CLIP:
|
||||
g_value_set_boolean (value, priv->has_clip);
|
||||
break;
|
||||
case PROP_CLIP:
|
||||
g_value_set_boxed (value, &(priv->clip));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -617,7 +632,19 @@ clutter_actor_class_init (ClutterActorClass *klass)
|
||||
"Visible",
|
||||
"Whether the actor is visible or not",
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
g_object_class_install_property (object_class, PROP_HAS_CLIP,
|
||||
g_param_spec_boolean ("has-clip",
|
||||
"Has Clip",
|
||||
"Whether the actor has a clip set or not",
|
||||
FALSE,
|
||||
G_PARAM_READABLE));
|
||||
g_object_class_install_property (object_class, PROP_CLIP,
|
||||
g_param_spec_boxed ("clip",
|
||||
"Clip",
|
||||
"The clip region for the actor",
|
||||
CLUTTER_TYPE_GEOMETRY,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
actor_signals[DESTROY] =
|
||||
g_signal_new ("destroy",
|
||||
@ -1203,6 +1230,9 @@ clutter_actor_set_clip (ClutterActor *self,
|
||||
clip->height = height;
|
||||
|
||||
self->priv->has_clip = TRUE;
|
||||
|
||||
g_object_notify (G_OBJECT (self), "has-clip");
|
||||
g_object_notify (G_OBJECT (self), "clip");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1217,6 +1247,24 @@ clutter_actor_remove_clip (ClutterActor *self)
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||
|
||||
self->priv->has_clip = FALSE;
|
||||
|
||||
g_object_notify (G_OBJECT (self), "has-clip");
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_actor_has_clip:
|
||||
* @self: a #ClutterActor
|
||||
*
|
||||
* Gets whether the actor has a clip set or not.
|
||||
*
|
||||
* Return value: %TRUE if the actor has a clip set.
|
||||
*/
|
||||
gboolean
|
||||
clutter_actor_has_clip (ClutterActor *self)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
|
||||
|
||||
return self->priv->has_clip;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -189,6 +189,7 @@ void clutter_actor_set_clip (ClutterActor *sel
|
||||
gint width,
|
||||
gint height);
|
||||
void clutter_actor_remove_clip (ClutterActor *self);
|
||||
gboolean clutter_actor_has_clip (ClutterActor *self);
|
||||
void clutter_actor_set_parent (ClutterActor *self,
|
||||
ClutterActor *parent);
|
||||
ClutterActor * clutter_actor_get_parent (ClutterActor *self);
|
||||
|
@ -73,6 +73,7 @@ clutter-main
|
||||
@a...:
|
||||
@a...:
|
||||
@a...:
|
||||
@a...:
|
||||
|
||||
|
||||
<!-- ##### MACRO CLUTTER_GLERR ##### -->
|
||||
|
Loading…
Reference in New Issue
Block a user