/* game-view.c generated by valac 0.30.0, the Vala compiler
 * generated from game-view.vala, do not modify */

/*
 * Copyright (C) 2010-2013 Robert Ancell
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 2 of the License, or (at your option) any later
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 * license.
 */

#include <glib.h>
#include <glib-object.h>
#include <clutter-gtk/clutter-gtk.h>
#include <clutter/clutter.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <canberra-gtk.h>
#include <canberra.h>
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include <cairo.h>
#include <pango/pango.h>
#include <pango/pangocairo.h>


#define TYPE_GAME_VIEW (game_view_get_type ())
#define GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GAME_VIEW, GameView))
#define GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GAME_VIEW, GameViewClass))
#define IS_GAME_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GAME_VIEW))
#define IS_GAME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GAME_VIEW))
#define GAME_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GAME_VIEW, GameViewClass))

typedef struct _GameView GameView;
typedef struct _GameViewClass GameViewClass;
typedef struct _GameViewPrivate GameViewPrivate;

#define TYPE_GAME (game_get_type ())
#define GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_GAME, Game))
#define GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GAME, GameClass))
#define IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_GAME))
#define IS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GAME))
#define GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GAME, GameClass))

typedef struct _Game Game;
typedef struct _GameClass GameClass;

#define TYPE_TEXT_OVERLAY (text_overlay_get_type ())
#define TEXT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEXT_OVERLAY, TextOverlay))
#define TEXT_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEXT_OVERLAY, TextOverlayClass))
#define IS_TEXT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEXT_OVERLAY))
#define IS_TEXT_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEXT_OVERLAY))
#define TEXT_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEXT_OVERLAY, TextOverlayClass))

typedef struct _TextOverlay TextOverlay;
typedef struct _TextOverlayClass TextOverlayClass;

#define TYPE_BLOCK_TEXTURE (block_texture_get_type ())
#define BLOCK_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLOCK_TEXTURE, BlockTexture))
#define BLOCK_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLOCK_TEXTURE, BlockTextureClass))
#define IS_BLOCK_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLOCK_TEXTURE))
#define IS_BLOCK_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLOCK_TEXTURE))
#define BLOCK_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLOCK_TEXTURE, BlockTextureClass))

typedef struct _BlockTexture BlockTexture;
typedef struct _BlockTextureClass BlockTextureClass;

#define TYPE_BLOCK (block_get_type ())
#define BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLOCK, Block))
#define BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLOCK, BlockClass))
#define IS_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLOCK))
#define IS_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLOCK))
#define BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLOCK, BlockClass))

typedef struct _Block Block;
typedef struct _BlockClass BlockClass;

#define TYPE_BLOCK_ACTOR (block_actor_get_type ())
#define BLOCK_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLOCK_ACTOR, BlockActor))
#define BLOCK_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLOCK_ACTOR, BlockActorClass))
#define IS_BLOCK_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLOCK_ACTOR))
#define IS_BLOCK_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLOCK_ACTOR))
#define BLOCK_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLOCK_ACTOR, BlockActorClass))

typedef struct _BlockActor BlockActor;
typedef struct _BlockActorClass BlockActorClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GamePrivate GamePrivate;

#define TYPE_SHAPE (shape_get_type ())
#define SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHAPE, Shape))
#define SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHAPE, ShapeClass))
#define IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHAPE))
#define IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHAPE))
#define SHAPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHAPE, ShapeClass))

typedef struct _Shape Shape;
typedef struct _ShapeClass ShapeClass;
typedef struct _ShapePrivate ShapePrivate;
typedef struct _BlockPrivate BlockPrivate;
typedef struct _BlockActorPrivate BlockActorPrivate;
typedef struct _TextOverlayPrivate TextOverlayPrivate;
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
typedef struct _BlockTexturePrivate BlockTexturePrivate;
#define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL)))

struct _GameView {
	GtkClutterEmbed parent_instance;
	GameViewPrivate * priv;
	gboolean mute;
};

struct _GameViewClass {
	GtkClutterEmbedClass parent_class;
};

struct _GameViewPrivate {
	Game* _game;
	ClutterActor* playing_field;
	ClutterActor* shape;
	ClutterClone* shape_shadow;
	gboolean _show_shadow;
	TextOverlay* text_overlay;
	BlockTexture** block_textures;
	gint block_textures_length1;
	gint _block_textures_size_;
	GHashTable* blocks;
	GHashTable* shape_blocks;
	gint n_lines_destroyed;
};

struct _Game {
	GObject parent_instance;
	GamePrivate * priv;
	Shape* shape;
	Shape* next_shape;
	Block** blocks;
	gint blocks_length1;
	gint blocks_length2;
	gint n_lines_destroyed;
	gint score;
	gboolean game_over;
};

struct _GameClass {
	GObjectClass parent_class;
};

struct _Shape {
	GObject parent_instance;
	ShapePrivate * priv;
	gint x;
	gint y;
	gint rotation;
	gint type;
	GList* blocks;
};

struct _ShapeClass {
	GObjectClass parent_class;
};

struct _Block {
	GObject parent_instance;
	BlockPrivate * priv;
	gint x;
	gint y;
	gint color;
};

struct _BlockClass {
	GObjectClass parent_class;
};

struct _BlockActor {
	ClutterClone parent_instance;
	BlockActorPrivate * priv;
	Block* block;
};

struct _BlockActorClass {
	ClutterCloneClass parent_class;
};

struct _TextOverlay {
	ClutterCairoTexture parent_instance;
	TextOverlayPrivate * priv;
};

struct _TextOverlayClass {
	ClutterCairoTextureClass parent_class;
};

struct _TextOverlayPrivate {
	gchar* _text;
};

struct _BlockTexture {
	ClutterCairoTexture parent_instance;
	BlockTexturePrivate * priv;
};

struct _BlockTextureClass {
	ClutterCairoTextureClass parent_class;
};

struct _BlockTexturePrivate {
	gint color;
	gchar* _theme;
};


static gpointer game_view_parent_class = NULL;
static gpointer block_actor_parent_class = NULL;
static gpointer text_overlay_parent_class = NULL;
static gpointer block_texture_parent_class = NULL;

GType game_view_get_type (void) G_GNUC_CONST;
GType game_get_type (void) G_GNUC_CONST;
GType text_overlay_get_type (void) G_GNUC_CONST;
GType block_texture_get_type (void) G_GNUC_CONST;
GType block_get_type (void) G_GNUC_CONST;
GType block_actor_get_type (void) G_GNUC_CONST;
#define GAME_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_GAME_VIEW, GameViewPrivate))
enum  {
	GAME_VIEW_DUMMY_PROPERTY,
	GAME_VIEW_GAME,
	GAME_VIEW_THEME,
	GAME_VIEW_SHOW_SHADOW
};
GameView* game_view_new (void);
GameView* game_view_construct (GType object_type);
static void _g_object_unref0_ (gpointer var);
static void game_view_size_allocate_cb (GameView* self, GtkWidget* widget, GtkAllocation* allocation);
static void _game_view_size_allocate_cb_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self);
TextOverlay* text_overlay_new (void);
TextOverlay* text_overlay_construct (GType object_type);
#define NCOLORS 7
BlockTexture* block_texture_new (gint color);
BlockTexture* block_texture_construct (GType object_type, gint color);
static void game_view_play_sound (GameView* self, const gchar* name);
static void game_view_shape_added_cb (GameView* self);
Game* game_view_get_game (GameView* self);
GType shape_get_type (void) G_GNUC_CONST;
static gint game_view_get_cell_size (GameView* self);
static void game_view_update_shadow (GameView* self);
BlockActor* block_actor_new (Block* block, ClutterActor* texture);
BlockActor* block_actor_construct (GType object_type, Block* block, ClutterActor* texture);
static void game_view_shape_moved_cb (GameView* self);
gint game_get_shadow_y (Game* self);
gboolean game_view_get_show_shadow (GameView* self);
static void game_view_shape_dropped_cb (GameView* self);
static void game_view_shape_rotated_cb (GameView* self);
static void game_view_shape_landed_cb (GameView* self, gint* lines, int lines_length1, GList* line_blocks);
void block_actor_explode (BlockActor* self);
gint game_get_width (Game* self);
gint game_get_height (Game* self);
static void game_view_pause_changed_cb (GameView* self);
static void game_view_update_message (GameView* self);
static void game_view_game_complete_cb (GameView* self);
gboolean game_get_paused (Game* self);
void text_overlay_set_text (TextOverlay* self, const gchar* value);
void game_view_set_game (GameView* self, Game* value);
static void _game_view_shape_added_cb_game_shape_added (Game* _sender, gpointer self);
static void _game_view_shape_moved_cb_game_shape_moved (Game* _sender, gpointer self);
static void _game_view_shape_dropped_cb_game_shape_dropped (Game* _sender, gpointer self);
static void _game_view_shape_rotated_cb_game_shape_rotated (Game* _sender, gpointer self);
static void _game_view_shape_landed_cb_game_shape_landed (Game* _sender, gint* lines, int lines_length1, GList* line_blocks, gpointer self);
static void _game_view_pause_changed_cb_game_pause_changed (Game* _sender, gpointer self);
static void _game_view_game_complete_cb_game_complete (Game* _sender, gpointer self);
void game_view_set_theme (GameView* self, const gchar* value);
void block_texture_set_theme (BlockTexture* self, const gchar* value);
void game_view_set_show_shadow (GameView* self, gboolean value);
static void game_view_finalize (GObject* obj);
static void _vala_game_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_game_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
enum  {
	BLOCK_ACTOR_DUMMY_PROPERTY
};
static void block_actor_explode_complete_cb (BlockActor* self);
static void _block_actor_explode_complete_cb_clutter_actor_transitions_completed (ClutterActor* _sender, gpointer self);
static void block_actor_finalize (GObject* obj);
#define TEXT_OVERLAY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TEXT_OVERLAY, TextOverlayPrivate))
enum  {
	TEXT_OVERLAY_DUMMY_PROPERTY,
	TEXT_OVERLAY_TEXT
};
static gboolean text_overlay_real_draw (ClutterCairoTexture* base, cairo_t* cr);
const gchar* text_overlay_get_text (TextOverlay* self);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
static void text_overlay_finalize (GObject* obj);
static void _vala_text_overlay_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_text_overlay_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define BLOCK_TEXTURE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BLOCK_TEXTURE, BlockTexturePrivate))
enum  {
	BLOCK_TEXTURE_DUMMY_PROPERTY,
	BLOCK_TEXTURE_THEME
};
static gboolean block_texture_real_draw (ClutterCairoTexture* base, cairo_t* cr);
const gchar* block_texture_get_theme (BlockTexture* self);
static void block_texture_draw_clean (BlockTexture* self, cairo_t* cr);
static void block_texture_draw_tango (BlockTexture* self, cairo_t* cr, gboolean use_gradients);
static void block_texture_draw_plain (BlockTexture* self, cairo_t* cr);
static void block_texture_draw_rounded_rectangle (BlockTexture* self, cairo_t* cr, gdouble x, gdouble y, gdouble w, gdouble h, gdouble r);
static void block_texture_finalize (GObject* obj);
static void _vala_block_texture_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_block_texture_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static void _g_object_unref0_ (gpointer var) {
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void _game_view_size_allocate_cb_gtk_widget_size_allocate (GtkWidget* _sender, GtkAllocation* allocation, gpointer self) {
	game_view_size_allocate_cb ((GameView*) self, _sender, allocation);
}


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


GameView* game_view_construct (GType object_type) {
	GameView * self = NULL;
	GHashFunc _tmp0_ = NULL;
	GEqualFunc _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	GHashFunc _tmp3_ = NULL;
	GEqualFunc _tmp4_ = NULL;
	GHashTable* _tmp5_ = NULL;
	ClutterStage* stage = NULL;
	ClutterActor* _tmp6_ = NULL;
	ClutterStage* _tmp7_ = NULL;
	ClutterColor stage_color = {0};
	ClutterColor _tmp8_ = {0};
	ClutterColor field_color = {0};
	ClutterColor _tmp9_ = {0};
	ClutterStage* _tmp10_ = NULL;
	ClutterColor _tmp11_ = {0};
	ClutterActor* _tmp12_ = NULL;
	ClutterActor* _tmp13_ = NULL;
	ClutterColor _tmp14_ = {0};
	ClutterStage* _tmp15_ = NULL;
	ClutterActor* _tmp16_ = NULL;
	TextOverlay* _tmp17_ = NULL;
	TextOverlay* _tmp18_ = NULL;
	ClutterStage* _tmp19_ = NULL;
	TextOverlay* _tmp20_ = NULL;
	BlockTexture** _tmp21_ = NULL;
	self = (GameView*) g_object_new (object_type, NULL);
	_tmp0_ = g_direct_hash;
	_tmp1_ = g_direct_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_object_unref0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->blocks);
	self->priv->blocks = _tmp2_;
	_tmp3_ = g_direct_hash;
	_tmp4_ = g_direct_equal;
	_tmp5_ = g_hash_table_new_full (_tmp3_, _tmp4_, _g_object_unref0_, _g_object_unref0_);
	_g_hash_table_unref0 (self->priv->shape_blocks);
	self->priv->shape_blocks = _tmp5_;
	g_signal_connect_object ((GtkWidget*) self, "size-allocate", (GCallback) _game_view_size_allocate_cb_gtk_widget_size_allocate, self, 0);
	_tmp6_ = gtk_clutter_embed_get_stage ((GtkClutterEmbed*) self);
	_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, clutter_stage_get_type (), ClutterStage));
	stage = _tmp7_;
	_tmp8_.red = (guint8) 0x10;
	_tmp8_.green = (guint8) 0x10;
	_tmp8_.blue = (guint8) 0x10;
	_tmp8_.alpha = (guint8) 0xff;
	stage_color = _tmp8_;
	_tmp9_.red = (guint8) 0x0;
	_tmp9_.green = (guint8) 0x0;
	_tmp9_.blue = (guint8) 0x0;
	_tmp9_.alpha = (guint8) 0xff;
	field_color = _tmp9_;
	_tmp10_ = stage;
	_tmp11_ = stage_color;
	clutter_actor_set_background_color ((ClutterActor*) _tmp10_, &_tmp11_);
	_tmp12_ = clutter_actor_new ();
	g_object_ref_sink (_tmp12_);
	_g_object_unref0 (self->priv->playing_field);
	self->priv->playing_field = _tmp12_;
	_tmp13_ = self->priv->playing_field;
	_tmp14_ = field_color;
	clutter_actor_set_background_color (_tmp13_, &_tmp14_);
	_tmp15_ = stage;
	_tmp16_ = self->priv->playing_field;
	clutter_actor_add_child ((ClutterActor*) _tmp15_, _tmp16_);
	_tmp17_ = text_overlay_new ();
	g_object_ref_sink (_tmp17_);
	_g_object_unref0 (self->priv->text_overlay);
	self->priv->text_overlay = _tmp17_;
	_tmp18_ = self->priv->text_overlay;
	clutter_cairo_texture_set_surface_size ((ClutterCairoTexture*) _tmp18_, (guint) 1, (guint) 1);
	_tmp19_ = stage;
	_tmp20_ = self->priv->text_overlay;
	clutter_container_add ((ClutterContainer*) _tmp19_, (ClutterActor*) _tmp20_, NULL);
	_tmp21_ = g_new0 (BlockTexture*, NCOLORS + 1);
	self->priv->block_textures = (_vala_array_free (self->priv->block_textures, self->priv->block_textures_length1, (GDestroyNotify) g_object_unref), NULL);
	self->priv->block_textures = _tmp21_;
	self->priv->block_textures_length1 = NCOLORS;
	self->priv->_block_textures_size_ = self->priv->block_textures_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp22_ = FALSE;
			_tmp22_ = TRUE;
			while (TRUE) {
				gint _tmp24_ = 0;
				BlockTexture** _tmp25_ = NULL;
				gint _tmp25__length1 = 0;
				BlockTexture** _tmp26_ = NULL;
				gint _tmp26__length1 = 0;
				gint _tmp27_ = 0;
				gint _tmp28_ = 0;
				BlockTexture* _tmp29_ = NULL;
				BlockTexture* _tmp30_ = NULL;
				BlockTexture** _tmp31_ = NULL;
				gint _tmp31__length1 = 0;
				gint _tmp32_ = 0;
				BlockTexture* _tmp33_ = NULL;
				BlockTexture** _tmp34_ = NULL;
				gint _tmp34__length1 = 0;
				gint _tmp35_ = 0;
				BlockTexture* _tmp36_ = NULL;
				ClutterStage* _tmp37_ = NULL;
				BlockTexture** _tmp38_ = NULL;
				gint _tmp38__length1 = 0;
				gint _tmp39_ = 0;
				BlockTexture* _tmp40_ = NULL;
				if (!_tmp22_) {
					gint _tmp23_ = 0;
					_tmp23_ = i;
					i = _tmp23_ + 1;
				}
				_tmp22_ = FALSE;
				_tmp24_ = i;
				_tmp25_ = self->priv->block_textures;
				_tmp25__length1 = self->priv->block_textures_length1;
				if (!(_tmp24_ < _tmp25__length1)) {
					break;
				}
				_tmp26_ = self->priv->block_textures;
				_tmp26__length1 = self->priv->block_textures_length1;
				_tmp27_ = i;
				_tmp28_ = i;
				_tmp29_ = block_texture_new (_tmp28_);
				g_object_ref_sink (_tmp29_);
				_g_object_unref0 (_tmp26_[_tmp27_]);
				_tmp26_[_tmp27_] = _tmp29_;
				_tmp30_ = _tmp26_[_tmp27_];
				_tmp31_ = self->priv->block_textures;
				_tmp31__length1 = self->priv->block_textures_length1;
				_tmp32_ = i;
				_tmp33_ = _tmp31_[_tmp32_];
				clutter_cairo_texture_set_surface_size ((ClutterCairoTexture*) _tmp33_, (guint) 1, (guint) 1);
				_tmp34_ = self->priv->block_textures;
				_tmp34__length1 = self->priv->block_textures_length1;
				_tmp35_ = i;
				_tmp36_ = _tmp34_[_tmp35_];
				clutter_actor_hide ((ClutterActor*) _tmp36_);
				_tmp37_ = stage;
				_tmp38_ = self->priv->block_textures;
				_tmp38__length1 = self->priv->block_textures_length1;
				_tmp39_ = i;
				_tmp40_ = _tmp38_[_tmp39_];
				clutter_actor_add_child ((ClutterActor*) _tmp37_, (ClutterActor*) _tmp40_);
			}
		}
	}
	_g_object_unref0 (stage);
	return self;
}


GameView* game_view_new (void) {
	return game_view_construct (TYPE_GAME_VIEW);
}


static void game_view_play_sound (GameView* self, const gchar* name) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = self->mute;
	if (!_tmp0_) {
		const gchar* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
		_tmp1_ = name;
		_tmp2_ = name;
		_tmp3_ = g_strdup_printf ("%s.ogg", _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_build_filename (SOUND_DIRECTORY, _tmp4_, NULL);
		_tmp6_ = _tmp5_;
		ca_gtk_play_for_widget ((GtkWidget*) self, (guint32) 0, CA_PROP_MEDIA_NAME, _tmp1_, CA_PROP_MEDIA_FILENAME, _tmp6_, NULL);
		_g_free0 (_tmp6_);
		_g_free0 (_tmp4_);
	}
}


static void game_view_shape_added_cb (GameView* self) {
	ClutterActor* _tmp0_ = NULL;
	ClutterActor* _tmp1_ = NULL;
	ClutterActor* _tmp2_ = NULL;
	ClutterActor* _tmp3_ = NULL;
	Game* _tmp4_ = NULL;
	Game* _tmp5_ = NULL;
	Shape* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	Game* _tmp10_ = NULL;
	Game* _tmp11_ = NULL;
	Shape* _tmp12_ = NULL;
	gint _tmp13_ = 0;
	gint _tmp14_ = 0;
	gint _tmp15_ = 0;
	Game* _tmp16_ = NULL;
	Game* _tmp17_ = NULL;
	Shape* _tmp18_ = NULL;
	GList* _tmp19_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = clutter_actor_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->shape);
	self->priv->shape = _tmp0_;
	_tmp1_ = self->priv->playing_field;
	_tmp2_ = self->priv->shape;
	clutter_container_add ((ClutterContainer*) _tmp1_, _tmp2_, NULL);
	_tmp3_ = self->priv->shape;
	_tmp4_ = game_view_get_game (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_->shape;
	_tmp7_ = _tmp6_->x;
	_tmp8_ = game_view_get_cell_size (self);
	_tmp9_ = _tmp8_;
	_tmp10_ = game_view_get_game (self);
	_tmp11_ = _tmp10_;
	_tmp12_ = _tmp11_->shape;
	_tmp13_ = _tmp12_->y;
	_tmp14_ = game_view_get_cell_size (self);
	_tmp15_ = _tmp14_;
	clutter_actor_set_position (_tmp3_, (gfloat) (_tmp7_ * _tmp9_), (gfloat) (_tmp13_ * _tmp15_));
	game_view_update_shadow (self);
	_tmp16_ = game_view_get_game (self);
	_tmp17_ = _tmp16_;
	_tmp18_ = _tmp17_->shape;
	_tmp19_ = _tmp18_->blocks;
	{
		GList* block_collection = NULL;
		GList* block_it = NULL;
		block_collection = _tmp19_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			Block* _tmp20_ = NULL;
			Block* block = NULL;
			_tmp20_ = _g_object_ref0 ((Block*) block_it->data);
			block = _tmp20_;
			{
				BlockActor* actor = NULL;
				Block* _tmp21_ = NULL;
				BlockTexture** _tmp22_ = NULL;
				gint _tmp22__length1 = 0;
				Block* _tmp23_ = NULL;
				gint _tmp24_ = 0;
				BlockTexture* _tmp25_ = NULL;
				BlockActor* _tmp26_ = NULL;
				GHashTable* _tmp27_ = NULL;
				Block* _tmp28_ = NULL;
				Block* _tmp29_ = NULL;
				BlockActor* _tmp30_ = NULL;
				BlockActor* _tmp31_ = NULL;
				ClutterActor* _tmp32_ = NULL;
				BlockActor* _tmp33_ = NULL;
				BlockActor* _tmp34_ = NULL;
				gint _tmp35_ = 0;
				gint _tmp36_ = 0;
				gint _tmp37_ = 0;
				gint _tmp38_ = 0;
				BlockActor* _tmp39_ = NULL;
				Block* _tmp40_ = NULL;
				gint _tmp41_ = 0;
				gint _tmp42_ = 0;
				gint _tmp43_ = 0;
				Block* _tmp44_ = NULL;
				gint _tmp45_ = 0;
				gint _tmp46_ = 0;
				gint _tmp47_ = 0;
				_tmp21_ = block;
				_tmp22_ = self->priv->block_textures;
				_tmp22__length1 = self->priv->block_textures_length1;
				_tmp23_ = block;
				_tmp24_ = _tmp23_->color;
				_tmp25_ = _tmp22_[_tmp24_];
				_tmp26_ = block_actor_new (_tmp21_, (ClutterActor*) _tmp25_);
				g_object_ref_sink (_tmp26_);
				actor = _tmp26_;
				_tmp27_ = self->priv->shape_blocks;
				_tmp28_ = block;
				_tmp29_ = _g_object_ref0 (_tmp28_);
				_tmp30_ = actor;
				_tmp31_ = _g_object_ref0 (_tmp30_);
				g_hash_table_insert (_tmp27_, _tmp29_, _tmp31_);
				_tmp32_ = self->priv->shape;
				_tmp33_ = actor;
				clutter_container_add ((ClutterContainer*) _tmp32_, (ClutterActor*) _tmp33_, NULL);
				_tmp34_ = actor;
				_tmp35_ = game_view_get_cell_size (self);
				_tmp36_ = _tmp35_;
				_tmp37_ = game_view_get_cell_size (self);
				_tmp38_ = _tmp37_;
				clutter_actor_set_size ((ClutterActor*) _tmp34_, (gfloat) _tmp36_, (gfloat) _tmp38_);
				_tmp39_ = actor;
				_tmp40_ = block;
				_tmp41_ = _tmp40_->x;
				_tmp42_ = game_view_get_cell_size (self);
				_tmp43_ = _tmp42_;
				_tmp44_ = block;
				_tmp45_ = _tmp44_->y;
				_tmp46_ = game_view_get_cell_size (self);
				_tmp47_ = _tmp46_;
				clutter_actor_set_position ((ClutterActor*) _tmp39_, (gfloat) (_tmp41_ * _tmp43_), (gfloat) (_tmp45_ * _tmp47_));
				_g_object_unref0 (actor);
				_g_object_unref0 (block);
			}
		}
	}
}


static void game_view_shape_moved_cb (GameView* self) {
	ClutterActor* _tmp0_ = NULL;
	ClutterActor* _tmp1_ = NULL;
	ClutterActor* _tmp2_ = NULL;
	ClutterActor* _tmp3_ = NULL;
	Game* _tmp4_ = NULL;
	Game* _tmp5_ = NULL;
	Shape* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	ClutterClone* _tmp10_ = NULL;
	ClutterActor* _tmp24_ = NULL;
	g_return_if_fail (self != NULL);
	game_view_play_sound (self, "slide");
	_tmp0_ = self->priv->shape;
	clutter_actor_save_easing_state (_tmp0_);
	_tmp1_ = self->priv->shape;
	clutter_actor_set_easing_mode (_tmp1_, CLUTTER_EASE_IN_QUAD);
	_tmp2_ = self->priv->shape;
	clutter_actor_set_easing_duration (_tmp2_, (guint) 30);
	_tmp3_ = self->priv->shape;
	_tmp4_ = game_view_get_game (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_->shape;
	_tmp7_ = _tmp6_->x;
	_tmp8_ = game_view_get_cell_size (self);
	_tmp9_ = _tmp8_;
	clutter_actor_set_x (_tmp3_, ((gfloat) _tmp7_) * _tmp9_);
	_tmp10_ = self->priv->shape_shadow;
	if (_tmp10_ != NULL) {
		ClutterClone* _tmp11_ = NULL;
		Game* _tmp12_ = NULL;
		Game* _tmp13_ = NULL;
		Shape* _tmp14_ = NULL;
		gint _tmp15_ = 0;
		gint _tmp16_ = 0;
		gint _tmp17_ = 0;
		Game* _tmp18_ = NULL;
		Game* _tmp19_ = NULL;
		gint _tmp20_ = 0;
		gint _tmp21_ = 0;
		gint _tmp22_ = 0;
		gint _tmp23_ = 0;
		_tmp11_ = self->priv->shape_shadow;
		_tmp12_ = game_view_get_game (self);
		_tmp13_ = _tmp12_;
		_tmp14_ = _tmp13_->shape;
		_tmp15_ = _tmp14_->x;
		_tmp16_ = game_view_get_cell_size (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = game_view_get_game (self);
		_tmp19_ = _tmp18_;
		_tmp20_ = game_get_shadow_y (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = game_view_get_cell_size (self);
		_tmp23_ = _tmp22_;
		clutter_actor_set_position ((ClutterActor*) _tmp11_, (gfloat) (_tmp15_ * _tmp17_), (gfloat) (_tmp21_ * _tmp23_));
	}
	_tmp24_ = self->priv->shape;
	clutter_actor_restore_easing_state (_tmp24_);
}


static void game_view_update_shadow (GameView* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	Game* _tmp2_ = NULL;
	Game* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp2_ = game_view_get_game (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		Game* _tmp4_ = NULL;
		Game* _tmp5_ = NULL;
		Shape* _tmp6_ = NULL;
		_tmp4_ = game_view_get_game (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = _tmp5_->shape;
		_tmp1_ = _tmp6_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		gboolean _tmp7_ = FALSE;
		gboolean _tmp8_ = FALSE;
		_tmp7_ = game_view_get_show_shadow (self);
		_tmp8_ = _tmp7_;
		_tmp0_ = _tmp8_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ClutterClone* _tmp9_ = NULL;
		ClutterClone* _tmp15_ = NULL;
		Game* _tmp16_ = NULL;
		Game* _tmp17_ = NULL;
		Shape* _tmp18_ = NULL;
		gint _tmp19_ = 0;
		gint _tmp20_ = 0;
		gint _tmp21_ = 0;
		Game* _tmp22_ = NULL;
		Game* _tmp23_ = NULL;
		gint _tmp24_ = 0;
		gint _tmp25_ = 0;
		gint _tmp26_ = 0;
		gint _tmp27_ = 0;
		_tmp9_ = self->priv->shape_shadow;
		if (_tmp9_ == NULL) {
			ClutterActor* _tmp10_ = NULL;
			ClutterClone* _tmp11_ = NULL;
			ClutterClone* _tmp12_ = NULL;
			ClutterActor* _tmp13_ = NULL;
			ClutterClone* _tmp14_ = NULL;
			_tmp10_ = self->priv->shape;
			_tmp11_ = (ClutterClone*) clutter_clone_new (_tmp10_);
			g_object_ref_sink (_tmp11_);
			_g_object_unref0 (self->priv->shape_shadow);
			self->priv->shape_shadow = _tmp11_;
			_tmp12_ = self->priv->shape_shadow;
			clutter_actor_set_opacity ((ClutterActor*) _tmp12_, (guint8) 32);
			_tmp13_ = self->priv->playing_field;
			_tmp14_ = self->priv->shape_shadow;
			clutter_container_add ((ClutterContainer*) _tmp13_, (ClutterActor*) _tmp14_, NULL);
		}
		_tmp15_ = self->priv->shape_shadow;
		_tmp16_ = game_view_get_game (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = _tmp17_->shape;
		_tmp19_ = _tmp18_->x;
		_tmp20_ = game_view_get_cell_size (self);
		_tmp21_ = _tmp20_;
		_tmp22_ = game_view_get_game (self);
		_tmp23_ = _tmp22_;
		_tmp24_ = game_get_shadow_y (_tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = game_view_get_cell_size (self);
		_tmp27_ = _tmp26_;
		clutter_actor_set_position ((ClutterActor*) _tmp15_, (gfloat) (_tmp19_ * _tmp21_), (gfloat) (_tmp25_ * _tmp27_));
	} else {
		ClutterClone* _tmp28_ = NULL;
		_tmp28_ = self->priv->shape_shadow;
		if (_tmp28_ != NULL) {
			ClutterClone* _tmp29_ = NULL;
			_tmp29_ = self->priv->shape_shadow;
			clutter_actor_destroy ((ClutterActor*) _tmp29_);
		}
		_g_object_unref0 (self->priv->shape_shadow);
		self->priv->shape_shadow = NULL;
	}
}


static void game_view_shape_dropped_cb (GameView* self) {
	ClutterActor* _tmp0_ = NULL;
	ClutterActor* _tmp1_ = NULL;
	ClutterActor* _tmp2_ = NULL;
	ClutterActor* _tmp3_ = NULL;
	Game* _tmp4_ = NULL;
	Game* _tmp5_ = NULL;
	Shape* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gint _tmp9_ = 0;
	ClutterActor* _tmp10_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->shape;
	clutter_actor_save_easing_state (_tmp0_);
	_tmp1_ = self->priv->shape;
	clutter_actor_set_easing_mode (_tmp1_, CLUTTER_EASE_IN_QUAD);
	_tmp2_ = self->priv->shape;
	clutter_actor_set_easing_duration (_tmp2_, (guint) 60);
	_tmp3_ = self->priv->shape;
	_tmp4_ = game_view_get_game (self);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_->shape;
	_tmp7_ = _tmp6_->y;
	_tmp8_ = game_view_get_cell_size (self);
	_tmp9_ = _tmp8_;
	clutter_actor_set_y (_tmp3_, ((gfloat) _tmp7_) * _tmp9_);
	game_view_update_shadow (self);
	_tmp10_ = self->priv->shape;
	clutter_actor_restore_easing_state (_tmp10_);
}


static void game_view_shape_rotated_cb (GameView* self) {
	Game* _tmp0_ = NULL;
	Game* _tmp1_ = NULL;
	Shape* _tmp2_ = NULL;
	GList* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	game_view_play_sound (self, "turn");
	_tmp0_ = game_view_get_game (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->shape;
	_tmp3_ = _tmp2_->blocks;
	{
		GList* block_collection = NULL;
		GList* block_it = NULL;
		block_collection = _tmp3_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			Block* _tmp4_ = NULL;
			Block* block = NULL;
			_tmp4_ = _g_object_ref0 ((Block*) block_it->data);
			block = _tmp4_;
			{
				BlockActor* actor = NULL;
				GHashTable* _tmp5_ = NULL;
				Block* _tmp6_ = NULL;
				gconstpointer _tmp7_ = NULL;
				BlockActor* _tmp8_ = NULL;
				BlockActor* _tmp9_ = NULL;
				Block* _tmp10_ = NULL;
				gint _tmp11_ = 0;
				gint _tmp12_ = 0;
				gint _tmp13_ = 0;
				Block* _tmp14_ = NULL;
				gint _tmp15_ = 0;
				gint _tmp16_ = 0;
				gint _tmp17_ = 0;
				_tmp5_ = self->priv->shape_blocks;
				_tmp6_ = block;
				_tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_);
				_tmp8_ = _g_object_ref0 ((BlockActor*) _tmp7_);
				actor = _tmp8_;
				_tmp9_ = actor;
				_tmp10_ = block;
				_tmp11_ = _tmp10_->x;
				_tmp12_ = game_view_get_cell_size (self);
				_tmp13_ = _tmp12_;
				_tmp14_ = block;
				_tmp15_ = _tmp14_->y;
				_tmp16_ = game_view_get_cell_size (self);
				_tmp17_ = _tmp16_;
				clutter_actor_set_position ((ClutterActor*) _tmp9_, (gfloat) (_tmp11_ * _tmp13_), (gfloat) (_tmp15_ * _tmp17_));
				_g_object_unref0 (actor);
				_g_object_unref0 (block);
			}
		}
	}
	game_view_update_shadow (self);
}


static void game_view_shape_landed_cb (GameView* self, gint* lines, int lines_length1, GList* line_blocks) {
	gint* _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	ClutterActor* _tmp1_ = NULL;
	ClutterClone* _tmp2_ = NULL;
	GHashTable* _tmp4_ = NULL;
	gint* _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	Game* _tmp6_ = NULL;
	Game* _tmp7_ = NULL;
	Shape* _tmp8_ = NULL;
	GList* _tmp9_ = NULL;
	GList* _tmp39_ = NULL;
	gint* _tmp48_ = NULL;
	gint _tmp48__length1 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = lines;
	_tmp0__length1 = lines_length1;
	switch (_tmp0__length1) {
		default:
		{
			game_view_play_sound (self, "land");
			break;
		}
		case 1:
		{
			game_view_play_sound (self, "lines1");
			break;
		}
		case 2:
		{
			game_view_play_sound (self, "lines2");
			break;
		}
		case 3:
		case 4:
		{
			game_view_play_sound (self, "lines3");
			break;
		}
	}
	_tmp1_ = self->priv->shape;
	clutter_actor_destroy (_tmp1_);
	_g_object_unref0 (self->priv->shape);
	self->priv->shape = NULL;
	_tmp2_ = self->priv->shape_shadow;
	if (_tmp2_ != NULL) {
		ClutterClone* _tmp3_ = NULL;
		_tmp3_ = self->priv->shape_shadow;
		clutter_actor_destroy ((ClutterActor*) _tmp3_);
	}
	_g_object_unref0 (self->priv->shape_shadow);
	self->priv->shape_shadow = NULL;
	_tmp4_ = self->priv->shape_blocks;
	g_hash_table_remove_all (_tmp4_);
	_tmp5_ = lines;
	_tmp5__length1 = lines_length1;
	self->priv->n_lines_destroyed = _tmp5__length1;
	_tmp6_ = game_view_get_game (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_->shape;
	_tmp9_ = _tmp8_->blocks;
	{
		GList* block_collection = NULL;
		GList* block_it = NULL;
		block_collection = _tmp9_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			Block* _tmp10_ = NULL;
			Block* block = NULL;
			_tmp10_ = _g_object_ref0 ((Block*) block_it->data);
			block = _tmp10_;
			{
				BlockActor* actor = NULL;
				Block* _tmp11_ = NULL;
				BlockTexture** _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				Block* _tmp13_ = NULL;
				gint _tmp14_ = 0;
				BlockTexture* _tmp15_ = NULL;
				BlockActor* _tmp16_ = NULL;
				ClutterActor* _tmp17_ = NULL;
				BlockActor* _tmp18_ = NULL;
				GHashTable* _tmp19_ = NULL;
				Block* _tmp20_ = NULL;
				Block* _tmp21_ = NULL;
				BlockActor* _tmp22_ = NULL;
				BlockActor* _tmp23_ = NULL;
				BlockActor* _tmp24_ = NULL;
				gint _tmp25_ = 0;
				gint _tmp26_ = 0;
				gint _tmp27_ = 0;
				gint _tmp28_ = 0;
				BlockActor* _tmp29_ = NULL;
				Block* _tmp30_ = NULL;
				gint _tmp31_ = 0;
				gint _tmp32_ = 0;
				gint _tmp33_ = 0;
				Block* _tmp34_ = NULL;
				gint _tmp35_ = 0;
				gint _tmp36_ = 0;
				gint _tmp37_ = 0;
				gint _tmp38_ = 0;
				_tmp11_ = block;
				_tmp12_ = self->priv->block_textures;
				_tmp12__length1 = self->priv->block_textures_length1;
				_tmp13_ = block;
				_tmp14_ = _tmp13_->color;
				_tmp15_ = _tmp12_[_tmp14_];
				_tmp16_ = block_actor_new (_tmp11_, (ClutterActor*) _tmp15_);
				g_object_ref_sink (_tmp16_);
				actor = _tmp16_;
				_tmp17_ = self->priv->playing_field;
				_tmp18_ = actor;
				clutter_container_add ((ClutterContainer*) _tmp17_, (ClutterActor*) _tmp18_, NULL);
				_tmp19_ = self->priv->blocks;
				_tmp20_ = block;
				_tmp21_ = _g_object_ref0 (_tmp20_);
				_tmp22_ = actor;
				_tmp23_ = _g_object_ref0 (_tmp22_);
				g_hash_table_insert (_tmp19_, _tmp21_, _tmp23_);
				_tmp24_ = actor;
				_tmp25_ = game_view_get_cell_size (self);
				_tmp26_ = _tmp25_;
				_tmp27_ = game_view_get_cell_size (self);
				_tmp28_ = _tmp27_;
				clutter_actor_set_size ((ClutterActor*) _tmp24_, (gfloat) _tmp26_, (gfloat) _tmp28_);
				_tmp29_ = actor;
				_tmp30_ = block;
				_tmp31_ = _tmp30_->x;
				_tmp32_ = game_view_get_cell_size (self);
				_tmp33_ = _tmp32_;
				_tmp34_ = block;
				_tmp35_ = _tmp34_->y;
				_tmp36_ = self->priv->n_lines_destroyed;
				_tmp37_ = game_view_get_cell_size (self);
				_tmp38_ = _tmp37_;
				clutter_actor_set_position ((ClutterActor*) _tmp29_, (gfloat) (_tmp31_ * _tmp33_), (gfloat) ((_tmp35_ - _tmp36_) * _tmp38_));
				_g_object_unref0 (actor);
				_g_object_unref0 (block);
			}
		}
	}
	_tmp39_ = line_blocks;
	{
		GList* block_collection = NULL;
		GList* block_it = NULL;
		block_collection = _tmp39_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			Block* _tmp40_ = NULL;
			Block* block = NULL;
			_tmp40_ = _g_object_ref0 ((Block*) block_it->data);
			block = _tmp40_;
			{
				BlockActor* actor = NULL;
				GHashTable* _tmp41_ = NULL;
				Block* _tmp42_ = NULL;
				gconstpointer _tmp43_ = NULL;
				BlockActor* _tmp44_ = NULL;
				BlockActor* _tmp45_ = NULL;
				GHashTable* _tmp46_ = NULL;
				Block* _tmp47_ = NULL;
				_tmp41_ = self->priv->blocks;
				_tmp42_ = block;
				_tmp43_ = g_hash_table_lookup (_tmp41_, _tmp42_);
				_tmp44_ = _g_object_ref0 ((BlockActor*) _tmp43_);
				actor = _tmp44_;
				_tmp45_ = actor;
				block_actor_explode (_tmp45_);
				_tmp46_ = self->priv->blocks;
				_tmp47_ = block;
				g_hash_table_remove (_tmp46_, _tmp47_);
				_g_object_unref0 (actor);
				_g_object_unref0 (block);
			}
		}
	}
	_tmp48_ = lines;
	_tmp48__length1 = lines_length1;
	if (_tmp48__length1 > 0) {
		{
			gint x = 0;
			x = 0;
			{
				gboolean _tmp49_ = FALSE;
				_tmp49_ = TRUE;
				while (TRUE) {
					gint _tmp51_ = 0;
					Game* _tmp52_ = NULL;
					Game* _tmp53_ = NULL;
					gint _tmp54_ = 0;
					gint _tmp55_ = 0;
					if (!_tmp49_) {
						gint _tmp50_ = 0;
						_tmp50_ = x;
						x = _tmp50_ + 1;
					}
					_tmp49_ = FALSE;
					_tmp51_ = x;
					_tmp52_ = game_view_get_game (self);
					_tmp53_ = _tmp52_;
					_tmp54_ = game_get_width (_tmp53_);
					_tmp55_ = _tmp54_;
					if (!(_tmp51_ < _tmp55_)) {
						break;
					}
					{
						gint y = 0;
						y = 0;
						{
							gboolean _tmp56_ = FALSE;
							_tmp56_ = TRUE;
							while (TRUE) {
								gint _tmp58_ = 0;
								Game* _tmp59_ = NULL;
								Game* _tmp60_ = NULL;
								gint _tmp61_ = 0;
								gint _tmp62_ = 0;
								Block* block = NULL;
								Game* _tmp63_ = NULL;
								Game* _tmp64_ = NULL;
								Block** _tmp65_ = NULL;
								gint _tmp65__length1 = 0;
								gint _tmp65__length2 = 0;
								gint _tmp66_ = 0;
								gint _tmp67_ = 0;
								Block* _tmp68_ = NULL;
								Block* _tmp69_ = NULL;
								Block* _tmp70_ = NULL;
								BlockActor* actor = NULL;
								GHashTable* _tmp71_ = NULL;
								Block* _tmp72_ = NULL;
								gconstpointer _tmp73_ = NULL;
								BlockActor* _tmp74_ = NULL;
								BlockActor* _tmp75_ = NULL;
								BlockActor* _tmp76_ = NULL;
								BlockActor* _tmp77_ = NULL;
								gint _tmp78_ = 0;
								gdouble _tmp79_ = 0.0;
								BlockActor* _tmp80_ = NULL;
								Block* _tmp81_ = NULL;
								gint _tmp82_ = 0;
								gint _tmp83_ = 0;
								gint _tmp84_ = 0;
								Block* _tmp85_ = NULL;
								gint _tmp86_ = 0;
								gint _tmp87_ = 0;
								gint _tmp88_ = 0;
								BlockActor* _tmp89_ = NULL;
								if (!_tmp56_) {
									gint _tmp57_ = 0;
									_tmp57_ = y;
									y = _tmp57_ + 1;
								}
								_tmp56_ = FALSE;
								_tmp58_ = y;
								_tmp59_ = game_view_get_game (self);
								_tmp60_ = _tmp59_;
								_tmp61_ = game_get_height (_tmp60_);
								_tmp62_ = _tmp61_;
								if (!(_tmp58_ < _tmp62_)) {
									break;
								}
								_tmp63_ = game_view_get_game (self);
								_tmp64_ = _tmp63_;
								_tmp65_ = _tmp64_->blocks;
								_tmp65__length1 = _tmp64_->blocks_length1;
								_tmp65__length2 = _tmp64_->blocks_length2;
								_tmp66_ = x;
								_tmp67_ = y;
								_tmp68_ = _tmp65_[(_tmp66_ * _tmp65__length2) + _tmp67_];
								_tmp69_ = _g_object_ref0 (_tmp68_);
								block = _tmp69_;
								_tmp70_ = block;
								if (_tmp70_ == NULL) {
									_g_object_unref0 (block);
									continue;
								}
								_tmp71_ = self->priv->blocks;
								_tmp72_ = block;
								_tmp73_ = g_hash_table_lookup (_tmp71_, _tmp72_);
								_tmp74_ = _g_object_ref0 ((BlockActor*) _tmp73_);
								actor = _tmp74_;
								_tmp75_ = actor;
								clutter_actor_save_easing_state ((ClutterActor*) _tmp75_);
								_tmp76_ = actor;
								clutter_actor_set_easing_mode ((ClutterActor*) _tmp76_, CLUTTER_EASE_OUT_BOUNCE);
								_tmp77_ = actor;
								_tmp78_ = self->priv->n_lines_destroyed;
								_tmp79_ = sqrt ((gdouble) _tmp78_);
								clutter_actor_set_easing_duration ((ClutterActor*) _tmp77_, (guint) ((gint) (300 * _tmp79_)));
								_tmp80_ = actor;
								_tmp81_ = block;
								_tmp82_ = _tmp81_->x;
								_tmp83_ = game_view_get_cell_size (self);
								_tmp84_ = _tmp83_;
								_tmp85_ = block;
								_tmp86_ = _tmp85_->y;
								_tmp87_ = game_view_get_cell_size (self);
								_tmp88_ = _tmp87_;
								clutter_actor_set_position ((ClutterActor*) _tmp80_, ((gfloat) _tmp82_) * _tmp84_, ((gfloat) _tmp86_) * _tmp88_);
								_tmp89_ = actor;
								clutter_actor_restore_easing_state ((ClutterActor*) _tmp89_);
								_g_object_unref0 (actor);
								_g_object_unref0 (block);
							}
						}
					}
				}
			}
		}
	}
}


static void game_view_size_allocate_cb (GameView* self, GtkWidget* widget, GtkAllocation* allocation) {
	Game* _tmp0_ = NULL;
	Game* _tmp1_ = NULL;
	BlockTexture** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	GHashTableIter iter = {0};
	GHashTable* _tmp9_ = NULL;
	GHashTableIter shape_iter = {0};
	GHashTable* _tmp29_ = NULL;
	ClutterActor* _tmp49_ = NULL;
	TextOverlay* _tmp63_ = NULL;
	gint _tmp64_ = 0;
	gint _tmp65_ = 0;
	TextOverlay* _tmp66_ = NULL;
	ClutterActor* _tmp67_ = NULL;
	TextOverlay* _tmp68_ = NULL;
	ClutterActor* _tmp69_ = NULL;
	Game* _tmp70_ = NULL;
	Game* _tmp71_ = NULL;
	gint _tmp72_ = 0;
	gint _tmp73_ = 0;
	gint _tmp74_ = 0;
	gint _tmp75_ = 0;
	Game* _tmp76_ = NULL;
	Game* _tmp77_ = NULL;
	gint _tmp78_ = 0;
	gint _tmp79_ = 0;
	gint _tmp80_ = 0;
	gint _tmp81_ = 0;
	ClutterActor* _tmp82_ = NULL;
	gint _tmp83_ = 0;
	ClutterActor* _tmp84_ = NULL;
	gfloat _tmp85_ = 0.0F;
	gint _tmp86_ = 0;
	ClutterActor* _tmp87_ = NULL;
	gfloat _tmp88_ = 0.0F;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	g_return_if_fail (allocation != NULL);
	_tmp0_ = game_view_get_game (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		return;
	}
	_tmp2_ = self->priv->block_textures;
	_tmp2__length1 = self->priv->block_textures_length1;
	{
		BlockTexture** texture_collection = NULL;
		gint texture_collection_length1 = 0;
		gint _texture_collection_size_ = 0;
		gint texture_it = 0;
		texture_collection = _tmp2_;
		texture_collection_length1 = _tmp2__length1;
		for (texture_it = 0; texture_it < _tmp2__length1; texture_it = texture_it + 1) {
			BlockTexture* _tmp3_ = NULL;
			BlockTexture* texture = NULL;
			_tmp3_ = _g_object_ref0 (texture_collection[texture_it]);
			texture = _tmp3_;
			{
				BlockTexture* _tmp4_ = NULL;
				gint _tmp5_ = 0;
				gint _tmp6_ = 0;
				gint _tmp7_ = 0;
				gint _tmp8_ = 0;
				_tmp4_ = texture;
				_tmp5_ = game_view_get_cell_size (self);
				_tmp6_ = _tmp5_;
				_tmp7_ = game_view_get_cell_size (self);
				_tmp8_ = _tmp7_;
				clutter_actor_set_size ((ClutterActor*) _tmp4_, (gfloat) _tmp6_, (gfloat) _tmp8_);
				_g_object_unref0 (texture);
			}
		}
	}
	_tmp9_ = self->priv->blocks;
	g_hash_table_iter_init (&iter, _tmp9_);
	while (TRUE) {
		Block* block = NULL;
		BlockActor* actor = NULL;
		gconstpointer _tmp10_ = NULL;
		gconstpointer _tmp11_ = NULL;
		gboolean _tmp12_ = FALSE;
		Block* _tmp13_ = NULL;
		BlockActor* _tmp14_ = NULL;
		BlockActor* _tmp15_ = NULL;
		gint _tmp16_ = 0;
		gint _tmp17_ = 0;
		gint _tmp18_ = 0;
		gint _tmp19_ = 0;
		BlockActor* _tmp20_ = NULL;
		Block* _tmp21_ = NULL;
		gint _tmp22_ = 0;
		gint _tmp23_ = 0;
		gint _tmp24_ = 0;
		Block* _tmp25_ = NULL;
		gint _tmp26_ = 0;
		gint _tmp27_ = 0;
		gint _tmp28_ = 0;
		_tmp12_ = g_hash_table_iter_next (&iter, (gpointer*) (&_tmp10_), (gpointer*) (&_tmp11_));
		_g_object_unref0 (block);
		_tmp13_ = _g_object_ref0 (_tmp10_);
		block = _tmp13_;
		_g_object_unref0 (actor);
		_tmp14_ = _g_object_ref0 (_tmp11_);
		actor = _tmp14_;
		if (!_tmp12_) {
			_g_object_unref0 (actor);
			_g_object_unref0 (block);
			break;
		}
		_tmp15_ = actor;
		_tmp16_ = game_view_get_cell_size (self);
		_tmp17_ = _tmp16_;
		_tmp18_ = game_view_get_cell_size (self);
		_tmp19_ = _tmp18_;
		clutter_actor_set_size ((ClutterActor*) _tmp15_, (gfloat) _tmp17_, (gfloat) _tmp19_);
		_tmp20_ = actor;
		_tmp21_ = block;
		_tmp22_ = _tmp21_->x;
		_tmp23_ = game_view_get_cell_size (self);
		_tmp24_ = _tmp23_;
		_tmp25_ = block;
		_tmp26_ = _tmp25_->y;
		_tmp27_ = game_view_get_cell_size (self);
		_tmp28_ = _tmp27_;
		clutter_actor_set_position ((ClutterActor*) _tmp20_, (gfloat) (_tmp22_ * _tmp24_), (gfloat) (_tmp26_ * _tmp28_));
		_g_object_unref0 (actor);
		_g_object_unref0 (block);
	}
	_tmp29_ = self->priv->shape_blocks;
	g_hash_table_iter_init (&shape_iter, _tmp29_);
	while (TRUE) {
		Block* block = NULL;
		BlockActor* actor = NULL;
		gconstpointer _tmp30_ = NULL;
		gconstpointer _tmp31_ = NULL;
		gboolean _tmp32_ = FALSE;
		Block* _tmp33_ = NULL;
		BlockActor* _tmp34_ = NULL;
		BlockActor* _tmp35_ = NULL;
		gint _tmp36_ = 0;
		gint _tmp37_ = 0;
		gint _tmp38_ = 0;
		gint _tmp39_ = 0;
		BlockActor* _tmp40_ = NULL;
		Block* _tmp41_ = NULL;
		gint _tmp42_ = 0;
		gint _tmp43_ = 0;
		gint _tmp44_ = 0;
		Block* _tmp45_ = NULL;
		gint _tmp46_ = 0;
		gint _tmp47_ = 0;
		gint _tmp48_ = 0;
		_tmp32_ = g_hash_table_iter_next (&shape_iter, (gpointer*) (&_tmp30_), (gpointer*) (&_tmp31_));
		_g_object_unref0 (block);
		_tmp33_ = _g_object_ref0 (_tmp30_);
		block = _tmp33_;
		_g_object_unref0 (actor);
		_tmp34_ = _g_object_ref0 (_tmp31_);
		actor = _tmp34_;
		if (!_tmp32_) {
			_g_object_unref0 (actor);
			_g_object_unref0 (block);
			break;
		}
		_tmp35_ = actor;
		_tmp36_ = game_view_get_cell_size (self);
		_tmp37_ = _tmp36_;
		_tmp38_ = game_view_get_cell_size (self);
		_tmp39_ = _tmp38_;
		clutter_actor_set_size ((ClutterActor*) _tmp35_, (gfloat) _tmp37_, (gfloat) _tmp39_);
		_tmp40_ = actor;
		_tmp41_ = block;
		_tmp42_ = _tmp41_->x;
		_tmp43_ = game_view_get_cell_size (self);
		_tmp44_ = _tmp43_;
		_tmp45_ = block;
		_tmp46_ = _tmp45_->y;
		_tmp47_ = game_view_get_cell_size (self);
		_tmp48_ = _tmp47_;
		clutter_actor_set_position ((ClutterActor*) _tmp40_, (gfloat) (_tmp42_ * _tmp44_), (gfloat) (_tmp46_ * _tmp48_));
		_g_object_unref0 (actor);
		_g_object_unref0 (block);
	}
	_tmp49_ = self->priv->shape;
	if (_tmp49_ != NULL) {
		ClutterActor* _tmp50_ = NULL;
		Game* _tmp51_ = NULL;
		Game* _tmp52_ = NULL;
		Shape* _tmp53_ = NULL;
		gint _tmp54_ = 0;
		gint _tmp55_ = 0;
		gint _tmp56_ = 0;
		Game* _tmp57_ = NULL;
		Game* _tmp58_ = NULL;
		Shape* _tmp59_ = NULL;
		gint _tmp60_ = 0;
		gint _tmp61_ = 0;
		gint _tmp62_ = 0;
		_tmp50_ = self->priv->shape;
		_tmp51_ = game_view_get_game (self);
		_tmp52_ = _tmp51_;
		_tmp53_ = _tmp52_->shape;
		_tmp54_ = _tmp53_->x;
		_tmp55_ = game_view_get_cell_size (self);
		_tmp56_ = _tmp55_;
		_tmp57_ = game_view_get_game (self);
		_tmp58_ = _tmp57_;
		_tmp59_ = _tmp58_->shape;
		_tmp60_ = _tmp59_->y;
		_tmp61_ = game_view_get_cell_size (self);
		_tmp62_ = _tmp61_;
		clutter_actor_set_position (_tmp50_, (gfloat) (_tmp54_ * _tmp56_), (gfloat) (_tmp60_ * _tmp62_));
	}
	game_view_update_shadow (self);
	_tmp63_ = self->priv->text_overlay;
	_tmp64_ = gtk_widget_get_allocated_width ((GtkWidget*) self);
	_tmp65_ = gtk_widget_get_allocated_height ((GtkWidget*) self);
	clutter_actor_set_size ((ClutterActor*) _tmp63_, (gfloat) _tmp64_, (gfloat) _tmp65_);
	_tmp66_ = self->priv->text_overlay;
	_tmp67_ = clutter_actor_get_parent ((ClutterActor*) _tmp66_);
	_tmp68_ = self->priv->text_overlay;
	clutter_actor_set_child_above_sibling (_tmp67_, (ClutterActor*) _tmp68_, NULL);
	_tmp69_ = self->priv->playing_field;
	_tmp70_ = game_view_get_game (self);
	_tmp71_ = _tmp70_;
	_tmp72_ = game_get_width (_tmp71_);
	_tmp73_ = _tmp72_;
	_tmp74_ = game_view_get_cell_size (self);
	_tmp75_ = _tmp74_;
	_tmp76_ = game_view_get_game (self);
	_tmp77_ = _tmp76_;
	_tmp78_ = game_get_height (_tmp77_);
	_tmp79_ = _tmp78_;
	_tmp80_ = game_view_get_cell_size (self);
	_tmp81_ = _tmp80_;
	clutter_actor_set_size (_tmp69_, (gfloat) (_tmp73_ * _tmp75_), (gfloat) (_tmp79_ * _tmp81_));
	_tmp82_ = self->priv->playing_field;
	_tmp83_ = gtk_widget_get_allocated_width ((GtkWidget*) self);
	_tmp84_ = self->priv->playing_field;
	_tmp85_ = clutter_actor_get_width (_tmp84_);
	_tmp86_ = gtk_widget_get_allocated_height ((GtkWidget*) self);
	_tmp87_ = self->priv->playing_field;
	_tmp88_ = clutter_actor_get_height (_tmp87_);
	clutter_actor_set_position (_tmp82_, (_tmp83_ - _tmp85_) * 0.5f, _tmp86_ - _tmp88_);
}


static void game_view_pause_changed_cb (GameView* self) {
	g_return_if_fail (self != NULL);
	game_view_update_message (self);
}


static void game_view_game_complete_cb (GameView* self) {
	g_return_if_fail (self != NULL);
	game_view_play_sound (self, "gameover");
	game_view_update_message (self);
}


static void game_view_update_message (GameView* self) {
	Game* _tmp0_ = NULL;
	Game* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = game_view_get_game (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = game_get_paused (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		TextOverlay* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		_tmp4_ = self->priv->text_overlay;
		_tmp5_ = _ ("Paused");
		text_overlay_set_text (_tmp4_, _tmp5_);
	} else {
		Game* _tmp6_ = NULL;
		Game* _tmp7_ = NULL;
		gboolean _tmp8_ = FALSE;
		_tmp6_ = game_view_get_game (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_->game_over;
		if (_tmp8_) {
			TextOverlay* _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			_tmp9_ = self->priv->text_overlay;
			_tmp10_ = _ ("Game Over");
			text_overlay_set_text (_tmp9_, _tmp10_);
		} else {
			TextOverlay* _tmp11_ = NULL;
			_tmp11_ = self->priv->text_overlay;
			text_overlay_set_text (_tmp11_, NULL);
		}
	}
}


Game* game_view_get_game (GameView* self) {
	Game* result;
	Game* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_game;
	result = _tmp0_;
	return result;
}


static void _game_view_shape_added_cb_game_shape_added (Game* _sender, gpointer self) {
	game_view_shape_added_cb ((GameView*) self);
}


static void _game_view_shape_moved_cb_game_shape_moved (Game* _sender, gpointer self) {
	game_view_shape_moved_cb ((GameView*) self);
}


static void _game_view_shape_dropped_cb_game_shape_dropped (Game* _sender, gpointer self) {
	game_view_shape_dropped_cb ((GameView*) self);
}


static void _game_view_shape_rotated_cb_game_shape_rotated (Game* _sender, gpointer self) {
	game_view_shape_rotated_cb ((GameView*) self);
}


static void _game_view_shape_landed_cb_game_shape_landed (Game* _sender, gint* lines, int lines_length1, GList* line_blocks, gpointer self) {
	game_view_shape_landed_cb ((GameView*) self, lines, lines_length1, line_blocks);
}


static void _game_view_pause_changed_cb_game_pause_changed (Game* _sender, gpointer self) {
	game_view_pause_changed_cb ((GameView*) self);
}


static void _game_view_game_complete_cb_game_complete (Game* _sender, gpointer self) {
	game_view_game_complete_cb ((GameView*) self);
}


void game_view_set_game (GameView* self, Game* value) {
	Game* _tmp0_ = NULL;
	Game* _tmp2_ = NULL;
	Game* _tmp3_ = NULL;
	Game* _tmp4_ = NULL;
	Game* _tmp5_ = NULL;
	Game* _tmp6_ = NULL;
	Game* _tmp7_ = NULL;
	Game* _tmp8_ = NULL;
	Game* _tmp9_ = NULL;
	Game* _tmp10_ = NULL;
	GHashTable* _tmp11_ = NULL;
	ClutterActor* _tmp12_ = NULL;
	Game* _tmp13_ = NULL;
	Game* _tmp14_ = NULL;
	Shape* _tmp15_ = NULL;
	Game* _tmp62_ = NULL;
	gint _tmp63_ = 0;
	gint _tmp64_ = 0;
	Game* _tmp65_ = NULL;
	gint _tmp66_ = 0;
	gint _tmp67_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game;
	if (_tmp0_ != NULL) {
		Game* _tmp1_ = NULL;
		_tmp1_ = self->priv->_game;
		g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_DATA, (guint) 0, (GQuark) 0, NULL, NULL, self);
	}
	_tmp2_ = value;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->_game);
	self->priv->_game = _tmp3_;
	_tmp4_ = self->priv->_game;
	g_signal_connect_object (_tmp4_, "shape-added", (GCallback) _game_view_shape_added_cb_game_shape_added, self, 0);
	_tmp5_ = self->priv->_game;
	g_signal_connect_object (_tmp5_, "shape-moved", (GCallback) _game_view_shape_moved_cb_game_shape_moved, self, 0);
	_tmp6_ = self->priv->_game;
	g_signal_connect_object (_tmp6_, "shape-dropped", (GCallback) _game_view_shape_dropped_cb_game_shape_dropped, self, 0);
	_tmp7_ = self->priv->_game;
	g_signal_connect_object (_tmp7_, "shape-rotated", (GCallback) _game_view_shape_rotated_cb_game_shape_rotated, self, 0);
	_tmp8_ = self->priv->_game;
	g_signal_connect_object (_tmp8_, "shape-landed", (GCallback) _game_view_shape_landed_cb_game_shape_landed, self, 0);
	_tmp9_ = self->priv->_game;
	g_signal_connect_object (_tmp9_, "pause-changed", (GCallback) _game_view_pause_changed_cb_game_pause_changed, self, 0);
	_tmp10_ = self->priv->_game;
	g_signal_connect_object (_tmp10_, "complete", (GCallback) _game_view_game_complete_cb_game_complete, self, 0);
	_tmp11_ = self->priv->blocks;
	g_hash_table_remove_all (_tmp11_);
	_tmp12_ = self->priv->playing_field;
	clutter_actor_remove_all_children (_tmp12_);
	_g_object_unref0 (self->priv->shape_shadow);
	self->priv->shape_shadow = NULL;
	_tmp13_ = game_view_get_game (self);
	_tmp14_ = _tmp13_;
	_tmp15_ = _tmp14_->shape;
	if (_tmp15_ != NULL) {
		game_view_shape_added_cb (self);
	}
	{
		gint x = 0;
		x = 0;
		{
			gboolean _tmp16_ = FALSE;
			_tmp16_ = TRUE;
			while (TRUE) {
				gint _tmp18_ = 0;
				Game* _tmp19_ = NULL;
				gint _tmp20_ = 0;
				gint _tmp21_ = 0;
				if (!_tmp16_) {
					gint _tmp17_ = 0;
					_tmp17_ = x;
					x = _tmp17_ + 1;
				}
				_tmp16_ = FALSE;
				_tmp18_ = x;
				_tmp19_ = self->priv->_game;
				_tmp20_ = game_get_width (_tmp19_);
				_tmp21_ = _tmp20_;
				if (!(_tmp18_ < _tmp21_)) {
					break;
				}
				{
					gint y = 0;
					y = 0;
					{
						gboolean _tmp22_ = FALSE;
						_tmp22_ = TRUE;
						while (TRUE) {
							gint _tmp24_ = 0;
							Game* _tmp25_ = NULL;
							gint _tmp26_ = 0;
							gint _tmp27_ = 0;
							Block* block = NULL;
							Game* _tmp28_ = NULL;
							Block** _tmp29_ = NULL;
							gint _tmp29__length1 = 0;
							gint _tmp29__length2 = 0;
							gint _tmp30_ = 0;
							gint _tmp31_ = 0;
							Block* _tmp32_ = NULL;
							Block* _tmp33_ = NULL;
							Block* _tmp34_ = NULL;
							if (!_tmp22_) {
								gint _tmp23_ = 0;
								_tmp23_ = y;
								y = _tmp23_ + 1;
							}
							_tmp22_ = FALSE;
							_tmp24_ = y;
							_tmp25_ = self->priv->_game;
							_tmp26_ = game_get_height (_tmp25_);
							_tmp27_ = _tmp26_;
							if (!(_tmp24_ < _tmp27_)) {
								break;
							}
							_tmp28_ = self->priv->_game;
							_tmp29_ = _tmp28_->blocks;
							_tmp29__length1 = _tmp28_->blocks_length1;
							_tmp29__length2 = _tmp28_->blocks_length2;
							_tmp30_ = x;
							_tmp31_ = y;
							_tmp32_ = _tmp29_[(_tmp30_ * _tmp29__length2) + _tmp31_];
							_tmp33_ = _g_object_ref0 (_tmp32_);
							block = _tmp33_;
							_tmp34_ = block;
							if (_tmp34_ != NULL) {
								BlockActor* actor = NULL;
								Block* _tmp35_ = NULL;
								BlockTexture** _tmp36_ = NULL;
								gint _tmp36__length1 = 0;
								Block* _tmp37_ = NULL;
								gint _tmp38_ = 0;
								BlockTexture* _tmp39_ = NULL;
								BlockActor* _tmp40_ = NULL;
								GHashTable* _tmp41_ = NULL;
								Block* _tmp42_ = NULL;
								Block* _tmp43_ = NULL;
								BlockActor* _tmp44_ = NULL;
								BlockActor* _tmp45_ = NULL;
								BlockActor* _tmp46_ = NULL;
								gint _tmp47_ = 0;
								gint _tmp48_ = 0;
								gint _tmp49_ = 0;
								gint _tmp50_ = 0;
								BlockActor* _tmp51_ = NULL;
								Block* _tmp52_ = NULL;
								gint _tmp53_ = 0;
								gint _tmp54_ = 0;
								gint _tmp55_ = 0;
								Block* _tmp56_ = NULL;
								gint _tmp57_ = 0;
								gint _tmp58_ = 0;
								gint _tmp59_ = 0;
								ClutterActor* _tmp60_ = NULL;
								BlockActor* _tmp61_ = NULL;
								_tmp35_ = block;
								_tmp36_ = self->priv->block_textures;
								_tmp36__length1 = self->priv->block_textures_length1;
								_tmp37_ = block;
								_tmp38_ = _tmp37_->color;
								_tmp39_ = _tmp36_[_tmp38_];
								_tmp40_ = block_actor_new (_tmp35_, (ClutterActor*) _tmp39_);
								g_object_ref_sink (_tmp40_);
								actor = _tmp40_;
								_tmp41_ = self->priv->blocks;
								_tmp42_ = block;
								_tmp43_ = _g_object_ref0 (_tmp42_);
								_tmp44_ = actor;
								_tmp45_ = _g_object_ref0 (_tmp44_);
								g_hash_table_insert (_tmp41_, _tmp43_, _tmp45_);
								_tmp46_ = actor;
								_tmp47_ = game_view_get_cell_size (self);
								_tmp48_ = _tmp47_;
								_tmp49_ = game_view_get_cell_size (self);
								_tmp50_ = _tmp49_;
								clutter_actor_set_size ((ClutterActor*) _tmp46_, (gfloat) _tmp48_, (gfloat) _tmp50_);
								_tmp51_ = actor;
								_tmp52_ = block;
								_tmp53_ = _tmp52_->x;
								_tmp54_ = game_view_get_cell_size (self);
								_tmp55_ = _tmp54_;
								_tmp56_ = block;
								_tmp57_ = _tmp56_->y;
								_tmp58_ = game_view_get_cell_size (self);
								_tmp59_ = _tmp58_;
								clutter_actor_set_position ((ClutterActor*) _tmp51_, (gfloat) (_tmp53_ * _tmp55_), (gfloat) (_tmp57_ * _tmp59_));
								_tmp60_ = self->priv->playing_field;
								_tmp61_ = actor;
								clutter_container_add ((ClutterContainer*) _tmp60_, (ClutterActor*) _tmp61_, NULL);
								_g_object_unref0 (actor);
							}
							_g_object_unref0 (block);
						}
					}
				}
			}
		}
	}
	_tmp62_ = self->priv->_game;
	_tmp63_ = game_get_width (_tmp62_);
	_tmp64_ = _tmp63_;
	_tmp65_ = self->priv->_game;
	_tmp66_ = game_get_height (_tmp65_);
	_tmp67_ = _tmp66_;
	gtk_widget_set_size_request ((GtkWidget*) self, (_tmp64_ * 190) / _tmp67_, 190);
	game_view_update_message (self);
	g_object_notify ((GObject *) self, "game");
}


void game_view_set_theme (GameView* self, const gchar* value) {
	BlockTexture** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->block_textures;
	_tmp0__length1 = self->priv->block_textures_length1;
	{
		BlockTexture** texture_collection = NULL;
		gint texture_collection_length1 = 0;
		gint _texture_collection_size_ = 0;
		gint texture_it = 0;
		texture_collection = _tmp0_;
		texture_collection_length1 = _tmp0__length1;
		for (texture_it = 0; texture_it < _tmp0__length1; texture_it = texture_it + 1) {
			BlockTexture* _tmp1_ = NULL;
			BlockTexture* texture = NULL;
			_tmp1_ = _g_object_ref0 (texture_collection[texture_it]);
			texture = _tmp1_;
			{
				BlockTexture* _tmp2_ = NULL;
				const gchar* _tmp3_ = NULL;
				_tmp2_ = texture;
				_tmp3_ = value;
				block_texture_set_theme (_tmp2_, _tmp3_);
				_g_object_unref0 (texture);
			}
		}
	}
	g_object_notify ((GObject *) self, "theme");
}


gboolean game_view_get_show_shadow (GameView* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_show_shadow;
	result = _tmp0_;
	return result;
}


void game_view_set_show_shadow (GameView* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_show_shadow = _tmp0_;
	game_view_update_shadow (self);
	g_object_notify ((GObject *) self, "show-shadow");
}


static gint game_view_get_cell_size (GameView* self) {
	gint result;
	Game* _tmp0_ = NULL;
	Game* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = game_view_get_game (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		gint _tmp2_ = 0;
		Game* _tmp3_ = NULL;
		Game* _tmp4_ = NULL;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
		Game* _tmp8_ = NULL;
		Game* _tmp9_ = NULL;
		gint _tmp10_ = 0;
		gint _tmp11_ = 0;
		gint _tmp12_ = 0;
		_tmp2_ = gtk_widget_get_allocated_width ((GtkWidget*) self);
		_tmp3_ = game_view_get_game (self);
		_tmp4_ = _tmp3_;
		_tmp5_ = game_get_width (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = gtk_widget_get_allocated_height ((GtkWidget*) self);
		_tmp8_ = game_view_get_game (self);
		_tmp9_ = _tmp8_;
		_tmp10_ = game_get_height (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = MIN (_tmp2_ / _tmp6_, _tmp7_ / _tmp11_);
		result = _tmp12_;
		return result;
	} else {
		result = 0;
		return result;
	}
}


static void game_view_class_init (GameViewClass * klass) {
	game_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GameViewPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_game_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_game_view_set_property;
	G_OBJECT_CLASS (klass)->finalize = game_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAME_VIEW_GAME, g_param_spec_object ("game", "game", "game", TYPE_GAME, 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), GAME_VIEW_THEME, g_param_spec_string ("theme", "theme", "theme", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAME_VIEW_SHOW_SHADOW, g_param_spec_boolean ("show-shadow", "show-shadow", "show-shadow", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void game_view_instance_init (GameView * self) {
	self->priv = GAME_VIEW_GET_PRIVATE (self);
	self->priv->_game = NULL;
	self->priv->shape = NULL;
	self->priv->shape_shadow = NULL;
	self->priv->_show_shadow = FALSE;
}


static void game_view_finalize (GObject* obj) {
	GameView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_GAME_VIEW, GameView);
	_g_object_unref0 (self->priv->_game);
	_g_object_unref0 (self->priv->playing_field);
	_g_object_unref0 (self->priv->shape);
	_g_object_unref0 (self->priv->shape_shadow);
	_g_object_unref0 (self->priv->text_overlay);
	self->priv->block_textures = (_vala_array_free (self->priv->block_textures, self->priv->block_textures_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_hash_table_unref0 (self->priv->blocks);
	_g_hash_table_unref0 (self->priv->shape_blocks);
	G_OBJECT_CLASS (game_view_parent_class)->finalize (obj);
}


GType game_view_get_type (void) {
	static volatile gsize game_view_type_id__volatile = 0;
	if (g_once_init_enter (&game_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GameViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) game_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GameView), 0, (GInstanceInitFunc) game_view_instance_init, NULL };
		GType game_view_type_id;
		game_view_type_id = g_type_register_static (gtk_clutter_embed_get_type (), "GameView", &g_define_type_info, 0);
		g_once_init_leave (&game_view_type_id__volatile, game_view_type_id);
	}
	return game_view_type_id__volatile;
}


static void _vala_game_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GameView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_GAME_VIEW, GameView);
	switch (property_id) {
		case GAME_VIEW_GAME:
		g_value_set_object (value, game_view_get_game (self));
		break;
		case GAME_VIEW_SHOW_SHADOW:
		g_value_set_boolean (value, game_view_get_show_shadow (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_game_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GameView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_GAME_VIEW, GameView);
	switch (property_id) {
		case GAME_VIEW_GAME:
		game_view_set_game (self, g_value_get_object (value));
		break;
		case GAME_VIEW_THEME:
		game_view_set_theme (self, g_value_get_string (value));
		break;
		case GAME_VIEW_SHOW_SHADOW:
		game_view_set_show_shadow (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


BlockActor* block_actor_construct (GType object_type, Block* block, ClutterActor* texture) {
	BlockActor * self = NULL;
	ClutterActor* _tmp0_ = NULL;
	Block* _tmp1_ = NULL;
	Block* _tmp2_ = NULL;
	g_return_val_if_fail (block != NULL, NULL);
	g_return_val_if_fail (texture != NULL, NULL);
	_tmp0_ = texture;
	self = (BlockActor*) g_object_new (object_type, "source", _tmp0_, NULL);
	_tmp1_ = block;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->block);
	self->block = _tmp2_;
	return self;
}


BlockActor* block_actor_new (Block* block, ClutterActor* texture) {
	return block_actor_construct (TYPE_BLOCK_ACTOR, block, texture);
}


static void _block_actor_explode_complete_cb_clutter_actor_transitions_completed (ClutterActor* _sender, gpointer self) {
	block_actor_explode_complete_cb ((BlockActor*) self);
}


void block_actor_explode (BlockActor* self) {
	ClutterActor* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = clutter_actor_get_parent ((ClutterActor*) self);
	clutter_actor_set_child_above_sibling (_tmp0_, (ClutterActor*) self, NULL);
	clutter_actor_save_easing_state ((ClutterActor*) self);
	clutter_actor_set_easing_mode ((ClutterActor*) self, CLUTTER_EASE_OUT_QUINT);
	clutter_actor_set_easing_duration ((ClutterActor*) self, (guint) 720);
	clutter_actor_set_opacity ((ClutterActor*) self, (guint8) 0);
	clutter_actor_set_scale ((ClutterActor*) self, (gdouble) 2.f, (gdouble) 2.f);
	g_signal_connect_object ((ClutterActor*) self, "transitions-completed", (GCallback) _block_actor_explode_complete_cb_clutter_actor_transitions_completed, self, 0);
	clutter_actor_restore_easing_state ((ClutterActor*) self);
}


static void block_actor_explode_complete_cb (BlockActor* self) {
	g_return_if_fail (self != NULL);
	clutter_actor_destroy ((ClutterActor*) self);
}


static void block_actor_class_init (BlockActorClass * klass) {
	block_actor_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = block_actor_finalize;
}


static void block_actor_instance_init (BlockActor * self) {
}


static void block_actor_finalize (GObject* obj) {
	BlockActor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BLOCK_ACTOR, BlockActor);
	_g_object_unref0 (self->block);
	G_OBJECT_CLASS (block_actor_parent_class)->finalize (obj);
}


GType block_actor_get_type (void) {
	static volatile gsize block_actor_type_id__volatile = 0;
	if (g_once_init_enter (&block_actor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BlockActorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) block_actor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BlockActor), 0, (GInstanceInitFunc) block_actor_instance_init, NULL };
		GType block_actor_type_id;
		block_actor_type_id = g_type_register_static (clutter_clone_get_type (), "BlockActor", &g_define_type_info, 0);
		g_once_init_leave (&block_actor_type_id__volatile, block_actor_type_id);
	}
	return block_actor_type_id__volatile;
}


TextOverlay* text_overlay_construct (GType object_type) {
	TextOverlay * self = NULL;
	self = (TextOverlay*) g_object_new (object_type, NULL);
	clutter_cairo_texture_set_auto_resize ((ClutterCairoTexture*) self, TRUE);
	return self;
}


TextOverlay* text_overlay_new (void) {
	return text_overlay_construct (TYPE_TEXT_OVERLAY);
}


static void _vala_PangoFontDescription_free (PangoFontDescription* self) {
	g_boxed_free (pango_font_description_get_type (), self);
}


static gboolean text_overlay_real_draw (ClutterCairoTexture* base, cairo_t* cr) {
	TextOverlay * self;
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	guint w = 0U;
	guint h = 0U;
	guint _tmp2_ = 0U;
	guint _tmp3_ = 0U;
	cairo_t* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	guint _tmp6_ = 0U;
	PangoFontDescription* desc = NULL;
	PangoFontDescription* _tmp7_ = NULL;
	PangoLayout* layout = NULL;
	cairo_t* _tmp8_ = NULL;
	PangoLayout* _tmp9_ = NULL;
	PangoLayout* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	PangoLayout* dummy_layout = NULL;
	PangoLayout* _tmp13_ = NULL;
	PangoLayout* _tmp14_ = NULL;
	PangoLayout* _tmp15_ = NULL;
	PangoFontDescription* _tmp16_ = NULL;
	gint lw = 0;
	gint lh = 0;
	PangoLayout* _tmp17_ = NULL;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
	PangoFontDescription* _tmp20_ = NULL;
	gint _tmp21_ = 0;
	gint _tmp22_ = 0;
	guint _tmp23_ = 0U;
	PangoLayout* _tmp24_ = NULL;
	PangoFontDescription* _tmp25_ = NULL;
	PangoLayout* _tmp26_ = NULL;
	gint _tmp27_ = 0;
	gint _tmp28_ = 0;
	cairo_t* _tmp29_ = NULL;
	gint _tmp30_ = 0;
	gint _tmp31_ = 0;
	cairo_t* _tmp32_ = NULL;
	PangoLayout* _tmp33_ = NULL;
	cairo_t* _tmp34_ = NULL;
	cairo_t* _tmp35_ = NULL;
	gfloat _tmp36_ = 0.0F;
	gfloat _tmp37_ = 0.0F;
	cairo_t* _tmp38_ = NULL;
	cairo_t* _tmp39_ = NULL;
	cairo_t* _tmp40_ = NULL;
	self = (TextOverlay*) base;
	g_return_val_if_fail (cr != NULL, FALSE);
	clutter_cairo_texture_clear ((ClutterCairoTexture*) self);
	_tmp0_ = text_overlay_get_text (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		result = FALSE;
		return result;
	}
	clutter_cairo_texture_get_surface_size ((ClutterCairoTexture*) self, &_tmp2_, &_tmp3_);
	w = _tmp2_;
	h = _tmp3_;
	_tmp4_ = cr;
	_tmp5_ = w;
	_tmp6_ = h;
	cairo_translate (_tmp4_, (gdouble) (_tmp5_ / 2), (gdouble) (_tmp6_ / 2));
	_tmp7_ = pango_font_description_from_string ("Sans");
	desc = _tmp7_;
	_tmp8_ = cr;
	_tmp9_ = pango_cairo_create_layout (_tmp8_);
	layout = _tmp9_;
	_tmp10_ = layout;
	_tmp11_ = text_overlay_get_text (self);
	_tmp12_ = _tmp11_;
	pango_layout_set_text (_tmp10_, _tmp12_, -1);
	_tmp13_ = layout;
	_tmp14_ = pango_layout_copy (_tmp13_);
	dummy_layout = _tmp14_;
	_tmp15_ = dummy_layout;
	_tmp16_ = desc;
	pango_layout_set_font_description (_tmp15_, _tmp16_);
	_tmp17_ = dummy_layout;
	pango_layout_get_size (_tmp17_, &_tmp18_, &_tmp19_);
	lw = _tmp18_;
	lh = _tmp19_;
	_tmp20_ = desc;
	_tmp21_ = lh;
	_tmp22_ = lw;
	_tmp23_ = w;
	pango_font_description_set_absolute_size (_tmp20_, (((((gfloat) _tmp21_) / _tmp22_) * PANGO_SCALE) * _tmp23_) * 0.7);
	_tmp24_ = layout;
	_tmp25_ = desc;
	pango_layout_set_font_description (_tmp24_, _tmp25_);
	_tmp26_ = layout;
	pango_layout_get_size (_tmp26_, &_tmp27_, &_tmp28_);
	lw = _tmp27_;
	lh = _tmp28_;
	_tmp29_ = cr;
	_tmp30_ = lw;
	_tmp31_ = lh;
	cairo_move_to (_tmp29_, (-(((gdouble) _tmp30_) / PANGO_SCALE)) / 2, (-(((gdouble) _tmp31_) / PANGO_SCALE)) / 2);
	_tmp32_ = cr;
	_tmp33_ = layout;
	pango_cairo_layout_path (_tmp32_, _tmp33_);
	_tmp34_ = cr;
	cairo_set_source_rgb (_tmp34_, 0.333333333333, 0.341176470588, 0.32549019607);
	_tmp35_ = cr;
	_tmp36_ = clutter_actor_get_width ((ClutterActor*) self);
	_tmp37_ = _tmp36_;
	cairo_set_line_width (_tmp35_, _tmp37_ / 100.0);
	_tmp38_ = cr;
	cairo_stroke_preserve (_tmp38_);
	_tmp39_ = cr;
	cairo_set_source_rgb (_tmp39_, 1.0, 1.0, 1.0);
	_tmp40_ = cr;
	cairo_fill (_tmp40_);
	result = FALSE;
	_g_object_unref0 (dummy_layout);
	_g_object_unref0 (layout);
	__vala_PangoFontDescription_free0 (desc);
	return result;
}


const gchar* text_overlay_get_text (TextOverlay* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}


void text_overlay_set_text (TextOverlay* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_text);
	self->priv->_text = _tmp1_;
	clutter_cairo_texture_invalidate ((ClutterCairoTexture*) self);
	g_object_notify ((GObject *) self, "text");
}


static void text_overlay_class_init (TextOverlayClass * klass) {
	text_overlay_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (TextOverlayPrivate));
	((ClutterCairoTextureClass *) klass)->draw = text_overlay_real_draw;
	G_OBJECT_CLASS (klass)->get_property = _vala_text_overlay_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_text_overlay_set_property;
	G_OBJECT_CLASS (klass)->finalize = text_overlay_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TEXT_OVERLAY_TEXT, g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void text_overlay_instance_init (TextOverlay * self) {
	self->priv = TEXT_OVERLAY_GET_PRIVATE (self);
	self->priv->_text = NULL;
}


static void text_overlay_finalize (GObject* obj) {
	TextOverlay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TEXT_OVERLAY, TextOverlay);
	_g_free0 (self->priv->_text);
	G_OBJECT_CLASS (text_overlay_parent_class)->finalize (obj);
}


GType text_overlay_get_type (void) {
	static volatile gsize text_overlay_type_id__volatile = 0;
	if (g_once_init_enter (&text_overlay_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TextOverlayClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) text_overlay_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TextOverlay), 0, (GInstanceInitFunc) text_overlay_instance_init, NULL };
		GType text_overlay_type_id;
		text_overlay_type_id = g_type_register_static (clutter_cairo_texture_get_type (), "TextOverlay", &g_define_type_info, 0);
		g_once_init_leave (&text_overlay_type_id__volatile, text_overlay_type_id);
	}
	return text_overlay_type_id__volatile;
}


static void _vala_text_overlay_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TextOverlay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TEXT_OVERLAY, TextOverlay);
	switch (property_id) {
		case TEXT_OVERLAY_TEXT:
		g_value_set_string (value, text_overlay_get_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_text_overlay_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TextOverlay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TEXT_OVERLAY, TextOverlay);
	switch (property_id) {
		case TEXT_OVERLAY_TEXT:
		text_overlay_set_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


BlockTexture* block_texture_construct (GType object_type, gint color) {
	BlockTexture * self = NULL;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	self = (BlockTexture*) g_object_new (object_type, NULL);
	clutter_cairo_texture_set_auto_resize ((ClutterCairoTexture*) self, TRUE);
	_tmp0_ = color;
	_tmp1_ = CLAMP (_tmp0_, 0, 6);
	self->priv->color = _tmp1_;
	return self;
}


BlockTexture* block_texture_new (gint color) {
	return block_texture_construct (TYPE_BLOCK_TEXTURE, color);
}


static gboolean block_texture_real_draw (ClutterCairoTexture* base, cairo_t* cr) {
	BlockTexture * self;
	gboolean result = FALSE;
	guint w = 0U;
	guint h = 0U;
	guint _tmp0_ = 0U;
	guint _tmp1_ = 0U;
	cairo_t* _tmp2_ = NULL;
	guint _tmp3_ = 0U;
	guint _tmp4_ = 0U;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	GQuark _tmp9_ = 0U;
	static GQuark _tmp8_label0 = 0;
	static GQuark _tmp8_label1 = 0;
	static GQuark _tmp8_label2 = 0;
	self = (BlockTexture*) base;
	g_return_val_if_fail (cr != NULL, FALSE);
	clutter_cairo_texture_clear ((ClutterCairoTexture*) self);
	clutter_cairo_texture_get_surface_size ((ClutterCairoTexture*) self, &_tmp0_, &_tmp1_);
	w = _tmp0_;
	h = _tmp1_;
	_tmp2_ = cr;
	_tmp3_ = w;
	_tmp4_ = h;
	cairo_scale (_tmp2_, (gdouble) _tmp3_, (gdouble) _tmp4_);
	_tmp5_ = block_texture_get_theme (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	_tmp9_ = (NULL == _tmp7_) ? 0 : g_quark_from_string (_tmp7_);
	if (_tmp9_ == ((0 != _tmp8_label0) ? _tmp8_label0 : (_tmp8_label0 = g_quark_from_static_string ("clean")))) {
		switch (0) {
			default:
			{
				cairo_t* _tmp10_ = NULL;
				_tmp10_ = cr;
				block_texture_draw_clean (self, _tmp10_);
				break;
			}
		}
	} else if (_tmp9_ == ((0 != _tmp8_label1) ? _tmp8_label1 : (_tmp8_label1 = g_quark_from_static_string ("tangoflat")))) {
		switch (0) {
			default:
			{
				cairo_t* _tmp11_ = NULL;
				_tmp11_ = cr;
				block_texture_draw_tango (self, _tmp11_, FALSE);
				break;
			}
		}
	} else if (_tmp9_ == ((0 != _tmp8_label2) ? _tmp8_label2 : (_tmp8_label2 = g_quark_from_static_string ("tangoshaded")))) {
		switch (0) {
			default:
			{
				cairo_t* _tmp12_ = NULL;
				_tmp12_ = cr;
				block_texture_draw_tango (self, _tmp12_, TRUE);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				cairo_t* _tmp13_ = NULL;
				_tmp13_ = cr;
				block_texture_draw_plain (self, _tmp13_);
				break;
			}
		}
	}
	result = FALSE;
	return result;
}


static void block_texture_draw_plain (BlockTexture* self, cairo_t* cr) {
	static const gdouble colors[] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 1.0};
	cairo_t* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gdouble _tmp2_ = 0.0;
	gint _tmp3_ = 0;
	gdouble _tmp4_ = 0.0;
	gint _tmp5_ = 0;
	gdouble _tmp6_ = 0.0;
	cairo_t* _tmp7_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cr != NULL);
	_tmp0_ = cr;
	_tmp1_ = self->priv->color;
	_tmp2_ = colors[_tmp1_ * 3];
	_tmp3_ = self->priv->color;
	_tmp4_ = colors[(_tmp3_ * 3) + 1];
	_tmp5_ = self->priv->color;
	_tmp6_ = colors[(_tmp5_ * 3) + 2];
	cairo_set_source_rgb (_tmp0_, _tmp2_, _tmp4_, _tmp6_);
	_tmp7_ = cr;
	cairo_paint (_tmp7_);
}


static void block_texture_draw_rounded_rectangle (BlockTexture* self, cairo_t* cr, gdouble x, gdouble y, gdouble w, gdouble h, gdouble r) {
	cairo_t* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	gdouble _tmp3_ = 0.0;
	cairo_t* _tmp4_ = NULL;
	gdouble _tmp5_ = 0.0;
	gdouble _tmp6_ = 0.0;
	gdouble _tmp7_ = 0.0;
	gdouble _tmp8_ = 0.0;
	cairo_t* _tmp9_ = NULL;
	gdouble _tmp10_ = 0.0;
	gdouble _tmp11_ = 0.0;
	gdouble _tmp12_ = 0.0;
	gdouble _tmp13_ = 0.0;
	gdouble _tmp14_ = 0.0;
	gdouble _tmp15_ = 0.0;
	gdouble _tmp16_ = 0.0;
	gdouble _tmp17_ = 0.0;
	gdouble _tmp18_ = 0.0;
	gdouble _tmp19_ = 0.0;
	gdouble _tmp20_ = 0.0;
	gdouble _tmp21_ = 0.0;
	cairo_t* _tmp22_ = NULL;
	gdouble _tmp23_ = 0.0;
	gdouble _tmp24_ = 0.0;
	gdouble _tmp25_ = 0.0;
	gdouble _tmp26_ = 0.0;
	gdouble _tmp27_ = 0.0;
	cairo_t* _tmp28_ = NULL;
	gdouble _tmp29_ = 0.0;
	gdouble _tmp30_ = 0.0;
	gdouble _tmp31_ = 0.0;
	gdouble _tmp32_ = 0.0;
	gdouble _tmp33_ = 0.0;
	gdouble _tmp34_ = 0.0;
	gdouble _tmp35_ = 0.0;
	gdouble _tmp36_ = 0.0;
	gdouble _tmp37_ = 0.0;
	gdouble _tmp38_ = 0.0;
	gdouble _tmp39_ = 0.0;
	gdouble _tmp40_ = 0.0;
	gdouble _tmp41_ = 0.0;
	gdouble _tmp42_ = 0.0;
	gdouble _tmp43_ = 0.0;
	cairo_t* _tmp44_ = NULL;
	gdouble _tmp45_ = 0.0;
	gdouble _tmp46_ = 0.0;
	gdouble _tmp47_ = 0.0;
	gdouble _tmp48_ = 0.0;
	cairo_t* _tmp49_ = NULL;
	gdouble _tmp50_ = 0.0;
	gdouble _tmp51_ = 0.0;
	gdouble _tmp52_ = 0.0;
	gdouble _tmp53_ = 0.0;
	gdouble _tmp54_ = 0.0;
	gdouble _tmp55_ = 0.0;
	gdouble _tmp56_ = 0.0;
	gdouble _tmp57_ = 0.0;
	gdouble _tmp58_ = 0.0;
	gdouble _tmp59_ = 0.0;
	gdouble _tmp60_ = 0.0;
	gdouble _tmp61_ = 0.0;
	cairo_t* _tmp62_ = NULL;
	gdouble _tmp63_ = 0.0;
	gdouble _tmp64_ = 0.0;
	gdouble _tmp65_ = 0.0;
	cairo_t* _tmp66_ = NULL;
	gdouble _tmp67_ = 0.0;
	gdouble _tmp68_ = 0.0;
	gdouble _tmp69_ = 0.0;
	gdouble _tmp70_ = 0.0;
	gdouble _tmp71_ = 0.0;
	gdouble _tmp72_ = 0.0;
	gdouble _tmp73_ = 0.0;
	gdouble _tmp74_ = 0.0;
	gdouble _tmp75_ = 0.0;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cr != NULL);
	_tmp0_ = cr;
	_tmp1_ = x;
	_tmp2_ = r;
	_tmp3_ = y;
	cairo_move_to (_tmp0_, _tmp1_ + _tmp2_, _tmp3_);
	_tmp4_ = cr;
	_tmp5_ = x;
	_tmp6_ = w;
	_tmp7_ = r;
	_tmp8_ = y;
	cairo_line_to (_tmp4_, (_tmp5_ + _tmp6_) - _tmp7_, _tmp8_);
	_tmp9_ = cr;
	_tmp10_ = x;
	_tmp11_ = w;
	_tmp12_ = r;
	_tmp13_ = y;
	_tmp14_ = x;
	_tmp15_ = w;
	_tmp16_ = y;
	_tmp17_ = r;
	_tmp18_ = x;
	_tmp19_ = w;
	_tmp20_ = y;
	_tmp21_ = r;
	cairo_curve_to (_tmp9_, (_tmp10_ + _tmp11_) - (_tmp12_ / 2), _tmp13_, _tmp14_ + _tmp15_, _tmp16_ + (_tmp17_ / 2), _tmp18_ + _tmp19_, _tmp20_ + _tmp21_);
	_tmp22_ = cr;
	_tmp23_ = x;
	_tmp24_ = w;
	_tmp25_ = y;
	_tmp26_ = h;
	_tmp27_ = r;
	cairo_line_to (_tmp22_, _tmp23_ + _tmp24_, (_tmp25_ + _tmp26_) - _tmp27_);
	_tmp28_ = cr;
	_tmp29_ = x;
	_tmp30_ = w;
	_tmp31_ = y;
	_tmp32_ = h;
	_tmp33_ = r;
	_tmp34_ = x;
	_tmp35_ = w;
	_tmp36_ = r;
	_tmp37_ = y;
	_tmp38_ = h;
	_tmp39_ = x;
	_tmp40_ = w;
	_tmp41_ = r;
	_tmp42_ = y;
	_tmp43_ = h;
	cairo_curve_to (_tmp28_, _tmp29_ + _tmp30_, (_tmp31_ + _tmp32_) - (_tmp33_ / 2), (_tmp34_ + _tmp35_) - (_tmp36_ / 2), _tmp37_ + _tmp38_, (_tmp39_ + _tmp40_) - _tmp41_, _tmp42_ + _tmp43_);
	_tmp44_ = cr;
	_tmp45_ = x;
	_tmp46_ = r;
	_tmp47_ = y;
	_tmp48_ = h;
	cairo_line_to (_tmp44_, _tmp45_ + _tmp46_, _tmp47_ + _tmp48_);
	_tmp49_ = cr;
	_tmp50_ = x;
	_tmp51_ = r;
	_tmp52_ = y;
	_tmp53_ = h;
	_tmp54_ = x;
	_tmp55_ = y;
	_tmp56_ = h;
	_tmp57_ = r;
	_tmp58_ = x;
	_tmp59_ = y;
	_tmp60_ = h;
	_tmp61_ = r;
	cairo_curve_to (_tmp49_, _tmp50_ + (_tmp51_ / 2), _tmp52_ + _tmp53_, _tmp54_, (_tmp55_ + _tmp56_) - (_tmp57_ / 2), _tmp58_, (_tmp59_ + _tmp60_) - _tmp61_);
	_tmp62_ = cr;
	_tmp63_ = x;
	_tmp64_ = y;
	_tmp65_ = r;
	cairo_line_to (_tmp62_, _tmp63_, _tmp64_ + _tmp65_);
	_tmp66_ = cr;
	_tmp67_ = x;
	_tmp68_ = y;
	_tmp69_ = r;
	_tmp70_ = x;
	_tmp71_ = r;
	_tmp72_ = y;
	_tmp73_ = x;
	_tmp74_ = r;
	_tmp75_ = y;
	cairo_curve_to (_tmp66_, _tmp67_, _tmp68_ + (_tmp69_ / 2), _tmp70_ + (_tmp71_ / 2), _tmp72_, _tmp73_ + _tmp74_, _tmp75_);
}


static void block_texture_draw_clean (BlockTexture* self, cairo_t* cr) {
	static const gdouble colors[] = {0.780392156863, 0.247058823529, 0.247058823529, 0.713725490196, 0.192156862745, 0.192156862745, 0.61568627451, 0.164705882353, 0.164705882353, 0.552941176471, 0.788235294118, 0.32549019607, 0.474509803922, 0.713725490196, 0.243137254902, 0.388235294118, 0.596078431373, 0.18431372549, 0.313725490196, 0.450980392157, 0.623529411765, 0.239215686275, 0.345098039216, 0.474509803922, 0.21568627451, 0.313725490196, 0.435294117647, 1.0, 1.0, 1.0, 0.909803921569, 0.909803921569, 0.898039215686, 0.701960784314, 0.701960784314, 0.670588235294, 0.945098039216, 0.878431372549, 0.321568627451, 0.929411764706, 0.839215686275, 0.113725490196, 0.760784313725, 0.682352941176, 0.0274509803922, 0.576470588235, 0.364705882353, 0.607843137255, 0.443137254902, 0.282352941176, 0.46666666666, 0.439215686275, 0.266666666667, 0.46666666666, 0.890196078431, 0.572549019608, 0.258823529412, 0.803921568627, 0.450980392157, 0.101960784314, 0.690196078431, 0.388235294118, 0.0901960784314, 0.392156862745, 0.392156862745, 0.392156862745, 0.262745098039, 0.262745098039, 0.262745098039, 0.21568627451, 0.235294117647, 0.23921568627};
	cairo_t* _tmp0_ = NULL;
	cairo_t* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gdouble _tmp3_ = 0.0;
	gint _tmp4_ = 0;
	gdouble _tmp5_ = 0.0;
	gint _tmp6_ = 0;
	gdouble _tmp7_ = 0.0;
	cairo_t* _tmp8_ = NULL;
	cairo_t* _tmp9_ = NULL;
	cairo_pattern_t* pat = NULL;
	cairo_pattern_t* _tmp10_ = NULL;
	gint _tmp11_ = 0;
	gdouble _tmp12_ = 0.0;
	gint _tmp13_ = 0;
	gdouble _tmp14_ = 0.0;
	gint _tmp15_ = 0;
	gdouble _tmp16_ = 0.0;
	gint _tmp17_ = 0;
	gdouble _tmp18_ = 0.0;
	gint _tmp19_ = 0;
	gdouble _tmp20_ = 0.0;
	gint _tmp21_ = 0;
	gdouble _tmp22_ = 0.0;
	cairo_t* _tmp23_ = NULL;
	cairo_t* _tmp24_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cr != NULL);
	_tmp0_ = cr;
	block_texture_draw_rounded_rectangle (self, _tmp0_, 0.05, 0.05, 0.9, 0.9, 0.05);
	_tmp1_ = cr;
	_tmp2_ = self->priv->color;
	_tmp3_ = colors[(_tmp2_ * 9) + 6];
	_tmp4_ = self->priv->color;
	_tmp5_ = colors[(_tmp4_ * 9) + 7];
	_tmp6_ = self->priv->color;
	_tmp7_ = colors[(_tmp6_ * 9) + 8];
	cairo_set_source_rgb (_tmp1_, _tmp3_, _tmp5_, _tmp7_);
	_tmp8_ = cr;
	cairo_set_line_width (_tmp8_, 0.1);
	_tmp9_ = cr;
	cairo_stroke_preserve (_tmp9_);
	_tmp10_ = cairo_pattern_create_linear (0.35, (gdouble) 0, 0.55, 0.9);
	pat = _tmp10_;
	_tmp11_ = self->priv->color;
	_tmp12_ = colors[_tmp11_ * 9];
	_tmp13_ = self->priv->color;
	_tmp14_ = colors[(_tmp13_ * 9) + 1];
	_tmp15_ = self->priv->color;
	_tmp16_ = colors[(_tmp15_ * 9) + 2];
	cairo_pattern_add_color_stop_rgb (pat, 0.0, _tmp12_, _tmp14_, _tmp16_);
	_tmp17_ = self->priv->color;
	_tmp18_ = colors[(_tmp17_ * 9) + 3];
	_tmp19_ = self->priv->color;
	_tmp20_ = colors[(_tmp19_ * 9) + 4];
	_tmp21_ = self->priv->color;
	_tmp22_ = colors[(_tmp21_ * 9) + 5];
	cairo_pattern_add_color_stop_rgb (pat, 1.0, _tmp18_, _tmp20_, _tmp22_);
	_tmp23_ = cr;
	cairo_set_source (_tmp23_, pat);
	_tmp24_ = cr;
	cairo_fill (_tmp24_);
	_cairo_pattern_destroy0 (pat);
}


static void block_texture_draw_tango (BlockTexture* self, cairo_t* cr, gboolean use_gradients) {
	static const gdouble colors[] = {0.93725490196078431, 0.16078431372549021, 0.16078431372549021, 0.8, 0.0, 0.0, 0.64313725490196083, 0.0, 0.0, 0.54117647058823526, 0.88627450980392153, 0.20392156862745098, 0.45098039215686275, 0.82352941176470584, 0.086274509803921567, 0.30588235294117649, 0.60392156862745094, 0.023529411764705882, 0.44705882352941179, 0.62352941176470589, 0.81176470588235294, 0.20392156862745098, 0.396078431372549, 0.64313725490196083, 0.12549019607843137, 0.29019607843137257, 0.52941176470588236, 0.93333333333333335, 0.93333333333333335, 0.92549019607843142, 0.82745098039215681, 0.84313725490196079, 0.81176470588235294, 0.72941176470588232, 0.74117647058823533, 0.71372549019607845, 0.9882352941176471, 0.9137254901960784, 0.30980392156862746, 0.92941176470588238, 0.83137254901960789, 0.0, 0.7686274509803922, 0.62745098039215685, 0.0, 0.67843137254901964, 0.49803921568627452, 0.6588235294117647, 0.45882352941176469, 0.31372549019607843, 0.4823529411764706, 0.36078431372549019, 0.20784313725490197, 0.4, 0.9882352941176471, 0.68627450980392157, 0.24313725490196078, 0.96078431372549022, 0.47450980392156861, 0.0, 0.80784313725490198, 0.36078431372549019, 0.0, 0.33, 0.34, 0.32, 0.18, 0.2, 0.21, 0.10, 0.12, 0.13};
	gboolean _tmp0_ = FALSE;
	cairo_t* _tmp25_ = NULL;
	cairo_t* _tmp26_ = NULL;
	cairo_t* _tmp27_ = NULL;
	gint _tmp28_ = 0;
	gdouble _tmp29_ = 0.0;
	gint _tmp30_ = 0;
	gdouble _tmp31_ = 0.0;
	gint _tmp32_ = 0;
	gdouble _tmp33_ = 0.0;
	cairo_t* _tmp34_ = NULL;
	cairo_t* _tmp35_ = NULL;
	cairo_t* _tmp36_ = NULL;
	gboolean _tmp37_ = FALSE;
	cairo_t* _tmp47_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (cr != NULL);
	_tmp0_ = use_gradients;
	if (_tmp0_) {
		cairo_pattern_t* pat = NULL;
		cairo_pattern_t* _tmp1_ = NULL;
		cairo_pattern_t* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gdouble _tmp4_ = 0.0;
		gint _tmp5_ = 0;
		gdouble _tmp6_ = 0.0;
		gint _tmp7_ = 0;
		gdouble _tmp8_ = 0.0;
		cairo_pattern_t* _tmp9_ = NULL;
		gint _tmp10_ = 0;
		gdouble _tmp11_ = 0.0;
		gint _tmp12_ = 0;
		gdouble _tmp13_ = 0.0;
		gint _tmp14_ = 0;
		gdouble _tmp15_ = 0.0;
		cairo_t* _tmp16_ = NULL;
		cairo_pattern_t* _tmp17_ = NULL;
		_tmp1_ = cairo_pattern_create_linear (0.35, (gdouble) 0, 0.55, 0.9);
		pat = _tmp1_;
		_tmp2_ = pat;
		_tmp3_ = self->priv->color;
		_tmp4_ = colors[_tmp3_ * 9];
		_tmp5_ = self->priv->color;
		_tmp6_ = colors[(_tmp5_ * 9) + 1];
		_tmp7_ = self->priv->color;
		_tmp8_ = colors[(_tmp7_ * 9) + 2];
		cairo_pattern_add_color_stop_rgb (_tmp2_, 0.0, _tmp4_, _tmp6_, _tmp8_);
		_tmp9_ = pat;
		_tmp10_ = self->priv->color;
		_tmp11_ = colors[(_tmp10_ * 9) + 3];
		_tmp12_ = self->priv->color;
		_tmp13_ = colors[(_tmp12_ * 9) + 4];
		_tmp14_ = self->priv->color;
		_tmp15_ = colors[(_tmp14_ * 9) + 5];
		cairo_pattern_add_color_stop_rgb (_tmp9_, 1.0, _tmp11_, _tmp13_, _tmp15_);
		_tmp16_ = cr;
		_tmp17_ = pat;
		cairo_set_source (_tmp16_, _tmp17_);
		_cairo_pattern_destroy0 (pat);
	} else {
		cairo_t* _tmp18_ = NULL;
		gint _tmp19_ = 0;
		gdouble _tmp20_ = 0.0;
		gint _tmp21_ = 0;
		gdouble _tmp22_ = 0.0;
		gint _tmp23_ = 0;
		gdouble _tmp24_ = 0.0;
		_tmp18_ = cr;
		_tmp19_ = self->priv->color;
		_tmp20_ = colors[_tmp19_ * 9];
		_tmp21_ = self->priv->color;
		_tmp22_ = colors[(_tmp21_ * 9) + 1];
		_tmp23_ = self->priv->color;
		_tmp24_ = colors[(_tmp23_ * 9) + 2];
		cairo_set_source_rgb (_tmp18_, _tmp20_, _tmp22_, _tmp24_);
	}
	_tmp25_ = cr;
	block_texture_draw_rounded_rectangle (self, _tmp25_, 0.05, 0.05, 0.9, 0.9, 0.2);
	_tmp26_ = cr;
	cairo_fill_preserve (_tmp26_);
	_tmp27_ = cr;
	_tmp28_ = self->priv->color;
	_tmp29_ = colors[(_tmp28_ * 9) + 6];
	_tmp30_ = self->priv->color;
	_tmp31_ = colors[(_tmp30_ * 9) + 7];
	_tmp32_ = self->priv->color;
	_tmp33_ = colors[(_tmp32_ * 9) + 8];
	cairo_set_source_rgb (_tmp27_, _tmp29_, _tmp31_, _tmp33_);
	_tmp34_ = cr;
	cairo_set_line_width (_tmp34_, 0.1);
	_tmp35_ = cr;
	cairo_stroke (_tmp35_);
	_tmp36_ = cr;
	block_texture_draw_rounded_rectangle (self, _tmp36_, 0.15, 0.15, 0.7, 0.7, 0.08);
	_tmp37_ = use_gradients;
	if (_tmp37_) {
		cairo_pattern_t* pat = NULL;
		cairo_pattern_t* _tmp38_ = NULL;
		gint _tmp39_ = 0;
		cairo_t* _tmp44_ = NULL;
		cairo_pattern_t* _tmp45_ = NULL;
		_tmp38_ = cairo_pattern_create_linear (-0.3, -0.3, 0.8, 0.8);
		pat = _tmp38_;
		_tmp39_ = self->priv->color;
		switch (_tmp39_) {
			case 3:
			case 4:
			{
				cairo_pattern_t* _tmp40_ = NULL;
				cairo_pattern_t* _tmp41_ = NULL;
				_tmp40_ = pat;
				cairo_pattern_add_color_stop_rgba (_tmp40_, 0.0, 1.0, 1.0, 1.0, 1.0);
				_tmp41_ = pat;
				cairo_pattern_add_color_stop_rgba (_tmp41_, 1.0, 1.0, 1.0, 1.0, 0.0);
				break;
			}
			default:
			{
				cairo_pattern_t* _tmp42_ = NULL;
				cairo_pattern_t* _tmp43_ = NULL;
				_tmp42_ = pat;
				cairo_pattern_add_color_stop_rgba (_tmp42_, 0.0, 0.9295, 0.9295, 0.9295, 1.0);
				_tmp43_ = pat;
				cairo_pattern_add_color_stop_rgba (_tmp43_, 1.0, 0.9295, 0.9295, 0.9295, 0.0);
				break;
			}
		}
		_tmp44_ = cr;
		_tmp45_ = pat;
		cairo_set_source (_tmp44_, _tmp45_);
		_cairo_pattern_destroy0 (pat);
	} else {
		cairo_t* _tmp46_ = NULL;
		_tmp46_ = cr;
		cairo_set_source_rgba (_tmp46_, 1.0, 1.0, 1.0, 0.35);
	}
	_tmp47_ = cr;
	cairo_stroke (_tmp47_);
}


const gchar* block_texture_get_theme (BlockTexture* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_theme;
	result = _tmp0_;
	return result;
}


void block_texture_set_theme (BlockTexture* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_theme;
	_tmp1_ = value;
	if (g_strcmp0 (_tmp0_, _tmp1_) == 0) {
		return;
	}
	_tmp2_ = value;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->priv->_theme);
	self->priv->_theme = _tmp3_;
	clutter_cairo_texture_invalidate ((ClutterCairoTexture*) self);
	g_object_notify ((GObject *) self, "theme");
}


static void block_texture_class_init (BlockTextureClass * klass) {
	block_texture_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BlockTexturePrivate));
	((ClutterCairoTextureClass *) klass)->draw = block_texture_real_draw;
	G_OBJECT_CLASS (klass)->get_property = _vala_block_texture_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_block_texture_set_property;
	G_OBJECT_CLASS (klass)->finalize = block_texture_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BLOCK_TEXTURE_THEME, g_param_spec_string ("theme", "theme", "theme", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void block_texture_instance_init (BlockTexture * self) {
	self->priv = BLOCK_TEXTURE_GET_PRIVATE (self);
	self->priv->_theme = NULL;
}


static void block_texture_finalize (GObject* obj) {
	BlockTexture * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BLOCK_TEXTURE, BlockTexture);
	_g_free0 (self->priv->_theme);
	G_OBJECT_CLASS (block_texture_parent_class)->finalize (obj);
}


GType block_texture_get_type (void) {
	static volatile gsize block_texture_type_id__volatile = 0;
	if (g_once_init_enter (&block_texture_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BlockTextureClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) block_texture_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BlockTexture), 0, (GInstanceInitFunc) block_texture_instance_init, NULL };
		GType block_texture_type_id;
		block_texture_type_id = g_type_register_static (clutter_cairo_texture_get_type (), "BlockTexture", &g_define_type_info, 0);
		g_once_init_leave (&block_texture_type_id__volatile, block_texture_type_id);
	}
	return block_texture_type_id__volatile;
}


static void _vala_block_texture_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BlockTexture * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BLOCK_TEXTURE, BlockTexture);
	switch (property_id) {
		case BLOCK_TEXTURE_THEME:
		g_value_set_string (value, block_texture_get_theme (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_block_texture_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BlockTexture * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BLOCK_TEXTURE, BlockTexture);
	switch (property_id) {
		case BLOCK_TEXTURE_THEME:
		block_texture_set_theme (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



