clutter/actor: Add semi-private API to check for transitions
Transitions are used for animating actors when e.g. going from/to fullscreen, and the like. We need to know such things when deciding whether to avoid compositing a window actor, so make add API visible to mutter that checks whether there are any transitions active. https://gitlab.gnome.org/GNOME/mutter/merge_requests/798
This commit is contained in:
parent
5dad87cfb9
commit
bc178b711f
@ -19960,6 +19960,23 @@ clutter_actor_get_transition (ClutterActor *self,
|
||||
return clos->transition;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_actor_has_transitions: (skip)
|
||||
*/
|
||||
gboolean
|
||||
clutter_actor_has_transitions (ClutterActor *self)
|
||||
{
|
||||
const ClutterAnimationInfo *info;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
|
||||
|
||||
info = _clutter_actor_get_animation_info_or_defaults (self);
|
||||
if (info->transitions == NULL)
|
||||
return FALSE;
|
||||
|
||||
return g_hash_table_size (info->transitions) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_actor_save_easing_state:
|
||||
* @self: a #ClutterActor
|
||||
|
@ -60,6 +60,9 @@ void clutter_stage_update_resource_scales (ClutterStage *stage);
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_has_damage (ClutterActor *actor);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_has_transitions (ClutterActor *actor);
|
||||
|
||||
#undef __CLUTTER_H_INSIDE__
|
||||
|
||||
#endif /* __CLUTTER_MUTTER_H__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user