[totem] backend: Implement aspect frame in raw clutter



commit 00d564c969db406d8ad173476feed063fc82254f
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 27 12:30:33 2012 +0100

    backend: Implement aspect frame in raw clutter

 src/backend/totem-aspect-frame.c |   15 +++++++++------
 src/backend/totem-aspect-frame.h |    6 +++---
 2 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/src/backend/totem-aspect-frame.c b/src/backend/totem-aspect-frame.c
index 44bedc8..af4eae2 100644
--- a/src/backend/totem-aspect-frame.c
+++ b/src/backend/totem-aspect-frame.c
@@ -24,7 +24,7 @@
 
 #include "totem-aspect-frame.h"
 
-G_DEFINE_TYPE (TotemAspectFrame, totem_aspect_frame, MX_TYPE_BIN)
+G_DEFINE_TYPE (TotemAspectFrame, totem_aspect_frame, CLUTTER_TYPE_ACTOR)
 
 #define ASPECT_FRAME_PRIVATE(o)                         \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o),                    \
@@ -147,7 +147,7 @@ totem_aspect_frame_allocate (ClutterActor           *actor,
   CLUTTER_ACTOR_CLASS (totem_aspect_frame_parent_class)->
     allocate (actor, box, flags);
 
-  child = mx_bin_get_child (MX_BIN (actor));
+  child = clutter_actor_get_child_at_index (actor, 0);
   if (!child)
     return;
 
@@ -180,9 +180,11 @@ totem_aspect_frame_allocate (ClutterActor           *actor,
 static void
 totem_aspect_frame_paint (ClutterActor *actor)
 {
-  ClutterActor *child = mx_bin_get_child (MX_BIN (actor));
+  ClutterActor *child;
   TotemAspectFramePrivate *priv = TOTEM_ASPECT_FRAME (actor)->priv;
 
+  child = clutter_actor_get_child_at_index (actor, 0);
+
   if (!child)
     return;
 
@@ -235,8 +237,7 @@ totem_aspect_frame_pick (ClutterActor       *actor,
                          const ClutterColor *color)
 {
   ClutterActorBox box;
-
-  ClutterActor *child = mx_bin_get_child (MX_BIN (actor));
+  ClutterActor *child;
   TotemAspectFramePrivate *priv = TOTEM_ASPECT_FRAME (actor)->priv;
 
   clutter_actor_get_allocation_box (actor, &box);
@@ -245,6 +246,8 @@ totem_aspect_frame_pick (ClutterActor       *actor,
                             color->blue, color->alpha);
   cogl_rectangle (box.x1, box.y1, box.x2, box.y2);
 
+  child = clutter_actor_get_child_at_index (actor, 0);
+
   if (!child)
     return;
 
@@ -329,5 +332,5 @@ totem_aspect_frame_set_child   (TotemAspectFrame *frame,
 {
   g_return_if_fail (TOTEM_IS_ASPECT_FRAME (frame));
 
-  mx_bin_set_child (MX_BIN (frame), child);
+  clutter_actor_add_child (CLUTTER_ACTOR (frame), child);
 }
diff --git a/src/backend/totem-aspect-frame.h b/src/backend/totem-aspect-frame.h
index 7d9560c..f0e2879 100644
--- a/src/backend/totem-aspect-frame.h
+++ b/src/backend/totem-aspect-frame.h
@@ -25,7 +25,7 @@
 #define __TOTEM_ASPECT_FRAME_H__
 
 #include <glib-object.h>
-#include <mx/mx.h>
+#include <clutter/clutter.h>
 
 G_BEGIN_DECLS
 
@@ -57,14 +57,14 @@ typedef struct _TotemAspectFramePrivate TotemAspectFramePrivate;
 
 struct _TotemAspectFrame
 {
-  MxBin parent;
+  ClutterActor parent;
 
   TotemAspectFramePrivate *priv;
 };
 
 struct _TotemAspectFrameClass
 {
-  MxBinClass parent_class;
+  ClutterActorClass parent_class;
 };
 
 GType           totem_aspect_frame_get_type    (void) G_GNUC_CONST;



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