/* black.c generated by valac 0.18.0.28-4dffb, the Vala compiler
 * generated from black.vala, do not modify */


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


#define TYPE_BLACK_BOX (black_box_get_type ())
#define BLACK_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BLACK_BOX, BlackBox))
#define BLACK_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BLACK_BOX, BlackBoxClass))
#define IS_BLACK_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BLACK_BOX))
#define IS_BLACK_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BLACK_BOX))
#define BLACK_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BLACK_BOX, BlackBoxClass))

typedef struct _BlackBox BlackBox;
typedef struct _BlackBoxClass BlackBoxClass;
typedef struct _BlackBoxPrivate BlackBoxPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _BlackBox {
	GtkBox parent_instance;
	BlackBoxPrivate * priv;
};

struct _BlackBoxClass {
	GtkBoxClass parent_class;
};


static gpointer black_box_parent_class = NULL;

GType black_box_get_type (void) G_GNUC_CONST;
enum  {
	BLACK_BOX_DUMMY_PROPERTY
};
static gboolean black_box_real_draw (GtkWidget* base, cairo_t* cr);
BlackBox* black_box_new (void);
BlackBox* black_box_construct (GType object_type);
void _vala_main (gchar** args, int args_length1);


static gboolean black_box_real_draw (GtkWidget* base, cairo_t* cr) {
	BlackBox * self;
	gboolean result = FALSE;
	cairo_t* _tmp0_;
	cairo_t* _tmp1_;
	self = (BlackBox*) base;
	g_return_val_if_fail (cr != NULL, FALSE);
	_tmp0_ = cr;
	cairo_set_source_rgb (_tmp0_, 0.0, 0.0, 0.0);
	_tmp1_ = cr;
	cairo_paint (_tmp1_);
	result = FALSE;
	return result;
}


BlackBox* black_box_construct (GType object_type) {
	BlackBox * self = NULL;
	self = (BlackBox*) g_object_new (object_type, NULL);
	return self;
}


BlackBox* black_box_new (void) {
	return black_box_construct (TYPE_BLACK_BOX);
}


static void black_box_class_init (BlackBoxClass * klass) {
	black_box_parent_class = g_type_class_peek_parent (klass);
	GTK_WIDGET_CLASS (klass)->draw = black_box_real_draw;
}


static void black_box_instance_init (BlackBox * self) {
}


GType black_box_get_type (void) {
	static volatile gsize black_box_type_id__volatile = 0;
	if (g_once_init_enter (&black_box_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BlackBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) black_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BlackBox), 0, (GInstanceInitFunc) black_box_instance_init, NULL };
		GType black_box_type_id;
		black_box_type_id = g_type_register_static (GTK_TYPE_BOX, "BlackBox", &g_define_type_info, 0);
		g_once_init_leave (&black_box_type_id__volatile, black_box_type_id);
	}
	return black_box_type_id__volatile;
}


void _vala_main (gchar** args, int args_length1) {
	GdkColor red = {0};
	GdkColor _tmp0_ = {0};
	GtkWindow* _tmp1_;
	GtkWindow* window;
	GdkColor _tmp2_;
	GtkVBox* _tmp3_;
	GtkVBox* box;
	GtkMenuBar* _tmp4_;
	GtkMenuBar* menubar;
	GtkMenuItem* _tmp5_;
	GtkMenuItem* file_item;
	GtkMenu* _tmp6_;
	GtkMenu* file;
	GtkMenuItem* _tmp7_;
	GtkMenuItem* _tmp8_;
	GtkMenuItem* _tmp9_;
	GtkMenuItem* _tmp10_;
	GtkMenuItem* _tmp11_;
	GtkMenuItem* _tmp12_;
	GtkMenuItem* _tmp13_;
	GtkMenuItem* _tmp14_;
	GtkMenuItem* _tmp15_;
	GtkMenuItem* edit_item;
	GtkMenu* _tmp16_;
	GtkMenu* edit;
	GtkMenuItem* _tmp17_;
	GtkMenuItem* _tmp18_;
	GtkMenuItem* _tmp19_;
	GtkMenuItem* _tmp20_;
	GtkMenuItem* _tmp21_;
	GtkMenuItem* _tmp22_;
	GtkMenuItem* _tmp23_;
	GtkMenuItem* view_item;
	GtkMenu* _tmp24_;
	GtkMenu* view;
	GtkCheckMenuItem* _tmp25_;
	GtkCheckMenuItem* _tmp26_;
	GtkMenuItem* _tmp27_;
	GtkMenuItem* help_item;
	GtkMenu* _tmp28_;
	GtkMenu* help;
	GtkMenuItem* _tmp29_;
	GtkMenuItem* _tmp30_;
	GtkMenuItem* _tmp31_;
	GtkMenuItem* _tmp32_;
	BlackBox* _tmp33_;
	BlackBox* _tmp34_;
	gtk_init (&args_length1, &args);
	gdk_color_parse ("red", &_tmp0_);
	red = _tmp0_;
	g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "demo.black", 0, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, NULL)));
	_tmp1_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL);
	g_object_ref_sink (_tmp1_);
	window = _tmp1_;
	gtk_window_set_default_size (window, 400, 300);
	_tmp2_ = red;
	gtk_widget_modify_bg ((GtkWidget*) window, GTK_STATE_NORMAL, &_tmp2_);
	_tmp3_ = (GtkVBox*) gtk_vbox_new (FALSE, 0);
	g_object_ref_sink (_tmp3_);
	box = _tmp3_;
	gtk_container_add ((GtkContainer*) window, (GtkWidget*) box);
	_tmp4_ = (GtkMenuBar*) gtk_menu_bar_new ();
	g_object_ref_sink (_tmp4_);
	menubar = _tmp4_;
	_tmp5_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("File");
	g_object_ref_sink (_tmp5_);
	file_item = _tmp5_;
	_tmp6_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp6_);
	file = _tmp6_;
	gtk_menu_item_set_submenu (file_item, (GtkWidget*) file);
	gtk_container_add ((GtkContainer*) menubar, (GtkWidget*) file_item);
	_tmp7_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("New");
	g_object_ref_sink (_tmp7_);
	_tmp8_ = _tmp7_;
	gtk_container_add ((GtkContainer*) file, (GtkWidget*) _tmp8_);
	_g_object_unref0 (_tmp8_);
	_tmp9_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Open");
	g_object_ref_sink (_tmp9_);
	_tmp10_ = _tmp9_;
	gtk_container_add ((GtkContainer*) file, (GtkWidget*) _tmp10_);
	_g_object_unref0 (_tmp10_);
	_tmp11_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Save");
	g_object_ref_sink (_tmp11_);
	_tmp12_ = _tmp11_;
	gtk_container_add ((GtkContainer*) file, (GtkWidget*) _tmp12_);
	_g_object_unref0 (_tmp12_);
	_tmp13_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Quit");
	g_object_ref_sink (_tmp13_);
	_tmp14_ = _tmp13_;
	gtk_container_add ((GtkContainer*) file, (GtkWidget*) _tmp14_);
	_g_object_unref0 (_tmp14_);
	_tmp15_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Edit");
	g_object_ref_sink (_tmp15_);
	edit_item = _tmp15_;
	_tmp16_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp16_);
	edit = _tmp16_;
	gtk_menu_item_set_submenu (edit_item, (GtkWidget*) edit);
	gtk_container_add ((GtkContainer*) menubar, (GtkWidget*) edit_item);
	_tmp17_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Cut");
	g_object_ref_sink (_tmp17_);
	_tmp18_ = _tmp17_;
	gtk_container_add ((GtkContainer*) edit, (GtkWidget*) _tmp18_);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Copy");
	g_object_ref_sink (_tmp19_);
	_tmp20_ = _tmp19_;
	gtk_container_add ((GtkContainer*) edit, (GtkWidget*) _tmp20_);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Paste");
	g_object_ref_sink (_tmp21_);
	_tmp22_ = _tmp21_;
	gtk_container_add ((GtkContainer*) edit, (GtkWidget*) _tmp22_);
	_g_object_unref0 (_tmp22_);
	_tmp23_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("View");
	g_object_ref_sink (_tmp23_);
	view_item = _tmp23_;
	_tmp24_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp24_);
	view = _tmp24_;
	gtk_menu_item_set_submenu (view_item, (GtkWidget*) view);
	gtk_container_add ((GtkContainer*) menubar, (GtkWidget*) view_item);
	_tmp25_ = (GtkCheckMenuItem*) gtk_check_menu_item_new_with_label ("Fullscreen");
	g_object_ref_sink (_tmp25_);
	_tmp26_ = _tmp25_;
	gtk_container_add ((GtkContainer*) view, (GtkWidget*) _tmp26_);
	_g_object_unref0 (_tmp26_);
	_tmp27_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Help");
	g_object_ref_sink (_tmp27_);
	help_item = _tmp27_;
	_tmp28_ = (GtkMenu*) gtk_menu_new ();
	g_object_ref_sink (_tmp28_);
	help = _tmp28_;
	gtk_menu_item_set_submenu (help_item, (GtkWidget*) help);
	gtk_container_add ((GtkContainer*) menubar, (GtkWidget*) help_item);
	_tmp29_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("Contents");
	g_object_ref_sink (_tmp29_);
	_tmp30_ = _tmp29_;
	gtk_container_add ((GtkContainer*) help, (GtkWidget*) _tmp30_);
	_g_object_unref0 (_tmp30_);
	_tmp31_ = (GtkMenuItem*) gtk_menu_item_new_with_label ("About");
	g_object_ref_sink (_tmp31_);
	_tmp32_ = _tmp31_;
	gtk_container_add ((GtkContainer*) help, (GtkWidget*) _tmp32_);
	_g_object_unref0 (_tmp32_);
	gtk_box_pack_start ((GtkBox*) box, (GtkWidget*) menubar, FALSE, FALSE, (guint) 0);
	_tmp33_ = black_box_new ();
	g_object_ref_sink (_tmp33_);
	_tmp34_ = _tmp33_;
	gtk_box_pack_start ((GtkBox*) box, (GtkWidget*) _tmp34_, TRUE, TRUE, (guint) 0);
	_g_object_unref0 (_tmp34_);
	gtk_widget_show_all ((GtkWidget*) window);
	gtk_main ();
	_g_object_unref0 (help);
	_g_object_unref0 (help_item);
	_g_object_unref0 (view);
	_g_object_unref0 (view_item);
	_g_object_unref0 (edit);
	_g_object_unref0 (edit_item);
	_g_object_unref0 (file);
	_g_object_unref0 (file_item);
	_g_object_unref0 (menubar);
	_g_object_unref0 (box);
	_g_object_unref0 (window);
}


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



