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

/*
Copyright (C) 2016 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 <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_GLYPH_TAB_0_PROPERTY,
	BIRD_FONT_GLYPH_TAB_NUM_PROPERTIES
};
static GParamSpec* bird_font_glyph_tab_properties[BIRD_FONT_GLYPH_TAB_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static gpointer bird_font_glyph_tab_parent_class = NULL;

static gchar* bird_font_glyph_tab_real_get_name (BirdFontFontDisplay* base);
static gchar* bird_font_glyph_tab_real_get_label (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_close (BirdFontFontDisplay* base);
static gboolean bird_font_glyph_tab_real_has_scrollbar (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_update_scrollbar (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_scroll_to (BirdFontFontDisplay* base,
                                         gdouble percent);
static void bird_font_glyph_tab_real_draw (BirdFontFontDisplay* base,
                                    BirdFontWidgetAllocation* allocation,
                                    cairo_t* cr);
static void bird_font_glyph_tab_real_selected_canvas (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_key_press (BirdFontFontDisplay* base,
                                         guint keyval);
static void bird_font_glyph_tab_real_key_release (BirdFontFontDisplay* base,
                                           guint keyval);
static void bird_font_glyph_tab_real_motion_notify (BirdFontFontDisplay* base,
                                             gdouble x,
                                             gdouble y);
static void bird_font_glyph_tab_real_button_release (BirdFontFontDisplay* base,
                                              gint button,
                                              gdouble x,
                                              gdouble y);
static void bird_font_glyph_tab_real_button_press (BirdFontFontDisplay* base,
                                            guint button,
                                            gdouble x,
                                            gdouble y);
static void bird_font_glyph_tab_real_double_click (BirdFontFontDisplay* base,
                                            guint button,
                                            gdouble ex,
                                            gdouble ey);
static void bird_font_glyph_tab_real_magnify (BirdFontFontDisplay* base,
                                       gdouble magnification);
static void bird_font_glyph_tab_real_tap_down (BirdFontFontDisplay* base,
                                        gint finger,
                                        gint x,
                                        gint y);
static void bird_font_glyph_tab_real_tap_up (BirdFontFontDisplay* base,
                                      gint finger,
                                      gint x,
                                      gint y);
static void bird_font_glyph_tab_real_tap_move (BirdFontFontDisplay* base,
                                        gint finger,
                                        gint x,
                                        gint y);
static void bird_font_glyph_tab_real_zoom_in (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_zoom_out (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_zoom_max (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_zoom_min (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_move_view (BirdFontFontDisplay* base,
                                         gdouble x,
                                         gdouble y);
static void bird_font_glyph_tab_real_reset_zoom (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_store_current_view (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_restore_last_view (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_next_view (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_scroll_wheel (BirdFontFontDisplay* base,
                                            gdouble x,
                                            gdouble y,
                                            gdouble pixeldelta_x,
                                            gdouble pixeldelta_y);
static void bird_font_glyph_tab_real_undo (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_real_redo (BirdFontFontDisplay* base);
static gboolean bird_font_glyph_tab_real_needs_modifier (BirdFontFontDisplay* base);
static void bird_font_glyph_tab_finalize (GObject * obj);
static GType bird_font_glyph_tab_get_type_once (void);

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

BirdFontGlyphTab*
bird_font_glyph_tab_construct (GType object_type,
                               BirdFontGlyphCollection* glyphs)
{
	BirdFontGlyphTab * self = NULL;
	BirdFontGlyphCollection* _tmp0_;
	g_return_val_if_fail (glyphs != NULL, NULL);
	self = (BirdFontGlyphTab*) bird_font_font_display_construct (object_type);
	_tmp0_ = _g_object_ref0 (glyphs);
	_g_object_unref0 (self->glyphs);
	self->glyphs = _tmp0_;
	return self;
}

BirdFontGlyphTab*
bird_font_glyph_tab_new (BirdFontGlyphCollection* glyphs)
{
	return bird_font_glyph_tab_construct (BIRD_FONT_TYPE_GLYPH_TAB, glyphs);
}

static gchar*
bird_font_glyph_tab_real_get_name (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = bird_font_font_display_get_name ((BirdFontFontDisplay*) _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	result = _tmp4_;
	return result;
}

static gchar*
bird_font_glyph_tab_real_get_label (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = bird_font_font_display_get_label ((BirdFontFontDisplay*) _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	result = _tmp4_;
	return result;
}

static void
bird_font_glyph_tab_real_close (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_close ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static gboolean
bird_font_glyph_tab_real_has_scrollbar (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = bird_font_font_display_has_scrollbar ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

static void
bird_font_glyph_tab_real_update_scrollbar (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_update_scrollbar ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_scroll_to (BirdFontFontDisplay* base,
                                    gdouble percent)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_scroll_to ((BirdFontFontDisplay*) _tmp2_, percent);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_draw (BirdFontFontDisplay* base,
                               BirdFontWidgetAllocation* allocation,
                               cairo_t* cr)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	g_return_if_fail (allocation != NULL);
	g_return_if_fail (cr != NULL);
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_draw ((BirdFontFontDisplay*) _tmp2_, allocation, cr);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_selected_canvas (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_selected_canvas ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_key_press (BirdFontFontDisplay* base,
                                    guint keyval)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_key_press ((BirdFontFontDisplay*) _tmp2_, keyval);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_key_release (BirdFontFontDisplay* base,
                                      guint keyval)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_key_release ((BirdFontFontDisplay*) _tmp2_, keyval);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_motion_notify (BirdFontFontDisplay* base,
                                        gdouble x,
                                        gdouble y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_motion_notify ((BirdFontFontDisplay*) _tmp2_, x, y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_button_release (BirdFontFontDisplay* base,
                                         gint button,
                                         gdouble x,
                                         gdouble y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_button_release ((BirdFontFontDisplay*) _tmp2_, button, x, y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_button_press (BirdFontFontDisplay* base,
                                       guint button,
                                       gdouble x,
                                       gdouble y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_button_press ((BirdFontFontDisplay*) _tmp2_, button, x, y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_double_click (BirdFontFontDisplay* base,
                                       guint button,
                                       gdouble ex,
                                       gdouble ey)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_double_click ((BirdFontFontDisplay*) _tmp2_, button, ex, ey);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_magnify (BirdFontFontDisplay* base,
                                  gdouble magnification)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_magnify ((BirdFontFontDisplay*) _tmp2_, magnification);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_tap_down (BirdFontFontDisplay* base,
                                   gint finger,
                                   gint x,
                                   gint y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_tap_down ((BirdFontFontDisplay*) _tmp2_, finger, x, y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_tap_up (BirdFontFontDisplay* base,
                                 gint finger,
                                 gint x,
                                 gint y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_tap_up ((BirdFontFontDisplay*) _tmp2_, finger, x, y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_tap_move (BirdFontFontDisplay* base,
                                   gint finger,
                                   gint x,
                                   gint y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_tap_move ((BirdFontFontDisplay*) _tmp2_, finger, x, y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_zoom_in (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_zoom_in ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_zoom_out (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_zoom_out ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_zoom_max (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_zoom_max ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_zoom_min (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_zoom_min ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_move_view (BirdFontFontDisplay* base,
                                    gdouble x,
                                    gdouble y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_move_view ((BirdFontFontDisplay*) _tmp2_, x, y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_reset_zoom (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_reset_zoom ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_store_current_view (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_store_current_view ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_restore_last_view (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_restore_last_view ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_next_view (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_next_view ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_scroll_wheel (BirdFontFontDisplay* base,
                                       gdouble x,
                                       gdouble y,
                                       gdouble pixeldelta_x,
                                       gdouble pixeldelta_y)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_scroll_wheel ((BirdFontFontDisplay*) _tmp2_, x, y, pixeldelta_x, pixeldelta_y);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_undo (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_undo ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
bird_font_glyph_tab_real_redo (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	bird_font_font_display_redo ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
}

/** returns false if bindings to a single key works in the display. */
static gboolean
bird_font_glyph_tab_real_needs_modifier (BirdFontFontDisplay* base)
{
	BirdFontGlyphTab * self;
	BirdFontGlyphCollection* _tmp0_;
	BirdFontGlyph* _tmp1_;
	BirdFontGlyph* _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	self = (BirdFontGlyphTab*) base;
	_tmp0_ = self->glyphs;
	_tmp1_ = bird_font_glyph_collection_get_current (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = bird_font_font_display_needs_modifier ((BirdFontFontDisplay*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

static void
bird_font_glyph_tab_class_init (BirdFontGlyphTabClass * klass,
                                gpointer klass_data)
{
	bird_font_glyph_tab_parent_class = g_type_class_peek_parent (klass);
	((BirdFontFontDisplayClass *) klass)->get_name = (gchar* (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_get_name;
	((BirdFontFontDisplayClass *) klass)->get_label = (gchar* (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_get_label;
	((BirdFontFontDisplayClass *) klass)->close = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_close;
	((BirdFontFontDisplayClass *) klass)->has_scrollbar = (gboolean (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_has_scrollbar;
	((BirdFontFontDisplayClass *) klass)->update_scrollbar = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_update_scrollbar;
	((BirdFontFontDisplayClass *) klass)->scroll_to = (void (*) (BirdFontFontDisplay*, gdouble)) bird_font_glyph_tab_real_scroll_to;
	((BirdFontFontDisplayClass *) klass)->draw = (void (*) (BirdFontFontDisplay*, BirdFontWidgetAllocation*, cairo_t*)) bird_font_glyph_tab_real_draw;
	((BirdFontFontDisplayClass *) klass)->selected_canvas = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_selected_canvas;
	((BirdFontFontDisplayClass *) klass)->key_press = (void (*) (BirdFontFontDisplay*, guint)) bird_font_glyph_tab_real_key_press;
	((BirdFontFontDisplayClass *) klass)->key_release = (void (*) (BirdFontFontDisplay*, guint)) bird_font_glyph_tab_real_key_release;
	((BirdFontFontDisplayClass *) klass)->motion_notify = (void (*) (BirdFontFontDisplay*, gdouble, gdouble)) bird_font_glyph_tab_real_motion_notify;
	((BirdFontFontDisplayClass *) klass)->button_release = (void (*) (BirdFontFontDisplay*, gint, gdouble, gdouble)) bird_font_glyph_tab_real_button_release;
	((BirdFontFontDisplayClass *) klass)->button_press = (void (*) (BirdFontFontDisplay*, guint, gdouble, gdouble)) bird_font_glyph_tab_real_button_press;
	((BirdFontFontDisplayClass *) klass)->double_click = (void (*) (BirdFontFontDisplay*, guint, gdouble, gdouble)) bird_font_glyph_tab_real_double_click;
	((BirdFontFontDisplayClass *) klass)->magnify = (void (*) (BirdFontFontDisplay*, gdouble)) bird_font_glyph_tab_real_magnify;
	((BirdFontFontDisplayClass *) klass)->tap_down = (void (*) (BirdFontFontDisplay*, gint, gint, gint)) bird_font_glyph_tab_real_tap_down;
	((BirdFontFontDisplayClass *) klass)->tap_up = (void (*) (BirdFontFontDisplay*, gint, gint, gint)) bird_font_glyph_tab_real_tap_up;
	((BirdFontFontDisplayClass *) klass)->tap_move = (void (*) (BirdFontFontDisplay*, gint, gint, gint)) bird_font_glyph_tab_real_tap_move;
	((BirdFontFontDisplayClass *) klass)->zoom_in = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_zoom_in;
	((BirdFontFontDisplayClass *) klass)->zoom_out = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_zoom_out;
	((BirdFontFontDisplayClass *) klass)->zoom_max = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_zoom_max;
	((BirdFontFontDisplayClass *) klass)->zoom_min = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_zoom_min;
	((BirdFontFontDisplayClass *) klass)->move_view = (void (*) (BirdFontFontDisplay*, gdouble, gdouble)) bird_font_glyph_tab_real_move_view;
	((BirdFontFontDisplayClass *) klass)->reset_zoom = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_reset_zoom;
	((BirdFontFontDisplayClass *) klass)->store_current_view = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_store_current_view;
	((BirdFontFontDisplayClass *) klass)->restore_last_view = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_restore_last_view;
	((BirdFontFontDisplayClass *) klass)->next_view = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_next_view;
	((BirdFontFontDisplayClass *) klass)->scroll_wheel = (void (*) (BirdFontFontDisplay*, gdouble, gdouble, gdouble, gdouble)) bird_font_glyph_tab_real_scroll_wheel;
	((BirdFontFontDisplayClass *) klass)->undo = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_undo;
	((BirdFontFontDisplayClass *) klass)->redo = (void (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_redo;
	((BirdFontFontDisplayClass *) klass)->needs_modifier = (gboolean (*) (BirdFontFontDisplay*)) bird_font_glyph_tab_real_needs_modifier;
	G_OBJECT_CLASS (klass)->finalize = bird_font_glyph_tab_finalize;
}

static void
bird_font_glyph_tab_instance_init (BirdFontGlyphTab * self,
                                   gpointer klass)
{
}

static void
bird_font_glyph_tab_finalize (GObject * obj)
{
	BirdFontGlyphTab * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_GLYPH_TAB, BirdFontGlyphTab);
	_g_object_unref0 (self->glyphs);
	G_OBJECT_CLASS (bird_font_glyph_tab_parent_class)->finalize (obj);
}

static GType
bird_font_glyph_tab_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontGlyphTabClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_glyph_tab_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontGlyphTab), 0, (GInstanceInitFunc) bird_font_glyph_tab_instance_init, NULL };
	GType bird_font_glyph_tab_type_id;
	bird_font_glyph_tab_type_id = g_type_register_static (BIRD_FONT_TYPE_FONT_DISPLAY, "BirdFontGlyphTab", &g_define_type_info, 0);
	return bird_font_glyph_tab_type_id;
}

GType
bird_font_glyph_tab_get_type (void)
{
	static volatile gsize bird_font_glyph_tab_type_id__once = 0;
	if (g_once_init_enter (&bird_font_glyph_tab_type_id__once)) {
		GType bird_font_glyph_tab_type_id;
		bird_font_glyph_tab_type_id = bird_font_glyph_tab_get_type_once ();
		g_once_init_leave (&bird_font_glyph_tab_type_id__once, bird_font_glyph_tab_type_id);
	}
	return bird_font_glyph_tab_type_id__once;
}

