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

expose-manager.c

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

/*
 * Copyright (C) 2009 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 Neil Jagdish Patel <neil.patel@canonical.com>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <clutter/clutter.h>
#include <float.h>
#include <math.h>
#include <unity-private.h>
#include <unity.h>
#include <clutk/clutk.h>
#include <mutter-plugins.h>


#define UNITY_TYPE_EXPOSE_CLONE (unity_expose_clone_get_type ())
#define UNITY_EXPOSE_CLONE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_EXPOSE_CLONE, UnityExposeClone))
#define UNITY_EXPOSE_CLONE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_EXPOSE_CLONE, UnityExposeCloneClass))
#define UNITY_IS_EXPOSE_CLONE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_EXPOSE_CLONE))
#define UNITY_IS_EXPOSE_CLONE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_EXPOSE_CLONE))
#define UNITY_EXPOSE_CLONE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_EXPOSE_CLONE, UnityExposeCloneClass))

typedef struct _UnityExposeClone UnityExposeClone;
typedef struct _UnityExposeCloneClass UnityExposeCloneClass;
typedef struct _UnityExposeClonePrivate UnityExposeClonePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define UNITY_TYPE_EXPOSE_MANAGER (unity_expose_manager_get_type ())
#define UNITY_EXPOSE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_EXPOSE_MANAGER, UnityExposeManager))
#define UNITY_EXPOSE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_EXPOSE_MANAGER, UnityExposeManagerClass))
#define UNITY_IS_EXPOSE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_EXPOSE_MANAGER))
#define UNITY_IS_EXPOSE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_EXPOSE_MANAGER))
#define UNITY_EXPOSE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_EXPOSE_MANAGER, UnityExposeManagerClass))

typedef struct _UnityExposeManager UnityExposeManager;
typedef struct _UnityExposeManagerClass UnityExposeManagerClass;
typedef struct _UnityExposeManagerPrivate UnityExposeManagerPrivate;

#define UNITY_TYPE_PLUGIN (unity_plugin_get_type ())
#define UNITY_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_TYPE_PLUGIN, UnityPlugin))
#define UNITY_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_TYPE_PLUGIN, UnityPluginClass))
#define UNITY_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_TYPE_PLUGIN))
#define UNITY_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_TYPE_PLUGIN))
#define UNITY_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_TYPE_PLUGIN, UnityPluginClass))

typedef struct _UnityPlugin UnityPlugin;
typedef struct _UnityPluginClass UnityPluginClass;
#define __g_list_free_g_object_unref0(var) ((var == NULL) ? NULL : (var = (_g_list_free_g_object_unref (var), NULL)))
typedef struct _Block1Data Block1Data;

struct _UnityExposeClone {
      ClutterGroup parent_instance;
      UnityExposeClonePrivate * priv;
};

struct _UnityExposeCloneClass {
      ClutterGroupClass parent_class;
};

struct _UnityExposeClonePrivate {
      ClutterClone* clone;
      ClutterActor* darken_box;
      gboolean hovered;
      ClutterActor* _source;
      guint8 _hovered_opacity;
      guint8 _unhovered_opacity;
      guint8 _darken;
};

struct _UnityExposeManager {
      GObject parent_instance;
      UnityExposeManagerPrivate * priv;
};

struct _UnityExposeManagerClass {
      GObjectClass parent_class;
};

struct _UnityExposeManagerPrivate {
      GList* exposed_windows;
      ClutterGroup* expose_group;
      UnityPlugin* owner;
      ClutterStage* stage;
      UnityLauncherLauncher* launcher;
      gboolean _expose_showing;
      gboolean _coverflow;
      gint _left_buffer;
      gint _right_buffer;
      gint _top_buffer;
      gint _bottom_buffer;
      guint8 _hovered_opacity;
      guint8 _unhovered_opacity;
      guint8 _darken;
      guint coverflow_index;
      UnityExposeClone* last_selected_clone;
      gboolean menu_in_hover_close_state;
};

struct _Block1Data {
      int _ref_count_;
      UnityExposeManager * self;
      ClutterActor* window;
      ClutterActor* actor;
};


static gpointer unity_expose_clone_parent_class = NULL;
static gpointer unity_expose_manager_parent_class = NULL;

GType unity_expose_clone_get_type (void);
#define UNITY_EXPOSE_CLONE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_EXPOSE_CLONE, UnityExposeClonePrivate))
enum  {
      UNITY_EXPOSE_CLONE_DUMMY_PROPERTY,
      UNITY_EXPOSE_CLONE_SOURCE,
      UNITY_EXPOSE_CLONE_HOVERED_OPACITY,
      UNITY_EXPOSE_CLONE_UNHOVERED_OPACITY,
      UNITY_EXPOSE_CLONE_DARKEN
};
void unity_expose_clone_set_darken (UnityExposeClone* self, guint8 value);
void unity_expose_clone_set_hovered_opacity (UnityExposeClone* self, guint8 value);
void unity_expose_clone_set_unhovered_opacity (UnityExposeClone* self, guint8 value);
static void unity_expose_clone_set_source (UnityExposeClone* self, ClutterActor* value);
guint8 unity_expose_clone_get_darken (UnityExposeClone* self);
UnityExposeClone* unity_expose_clone_new (ClutterActor* source);
UnityExposeClone* unity_expose_clone_construct (GType object_type, ClutterActor* source);
guint8 unity_expose_clone_get_hovered_opacity (UnityExposeClone* self);
static gboolean unity_expose_clone_on_mouse_enter (UnityExposeClone* self, ClutterEvent* evnt);
guint8 unity_expose_clone_get_unhovered_opacity (UnityExposeClone* self);
static gboolean unity_expose_clone_on_mouse_leave (UnityExposeClone* self, ClutterEvent* evnt);
ClutterActor* unity_expose_clone_get_source (UnityExposeClone* self);
static gboolean _unity_expose_clone_on_mouse_enter_clutter_actor_enter_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
static gboolean _unity_expose_clone_on_mouse_leave_clutter_actor_leave_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
static GObject * unity_expose_clone_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_expose_clone_finalize (GObject* obj);
static void unity_expose_clone_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void unity_expose_clone_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType unity_expose_manager_get_type (void);
GType unity_plugin_get_type (void);
#define UNITY_EXPOSE_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_TYPE_EXPOSE_MANAGER, UnityExposeManagerPrivate))
enum  {
      UNITY_EXPOSE_MANAGER_DUMMY_PROPERTY,
      UNITY_EXPOSE_MANAGER_EXPOSE_SHOWING,
      UNITY_EXPOSE_MANAGER_COVERFLOW,
      UNITY_EXPOSE_MANAGER_LEFT_BUFFER,
      UNITY_EXPOSE_MANAGER_RIGHT_BUFFER,
      UNITY_EXPOSE_MANAGER_TOP_BUFFER,
      UNITY_EXPOSE_MANAGER_BOTTOM_BUFFER,
      UNITY_EXPOSE_MANAGER_HOVERED_OPACITY,
      UNITY_EXPOSE_MANAGER_UNHOVERED_OPACITY,
      UNITY_EXPOSE_MANAGER_DARKEN
};
static void _g_list_free_g_object_unref (GList* self);
void unity_expose_manager_set_hovered_opacity (UnityExposeManager* self, guint8 value);
void unity_expose_manager_set_unhovered_opacity (UnityExposeManager* self, guint8 value);
void unity_expose_manager_set_darken (UnityExposeManager* self, guint8 value);
UnityExposeManager* unity_expose_manager_new (UnityPlugin* plugin, UnityLauncherLauncher* launcher);
UnityExposeManager* unity_expose_manager_construct (GType object_type, UnityPlugin* plugin, UnityLauncherLauncher* launcher);
void unity_expose_manager_end_expose (UnityExposeManager* self);
static void _unity_expose_manager_end_expose_clutter_actor_destroy (ClutterActor* _sender, gpointer self);
MutterPlugin* unity_plugin_get_plugin (UnityPlugin* self);
guint8 unity_expose_manager_get_hovered_opacity (UnityExposeManager* self);
guint8 unity_expose_manager_get_unhovered_opacity (UnityExposeManager* self);
guint8 unity_expose_manager_get_darken (UnityExposeManager* self);
static gboolean _lambda4_ (UnityExposeManager* self);
static gboolean __lambda4__clutter_actor_enter_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
static gboolean _lambda5_ (UnityExposeManager* self);
static gboolean __lambda5__clutter_actor_leave_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
gboolean unity_expose_manager_get_coverflow (UnityExposeManager* self);
static void unity_expose_manager_position_windows_coverflow (UnityExposeManager* self, GList* windows, ClutterActor* active);
static void unity_expose_manager_position_windows_on_grid (UnityExposeManager* self, GList* _windows);
static void unity_expose_manager_set_expose_showing (UnityExposeManager* self, gboolean value);
static gboolean unity_expose_manager_on_stage_captured_event (UnityExposeManager* self, ClutterEvent* event);
static gboolean _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event (ClutterActor* _sender, ClutterEvent* event, gpointer self);
void unity_expose_manager_start_expose (UnityExposeManager* self, GSList* windows);
static void unity_expose_manager_restore_window_position (UnityExposeManager* self, ClutterActor* actor);
gint unity_expose_manager_get_left_buffer (UnityExposeManager* self);
gint unity_expose_manager_get_right_buffer (UnityExposeManager* self);
static gint unity_expose_manager_direct_comparison (UnityExposeManager* self, void* a, void* b);
gint unity_expose_manager_get_top_buffer (UnityExposeManager* self);
gint unity_expose_manager_get_bottom_buffer (UnityExposeManager* self);
static void _lambda3_ (Block1Data* _data1_);
static void __lambda3__clutter_animation_completed (ClutterAnimation* _sender, gpointer self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (Block1Data* _data1_);
static void unity_expose_manager_handle_event_coverflow (UnityExposeManager* self, ClutterEvent* event);
static void unity_expose_manager_handle_event_expose (UnityExposeManager* self, ClutterEvent* event, ClutterActor* actor);
static void unity_expose_manager_pick_window (UnityExposeManager* self, ClutterEvent* event, ClutterActor* actor);
gboolean unity_expose_manager_get_expose_showing (UnityExposeManager* self);
void unity_expose_manager_set_coverflow (UnityExposeManager* self, gboolean value);
void unity_expose_manager_set_left_buffer (UnityExposeManager* self, gint value);
void unity_expose_manager_set_right_buffer (UnityExposeManager* self, gint value);
void unity_expose_manager_set_top_buffer (UnityExposeManager* self, gint value);
void unity_expose_manager_set_bottom_buffer (UnityExposeManager* self, gint value);
static GObject * unity_expose_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_expose_manager_finalize (GObject* obj);
static void unity_expose_manager_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void unity_expose_manager_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);



UnityExposeClone* unity_expose_clone_construct (GType object_type, ClutterActor* source) {
      UnityExposeClone * self;
      ClutterClone* _tmp0_;
      ClutterActor* _tmp3_;
      ClutterColor _tmp2_;
      ClutterColor _tmp1_ = {0};
      g_return_val_if_fail (source != NULL, NULL);
      self = g_object_newv (object_type, 0, NULL);
      unity_expose_clone_set_darken (self, (guint8) 0);
      unity_expose_clone_set_hovered_opacity (self, (guint8) 255);
      unity_expose_clone_set_unhovered_opacity (self, (guint8) 255);
      unity_expose_clone_set_source (self, source);
      self->priv->clone = (_tmp0_ = g_object_ref_sink ((ClutterClone*) clutter_clone_new (source)), _g_object_unref0 (self->priv->clone), _tmp0_);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->priv->clone);
      clutter_actor_show ((ClutterActor*) self->priv->clone);
      clutter_actor_set_position ((ClutterActor*) self->priv->clone, (float) 0, (float) 0);
      self->priv->darken_box = (_tmp3_ = (ClutterActor*) g_object_ref_sink ((ClutterRectangle*) clutter_rectangle_new_with_color ((_tmp2_ = (_tmp1_.red = (guint8) 0, _tmp1_.green = (guint8) 0, _tmp1_.blue = (guint8) 0, _tmp1_.alpha = (guint8) 255, _tmp1_), &_tmp2_))), _g_object_unref0 (self->priv->darken_box), _tmp3_);
      clutter_container_add_actor ((ClutterContainer*) self, self->priv->darken_box);
      clutter_actor_raise_top (self->priv->darken_box);
      clutter_actor_set_position (self->priv->darken_box, (float) 0, (float) 0);
      clutter_actor_set_size (self->priv->darken_box, clutter_actor_get_width (source), clutter_actor_get_height (source));
      clutter_actor_set_opacity (self->priv->darken_box, unity_expose_clone_get_darken (self));
      return self;
}


UnityExposeClone* unity_expose_clone_new (ClutterActor* source) {
      return unity_expose_clone_construct (UNITY_TYPE_EXPOSE_CLONE, source);
}


static gboolean unity_expose_clone_on_mouse_enter (UnityExposeClone* self, ClutterEvent* evnt) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      self->priv->hovered = TRUE;
      clutter_actor_set_opacity ((ClutterActor*) self, self->priv->_hovered_opacity);
      clutter_actor_set_opacity (self->priv->darken_box, (guint8) 0);
      result = FALSE;
      return result;
}


static gboolean unity_expose_clone_on_mouse_leave (UnityExposeClone* self, ClutterEvent* evnt) {
      gboolean result = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      self->priv->hovered = FALSE;
      clutter_actor_set_opacity ((ClutterActor*) self, self->priv->_unhovered_opacity);
      clutter_actor_set_opacity (self->priv->darken_box, unity_expose_clone_get_darken (self));
      result = FALSE;
      return result;
}


ClutterActor* unity_expose_clone_get_source (UnityExposeClone* self) {
      ClutterActor* result;
      g_return_val_if_fail (self != NULL, NULL);
      result = self->priv->_source;
      return result;
}


static void unity_expose_clone_set_source (UnityExposeClone* self, ClutterActor* value) {
      g_return_if_fail (self != NULL);
      self->priv->_source = value;
      g_object_notify ((GObject *) self, "source");
}


guint8 unity_expose_clone_get_hovered_opacity (UnityExposeClone* self) {
      guint8 result;
      g_return_val_if_fail (self != NULL, 0U);
      result = self->priv->_hovered_opacity;
      return result;
}


void unity_expose_clone_set_hovered_opacity (UnityExposeClone* self, guint8 value) {
      g_return_if_fail (self != NULL);
      self->priv->_hovered_opacity = value;
      g_object_notify ((GObject *) self, "hovered-opacity");
}


guint8 unity_expose_clone_get_unhovered_opacity (UnityExposeClone* self) {
      guint8 result;
      g_return_val_if_fail (self != NULL, 0U);
      result = self->priv->_unhovered_opacity;
      return result;
}


void unity_expose_clone_set_unhovered_opacity (UnityExposeClone* self, guint8 value) {
      g_return_if_fail (self != NULL);
      self->priv->_unhovered_opacity = value;
      g_object_notify ((GObject *) self, "unhovered-opacity");
}


guint8 unity_expose_clone_get_darken (UnityExposeClone* self) {
      guint8 result;
      g_return_val_if_fail (self != NULL, 0U);
      result = self->priv->_darken;
      return result;
}


void unity_expose_clone_set_darken (UnityExposeClone* self, guint8 value) {
      gboolean _tmp0_ = FALSE;
      g_return_if_fail (self != NULL);
      self->priv->_darken = value;
      if (!self->priv->hovered) {
            _tmp0_ = CLUTTER_IS_ACTOR (self->priv->darken_box);
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            clutter_actor_set_opacity (self->priv->darken_box, unity_expose_clone_get_darken (self));
      }
      g_object_notify ((GObject *) self, "darken");
}


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


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


static GObject * unity_expose_clone_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityExposeClone * self;
      parent_class = G_OBJECT_CLASS (unity_expose_clone_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_EXPOSE_CLONE (obj);
      {
            g_signal_connect_object ((ClutterActor*) self, "enter-event", (GCallback) _unity_expose_clone_on_mouse_enter_clutter_actor_enter_event, self, 0);
            g_signal_connect_object ((ClutterActor*) self, "leave-event", (GCallback) _unity_expose_clone_on_mouse_leave_clutter_actor_leave_event, self, 0);
      }
      return obj;
}


static void unity_expose_clone_class_init (UnityExposeCloneClass * klass) {
      unity_expose_clone_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (UnityExposeClonePrivate));
      G_OBJECT_CLASS (klass)->get_property = unity_expose_clone_get_property;
      G_OBJECT_CLASS (klass)->set_property = unity_expose_clone_set_property;
      G_OBJECT_CLASS (klass)->constructor = unity_expose_clone_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_expose_clone_finalize;
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_CLONE_SOURCE, g_param_spec_object ("source", "source", "source", CLUTTER_TYPE_ACTOR, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_CLONE_HOVERED_OPACITY, g_param_spec_uchar ("hovered-opacity", "hovered-opacity", "hovered-opacity", 0, G_MAXUINT8, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_CLONE_UNHOVERED_OPACITY, g_param_spec_uchar ("unhovered-opacity", "unhovered-opacity", "unhovered-opacity", 0, G_MAXUINT8, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_CLONE_DARKEN, g_param_spec_uchar ("darken", "darken", "darken", 0, G_MAXUINT8, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void unity_expose_clone_instance_init (UnityExposeClone * self) {
      self->priv = UNITY_EXPOSE_CLONE_GET_PRIVATE (self);
}


static void unity_expose_clone_finalize (GObject* obj) {
      UnityExposeClone * self;
      self = UNITY_EXPOSE_CLONE (obj);
      _g_object_unref0 (self->priv->clone);
      _g_object_unref0 (self->priv->darken_box);
      G_OBJECT_CLASS (unity_expose_clone_parent_class)->finalize (obj);
}


GType unity_expose_clone_get_type (void) {
      static volatile gsize unity_expose_clone_type_id__volatile = 0;
      if (g_once_init_enter (&unity_expose_clone_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityExposeCloneClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_expose_clone_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityExposeClone), 0, (GInstanceInitFunc) unity_expose_clone_instance_init, NULL };
            GType unity_expose_clone_type_id;
            unity_expose_clone_type_id = g_type_register_static (CLUTTER_TYPE_GROUP, "UnityExposeClone", &g_define_type_info, 0);
            g_once_init_leave (&unity_expose_clone_type_id__volatile, unity_expose_clone_type_id);
      }
      return unity_expose_clone_type_id__volatile;
}


static void unity_expose_clone_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
      UnityExposeClone * self;
      self = UNITY_EXPOSE_CLONE (object);
      switch (property_id) {
            case UNITY_EXPOSE_CLONE_SOURCE:
            g_value_set_object (value, unity_expose_clone_get_source (self));
            break;
            case UNITY_EXPOSE_CLONE_HOVERED_OPACITY:
            g_value_set_uchar (value, unity_expose_clone_get_hovered_opacity (self));
            break;
            case UNITY_EXPOSE_CLONE_UNHOVERED_OPACITY:
            g_value_set_uchar (value, unity_expose_clone_get_unhovered_opacity (self));
            break;
            case UNITY_EXPOSE_CLONE_DARKEN:
            g_value_set_uchar (value, unity_expose_clone_get_darken (self));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void unity_expose_clone_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
      UnityExposeClone * self;
      self = UNITY_EXPOSE_CLONE (object);
      switch (property_id) {
            case UNITY_EXPOSE_CLONE_SOURCE:
            unity_expose_clone_set_source (self, g_value_get_object (value));
            break;
            case UNITY_EXPOSE_CLONE_HOVERED_OPACITY:
            unity_expose_clone_set_hovered_opacity (self, g_value_get_uchar (value));
            break;
            case UNITY_EXPOSE_CLONE_UNHOVERED_OPACITY:
            unity_expose_clone_set_unhovered_opacity (self, g_value_get_uchar (value));
            break;
            case UNITY_EXPOSE_CLONE_DARKEN:
            unity_expose_clone_set_darken (self, g_value_get_uchar (value));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void _g_list_free_g_object_unref (GList* self) {
      g_list_foreach (self, (GFunc) g_object_unref, NULL);
      g_list_free (self);
}


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


UnityExposeManager* unity_expose_manager_construct (GType object_type, UnityPlugin* plugin, UnityLauncherLauncher* launcher) {
      UnityExposeManager * self;
      UnityLauncherLauncher* _tmp0_;
      UnityPlugin* _tmp1_;
      GList* _tmp2_;
      ClutterStage* _tmp3_;
      g_return_val_if_fail (plugin != NULL, NULL);
      g_return_val_if_fail (launcher != NULL, NULL);
      self = g_object_newv (object_type, 0, NULL);
      self->priv->launcher = (_tmp0_ = _g_object_ref0 (launcher), _g_object_unref0 (self->priv->launcher), _tmp0_);
      self->priv->owner = (_tmp1_ = _g_object_ref0 (plugin), _g_object_unref0 (self->priv->owner), _tmp1_);
      self->priv->exposed_windows = (_tmp2_ = NULL, __g_list_free_g_object_unref0 (self->priv->exposed_windows), _tmp2_);
      self->priv->stage = (_tmp3_ = CLUTTER_STAGE (unity_shell_get_stage ((UnityShell*) plugin)), _g_object_unref0 (self->priv->stage), _tmp3_);
      unity_expose_manager_set_hovered_opacity (self, (guint8) 255);
      unity_expose_manager_set_unhovered_opacity (self, (guint8) 255);
      unity_expose_manager_set_darken (self, (guint8) 0);
      return self;
}


UnityExposeManager* unity_expose_manager_new (UnityPlugin* plugin, UnityLauncherLauncher* launcher) {
      return unity_expose_manager_construct (UNITY_TYPE_EXPOSE_MANAGER, plugin, launcher);
}


static void _unity_expose_manager_end_expose_clutter_actor_destroy (ClutterActor* _sender, gpointer self) {
      unity_expose_manager_end_expose (self);
}


static gboolean _lambda4_ (UnityExposeManager* self) {
      gboolean result = FALSE;
      UnityLauncherQuicklistController* ql_controller;
      gboolean _tmp0_ = FALSE;
      ql_controller = _g_object_ref0 (unity_launcher_quicklist_controller_get_default ());
      if (unity_launcher_quicklist_controller_menu_is_open (ql_controller)) {
            _tmp0_ = self->priv->menu_in_hover_close_state;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            ctk_menu_set_close_on_leave (ql_controller->menu, FALSE);
      }
      result = FALSE;
      _g_object_unref0 (ql_controller);
      return result;
}


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


static gboolean _lambda5_ (UnityExposeManager* self) {
      gboolean result = FALSE;
      UnityLauncherQuicklistController* ql_controller;
      gboolean _tmp0_ = FALSE;
      ql_controller = _g_object_ref0 (unity_launcher_quicklist_controller_get_default ());
      if (unity_launcher_quicklist_controller_menu_is_open (ql_controller)) {
            _tmp0_ = self->priv->menu_in_hover_close_state;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            ctk_menu_set_close_on_leave (ql_controller->menu, TRUE);
      }
      result = FALSE;
      _g_object_unref0 (ql_controller);
      return result;
}


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


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


void unity_expose_manager_start_expose (UnityExposeManager* self, GSList* windows) {
      UnityLauncherQuicklistController* controller;
      GList* _tmp0_;
      ClutterGroup* _tmp1_;
      ClutterActor* window_group;
      ClutterActor* _tmp2_;
      GList* mutter_windows;
      g_return_if_fail (self != NULL);
      controller = _g_object_ref0 (unity_launcher_quicklist_controller_get_default ());
      if (unity_launcher_quicklist_controller_menu_is_open (controller)) {
            g_signal_connect_object ((ClutterActor*) controller->menu, "destroy", (GCallback) _unity_expose_manager_end_expose_clutter_actor_destroy, self, 0);
            self->priv->menu_in_hover_close_state = ctk_menu_get_close_on_leave (controller->menu);
      }
      self->priv->exposed_windows = (_tmp0_ = NULL, __g_list_free_g_object_unref0 (self->priv->exposed_windows), _tmp0_);
      if (self->priv->expose_group != NULL) {
            clutter_actor_destroy ((ClutterActor*) self->priv->expose_group);
      }
      self->priv->expose_group = (_tmp1_ = g_object_ref_sink ((ClutterGroup*) clutter_group_new ()), _g_object_unref0 (self->priv->expose_group), _tmp1_);
      window_group = _g_object_ref0 (mutter_plugin_get_normal_window_group (unity_plugin_get_plugin (self->priv->owner)));
      clutter_container_add_actor ((_tmp2_ = window_group, CLUTTER_IS_CONTAINER (_tmp2_) ? ((ClutterContainer*) _tmp2_) : NULL), (ClutterActor*) self->priv->expose_group);
      clutter_actor_raise_top ((ClutterActor*) self->priv->expose_group);
      clutter_actor_show ((ClutterActor*) self->priv->expose_group);
      {
            GSList* actor_collection;
            GSList* actor_it;
            actor_collection = windows;
            for (actor_it = actor_collection; actor_it != NULL; actor_it = actor_it->next) {
                  ClutterActor* actor;
                  actor = _g_object_ref0 ((ClutterActor*) actor_it->data);
                  {
                        gboolean _tmp3_ = FALSE;
                        UnityExposeClone* clone;
                        if (!MUTTER_IS_WINDOW (actor)) {
                              _tmp3_ = TRUE;
                        } else {
                              gboolean _tmp4_ = FALSE;
                              gboolean _tmp5_ = FALSE;
                              ClutterActor* _tmp6_;
                              if (mutter_window_get_window_type ((_tmp6_ = actor, MUTTER_IS_WINDOW (_tmp6_) ? ((MutterWindow*) _tmp6_) : NULL)) != META_COMP_WINDOW_NORMAL) {
                                    ClutterActor* _tmp7_;
                                    _tmp5_ = mutter_window_get_window_type ((_tmp7_ = actor, MUTTER_IS_WINDOW (_tmp7_) ? ((MutterWindow*) _tmp7_) : NULL)) != META_COMP_WINDOW_DIALOG;
                              } else {
                                    _tmp5_ = FALSE;
                              }
                              if (_tmp5_) {
                                    ClutterActor* _tmp8_;
                                    _tmp4_ = mutter_window_get_window_type ((_tmp8_ = actor, MUTTER_IS_WINDOW (_tmp8_) ? ((MutterWindow*) _tmp8_) : NULL)) != META_COMP_WINDOW_MODAL_DIALOG;
                              } else {
                                    _tmp4_ = FALSE;
                              }
                              _tmp3_ = _tmp4_;
                        }
                        if (_tmp3_) {
                              _g_object_unref0 (actor);
                              continue;
                        }
                        clone = g_object_ref_sink (unity_expose_clone_new (actor));
                        clutter_actor_set_position ((ClutterActor*) clone, clutter_actor_get_x (actor), clutter_actor_get_y (actor));
                        clutter_actor_set_size ((ClutterActor*) clone, clutter_actor_get_width (actor), clutter_actor_get_height (actor));
                        self->priv->exposed_windows = g_list_append (self->priv->exposed_windows, _g_object_ref0 (clone));
                        clutter_actor_set_reactive ((ClutterActor*) clone, TRUE);
                        clutter_container_add_actor ((ClutterContainer*) self->priv->expose_group, (ClutterActor*) clone);
                        unity_expose_clone_set_hovered_opacity (clone, self->priv->_hovered_opacity);
                        unity_expose_clone_set_unhovered_opacity (clone, self->priv->_unhovered_opacity);
                        clutter_actor_set_opacity ((ClutterActor*) clone, self->priv->_unhovered_opacity);
                        unity_expose_clone_set_darken (clone, self->priv->_darken);
                        g_signal_connect_object ((ClutterActor*) clone, "enter-event", (GCallback) __lambda4__clutter_actor_enter_event, self, 0);
                        g_signal_connect_object ((ClutterActor*) clone, "leave-event", (GCallback) __lambda5__clutter_actor_leave_event, self, 0);
                        _g_object_unref0 (actor);
                        _g_object_unref0 (clone);
                  }
            }
      }
      mutter_windows = mutter_plugin_get_windows (unity_plugin_get_plugin (self->priv->owner));
      {
            GList* w_collection;
            GList* w_it;
            w_collection = mutter_windows;
            for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
                  MutterWindow* w;
                  w = _g_object_ref0 ((MutterWindow*) w_it->data);
                  {
                        MutterWindow* _tmp9_;
                        MutterWindow* _tmp10_;
                        if (mutter_window_get_window_type (w) == META_COMP_WINDOW_DESKTOP) {
                              _g_object_unref0 (w);
                              continue;
                        }
                        clutter_actor_set_reactive ((_tmp9_ = w, CLUTTER_IS_ACTOR (_tmp9_) ? ((ClutterActor*) _tmp9_) : NULL), FALSE);
                        clutter_actor_set_opacity ((_tmp10_ = w, CLUTTER_IS_ACTOR (_tmp10_) ? ((ClutterActor*) _tmp10_) : NULL), (guint8) 0);
                        _g_object_unref0 (w);
                  }
            }
      }
      self->priv->coverflow_index = (guint) 0;
      if (self->priv->_coverflow) {
            unity_expose_manager_position_windows_coverflow (self, self->priv->exposed_windows, (ClutterActor*) ((UnityExposeClone*) g_list_nth_data (self->priv->exposed_windows, self->priv->coverflow_index)));
      } else {
            unity_expose_manager_position_windows_on_grid (self, self->priv->exposed_windows);
      }
      unity_expose_manager_set_expose_showing (self, TRUE);
      unity_shell_add_fullscreen_request ((UnityShell*) self->priv->owner, (GObject*) self);
      g_signal_connect_object ((ClutterActor*) self->priv->stage, "captured-event", (GCallback) _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event, self, 0);
      _g_object_unref0 (controller);
      _g_object_unref0 (window_group);
}


void unity_expose_manager_end_expose (UnityExposeManager* self) {
      UnityLauncherQuicklistController* controller;
      GList* mutter_windows;
      gboolean _tmp1_ = FALSE;
      guint _tmp4_;
      g_return_if_fail (self != NULL);
      controller = _g_object_ref0 (unity_launcher_quicklist_controller_get_default ());
      if (unity_launcher_quicklist_controller_menu_is_open (controller)) {
            guint _tmp0_;
            g_signal_parse_name ("destroy", CLUTTER_TYPE_ACTOR, &_tmp0_, NULL, FALSE);
            g_signal_handlers_disconnect_matched ((ClutterActor*) controller->menu, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _unity_expose_manager_end_expose_clutter_actor_destroy, self);
            unity_launcher_quicklist_controller_close_menu (controller);
      }
      mutter_windows = mutter_plugin_get_windows (unity_plugin_get_plugin (self->priv->owner));
      {
            GList* window_collection;
            GList* window_it;
            window_collection = mutter_windows;
            for (window_it = window_collection; window_it != NULL; window_it = window_it->next) {
                  MutterWindow* window;
                  window = _g_object_ref0 ((MutterWindow*) window_it->data);
                  {
                        gboolean exposed;
                        exposed = FALSE;
                        {
                              GList* clone_collection;
                              GList* clone_it;
                              clone_collection = self->priv->exposed_windows;
                              for (clone_it = clone_collection; clone_it != NULL; clone_it = clone_it->next) {
                                    UnityExposeClone* clone;
                                    clone = _g_object_ref0 ((UnityExposeClone*) clone_it->data);
                                    {
                                          if (unity_expose_clone_get_source (clone) == CLUTTER_ACTOR (window)) {
                                                exposed = TRUE;
                                                _g_object_unref0 (clone);
                                                break;
                                          }
                                          _g_object_unref0 (clone);
                                    }
                              }
                        }
                        if (!exposed) {
                              clutter_actor_animate ((ClutterActor*) window, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "opacity", 255, NULL);
                        }
                        clutter_actor_set_reactive ((ClutterActor*) window, TRUE);
                        _g_object_unref0 (window);
                  }
            }
      }
      {
            GList* actor_collection;
            GList* actor_it;
            actor_collection = self->priv->exposed_windows;
            for (actor_it = actor_collection; actor_it != NULL; actor_it = actor_it->next) {
                  ClutterActor* actor;
                  actor = _g_object_ref0 ((ClutterActor*) ((UnityExposeClone*) actor_it->data));
                  {
                        unity_expose_manager_restore_window_position (self, actor);
                        _g_object_unref0 (actor);
                  }
            }
      }
      if (UNITY_IS_EXPOSE_CLONE (self->priv->last_selected_clone)) {
            _tmp1_ = MUTTER_IS_WINDOW (unity_expose_clone_get_source (self->priv->last_selected_clone));
      } else {
            _tmp1_ = FALSE;
      }
      if (_tmp1_) {
            UnityExposeClone* clone;
            guint32 time_ = 0U;
            ClutterActor* _tmp2_;
            MetaWindow* meta;
            UnityExposeClone* _tmp3_;
            clone = _g_object_ref0 (self->priv->last_selected_clone);
            clutter_actor_raise_top ((ClutterActor*) clone);
            meta = mutter_window_get_meta_window ((_tmp2_ = unity_expose_clone_get_source (clone), MUTTER_IS_WINDOW (_tmp2_) ? ((MutterWindow*) _tmp2_) : NULL));
            time_ = meta_display_get_current_time (meta_window_get_display (meta));
            meta_workspace_activate (meta_window_get_workspace (meta), time_);
            meta_window_activate (meta, time_);
            self->priv->last_selected_clone = (_tmp3_ = NULL, _g_object_unref0 (self->priv->last_selected_clone), _tmp3_);
            _g_object_unref0 (clone);
      }
      unity_expose_manager_set_expose_showing (self, FALSE);
      unity_shell_remove_fullscreen_request ((UnityShell*) self->priv->owner, (GObject*) self);
      g_signal_parse_name ("captured-event", CLUTTER_TYPE_ACTOR, &_tmp4_, NULL, FALSE);
      g_signal_handlers_disconnect_matched ((ClutterActor*) self->priv->stage, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event, self);
      _g_object_unref0 (controller);
}


static void unity_expose_manager_position_windows_coverflow (UnityExposeManager* self, GList* windows, ClutterActor* active) {
      ClutterActor* last;
      gint middle_size;
      gint width;
      gint slice_width;
      gint middle_y;
      gint middle_x;
      gint middle_index;
      float scale;
      ClutterActor* _tmp0_;
      gint current_x;
      ClutterActor* _tmp3_;
      g_return_if_fail (self != NULL);
      g_return_if_fail (active != NULL);
      last = NULL;
      middle_size = (gint) (clutter_actor_get_width ((ClutterActor*) self->priv->stage) * 0.8f);
      width = (((gint) clutter_actor_get_width ((ClutterActor*) self->priv->stage)) - self->priv->_left_buffer) - self->priv->_right_buffer;
      slice_width = width / 10;
      middle_y = ((gint) clutter_actor_get_height ((ClutterActor*) self->priv->stage)) / 2;
      middle_x = self->priv->_left_buffer + (width / 2);
      middle_index = g_list_index (windows, active);
      scale = MIN (1.f, (clutter_actor_get_height ((ClutterActor*) self->priv->stage) / 2) / MAX (clutter_actor_get_height (active), clutter_actor_get_width (active)));
      scale = 1.f;
      clutter_actor_set_anchor_point_from_gravity (active, CLUTTER_GRAVITY_CENTER);
      clutter_actor_animate (active, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) middle_x, "y", (float) middle_y, "depth", clutter_actor_get_width ((ClutterActor*) self->priv->stage) * (-0.7), "scale-x", scale, "scale-y", scale, "rotation-angle-y", 0.f, NULL);
      clutter_actor_raise_top (active);
      last = (_tmp0_ = _g_object_ref0 (active), _g_object_unref0 (last), _tmp0_);
      current_x = middle_x - middle_size;
      {
            gint i;
            i = middle_index - 1;
            {
                  gboolean _tmp1_;
                  _tmp1_ = TRUE;
                  while (TRUE) {
                        ClutterActor* actor;
                        ClutterActor* _tmp2_;
                        if (!_tmp1_) {
                              i--;
                        }
                        _tmp1_ = FALSE;
                        if (!(i >= 0)) {
                              break;
                        }
                        actor = _g_object_ref0 ((ClutterActor*) g_list_nth_data (windows, (guint) i));
                        clutter_actor_set_anchor_point_from_gravity (actor, CLUTTER_GRAVITY_CENTER);
                        clutter_actor_lower (actor, last);
                        scale = MIN (1.f, (clutter_actor_get_height ((ClutterActor*) self->priv->stage) / 2) / MAX (clutter_actor_get_height (actor), clutter_actor_get_width (actor)));
                        scale = 1.f;
                        clutter_actor_animate (actor, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) current_x, "y", (float) middle_y, "depth", clutter_actor_get_width ((ClutterActor*) self->priv->stage) * (-0.7), "scale-x", scale, "scale-y", scale, "rotation-angle-y", 60.f, NULL);
                        current_x = current_x - slice_width;
                        last = (_tmp2_ = _g_object_ref0 (actor), _g_object_unref0 (last), _tmp2_);
                        _g_object_unref0 (actor);
                  }
            }
      }
      last = (_tmp3_ = _g_object_ref0 (active), _g_object_unref0 (last), _tmp3_);
      current_x = middle_x + middle_size;
      {
            gint i;
            i = middle_index + 1;
            {
                  gboolean _tmp4_;
                  _tmp4_ = TRUE;
                  while (TRUE) {
                        ClutterActor* actor;
                        ClutterActor* _tmp5_;
                        if (!_tmp4_) {
                              i++;
                        }
                        _tmp4_ = FALSE;
                        if (!(i < g_list_length (windows))) {
                              break;
                        }
                        actor = _g_object_ref0 ((ClutterActor*) g_list_nth_data (windows, (guint) i));
                        clutter_actor_set_anchor_point_from_gravity (actor, CLUTTER_GRAVITY_CENTER);
                        clutter_actor_lower (actor, last);
                        scale = MIN (1.f, (clutter_actor_get_height ((ClutterActor*) self->priv->stage) / 2) / MAX (clutter_actor_get_height (actor), clutter_actor_get_width (actor)));
                        scale = 1.f;
                        clutter_actor_animate (actor, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) current_x, "y", (float) middle_y, "depth", clutter_actor_get_width ((ClutterActor*) self->priv->stage) * (-0.7), "scale-x", scale, "scale-y", scale, "rotation-angle-y", -60.f, NULL);
                        current_x = current_x + slice_width;
                        last = (_tmp5_ = _g_object_ref0 (actor), _g_object_unref0 (last), _tmp5_);
                        _g_object_unref0 (actor);
                  }
            }
      }
      _g_object_unref0 (last);
}


static gint unity_expose_manager_direct_comparison (UnityExposeManager* self, void* a, void* b) {
      gint result = 0;
      g_return_val_if_fail (self != NULL, 0);
      if (a > b) {
            result = 1;
            return result;
      } else {
            if (a < b) {
                  result = -1;
                  return result;
            }
      }
      result = 0;
      return result;
}


static void unity_expose_manager_position_windows_on_grid (UnityExposeManager* self, GList* _windows) {
      GList* windows;
      gint count;
      gint cols;
      gint rows;
      gint boxWidth;
      gint boxHeight;
      g_return_if_fail (self != NULL);
      windows = g_list_copy (_windows);
      windows = g_list_sort (windows, (GCompareFunc) unity_expose_manager_direct_comparison);
      count = (gint) g_list_length (windows);
      cols = (gint) ceil (sqrt ((double) count));
      rows = 1;
      while (TRUE) {
            if (!((cols * rows) < count)) {
                  break;
            }
            rows++;
      }
      boxWidth = (gint) (((clutter_actor_get_width ((ClutterActor*) self->priv->stage) - self->priv->_left_buffer) - self->priv->_right_buffer) / cols);
      boxHeight = (gint) (((clutter_actor_get_height ((ClutterActor*) self->priv->stage) - self->priv->_top_buffer) - self->priv->_bottom_buffer) / rows);
      {
            gint row;
            row = 0;
            {
                  gboolean _tmp0_;
                  _tmp0_ = TRUE;
                  while (TRUE) {
                        if (!_tmp0_) {
                              row++;
                        }
                        _tmp0_ = FALSE;
                        if (!(row < rows)) {
                              break;
                        }
                        if (row == (rows - 1)) {
                              boxWidth = (gint) (((clutter_actor_get_width ((ClutterActor*) self->priv->stage) - self->priv->_left_buffer) - self->priv->_right_buffer) / g_list_length (windows));
                        }
                        {
                              gint col;
                              col = 0;
                              {
                                    gboolean _tmp1_;
                                    _tmp1_ = TRUE;
                                    while (TRUE) {
                                          gint centerX;
                                          gint centerY;
                                          ClutterActor* window;
                                          gint windowX;
                                          gint windowY;
                                          float scale;
                                          if (!_tmp1_) {
                                                col++;
                                          }
                                          _tmp1_ = FALSE;
                                          if (!(col < cols)) {
                                                break;
                                          }
                                          if (g_list_length (windows) == 0) {
                                                __g_list_free_g_object_unref0 (windows);
                                                return;
                                          }
                                          centerX = ((boxWidth / 2) + (boxWidth * col)) + self->priv->_left_buffer;
                                          centerY = ((boxHeight / 2) + (boxHeight * row)) + self->priv->_top_buffer;
                                          window = NULL;
                                          {
                                                GList* actor_collection;
                                                GList* actor_it;
                                                actor_collection = windows;
                                                for (actor_it = actor_collection; actor_it != NULL; actor_it = actor_it->next) {
                                                      ClutterActor* actor;
                                                      actor = _g_object_ref0 ((ClutterActor*) actor_it->data);
                                                      {
                                                            double window_distance;
                                                            double actor_distance;
                                                            if (window == NULL) {
                                                                  ClutterActor* _tmp2_;
                                                                  window = (_tmp2_ = _g_object_ref0 (actor), _g_object_unref0 (window), _tmp2_);
                                                                  _g_object_unref0 (actor);
                                                                  continue;
                                                            }
                                                            window_distance = sqrt (fabs ((double) (centerX - (clutter_actor_get_x (window) + (clutter_actor_get_width (window) / 2)))) + fabs ((double) (centerY - (clutter_actor_get_y (window) + (clutter_actor_get_height (window) / 2)))));
                                                            actor_distance = sqrt (fabs ((double) (centerX - (clutter_actor_get_x (actor) + (clutter_actor_get_width (actor) / 2)))) + fabs ((double) (centerY - (clutter_actor_get_y (actor) + (clutter_actor_get_height (actor) / 2)))));
                                                            if (actor_distance < window_distance) {
                                                                  ClutterActor* _tmp3_;
                                                                  window = (_tmp3_ = _g_object_ref0 (actor), _g_object_unref0 (window), _tmp3_);
                                                            }
                                                            _g_object_unref0 (actor);
                                                      }
                                                }
                                          }
                                          windows = g_list_remove (windows, window);
                                          windowX = centerX - (((gint) clutter_actor_get_width (window)) / 2);
                                          windowY = centerY - (((gint) clutter_actor_get_height (window)) / 2);
                                          scale = MIN (MIN ((float) 1, (boxWidth - 20) / clutter_actor_get_width (window)), MIN ((float) 1, (boxHeight - 20) / clutter_actor_get_height (window)));
                                          g_object_set ((GObject*) window, "scale-gravity", CLUTTER_GRAVITY_CENTER, NULL);
                                          clutter_actor_animate (window, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "x", (float) windowX, "y", (float) windowY, "scale-x", scale, "scale-y", scale, NULL);
                                          _g_object_unref0 (window);
                                    }
                              }
                        }
                  }
            }
      }
      __g_list_free_g_object_unref0 (windows);
}


static void _lambda3_ (Block1Data* _data1_) {
      UnityExposeManager * self;
      self = _data1_->self;
      clutter_actor_destroy (_data1_->actor);
      clutter_actor_set_opacity (_data1_->window, (guint8) 255);
}


static void __lambda3__clutter_animation_completed (ClutterAnimation* _sender, gpointer self) {
      _lambda3_ (self);
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
      ++_data1_->_ref_count_;
      return _data1_;
}


static void block1_data_unref (Block1Data* _data1_) {
      if ((--_data1_->_ref_count_) == 0) {
            _g_object_unref0 (_data1_->self);
            _g_object_unref0 (_data1_->window);
            _g_object_unref0 (_data1_->actor);
            g_slice_free (Block1Data, _data1_);
      }
}


static void unity_expose_manager_restore_window_position (UnityExposeManager* self, ClutterActor* actor) {
      Block1Data* _data1_;
      ClutterActor* _tmp0_;
      guint8 opacity;
      gboolean _tmp1_ = FALSE;
      ClutterActor* _tmp2_;
      ClutterAnimation* anim;
      g_return_if_fail (self != NULL);
      g_return_if_fail (actor != NULL);
      _data1_ = g_slice_new0 (Block1Data);
      _data1_->_ref_count_ = 1;
      _data1_->self = g_object_ref (self);
      _data1_->actor = _g_object_ref0 (actor);
      if (!UNITY_IS_EXPOSE_CLONE (_data1_->actor)) {
            block1_data_unref (_data1_);
            return;
      }
      clutter_actor_set_anchor_point_from_gravity (_data1_->actor, CLUTTER_GRAVITY_NORTH_WEST);
      _data1_->window = _g_object_ref0 (unity_expose_clone_get_source ((_tmp0_ = _data1_->actor, UNITY_IS_EXPOSE_CLONE (_tmp0_) ? ((UnityExposeClone*) _tmp0_) : NULL)));
      opacity = (guint8) 0;
      if (mutter_window_showing_on_its_workspace ((_tmp2_ = _data1_->window, MUTTER_IS_WINDOW (_tmp2_) ? ((MutterWindow*) _tmp2_) : NULL))) {
            ClutterActor* _tmp3_;
            _tmp1_ = mutter_window_get_workspace ((_tmp3_ = _data1_->window, MUTTER_IS_WINDOW (_tmp3_) ? ((MutterWindow*) _tmp3_) : NULL)) == meta_screen_get_active_workspace_index (mutter_plugin_get_screen (unity_plugin_get_plugin (self->priv->owner)));
      } else {
            _tmp1_ = FALSE;
      }
      if (_tmp1_) {
            opacity = (guint8) 255;
      }
      g_object_set ((GObject*) _data1_->actor, "scale-gravity", CLUTTER_GRAVITY_CENTER, NULL);
      anim = _g_object_ref0 (clutter_actor_animate (_data1_->actor, (gulong) CLUTTER_EASE_IN_OUT_SINE, (guint) 250, "scale-x", 1.f, "scale-y", 1.f, "opacity", opacity, "x", clutter_actor_get_x (_data1_->window), "y", clutter_actor_get_y (_data1_->window), NULL));
      clutter_actor_set_opacity (_data1_->window, (guint8) 0);
      g_signal_connect_data (anim, "completed", (GCallback) __lambda3__clutter_animation_completed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
      _g_object_unref0 (anim);
      block1_data_unref (_data1_);
}


static void unity_expose_manager_handle_event_coverflow (UnityExposeManager* self, ClutterEvent* event) {
      g_return_if_fail (self != NULL);
      if ((*event).type == CLUTTER_KEY_RELEASE) {
            guint16 keycode;
            gboolean _tmp0_ = FALSE;
            keycode = clutter_event_get_key_code (event);
            if (keycode == 113) {
                  _tmp0_ = self->priv->coverflow_index > 0;
            } else {
                  _tmp0_ = FALSE;
            }
            if (_tmp0_) {
                  self->priv->coverflow_index--;
            } else {
                  gboolean _tmp1_ = FALSE;
                  if (keycode == 114) {
                        _tmp1_ = self->priv->coverflow_index < (g_list_length (self->priv->exposed_windows) - 1);
                  } else {
                        _tmp1_ = FALSE;
                  }
                  if (_tmp1_) {
                        self->priv->coverflow_index++;
                  } else {
                        if (keycode == 36) {
                              UnityExposeClone* clone;
                              ClutterActor* _tmp2_;
                              MetaWindow* meta;
                              clone = _g_object_ref0 ((UnityExposeClone*) g_list_nth_data (self->priv->exposed_windows, self->priv->coverflow_index));
                              clutter_actor_raise_top ((ClutterActor*) clone);
                              meta = mutter_window_get_meta_window ((_tmp2_ = unity_expose_clone_get_source (clone), MUTTER_IS_WINDOW (_tmp2_) ? ((MutterWindow*) _tmp2_) : NULL));
                              meta_workspace_activate (meta_window_get_workspace (meta), clutter_event_get_time (event));
                              meta_window_activate (meta, clutter_event_get_time (event));
                              unity_expose_manager_end_expose (self);
                              _g_object_unref0 (clone);
                        }
                  }
            }
            unity_expose_manager_position_windows_coverflow (self, self->priv->exposed_windows, (ClutterActor*) ((UnityExposeClone*) g_list_nth_data (self->priv->exposed_windows, self->priv->coverflow_index)));
      }
}


static void unity_expose_manager_handle_event_expose (UnityExposeManager* self, ClutterEvent* event, ClutterActor* actor) {
      gboolean _tmp0_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (actor != NULL);
      if ((*event).type == CLUTTER_BUTTON_RELEASE) {
            _tmp0_ = clutter_event_get_button (event) == 1;
      } else {
            _tmp0_ = FALSE;
      }
      if (_tmp0_) {
            ClutterActor* _tmp2_;
            UnityExposeClone* clone;
            gboolean _tmp3_ = FALSE;
            guint _tmp5_;
            while (TRUE) {
                  gboolean _tmp1_ = FALSE;
                  if (clutter_actor_get_parent (actor) != NULL) {
                        _tmp1_ = !UNITY_IS_EXPOSE_CLONE (actor);
                  } else {
                        _tmp1_ = FALSE;
                  }
                  if (!_tmp1_) {
                        break;
                  }
                  actor = clutter_actor_get_parent (actor);
            }
            clone = _g_object_ref0 ((_tmp2_ = actor, UNITY_IS_EXPOSE_CLONE (_tmp2_) ? ((UnityExposeClone*) _tmp2_) : NULL));
            if (clone != NULL) {
                  _tmp3_ = MUTTER_IS_WINDOW (unity_expose_clone_get_source (clone));
            } else {
                  _tmp3_ = FALSE;
            }
            if (_tmp3_) {
                  ClutterActor* _tmp4_;
                  MetaWindow* meta;
                  clutter_actor_raise_top ((ClutterActor*) clone);
                  meta = mutter_window_get_meta_window ((_tmp4_ = unity_expose_clone_get_source (clone), MUTTER_IS_WINDOW (_tmp4_) ? ((MutterWindow*) _tmp4_) : NULL));
                  meta_workspace_activate (meta_window_get_workspace (meta), clutter_event_get_time (event));
                  meta_window_activate (meta, clutter_event_get_time (event));
            }
            g_signal_parse_name ("captured-event", CLUTTER_TYPE_ACTOR, &_tmp5_, NULL, FALSE);
            g_signal_handlers_disconnect_matched ((ClutterActor*) self->priv->stage, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _unity_expose_manager_on_stage_captured_event_clutter_actor_captured_event, self);
            unity_expose_manager_end_expose (self);
            _g_object_unref0 (clone);
      }
}


static void unity_expose_manager_pick_window (UnityExposeManager* self, ClutterEvent* event, ClutterActor* actor) {
      ClutterActor* _tmp1_;
      UnityExposeClone* clone;
      gboolean _tmp2_ = FALSE;
      g_return_if_fail (self != NULL);
      g_return_if_fail (actor != NULL);
      while (TRUE) {
            gboolean _tmp0_ = FALSE;
            if (clutter_actor_get_parent (actor) != NULL) {
                  _tmp0_ = !UNITY_IS_EXPOSE_CLONE (actor);
            } else {
                  _tmp0_ = FALSE;
            }
            if (!_tmp0_) {
                  break;
            }
            actor = clutter_actor_get_parent (actor);
      }
      clone = _g_object_ref0 ((_tmp1_ = actor, UNITY_IS_EXPOSE_CLONE (_tmp1_) ? ((UnityExposeClone*) _tmp1_) : NULL));
      if (clone != NULL) {
            _tmp2_ = MUTTER_IS_WINDOW (unity_expose_clone_get_source (clone));
      } else {
            _tmp2_ = FALSE;
      }
      if (_tmp2_) {
            UnityExposeClone* _tmp3_;
            self->priv->last_selected_clone = (_tmp3_ = _g_object_ref0 (clone), _g_object_unref0 (self->priv->last_selected_clone), _tmp3_);
      } else {
            UnityExposeClone* _tmp4_;
            self->priv->last_selected_clone = (_tmp4_ = NULL, _g_object_unref0 (self->priv->last_selected_clone), _tmp4_);
      }
      _g_object_unref0 (clone);
}


static gboolean unity_expose_manager_on_stage_captured_event (UnityExposeManager* self, ClutterEvent* event) {
      gboolean result = FALSE;
      gboolean _tmp0_ = FALSE;
      gboolean event_over_menu;
      float x = 0.0F;
      float y = 0.0F;
      ClutterActor* actor;
      ClutterActor* menu;
      gboolean _tmp4_ = FALSE;
      g_return_val_if_fail (self != NULL, FALSE);
      if ((*event).type == CLUTTER_ENTER) {
            _tmp0_ = TRUE;
      } else {
            _tmp0_ = (*event).type == CLUTTER_LEAVE;
      }
      if (_tmp0_) {
            result = FALSE;
            return result;
      }
      event_over_menu = FALSE;
      clutter_event_get_coords (event, &x, &y);
      actor = clutter_stage_get_actor_at_pos (self->priv->stage, CLUTTER_PICK_REACTIVE, (gint) x, (gint) y);
      menu = NULL;
      if (unity_launcher_quicklist_controller_menu_is_open (unity_launcher_quicklist_controller_get_default ())) {
            menu = (ClutterActor*) unity_launcher_quicklist_controller_get_default ()->menu;
      }
      if (menu != NULL) {
            gboolean _tmp1_ = FALSE;
            gboolean _tmp2_ = FALSE;
            gboolean _tmp3_ = FALSE;
            if (x > clutter_actor_get_x (menu)) {
                  _tmp3_ = x < (clutter_actor_get_x (menu) + clutter_actor_get_width (menu));
            } else {
                  _tmp3_ = FALSE;
            }
            if (_tmp3_) {
                  _tmp2_ = y > clutter_actor_get_y (menu);
            } else {
                  _tmp2_ = FALSE;
            }
            if (_tmp2_) {
                  _tmp1_ = y < (clutter_actor_get_y (menu) + clutter_actor_get_height (menu));
            } else {
                  _tmp1_ = FALSE;
            }
            if (_tmp1_) {
                  event_over_menu = TRUE;
            }
      }
      if ((*event).type == CLUTTER_BUTTON_PRESS) {
            _tmp4_ = !event_over_menu;
      } else {
            _tmp4_ = FALSE;
      }
      if (_tmp4_) {
            unity_expose_manager_pick_window (self, event, actor);
      } else {
            UnityExposeClone* _tmp5_;
            self->priv->last_selected_clone = (_tmp5_ = NULL, _g_object_unref0 (self->priv->last_selected_clone), _tmp5_);
      }
      if (self->priv->_coverflow) {
            unity_expose_manager_handle_event_coverflow (self, event);
      } else {
            unity_expose_manager_handle_event_expose (self, event, actor);
      }
      result = !event_over_menu;
      return result;
}


gboolean unity_expose_manager_get_expose_showing (UnityExposeManager* self) {
      gboolean result;
      g_return_val_if_fail (self != NULL, FALSE);
      result = self->priv->_expose_showing;
      return result;
}


static void unity_expose_manager_set_expose_showing (UnityExposeManager* self, gboolean value) {
      g_return_if_fail (self != NULL);
      self->priv->_expose_showing = value;
      g_object_notify ((GObject *) self, "expose-showing");
}


gboolean unity_expose_manager_get_coverflow (UnityExposeManager* self) {
      gboolean result;
      g_return_val_if_fail (self != NULL, FALSE);
      result = self->priv->_coverflow;
      return result;
}


void unity_expose_manager_set_coverflow (UnityExposeManager* self, gboolean value) {
      g_return_if_fail (self != NULL);
      self->priv->_coverflow = value;
      g_object_notify ((GObject *) self, "coverflow");
}


gint unity_expose_manager_get_left_buffer (UnityExposeManager* self) {
      gint result;
      g_return_val_if_fail (self != NULL, 0);
      result = self->priv->_left_buffer;
      return result;
}


void unity_expose_manager_set_left_buffer (UnityExposeManager* self, gint value) {
      g_return_if_fail (self != NULL);
      self->priv->_left_buffer = value;
      g_object_notify ((GObject *) self, "left-buffer");
}


gint unity_expose_manager_get_right_buffer (UnityExposeManager* self) {
      gint result;
      g_return_val_if_fail (self != NULL, 0);
      result = self->priv->_right_buffer;
      return result;
}


void unity_expose_manager_set_right_buffer (UnityExposeManager* self, gint value) {
      g_return_if_fail (self != NULL);
      self->priv->_right_buffer = value;
      g_object_notify ((GObject *) self, "right-buffer");
}


gint unity_expose_manager_get_top_buffer (UnityExposeManager* self) {
      gint result;
      g_return_val_if_fail (self != NULL, 0);
      result = self->priv->_top_buffer;
      return result;
}


void unity_expose_manager_set_top_buffer (UnityExposeManager* self, gint value) {
      g_return_if_fail (self != NULL);
      self->priv->_top_buffer = value;
      g_object_notify ((GObject *) self, "top-buffer");
}


gint unity_expose_manager_get_bottom_buffer (UnityExposeManager* self) {
      gint result;
      g_return_val_if_fail (self != NULL, 0);
      result = self->priv->_bottom_buffer;
      return result;
}


void unity_expose_manager_set_bottom_buffer (UnityExposeManager* self, gint value) {
      g_return_if_fail (self != NULL);
      self->priv->_bottom_buffer = value;
      g_object_notify ((GObject *) self, "bottom-buffer");
}


guint8 unity_expose_manager_get_hovered_opacity (UnityExposeManager* self) {
      guint8 result;
      g_return_val_if_fail (self != NULL, 0U);
      result = self->priv->_hovered_opacity;
      return result;
}


void unity_expose_manager_set_hovered_opacity (UnityExposeManager* self, guint8 value) {
      g_return_if_fail (self != NULL);
      self->priv->_hovered_opacity = value;
      g_object_notify ((GObject *) self, "hovered-opacity");
}


guint8 unity_expose_manager_get_unhovered_opacity (UnityExposeManager* self) {
      guint8 result;
      g_return_val_if_fail (self != NULL, 0U);
      result = self->priv->_unhovered_opacity;
      return result;
}


void unity_expose_manager_set_unhovered_opacity (UnityExposeManager* self, guint8 value) {
      g_return_if_fail (self != NULL);
      self->priv->_unhovered_opacity = value;
      g_object_notify ((GObject *) self, "unhovered-opacity");
}


guint8 unity_expose_manager_get_darken (UnityExposeManager* self) {
      guint8 result;
      g_return_val_if_fail (self != NULL, 0U);
      result = self->priv->_darken;
      return result;
}


void unity_expose_manager_set_darken (UnityExposeManager* self, guint8 value) {
      g_return_if_fail (self != NULL);
      self->priv->_darken = value;
      g_object_notify ((GObject *) self, "darken");
}


static GObject * unity_expose_manager_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityExposeManager * self;
      parent_class = G_OBJECT_CLASS (unity_expose_manager_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_EXPOSE_MANAGER (obj);
      {
      }
      return obj;
}


static void unity_expose_manager_class_init (UnityExposeManagerClass * klass) {
      unity_expose_manager_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (UnityExposeManagerPrivate));
      G_OBJECT_CLASS (klass)->get_property = unity_expose_manager_get_property;
      G_OBJECT_CLASS (klass)->set_property = unity_expose_manager_set_property;
      G_OBJECT_CLASS (klass)->constructor = unity_expose_manager_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_expose_manager_finalize;
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_EXPOSE_SHOWING, g_param_spec_boolean ("expose-showing", "expose-showing", "expose-showing", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_COVERFLOW, g_param_spec_boolean ("coverflow", "coverflow", "coverflow", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_LEFT_BUFFER, g_param_spec_int ("left-buffer", "left-buffer", "left-buffer", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_RIGHT_BUFFER, g_param_spec_int ("right-buffer", "right-buffer", "right-buffer", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_TOP_BUFFER, g_param_spec_int ("top-buffer", "top-buffer", "top-buffer", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_BOTTOM_BUFFER, g_param_spec_int ("bottom-buffer", "bottom-buffer", "bottom-buffer", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_HOVERED_OPACITY, g_param_spec_uchar ("hovered-opacity", "hovered-opacity", "hovered-opacity", 0, G_MAXUINT8, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_UNHOVERED_OPACITY, g_param_spec_uchar ("unhovered-opacity", "unhovered-opacity", "unhovered-opacity", 0, G_MAXUINT8, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
      g_object_class_install_property (G_OBJECT_CLASS (klass), UNITY_EXPOSE_MANAGER_DARKEN, g_param_spec_uchar ("darken", "darken", "darken", 0, G_MAXUINT8, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void unity_expose_manager_instance_init (UnityExposeManager * self) {
      self->priv = UNITY_EXPOSE_MANAGER_GET_PRIVATE (self);
      self->priv->last_selected_clone = NULL;
      self->priv->menu_in_hover_close_state = FALSE;
}


static void unity_expose_manager_finalize (GObject* obj) {
      UnityExposeManager * self;
      self = UNITY_EXPOSE_MANAGER (obj);
      __g_list_free_g_object_unref0 (self->priv->exposed_windows);
      _g_object_unref0 (self->priv->expose_group);
      _g_object_unref0 (self->priv->owner);
      _g_object_unref0 (self->priv->stage);
      _g_object_unref0 (self->priv->launcher);
      _g_object_unref0 (self->priv->last_selected_clone);
      G_OBJECT_CLASS (unity_expose_manager_parent_class)->finalize (obj);
}


GType unity_expose_manager_get_type (void) {
      static volatile gsize unity_expose_manager_type_id__volatile = 0;
      if (g_once_init_enter (&unity_expose_manager_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityExposeManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_expose_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityExposeManager), 0, (GInstanceInitFunc) unity_expose_manager_instance_init, NULL };
            GType unity_expose_manager_type_id;
            unity_expose_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "UnityExposeManager", &g_define_type_info, 0);
            g_once_init_leave (&unity_expose_manager_type_id__volatile, unity_expose_manager_type_id);
      }
      return unity_expose_manager_type_id__volatile;
}


static void unity_expose_manager_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
      UnityExposeManager * self;
      self = UNITY_EXPOSE_MANAGER (object);
      switch (property_id) {
            case UNITY_EXPOSE_MANAGER_EXPOSE_SHOWING:
            g_value_set_boolean (value, unity_expose_manager_get_expose_showing (self));
            break;
            case UNITY_EXPOSE_MANAGER_COVERFLOW:
            g_value_set_boolean (value, unity_expose_manager_get_coverflow (self));
            break;
            case UNITY_EXPOSE_MANAGER_LEFT_BUFFER:
            g_value_set_int (value, unity_expose_manager_get_left_buffer (self));
            break;
            case UNITY_EXPOSE_MANAGER_RIGHT_BUFFER:
            g_value_set_int (value, unity_expose_manager_get_right_buffer (self));
            break;
            case UNITY_EXPOSE_MANAGER_TOP_BUFFER:
            g_value_set_int (value, unity_expose_manager_get_top_buffer (self));
            break;
            case UNITY_EXPOSE_MANAGER_BOTTOM_BUFFER:
            g_value_set_int (value, unity_expose_manager_get_bottom_buffer (self));
            break;
            case UNITY_EXPOSE_MANAGER_HOVERED_OPACITY:
            g_value_set_uchar (value, unity_expose_manager_get_hovered_opacity (self));
            break;
            case UNITY_EXPOSE_MANAGER_UNHOVERED_OPACITY:
            g_value_set_uchar (value, unity_expose_manager_get_unhovered_opacity (self));
            break;
            case UNITY_EXPOSE_MANAGER_DARKEN:
            g_value_set_uchar (value, unity_expose_manager_get_darken (self));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}


static void unity_expose_manager_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
      UnityExposeManager * self;
      self = UNITY_EXPOSE_MANAGER (object);
      switch (property_id) {
            case UNITY_EXPOSE_MANAGER_EXPOSE_SHOWING:
            unity_expose_manager_set_expose_showing (self, g_value_get_boolean (value));
            break;
            case UNITY_EXPOSE_MANAGER_COVERFLOW:
            unity_expose_manager_set_coverflow (self, g_value_get_boolean (value));
            break;
            case UNITY_EXPOSE_MANAGER_LEFT_BUFFER:
            unity_expose_manager_set_left_buffer (self, g_value_get_int (value));
            break;
            case UNITY_EXPOSE_MANAGER_RIGHT_BUFFER:
            unity_expose_manager_set_right_buffer (self, g_value_get_int (value));
            break;
            case UNITY_EXPOSE_MANAGER_TOP_BUFFER:
            unity_expose_manager_set_top_buffer (self, g_value_get_int (value));
            break;
            case UNITY_EXPOSE_MANAGER_BOTTOM_BUFFER:
            unity_expose_manager_set_bottom_buffer (self, g_value_get_int (value));
            break;
            case UNITY_EXPOSE_MANAGER_HOVERED_OPACITY:
            unity_expose_manager_set_hovered_opacity (self, g_value_get_uchar (value));
            break;
            case UNITY_EXPOSE_MANAGER_UNHOVERED_OPACITY:
            unity_expose_manager_set_unhovered_opacity (self, g_value_get_uchar (value));
            break;
            case UNITY_EXPOSE_MANAGER_DARKEN:
            unity_expose_manager_set_darken (self, g_value_get_uchar (value));
            break;
            default:
            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
            break;
      }
}





Generated by  Doxygen 1.6.0   Back to index