mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
stage: Add accessors for :use-alpha
Use real accessors for the :use-alpha property.
This commit is contained in:
parent
3b075b6dc4
commit
1208e47198
@ -669,8 +669,7 @@ clutter_stage_set_property (GObject *object,
|
||||
break;
|
||||
|
||||
case PROP_USE_ALPHA:
|
||||
stage->priv->use_alpha = g_value_get_boolean (value);
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
|
||||
clutter_stage_set_use_alpha (stage, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -2164,3 +2163,53 @@ clutter_stage_get_throttle_motion_events (ClutterStage *stage)
|
||||
|
||||
return stage->priv->throttle_motion_events;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_stage_set_use_alpha:
|
||||
* @stage: a #ClutterStage
|
||||
* @use_alpha: whether the stage should honour the opacity or the
|
||||
* alpha channel of the stage color
|
||||
*
|
||||
* Sets whether the @stage should honour the #ClutterActor:opacity and
|
||||
* the alpha channel of the #ClutterStage:color
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
void
|
||||
clutter_stage_set_use_alpha (ClutterStage *stage,
|
||||
gboolean use_alpha)
|
||||
{
|
||||
ClutterStagePrivate *priv;
|
||||
|
||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||
|
||||
priv = stage->priv;
|
||||
|
||||
if (priv->use_alpha != use_alpha)
|
||||
{
|
||||
priv->use_alpha = use_alpha;
|
||||
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
|
||||
|
||||
g_object_notify (G_OBJECT (stage), "use-alpha");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_stage_get_use_alpha:
|
||||
* @stage: a #ClutterStage
|
||||
*
|
||||
* Retrieves the value set using clutter_stage_set_use_alpha()
|
||||
*
|
||||
* Return value: %TRUE if the stage should honour the opacity and the
|
||||
* alpha channel of the stage color
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
gboolean
|
||||
clutter_stage_get_use_alpha (ClutterStage *stage)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
|
||||
|
||||
return stage->priv->use_alpha;
|
||||
}
|
||||
|
@ -247,6 +247,10 @@ void clutter_stage_set_throttle_motion_events (ClutterStage *stage,
|
||||
gboolean throttle);
|
||||
gboolean clutter_stage_get_throttle_motion_events (ClutterStage *stage);
|
||||
|
||||
void clutter_stage_set_use_alpha (ClutterStage *stage,
|
||||
gboolean use_alpha);
|
||||
gboolean clutter_stage_get_use_alpha (ClutterStage *stage);
|
||||
|
||||
/* Commodity macro, for mallum only */
|
||||
#define clutter_stage_add(stage,actor) G_STMT_START { \
|
||||
if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \
|
||||
|
@ -522,6 +522,8 @@ clutter_stage_get_key_focus
|
||||
clutter_stage_read_pixels
|
||||
clutter_stage_set_throttle_motion_events
|
||||
clutter_stage_get_throttle_motion_events
|
||||
clutter_stage_set_use_alpha
|
||||
clutter_stage_get_use_alpha
|
||||
|
||||
<SUBSECTION>
|
||||
ClutterPerspective
|
||||
|
Loading…
Reference in New Issue
Block a user