actor: Put get_accessible() at the end of the class structure
New virtual functions cannot go wherever they want, if we need to preserve the ABI. Also, the coding style should match the rest of ClutterActor and Clutter's own coding style.
This commit is contained in:
parent
b0c0f24bd2
commit
7bf93e3e84
@ -3320,7 +3320,7 @@ clutter_actor_finalize (GObject *object)
|
||||
|
||||
/**
|
||||
* clutter_actor_get_accessible:
|
||||
* @actor: a #ClutterActor
|
||||
* @self: a #ClutterActor
|
||||
*
|
||||
* Returns the accessible object that describes the actor to an
|
||||
* assistive technology.
|
||||
@ -3337,38 +3337,29 @@ clutter_actor_finalize (GObject *object)
|
||||
*
|
||||
* Returns: (transfer none): the #AtkObject associated with @actor
|
||||
*/
|
||||
AtkObject*
|
||||
clutter_actor_get_accessible (ClutterActor *actor)
|
||||
AtkObject *
|
||||
clutter_actor_get_accessible (ClutterActor *self)
|
||||
{
|
||||
ClutterActorClass *klass;
|
||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), NULL);
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), NULL);
|
||||
|
||||
klass = CLUTTER_ACTOR_GET_CLASS (actor);
|
||||
|
||||
g_return_val_if_fail (klass->get_accessible != NULL, NULL);
|
||||
|
||||
return klass->get_accessible (actor);
|
||||
return CLUTTER_ACTOR_GET_CLASS (self)->get_accessible (actor);
|
||||
}
|
||||
|
||||
static AtkObject*
|
||||
static AtkObject *
|
||||
clutter_actor_real_get_accessible (ClutterActor *actor)
|
||||
{
|
||||
AtkObject* accessible;
|
||||
|
||||
accessible = atk_gobject_accessible_for_object (G_OBJECT (actor));
|
||||
|
||||
return accessible;
|
||||
return atk_gobject_accessible_for_object (G_OBJECT (actor));
|
||||
}
|
||||
|
||||
static AtkObject*
|
||||
static AtkObject *
|
||||
_clutter_actor_ref_accessible (AtkImplementor *implementor)
|
||||
{
|
||||
AtkObject *accessible;
|
||||
|
||||
accessible = clutter_actor_get_accessible (CLUTTER_ACTOR (implementor));
|
||||
if (accessible)
|
||||
if (accessible != NULL)
|
||||
g_object_ref (accessible);
|
||||
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -276,9 +276,6 @@ struct _ClutterActorClass
|
||||
void (* apply_transform) (ClutterActor *actor,
|
||||
CoglMatrix *matrix);
|
||||
|
||||
/* accessibility support */
|
||||
AtkObject* (*get_accessible) (ClutterActor *actor);
|
||||
|
||||
/* event signals */
|
||||
gboolean (* event) (ClutterActor *actor,
|
||||
ClutterEvent *event);
|
||||
@ -305,6 +302,9 @@ struct _ClutterActorClass
|
||||
|
||||
void (* queue_relayout) (ClutterActor *actor);
|
||||
|
||||
/* accessibility support */
|
||||
AtkObject * (* get_accessible) (ClutterActor *actor);
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[30];
|
||||
@ -570,7 +570,7 @@ void clutter_actor_pop_internal (ClutterActor *sel
|
||||
|
||||
gboolean clutter_actor_has_allocation (ClutterActor *self);
|
||||
|
||||
AtkObject* clutter_actor_get_accessible (ClutterActor *actor);
|
||||
AtkObject * clutter_actor_get_accessible (ClutterActor *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user