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

/*
* Copyright (c) 2017 Robert San <robertsanseries@gmail.com>
*
* 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 2 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, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <granite.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
#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 CIANO_TYPE_APPLICATION (ciano_application_get_type ())
#define CIANO_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_TYPE_APPLICATION, CianoApplication))
#define CIANO_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_TYPE_APPLICATION, CianoApplicationClass))
#define CIANO_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_TYPE_APPLICATION))
#define CIANO_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_TYPE_APPLICATION))
#define CIANO_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_TYPE_APPLICATION, CianoApplicationClass))

typedef struct _CianoApplication CianoApplication;
typedef struct _CianoApplicationClass CianoApplicationClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static void _vala_main (gchar** args,
                 gint args_length1);
VALA_EXTERN GType ciano_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoApplication, g_object_unref)
VALA_EXTERN CianoApplication* ciano_application_new (void);
VALA_EXTERN CianoApplication* ciano_application_construct (GType object_type);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

/**
 * Main method. Responsible for starting the {@code Application} class.
 *
 * @see Ciano.Application
 * @return {@code void}
 * @since 0.1.0
 */
static void
_vala_main (gchar** args,
            gint args_length1)
{
	CianoApplication* app = NULL;
	CianoApplication* _tmp0_;
	_tmp0_ = ciano_application_new ();
	app = _tmp0_;
	granite_application_run ((GraniteApplication*) app, args, (gint) args_length1);
	_g_object_unref0 (app);
}

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

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

