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

/*
Copyright (C) 2013 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 <cairo-gobject.h>
#include <glib-object.h>
#include <float.h>
#include <math.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_EMPTY_TAB_0_PROPERTY,
	BIRD_FONT_EMPTY_TAB_NUM_PROPERTIES
};
static GParamSpec* bird_font_empty_tab_properties[BIRD_FONT_EMPTY_TAB_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

struct _BirdFontEmptyTabPrivate {
	gchar* name;
	gchar* label;
};

static gint BirdFontEmptyTab_private_offset;
static gpointer bird_font_empty_tab_parent_class = NULL;

static gchar* bird_font_empty_tab_real_get_name (BirdFontFontDisplay* base);
static gchar* bird_font_empty_tab_real_get_label (BirdFontFontDisplay* base);
static void bird_font_empty_tab_real_selected_canvas (BirdFontFontDisplay* base);
static void bird_font_empty_tab_real_draw (BirdFontFontDisplay* base,
                                    BirdFontWidgetAllocation* allocation,
                                    cairo_t* cr);
static void bird_font_empty_tab_finalize (GObject * obj);
static GType bird_font_empty_tab_get_type_once (void);

static inline gpointer
bird_font_empty_tab_get_instance_private (BirdFontEmptyTab* self)
{
	return G_STRUCT_MEMBER_P (self, BirdFontEmptyTab_private_offset);
}

BirdFontEmptyTab*
bird_font_empty_tab_construct (GType object_type,
                               const gchar* name,
                               const gchar* label)
{
	BirdFontEmptyTab * self = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	self = (BirdFontEmptyTab*) bird_font_font_display_construct (object_type);
	_tmp0_ = g_strdup (name);
	_g_free0 (self->priv->name);
	self->priv->name = _tmp0_;
	_tmp1_ = g_strdup (label);
	_g_free0 (self->priv->label);
	self->priv->label = _tmp1_;
	return self;
}

BirdFontEmptyTab*
bird_font_empty_tab_new (const gchar* name,
                         const gchar* label)
{
	return bird_font_empty_tab_construct (BIRD_FONT_TYPE_EMPTY_TAB, name, label);
}

static gchar*
bird_font_empty_tab_real_get_name (BirdFontFontDisplay* base)
{
	BirdFontEmptyTab * self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	self = (BirdFontEmptyTab*) base;
	_tmp0_ = self->priv->name;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static gchar*
bird_font_empty_tab_real_get_label (BirdFontFontDisplay* base)
{
	BirdFontEmptyTab * self;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	self = (BirdFontEmptyTab*) base;
	_tmp0_ = self->priv->label;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
bird_font_empty_tab_real_selected_canvas (BirdFontFontDisplay* base)
{
	BirdFontEmptyTab * self;
	self = (BirdFontEmptyTab*) base;
	bird_font_main_window_hide_scrollbar ();
	bird_font_glyph_canvas_redraw ();
}

static void
bird_font_empty_tab_real_draw (BirdFontFontDisplay* base,
                               BirdFontWidgetAllocation* allocation,
                               cairo_t* cr)
{
	BirdFontEmptyTab * self;
	self = (BirdFontEmptyTab*) base;
	g_return_if_fail (allocation != NULL);
	g_return_if_fail (cr != NULL);
	cairo_save (cr);
	bird_font_theme_color (cr, "Default Background");
	cairo_rectangle (cr, (gdouble) 0, (gdouble) 0, (gdouble) allocation->width, (gdouble) allocation->height);
	cairo_fill (cr);
	cairo_restore (cr);
}

static void
bird_font_empty_tab_class_init (BirdFontEmptyTabClass * klass,
                                gpointer klass_data)
{
	bird_font_empty_tab_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BirdFontEmptyTab_private_offset);
	((BirdFontFontDisplayClass *) klass)->get_name = (gchar* (*) (BirdFontFontDisplay*)) bird_font_empty_tab_real_get_name;
	((BirdFontFontDisplayClass *) klass)->get_label = (gchar* (*) (BirdFontFontDisplay*)) bird_font_empty_tab_real_get_label;
	((BirdFontFontDisplayClass *) klass)->selected_canvas = (void (*) (BirdFontFontDisplay*)) bird_font_empty_tab_real_selected_canvas;
	((BirdFontFontDisplayClass *) klass)->draw = (void (*) (BirdFontFontDisplay*, BirdFontWidgetAllocation*, cairo_t*)) bird_font_empty_tab_real_draw;
	G_OBJECT_CLASS (klass)->finalize = bird_font_empty_tab_finalize;
}

static void
bird_font_empty_tab_instance_init (BirdFontEmptyTab * self,
                                   gpointer klass)
{
	self->priv = bird_font_empty_tab_get_instance_private (self);
}

static void
bird_font_empty_tab_finalize (GObject * obj)
{
	BirdFontEmptyTab * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_EMPTY_TAB, BirdFontEmptyTab);
	_g_free0 (self->priv->name);
	_g_free0 (self->priv->label);
	G_OBJECT_CLASS (bird_font_empty_tab_parent_class)->finalize (obj);
}

static GType
bird_font_empty_tab_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontEmptyTabClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_empty_tab_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontEmptyTab), 0, (GInstanceInitFunc) bird_font_empty_tab_instance_init, NULL };
	GType bird_font_empty_tab_type_id;
	bird_font_empty_tab_type_id = g_type_register_static (BIRD_FONT_TYPE_FONT_DISPLAY, "BirdFontEmptyTab", &g_define_type_info, 0);
	BirdFontEmptyTab_private_offset = g_type_add_instance_private (bird_font_empty_tab_type_id, sizeof (BirdFontEmptyTabPrivate));
	return bird_font_empty_tab_type_id;
}

GType
bird_font_empty_tab_get_type (void)
{
	static volatile gsize bird_font_empty_tab_type_id__once = 0;
	if (g_once_init_enter (&bird_font_empty_tab_type_id__once)) {
		GType bird_font_empty_tab_type_id;
		bird_font_empty_tab_type_id = bird_font_empty_tab_get_type_once ();
		g_once_init_leave (&bird_font_empty_tab_type_id__once, bird_font_empty_tab_type_id);
	}
	return bird_font_empty_tab_type_id__once;
}

