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

/*
 * This file is part of budgie-desktop
 * 
 * Copyright (C) 2015-2016 Ikey Doherty <ikey@solus-project.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.
 */

#include <glib.h>
#include <glib-object.h>
#include <libpeas/peas.h>
#include <plugin.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>


#define TYPE_SEPARATOR_PLUGIN (separator_plugin_get_type ())
#define SEPARATOR_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEPARATOR_PLUGIN, SeparatorPlugin))
#define SEPARATOR_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEPARATOR_PLUGIN, SeparatorPluginClass))
#define IS_SEPARATOR_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEPARATOR_PLUGIN))
#define IS_SEPARATOR_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEPARATOR_PLUGIN))
#define SEPARATOR_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEPARATOR_PLUGIN, SeparatorPluginClass))

typedef struct _SeparatorPlugin SeparatorPlugin;
typedef struct _SeparatorPluginClass SeparatorPluginClass;
typedef struct _SeparatorPluginPrivate SeparatorPluginPrivate;

#define TYPE_SEPARATOR_APPLET (separator_applet_get_type ())
#define SEPARATOR_APPLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEPARATOR_APPLET, SeparatorApplet))
#define SEPARATOR_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEPARATOR_APPLET, SeparatorAppletClass))
#define IS_SEPARATOR_APPLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEPARATOR_APPLET))
#define IS_SEPARATOR_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEPARATOR_APPLET))
#define SEPARATOR_APPLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEPARATOR_APPLET, SeparatorAppletClass))

typedef struct _SeparatorApplet SeparatorApplet;
typedef struct _SeparatorAppletClass SeparatorAppletClass;
typedef struct _SeparatorAppletPrivate SeparatorAppletPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _SeparatorPlugin {
	PeasExtensionBase parent_instance;
	SeparatorPluginPrivate * priv;
};

struct _SeparatorPluginClass {
	PeasExtensionBaseClass parent_class;
};

struct _SeparatorApplet {
	BudgieApplet parent_instance;
	SeparatorAppletPrivate * priv;
};

struct _SeparatorAppletClass {
	BudgieAppletClass parent_class;
};

struct _SeparatorAppletPrivate {
	GtkSeparator* sep;
};


static gpointer separator_plugin_parent_class = NULL;
static BudgiePluginIface* separator_plugin_budgie_plugin_parent_iface = NULL;
static GType separator_plugin_type_id = 0;
static gpointer separator_applet_parent_class = NULL;
static GType separator_applet_type_id = 0;

GType separator_plugin_get_type (void) G_GNUC_CONST;
GType separator_plugin_register_type (GTypeModule * module);
enum  {
	SEPARATOR_PLUGIN_DUMMY_PROPERTY
};
static BudgieApplet* separator_plugin_real_get_panel_widget (BudgiePlugin* base, const gchar* uuid);
SeparatorApplet* separator_applet_new (void);
SeparatorApplet* separator_applet_construct (GType object_type);
GType separator_applet_get_type (void) G_GNUC_CONST;
GType separator_applet_register_type (GTypeModule * module);
SeparatorPlugin* separator_plugin_new (void);
SeparatorPlugin* separator_plugin_construct (GType object_type);
#define SEPARATOR_APPLET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_SEPARATOR_APPLET, SeparatorAppletPrivate))
enum  {
	SEPARATOR_APPLET_DUMMY_PROPERTY
};
static void separator_applet_finalize (GObject* obj);
void peas_register_types (GTypeModule* module);


static BudgieApplet* separator_plugin_real_get_panel_widget (BudgiePlugin* base, const gchar* uuid) {
	SeparatorPlugin * self;
	BudgieApplet* result = NULL;
	SeparatorApplet* _tmp0_ = NULL;
	self = (SeparatorPlugin*) base;
	g_return_val_if_fail (uuid != NULL, NULL);
	_tmp0_ = separator_applet_new ();
	g_object_ref_sink (_tmp0_);
	result = (BudgieApplet*) _tmp0_;
	return result;
}


SeparatorPlugin* separator_plugin_construct (GType object_type) {
	SeparatorPlugin * self = NULL;
	self = (SeparatorPlugin*) g_object_new (object_type, NULL);
	return self;
}


SeparatorPlugin* separator_plugin_new (void) {
	return separator_plugin_construct (TYPE_SEPARATOR_PLUGIN);
}


static void separator_plugin_class_init (SeparatorPluginClass * klass) {
	separator_plugin_parent_class = g_type_class_peek_parent (klass);
}


static void separator_plugin_budgie_plugin_interface_init (BudgiePluginIface * iface) {
	separator_plugin_budgie_plugin_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_panel_widget = (BudgieApplet* (*)(BudgiePlugin*, const gchar*)) separator_plugin_real_get_panel_widget;
}


static void separator_plugin_instance_init (SeparatorPlugin * self) {
}


GType separator_plugin_get_type (void) {
	return separator_plugin_type_id;
}


GType separator_plugin_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (SeparatorPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) separator_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeparatorPlugin), 0, (GInstanceInitFunc) separator_plugin_instance_init, NULL };
	static const GInterfaceInfo budgie_plugin_info = { (GInterfaceInitFunc) separator_plugin_budgie_plugin_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	separator_plugin_type_id = g_type_module_register_type (module, peas_extension_base_get_type (), "SeparatorPlugin", &g_define_type_info, 0);
	g_type_module_add_interface (module, separator_plugin_type_id, budgie_plugin_get_type (), &budgie_plugin_info);
	return separator_plugin_type_id;
}


SeparatorApplet* separator_applet_construct (GType object_type) {
	SeparatorApplet * self = NULL;
	GtkSeparator* _tmp0_ = NULL;
	GtkSeparator* _tmp1_ = NULL;
	GtkSeparator* _tmp2_ = NULL;
	GtkSeparator* _tmp3_ = NULL;
	GtkSeparator* _tmp4_ = NULL;
	self = (SeparatorApplet*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkSeparator*) gtk_separator_new (GTK_ORIENTATION_VERTICAL);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->sep);
	self->priv->sep = _tmp0_;
	_tmp1_ = self->priv->sep;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->sep;
	g_object_set ((GtkWidget*) _tmp2_, "margin", 2, NULL);
	_tmp3_ = self->priv->sep;
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp3_, 6);
	_tmp4_ = self->priv->sep;
	gtk_widget_set_margin_top ((GtkWidget*) _tmp4_, 6);
	gtk_widget_show_all ((GtkWidget*) self);
	return self;
}


SeparatorApplet* separator_applet_new (void) {
	return separator_applet_construct (TYPE_SEPARATOR_APPLET);
}


static void separator_applet_class_init (SeparatorAppletClass * klass) {
	separator_applet_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (SeparatorAppletPrivate));
	G_OBJECT_CLASS (klass)->finalize = separator_applet_finalize;
}


static void separator_applet_instance_init (SeparatorApplet * self) {
	self->priv = SEPARATOR_APPLET_GET_PRIVATE (self);
}


static void separator_applet_finalize (GObject* obj) {
	SeparatorApplet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SEPARATOR_APPLET, SeparatorApplet);
	_g_object_unref0 (self->priv->sep);
	G_OBJECT_CLASS (separator_applet_parent_class)->finalize (obj);
}


GType separator_applet_get_type (void) {
	return separator_applet_type_id;
}


GType separator_applet_register_type (GTypeModule * module) {
	static const GTypeInfo g_define_type_info = { sizeof (SeparatorAppletClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) separator_applet_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeparatorApplet), 0, (GInstanceInitFunc) separator_applet_instance_init, NULL };
	separator_applet_type_id = g_type_module_register_type (module, budgie_applet_get_type (), "SeparatorApplet", &g_define_type_info, 0);
	return separator_applet_type_id;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


void peas_register_types (GTypeModule* module) {
	PeasObjectModule* objmodule = NULL;
	GTypeModule* _tmp0_ = NULL;
	PeasObjectModule* _tmp1_ = NULL;
	g_return_if_fail (module != NULL);
	separator_plugin_register_type (module);
	separator_applet_register_type (module);
	_tmp0_ = module;
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, peas_object_module_get_type ()) ? ((PeasObjectModule*) _tmp0_) : NULL);
	objmodule = _tmp1_;
	peas_object_module_register_extension_type (objmodule, budgie_plugin_get_type (), TYPE_SEPARATOR_PLUGIN);
	_g_object_unref0 (objmodule);
}



