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

/*
Copyright (C) 2012, 2014 Johan Mattsson

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

This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <birdfont.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define BIRD_FONT_TYPE_GTK_WINDOW (bird_font_gtk_window_get_type ())
#define BIRD_FONT_GTK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BIRD_FONT_TYPE_GTK_WINDOW, BirdFontGtkWindow))
#define BIRD_FONT_GTK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BIRD_FONT_TYPE_GTK_WINDOW, BirdFontGtkWindowClass))
#define BIRD_FONT_IS_GTK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BIRD_FONT_TYPE_GTK_WINDOW))
#define BIRD_FONT_IS_GTK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BIRD_FONT_TYPE_GTK_WINDOW))
#define BIRD_FONT_GTK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BIRD_FONT_TYPE_GTK_WINDOW, BirdFontGtkWindowClass))

typedef struct _BirdFontGtkWindow BirdFontGtkWindow;
typedef struct _BirdFontGtkWindowClass BirdFontGtkWindowClass;
#define _bird_font_bird_font_unref0(var) ((var == NULL) ? NULL : (var = (bird_font_bird_font_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static gint _vala_main (gchar** arg,
                 gint arg_length1);
VALA_EXTERN GType bird_font_gtk_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BirdFontGtkWindow, g_object_unref)
VALA_EXTERN BirdFontGtkWindow* bird_font_gtk_window_new (const gchar* title);
VALA_EXTERN BirdFontGtkWindow* bird_font_gtk_window_construct (GType object_type,
                                                   const gchar* title);
VALA_EXTERN void bird_font_gtk_window_init (BirdFontGtkWindow* self);

static gint
_vala_main (gchar** arg,
            gint arg_length1)
{
	BirdFontGtkWindow* native_window = NULL;
	BirdFontMainWindow* window = NULL;
	BirdFontBirdFont* birdfont = NULL;
	BirdFontBirdFont* _tmp0_;
	BirdFontMainWindow* _tmp1_;
	BirdFontGtkWindow* _tmp2_;
	gint result;
	_tmp0_ = bird_font_bird_font_new ();
	_bird_font_bird_font_unref0 (birdfont);
	birdfont = _tmp0_;
	bird_font_bird_font_init (birdfont, arg, (gint) arg_length1, NULL, "birdfont", NULL);
	gtk_init ((gint*) (&arg_length1), &arg);
	_tmp1_ = bird_font_main_window_new ();
	_g_object_unref0 (window);
	window = _tmp1_;
	_tmp2_ = bird_font_gtk_window_new ("birdfont");
	g_object_ref_sink (_tmp2_);
	_g_object_unref0 (native_window);
	native_window = _tmp2_;
	bird_font_main_window_set_native (window, (BirdFontNativeWindow*) native_window);
	bird_font_gtk_window_init (native_window);
	bird_font_bird_font_load_font_from_command_line (birdfont);
	gtk_main ();
	result = 0;
	_bird_font_bird_font_unref0 (birdfont);
	_g_object_unref0 (window);
	_g_object_unref0 (native_window);
	return result;
}

int
main (int argc,
      char ** argv)
{
	return _vala_main (argv, argc);
}

