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

/* Copyright (C) 2014-2015 Juan R. García Blanco <juanrgar@gmail.com>
 * Copyright (C) 2016 Arnaud Bonatti <arnaud.bonatti@gmail.com>
 *
 * This file is part of GNOME 2048.
 *
 * GNOME 2048 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 3 of the License, or
 * (at your option) any later version.
 *
 * GNOME 2048 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GNOME 2048; if not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <cairo.h>
#include <clutter/clutter.h>
#include <float.h>
#include <math.h>
#include <string.h>
#include <pango/pango.h>
#include <pango/pangocairo.h>
#include <stdlib.h>
#include <gee.h>


#define TYPE_ROUNDED_RECTANGLE (rounded_rectangle_get_type ())
#define ROUNDED_RECTANGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ROUNDED_RECTANGLE, RoundedRectangle))
#define ROUNDED_RECTANGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ROUNDED_RECTANGLE, RoundedRectangleClass))
#define IS_ROUNDED_RECTANGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ROUNDED_RECTANGLE))
#define IS_ROUNDED_RECTANGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ROUNDED_RECTANGLE))
#define ROUNDED_RECTANGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ROUNDED_RECTANGLE, RoundedRectangleClass))

typedef struct _RoundedRectangle RoundedRectangle;
typedef struct _RoundedRectangleClass RoundedRectangleClass;
typedef struct _RoundedRectanglePrivate RoundedRectanglePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))

#define TYPE_TILE_VIEW (tile_view_get_type ())
#define TILE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TILE_VIEW, TileView))
#define TILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TILE_VIEW, TileViewClass))
#define IS_TILE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TILE_VIEW))
#define IS_TILE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TILE_VIEW))
#define TILE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TILE_VIEW, TileViewClass))

typedef struct _TileView TileView;
typedef struct _TileViewClass TileViewClass;
typedef struct _TileViewPrivate TileViewPrivate;
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))

#define TYPE_COLOR_PALETTE (color_palette_get_type ())
#define COLOR_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_COLOR_PALETTE, ColorPalette))
#define COLOR_PALETTE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_COLOR_PALETTE, ColorPaletteClass))
#define IS_COLOR_PALETTE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_COLOR_PALETTE))
#define IS_COLOR_PALETTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_COLOR_PALETTE))
#define COLOR_PALETTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_COLOR_PALETTE, ColorPaletteClass))

typedef struct _ColorPalette ColorPalette;
typedef struct _ColorPaletteClass ColorPaletteClass;
typedef struct _ColorPalettePrivate ColorPalettePrivate;

struct _RoundedRectangle {
	GObject parent_instance;
	RoundedRectanglePrivate * priv;
	ClutterActor* _actor;
	ClutterCanvas* _canvas;
	ClutterColor* _color;
};

struct _RoundedRectangleClass {
	GObjectClass parent_class;
	gboolean (*_draw) (RoundedRectangle* self, cairo_t* ctx, gint width, gint height);
};

struct _TileView {
	RoundedRectangle parent_instance;
	TileViewPrivate * priv;
};

struct _TileViewClass {
	RoundedRectangleClass parent_class;
};

struct _TileViewPrivate {
	guint _value;
};

struct _ColorPalette {
	GObject parent_instance;
	ColorPalettePrivate * priv;
};

struct _ColorPaletteClass {
	GObjectClass parent_class;
};

struct _ColorPalettePrivate {
	GeeHashMap* _palette;
};


static gpointer rounded_rectangle_parent_class = NULL;
static gpointer tile_view_parent_class = NULL;
static gpointer color_palette_parent_class = NULL;
static ColorPalette* color_palette__singleton;
static ColorPalette* color_palette__singleton = NULL;

GType rounded_rectangle_get_type (void) G_GNUC_CONST;
enum  {
	ROUNDED_RECTANGLE_DUMMY_PROPERTY,
	ROUNDED_RECTANGLE_ACTOR,
	ROUNDED_RECTANGLE_COLOR,
	ROUNDED_RECTANGLE_CANVAS
};
RoundedRectangle* rounded_rectangle_new (gfloat x, gfloat y, gfloat width, gfloat height, ClutterColor* color);
RoundedRectangle* rounded_rectangle_construct (GType object_type, gfloat x, gfloat y, gfloat width, gfloat height, ClutterColor* color);
static ClutterColor* _clutter_color_dup (ClutterColor* self);
gboolean _rounded_rectangle_draw (RoundedRectangle* self, cairo_t* ctx, gint width, gint height);
static gboolean __rounded_rectangle_draw_clutter_canvas_draw (ClutterCanvas* _sender, cairo_t* cr, gint width, gint height, gpointer self);
void rounded_rectangle_resize (RoundedRectangle* self, gfloat x, gfloat y, gfloat width, gfloat height);
void rounded_rectangle_idle_resize (RoundedRectangle* self);
static gboolean rounded_rectangle_real__draw (RoundedRectangle* self, cairo_t* ctx, gint width, gint height);
ClutterActor* rounded_rectangle_get_actor (RoundedRectangle* self);
void rounded_rectangle_get_color (RoundedRectangle* self, ClutterColor* result);
void rounded_rectangle_set_color (RoundedRectangle* self, ClutterColor* value);
ClutterCanvas* rounded_rectangle_get_canvas (RoundedRectangle* self);
static void rounded_rectangle_finalize (GObject* obj);
static void _vala_rounded_rectangle_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rounded_rectangle_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType tile_view_get_type (void) G_GNUC_CONST;
#define TILE_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TILE_VIEW, TileViewPrivate))
enum  {
	TILE_VIEW_DUMMY_PROPERTY,
	TILE_VIEW_VALUE
};
TileView* tile_view_new (gfloat x, gfloat y, gfloat width, gfloat height, guint val);
TileView* tile_view_construct (GType object_type, gfloat x, gfloat y, gfloat width, gfloat height, guint val);
static void _tile_view_pick_color (TileView* self, ClutterColor* result);
static gboolean tile_view_real__draw (RoundedRectangle* base, cairo_t* ctx, gint width, gint height);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
guint tile_view_get_value (TileView* self);
GType color_palette_get_type (void) G_GNUC_CONST;
ColorPalette* color_palette_get_instance (void);
void color_palette_pick_color (ColorPalette* self, guint val, ClutterColor* result);
void tile_view_set_value (TileView* self, guint value);
static void tile_view_finalize (GObject* obj);
static void _vala_tile_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_tile_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define COLOR_PALETTE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_COLOR_PALETTE, ColorPalettePrivate))
enum  {
	COLOR_PALETTE_DUMMY_PROPERTY
};
ColorPalette* color_palette_new (void);
ColorPalette* color_palette_construct (GType object_type);
static void color_palette_finalize (GObject* obj);


static ClutterColor* _clutter_color_dup (ClutterColor* self) {
	ClutterColor* dup;
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	dup = g_new0 (ClutterColor, 1);
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	memcpy (dup, self, sizeof (ClutterColor));
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return dup;
#line 177 "view.c"
}


static gpointer __clutter_color_dup0 (gpointer self) {
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return self ? _clutter_color_dup (self) : NULL;
#line 184 "view.c"
}


static gboolean __rounded_rectangle_draw_clutter_canvas_draw (ClutterCanvas* _sender, cairo_t* cr, gint width, gint height, gpointer self) {
	gboolean result;
	result = _rounded_rectangle_draw ((RoundedRectangle*) self, cr, width, height);
#line 42 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return result;
#line 193 "view.c"
}


RoundedRectangle* rounded_rectangle_construct (GType object_type, gfloat x, gfloat y, gfloat width, gfloat height, ClutterColor* color) {
	RoundedRectangle * self = NULL;
	ClutterColor* _tmp0_ = NULL;
	ClutterColor* _tmp1_ = NULL;
	ClutterCanvas* _tmp2_ = NULL;
	ClutterCanvas* _tmp3_ = NULL;
	gfloat _tmp4_ = 0.0F;
	gfloat _tmp5_ = 0.0F;
	gfloat _tmp6_ = 0.0F;
	gfloat _tmp7_ = 0.0F;
	ClutterActor* _tmp8_ = NULL;
	ClutterActor* _tmp9_ = NULL;
	gfloat _tmp10_ = 0.0F;
	gfloat _tmp11_ = 0.0F;
	ClutterActor* _tmp12_ = NULL;
	ClutterCanvas* _tmp13_ = NULL;
	ClutterActor* _tmp14_ = NULL;
	gfloat _tmp15_ = 0.0F;
	ClutterActor* _tmp16_ = NULL;
	gfloat _tmp17_ = 0.0F;
	ClutterActor* _tmp18_ = NULL;
	ClutterCanvas* _tmp19_ = NULL;
#line 28 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self = (RoundedRectangle*) g_object_new (object_type, NULL);
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = color;
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = __clutter_color_dup0 (_tmp0_);
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_free0 (self->_color);
#line 30 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->_color = _tmp1_;
#line 32 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = clutter_canvas_new ();
#line 32 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (self->_canvas);
#line 32 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->_canvas = _tmp2_;
#line 33 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = self->_canvas;
#line 33 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp4_ = width;
#line 33 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp5_ = ceilf (_tmp4_);
#line 33 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp6_ = height;
#line 33 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp7_ = ceilf (_tmp6_);
#line 33 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_canvas_set_size (_tmp3_, (gint) _tmp5_, (gint) _tmp7_);
#line 35 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp8_ = clutter_actor_new ();
#line 35 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_object_ref_sink (_tmp8_);
#line 35 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (self->_actor);
#line 35 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->_actor = _tmp8_;
#line 36 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp9_ = self->_actor;
#line 36 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp10_ = width;
#line 36 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp11_ = height;
#line 36 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_size (_tmp9_, _tmp10_, _tmp11_);
#line 37 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp12_ = self->_actor;
#line 37 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp13_ = self->_canvas;
#line 37 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_content (_tmp12_, (ClutterContent*) _tmp13_);
#line 38 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp14_ = self->_actor;
#line 38 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp15_ = x;
#line 38 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_x (_tmp14_, _tmp15_);
#line 39 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp16_ = self->_actor;
#line 39 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp17_ = y;
#line 39 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_y (_tmp16_, _tmp17_);
#line 40 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp18_ = self->_actor;
#line 40 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_pivot_point (_tmp18_, 0.5f, 0.5f);
#line 42 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp19_ = self->_canvas;
#line 42 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_signal_connect_object (_tmp19_, "draw", (GCallback) __rounded_rectangle_draw_clutter_canvas_draw, self, 0);
#line 26 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return self;
#line 291 "view.c"
}


RoundedRectangle* rounded_rectangle_new (gfloat x, gfloat y, gfloat width, gfloat height, ClutterColor* color) {
#line 26 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return rounded_rectangle_construct (TYPE_ROUNDED_RECTANGLE, x, y, width, height, color);
#line 298 "view.c"
}


void rounded_rectangle_resize (RoundedRectangle* self, gfloat x, gfloat y, gfloat width, gfloat height) {
	ClutterActor* _tmp0_ = NULL;
	gfloat _tmp1_ = 0.0F;
	ClutterActor* _tmp2_ = NULL;
	gfloat _tmp3_ = 0.0F;
	ClutterActor* _tmp4_ = NULL;
	gfloat _tmp5_ = 0.0F;
	ClutterActor* _tmp6_ = NULL;
	gfloat _tmp7_ = 0.0F;
#line 61 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_if_fail (self != NULL);
#line 63 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = self->_actor;
#line 63 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = x;
#line 63 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_x (_tmp0_, _tmp1_);
#line 64 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = self->_actor;
#line 64 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = y;
#line 64 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_y (_tmp2_, _tmp3_);
#line 65 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp4_ = self->_actor;
#line 65 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp5_ = width;
#line 65 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_width (_tmp4_, _tmp5_);
#line 66 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp6_ = self->_actor;
#line 66 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp7_ = height;
#line 66 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_actor_set_height (_tmp6_, _tmp7_);
#line 337 "view.c"
}


void rounded_rectangle_idle_resize (RoundedRectangle* self) {
	ClutterCanvas* _tmp0_ = NULL;
	ClutterActor* _tmp1_ = NULL;
	gfloat _tmp2_ = 0.0F;
	gfloat _tmp3_ = 0.0F;
	gfloat _tmp4_ = 0.0F;
	ClutterActor* _tmp5_ = NULL;
	gfloat _tmp6_ = 0.0F;
	gfloat _tmp7_ = 0.0F;
	gfloat _tmp8_ = 0.0F;
	gboolean _tmp9_ = FALSE;
#line 69 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_if_fail (self != NULL);
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = self->_canvas;
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = self->_actor;
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = clutter_actor_get_width (_tmp1_);
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = _tmp2_;
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp4_ = ceilf (_tmp3_);
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp5_ = self->_actor;
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp6_ = clutter_actor_get_height (_tmp5_);
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp7_ = _tmp6_;
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp8_ = ceilf (_tmp7_);
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp9_ = clutter_canvas_set_size (_tmp0_, (gint) _tmp4_, (gint) _tmp8_);
#line 71 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	if (!_tmp9_) {
#line 376 "view.c"
		ClutterCanvas* _tmp10_ = NULL;
#line 72 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp10_ = self->_canvas;
#line 72 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		clutter_content_invalidate ((ClutterContent*) _tmp10_);
#line 382 "view.c"
	}
}


static gboolean rounded_rectangle_real__draw (RoundedRectangle* self, cairo_t* ctx, gint width, gint height) {
	gboolean result = FALSE;
	gdouble radius = 0.0;
	gint _tmp0_ = 0;
	gdouble degrees = 0.0;
	cairo_t* _tmp1_ = NULL;
	cairo_t* _tmp2_ = NULL;
	cairo_t* _tmp3_ = NULL;
	cairo_t* _tmp4_ = NULL;
	cairo_t* _tmp5_ = NULL;
	cairo_t* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gdouble _tmp8_ = 0.0;
	gdouble _tmp9_ = 0.0;
	gdouble _tmp10_ = 0.0;
	gdouble _tmp11_ = 0.0;
	gdouble _tmp12_ = 0.0;
	cairo_t* _tmp13_ = NULL;
	gint _tmp14_ = 0;
	gdouble _tmp15_ = 0.0;
	gint _tmp16_ = 0;
	gdouble _tmp17_ = 0.0;
	gdouble _tmp18_ = 0.0;
	gdouble _tmp19_ = 0.0;
	gdouble _tmp20_ = 0.0;
	cairo_t* _tmp21_ = NULL;
	gdouble _tmp22_ = 0.0;
	gint _tmp23_ = 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;
	cairo_t* _tmp34_ = NULL;
	ClutterColor* _tmp35_ = NULL;
#line 75 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_val_if_fail (ctx != NULL, FALSE);
#line 77 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = height;
#line 77 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	radius = _tmp0_ / 20.0;
#line 78 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	degrees = G_PI / 180.0;
#line 80 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = ctx;
#line 80 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_save (_tmp1_);
#line 81 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = ctx;
#line 81 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_set_operator (_tmp2_, CAIRO_OPERATOR_CLEAR);
#line 82 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = ctx;
#line 82 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_paint (_tmp3_);
#line 83 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp4_ = ctx;
#line 83 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_restore (_tmp4_);
#line 85 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp5_ = ctx;
#line 85 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_new_sub_path (_tmp5_);
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp6_ = ctx;
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp7_ = width;
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp8_ = radius;
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp9_ = radius;
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp10_ = radius;
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp11_ = degrees;
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp12_ = degrees;
#line 86 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_arc (_tmp6_, _tmp7_ - _tmp8_, _tmp9_, _tmp10_, -90 * _tmp11_, 0 * _tmp12_);
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp13_ = ctx;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp14_ = width;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp15_ = radius;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp16_ = height;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp17_ = radius;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp18_ = radius;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp19_ = degrees;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp20_ = degrees;
#line 87 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_arc (_tmp13_, _tmp14_ - _tmp15_, _tmp16_ - _tmp17_, _tmp18_, 0 * _tmp19_, 90 * _tmp20_);
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp21_ = ctx;
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp22_ = radius;
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp23_ = height;
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp24_ = radius;
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp25_ = radius;
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp26_ = degrees;
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp27_ = degrees;
#line 88 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_arc (_tmp21_, _tmp22_, _tmp23_ - _tmp24_, _tmp25_, 90 * _tmp26_, 180 * _tmp27_);
#line 89 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp28_ = ctx;
#line 89 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp29_ = radius;
#line 89 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp30_ = radius;
#line 89 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp31_ = radius;
#line 89 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp32_ = degrees;
#line 89 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp33_ = degrees;
#line 89 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_arc (_tmp28_, _tmp29_, _tmp30_, _tmp31_, 180 * _tmp32_, 270 * _tmp33_);
#line 90 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp34_ = ctx;
#line 90 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_close_path (_tmp34_);
#line 92 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp35_ = self->_color;
#line 92 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	if (_tmp35_ != NULL) {
#line 527 "view.c"
		cairo_t* _tmp36_ = NULL;
		ClutterColor* _tmp37_ = NULL;
		ClutterColor _tmp38_ = {0};
		cairo_t* _tmp39_ = NULL;
#line 94 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp36_ = ctx;
#line 94 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp37_ = self->_color;
#line 94 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp38_ = *_tmp37_;
#line 94 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		clutter_cairo_set_source_color (_tmp36_, &_tmp38_);
#line 95 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp39_ = ctx;
#line 95 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		cairo_fill (_tmp39_);
#line 544 "view.c"
	}
#line 98 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	result = FALSE;
#line 98 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return result;
#line 550 "view.c"
}


gboolean _rounded_rectangle_draw (RoundedRectangle* self, cairo_t* ctx, gint width, gint height) {
#line 75 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 75 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return ROUNDED_RECTANGLE_GET_CLASS (self)->_draw (self, ctx, width, height);
#line 559 "view.c"
}


ClutterActor* rounded_rectangle_get_actor (RoundedRectangle* self) {
	ClutterActor* result;
	ClutterActor* _tmp0_ = NULL;
#line 46 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 46 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = self->_actor;
#line 46 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	result = _tmp0_;
#line 46 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return result;
#line 574 "view.c"
}


void rounded_rectangle_get_color (RoundedRectangle* self, ClutterColor* result) {
	ClutterColor* _tmp0_ = NULL;
#line 50 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_if_fail (self != NULL);
#line 50 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = self->_color;
#line 50 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	*result = *_tmp0_;
#line 50 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return;
#line 588 "view.c"
}


void rounded_rectangle_set_color (RoundedRectangle* self, ClutterColor* value) {
	ClutterColor _tmp0_ = {0};
	ClutterColor* _tmp1_ = NULL;
	ClutterCanvas* _tmp2_ = NULL;
#line 51 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_if_fail (self != NULL);
#line 52 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = *value;
#line 52 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = __clutter_color_dup0 (&_tmp0_);
#line 52 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_free0 (self->_color);
#line 52 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->_color = _tmp1_;
#line 53 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = self->_canvas;
#line 53 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_content_invalidate ((ClutterContent*) _tmp2_);
#line 51 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_object_notify ((GObject *) self, "color");
#line 612 "view.c"
}


ClutterCanvas* rounded_rectangle_get_canvas (RoundedRectangle* self) {
	ClutterCanvas* result;
	ClutterCanvas* _tmp0_ = NULL;
#line 58 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 58 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = self->_canvas;
#line 58 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	result = _tmp0_;
#line 58 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return result;
#line 627 "view.c"
}


static void rounded_rectangle_class_init (RoundedRectangleClass * klass) {
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	rounded_rectangle_parent_class = g_type_class_peek_parent (klass);
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	((RoundedRectangleClass *) klass)->_draw = rounded_rectangle_real__draw;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_rounded_rectangle_get_property;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_rounded_rectangle_set_property;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (klass)->finalize = rounded_rectangle_finalize;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ROUNDED_RECTANGLE_ACTOR, g_param_spec_object ("actor", "actor", "actor", clutter_actor_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ROUNDED_RECTANGLE_COLOR, g_param_spec_boxed ("color", "color", "color", CLUTTER_TYPE_COLOR, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), ROUNDED_RECTANGLE_CANVAS, g_param_spec_object ("canvas", "canvas", "canvas", clutter_canvas_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 648 "view.c"
}


static void rounded_rectangle_instance_init (RoundedRectangle * self) {
}


static void rounded_rectangle_finalize (GObject* obj) {
	RoundedRectangle * self;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ROUNDED_RECTANGLE, RoundedRectangle);
#line 22 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (self->_actor);
#line 23 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (self->_canvas);
#line 24 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_free0 (self->_color);
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (rounded_rectangle_parent_class)->finalize (obj);
#line 668 "view.c"
}


GType rounded_rectangle_get_type (void) {
	static volatile gsize rounded_rectangle_type_id__volatile = 0;
	if (g_once_init_enter (&rounded_rectangle_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RoundedRectangleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rounded_rectangle_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RoundedRectangle), 0, (GInstanceInitFunc) rounded_rectangle_instance_init, NULL };
		GType rounded_rectangle_type_id;
		rounded_rectangle_type_id = g_type_register_static (G_TYPE_OBJECT, "RoundedRectangle", &g_define_type_info, 0);
		g_once_init_leave (&rounded_rectangle_type_id__volatile, rounded_rectangle_type_id);
	}
	return rounded_rectangle_type_id__volatile;
}


static void _vala_rounded_rectangle_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RoundedRectangle * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_ROUNDED_RECTANGLE, RoundedRectangle);
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	switch (property_id) {
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		case ROUNDED_RECTANGLE_ACTOR:
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		g_value_set_object (value, rounded_rectangle_get_actor (self));
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		case ROUNDED_RECTANGLE_COLOR:
#line 697 "view.c"
		{
			ClutterColor boxed;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
			rounded_rectangle_get_color (self, &boxed);
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
			g_value_set_boxed (value, &boxed);
#line 704 "view.c"
		}
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		case ROUNDED_RECTANGLE_CANVAS:
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		g_value_set_object (value, rounded_rectangle_get_canvas (self));
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 714 "view.c"
		default:
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 720 "view.c"
	}
}


static void _vala_rounded_rectangle_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RoundedRectangle * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_ROUNDED_RECTANGLE, RoundedRectangle);
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	switch (property_id) {
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		case ROUNDED_RECTANGLE_COLOR:
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		rounded_rectangle_set_color (self, g_value_get_boxed (value));
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 736 "view.c"
		default:
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 20 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 742 "view.c"
	}
}


TileView* tile_view_construct (GType object_type, gfloat x, gfloat y, gfloat width, gfloat height, guint val) {
	TileView * self = NULL;
	gfloat _tmp0_ = 0.0F;
	gfloat _tmp1_ = 0.0F;
	gfloat _tmp2_ = 0.0F;
	gfloat _tmp3_ = 0.0F;
	guint _tmp4_ = 0U;
	ClutterColor _tmp5_ = {0};
	ClutterColor* _tmp6_ = NULL;
#line 106 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = x;
#line 106 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = y;
#line 106 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = width;
#line 106 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = height;
#line 106 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self = (TileView*) rounded_rectangle_construct (object_type, _tmp0_, _tmp1_, _tmp2_, _tmp3_, NULL);
#line 108 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp4_ = val;
#line 108 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->priv->_value = _tmp4_;
#line 109 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tile_view_pick_color (self, &_tmp5_);
#line 109 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp6_ = __clutter_color_dup0 (&_tmp5_);
#line 109 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_free0 (((RoundedRectangle*) self)->_color);
#line 109 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	((RoundedRectangle*) self)->_color = _tmp6_;
#line 104 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return self;
#line 780 "view.c"
}


TileView* tile_view_new (gfloat x, gfloat y, gfloat width, gfloat height, guint val) {
#line 104 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return tile_view_construct (TYPE_TILE_VIEW, x, y, width, height, val);
#line 787 "view.c"
}


static void _vala_PangoFontDescription_free (PangoFontDescription* self) {
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_boxed_free (pango_font_description_get_type (), self);
#line 794 "view.c"
}


static gboolean tile_view_real__draw (RoundedRectangle* base, cairo_t* ctx, gint width, gint height) {
	TileView * self;
	gboolean result = FALSE;
	PangoRectangle logical_rect = {0};
	PangoLayout* layout = NULL;
	PangoFontDescription* font_desc = NULL;
	cairo_t* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	cairo_t* _tmp3_ = NULL;
	cairo_t* _tmp4_ = NULL;
	PangoLayout* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	PangoFontDescription* _tmp9_ = NULL;
	guint _tmp10_ = 0U;
	gchar* _tmp11_ = NULL;
	gchar* _tmp12_ = NULL;
	PangoRectangle _tmp13_ = {0};
	cairo_t* _tmp14_ = NULL;
	gint _tmp15_ = 0;
	PangoRectangle _tmp16_ = {0};
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	PangoRectangle _tmp19_ = {0};
	gint _tmp20_ = 0;
	cairo_t* _tmp21_ = NULL;
#line 116 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self = (TileView*) base;
#line 116 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_val_if_fail (ctx != NULL, FALSE);
#line 122 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = ctx;
#line 122 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = width;
#line 122 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = height;
#line 122 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	ROUNDED_RECTANGLE_CLASS (tile_view_parent_class)->_draw (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_ROUNDED_RECTANGLE, RoundedRectangle), _tmp0_, _tmp1_, _tmp2_);
#line 124 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = ctx;
#line 124 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_set_source_rgb (_tmp3_, (gdouble) 255, (gdouble) 255, (gdouble) 255);
#line 126 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp4_ = ctx;
#line 126 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp5_ = pango_cairo_create_layout (_tmp4_);
#line 126 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (layout);
#line 126 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	layout = _tmp5_;
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp6_ = height;
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp7_ = g_strdup_printf ("Sans Bold %dpx", _tmp6_ / 4);
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp8_ = _tmp7_;
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp9_ = pango_font_description_from_string (_tmp8_);
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	__vala_PangoFontDescription_free0 (font_desc);
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	font_desc = _tmp9_;
#line 127 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_free0 (_tmp8_);
#line 128 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	pango_layout_set_font_description (layout, font_desc);
#line 130 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp10_ = self->priv->_value;
#line 130 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp11_ = g_strdup_printf ("%u", _tmp10_);
#line 130 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp12_ = _tmp11_;
#line 130 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	pango_layout_set_text (layout, _tmp12_, -1);
#line 130 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_free0 (_tmp12_);
#line 132 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	pango_layout_get_extents (layout, NULL, &_tmp13_);
#line 132 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	logical_rect = _tmp13_;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp14_ = ctx;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp15_ = width;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp16_ = logical_rect;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp17_ = _tmp16_.width;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp18_ = height;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp19_ = logical_rect;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp20_ = _tmp19_.height;
#line 133 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	cairo_move_to (_tmp14_, (gdouble) ((_tmp15_ / 2) - ((_tmp17_ / 2) / PANGO_SCALE)), (gdouble) ((_tmp18_ / 2) - ((_tmp20_ / 2) / PANGO_SCALE)));
#line 135 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp21_ = ctx;
#line 135 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	pango_cairo_show_layout (_tmp21_, layout);
#line 137 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	result = FALSE;
#line 137 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	__vala_PangoFontDescription_free0 (font_desc);
#line 137 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (layout);
#line 137 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return result;
#line 908 "view.c"
}


static void _tile_view_pick_color (TileView* self, ClutterColor* result) {
	ColorPalette* _tmp0_ = NULL;
	ColorPalette* _tmp1_ = NULL;
	guint _tmp2_ = 0U;
	ClutterColor _tmp3_ = {0};
	ClutterColor _tmp4_ = {0};
#line 140 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_if_fail (self != NULL);
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = color_palette_get_instance ();
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = _tmp0_;
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = self->priv->_value;
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	color_palette_pick_color (_tmp1_, _tmp2_, &_tmp3_);
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp4_ = _tmp3_;
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (_tmp1_);
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	*result = _tmp4_;
#line 142 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return;
#line 936 "view.c"
}


guint tile_view_get_value (TileView* self) {
	guint result;
	guint _tmp0_ = 0U;
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_val_if_fail (self != NULL, 0U);
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = self->priv->_value;
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	result = _tmp0_;
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return result;
#line 951 "view.c"
}


void tile_view_set_value (TileView* self, guint value) {
	guint _tmp0_ = 0U;
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_if_fail (self != NULL);
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = value;
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->priv->_value = _tmp0_;
#line 113 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_object_notify ((GObject *) self, "value");
#line 965 "view.c"
}


static void tile_view_class_init (TileViewClass * klass) {
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	tile_view_parent_class = g_type_class_peek_parent (klass);
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_type_class_add_private (klass, sizeof (TileViewPrivate));
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	((RoundedRectangleClass *) klass)->_draw = tile_view_real__draw;
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tile_view_get_property;
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tile_view_set_property;
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (klass)->finalize = tile_view_finalize;
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TILE_VIEW_VALUE, g_param_spec_uint ("value", "value", "value", 0, G_MAXUINT, (guint) 2, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 984 "view.c"
}


static void tile_view_instance_init (TileView * self) {
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->priv = TILE_VIEW_GET_PRIVATE (self);
#line 112 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->priv->_value = (guint) 2;
#line 993 "view.c"
}


static void tile_view_finalize (GObject* obj) {
	TileView * self;
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TILE_VIEW, TileView);
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (tile_view_parent_class)->finalize (obj);
#line 1003 "view.c"
}


GType tile_view_get_type (void) {
	static volatile gsize tile_view_type_id__volatile = 0;
	if (g_once_init_enter (&tile_view_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TileViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tile_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TileView), 0, (GInstanceInitFunc) tile_view_instance_init, NULL };
		GType tile_view_type_id;
		tile_view_type_id = g_type_register_static (TYPE_ROUNDED_RECTANGLE, "TileView", &g_define_type_info, 0);
		g_once_init_leave (&tile_view_type_id__volatile, tile_view_type_id);
	}
	return tile_view_type_id__volatile;
}


static void _vala_tile_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TileView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TILE_VIEW, TileView);
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	switch (property_id) {
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		case TILE_VIEW_VALUE:
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		g_value_set_uint (value, tile_view_get_value (self));
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 1030 "view.c"
		default:
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 1036 "view.c"
	}
}


static void _vala_tile_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TileView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TILE_VIEW, TileView);
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	switch (property_id) {
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		case TILE_VIEW_VALUE:
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		tile_view_set_value (self, g_value_get_uint (value));
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 1052 "view.c"
		default:
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 102 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		break;
#line 1058 "view.c"
	}
}


ColorPalette* color_palette_construct (GType object_type) {
	ColorPalette * self = NULL;
	GeeHashMap* _tmp0_ = NULL;
	GeeHashMap* _tmp1_ = NULL;
	ClutterColor _tmp2_ = {0};
	GeeHashMap* _tmp3_ = NULL;
	ClutterColor _tmp4_ = {0};
	GeeHashMap* _tmp5_ = NULL;
	ClutterColor _tmp6_ = {0};
	GeeHashMap* _tmp7_ = NULL;
	ClutterColor _tmp8_ = {0};
	GeeHashMap* _tmp9_ = NULL;
	ClutterColor _tmp10_ = {0};
	GeeHashMap* _tmp11_ = NULL;
	ClutterColor _tmp12_ = {0};
	GeeHashMap* _tmp13_ = NULL;
	ClutterColor _tmp14_ = {0};
	GeeHashMap* _tmp15_ = NULL;
	ClutterColor _tmp16_ = {0};
	GeeHashMap* _tmp17_ = NULL;
	ClutterColor _tmp18_ = {0};
	GeeHashMap* _tmp19_ = NULL;
	ClutterColor _tmp20_ = {0};
	GeeHashMap* _tmp21_ = NULL;
	ClutterColor _tmp22_ = {0};
#line 153 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self = (ColorPalette*) g_object_new (object_type, NULL);
#line 155 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_UINT, NULL, NULL, CLUTTER_TYPE_COLOR, (GBoxedCopyFunc) _clutter_color_dup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 155 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (self->priv->_palette);
#line 155 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->priv->_palette = _tmp0_;
#line 157 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = self->priv->_palette;
#line 157 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp2_, "#fce94f");
#line 157 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, (gpointer) ((guintptr) ((guint) 2)), &_tmp2_);
#line 158 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = self->priv->_palette;
#line 158 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp4_, "#8ae234");
#line 158 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, (gpointer) ((guintptr) ((guint) 4)), &_tmp4_);
#line 159 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp5_ = self->priv->_palette;
#line 159 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp6_, "#fcaf3e");
#line 159 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, (gpointer) ((guintptr) ((guint) 8)), &_tmp6_);
#line 160 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp7_ = self->priv->_palette;
#line 160 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp8_, "#729fcf");
#line 160 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, (gpointer) ((guintptr) ((guint) 16)), &_tmp8_);
#line 161 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp9_ = self->priv->_palette;
#line 161 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp10_, "#ad7fa8");
#line 161 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, (gpointer) ((guintptr) ((guint) 32)), &_tmp10_);
#line 162 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp11_ = self->priv->_palette;
#line 162 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp12_, "#c17d11");
#line 162 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp11_, (gpointer) ((guintptr) ((guint) 64)), &_tmp12_);
#line 163 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp13_ = self->priv->_palette;
#line 163 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp14_, "#ef2929");
#line 163 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, (gpointer) ((guintptr) ((guint) 128)), &_tmp14_);
#line 164 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp15_ = self->priv->_palette;
#line 164 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp16_, "#c4a000");
#line 164 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp15_, (gpointer) ((guintptr) ((guint) 256)), &_tmp16_);
#line 165 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp17_ = self->priv->_palette;
#line 165 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp18_, "#4e9a06");
#line 165 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, (gpointer) ((guintptr) ((guint) 512)), &_tmp18_);
#line 166 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp19_ = self->priv->_palette;
#line 166 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp20_, "#ce5c00");
#line 166 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp19_, (gpointer) ((guintptr) ((guint) 1024)), &_tmp20_);
#line 167 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp21_ = self->priv->_palette;
#line 167 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	clutter_color_from_string (&_tmp22_, "#204a87");
#line 167 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp21_, (gpointer) ((guintptr) ((guint) 2048)), &_tmp22_);
#line 151 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return self;
#line 1164 "view.c"
}


ColorPalette* color_palette_new (void) {
#line 151 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return color_palette_construct (TYPE_COLOR_PALETTE);
#line 1171 "view.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 175 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return self ? g_object_ref (self) : NULL;
#line 1178 "view.c"
}


ColorPalette* color_palette_get_instance (void) {
	ColorPalette* result = NULL;
	ColorPalette* _tmp0_ = NULL;
	ColorPalette* _tmp2_ = NULL;
	ColorPalette* _tmp3_ = NULL;
#line 172 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = color_palette__singleton;
#line 172 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	if (_tmp0_ == NULL) {
#line 1191 "view.c"
		ColorPalette* _tmp1_ = NULL;
#line 173 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp1_ = color_palette_new ();
#line 173 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_g_object_unref0 (color_palette__singleton);
#line 173 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		color_palette__singleton = _tmp1_;
#line 1199 "view.c"
	}
#line 175 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = color_palette__singleton;
#line 175 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 175 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	result = _tmp3_;
#line 175 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return result;
#line 1209 "view.c"
}


void color_palette_pick_color (ColorPalette* self, guint val, ClutterColor* result) {
	GeeHashMap* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	gboolean _tmp2_ = FALSE;
	guint norm_val = 0U;
	guint _tmp8_ = 0U;
	ClutterColor color = {0};
	GeeHashMap* _tmp9_ = NULL;
	guint _tmp10_ = 0U;
	gpointer _tmp11_ = NULL;
	ClutterColor* _tmp12_ = NULL;
	ClutterColor _tmp13_ = {0};
	guint8 sbits = 0U;
	guint _tmp14_ = 0U;
	guint8 _tmp15_ = 0U;
	guint8 _tmp16_ = 0U;
	guint8 _tmp17_ = 0U;
	guint8 _tmp18_ = 0U;
	guint8 _tmp19_ = 0U;
	guint8 _tmp20_ = 0U;
#line 178 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_return_if_fail (self != NULL);
#line 180 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp0_ = self->priv->_palette;
#line 180 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp1_ = val;
#line 180 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp2_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, (gpointer) ((guintptr) _tmp1_));
#line 180 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	if (_tmp2_) {
#line 1243 "view.c"
		GeeHashMap* _tmp3_ = NULL;
		guint _tmp4_ = 0U;
		gpointer _tmp5_ = NULL;
		ClutterColor* _tmp6_ = NULL;
		ClutterColor _tmp7_ = {0};
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp3_ = self->priv->_palette;
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp4_ = val;
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp5_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, (gpointer) ((guintptr) _tmp4_));
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp6_ = (ClutterColor*) _tmp5_;
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_tmp7_ = *_tmp6_;
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		_g_free0 (_tmp6_);
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		*result = _tmp7_;
#line 181 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
		return;
#line 1265 "view.c"
	}
#line 183 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp8_ = val;
#line 183 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	norm_val = _tmp8_ / 2048;
#line 184 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp9_ = self->priv->_palette;
#line 184 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp10_ = norm_val;
#line 184 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp11_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, (gpointer) ((guintptr) _tmp10_));
#line 184 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp12_ = (ClutterColor*) _tmp11_;
#line 184 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp13_ = *_tmp12_;
#line 184 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_free0 (_tmp12_);
#line 184 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	color = _tmp13_;
#line 186 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp14_ = val;
#line 186 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	sbits = (guint8) (_tmp14_ % 7);
#line 187 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp15_ = color.red;
#line 187 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp16_ = sbits;
#line 187 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	color.red = _tmp15_ << _tmp16_;
#line 188 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp17_ = color.green;
#line 188 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp18_ = sbits;
#line 188 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	color.green = _tmp17_ << _tmp18_;
#line 189 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp19_ = color.blue;
#line 189 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_tmp20_ = sbits;
#line 189 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	color.blue = _tmp19_ << _tmp20_;
#line 191 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	*result = color;
#line 191 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	return;
#line 1311 "view.c"
}


static void color_palette_class_init (ColorPaletteClass * klass) {
#line 146 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	color_palette_parent_class = g_type_class_peek_parent (klass);
#line 146 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	g_type_class_add_private (klass, sizeof (ColorPalettePrivate));
#line 146 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (klass)->finalize = color_palette_finalize;
#line 1322 "view.c"
}


static void color_palette_instance_init (ColorPalette * self) {
#line 146 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self->priv = COLOR_PALETTE_GET_PRIVATE (self);
#line 1329 "view.c"
}


static void color_palette_finalize (GObject* obj) {
	ColorPalette * self;
#line 146 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_COLOR_PALETTE, ColorPalette);
#line 148 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	_g_object_unref0 (self->priv->_palette);
#line 146 "/mnt/test/jhbuild/jhbuild/gnome-2048/src/view.vala"
	G_OBJECT_CLASS (color_palette_parent_class)->finalize (obj);
#line 1341 "view.c"
}


GType color_palette_get_type (void) {
	static volatile gsize color_palette_type_id__volatile = 0;
	if (g_once_init_enter (&color_palette_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ColorPaletteClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) color_palette_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ColorPalette), 0, (GInstanceInitFunc) color_palette_instance_init, NULL };
		GType color_palette_type_id;
		color_palette_type_id = g_type_register_static (G_TYPE_OBJECT, "ColorPalette", &g_define_type_info, 0);
		g_once_init_leave (&color_palette_type_id__volatile, color_palette_type_id);
	}
	return color_palette_type_id__volatile;
}



