Blame examples/layout-manager.c

Packit 31ecd5
#include <math.h>
Packit 31ecd5
#include <stdlib.h>
Packit 31ecd5
#include <clutter/clutter.h>
Packit 31ecd5
Packit 31ecd5
typedef struct _MultiLayout             MultiLayout;
Packit 31ecd5
typedef struct _MultiLayoutClass        MultiLayoutClass;
Packit 31ecd5
Packit 31ecd5
typedef enum {
Packit 31ecd5
  MULTI_LAYOUT_GRID,
Packit 31ecd5
  MULTI_LAYOUT_CIRCLE
Packit 31ecd5
} MultiLayoutState;
Packit 31ecd5
Packit 31ecd5
struct _MultiLayout
Packit 31ecd5
{
Packit 31ecd5
  ClutterLayoutManager parent_instance;
Packit 31ecd5
Packit 31ecd5
  /* the state of the layout */
Packit 31ecd5
  MultiLayoutState state;
Packit 31ecd5
Packit 31ecd5
  /* spacing between children */
Packit 31ecd5
  float spacing;
Packit 31ecd5
Packit 31ecd5
  /* cell size */
Packit 31ecd5
  float cell_width;
Packit 31ecd5
  float cell_height;
Packit 31ecd5
};
Packit 31ecd5
Packit 31ecd5
struct _MultiLayoutClass
Packit 31ecd5
{
Packit 31ecd5
  ClutterLayoutManagerClass parent_class;
Packit 31ecd5
};
Packit 31ecd5
Packit 31ecd5
GType multi_layout_get_type (void);
Packit 31ecd5
Packit 31ecd5
ClutterLayoutManager *  multi_layout_new                (void);
Packit 31ecd5
void                    multi_layout_set_state          (MultiLayout      *layout,
Packit 31ecd5
                                                         MultiLayoutState  state);
Packit 31ecd5
MultiLayoutState        multi_layout_get_state          (MultiLayout      *layout);
Packit 31ecd5
void                    multi_layout_set_spacing        (MultiLayout      *layout,
Packit 31ecd5
                                                         float             spacing);
Packit 31ecd5
Packit 31ecd5
G_DEFINE_TYPE (MultiLayout, multi_layout, CLUTTER_TYPE_LAYOUT_MANAGER)
Packit 31ecd5
Packit 31ecd5
static void
Packit 31ecd5
multi_layout_get_preferred_width (ClutterLayoutManager *manager,
Packit 31ecd5
                                  ClutterContainer     *container,
Packit 31ecd5
                                  float                 for_height,
Packit 31ecd5
                                  float                *min_width_p,
Packit 31ecd5
                                  float                *nat_width_p)
Packit 31ecd5
{
Packit 31ecd5
  MultiLayout *self = (MultiLayout *) manager;
Packit 31ecd5
  float minimum, natural;
Packit 31ecd5
  float max_natural_width;
Packit 31ecd5
  ClutterActorIter iter;
Packit 31ecd5
  ClutterActor *child;
Packit 31ecd5
  int n_children;
Packit 31ecd5
Packit 31ecd5
  minimum = natural = 0.f;
Packit 31ecd5
  max_natural_width = 0.f;
Packit 31ecd5
  n_children = 0;
Packit 31ecd5
Packit 31ecd5
  clutter_actor_iter_init (&iter, CLUTTER_ACTOR (container));
Packit 31ecd5
  while (clutter_actor_iter_next (&iter, &child))
Packit 31ecd5
    {
Packit 31ecd5
      float child_minimum, child_natural;
Packit 31ecd5
Packit 31ecd5
      if (!clutter_actor_is_visible (child))
Packit 31ecd5
        continue;
Packit 31ecd5
Packit 31ecd5
      clutter_actor_get_preferred_width (child, -1.f,
Packit 31ecd5
                                         &child_minimum,
Packit 31ecd5
                                         &child_natural);
Packit 31ecd5
Packit 31ecd5
      max_natural_width = MAX (max_natural_width, child_natural);
Packit 31ecd5
Packit 31ecd5
      if (self->state == MULTI_LAYOUT_GRID)
Packit 31ecd5
        {
Packit 31ecd5
          minimum += child_minimum;
Packit 31ecd5
          natural += child_natural;
Packit 31ecd5
        }
Packit 31ecd5
      else if (self->state == MULTI_LAYOUT_CIRCLE)
Packit 31ecd5
        {
Packit 31ecd5
          minimum = MAX (minimum, child_minimum);
Packit 31ecd5
          natural = MAX (natural, child_natural);
Packit 31ecd5
        }
Packit 31ecd5
Packit 31ecd5
      n_children += 1;
Packit 31ecd5
    }
Packit 31ecd5
Packit 31ecd5
  self->cell_width = max_natural_width;
Packit 31ecd5
Packit 31ecd5
  minimum += (self->spacing * (n_children - 1));
Packit 31ecd5
  natural += (self->spacing * (n_children - 1));
Packit 31ecd5
Packit 31ecd5
  if (min_width_p != NULL)
Packit 31ecd5
    *min_width_p = minimum;
Packit 31ecd5
Packit 31ecd5
  if (nat_width_p != NULL)
Packit 31ecd5
    *nat_width_p = natural;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static void
Packit 31ecd5
multi_layout_get_preferred_height (ClutterLayoutManager *manager,
Packit 31ecd5
                                   ClutterContainer     *container,
Packit 31ecd5
                                   float                 for_width,
Packit 31ecd5
                                   float                *min_height_p,
Packit 31ecd5
                                   float                *nat_height_p)
Packit 31ecd5
{
Packit 31ecd5
  MultiLayout *self = (MultiLayout *) manager;
Packit 31ecd5
  float minimum, natural;
Packit 31ecd5
  ClutterActorIter iter;
Packit 31ecd5
  ClutterActor *child;
Packit 31ecd5
  int n_children;
Packit 31ecd5
Packit 31ecd5
  minimum = natural = self->spacing * 2.f;
Packit 31ecd5
  n_children = 0;
Packit 31ecd5
Packit 31ecd5
  clutter_actor_iter_init (&iter, CLUTTER_ACTOR (container));
Packit 31ecd5
  while (clutter_actor_iter_next (&iter, &child))
Packit 31ecd5
    {
Packit 31ecd5
      float child_minimum, child_natural;
Packit 31ecd5
Packit 31ecd5
      if (!clutter_actor_is_visible (child))
Packit 31ecd5
        continue;
Packit 31ecd5
Packit 31ecd5
      clutter_actor_get_preferred_height (child, -1.f,
Packit 31ecd5
                                          &child_minimum,
Packit 31ecd5
                                          &child_natural);
Packit 31ecd5
Packit 31ecd5
      minimum = MAX (minimum, child_minimum);
Packit 31ecd5
      natural = MAX (natural, child_natural);
Packit 31ecd5
Packit 31ecd5
      n_children += 1;
Packit 31ecd5
    }
Packit 31ecd5
Packit 31ecd5
  self->cell_height = natural;
Packit 31ecd5
Packit 31ecd5
  minimum += (self->spacing * (n_children - 1));
Packit 31ecd5
  natural += (self->spacing * (n_children - 1));
Packit 31ecd5
Packit 31ecd5
  if (min_height_p != NULL)
Packit 31ecd5
    *min_height_p = minimum;
Packit 31ecd5
Packit 31ecd5
  if (nat_height_p != NULL)
Packit 31ecd5
    *nat_height_p = natural;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static int
Packit 31ecd5
get_items_per_row (MultiLayout *self,
Packit 31ecd5
                   float        for_width)
Packit 31ecd5
{
Packit 31ecd5
  int n_columns;
Packit 31ecd5
Packit 31ecd5
  if (for_width < 0)
Packit 31ecd5
    return 1;
Packit 31ecd5
Packit 31ecd5
  if (self->cell_width <= 0)
Packit 31ecd5
    return 1;
Packit 31ecd5
Packit 31ecd5
  n_columns = (int) ((for_width + self->spacing) / (self->cell_width + self->spacing));
Packit 31ecd5
Packit 31ecd5
  return MAX (n_columns, 1);
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static int
Packit 31ecd5
get_visible_children (ClutterActor *actor)
Packit 31ecd5
{
Packit 31ecd5
  ClutterActorIter iter;
Packit 31ecd5
  ClutterActor *child;
Packit 31ecd5
  int n_visible_children = 0;
Packit 31ecd5
Packit 31ecd5
  clutter_actor_iter_init (&iter, actor);
Packit 31ecd5
  while (clutter_actor_iter_next (&iter, &child))
Packit 31ecd5
    {
Packit 31ecd5
      if (clutter_actor_is_visible (child))
Packit 31ecd5
        n_visible_children += 1;
Packit 31ecd5
    }
Packit 31ecd5
Packit 31ecd5
  return n_visible_children;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static void
Packit 31ecd5
multi_layout_allocate (ClutterLayoutManager   *manager,
Packit 31ecd5
                       ClutterContainer       *container,
Packit 31ecd5
                       const ClutterActorBox  *allocation,
Packit 31ecd5
                       ClutterAllocationFlags  flags)
Packit 31ecd5
{
Packit 31ecd5
  MultiLayout *self = (MultiLayout *) manager;
Packit 31ecd5
  float avail_width, avail_height;
Packit 31ecd5
  float x_offset, y_offset;
Packit 31ecd5
  ClutterActorIter iter;
Packit 31ecd5
  ClutterActor *child;
Packit 31ecd5
  float item_x = 0.f, item_y = 0.f;
Packit 31ecd5
  int n_items, n_items_per_row = 0, item_index;
Packit 31ecd5
  ClutterPoint center = CLUTTER_POINT_INIT_ZERO;
Packit 31ecd5
  double radius = 0, theta = 0;
Packit 31ecd5
Packit 31ecd5
  n_items = get_visible_children (CLUTTER_ACTOR (container));
Packit 31ecd5
  if (n_items == 0)
Packit 31ecd5
    return;
Packit 31ecd5
Packit 31ecd5
  clutter_actor_box_get_origin (allocation, &x_offset, &y_offset);
Packit 31ecd5
  clutter_actor_box_get_size (allocation, &avail_width, &avail_height);
Packit 31ecd5
Packit 31ecd5
  /* ensure we have an updated value of cell_width and cell_height */
Packit 31ecd5
  multi_layout_get_preferred_width (manager, container, avail_width, NULL, NULL);
Packit 31ecd5
  multi_layout_get_preferred_height (manager, container, avail_height, NULL, NULL);
Packit 31ecd5
Packit 31ecd5
  item_index = 0;
Packit 31ecd5
Packit 31ecd5
  if (self->state == MULTI_LAYOUT_GRID)
Packit 31ecd5
    {
Packit 31ecd5
      n_items_per_row = get_items_per_row (self, avail_width);
Packit 31ecd5
      item_x = x_offset;
Packit 31ecd5
      item_y = y_offset;
Packit 31ecd5
    }
Packit 31ecd5
  else if (self->state == MULTI_LAYOUT_CIRCLE)
Packit 31ecd5
    {
Packit 31ecd5
      center.x = allocation->x2 / 2.f;
Packit 31ecd5
      center.y = allocation->y2 / 2.f;
Packit 31ecd5
      radius = MIN ((avail_width - self->cell_width) / 2.0,
Packit 31ecd5
                    (avail_height - self->cell_height) / 2.0);
Packit 31ecd5
    }
Packit 31ecd5
Packit 31ecd5
  clutter_actor_iter_init (&iter, CLUTTER_ACTOR (container));
Packit 31ecd5
  while (clutter_actor_iter_next (&iter, &child))
Packit 31ecd5
    {
Packit 31ecd5
      ClutterActorBox child_allocation = CLUTTER_ACTOR_BOX_INIT_ZERO;
Packit 31ecd5
Packit 31ecd5
      if (!clutter_actor_is_visible (child))
Packit 31ecd5
        continue;
Packit 31ecd5
Packit 31ecd5
      if (self->state == MULTI_LAYOUT_GRID)
Packit 31ecd5
        {
Packit 31ecd5
          if (item_index == n_items_per_row)
Packit 31ecd5
            {
Packit 31ecd5
              item_index = 0;
Packit 31ecd5
              item_x = x_offset;
Packit 31ecd5
              item_y += self->cell_height + self->spacing;
Packit 31ecd5
            }
Packit 31ecd5
Packit 31ecd5
          child_allocation.x1 = item_x;
Packit 31ecd5
          child_allocation.y1 = item_y;
Packit 31ecd5
          child_allocation.x2 = child_allocation.x1 + self->cell_width;
Packit 31ecd5
          child_allocation.y2 = child_allocation.y1 + self->cell_height;
Packit 31ecd5
Packit 31ecd5
          item_x += self->cell_width + self->spacing;
Packit 31ecd5
        }
Packit 31ecd5
      else if (self->state == MULTI_LAYOUT_CIRCLE)
Packit 31ecd5
        {
Packit 31ecd5
          theta = 2.0 * G_PI / n_items * item_index;
Packit 31ecd5
          child_allocation.x1 = center.x + radius * sinf (theta) - (self->cell_width / 2.f);
Packit 31ecd5
          child_allocation.y1 = center.y + radius * -cosf (theta) - (self->cell_height / 2.f);
Packit 31ecd5
          child_allocation.x2 = child_allocation.x1 + self->cell_width;
Packit 31ecd5
          child_allocation.y2 = child_allocation.y1 + self->cell_height;
Packit 31ecd5
        }
Packit 31ecd5
Packit 31ecd5
      clutter_actor_allocate (child, &child_allocation, flags);
Packit 31ecd5
Packit 31ecd5
      item_index += 1;
Packit 31ecd5
    }
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static void
Packit 31ecd5
multi_layout_class_init (MultiLayoutClass *klass)
Packit 31ecd5
{
Packit 31ecd5
  ClutterLayoutManagerClass *manager_class = CLUTTER_LAYOUT_MANAGER_CLASS (klass);
Packit 31ecd5
Packit 31ecd5
  manager_class->get_preferred_width = multi_layout_get_preferred_width;
Packit 31ecd5
  manager_class->get_preferred_height = multi_layout_get_preferred_height;
Packit 31ecd5
  manager_class->allocate = multi_layout_allocate;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static void
Packit 31ecd5
multi_layout_init (MultiLayout *self)
Packit 31ecd5
{
Packit 31ecd5
  self->state = MULTI_LAYOUT_GRID;
Packit 31ecd5
Packit 31ecd5
  self->cell_width = -1.f;
Packit 31ecd5
  self->cell_height = -1.f;
Packit 31ecd5
Packit 31ecd5
  self->spacing = 0.f;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
ClutterLayoutManager *
Packit 31ecd5
multi_layout_new (void)
Packit 31ecd5
{
Packit 31ecd5
  return g_object_new (multi_layout_get_type (), NULL);
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
void
Packit 31ecd5
multi_layout_set_state (MultiLayout *self,
Packit 31ecd5
                        MultiLayoutState  state)
Packit 31ecd5
{
Packit 31ecd5
  if (self->state == state)
Packit 31ecd5
    return;
Packit 31ecd5
Packit 31ecd5
  self->state = state;
Packit 31ecd5
Packit 31ecd5
  clutter_layout_manager_layout_changed (CLUTTER_LAYOUT_MANAGER (self));
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
MultiLayoutState
Packit 31ecd5
multi_layout_get_state (MultiLayout *self)
Packit 31ecd5
{
Packit 31ecd5
  return self->state;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
void
Packit 31ecd5
multi_layout_set_spacing (MultiLayout *self,
Packit 31ecd5
                          float spacing)
Packit 31ecd5
{
Packit 31ecd5
  self->spacing = spacing;
Packit 31ecd5
Packit 31ecd5
  clutter_layout_manager_layout_changed (CLUTTER_LAYOUT_MANAGER (self));
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
#define N_RECTS         16
Packit 31ecd5
#define RECT_SIZE       64.0
Packit 31ecd5
#define N_ROWS          4
Packit 31ecd5
#define PADDING         12.0
Packit 31ecd5
#define BOX_SIZE        (RECT_SIZE * (N_RECTS / N_ROWS) + PADDING * (N_RECTS / N_ROWS - 1))
Packit 31ecd5
Packit 31ecd5
static gboolean
Packit 31ecd5
on_enter (ClutterActor *rect,
Packit 31ecd5
          ClutterEvent *event)
Packit 31ecd5
{
Packit 31ecd5
  clutter_actor_set_scale (rect, 1.2, 1.2);
Packit 31ecd5
Packit 31ecd5
  return CLUTTER_EVENT_STOP;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static gboolean
Packit 31ecd5
on_leave (ClutterActor *rect,
Packit 31ecd5
          ClutterEvent *event)
Packit 31ecd5
{
Packit 31ecd5
  clutter_actor_set_scale (rect, 1.0, 1.0);
Packit 31ecd5
Packit 31ecd5
  return CLUTTER_EVENT_STOP;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
static gboolean
Packit 31ecd5
on_key_press (ClutterActor *stage,
Packit 31ecd5
              ClutterEvent *event,
Packit 31ecd5
              ClutterActor *box)
Packit 31ecd5
{
Packit 31ecd5
  guint keysym = clutter_event_get_key_symbol (event);
Packit 31ecd5
  MultiLayout *layout = (MultiLayout *) clutter_actor_get_layout_manager (box);
Packit 31ecd5
Packit 31ecd5
Packit 31ecd5
  switch (keysym)
Packit 31ecd5
    {
Packit 31ecd5
    case CLUTTER_KEY_q:
Packit 31ecd5
      clutter_main_quit ();
Packit 31ecd5
      break;
Packit 31ecd5
Packit 31ecd5
    case CLUTTER_KEY_t:
Packit 31ecd5
      {
Packit 31ecd5
        MultiLayoutState state = multi_layout_get_state (layout);
Packit 31ecd5
Packit 31ecd5
        if (state == MULTI_LAYOUT_GRID)
Packit 31ecd5
          multi_layout_set_state (layout, MULTI_LAYOUT_CIRCLE);
Packit 31ecd5
Packit 31ecd5
        if (state == MULTI_LAYOUT_CIRCLE)
Packit 31ecd5
          multi_layout_set_state (layout, MULTI_LAYOUT_GRID);
Packit 31ecd5
      }
Packit 31ecd5
      break;
Packit 31ecd5
Packit 31ecd5
    default:
Packit 31ecd5
      break;
Packit 31ecd5
    }
Packit 31ecd5
Packit 31ecd5
  return CLUTTER_EVENT_STOP;
Packit 31ecd5
}
Packit 31ecd5
Packit 31ecd5
int
Packit 31ecd5
main (int argc, char *argv[])
Packit 31ecd5
{
Packit 31ecd5
  ClutterActor *stage, *box, *label;
Packit 31ecd5
  ClutterLayoutManager *manager;
Packit 31ecd5
  ClutterMargin margin;
Packit 31ecd5
  ClutterTransition *transition;
Packit 31ecd5
  int i;
Packit 31ecd5
Packit 31ecd5
  if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
Packit 31ecd5
    return EXIT_FAILURE;
Packit 31ecd5
Packit 31ecd5
  stage = clutter_stage_new ();
Packit 31ecd5
  clutter_stage_set_title (CLUTTER_STAGE (stage), "Multi-layout");
Packit 31ecd5
  g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
Packit 31ecd5
  clutter_actor_show (stage);
Packit 31ecd5
Packit 31ecd5
  /* the layout manager for the main container */
Packit 31ecd5
  manager = multi_layout_new ();
Packit 31ecd5
  multi_layout_set_spacing ((MultiLayout *) manager, PADDING);
Packit 31ecd5
Packit 31ecd5
  margin.top = margin.bottom = margin.left = margin.right = PADDING;
Packit 31ecd5
Packit 31ecd5
  /* our main container, centered on the stage */
Packit 31ecd5
  box = clutter_actor_new ();
Packit 31ecd5
  clutter_actor_set_margin (box, &margin);
Packit 31ecd5
  clutter_actor_set_layout_manager (box, manager);
Packit 31ecd5
  clutter_actor_set_size (box, BOX_SIZE, BOX_SIZE);
Packit 31ecd5
  clutter_actor_add_constraint (box, clutter_align_constraint_new (stage, CLUTTER_ALIGN_BOTH, 0.5));
Packit 31ecd5
  clutter_actor_add_child (stage, box);
Packit 31ecd5
Packit 31ecd5
  for (i = 0; i < N_RECTS; i++)
Packit 31ecd5
    {
Packit 31ecd5
      ClutterActor *rect = clutter_actor_new ();
Packit 31ecd5
      ClutterColor color;
Packit 31ecd5
Packit 31ecd5
      clutter_color_from_hls (&color,
Packit 31ecd5
                              360.0 / N_RECTS * i,
Packit 31ecd5
                              0.5,
Packit 31ecd5
                              0.8);
Packit 31ecd5
Packit 31ecd5
      color.alpha = 128 + 128 / N_RECTS * i;
Packit 31ecd5
Packit 31ecd5
      /* elements on the layout */
Packit 31ecd5
      clutter_actor_set_size (rect, RECT_SIZE, RECT_SIZE);
Packit 31ecd5
      clutter_actor_set_pivot_point (rect, .5f, .5f);
Packit 31ecd5
      clutter_actor_set_background_color (rect, &color;;
Packit 31ecd5
      clutter_actor_set_opacity (rect, 0);
Packit 31ecd5
      clutter_actor_set_reactive (rect, TRUE);
Packit 31ecd5
Packit 31ecd5
      /* explicit transition that fades in the element; the delay on
Packit 31ecd5
       * the transition staggers the fade depending on the index
Packit 31ecd5
       */
Packit 31ecd5
      transition = clutter_property_transition_new ("opacity");
Packit 31ecd5
      clutter_timeline_set_duration (CLUTTER_TIMELINE (transition), 250);
Packit 31ecd5
      clutter_timeline_set_delay (CLUTTER_TIMELINE (transition), i * 50);
Packit 31ecd5
      clutter_transition_set_from (transition, G_TYPE_UINT, 0);
Packit 31ecd5
      clutter_transition_set_to (transition, G_TYPE_UINT, 255);
Packit 31ecd5
      clutter_actor_add_transition (rect, "fadeIn", transition);
Packit 31ecd5
      g_object_unref (transition);
Packit 31ecd5
Packit 31ecd5
      /* we want all state transitions to be animated */
Packit 31ecd5
      clutter_actor_set_easing_duration (rect, 250);
Packit 31ecd5
      clutter_actor_set_easing_mode (rect, CLUTTER_EASE_OUT_CUBIC);
Packit 31ecd5
Packit 31ecd5
      clutter_actor_add_child (box, rect);
Packit 31ecd5
Packit 31ecd5
      /* simple hover effect */
Packit 31ecd5
      g_signal_connect (rect, "enter-event", G_CALLBACK (on_enter), NULL);
Packit 31ecd5
      g_signal_connect (rect, "leave-event", G_CALLBACK (on_leave), NULL);
Packit 31ecd5
    }
Packit 31ecd5
Packit 31ecd5
  label = clutter_text_new ();
Packit 31ecd5
  clutter_text_set_text (CLUTTER_TEXT (label),
Packit 31ecd5
                         "Press t\t\342\236\236\tToggle layout\n"
Packit 31ecd5
                         "Press q\t\342\236\236\tQuit");
Packit 31ecd5
  clutter_actor_add_constraint (label, clutter_align_constraint_new (stage, CLUTTER_ALIGN_X_AXIS, 0.5));
Packit 31ecd5
  clutter_actor_add_constraint (label, clutter_align_constraint_new (stage, CLUTTER_ALIGN_Y_AXIS, 0.95));
Packit 31ecd5
  clutter_actor_add_child (stage, label);
Packit 31ecd5
Packit 31ecd5
  g_signal_connect (stage, "key-press-event", G_CALLBACK (on_key_press), box);
Packit 31ecd5
Packit 31ecd5
  clutter_main ();
Packit 31ecd5
Packit 31ecd5
  return EXIT_SUCCESS;
Packit 31ecd5
}