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

/*
Copyright (C) 2012 Johan Mattsson

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.

This library 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
Lesser General Public License for more details.
*/

#include "birdfont.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <cairo-gobject.h>
#include <gio/gio.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	BIRD_FONT_FONT_DISPLAY_0_PROPERTY,
	BIRD_FONT_FONT_DISPLAY_NUM_PROPERTIES
};
static GParamSpec* bird_font_font_display_properties[BIRD_FONT_FONT_DISPLAY_NUM_PROPERTIES];
enum  {
	BIRD_FONT_FONT_DISPLAY_REDRAW_AREA_SIGNAL,
	BIRD_FONT_FONT_DISPLAY_NUM_SIGNALS
};
static guint bird_font_font_display_signals[BIRD_FONT_FONT_DISPLAY_NUM_SIGNALS] = {0};

static gpointer bird_font_font_display_parent_class = NULL;
static gdouble bird_font_font_display_last_tap_y;
static gdouble bird_font_font_display_last_tap_y = (gdouble) -1;
static gdouble bird_font_font_display_last_tap_time;
static gdouble bird_font_font_display_last_tap_time = (gdouble) 0;
gboolean bird_font_font_display_dirty_scrollbar = TRUE;

static gchar* bird_font_font_display_real_get_name (BirdFontFontDisplay* self);
static gchar* bird_font_font_display_real_get_label (BirdFontFontDisplay* self);
static void bird_font_font_display_real_close (BirdFontFontDisplay* self);
static gboolean bird_font_font_display_real_has_scrollbar (BirdFontFontDisplay* self);
static void bird_font_font_display_real_update_scrollbar (BirdFontFontDisplay* self);
static void bird_font_font_display_real_scroll_to (BirdFontFontDisplay* self,
                                            gdouble percent);
static void bird_font_font_display_real_draw (BirdFontFontDisplay* self,
                                       BirdFontWidgetAllocation* allocation,
                                       cairo_t* cr);
static void bird_font_font_display_real_selected_canvas (BirdFontFontDisplay* self);
static void bird_font_font_display_real_key_press (BirdFontFontDisplay* self,
                                            guint keyval);
static void bird_font_font_display_real_key_release (BirdFontFontDisplay* self,
                                              guint keyval);
static void bird_font_font_display_real_motion_notify (BirdFontFontDisplay* self,
                                                gdouble x,
                                                gdouble y);
static void bird_font_font_display_real_button_release (BirdFontFontDisplay* self,
                                                 gint button,
                                                 gdouble x,
                                                 gdouble y);
static void bird_font_font_display_real_button_press (BirdFontFontDisplay* self,
                                               guint button,
                                               gdouble x,
                                               gdouble y);
static void bird_font_font_display_real_double_click (BirdFontFontDisplay* self,
                                               guint button,
                                               gdouble ex,
                                               gdouble ey);
static void bird_font_font_display_real_magnify (BirdFontFontDisplay* self,
                                          gdouble magnification);
static void bird_font_font_display_real_tap_down (BirdFontFontDisplay* self,
                                           gint finger,
                                           gint x,
                                           gint y);
static void bird_font_font_display_real_tap_up (BirdFontFontDisplay* self,
                                         gint finger,
                                         gint x,
                                         gint y);
static void bird_font_font_display_real_tap_move (BirdFontFontDisplay* self,
                                           gint finger,
                                           gint x,
                                           gint y);
static void bird_font_font_display_real_zoom_in (BirdFontFontDisplay* self);
static void bird_font_font_display_real_zoom_out (BirdFontFontDisplay* self);
static void bird_font_font_display_real_zoom_max (BirdFontFontDisplay* self);
static void bird_font_font_display_real_zoom_min (BirdFontFontDisplay* self);
static void bird_font_font_display_real_move_view (BirdFontFontDisplay* self,
                                            gdouble x,
                                            gdouble y);
static void bird_font_font_display_real_reset_zoom (BirdFontFontDisplay* self);
static void bird_font_font_display_real_store_current_view (BirdFontFontDisplay* self);
static void bird_font_font_display_real_restore_last_view (BirdFontFontDisplay* self);
static void bird_font_font_display_real_next_view (BirdFontFontDisplay* self);
static void bird_font_font_display_real_scroll_wheel (BirdFontFontDisplay* self,
                                               gdouble x,
                                               gdouble y,
                                               gdouble pixeldelta_x,
                                               gdouble pixeldelta_y);
static void bird_font_font_display_real_undo (BirdFontFontDisplay* self);
static void bird_font_font_display_real_redo (BirdFontFontDisplay* self);
static gboolean bird_font_font_display_real_needs_modifier (BirdFontFontDisplay* self);
static void g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE (GClosure * closure,
                                                                GValue * return_value,
                                                                guint n_param_values,
                                                                const GValue * param_values,
                                                                gpointer invocation_hint,
                                                                gpointer marshal_data);
static void bird_font_font_display_finalize (GObject * obj);
static GType bird_font_font_display_get_type_once (void);

static gchar*
bird_font_font_display_real_get_name (BirdFontFontDisplay* self)
{
	gchar* _tmp0_;
	gchar* result;
	g_warning ("FontDisplay.vala:31: No name.");
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
bird_font_font_display_get_name (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->get_name) {
		return _klass_->get_name (self);
	}
	return NULL;
}

static gchar*
bird_font_font_display_real_get_label (BirdFontFontDisplay* self)
{
	gchar* _tmp0_;
	gchar* result;
	g_warning ("FontDisplay.vala:36: No label.");
	_tmp0_ = g_strdup ("");
	result = _tmp0_;
	return result;
}

gchar*
bird_font_font_display_get_label (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->get_label) {
		return _klass_->get_label (self);
	}
	return NULL;
}

static void
bird_font_font_display_real_close (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_close (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->close) {
		_klass_->close (self);
	}
}

static gboolean
bird_font_font_display_real_has_scrollbar (BirdFontFontDisplay* self)
{
	gboolean result;
	result = FALSE;
	return result;
}

gboolean
bird_font_font_display_has_scrollbar (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->has_scrollbar) {
		return _klass_->has_scrollbar (self);
	}
	return FALSE;
}

static void
bird_font_font_display_real_update_scrollbar (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_update_scrollbar (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->update_scrollbar) {
		_klass_->update_scrollbar (self);
	}
}

static void
bird_font_font_display_real_scroll_to (BirdFontFontDisplay* self,
                                       gdouble percent)
{
}

void
bird_font_font_display_scroll_to (BirdFontFontDisplay* self,
                                  gdouble percent)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->scroll_to) {
		_klass_->scroll_to (self, percent);
	}
}

static void
bird_font_font_display_real_draw (BirdFontFontDisplay* self,
                                  BirdFontWidgetAllocation* allocation,
                                  cairo_t* cr)
{
	g_return_if_fail (allocation != NULL);
	g_return_if_fail (cr != NULL);
}

void
bird_font_font_display_draw (BirdFontFontDisplay* self,
                             BirdFontWidgetAllocation* allocation,
                             cairo_t* cr)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->draw) {
		_klass_->draw (self, allocation, cr);
	}
}

static void
bird_font_font_display_real_selected_canvas (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_selected_canvas (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->selected_canvas) {
		_klass_->selected_canvas (self);
	}
}

static void
bird_font_font_display_real_key_press (BirdFontFontDisplay* self,
                                       guint keyval)
{
}

void
bird_font_font_display_key_press (BirdFontFontDisplay* self,
                                  guint keyval)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->key_press) {
		_klass_->key_press (self, keyval);
	}
}

static void
bird_font_font_display_real_key_release (BirdFontFontDisplay* self,
                                         guint keyval)
{
}

void
bird_font_font_display_key_release (BirdFontFontDisplay* self,
                                    guint keyval)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->key_release) {
		_klass_->key_release (self, keyval);
	}
}

static void
bird_font_font_display_real_motion_notify (BirdFontFontDisplay* self,
                                           gdouble x,
                                           gdouble y)
{
}

void
bird_font_font_display_motion_notify (BirdFontFontDisplay* self,
                                      gdouble x,
                                      gdouble y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->motion_notify) {
		_klass_->motion_notify (self, x, y);
	}
}

static void
bird_font_font_display_real_button_release (BirdFontFontDisplay* self,
                                            gint button,
                                            gdouble x,
                                            gdouble y)
{
}

void
bird_font_font_display_button_release (BirdFontFontDisplay* self,
                                       gint button,
                                       gdouble x,
                                       gdouble y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->button_release) {
		_klass_->button_release (self, button, x, y);
	}
}

static void
bird_font_font_display_real_button_press (BirdFontFontDisplay* self,
                                          guint button,
                                          gdouble x,
                                          gdouble y)
{
}

void
bird_font_font_display_button_press (BirdFontFontDisplay* self,
                                     guint button,
                                     gdouble x,
                                     gdouble y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->button_press) {
		_klass_->button_press (self, button, x, y);
	}
}

static void
bird_font_font_display_real_double_click (BirdFontFontDisplay* self,
                                          guint button,
                                          gdouble ex,
                                          gdouble ey)
{
}

void
bird_font_font_display_double_click (BirdFontFontDisplay* self,
                                     guint button,
                                     gdouble ex,
                                     gdouble ey)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->double_click) {
		_klass_->double_click (self, button, ex, ey);
	}
}

static void
bird_font_font_display_real_magnify (BirdFontFontDisplay* self,
                                     gdouble magnification)
{
}

void
bird_font_font_display_magnify (BirdFontFontDisplay* self,
                                gdouble magnification)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->magnify) {
		_klass_->magnify (self, magnification);
	}
}

static void
bird_font_font_display_real_tap_down (BirdFontFontDisplay* self,
                                      gint finger,
                                      gint x,
                                      gint y)
{
	if (finger == 0) {
		if (((g_get_real_time () - bird_font_font_display_last_tap_time) / 1000000.0) < 0.4) {
			bird_font_font_display_double_click (self, (guint) 1, (gdouble) x, (gdouble) y);
		} else {
			bird_font_font_display_button_press (self, (guint) 1, (gdouble) x, (gdouble) y);
		}
		bird_font_font_display_last_tap_time = (gdouble) g_get_real_time ();
	}
	bird_font_font_display_last_tap_y = (gdouble) -1;
}

void
bird_font_font_display_tap_down (BirdFontFontDisplay* self,
                                 gint finger,
                                 gint x,
                                 gint y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->tap_down) {
		_klass_->tap_down (self, finger, x, y);
	}
}

static void
bird_font_font_display_real_tap_up (BirdFontFontDisplay* self,
                                    gint finger,
                                    gint x,
                                    gint y)
{
	if (finger == 0) {
		bird_font_font_display_button_release (self, 1, (gdouble) x, (gdouble) y);
	}
	bird_font_font_display_last_tap_y = (gdouble) -1;
}

void
bird_font_font_display_tap_up (BirdFontFontDisplay* self,
                               gint finger,
                               gint x,
                               gint y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->tap_up) {
		_klass_->tap_up (self, finger, x, y);
	}
}

static void
bird_font_font_display_real_tap_move (BirdFontFontDisplay* self,
                                      gint finger,
                                      gint x,
                                      gint y)
{
	gdouble d = 0.0;
	if (finger == 0) {
		gboolean _tmp0_ = FALSE;
		bird_font_font_display_motion_notify (self, (gdouble) x, (gdouble) y);
		d = y - bird_font_font_display_last_tap_y;
		if (bird_font_font_display_last_tap_y > ((gdouble) -1)) {
			_tmp0_ = fabs (d) > ((gdouble) 15);
		} else {
			_tmp0_ = FALSE;
		}
		if (_tmp0_) {
			if (d > ((gdouble) 0)) {
				bird_font_font_display_scroll_wheel (self, (gdouble) x, (gdouble) y, (gdouble) 15, (gdouble) 0);
			} else {
				bird_font_font_display_scroll_wheel (self, (gdouble) x, (gdouble) y, (gdouble) 15, (gdouble) 0);
			}
		}
		bird_font_font_display_last_tap_y = (gdouble) y;
	}
}

void
bird_font_font_display_tap_move (BirdFontFontDisplay* self,
                                 gint finger,
                                 gint x,
                                 gint y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->tap_move) {
		_klass_->tap_move (self, finger, x, y);
	}
}

static void
bird_font_font_display_real_zoom_in (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_zoom_in (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->zoom_in) {
		_klass_->zoom_in (self);
	}
}

static void
bird_font_font_display_real_zoom_out (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_zoom_out (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->zoom_out) {
		_klass_->zoom_out (self);
	}
}

static void
bird_font_font_display_real_zoom_max (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_zoom_max (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->zoom_max) {
		_klass_->zoom_max (self);
	}
}

static void
bird_font_font_display_real_zoom_min (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_zoom_min (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->zoom_min) {
		_klass_->zoom_min (self);
	}
}

static void
bird_font_font_display_real_move_view (BirdFontFontDisplay* self,
                                       gdouble x,
                                       gdouble y)
{
}

void
bird_font_font_display_move_view (BirdFontFontDisplay* self,
                                  gdouble x,
                                  gdouble y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->move_view) {
		_klass_->move_view (self, x, y);
	}
}

static void
bird_font_font_display_real_reset_zoom (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_reset_zoom (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->reset_zoom) {
		_klass_->reset_zoom (self);
	}
}

static void
bird_font_font_display_real_store_current_view (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_store_current_view (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->store_current_view) {
		_klass_->store_current_view (self);
	}
}

static void
bird_font_font_display_real_restore_last_view (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_restore_last_view (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->restore_last_view) {
		_klass_->restore_last_view (self);
	}
}

static void
bird_font_font_display_real_next_view (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_next_view (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->next_view) {
		_klass_->next_view (self);
	}
}

static void
bird_font_font_display_real_scroll_wheel (BirdFontFontDisplay* self,
                                          gdouble x,
                                          gdouble y,
                                          gdouble pixeldelta_x,
                                          gdouble pixeldelta_y)
{
}

void
bird_font_font_display_scroll_wheel (BirdFontFontDisplay* self,
                                     gdouble x,
                                     gdouble y,
                                     gdouble pixeldelta_x,
                                     gdouble pixeldelta_y)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->scroll_wheel) {
		_klass_->scroll_wheel (self, x, y, pixeldelta_x, pixeldelta_y);
	}
}

static void
bird_font_font_display_real_undo (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_undo (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->undo) {
		_klass_->undo (self);
	}
}

static void
bird_font_font_display_real_redo (BirdFontFontDisplay* self)
{
}

void
bird_font_font_display_redo (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->redo) {
		_klass_->redo (self);
	}
}

GFile*
bird_font_font_display_find_file (const gchar* dir,
                                  const gchar* name)
{
	GFile* _tmp0_;
	GFile* result;
	g_return_val_if_fail (name != NULL, NULL);
	_tmp0_ = bird_font_search_paths_find_file (dir, name);
	result = _tmp0_;
	return result;
}

/** returns false if bindings to a single key works in the display. */
static gboolean
bird_font_font_display_real_needs_modifier (BirdFontFontDisplay* self)
{
	gboolean result;
	result = FALSE;
	return result;
}

gboolean
bird_font_font_display_needs_modifier (BirdFontFontDisplay* self)
{
	BirdFontFontDisplayClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = BIRD_FONT_FONT_DISPLAY_GET_CLASS (self);
	if (_klass_->needs_modifier) {
		return _klass_->needs_modifier (self);
	}
	return FALSE;
}

BirdFontFontDisplay*
bird_font_font_display_construct (GType object_type)
{
	BirdFontFontDisplay * self = NULL;
	self = (BirdFontFontDisplay*) g_object_new (object_type, NULL);
	return self;
}

static void
g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE (GClosure * closure,
                                                           GValue * return_value,
                                                           guint n_param_values,
                                                           const GValue * param_values,
                                                           gpointer invocation_hint,
                                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE) (gpointer data1, gdouble arg_1, gdouble arg_2, gdouble arg_3, gdouble arg_4, gpointer data2);
	register GMarshalFunc_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_double (param_values + 1), g_value_get_double (param_values + 2), g_value_get_double (param_values + 3), g_value_get_double (param_values + 4), data2);
}

static void
bird_font_font_display_class_init (BirdFontFontDisplayClass * klass,
                                   gpointer klass_data)
{
	bird_font_font_display_parent_class = g_type_class_peek_parent (klass);
	((BirdFontFontDisplayClass *) klass)->get_name = (gchar* (*) (BirdFontFontDisplay*)) bird_font_font_display_real_get_name;
	((BirdFontFontDisplayClass *) klass)->get_label = (gchar* (*) (BirdFontFontDisplay*)) bird_font_font_display_real_get_label;
	((BirdFontFontDisplayClass *) klass)->close = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_close;
	((BirdFontFontDisplayClass *) klass)->has_scrollbar = (gboolean (*) (BirdFontFontDisplay*)) bird_font_font_display_real_has_scrollbar;
	((BirdFontFontDisplayClass *) klass)->update_scrollbar = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_update_scrollbar;
	((BirdFontFontDisplayClass *) klass)->scroll_to = (void (*) (BirdFontFontDisplay*, gdouble)) bird_font_font_display_real_scroll_to;
	((BirdFontFontDisplayClass *) klass)->draw = (void (*) (BirdFontFontDisplay*, BirdFontWidgetAllocation*, cairo_t*)) bird_font_font_display_real_draw;
	((BirdFontFontDisplayClass *) klass)->selected_canvas = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_selected_canvas;
	((BirdFontFontDisplayClass *) klass)->key_press = (void (*) (BirdFontFontDisplay*, guint)) bird_font_font_display_real_key_press;
	((BirdFontFontDisplayClass *) klass)->key_release = (void (*) (BirdFontFontDisplay*, guint)) bird_font_font_display_real_key_release;
	((BirdFontFontDisplayClass *) klass)->motion_notify = (void (*) (BirdFontFontDisplay*, gdouble, gdouble)) bird_font_font_display_real_motion_notify;
	((BirdFontFontDisplayClass *) klass)->button_release = (void (*) (BirdFontFontDisplay*, gint, gdouble, gdouble)) bird_font_font_display_real_button_release;
	((BirdFontFontDisplayClass *) klass)->button_press = (void (*) (BirdFontFontDisplay*, guint, gdouble, gdouble)) bird_font_font_display_real_button_press;
	((BirdFontFontDisplayClass *) klass)->double_click = (void (*) (BirdFontFontDisplay*, guint, gdouble, gdouble)) bird_font_font_display_real_double_click;
	((BirdFontFontDisplayClass *) klass)->magnify = (void (*) (BirdFontFontDisplay*, gdouble)) bird_font_font_display_real_magnify;
	((BirdFontFontDisplayClass *) klass)->tap_down = (void (*) (BirdFontFontDisplay*, gint, gint, gint)) bird_font_font_display_real_tap_down;
	((BirdFontFontDisplayClass *) klass)->tap_up = (void (*) (BirdFontFontDisplay*, gint, gint, gint)) bird_font_font_display_real_tap_up;
	((BirdFontFontDisplayClass *) klass)->tap_move = (void (*) (BirdFontFontDisplay*, gint, gint, gint)) bird_font_font_display_real_tap_move;
	((BirdFontFontDisplayClass *) klass)->zoom_in = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_zoom_in;
	((BirdFontFontDisplayClass *) klass)->zoom_out = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_zoom_out;
	((BirdFontFontDisplayClass *) klass)->zoom_max = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_zoom_max;
	((BirdFontFontDisplayClass *) klass)->zoom_min = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_zoom_min;
	((BirdFontFontDisplayClass *) klass)->move_view = (void (*) (BirdFontFontDisplay*, gdouble, gdouble)) bird_font_font_display_real_move_view;
	((BirdFontFontDisplayClass *) klass)->reset_zoom = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_reset_zoom;
	((BirdFontFontDisplayClass *) klass)->store_current_view = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_store_current_view;
	((BirdFontFontDisplayClass *) klass)->restore_last_view = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_restore_last_view;
	((BirdFontFontDisplayClass *) klass)->next_view = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_next_view;
	((BirdFontFontDisplayClass *) klass)->scroll_wheel = (void (*) (BirdFontFontDisplay*, gdouble, gdouble, gdouble, gdouble)) bird_font_font_display_real_scroll_wheel;
	((BirdFontFontDisplayClass *) klass)->undo = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_undo;
	((BirdFontFontDisplayClass *) klass)->redo = (void (*) (BirdFontFontDisplay*)) bird_font_font_display_real_redo;
	((BirdFontFontDisplayClass *) klass)->needs_modifier = (gboolean (*) (BirdFontFontDisplay*)) bird_font_font_display_real_needs_modifier;
	G_OBJECT_CLASS (klass)->finalize = bird_font_font_display_finalize;
	/** Queue redraw area */
	bird_font_font_display_signals[BIRD_FONT_FONT_DISPLAY_REDRAW_AREA_SIGNAL] = g_signal_new ("redraw-area", BIRD_FONT_TYPE_FONT_DISPLAY, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__DOUBLE_DOUBLE_DOUBLE_DOUBLE, G_TYPE_NONE, 4, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_DOUBLE, G_TYPE_DOUBLE);
}

static void
bird_font_font_display_instance_init (BirdFontFontDisplay * self,
                                      gpointer klass)
{
}

static void
bird_font_font_display_finalize (GObject * obj)
{
	BirdFontFontDisplay * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_FONT_DISPLAY, BirdFontFontDisplay);
	G_OBJECT_CLASS (bird_font_font_display_parent_class)->finalize (obj);
}

static GType
bird_font_font_display_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontFontDisplayClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_font_display_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontFontDisplay), 0, (GInstanceInitFunc) bird_font_font_display_instance_init, NULL };
	GType bird_font_font_display_type_id;
	bird_font_font_display_type_id = g_type_register_static (G_TYPE_OBJECT, "BirdFontFontDisplay", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return bird_font_font_display_type_id;
}

GType
bird_font_font_display_get_type (void)
{
	static volatile gsize bird_font_font_display_type_id__once = 0;
	if (g_once_init_enter (&bird_font_font_display_type_id__once)) {
		GType bird_font_font_display_type_id;
		bird_font_font_display_type_id = bird_font_font_display_get_type_once ();
		g_once_init_leave (&bird_font_font_display_type_id__once, bird_font_font_display_type_id);
	}
	return bird_font_font_display_type_id__once;
}

