Logo Search packages:      
Sourcecode: unity version File versions  Download package

application-place.c

/* application-place.c generated by valac, the Vala compiler
 * generated from application-place.vala, do not modify */

/*
 * Copyright (C) 2010 Canonical Ltd
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by Jay Taoko <jay.taoko@canonical.com>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <clutk/clutk.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <clutter/clutter.h>
#include <pango/pango.h>
#include <gee.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>


#define UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON (unity_places_application_application_icon_get_type ())
#define UNITY_PLACES_APPLICATION_APPLICATION_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON, UnityPlacesApplicationApplicationIcon))
#define UNITY_PLACES_APPLICATION_APPLICATION_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON, UnityPlacesApplicationApplicationIconClass))
#define UNITY_PLACES_APPLICATION_IS_APPLICATION_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON))
#define UNITY_PLACES_APPLICATION_IS_APPLICATION_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON))
#define UNITY_PLACES_APPLICATION_APPLICATION_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON, UnityPlacesApplicationApplicationIconClass))

typedef struct _UnityPlacesApplicationApplicationIcon UnityPlacesApplicationApplicationIcon;
typedef struct _UnityPlacesApplicationApplicationIconClass UnityPlacesApplicationApplicationIconClass;
typedef struct _UnityPlacesApplicationApplicationIconPrivate UnityPlacesApplicationApplicationIconPrivate;

#define UNITY_PLACES_BAR_TYPE_MODEL (unity_places_bar_model_get_type ())
#define UNITY_PLACES_BAR_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_BAR_TYPE_MODEL, UnityPlacesBarModel))
#define UNITY_PLACES_BAR_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_BAR_TYPE_MODEL, UnityPlacesBarModelClass))
#define UNITY_PLACES_BAR_IS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_BAR_TYPE_MODEL))
#define UNITY_PLACES_BAR_IS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_BAR_TYPE_MODEL))
#define UNITY_PLACES_BAR_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_BAR_TYPE_MODEL, UnityPlacesBarModelClass))

typedef struct _UnityPlacesBarModel UnityPlacesBarModel;
typedef struct _UnityPlacesBarModelClass UnityPlacesBarModelClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _gtk_icon_info_free0(var) ((var == NULL) ? NULL : (var = (gtk_icon_info_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _UnityPlacesApplicationParamSpecApplicationIcon UnityPlacesApplicationParamSpecApplicationIcon;

#define UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP (unity_places_application_application_group_get_type ())
#define UNITY_PLACES_APPLICATION_APPLICATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP, UnityPlacesApplicationApplicationGroup))
#define UNITY_PLACES_APPLICATION_APPLICATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP, UnityPlacesApplicationApplicationGroupClass))
#define UNITY_PLACES_APPLICATION_IS_APPLICATION_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP))
#define UNITY_PLACES_APPLICATION_IS_APPLICATION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP))
#define UNITY_PLACES_APPLICATION_APPLICATION_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP, UnityPlacesApplicationApplicationGroupClass))

typedef struct _UnityPlacesApplicationApplicationGroup UnityPlacesApplicationApplicationGroup;
typedef struct _UnityPlacesApplicationApplicationGroupClass UnityPlacesApplicationApplicationGroupClass;
typedef struct _UnityPlacesApplicationApplicationGroupPrivate UnityPlacesApplicationApplicationGroupPrivate;

#define UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR (unity_places_cairo_drawing_places_hseparator_get_type ())
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR, UnityPlacesCairoDrawingPlacesHSeparator))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR, UnityPlacesCairoDrawingPlacesHSeparatorClass))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR, UnityPlacesCairoDrawingPlacesHSeparatorClass))

typedef struct _UnityPlacesCairoDrawingPlacesHSeparator UnityPlacesCairoDrawingPlacesHSeparator;
typedef struct _UnityPlacesCairoDrawingPlacesHSeparatorClass UnityPlacesCairoDrawingPlacesHSeparatorClass;
#define _unity_places_application_application_icon_unref0(var) ((var == NULL) ? NULL : (var = (unity_places_application_application_icon_unref (var), NULL)))
typedef struct _UnityPlacesCairoDrawingPlacesHSeparatorPrivate UnityPlacesCairoDrawingPlacesHSeparatorPrivate;

#define UNITY_PLACES_APPLICATION_TYPE_APPLICATION_VIEW (unity_places_application_application_view_get_type ())
#define UNITY_PLACES_APPLICATION_APPLICATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_VIEW, UnityPlacesApplicationApplicationView))
#define UNITY_PLACES_APPLICATION_APPLICATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_VIEW, UnityPlacesApplicationApplicationViewClass))
#define UNITY_PLACES_APPLICATION_IS_APPLICATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_VIEW))
#define UNITY_PLACES_APPLICATION_IS_APPLICATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_VIEW))
#define UNITY_PLACES_APPLICATION_APPLICATION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_VIEW, UnityPlacesApplicationApplicationViewClass))

typedef struct _UnityPlacesApplicationApplicationView UnityPlacesApplicationApplicationView;
typedef struct _UnityPlacesApplicationApplicationViewClass UnityPlacesApplicationApplicationViewClass;
typedef struct _UnityPlacesApplicationApplicationViewPrivate UnityPlacesApplicationApplicationViewPrivate;

struct _UnityPlacesApplicationApplicationIcon {
      GTypeInstance parent_instance;
      volatile int ref_count;
      UnityPlacesApplicationApplicationIconPrivate * priv;
      CtkImage* view;
      CtkText* label;
};

struct _UnityPlacesApplicationApplicationIconClass {
      GTypeClass parent_class;
      void (*finalize) (UnityPlacesApplicationApplicationIcon *self);
};

struct _UnityPlacesApplicationApplicationIconPrivate {
      UnityPlacesBarModel* model;
};

struct _UnityPlacesApplicationParamSpecApplicationIcon {
      GParamSpec parent_instance;
};

struct _UnityPlacesApplicationApplicationGroup {
      CtkBox parent_instance;
      UnityPlacesApplicationApplicationGroupPrivate * priv;
      gint n_items;
};

struct _UnityPlacesApplicationApplicationGroupClass {
      CtkBoxClass parent_class;
};

struct _UnityPlacesApplicationApplicationGroupPrivate {
      CtkText* GroupName;
      CtkImage* Star;
      UnityPlacesCairoDrawingPlacesHSeparator* Separator;
      CtkImage* maximize_button;
      CtkImage* minimize_button;
      gboolean is_open;
      GeeArrayList* application_icon_array;
};

struct _UnityPlacesCairoDrawingPlacesHSeparator {
      CtkBin parent_instance;
      UnityPlacesCairoDrawingPlacesHSeparatorPrivate * priv;
      gint Width;
      gint Height;
      ClutterCairoTexture* cairotxt;
};

struct _UnityPlacesCairoDrawingPlacesHSeparatorClass {
      CtkBinClass parent_class;
};

struct _UnityPlacesApplicationApplicationView {
      CtkBox parent_instance;
      UnityPlacesApplicationApplicationViewPrivate * priv;
      UnityPlacesApplicationApplicationGroup* recent_app_group;
      UnityPlacesApplicationApplicationGroup* yesterday_app_group;
      UnityPlacesApplicationApplicationGroup* lastweek_app_group;
};

struct _UnityPlacesApplicationApplicationViewClass {
      CtkBoxClass parent_class;
};


static gpointer unity_places_application_application_icon_parent_class = NULL;
static gpointer unity_places_application_application_group_parent_class = NULL;
static gpointer unity_places_application_application_view_parent_class = NULL;

#define UNITY_PLACES_APPLICATION_APP_ICON PKGDATADIR "/applications.png"
#define UNITY_PLACES_APPLICATION_FAVOURITES_ICON PKGDATADIR "/favourites.png"
#define UNITY_PLACES_APPLICATION_MINIMIZE_ICON PKGDATADIR "/minimize_up.png"
#define UNITY_PLACES_APPLICATION_MAXIMIZE_ICON PKGDATADIR "/maximize_up.png"
gpointer unity_places_application_application_icon_ref (gpointer instance);
void unity_places_application_application_icon_unref (gpointer instance);
GParamSpec* unity_places_application_param_spec_application_icon (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void unity_places_application_value_set_application_icon (GValue* value, gpointer v_object);
void unity_places_application_value_take_application_icon (GValue* value, gpointer v_object);
gpointer unity_places_application_value_get_application_icon (const GValue* value);
GType unity_places_application_application_icon_get_type (void);
GType unity_places_bar_model_get_type (void);
#define UNITY_PLACES_APPLICATION_APPLICATION_ICON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON, UnityPlacesApplicationApplicationIconPrivate))
enum  {
      UNITY_PLACES_APPLICATION_APPLICATION_ICON_DUMMY_PROPERTY
};
UnityPlacesBarModel* unity_places_bar_model_new (const char* name, const char* icon_name, const char* tooltip);
UnityPlacesBarModel* unity_places_bar_model_construct (GType object_type, const char* name, const char* icon_name, const char* tooltip);
UnityPlacesApplicationApplicationIcon* unity_places_application_application_icon_new (gint width, const char* name, const char* icon_name, const char* tooltip);
UnityPlacesApplicationApplicationIcon* unity_places_application_application_icon_construct (GType object_type, gint width, const char* name, const char* icon_name, const char* tooltip);
static void unity_places_application_application_icon_finalize (UnityPlacesApplicationApplicationIcon* obj);
GType unity_places_application_application_group_get_type (void);
GType unity_places_cairo_drawing_places_hseparator_get_type (void);
#define UNITY_PLACES_APPLICATION_APPLICATION_GROUP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP, UnityPlacesApplicationApplicationGroupPrivate))
enum  {
      UNITY_PLACES_APPLICATION_APPLICATION_GROUP_DUMMY_PROPERTY
};
void unity_places_cairo_drawing_places_hseparator_CreateSeparator (UnityPlacesCairoDrawingPlacesHSeparator* self, gint W, gint H);
static void unity_places_application_application_group_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags);
static void unity_places_application_application_group_real_get_preferred_width (ClutterActor* base, float for_height, float* minimum_width, float* natural_width);
static void unity_places_application_application_group_real_get_preferred_height (ClutterActor* base, float for_width, float* minimum_height, float* natural_height);
UnityPlacesCairoDrawingPlacesHSeparator* unity_places_cairo_drawing_places_hseparator_new (void);
UnityPlacesCairoDrawingPlacesHSeparator* unity_places_cairo_drawing_places_hseparator_construct (GType object_type);
gboolean unity_places_application_application_group_on_maximize (UnityPlacesApplicationApplicationGroup* self, ClutterEvent* event);
static gboolean _unity_places_application_application_group_on_maximize_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
gboolean unity_places_application_application_group_on_minimize (UnityPlacesApplicationApplicationGroup* self, ClutterEvent* event);
static gboolean _unity_places_application_application_group_on_minimize_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
UnityPlacesApplicationApplicationGroup* unity_places_application_application_group_new (const char* group_name);
UnityPlacesApplicationApplicationGroup* unity_places_application_application_group_construct (GType object_type, const char* group_name);
void unity_places_application_application_group_add_icon (UnityPlacesApplicationApplicationGroup* self, UnityPlacesApplicationApplicationIcon* app);
static GObject * unity_places_application_application_group_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_application_application_group_finalize (GObject* obj);
GType unity_places_application_application_view_get_type (void);
enum  {
      UNITY_PLACES_APPLICATION_APPLICATION_VIEW_DUMMY_PROPERTY
};
static void unity_places_application_application_view_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags);
UnityPlacesApplicationApplicationView* unity_places_application_application_view_new (void);
UnityPlacesApplicationApplicationView* unity_places_application_application_view_construct (GType object_type);
static GObject * unity_places_application_application_view_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_application_application_view_finalize (GObject* obj);



static gpointer _g_object_ref0 (gpointer self) {
      return self ? g_object_ref (self) : NULL;
}


static const char* string_to_string (const char* self) {
      const char* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      result = self;
      return result;
}


UnityPlacesApplicationApplicationIcon* unity_places_application_application_icon_construct (GType object_type, gint width, const char* name, const char* icon_name, const char* tooltip) {
      GError * _inner_error_;
      UnityPlacesApplicationApplicationIcon* self;
      UnityPlacesBarModel* _tmp0_;
      CtkText* _tmp10_;
      g_return_val_if_fail (name != NULL, NULL);
      g_return_val_if_fail (icon_name != NULL, NULL);
      g_return_val_if_fail (tooltip != NULL, NULL);
      _inner_error_ = NULL;
      self = (UnityPlacesApplicationApplicationIcon*) g_type_create_instance (object_type);
      self->priv->model = (_tmp0_ = unity_places_bar_model_new (name, icon_name, tooltip), _g_object_unref0 (self->priv->model), _tmp0_);
      if (g_utf8_get_char (g_utf8_offset_to_pointer (icon_name, 0)) == '/') {
            CtkImage* _tmp1_;
            self->view = (_tmp1_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) width, icon_name)), _g_object_unref0 (self->view), _tmp1_);
      } else {
            if (g_utf8_get_char (g_utf8_offset_to_pointer (icon_name, -4)) == '.') {
                  CtkImage* _tmp3_;
                  char* _tmp2_;
                  self->view = (_tmp3_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) width, _tmp2_ = g_strconcat ("/usr/share/pixmaps/", icon_name, NULL))), _g_object_unref0 (self->view), _tmp3_);
                  _g_free0 (_tmp2_);
            } else {
                  if (g_utf8_get_char (g_utf8_offset_to_pointer (icon_name, 0)) == '.') {
                        GIcon* icon;
                        icon = NULL;
                        {
                              GIcon* _tmp4_;
                              GIcon* _tmp5_;
                              GtkIconInfo* info;
                              _tmp4_ = g_icon_new_for_string (icon_name, &_inner_error_);
                              if (_inner_error_ != NULL) {
                                    goto __catch6_g_error;
                              }
                              icon = (_tmp5_ = _g_object_ref0 (_tmp4_), _g_object_unref0 (icon), _tmp5_);
                              info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (), icon, 48, 0);
                              if (info != NULL) {
                                    CtkImage* _tmp6_;
                                    self->view = (_tmp6_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) width, gtk_icon_info_get_filename (info))), _g_object_unref0 (self->view), _tmp6_);
                              } else {
                                    CtkImage* _tmp7_;
                                    self->view = (_tmp7_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_stock ((guint) width, icon_name)), _g_object_unref0 (self->view), _tmp7_);
                              }
                              if (self->view == NULL) {
                                    char* _tmp8_;
                                    g_warning ("application-place.vala:56: %s", _tmp8_ = g_strconcat ("Failed to load icon for ", string_to_string (icon_name), NULL));
                                    _g_free0 (_tmp8_);
                              }
                              _gtk_icon_info_free0 (info);
                        }
                        goto __finally6;
                        __catch6_g_error:
                        {
                              GError * _error_;
                              _error_ = _inner_error_;
                              _inner_error_ = NULL;
                              {
                                    g_warning ("application-place.vala:60: Failed to load icon: %s", _error_->message);
                                    _g_error_free0 (_error_);
                              }
                        }
                        __finally6:
                        if (_inner_error_ != NULL) {
                              _g_object_unref0 (icon);
                              g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
                              g_clear_error (&_inner_error_);
                              return NULL;
                        }
                        _g_object_unref0 (icon);
                  } else {
                        CtkImage* _tmp9_;
                        self->view = (_tmp9_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_stock ((guint) width, icon_name)), _g_object_unref0 (self->view), _tmp9_);
                  }
            }
      }
      clutter_actor_set_reactive ((ClutterActor*) self->view, TRUE);
      self->label = (_tmp10_ = g_object_ref_sink ((CtkText*) ctk_text_new (name)), _g_object_unref0 (self->label), _tmp10_);
      clutter_text_set_line_wrap ((ClutterText*) self->label, TRUE);
      clutter_text_set_line_alignment ((ClutterText*) self->label, PANGO_ALIGN_CENTER);
      return self;
}


UnityPlacesApplicationApplicationIcon* unity_places_application_application_icon_new (gint width, const char* name, const char* icon_name, const char* tooltip) {
      return unity_places_application_application_icon_construct (UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON, width, name, icon_name, tooltip);
}


static void unity_places_application_value_application_icon_init (GValue* value) {
      value->data[0].v_pointer = NULL;
}


static void unity_places_application_value_application_icon_free_value (GValue* value) {
      if (value->data[0].v_pointer) {
            unity_places_application_application_icon_unref (value->data[0].v_pointer);
      }
}


static void unity_places_application_value_application_icon_copy_value (const GValue* src_value, GValue* dest_value) {
      if (src_value->data[0].v_pointer) {
            dest_value->data[0].v_pointer = unity_places_application_application_icon_ref (src_value->data[0].v_pointer);
      } else {
            dest_value->data[0].v_pointer = NULL;
      }
}


static gpointer unity_places_application_value_application_icon_peek_pointer (const GValue* value) {
      return value->data[0].v_pointer;
}


static gchar* unity_places_application_value_application_icon_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      if (collect_values[0].v_pointer) {
            UnityPlacesApplicationApplicationIcon* object;
            object = collect_values[0].v_pointer;
            if (object->parent_instance.g_class == NULL) {
                  return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
                  return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
            }
            value->data[0].v_pointer = unity_places_application_application_icon_ref (object);
      } else {
            value->data[0].v_pointer = NULL;
      }
      return NULL;
}


static gchar* unity_places_application_value_application_icon_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
      UnityPlacesApplicationApplicationIcon** object_p;
      object_p = collect_values[0].v_pointer;
      if (!object_p) {
            return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
      }
      if (!value->data[0].v_pointer) {
            *object_p = NULL;
      } else if (collect_flags && G_VALUE_NOCOPY_CONTENTS) {
            *object_p = value->data[0].v_pointer;
      } else {
            *object_p = unity_places_application_application_icon_ref (value->data[0].v_pointer);
      }
      return NULL;
}


GParamSpec* unity_places_application_param_spec_application_icon (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
      UnityPlacesApplicationParamSpecApplicationIcon* spec;
      g_return_val_if_fail (g_type_is_a (object_type, UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON), NULL);
      spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
      G_PARAM_SPEC (spec)->value_type = object_type;
      return G_PARAM_SPEC (spec);
}


gpointer unity_places_application_value_get_application_icon (const GValue* value) {
      g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON), NULL);
      return value->data[0].v_pointer;
}


void unity_places_application_value_set_application_icon (GValue* value, gpointer v_object) {
      UnityPlacesApplicationApplicationIcon* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
            unity_places_application_application_icon_ref (value->data[0].v_pointer);
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            unity_places_application_application_icon_unref (old);
      }
}


void unity_places_application_value_take_application_icon (GValue* value, gpointer v_object) {
      UnityPlacesApplicationApplicationIcon* old;
      g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON));
      old = value->data[0].v_pointer;
      if (v_object) {
            g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON));
            g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
            value->data[0].v_pointer = v_object;
      } else {
            value->data[0].v_pointer = NULL;
      }
      if (old) {
            unity_places_application_application_icon_unref (old);
      }
}


static void unity_places_application_application_icon_class_init (UnityPlacesApplicationApplicationIconClass * klass) {
      unity_places_application_application_icon_parent_class = g_type_class_peek_parent (klass);
      UNITY_PLACES_APPLICATION_APPLICATION_ICON_CLASS (klass)->finalize = unity_places_application_application_icon_finalize;
      g_type_class_add_private (klass, sizeof (UnityPlacesApplicationApplicationIconPrivate));
}


static void unity_places_application_application_icon_instance_init (UnityPlacesApplicationApplicationIcon * self) {
      self->priv = UNITY_PLACES_APPLICATION_APPLICATION_ICON_GET_PRIVATE (self);
      self->ref_count = 1;
}


static void unity_places_application_application_icon_finalize (UnityPlacesApplicationApplicationIcon* obj) {
      UnityPlacesApplicationApplicationIcon * self;
      self = UNITY_PLACES_APPLICATION_APPLICATION_ICON (obj);
      _g_object_unref0 (self->priv->model);
      _g_object_unref0 (self->view);
      _g_object_unref0 (self->label);
}


GType unity_places_application_application_icon_get_type (void) {
      static volatile gsize unity_places_application_application_icon_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_application_application_icon_type_id__volatile)) {
            static const GTypeValueTable g_define_type_value_table = { unity_places_application_value_application_icon_init, unity_places_application_value_application_icon_free_value, unity_places_application_value_application_icon_copy_value, unity_places_application_value_application_icon_peek_pointer, "p", unity_places_application_value_application_icon_collect_value, "p", unity_places_application_value_application_icon_lcopy_value };
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesApplicationApplicationIconClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_application_application_icon_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesApplicationApplicationIcon), 0, (GInstanceInitFunc) unity_places_application_application_icon_instance_init, &g_define_type_value_table };
            static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
            GType unity_places_application_application_icon_type_id;
            unity_places_application_application_icon_type_id = g_type_register_fundamental (g_type_fundamental_next (), "UnityPlacesApplicationApplicationIcon", &g_define_type_info, &g_define_type_fundamental_info, 0);
            g_once_init_leave (&unity_places_application_application_icon_type_id__volatile, unity_places_application_application_icon_type_id);
      }
      return unity_places_application_application_icon_type_id__volatile;
}


gpointer unity_places_application_application_icon_ref (gpointer instance) {
      UnityPlacesApplicationApplicationIcon* self;
      self = instance;
      g_atomic_int_inc (&self->ref_count);
      return instance;
}


void unity_places_application_application_icon_unref (gpointer instance) {
      UnityPlacesApplicationApplicationIcon* self;
      self = instance;
      if (g_atomic_int_dec_and_test (&self->ref_count)) {
            UNITY_PLACES_APPLICATION_APPLICATION_ICON_GET_CLASS (self)->finalize (self);
            g_type_free_instance ((GTypeInstance *) self);
      }
}


static void unity_places_application_application_group_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags) {
      UnityPlacesApplicationApplicationGroup * self;
      gint width;
      gint IconWidth;
      gint IconHeight;
      gint ApplicationIconSpacing;
      gint HeaderBorderPositionX;
      gint HeaderBorderPositionY;
      gint IconBorderPositionX;
      gint IconBorderPositionY;
      gint LineBorderPositionX;
      gint LineBorderPositionY;
      ClutterActorBox _tmp0_ = {0};
      ClutterActorBox child_box;
      gint i = 0;
      self = (UnityPlacesApplicationApplicationGroup*) base;
      width = (gint) ((*box).x2 - (*box).x1);
      IconWidth = 120;
      IconHeight = 48;
      ApplicationIconSpacing = 24;
      HeaderBorderPositionX = 0;
      HeaderBorderPositionY = 0;
      IconBorderPositionX = 15;
      IconBorderPositionY = 30;
      LineBorderPositionX = 0;
      LineBorderPositionY = 20;
      child_box = (_tmp0_.x1 = 0.0f, _tmp0_.y1 = 0.0f, _tmp0_.x2 = 0.0f, _tmp0_.y2 = 0.0f, _tmp0_);
      CLUTTER_ACTOR_CLASS (unity_places_application_application_group_parent_class)->allocate ((ClutterActor*) CTK_BOX (self), box, flags);
      child_box.x1 = (float) IconBorderPositionX;
      child_box.x2 = (float) IconWidth;
      child_box.y1 = (float) IconBorderPositionY;
      child_box.y2 = child_box.y1 + IconHeight;
      {
            gboolean _tmp1_;
            i = 0;
            _tmp1_ = TRUE;
            while (TRUE) {
                  UnityPlacesApplicationApplicationIcon* _tmp2_;
                  ClutterActorBox _tmp3_ = {0};
                  ClutterActorBox label_box;
                  UnityPlacesApplicationApplicationIcon* _tmp4_;
                  if (!_tmp1_) {
                        i++;
                  }
                  _tmp1_ = FALSE;
                  if (!(i < gee_collection_get_size ((GeeCollection*) self->priv->application_icon_array))) {
                        break;
                  }
                  child_box.x2 = child_box.x1 + IconWidth;
                  clutter_actor_allocate ((ClutterActor*) (_tmp2_ = (UnityPlacesApplicationApplicationIcon*) gee_abstract_list_get ((GeeAbstractList*) self->priv->application_icon_array, i))->view, &child_box, flags);
                  _unity_places_application_application_icon_unref0 (_tmp2_);
                  label_box = (_tmp3_.x1 = 0.0f, _tmp3_.y1 = 0.0f, _tmp3_.x2 = 0.0f, _tmp3_.y2 = 0.0f, _tmp3_);
                  label_box.x1 = child_box.x1;
                  label_box.x2 = child_box.x2;
                  label_box.y1 = (IconBorderPositionY + IconHeight) + 12.0f;
                  label_box.y2 = label_box.y1 + 64;
                  clutter_actor_allocate ((ClutterActor*) (_tmp4_ = (UnityPlacesApplicationApplicationIcon*) gee_abstract_list_get ((GeeAbstractList*) self->priv->application_icon_array, i))->label, &label_box, flags);
                  _unity_places_application_application_icon_unref0 (_tmp4_);
                  child_box.x1 = child_box.x1 + ((float) (IconWidth + ApplicationIconSpacing));
            }
      }
      if (self->priv->Separator->Width != width) {
            unity_places_cairo_drawing_places_hseparator_CreateSeparator (self->priv->Separator, width, 5);
      }
      child_box.x1 = (float) LineBorderPositionX;
      child_box.x2 = child_box.x1 + width;
      child_box.y1 = (float) LineBorderPositionY;
      child_box.y2 = (float) (LineBorderPositionY + 5);
      clutter_actor_allocate ((ClutterActor*) self->priv->Separator, &child_box, flags);
      child_box.x1 = (float) HeaderBorderPositionX;
      child_box.x2 = child_box.x1 + 22;
      child_box.y1 = (float) HeaderBorderPositionY;
      child_box.y2 = (float) (HeaderBorderPositionY + 23);
      clutter_actor_allocate ((ClutterActor*) self->priv->Star, &child_box, flags);
      child_box.x1 = (float) (HeaderBorderPositionX + 22);
      child_box.x2 = child_box.x1 + 100;
      child_box.y1 = (float) HeaderBorderPositionY;
      child_box.y2 = (float) (HeaderBorderPositionY + 23);
      clutter_actor_allocate ((ClutterActor*) self->priv->GroupName, &child_box, flags);
      child_box.x1 = child_box.x1 + ((float) (width - 50));
      child_box.x2 = child_box.x1 + 16;
      child_box.y1 = (float) HeaderBorderPositionY;
      child_box.y2 = (float) (HeaderBorderPositionY + 19);
      clutter_actor_allocate ((ClutterActor*) self->priv->maximize_button, &child_box, flags);
      clutter_actor_allocate ((ClutterActor*) self->priv->minimize_button, &child_box, flags);
}


static void unity_places_application_application_group_real_get_preferred_width (ClutterActor* base, float for_height, float* minimum_width, float* natural_width) {
      UnityPlacesApplicationApplicationGroup * self;
      self = (UnityPlacesApplicationApplicationGroup*) base;
      *minimum_width = 800.0f;
      *natural_width = 800.0f;
}


static void unity_places_application_application_group_real_get_preferred_height (ClutterActor* base, float for_width, float* minimum_height, float* natural_height) {
      UnityPlacesApplicationApplicationGroup * self;
      self = (UnityPlacesApplicationApplicationGroup*) base;
      *minimum_height = 135.0f;
      *natural_height = 135.0f;
}


static gboolean _unity_places_application_application_group_on_maximize_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) {
      gboolean result;
      result = unity_places_application_application_group_on_maximize (self, event);
      return result;
}


static gboolean _unity_places_application_application_group_on_minimize_clutter_actor_button_release_event (ClutterActor* _sender, ClutterEvent* event, gpointer self) {
      gboolean result;
      result = unity_places_application_application_group_on_minimize (self, event);
      return result;
}


UnityPlacesApplicationApplicationGroup* unity_places_application_application_group_construct (GType object_type, const char* group_name) {
      UnityPlacesApplicationApplicationGroup * self;
      CtkText* _tmp0_;
      CtkImage* _tmp1_;
      UnityPlacesCairoDrawingPlacesHSeparator* _tmp2_;
      CtkImage* _tmp3_;
      CtkImage* _tmp4_;
      GeeArrayList* _tmp5_;
      g_return_val_if_fail (group_name != NULL, NULL);
      self = g_object_newv (object_type, 0, NULL);
      ctk_box_set_homogeneous ((CtkBox*) self, FALSE);
      ctk_box_set_orientation ((CtkBox*) self, (gint) CTK_ORIENTATION_HORIZONTAL);
      self->priv->GroupName = (_tmp0_ = g_object_ref_sink ((CtkText*) ctk_text_new (group_name)), _g_object_unref0 (self->priv->GroupName), _tmp0_);
      self->priv->Star = (_tmp1_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) 23, UNITY_PLACES_APPLICATION_FAVOURITES_ICON)), _g_object_unref0 (self->priv->Star), _tmp1_);
      self->priv->Separator = (_tmp2_ = g_object_ref_sink (unity_places_cairo_drawing_places_hseparator_new ()), _g_object_unref0 (self->priv->Separator), _tmp2_);
      self->priv->maximize_button = (_tmp3_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) 16, UNITY_PLACES_APPLICATION_MAXIMIZE_ICON)), _g_object_unref0 (self->priv->maximize_button), _tmp3_);
      self->priv->minimize_button = (_tmp4_ = g_object_ref_sink ((CtkImage*) ctk_image_new_from_filename ((guint) 16, UNITY_PLACES_APPLICATION_MINIMIZE_ICON)), _g_object_unref0 (self->priv->minimize_button), _tmp4_);
      self->priv->application_icon_array = (_tmp5_ = gee_array_list_new (UNITY_PLACES_APPLICATION_TYPE_APPLICATION_ICON, (GBoxedCopyFunc) unity_places_application_application_icon_ref, unity_places_application_application_icon_unref, NULL), _g_object_unref0 (self->priv->application_icon_array), _tmp5_);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->Star);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->Separator);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->GroupName);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->maximize_button);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->minimize_button);
      self->priv->is_open = TRUE;
      clutter_actor_show_all ((ClutterActor*) self);
      clutter_actor_set_reactive ((ClutterActor*) self->priv->maximize_button, TRUE);
      clutter_actor_set_reactive ((ClutterActor*) self->priv->minimize_button, TRUE);
      clutter_actor_hide ((ClutterActor*) self->priv->maximize_button);
      clutter_actor_show ((ClutterActor*) self->priv->minimize_button);
      g_signal_connect_object ((ClutterActor*) self->priv->maximize_button, "button-release-event", (GCallback) _unity_places_application_application_group_on_maximize_clutter_actor_button_release_event, self, 0);
      g_signal_connect_object ((ClutterActor*) self->priv->minimize_button, "button-release-event", (GCallback) _unity_places_application_application_group_on_minimize_clutter_actor_button_release_event, self, 0);
      return self;
}


UnityPlacesApplicationApplicationGroup* unity_places_application_application_group_new (const char* group_name) {
      return unity_places_application_application_group_construct (UNITY_PLACES_APPLICATION_TYPE_APPLICATION_GROUP, group_name);
}


void unity_places_application_application_group_add_icon (UnityPlacesApplicationApplicationGroup* self, UnityPlacesApplicationApplicationIcon* app) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (app != NULL);
      gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->application_icon_array, app);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) app->view);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) app->label);
      self->n_items++;
}


gboolean unity_places_application_application_group_on_minimize (UnityPlacesApplicationApplicationGroup* self, ClutterEvent* event) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      clutter_actor_show ((ClutterActor*) self->priv->maximize_button);
      clutter_actor_hide ((ClutterActor*) self->priv->minimize_button);
      self->priv->is_open = FALSE;
      result = FALSE;
      return result;
}


gboolean unity_places_application_application_group_on_maximize (UnityPlacesApplicationApplicationGroup* self, ClutterEvent* event) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      clutter_actor_hide ((ClutterActor*) self->priv->maximize_button);
      clutter_actor_show ((ClutterActor*) self->priv->minimize_button);
      self->priv->is_open = TRUE;
      result = FALSE;
      return result;
}


static GObject * unity_places_application_application_group_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesApplicationApplicationGroup * self;
      parent_class = G_OBJECT_CLASS (unity_places_application_application_group_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_APPLICATION_APPLICATION_GROUP (obj);
      {
      }
      return obj;
}


static void unity_places_application_application_group_class_init (UnityPlacesApplicationApplicationGroupClass * klass) {
      unity_places_application_application_group_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (UnityPlacesApplicationApplicationGroupPrivate));
      CLUTTER_ACTOR_CLASS (klass)->allocate = unity_places_application_application_group_real_allocate;
      CLUTTER_ACTOR_CLASS (klass)->get_preferred_width = unity_places_application_application_group_real_get_preferred_width;
      CLUTTER_ACTOR_CLASS (klass)->get_preferred_height = unity_places_application_application_group_real_get_preferred_height;
      G_OBJECT_CLASS (klass)->constructor = unity_places_application_application_group_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_application_application_group_finalize;
}


static void unity_places_application_application_group_instance_init (UnityPlacesApplicationApplicationGroup * self) {
      self->priv = UNITY_PLACES_APPLICATION_APPLICATION_GROUP_GET_PRIVATE (self);
      self->n_items = 0;
}


static void unity_places_application_application_group_finalize (GObject* obj) {
      UnityPlacesApplicationApplicationGroup * self;
      self = UNITY_PLACES_APPLICATION_APPLICATION_GROUP (obj);
      _g_object_unref0 (self->priv->GroupName);
      _g_object_unref0 (self->priv->Star);
      _g_object_unref0 (self->priv->Separator);
      _g_object_unref0 (self->priv->maximize_button);
      _g_object_unref0 (self->priv->minimize_button);
      _g_object_unref0 (self->priv->application_icon_array);
      G_OBJECT_CLASS (unity_places_application_application_group_parent_class)->finalize (obj);
}


GType unity_places_application_application_group_get_type (void) {
      static volatile gsize unity_places_application_application_group_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_application_application_group_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesApplicationApplicationGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_application_application_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesApplicationApplicationGroup), 0, (GInstanceInitFunc) unity_places_application_application_group_instance_init, NULL };
            GType unity_places_application_application_group_type_id;
            unity_places_application_application_group_type_id = g_type_register_static (CTK_TYPE_BOX, "UnityPlacesApplicationApplicationGroup", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_application_application_group_type_id__volatile, unity_places_application_application_group_type_id);
      }
      return unity_places_application_application_group_type_id__volatile;
}


static void unity_places_application_application_view_real_allocate (ClutterActor* base, const ClutterActorBox* box, ClutterAllocationFlags flags) {
      UnityPlacesApplicationApplicationView * self;
      ClutterActorBox _tmp0_ = {0};
      ClutterActorBox child_box;
      float width = 0.0F;
      float height = 0.0F;
      float child_width = 0.0F;
      float child_height = 0.0F;
      self = (UnityPlacesApplicationApplicationView*) base;
      child_box = (_tmp0_.x1 = 0.0f, _tmp0_.y1 = 0.0f, _tmp0_.x2 = 0.0f, _tmp0_.y2 = 0.0f, _tmp0_);
      CLUTTER_ACTOR_CLASS (unity_places_application_application_view_parent_class)->allocate ((ClutterActor*) CTK_BOX (self), box, flags);
      width = (*box).x2 - (*box).x1;
      height = (*box).y2 - (*box).y1;
      clutter_actor_get_preferred_width ((ClutterActor*) self->recent_app_group, height, &child_width, &child_width);
      clutter_actor_get_preferred_height ((ClutterActor*) self->recent_app_group, width, &child_height, &child_height);
      child_box.x1 = (width - child_width) / 2.0f;
      child_box.x2 = child_box.x1 + child_width;
      child_box.y1 = 0.0f;
      child_box.y2 = child_height;
      clutter_actor_allocate ((ClutterActor*) self->recent_app_group, &child_box, flags);
      child_box.y1 = child_box.y1 + child_height;
      child_box.y2 = child_box.y1 + child_height;
      clutter_actor_allocate ((ClutterActor*) self->yesterday_app_group, &child_box, flags);
      child_box.y1 = child_box.y1 + child_height;
      child_box.y2 = child_box.y1 + child_height;
      clutter_actor_allocate ((ClutterActor*) self->lastweek_app_group, &child_box, flags);
}


UnityPlacesApplicationApplicationView* unity_places_application_application_view_construct (GType object_type) {
      UnityPlacesApplicationApplicationView * self;
      UnityPlacesApplicationApplicationGroup* _tmp0_;
      UnityPlacesApplicationApplicationGroup* _tmp1_;
      UnityPlacesApplicationApplicationGroup* _tmp2_;
      self = g_object_newv (object_type, 0, NULL);
      self->recent_app_group = (_tmp0_ = g_object_ref_sink (unity_places_application_application_group_new ("Recent apps")), _g_object_unref0 (self->recent_app_group), _tmp0_);
      self->yesterday_app_group = (_tmp1_ = g_object_ref_sink (unity_places_application_application_group_new ("Yesterday apps")), _g_object_unref0 (self->yesterday_app_group), _tmp1_);
      self->lastweek_app_group = (_tmp2_ = g_object_ref_sink (unity_places_application_application_group_new ("Last week apps")), _g_object_unref0 (self->lastweek_app_group), _tmp2_);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->recent_app_group);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->yesterday_app_group);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->lastweek_app_group);
      clutter_actor_show_all ((ClutterActor*) self);
      return self;
}


UnityPlacesApplicationApplicationView* unity_places_application_application_view_new (void) {
      return unity_places_application_application_view_construct (UNITY_PLACES_APPLICATION_TYPE_APPLICATION_VIEW);
}


static GObject * unity_places_application_application_view_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesApplicationApplicationView * self;
      parent_class = G_OBJECT_CLASS (unity_places_application_application_view_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_APPLICATION_APPLICATION_VIEW (obj);
      {
      }
      return obj;
}


static void unity_places_application_application_view_class_init (UnityPlacesApplicationApplicationViewClass * klass) {
      unity_places_application_application_view_parent_class = g_type_class_peek_parent (klass);
      CLUTTER_ACTOR_CLASS (klass)->allocate = unity_places_application_application_view_real_allocate;
      G_OBJECT_CLASS (klass)->constructor = unity_places_application_application_view_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_application_application_view_finalize;
}


static void unity_places_application_application_view_instance_init (UnityPlacesApplicationApplicationView * self) {
}


static void unity_places_application_application_view_finalize (GObject* obj) {
      UnityPlacesApplicationApplicationView * self;
      self = UNITY_PLACES_APPLICATION_APPLICATION_VIEW (obj);
      _g_object_unref0 (self->recent_app_group);
      _g_object_unref0 (self->yesterday_app_group);
      _g_object_unref0 (self->lastweek_app_group);
      G_OBJECT_CLASS (unity_places_application_application_view_parent_class)->finalize (obj);
}


GType unity_places_application_application_view_get_type (void) {
      static volatile gsize unity_places_application_application_view_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_application_application_view_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesApplicationApplicationViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_application_application_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesApplicationApplicationView), 0, (GInstanceInitFunc) unity_places_application_application_view_instance_init, NULL };
            GType unity_places_application_application_view_type_id;
            unity_places_application_application_view_type_id = g_type_register_static (CTK_TYPE_BOX, "UnityPlacesApplicationApplicationView", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_application_application_view_type_id__volatile, unity_places_application_application_view_type_id);
      }
      return unity_places_application_application_view_type_id__volatile;
}





Generated by  Doxygen 1.6.0   Back to index