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

/**/
/*  Copyright (C) 2011-2012 Robert Dyer, Rico Tzschichholz*/
/**/
/*  This file is part of Plank.*/
/**/
/*  Plank 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.*/
/**/
/*  Plank 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 <locale.h>
#include <glib/gi18n-lib.h>
#include "config.h"
#include "plank.h"
#include <glib-object.h>
#include <gio/gio.h>
#include <gtk/gtk.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 PLANK_TYPE_MAIN (plank_main_get_type ())
#define PLANK_MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PLANK_TYPE_MAIN, PlankMain))
#define PLANK_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PLANK_TYPE_MAIN, PlankMainClass))
#define PLANK_IS_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PLANK_TYPE_MAIN))
#define PLANK_IS_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PLANK_TYPE_MAIN))
#define PLANK_MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PLANK_TYPE_MAIN, PlankMainClass))

typedef struct _PlankMain PlankMain;
typedef struct _PlankMainClass PlankMainClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _PlankMainPrivate PlankMainPrivate;
enum  {
	PLANK_MAIN_0_PROPERTY,
	PLANK_MAIN_NUM_PROPERTIES
};
static GParamSpec* plank_main_properties[PLANK_MAIN_NUM_PROPERTIES];

struct _PlankMain {
	PlankAbstractMain parent_instance;
	PlankMainPrivate * priv;
};

struct _PlankMainClass {
	PlankAbstractMainClass parent_class;
};

static gpointer plank_main_parent_class = NULL;

static gint plank_main (gchar** argv,
                 gint argv_length1);
VALA_EXTERN GType plank_main_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PlankMain, g_object_unref)
VALA_EXTERN PlankMain* plank_main_new (void);
VALA_EXTERN PlankMain* plank_main_construct (GType object_type);
static GType plank_main_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static gint
plank_main (gchar** argv,
            gint argv_length1)
{
	PlankMain* application = NULL;
	PlankMain* _tmp0_;
	PlankItemFactory* _tmp1_;
	PlankItemFactory* _tmp2_;
	gint result;
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, DATADIR "/locale");
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
	_tmp0_ = plank_main_new ();
	application = _tmp0_;
	_tmp1_ = plank_item_factory_new ();
	_tmp2_ = _tmp1_;
	plank_factory_init ((PlankAbstractMain*) application, _tmp2_);
	_g_object_unref0 (_tmp2_);
	result = g_application_run ((GApplication*) application, (gint) argv_length1, argv);
	_g_object_unref0 (application);
	return result;
}

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

PlankMain*
plank_main_construct (GType object_type)
{
	PlankMain * self = NULL;
	gchar** authors = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gint authors_length1;
	gint _authors_size_;
	gchar** documenters = NULL;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar** _tmp6_;
	gint documenters_length1;
	gint _documenters_size_;
	gchar** artists = NULL;
	gchar* _tmp7_;
	gchar** _tmp8_;
	gint artists_length1;
	gint _artists_size_;
	_tmp0_ = g_strdup ("Robert Dyer <psybers@gmail.com>");
	_tmp1_ = g_strdup ("Rico Tzschichholz <ricotz@ubuntu.com>");
	_tmp2_ = g_strdup ("Michal Hruby <michal.mhr@gmail.com>");
	_tmp3_ = g_new0 (gchar*, 3 + 1);
	_tmp3_[0] = _tmp0_;
	_tmp3_[1] = _tmp1_;
	_tmp3_[2] = _tmp2_;
	authors = _tmp3_;
	authors_length1 = 3;
	_authors_size_ = authors_length1;
	_tmp4_ = g_strdup ("Robert Dyer <psybers@gmail.com>");
	_tmp5_ = g_strdup ("Rico Tzschichholz <ricotz@ubuntu.com>");
	_tmp6_ = g_new0 (gchar*, 2 + 1);
	_tmp6_[0] = _tmp4_;
	_tmp6_[1] = _tmp5_;
	documenters = _tmp6_;
	documenters_length1 = 2;
	_documenters_size_ = documenters_length1;
	_tmp7_ = g_strdup ("Daniel Foré <daniel@elementaryos.org>");
	_tmp8_ = g_new0 (gchar*, 1 + 1);
	_tmp8_[0] = _tmp7_;
	artists = _tmp8_;
	artists_length1 = 1;
	_artists_size_ = artists_length1;
	self = (PlankMain*) g_object_new (object_type, "build-data-dir", DATADIR, "build-pkg-data-dir", PKGDATADIR, "build-release-name", RELEASE_NAME, "build-version", VERSION, "build-version-info", VERSION_INFO, "program-name", "Plank", "exec-name", "plank", "app-copyright", "2011-2017", "app-dbus", "net.launchpad.plank", "app-icon", "plank", "app-launcher", "plank.desktop", "main-url", "https://launchpad.net/plank", "help-url", "https://answers.launchpad.net/plank", "translate-url", "https://translations.launchpad.net/plank", "about-authors", authors, "about-documenters", documenters, "about-artists", artists, "about-translators", _ ("translator-credits"), "about-license-type", GTK_LICENSE_GPL_3_0, NULL);
	artists = (_vala_array_free (artists, artists_length1, (GDestroyNotify) g_free), NULL);
	documenters = (_vala_array_free (documenters, documenters_length1, (GDestroyNotify) g_free), NULL);
	authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL);
	return self;
}

PlankMain*
plank_main_new (void)
{
	return plank_main_construct (PLANK_TYPE_MAIN);
}

static void
plank_main_class_init (PlankMainClass * klass,
                       gpointer klass_data)
{
	plank_main_parent_class = g_type_class_peek_parent (klass);
}

static void
plank_main_instance_init (PlankMain * self,
                          gpointer klass)
{
}

static GType
plank_main_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PlankMainClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) plank_main_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PlankMain), 0, (GInstanceInitFunc) plank_main_instance_init, NULL };
	GType plank_main_type_id;
	plank_main_type_id = g_type_register_static (PLANK_TYPE_ABSTRACT_MAIN, "PlankMain", &g_define_type_info, 0);
	return plank_main_type_id;
}

GType
plank_main_get_type (void)
{
	static volatile gsize plank_main_type_id__once = 0;
	if (g_once_init_enter (&plank_main_type_id__once)) {
		GType plank_main_type_id;
		plank_main_type_id = plank_main_get_type_once ();
		g_once_init_leave (&plank_main_type_id__once, plank_main_type_id);
	}
	return plank_main_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

