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

scroller-controller.c

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

/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
/*
 * Copyright (C) 2009-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 Gordon Allott <gord.allott@canonical.com>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <clutk/clutk.h>
#include <gee.h>
#include <libbamf/libbamf.h>
#include <unity.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <glib/gstdio.h>
#include <clutter/clutter.h>


#define UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER (unity_launcher_scroller_controller_get_type ())
#define UNITY_LAUNCHER_SCROLLER_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER, UnityLauncherScrollerController))
#define UNITY_LAUNCHER_SCROLLER_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER, UnityLauncherScrollerControllerClass))
#define UNITY_LAUNCHER_IS_SCROLLER_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER))
#define UNITY_LAUNCHER_IS_SCROLLER_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER))
#define UNITY_LAUNCHER_SCROLLER_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER, UnityLauncherScrollerControllerClass))

typedef struct _UnityLauncherScrollerController UnityLauncherScrollerController;
typedef struct _UnityLauncherScrollerControllerClass UnityLauncherScrollerControllerClass;
typedef struct _UnityLauncherScrollerControllerPrivate UnityLauncherScrollerControllerPrivate;

#define UNITY_LAUNCHER_TYPE_SCROLLER_MODEL (unity_launcher_scroller_model_get_type ())
#define UNITY_LAUNCHER_SCROLLER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_MODEL, UnityLauncherScrollerModel))
#define UNITY_LAUNCHER_SCROLLER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_MODEL, UnityLauncherScrollerModelClass))
#define UNITY_LAUNCHER_IS_SCROLLER_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_MODEL))
#define UNITY_LAUNCHER_IS_SCROLLER_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_MODEL))
#define UNITY_LAUNCHER_SCROLLER_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_MODEL, UnityLauncherScrollerModelClass))

typedef struct _UnityLauncherScrollerModel UnityLauncherScrollerModel;
typedef struct _UnityLauncherScrollerModelClass UnityLauncherScrollerModelClass;

#define UNITY_LAUNCHER_TYPE_SCROLLER_VIEW (unity_launcher_scroller_view_get_type ())
#define UNITY_LAUNCHER_SCROLLER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_VIEW, UnityLauncherScrollerView))
#define UNITY_LAUNCHER_SCROLLER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_VIEW, UnityLauncherScrollerViewClass))
#define UNITY_LAUNCHER_IS_SCROLLER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_VIEW))
#define UNITY_LAUNCHER_IS_SCROLLER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_VIEW))
#define UNITY_LAUNCHER_SCROLLER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_VIEW, UnityLauncherScrollerViewClass))

typedef struct _UnityLauncherScrollerView UnityLauncherScrollerView;
typedef struct _UnityLauncherScrollerViewClass UnityLauncherScrollerViewClass;

#define UNITY_LAUNCHER_TYPE_SCROLLER_CHILD_CONTROLLER (unity_launcher_scroller_child_controller_get_type ())
#define UNITY_LAUNCHER_SCROLLER_CHILD_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD_CONTROLLER, UnityLauncherScrollerChildController))
#define UNITY_LAUNCHER_SCROLLER_CHILD_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD_CONTROLLER, UnityLauncherScrollerChildControllerClass))
#define UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD_CONTROLLER))
#define UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD_CONTROLLER))
#define UNITY_LAUNCHER_SCROLLER_CHILD_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD_CONTROLLER, UnityLauncherScrollerChildControllerClass))

typedef struct _UnityLauncherScrollerChildController UnityLauncherScrollerChildController;
typedef struct _UnityLauncherScrollerChildControllerClass UnityLauncherScrollerChildControllerClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define UNITY_LAUNCHER_TYPE_APPLICATION_CONTROLLER (unity_launcher_application_controller_get_type ())
#define UNITY_LAUNCHER_APPLICATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_LAUNCHER_TYPE_APPLICATION_CONTROLLER, UnityLauncherApplicationController))
#define UNITY_LAUNCHER_APPLICATION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_LAUNCHER_TYPE_APPLICATION_CONTROLLER, UnityLauncherApplicationControllerClass))
#define UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_LAUNCHER_TYPE_APPLICATION_CONTROLLER))
#define UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_LAUNCHER_TYPE_APPLICATION_CONTROLLER))
#define UNITY_LAUNCHER_APPLICATION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_LAUNCHER_TYPE_APPLICATION_CONTROLLER, UnityLauncherApplicationControllerClass))

typedef struct _UnityLauncherApplicationController UnityLauncherApplicationController;
typedef struct _UnityLauncherApplicationControllerClass UnityLauncherApplicationControllerClass;

#define UNITY_LAUNCHER_TYPE_SCROLLER_CHILD (unity_launcher_scroller_child_get_type ())
#define UNITY_LAUNCHER_SCROLLER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD, UnityLauncherScrollerChild))
#define UNITY_LAUNCHER_SCROLLER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD, UnityLauncherScrollerChildClass))
#define UNITY_LAUNCHER_IS_SCROLLER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD))
#define UNITY_LAUNCHER_IS_SCROLLER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD))
#define UNITY_LAUNCHER_SCROLLER_CHILD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_LAUNCHER_TYPE_SCROLLER_CHILD, UnityLauncherScrollerChildClass))

typedef struct _UnityLauncherScrollerChild UnityLauncherScrollerChild;
typedef struct _UnityLauncherScrollerChildClass UnityLauncherScrollerChildClass;

#define UNITY_LAUNCHER_TYPE_LAUNCHER_CHILD (unity_launcher_launcher_child_get_type ())
#define UNITY_LAUNCHER_LAUNCHER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_LAUNCHER_TYPE_LAUNCHER_CHILD, UnityLauncherLauncherChild))
#define UNITY_LAUNCHER_LAUNCHER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_LAUNCHER_TYPE_LAUNCHER_CHILD, UnityLauncherLauncherChildClass))
#define UNITY_LAUNCHER_IS_LAUNCHER_CHILD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_LAUNCHER_TYPE_LAUNCHER_CHILD))
#define UNITY_LAUNCHER_IS_LAUNCHER_CHILD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_LAUNCHER_TYPE_LAUNCHER_CHILD))
#define UNITY_LAUNCHER_LAUNCHER_CHILD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_LAUNCHER_TYPE_LAUNCHER_CHILD, UnityLauncherLauncherChildClass))

typedef struct _UnityLauncherLauncherChild UnityLauncherLauncherChild;
typedef struct _UnityLauncherLauncherChildClass UnityLauncherLauncherChildClass;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _UnityLauncherScrollerChildPrivate UnityLauncherScrollerChildPrivate;

#define UNITY_LAUNCHER_TYPE_PIN_TYPE (unity_launcher_pin_type_get_type ())

struct _UnityLauncherScrollerController {
      GObject parent_instance;
      UnityLauncherScrollerControllerPrivate * priv;
};

struct _UnityLauncherScrollerControllerClass {
      GObjectClass parent_class;
};

struct _UnityLauncherScrollerControllerPrivate {
      UnityLauncherScrollerModel* _model;
      UnityLauncherScrollerView* _view;
      GeeArrayList* childcontrollers;
      BamfMatcher* matcher;
      UnityFavorites* favorites;
};

typedef enum  {
      UNITY_LAUNCHER_PIN_TYPE_UNPINNED,
      UNITY_LAUNCHER_PIN_TYPE_PINNED,
      UNITY_LAUNCHER_PIN_TYPE_ALWAYS,
      UNITY_LAUNCHER_PIN_TYPE_NEVER
} UnityLauncherPinType;

struct _UnityLauncherScrollerChild {
      CtkActor parent_instance;
      UnityLauncherScrollerChildPrivate * priv;
      UnityLauncherPinType pin_type;
};

struct _UnityLauncherScrollerChildClass {
      CtkActorClass parent_class;
      void (*force_rotation_jump) (UnityLauncherScrollerChild* self, float degrees);
};


static gpointer unity_launcher_scroller_controller_parent_class = NULL;

GType unity_launcher_scroller_controller_get_type (void);
GType unity_launcher_scroller_model_get_type (void);
GType unity_launcher_scroller_view_get_type (void);
GType unity_launcher_scroller_child_controller_get_type (void);
#define UNITY_LAUNCHER_SCROLLER_CONTROLLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER, UnityLauncherScrollerControllerPrivate))
enum  {
      UNITY_LAUNCHER_SCROLLER_CONTROLLER_DUMMY_PROPERTY,
      UNITY_LAUNCHER_SCROLLER_CONTROLLER_MODEL,
      UNITY_LAUNCHER_SCROLLER_CONTROLLER_VIEW
};
#define UNITY_LAUNCHER_SCROLLER_CONTROLLER_DRAG_SAFE_ZONE ((guint) 300)
UnityLauncherScrollerController* unity_launcher_scroller_controller_new (UnityLauncherScrollerModel* _model, UnityLauncherScrollerView* _view);
UnityLauncherScrollerController* unity_launcher_scroller_controller_construct (GType object_type, UnityLauncherScrollerModel* _model, UnityLauncherScrollerView* _view);
static void unity_launcher_scroller_controller_handle_bamf_view_opened (UnityLauncherScrollerController* self, GObject* object);
static void _lambda18_ (BamfView* a, gboolean changed, UnityLauncherScrollerController* self);
static void __lambda18__bamf_view_user_visible_changed (BamfView* _sender, gboolean object, gpointer self);
GType unity_launcher_application_controller_get_type (void);
static UnityLauncherApplicationController* unity_launcher_scroller_controller_find_controller_by_desktop_file (UnityLauncherScrollerController* self, const char* desktop_file);
void unity_launcher_application_controller_attach_application (UnityLauncherApplicationController* self, BamfApplication* application);
UnityLauncherLauncherChild* unity_launcher_launcher_child_new (void);
UnityLauncherLauncherChild* unity_launcher_launcher_child_construct (GType object_type);
GType unity_launcher_scroller_child_get_type (void);
GType unity_launcher_launcher_child_get_type (void);
UnityLauncherApplicationController* unity_launcher_application_controller_new (const char* desktop_file_, UnityLauncherScrollerChild* child_);
UnityLauncherApplicationController* unity_launcher_application_controller_construct (GType object_type, const char* desktop_file_, UnityLauncherScrollerChild* child_);
UnityLauncherScrollerModel* unity_launcher_scroller_controller_get_model (UnityLauncherScrollerController* self);
void unity_launcher_scroller_model_add (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child);
static void unity_launcher_scroller_controller_on_scroller_controller_closed (UnityLauncherScrollerController* self, UnityLauncherScrollerChildController* controller);
static void _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_closed (UnityLauncherScrollerChildController* _sender, gpointer self);
UnityLauncherScrollerChild* unity_launcher_scroller_child_controller_get_child (UnityLauncherScrollerChildController* self);
GType unity_launcher_pin_type_get_type (void);
void unity_launcher_scroller_model_remove (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child);
static void unity_launcher_scroller_controller_build_favorites (UnityLauncherScrollerController* self);
static void unity_launcher_scroller_controller_on_favorite_added (UnityLauncherScrollerController* self, const char* uid);
void unity_launcher_scroller_controller_on_favorite_removed (UnityLauncherScrollerController* self, const char* uid);
gboolean unity_launcher_scroller_controller_desktop_file_is_favorite (UnityLauncherScrollerController* self, const char* desktop_file);
const char* unity_launcher_application_controller_get_desktop_file (UnityLauncherApplicationController* self);
static void unity_launcher_scroller_controller_on_unity_drag_motion (UnityLauncherScrollerController* self, UnityDragModel* drag_model, float x, float y);
static void _unity_launcher_scroller_controller_on_unity_drag_motion_unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);
static void unity_launcher_scroller_controller_on_unity_drag_drop (UnityLauncherScrollerController* self, UnityDragModel* drag_model, float x, float y);
static void _unity_launcher_scroller_controller_on_unity_drag_drop_unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self);
UnityLauncherScrollerView* unity_launcher_scroller_controller_get_view (UnityLauncherScrollerController* self);
static void unity_launcher_scroller_controller_on_unity_drag_start (UnityLauncherScrollerController* self, UnityDragModel* drag_model);
gint unity_launcher_scroller_view_get_model_index_at_y_pos (UnityLauncherScrollerView* self, float y);
gboolean unity_launcher_scroller_model_contains (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child);
void unity_launcher_scroller_model_move (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child, gint i);
void unity_launcher_scroller_model_insert (UnityLauncherScrollerModel* self, UnityLauncherScrollerChild* child, gint i);
static void unity_launcher_scroller_controller_set_model (UnityLauncherScrollerController* self, UnityLauncherScrollerModel* value);
static void unity_launcher_scroller_controller_set_view (UnityLauncherScrollerController* self, UnityLauncherScrollerView* value);
static void _unity_launcher_scroller_controller_on_favorite_added_unity_favorites_favorite_added (UnityFavorites* _sender, const char* uid, gpointer self);
static void _unity_launcher_scroller_controller_handle_bamf_view_opened_bamf_matcher_view_opened (BamfMatcher* _sender, GObject* object, gpointer self);
static void _unity_launcher_scroller_controller_on_unity_drag_start_unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self);
static GObject * unity_launcher_scroller_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_launcher_scroller_controller_finalize (GObject* obj);
static void unity_launcher_scroller_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void unity_launcher_scroller_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static int _vala_strcmp0 (const char * str1, const char * str2);



UnityLauncherScrollerController* unity_launcher_scroller_controller_construct (GType object_type, UnityLauncherScrollerModel* _model, UnityLauncherScrollerView* _view) {
      UnityLauncherScrollerController * self;
      g_return_val_if_fail (_model != NULL, NULL);
      g_return_val_if_fail (_view != NULL, NULL);
      self = (UnityLauncherScrollerController*) g_object_new (object_type, "model", _model, "view", _view, NULL);
      return self;
}


UnityLauncherScrollerController* unity_launcher_scroller_controller_new (UnityLauncherScrollerModel* _model, UnityLauncherScrollerView* _view) {
      return unity_launcher_scroller_controller_construct (UNITY_LAUNCHER_TYPE_SCROLLER_CONTROLLER, _model, _view);
}


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


static void _lambda18_ (BamfView* a, gboolean changed, UnityLauncherScrollerController* self) {
      g_return_if_fail (a != NULL);
      if (changed) {
            BamfView* _tmp0_;
            unity_launcher_scroller_controller_handle_bamf_view_opened (self, (_tmp0_ = a, G_IS_OBJECT (_tmp0_) ? ((GObject*) _tmp0_) : NULL));
      }
}


static void __lambda18__bamf_view_user_visible_changed (BamfView* _sender, gboolean object, gpointer self) {
      _lambda18_ (_sender, object, self);
}


static void _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_closed (UnityLauncherScrollerChildController* _sender, gpointer self) {
      unity_launcher_scroller_controller_on_scroller_controller_closed (self, _sender);
}


static void unity_launcher_scroller_controller_handle_bamf_view_opened (UnityLauncherScrollerController* self, GObject* object) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (object != NULL);
      g_return_if_fail (BAMF_IS_VIEW (object));
      if (BAMF_IS_APPLICATION (object)) {
            GObject* _tmp0_;
            BamfApplication* app;
            app = _g_object_ref0 ((_tmp0_ = object, BAMF_IS_APPLICATION (_tmp0_) ? ((BamfApplication*) _tmp0_) : NULL));
            if (_vala_strcmp0 (bamf_application_get_desktop_file (app), "") == 0) {
                  g_debug ("scroller-controller.vala:79: no desktop file for this app");
                  _g_object_unref0 (app);
                  return;
            }
            g_signal_connect_object ((BamfView*) app, "user-visible-changed", (GCallback) __lambda18__bamf_view_user_visible_changed, self, 0);
            if (bamf_view_user_visible ((BamfView*) app)) {
                  char* desktop_file;
                  desktop_file = g_strdup (bamf_application_get_desktop_file (app));
                  if (desktop_file != NULL) {
                        UnityLauncherApplicationController* controller;
                        controller = unity_launcher_scroller_controller_find_controller_by_desktop_file (self, desktop_file);
                        if (UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (controller)) {
                              unity_launcher_application_controller_attach_application (controller, app);
                        } else {
                              UnityLauncherLauncherChild* child;
                              UnityLauncherApplicationController* _tmp1_;
                              child = g_object_ref_sink (unity_launcher_launcher_child_new ());
                              controller = (_tmp1_ = unity_launcher_application_controller_new (desktop_file, (UnityLauncherScrollerChild*) child), _g_object_unref0 (controller), _tmp1_);
                              unity_launcher_application_controller_attach_application (controller, app);
                              unity_launcher_scroller_model_add (self->priv->_model, (UnityLauncherScrollerChild*) child);
                              gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->childcontrollers, (UnityLauncherScrollerChildController*) controller);
                              g_signal_connect_object ((UnityLauncherScrollerChildController*) controller, "closed", (GCallback) _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_closed, self, 0);
                              _g_object_unref0 (child);
                        }
                        _g_object_unref0 (controller);
                  }
                  _g_free0 (desktop_file);
            }
            _g_object_unref0 (app);
      }
}


static void unity_launcher_scroller_controller_on_scroller_controller_closed (UnityLauncherScrollerController* self, UnityLauncherScrollerChildController* controller) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (controller != NULL);
      if (UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (controller)) {
            if (unity_launcher_scroller_child_controller_get_child (controller)->pin_type == UNITY_LAUNCHER_PIN_TYPE_UNPINNED) {
                  unity_launcher_scroller_model_remove (self->priv->_model, unity_launcher_scroller_child_controller_get_child (controller));
                  gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->childcontrollers, controller);
            }
      }
}


static void unity_launcher_scroller_controller_build_favorites (UnityLauncherScrollerController* self) {
      g_return_if_fail (self != NULL);
      {
            GeeArrayList* _tmp0_;
            GeeIterator* _tmp1_;
            GeeIterator* _uid_it;
            _uid_it = (_tmp1_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) (_tmp0_ = unity_favorites_get_favorites (self->priv->favorites))), _g_object_unref0 (_tmp0_), _tmp1_);
            while (TRUE) {
                  char* uid;
                  char* type;
                  char* desktop_file;
                  UnityLauncherApplicationController* controller;
                  if (!gee_iterator_next (_uid_it)) {
                        break;
                  }
                  uid = (char*) gee_iterator_get (_uid_it);
                  type = unity_favorites_get_string (self->priv->favorites, uid, "type");
                  if (_vala_strcmp0 (type, "application") != 0) {
                        _g_free0 (uid);
                        _g_free0 (type);
                        continue;
                  }
                  desktop_file = unity_favorites_get_string (self->priv->favorites, uid, "desktop_file");
                  if (!g_file_test (desktop_file, G_FILE_TEST_EXISTS)) {
                        _g_free0 (uid);
                        _g_free0 (type);
                        _g_free0 (desktop_file);
                        continue;
                  }
                  controller = unity_launcher_scroller_controller_find_controller_by_desktop_file (self, desktop_file);
                  if (!UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (controller)) {
                        UnityLauncherLauncherChild* child;
                        UnityLauncherApplicationController* _tmp2_;
                        child = g_object_ref_sink (unity_launcher_launcher_child_new ());
                        controller = (_tmp2_ = unity_launcher_application_controller_new (desktop_file, (UnityLauncherScrollerChild*) child), _g_object_unref0 (controller), _tmp2_);
                        unity_launcher_scroller_model_add (self->priv->_model, (UnityLauncherScrollerChild*) child);
                        gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->childcontrollers, (UnityLauncherScrollerChildController*) controller);
                        g_signal_connect_object ((UnityLauncherScrollerChildController*) controller, "closed", (GCallback) _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_closed, self, 0);
                        _g_object_unref0 (child);
                  }
                  _g_free0 (uid);
                  _g_free0 (type);
                  _g_free0 (desktop_file);
                  _g_object_unref0 (controller);
            }
            _g_object_unref0 (_uid_it);
      }
}


static void unity_launcher_scroller_controller_on_favorite_added (UnityLauncherScrollerController* self, const char* uid) {
      char* desktop_file;
      UnityLauncherApplicationController* controller;
      g_return_if_fail (self != NULL);
      g_return_if_fail (uid != NULL);
      desktop_file = unity_favorites_get_string (self->priv->favorites, uid, "desktop_file");
      if (!g_file_test (desktop_file, G_FILE_TEST_EXISTS)) {
            _g_free0 (desktop_file);
            return;
      }
      controller = unity_launcher_scroller_controller_find_controller_by_desktop_file (self, desktop_file);
      if (!UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (controller)) {
            UnityLauncherLauncherChild* child;
            UnityLauncherApplicationController* _tmp0_;
            child = g_object_ref_sink (unity_launcher_launcher_child_new ());
            controller = (_tmp0_ = unity_launcher_application_controller_new (desktop_file, (UnityLauncherScrollerChild*) child), _g_object_unref0 (controller), _tmp0_);
            unity_launcher_scroller_model_add (self->priv->_model, (UnityLauncherScrollerChild*) child);
            gee_abstract_collection_add ((GeeAbstractCollection*) self->priv->childcontrollers, (UnityLauncherScrollerChildController*) controller);
            g_signal_connect_object ((UnityLauncherScrollerChildController*) controller, "closed", (GCallback) _unity_launcher_scroller_controller_on_scroller_controller_closed_unity_launcher_scroller_child_controller_closed, self, 0);
            _g_object_unref0 (child);
      }
      _g_free0 (desktop_file);
      _g_object_unref0 (controller);
}


void unity_launcher_scroller_controller_on_favorite_removed (UnityLauncherScrollerController* self, const char* uid) {
      g_return_if_fail (self != NULL);
      g_return_if_fail (uid != NULL);
}


gboolean unity_launcher_scroller_controller_desktop_file_is_favorite (UnityLauncherScrollerController* self, const char* desktop_file) {
      gboolean result = FALSE;
      UnityFavorites* favorites;
      GeeArrayList* favorite_list;
      g_return_val_if_fail (self != NULL, FALSE);
      g_return_val_if_fail (desktop_file != NULL, FALSE);
      favorites = unity_favorites_get_default ();
      favorite_list = unity_favorites_get_favorites (favorites);
      {
            GeeIterator* _uid_it;
            _uid_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) favorite_list);
            while (TRUE) {
                  char* uid;
                  char* type;
                  char* fav_desktop_file;
                  if (!gee_iterator_next (_uid_it)) {
                        break;
                  }
                  uid = (char*) gee_iterator_get (_uid_it);
                  type = unity_favorites_get_string (favorites, uid, "type");
                  if (_vala_strcmp0 (type, "application") != 0) {
                        _g_free0 (uid);
                        _g_free0 (type);
                        continue;
                  }
                  fav_desktop_file = unity_favorites_get_string (favorites, uid, "desktop_file");
                  if (_vala_strcmp0 (desktop_file, fav_desktop_file) == 0) {
                        result = TRUE;
                        _g_free0 (uid);
                        _g_free0 (type);
                        _g_free0 (fav_desktop_file);
                        _g_object_unref0 (_uid_it);
                        _g_object_unref0 (favorites);
                        _g_object_unref0 (favorite_list);
                        return result;
                  }
                  _g_free0 (uid);
                  _g_free0 (type);
                  _g_free0 (fav_desktop_file);
            }
            _g_object_unref0 (_uid_it);
      }
      result = FALSE;
      _g_object_unref0 (favorites);
      _g_object_unref0 (favorite_list);
      return result;
}


static UnityLauncherApplicationController* unity_launcher_scroller_controller_find_controller_by_desktop_file (UnityLauncherScrollerController* self, const char* desktop_file) {
      UnityLauncherApplicationController* result = NULL;
      g_return_val_if_fail (self != NULL, NULL);
      g_return_val_if_fail (desktop_file != NULL, NULL);
      {
            GeeIterator* _controller_it;
            _controller_it = gee_abstract_collection_iterator ((GeeAbstractCollection*) self->priv->childcontrollers);
            while (TRUE) {
                  UnityLauncherScrollerChildController* controller;
                  if (!gee_iterator_next (_controller_it)) {
                        break;
                  }
                  controller = (UnityLauncherScrollerChildController*) gee_iterator_get (_controller_it);
                  if (UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (controller)) {
                        UnityLauncherScrollerChildController* _tmp0_;
                        if (_vala_strcmp0 (unity_launcher_application_controller_get_desktop_file ((_tmp0_ = controller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp0_) ? ((UnityLauncherApplicationController*) _tmp0_) : NULL)), desktop_file) == 0) {
                              UnityLauncherScrollerChildController* _tmp1_;
                              result = _g_object_ref0 ((_tmp1_ = controller, UNITY_LAUNCHER_IS_APPLICATION_CONTROLLER (_tmp1_) ? ((UnityLauncherApplicationController*) _tmp1_) : NULL));
                              _g_object_unref0 (controller);
                              _g_object_unref0 (_controller_it);
                              return result;
                        }
                  }
                  _g_object_unref0 (controller);
            }
            _g_object_unref0 (_controller_it);
      }
      result = NULL;
      return result;
}


static void _unity_launcher_scroller_controller_on_unity_drag_motion_unity_drag_controller_drag_motion (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) {
      unity_launcher_scroller_controller_on_unity_drag_motion (self, model, x, y);
}


static void _unity_launcher_scroller_controller_on_unity_drag_drop_unity_drag_controller_drag_drop (UnityDragController* _sender, UnityDragModel* model, float x, float y, gpointer self) {
      unity_launcher_scroller_controller_on_unity_drag_drop (self, model, x, y);
}


static void unity_launcher_scroller_controller_on_unity_drag_start (UnityLauncherScrollerController* self, UnityDragModel* drag_model) {
      UnityDragController* drag_controller;
      UnityDragModel* _tmp0_;
      gboolean _tmp1_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (drag_model != NULL);
      drag_controller = _g_object_ref0 (unity_drag_controller_get_default ());
      g_signal_connect_object (drag_controller, "drag-motion", (GCallback) _unity_launcher_scroller_controller_on_unity_drag_motion_unity_drag_controller_drag_motion, self, 0);
      g_signal_connect_object (drag_controller, "drag-drop", (GCallback) _unity_launcher_scroller_controller_on_unity_drag_drop_unity_drag_controller_drag_drop, self, 0);
      if ((_tmp1_ = UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (_tmp0_ = unity_drag_controller_get_drag_model (drag_controller)), _g_object_unref0 (_tmp0_), _tmp1_)) {
            UnityLauncherScrollerChildController* _tmp3_;
            UnityDragModel* _tmp2_;
            UnityLauncherScrollerChild* _tmp4_;
            UnityLauncherScrollerChild* child;
            child = (_tmp4_ = _g_object_ref0 (unity_launcher_scroller_child_controller_get_child (_tmp3_ = (_tmp2_ = unity_drag_controller_get_drag_model (drag_controller), UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (_tmp2_) ? ((UnityLauncherScrollerChildController*) _tmp2_) : NULL))), _g_object_unref0 (_tmp3_), _tmp4_);
            clutter_actor_set_opacity ((ClutterActor*) child, (guint8) 0);
            clutter_actor_queue_redraw ((ClutterActor*) self->priv->_view);
            _g_object_unref0 (child);
      }
      _g_object_unref0 (drag_controller);
}


static void unity_launcher_scroller_controller_on_unity_drag_motion (UnityLauncherScrollerController* self, UnityDragModel* drag_model, float x, float y) {
      UnityDragController* drag_controller;
      UnityDragModel* _tmp0_;
      gboolean _tmp1_;
      UnityLauncherScrollerChildController* _tmp3_;
      UnityDragModel* _tmp2_;
      UnityLauncherScrollerChild* _tmp4_;
      UnityLauncherScrollerChild* retcont;
      g_return_if_fail (self != NULL);
      g_return_if_fail (drag_model != NULL);
      drag_controller = _g_object_ref0 (unity_drag_controller_get_default ());
      if ((_tmp1_ = !UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (_tmp0_ = unity_drag_controller_get_drag_model (drag_controller)), _g_object_unref0 (_tmp0_), _tmp1_)) {
            _g_object_unref0 (drag_controller);
            return;
      }
      retcont = (_tmp4_ = _g_object_ref0 (unity_launcher_scroller_child_controller_get_child (_tmp3_ = (_tmp2_ = unity_drag_controller_get_drag_model (drag_controller), UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (_tmp2_) ? ((UnityLauncherScrollerChildController*) _tmp2_) : NULL))), _g_object_unref0 (_tmp3_), _tmp4_);
      if (x > (clutter_actor_get_width ((ClutterActor*) self->priv->_view) + UNITY_LAUNCHER_SCROLLER_CONTROLLER_DRAG_SAFE_ZONE)) {
            unity_launcher_scroller_model_remove (self->priv->_model, retcont);
      } else {
            gint model_index;
            model_index = unity_launcher_scroller_view_get_model_index_at_y_pos (self->priv->_view, y);
            if (unity_launcher_scroller_model_contains (self->priv->_model, retcont)) {
                  unity_launcher_scroller_model_move (self->priv->_model, retcont, MAX (model_index - 1, 0));
            } else {
                  unity_launcher_scroller_model_insert (self->priv->_model, retcont, MAX (model_index - 1, 0));
            }
            clutter_actor_queue_redraw ((ClutterActor*) self->priv->_view);
      }
      _g_object_unref0 (drag_controller);
      _g_object_unref0 (retcont);
}


static void unity_launcher_scroller_controller_on_unity_drag_drop (UnityLauncherScrollerController* self, UnityDragModel* drag_model, float x, float y) {
      UnityDragController* drag_controller;
      UnityDragModel* _tmp0_;
      gboolean _tmp1_;
      UnityDragModel* _tmp2_;
      UnityLauncherScrollerChildController* model_controller;
      UnityLauncherScrollerChild* retcont;
      guint _tmp3_;
      guint _tmp4_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (drag_model != NULL);
      drag_controller = _g_object_ref0 (unity_drag_controller_get_default ());
      if ((_tmp1_ = !UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (_tmp0_ = unity_drag_controller_get_drag_model (drag_controller)), _g_object_unref0 (_tmp0_), _tmp1_)) {
            _g_object_unref0 (drag_controller);
            return;
      }
      model_controller = (_tmp2_ = unity_drag_controller_get_drag_model (drag_controller), UNITY_LAUNCHER_IS_SCROLLER_CHILD_CONTROLLER (_tmp2_) ? ((UnityLauncherScrollerChildController*) _tmp2_) : NULL);
      retcont = _g_object_ref0 (unity_launcher_scroller_child_controller_get_child (model_controller));
      if (x > clutter_actor_get_width ((ClutterActor*) self->priv->_view)) {
            if (unity_launcher_scroller_model_contains (self->priv->_model, retcont)) {
                  unity_launcher_scroller_model_remove (self->priv->_model, retcont);
            }
            if (gee_abstract_collection_contains ((GeeAbstractCollection*) self->priv->childcontrollers, model_controller)) {
                  gee_abstract_collection_remove ((GeeAbstractCollection*) self->priv->childcontrollers, model_controller);
            }
      }
      clutter_actor_set_opacity ((ClutterActor*) retcont, (guint8) 255);
      g_signal_parse_name ("drag-motion", UNITY_DRAG_TYPE_CONTROLLER, &_tmp3_, NULL, FALSE);
      g_signal_handlers_disconnect_matched (drag_controller, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _unity_launcher_scroller_controller_on_unity_drag_motion_unity_drag_controller_drag_motion, self);
      g_signal_parse_name ("drag-drop", UNITY_DRAG_TYPE_CONTROLLER, &_tmp4_, NULL, FALSE);
      g_signal_handlers_disconnect_matched (drag_controller, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _unity_launcher_scroller_controller_on_unity_drag_drop_unity_drag_controller_drag_drop, self);
      _g_object_unref0 (drag_controller);
      _g_object_unref0 (model_controller);
      _g_object_unref0 (retcont);
}


UnityLauncherScrollerModel* unity_launcher_scroller_controller_get_model (UnityLauncherScrollerController* self) {
      UnityLauncherScrollerModel* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->priv->_model;
      return result;
}


static void unity_launcher_scroller_controller_set_model (UnityLauncherScrollerController* self, UnityLauncherScrollerModel* value) {
      UnityLauncherScrollerModel* _tmp0_;
      g_return_if_fail (self != NULL);
      self->priv->_model = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_model), _tmp0_);
      g_object_notify ((GObject *) self, "model");
}


UnityLauncherScrollerView* unity_launcher_scroller_controller_get_view (UnityLauncherScrollerController* self) {
      UnityLauncherScrollerView* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->priv->_view;
      return result;
}


static void unity_launcher_scroller_controller_set_view (UnityLauncherScrollerController* self, UnityLauncherScrollerView* value) {
      UnityLauncherScrollerView* _tmp0_;
      g_return_if_fail (self != NULL);
      self->priv->_view = (_tmp0_ = _g_object_ref0 (value), _g_object_unref0 (self->priv->_view), _tmp0_);
      g_object_notify ((GObject *) self, "view");
}


static void _unity_launcher_scroller_controller_on_favorite_added_unity_favorites_favorite_added (UnityFavorites* _sender, const char* uid, gpointer self) {
      unity_launcher_scroller_controller_on_favorite_added (self, uid);
}


static void _unity_launcher_scroller_controller_handle_bamf_view_opened_bamf_matcher_view_opened (BamfMatcher* _sender, GObject* object, gpointer self) {
      unity_launcher_scroller_controller_handle_bamf_view_opened (self, object);
}


static void _unity_launcher_scroller_controller_on_unity_drag_start_unity_drag_controller_drag_start (UnityDragController* _sender, UnityDragModel* model, gpointer self) {
      unity_launcher_scroller_controller_on_unity_drag_start (self, model);
}


static GObject * unity_launcher_scroller_controller_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityLauncherScrollerController * self;
      parent_class = G_OBJECT_CLASS (unity_launcher_scroller_controller_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_LAUNCHER_SCROLLER_CONTROLLER (obj);
      {
            GeeArrayList* _tmp0_;
            BamfMatcher* _tmp1_;
            UnityFavorites* _tmp2_;
            UnityDragController* drag_controller;
            self->priv->childcontrollers = (_tmp0_ = gee_array_list_new (UNITY_LAUNCHER_TYPE_SCROLLER_CHILD_CONTROLLER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL), _g_object_unref0 (self->priv->childcontrollers), _tmp0_);
            self->priv->matcher = (_tmp1_ = _g_object_ref0 (bamf_matcher_get_default ()), _g_object_unref0 (self->priv->matcher), _tmp1_);
            self->priv->favorites = (_tmp2_ = unity_favorites_get_default (), _g_object_unref0 (self->priv->favorites), _tmp2_);
            g_signal_connect_object (self->priv->favorites, "favorite-added", (GCallback) _unity_launcher_scroller_controller_on_favorite_added_unity_favorites_favorite_added, self, 0);
            g_signal_connect_object (self->priv->matcher, "view-opened", (GCallback) _unity_launcher_scroller_controller_handle_bamf_view_opened_bamf_matcher_view_opened, self, 0);
            unity_launcher_scroller_controller_build_favorites (self);
            {
                  GList* object_collection;
                  GList* object_it;
                  object_collection = (GList*) bamf_matcher_get_running_applications (self->priv->matcher);
                  for (object_it = object_collection; object_it != NULL; object_it = object_it->next) {
                        GObject* object;
                        object = _g_object_ref0 ((GObject*) ((BamfView*) object_it->data));
                        {
                              if (BAMF_IS_VIEW (object)) {
                                    unity_launcher_scroller_controller_handle_bamf_view_opened (self, object);
                              } else {
                                    g_error ("scroller-controller.vala:61: Bamf returned a strange object");
                              }
                              _g_object_unref0 (object);
                        }
                  }
            }
            drag_controller = _g_object_ref0 (unity_drag_controller_get_default ());
            g_signal_connect_object (drag_controller, "drag-start", (GCallback) _unity_launcher_scroller_controller_on_unity_drag_start_unity_drag_controller_drag_start, self, 0);
            _g_object_unref0 (drag_controller);
      }
      return obj;
}


static void unity_launcher_scroller_controller_class_init (UnityLauncherScrollerControllerClass * klass) {
      unity_launcher_scroller_controller_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (UnityLauncherScrollerControllerPrivate));
      G_OBJECT_CLASS (klass)->get_property = unity_launcher_scroller_controller_get_property;
      G_OBJECT_CLASS (klass)->set_property = unity_launcher_scroller_controller_set_property;
      G_OBJECT_CLASS (klass)->constructor = unity_launcher_scroller_controller_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_launcher_scroller_controller_finalize;
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_SCROLLER_CONTROLLER_MODEL, g_param_spec_object ("model", "model", "model", UNITY_LAUNCHER_TYPE_SCROLLER_MODEL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_LAUNCHER_SCROLLER_CONTROLLER_VIEW, g_param_spec_object ("view", "view", "view", UNITY_LAUNCHER_TYPE_SCROLLER_VIEW, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}


static void unity_launcher_scroller_controller_instance_init (UnityLauncherScrollerController * self) {
      self->priv = UNITY_LAUNCHER_SCROLLER_CONTROLLER_GET_PRIVATE (self);
}


static void unity_launcher_scroller_controller_finalize (GObject* obj) {
      UnityLauncherScrollerController * self;
      self = UNITY_LAUNCHER_SCROLLER_CONTROLLER (obj);
      _g_object_unref0 (self->priv->_model);
      _g_object_unref0 (self->priv->_view);
      _g_object_unref0 (self->priv->childcontrollers);
      _g_object_unref0 (self->priv->matcher);
      _g_object_unref0 (self->priv->favorites);
      G_OBJECT_CLASS (unity_launcher_scroller_controller_parent_class)->finalize (obj);
}


GType unity_launcher_scroller_controller_get_type (void) {
      static volatile gsize unity_launcher_scroller_controller_type_id__volatile = 0;
      if (g_once_init_enter (&unity_launcher_scroller_controller_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityLauncherScrollerControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_launcher_scroller_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityLauncherScrollerController), 0, (GInstanceInitFunc) unity_launcher_scroller_controller_instance_init, NULL };
            GType unity_launcher_scroller_controller_type_id;
            unity_launcher_scroller_controller_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityLauncherScrollerController", &g_define_type_info, 0);
            g_once_init_leave (&unity_launcher_scroller_controller_type_id__volatile, unity_launcher_scroller_controller_type_id);
      }
      return unity_launcher_scroller_controller_type_id__volatile;
}


static void unity_launcher_scroller_controller_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
      UnityLauncherScrollerController * self;
      self = UNITY_LAUNCHER_SCROLLER_CONTROLLER (object);
      switch (property_id) {
            case UNITY_LAUNCHER_SCROLLER_CONTROLLER_MODEL:
            g_value_set_object (value, unity_launcher_scroller_controller_get_model (self));
            break;
            case UNITY_LAUNCHER_SCROLLER_CONTROLLER_VIEW:
            g_value_set_object (value, unity_launcher_scroller_controller_get_view (self));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void unity_launcher_scroller_controller_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
      UnityLauncherScrollerController * self;
      self = UNITY_LAUNCHER_SCROLLER_CONTROLLER (object);
      switch (property_id) {
            case UNITY_LAUNCHER_SCROLLER_CONTROLLER_MODEL:
            unity_launcher_scroller_controller_set_model (self, g_value_get_object (value));
            break;
            case UNITY_LAUNCHER_SCROLLER_CONTROLLER_VIEW:
            unity_launcher_scroller_controller_set_view (self, g_value_get_object (value));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static int _vala_strcmp0 (const char * str1, const char * str2) {
      if (str1 == NULL) {
            return -(str1 != str2);
      }
      if (str2 == NULL) {
            return str1 != str2;
      }
      return strcmp (str1, str2);
}





Generated by  Doxygen 1.6.0   Back to index