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

/*  This file is part of corebird, a Gtk+ linux Twitter client.
 *  Copyright (C) 2013 Timm Bäder
 *
 *  corebird 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.
 *
 *  corebird 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 corebird.  If not, see <http://www.gnu.org/licenses/>.
 */

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


#define TYPE_ADD_LIST_ENTRY (add_list_entry_get_type ())
#define ADD_LIST_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADD_LIST_ENTRY, AddListEntry))
#define ADD_LIST_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADD_LIST_ENTRY, AddListEntryClass))
#define IS_ADD_LIST_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADD_LIST_ENTRY))
#define IS_ADD_LIST_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADD_LIST_ENTRY))
#define ADD_LIST_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADD_LIST_ENTRY, AddListEntryClass))

typedef struct _AddListEntry AddListEntry;
typedef struct _AddListEntryClass AddListEntryClass;
typedef struct _AddListEntryPrivate AddListEntryPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _AddListEntry {
	GtkListBoxRow parent_instance;
	AddListEntryPrivate * priv;
};

struct _AddListEntryClass {
	GtkListBoxRowClass parent_class;
};


static gpointer add_list_entry_parent_class = NULL;

GType add_list_entry_get_type (void) G_GNUC_CONST;
enum  {
	ADD_LIST_ENTRY_DUMMY_PROPERTY
};
AddListEntry* add_list_entry_new (const gchar* label);
AddListEntry* add_list_entry_construct (GType object_type, const gchar* label);


AddListEntry* add_list_entry_construct (GType object_type, const gchar* label) {
	AddListEntry * self = NULL;
	GtkBox* box = NULL;
	GtkBox* _tmp0_ = NULL;
	GtkImage* img = NULL;
	GtkImage* _tmp1_ = NULL;
	GtkLabel* l = NULL;
	const gchar* _tmp2_ = NULL;
	GtkLabel* _tmp3_ = NULL;
	g_return_val_if_fail (label != NULL, NULL);
	self = (AddListEntry*) g_object_new (object_type, NULL);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp0_);
	box = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_DIALOG);
	g_object_ref_sink (_tmp1_);
	img = _tmp1_;
	gtk_image_set_pixel_size (img, 32);
	gtk_widget_set_margin_start (G_TYPE_CHECK_INSTANCE_CAST (img, gtk_widget_get_type (), GtkWidget), 10);
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (img, gtk_widget_get_type (), GtkWidget), TRUE);
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (img, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_END);
	gtk_box_pack_start (box, G_TYPE_CHECK_INSTANCE_CAST (img, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	_tmp2_ = label;
	_tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_);
	g_object_ref_sink (_tmp3_);
	l = _tmp3_;
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (l, gtk_widget_get_type (), GtkWidget), TRUE);
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (l, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
	gtk_box_pack_start (box, G_TYPE_CHECK_INSTANCE_CAST (l, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0);
	gtk_widget_set_margin_bottom (G_TYPE_CHECK_INSTANCE_CAST (box, gtk_widget_get_type (), GtkWidget), 4);
	gtk_widget_set_margin_top (G_TYPE_CHECK_INSTANCE_CAST (box, gtk_widget_get_type (), GtkWidget), 4);
	gtk_container_add (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_container_get_type (), GtkContainer), G_TYPE_CHECK_INSTANCE_CAST (box, gtk_widget_get_type (), GtkWidget));
	_g_object_unref0 (l);
	_g_object_unref0 (img);
	_g_object_unref0 (box);
	return self;
}


AddListEntry* add_list_entry_new (const gchar* label) {
	return add_list_entry_construct (TYPE_ADD_LIST_ENTRY, label);
}


static void add_list_entry_class_init (AddListEntryClass * klass) {
	add_list_entry_parent_class = g_type_class_peek_parent (klass);
}


static void add_list_entry_instance_init (AddListEntry * self) {
}


GType add_list_entry_get_type (void) {
	static volatile gsize add_list_entry_type_id__volatile = 0;
	if (g_once_init_enter (&add_list_entry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AddListEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) add_list_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AddListEntry), 0, (GInstanceInitFunc) add_list_entry_instance_init, NULL };
		GType add_list_entry_type_id;
		add_list_entry_type_id = g_type_register_static (gtk_list_box_row_get_type (), "AddListEntry", &g_define_type_info, 0);
		g_once_init_leave (&add_list_entry_type_id__volatile, add_list_entry_type_id);
	}
	return add_list_entry_type_id__volatile;
}



