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

/**/
/*  Copyright (C) 2011 Robert Dyer*/
/**/
/*  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 "plank.h"
#include <glib.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  {
	PLANK_FACTORY_0_PROPERTY,
	PLANK_FACTORY_NUM_PROPERTIES
};
static GParamSpec* plank_factory_properties[PLANK_FACTORY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static gpointer plank_factory_parent_class = NULL;
PlankAbstractMain* plank_factory_main = NULL;
PlankItemFactory* plank_factory_item_factory = NULL;

static void plank_factory_finalize (GObject * obj);
static GType plank_factory_get_type_once (void);

/**
 * Initializes the factory class.
 *
 * @param main_class the main class
 * @param item the item factory
 */
static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
plank_factory_init (PlankAbstractMain* main_class,
                    PlankItemFactory* item)
{
	PlankAbstractMain* _tmp0_;
	PlankItemFactory* _tmp1_;
	g_return_if_fail (main_class != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = _g_object_ref0 (main_class);
	_g_object_unref0 (plank_factory_main);
	plank_factory_main = _tmp0_;
	_tmp1_ = _g_object_ref0 (item);
	_g_object_unref0 (plank_factory_item_factory);
	plank_factory_item_factory = _tmp1_;
}

PlankFactory*
plank_factory_construct (GType object_type)
{
	PlankFactory * self = NULL;
	self = (PlankFactory*) g_object_new (object_type, NULL);
	return self;
}

PlankFactory*
plank_factory_new (void)
{
	return plank_factory_construct (PLANK_TYPE_FACTORY);
}

static void
plank_factory_class_init (PlankFactoryClass * klass,
                          gpointer klass_data)
{
	plank_factory_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = plank_factory_finalize;
}

static void
plank_factory_instance_init (PlankFactory * self,
                             gpointer klass)
{
}

static void
plank_factory_finalize (GObject * obj)
{
	PlankFactory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PLANK_TYPE_FACTORY, PlankFactory);
	G_OBJECT_CLASS (plank_factory_parent_class)->finalize (obj);
}

/**
 * The main factory class for the dock.
 */
static GType
plank_factory_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PlankFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) plank_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PlankFactory), 0, (GInstanceInitFunc) plank_factory_instance_init, NULL };
	GType plank_factory_type_id;
	plank_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "PlankFactory", &g_define_type_info, 0);
	return plank_factory_type_id;
}

GType
plank_factory_get_type (void)
{
	static volatile gsize plank_factory_type_id__once = 0;
	if (g_once_init_enter (&plank_factory_type_id__once)) {
		GType plank_factory_type_id;
		plank_factory_type_id = plank_factory_get_type_once ();
		g_once_init_leave (&plank_factory_type_id__once, plank_factory_type_id);
	}
	return plank_factory_type_id__once;
}

