
#include <gtk/gtk.h>

GType
blah_register_type ()
{
	GTypeQuery query;
        GTypeInfo info = {0, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL };
                                                                                
        g_type_query (gtk_menu_item_get_type (), &query);
                                                                                
        info.class_size = query.class_size;
        info.instance_size = query.instance_size;
                                                                                
        return g_type_register_static (gtk_menu_item_get_type (), "BlahMenuItem", &info, 0);
}


int
main (int argc, char *argv[])
{
	GtkWidget *window;
	GtkWidget *shell;
	GtkWidget *item;
	
	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	shell = gtk_menu_bar_new ();

	item = gtk_menu_item_new_with_label ("One");
	gtk_menu_shell_append (GTK_MENU_SHELL (shell), item);

	item = g_object_new (blah_register_type (), NULL);
	gtk_container_add (GTK_CONTAINER (item), gtk_label_new ("Two"));
	gtk_menu_shell_append (GTK_MENU_SHELL (shell), item);
	
	gtk_container_add (GTK_CONTAINER (window), shell);
	gtk_widget_show_all (window);
	
	gtk_main ();
}

