[clutter/wip/expand-flags: 2/7] actor: Add private get_effective_x_align() method



commit ec9ace6d030784cb079521b4c98c4e3b82bbd9fc
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Mar 29 16:33:53 2012 +0100

    actor: Add private get_effective_x_align() method
    
    A method to retrieve the effective horizontal alignment of the actor,
    taking into consideration the text direction.

 clutter/clutter-actor-private.h |    2 ++
 clutter/clutter-actor.c         |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-actor-private.h b/clutter/clutter-actor-private.h
index 86032d9..cbeccdd 100644
--- a/clutter/clutter-actor-private.h
+++ b/clutter/clutter-actor-private.h
@@ -299,6 +299,8 @@ void    _clutter_actor_shader_pre_paint         (ClutterActor *actor,
                                                  gboolean      repeat);
 void    _clutter_actor_shader_post_paint        (ClutterActor *actor);
 
+ClutterActorAlign       _clutter_actor_get_effective_x_align    (ClutterActor *self);
+
 G_END_DECLS
 
 #endif /* __CLUTTER_ACTOR_PRIVATE_H__ */
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index abc0866..5fca3e1 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -7837,6 +7837,22 @@ effective_align (ClutterActorAlign    align,
   return res;
 }
 
+/*< private >
+ * _clutter_actor_get_effective_x_align:
+ * @self: a #ClutterActor
+ *
+ * Retrieves the effective horizontal alignment, taking into
+ * consideration the text direction of @self.
+ *
+ * Return value: the effective horizontal alignment
+ */
+ClutterActorAlign
+_clutter_actor_get_effective_x_align (ClutterActor *self)
+{
+  return effective_align (clutter_actor_get_x_align (self),
+                          clutter_actor_get_text_direction (self));
+}
+
 static inline void
 adjust_for_margin (float  margin_start,
                    float  margin_end,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]