mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
actor: Add _get_stage_internal to clutter-private.h
This adds _clutter_actor_get_stage_internal to clutter-private.h since we plan to use it in clutter-offscreen-effect when preparing to redirect an actor offscreen.
This commit is contained in:
parent
64088ea4de
commit
ab008948cf
@ -635,8 +635,6 @@ static ClutterGravity clutter_anchor_coord_get_gravity (AnchorCoord *coord);
|
|||||||
static void clutter_anchor_coord_set_gravity (AnchorCoord *coord,
|
static void clutter_anchor_coord_set_gravity (AnchorCoord *coord,
|
||||||
ClutterGravity gravity);
|
ClutterGravity gravity);
|
||||||
|
|
||||||
static ClutterActor *clutter_actor_get_stage_internal (ClutterActor *actor);
|
|
||||||
|
|
||||||
static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord);
|
static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord);
|
||||||
|
|
||||||
/* Helper macro which translates by the anchor coord, applies the
|
/* Helper macro which translates by the anchor coord, applies the
|
||||||
@ -1080,7 +1078,7 @@ clutter_actor_real_unmap (ClutterActor *self)
|
|||||||
{
|
{
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
|
|
||||||
stage = clutter_actor_get_stage_internal (self);
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
if (stage != NULL &&
|
if (stage != NULL &&
|
||||||
clutter_stage_get_key_focus (CLUTTER_STAGE (stage)) == self)
|
clutter_stage_get_key_focus (CLUTTER_STAGE (stage)) == self)
|
||||||
@ -1818,7 +1816,7 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
|
|||||||
*/
|
*/
|
||||||
if (self->priv->propagated_one_redraw)
|
if (self->priv->propagated_one_redraw)
|
||||||
{
|
{
|
||||||
ClutterActor *stage = clutter_actor_get_stage_internal (self);
|
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
if (stage != NULL &&
|
if (stage != NULL &&
|
||||||
_clutter_stage_has_full_redraw_queued (CLUTTER_STAGE (stage)))
|
_clutter_stage_has_full_redraw_queued (CLUTTER_STAGE (stage)))
|
||||||
@ -2191,7 +2189,7 @@ _clutter_actor_ensure_stage_current (ClutterActor *self)
|
|||||||
* Simply duping code for now in wait for Cogl cleanup that can hopefully
|
* Simply duping code for now in wait for Cogl cleanup that can hopefully
|
||||||
* address this in a nicer way.
|
* address this in a nicer way.
|
||||||
*/
|
*/
|
||||||
stage = clutter_actor_get_stage_internal (self);
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
||||||
* return default - ideally the func should fail
|
* return default - ideally the func should fail
|
||||||
@ -2236,7 +2234,7 @@ _clutter_actor_get_relative_modelview (ClutterActor *self,
|
|||||||
|
|
||||||
if (ancestor == NULL)
|
if (ancestor == NULL)
|
||||||
{
|
{
|
||||||
stage = clutter_actor_get_stage_internal (self);
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
clutter_stage_get_perspective (CLUTTER_STAGE (stage), &perspective);
|
clutter_stage_get_perspective (CLUTTER_STAGE (stage), &perspective);
|
||||||
cogl_perspective (perspective.fovy,
|
cogl_perspective (perspective.fovy,
|
||||||
@ -2375,7 +2373,7 @@ clutter_actor_get_allocation_vertices (ClutterActor *self,
|
|||||||
* Simply duping code for now in wait for Cogl cleanup that can hopefully
|
* Simply duping code for now in wait for Cogl cleanup that can hopefully
|
||||||
* address this in a nicer way.
|
* address this in a nicer way.
|
||||||
*/
|
*/
|
||||||
stage = clutter_actor_get_stage_internal (self);
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
||||||
* return default - idealy the func should fail
|
* return default - idealy the func should fail
|
||||||
@ -2456,7 +2454,7 @@ clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
|
|||||||
*/
|
*/
|
||||||
if (priv->needs_allocation)
|
if (priv->needs_allocation)
|
||||||
{
|
{
|
||||||
ClutterActor *stage = clutter_actor_get_stage_internal (self);
|
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
||||||
* return default - idealy the func should fail
|
* return default - idealy the func should fail
|
||||||
@ -2621,7 +2619,7 @@ _clutter_actor_apply_modelview_transform_recursive (ClutterActor *self,
|
|||||||
if (self == ancestor)
|
if (self == ancestor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
stage = clutter_actor_get_stage_internal (self);
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
/* FIXME: if were not yet added to a stage, its probably unsafe to
|
||||||
* return default - idealy the func should fail
|
* return default - idealy the func should fail
|
||||||
@ -5491,7 +5489,7 @@ clutter_actor_get_allocation_box (ClutterActor *self,
|
|||||||
/* this implements 2) */
|
/* this implements 2) */
|
||||||
if (G_UNLIKELY (self->priv->needs_allocation))
|
if (G_UNLIKELY (self->priv->needs_allocation))
|
||||||
{
|
{
|
||||||
ClutterActor *stage = clutter_actor_get_stage_internal (self);
|
ClutterActor *stage = _clutter_actor_get_stage_internal (self);
|
||||||
|
|
||||||
/* do not queue a relayout on an unparented actor */
|
/* do not queue a relayout on an unparented actor */
|
||||||
if (stage)
|
if (stage)
|
||||||
@ -9847,8 +9845,8 @@ clutter_actor_is_scaled (ClutterActor *self)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ClutterActor *
|
ClutterActor *
|
||||||
clutter_actor_get_stage_internal (ClutterActor *actor)
|
_clutter_actor_get_stage_internal (ClutterActor *actor)
|
||||||
{
|
{
|
||||||
while (actor && !CLUTTER_ACTOR_IS_TOPLEVEL (actor))
|
while (actor && !CLUTTER_ACTOR_IS_TOPLEVEL (actor))
|
||||||
actor = actor->priv->parent_actor;
|
actor = actor->priv->parent_actor;
|
||||||
@ -9871,7 +9869,7 @@ clutter_actor_get_stage (ClutterActor *actor)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), NULL);
|
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), NULL);
|
||||||
|
|
||||||
return clutter_actor_get_stage_internal (actor);
|
return _clutter_actor_get_stage_internal (actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10188,7 +10186,7 @@ clutter_actor_grab_key_focus (ClutterActor *self)
|
|||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||||
|
|
||||||
stage = clutter_actor_get_stage_internal (self);
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
if (stage != NULL)
|
if (stage != NULL)
|
||||||
clutter_stage_set_key_focus (CLUTTER_STAGE (stage), self);
|
clutter_stage_set_key_focus (CLUTTER_STAGE (stage), self);
|
||||||
}
|
}
|
||||||
@ -11661,7 +11659,7 @@ clutter_actor_has_key_focus (ClutterActor *self)
|
|||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
|
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
|
||||||
|
|
||||||
stage = clutter_actor_get_stage_internal (self);
|
stage = _clutter_actor_get_stage_internal (self);
|
||||||
if (stage == NULL)
|
if (stage == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -329,6 +329,7 @@ gboolean _clutter_boolean_handled_accumulator (GSignalInvocationHint *ihint,
|
|||||||
const GValue *handler_return,
|
const GValue *handler_return,
|
||||||
gpointer dummy);
|
gpointer dummy);
|
||||||
|
|
||||||
|
ClutterActor *_clutter_actor_get_stage_internal (ClutterActor *actor);
|
||||||
void _clutter_actor_apply_modelview_transform_recursive (ClutterActor *self,
|
void _clutter_actor_apply_modelview_transform_recursive (ClutterActor *self,
|
||||||
ClutterActor *ancestor);
|
ClutterActor *ancestor);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user