gtk_container_add(GTK_CONTAINER(browser->topLevelWindow), browser->topLevelVBox);
gtk_container_add(GTK_CONTAINER(browser->topLevelWindow), browser->topLevelVBox);  browser->menuBar = gtk_menu_bar_new();  browser->fileMenuItem = gtk_menu_item_new_with_label("File"); browser->fileMenu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM(browser->fileMenuItem), browser->fileMenu);  browser->fileOpenNewBrowser = gtk_menu_item_new_with_label("Open New Browser"); gtk_menu_append(GTK_MENU(browser->fileMenu), browser->fileOpenNewBrowser);  browser->fileStream = gtk_menu_item_new_with_label("Test Stream"); gtk_menu_append(GTK_MENU(browser->fileMenu), browser->fileStream);  browser->fileClose = gtk_menu_item_new_with_label("Close"); gtk_menu_append(GTK_MENU(browser->fileMenu), browser->fileClose);  browser->fileQuit = gtk_menu_item_new_with_label("Quit"); gtk_menu_append(GTK_MENU(browser->fileMenu), browser->fileQuit);   gtk_menu_bar_append(GTK_MENU_BAR(browser->menuBar), browser->fileMenuItem);   gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->menuBar, FALSE, FALSE, 0);
new_gtk_browser(guint32 chromeMask){  TestGtkBrowser *browser = 0;  num_browsers++;  browser = g_new0(TestGtkBrowser, 1);  // create our new toplevel window  browser->topLevelWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);  // new vbox  browser->topLevelVBox = gtk_vbox_new(FALSE, 0);  // add it to the toplevel window  gtk_container_add(GTK_CONTAINER(browser->topLevelWindow), browser->topLevelVBox);  // create the hbox that will contain the toolbar and the url text entry bar  browser->toolbarHBox = gtk_hbox_new(FALSE, 0);  // add that hbox to the vbox  gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->toolbarHBox,		   FALSE, // expand		   FALSE, // fill		   0);    // padding  // new horiz toolbar with buttons + icons  browser->toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL,				     GTK_TOOLBAR_BOTH);  // add it to the hbox  gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->toolbar,		   FALSE, // expand		   FALSE, // fill		   0);    // padding  // new back button  browser->backButton = gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar),						"Back",						"Go Back",						"Go Back",						0, // XXX replace with icon						GTK_SIGNAL_FUNC(back_clicked_cb),						browser);  // new stop button  browser->stopButton = gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar),						"Stop",						"Stop",						"Stop",						0, // XXX replace with icon						GTK_SIGNAL_FUNC(stop_clicked_cb),						browser);  // new forward button  browser->forwardButton = gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar),						   "Forward",						   "Forward",						   "Forward",						   0, // XXX replace with icon						   GTK_SIGNAL_FUNC(forward_clicked_cb),						   browser);  // new reload button  browser->reloadButton = gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar),						  "Reload",						  "Reload",						  "Reload",						  0, // XXX replace with icon						  GTK_SIGNAL_FUNC(reload_clicked_cb),						  browser);  // new stream button  browser->streamButton = gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar),						  "Stream",						  "Stream",						  "Stream",						  0, // XXX replace with icon						  GTK_SIGNAL_FUNC(stream_clicked_cb),						  browser);  // create the url text entry  browser->urlEntry = gtk_entry_new();  // add it to the hbox  gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->urlEntry,		   TRUE, // expand		   TRUE, // fill		   0);    // padding  // create our new gtk moz embed widget  browser->mozEmbed = gtk_moz_embed_new();  // add it to the toplevel vbox  gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->mozEmbed,			   TRUE, // expand			   TRUE, // fill			   0);   // padding  // create the new hbox for the progress area  browser->progressAreaHBox = gtk_hbox_new(FALSE, 0);  // add it to the vbox  gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->progressAreaHBox,		   FALSE, // expand		   FALSE, // fill		   0);   // padding  // create our new progress bar  browser->progressBar = gtk_progress_bar_new();  // add it to the hbox  gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->progressBar,		   FALSE, // expand		   FALSE, // fill		   0);   // padding  // create our status areaa  browser->statusBar = gtk_statusbar_new();  // add it to the hbox  gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->statusBar,		   TRUE, // expand		   TRUE, // fill		   0);   // padding    // by default none of the buttons are marked as sensitive.  gtk_widget_set_sensitive(browser->backButton, FALSE);  gtk_widget_set_sensitive(browser->stopButton, FALSE);  gtk_widget_set_sensitive(browser->forwardButton, FALSE);  gtk_widget_set_sensitive(browser->reloadButton, FALSE);  // catch the destruction of the toplevel window  gtk_signal_connect(GTK_OBJECT(browser->topLevelWindow), "delete_event",		     GTK_SIGNAL_FUNC(delete_cb), browser);  // hook up the activate signal to the right callback  gtk_signal_connect(GTK_OBJECT(browser->urlEntry), "activate",		     GTK_SIGNAL_FUNC(url_activate_cb), browser);  // hook up the location change to update the urlEntry  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "location",		     GTK_SIGNAL_FUNC(location_changed_cb), browser);  // hook up the title change to update the window title  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "title",		     GTK_SIGNAL_FUNC(title_changed_cb), browser);  // hook up the start and stop signals  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_start",		     GTK_SIGNAL_FUNC(load_started_cb), browser);  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_stop",		     GTK_SIGNAL_FUNC(load_finished_cb), browser);  // hook up to the change in network status  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_state",		     GTK_SIGNAL_FUNC(net_state_change_cb), browser);  // hookup to changes in progress  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "progress",		     GTK_SIGNAL_FUNC(progress_change_cb), browser);  // hookup to changes in over-link message  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "link_message",		     GTK_SIGNAL_FUNC(link_message_cb), browser);  // hookup to changes in js status message  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "js_status",		     GTK_SIGNAL_FUNC(js_status_cb), browser);  // hookup to see whenever a new window is requested  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "new_window",		     GTK_SIGNAL_FUNC(new_window_cb), browser);  // hookup to any requested visibility changes  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "visibility",		     GTK_SIGNAL_FUNC(visibility_cb), browser);  // hookup to the signal that says that the browser requested to be  // destroyed  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy_browser",		     GTK_SIGNAL_FUNC(destroy_brsr_cb), browser);  // hookup to the signal that is called when someone clicks on a link  // to load a new uri  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "open_uri",		     GTK_SIGNAL_FUNC(open_uri_cb), browser);  // hookup to when the window is destroyed  gtk_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy",		     GTK_SIGNAL_FUNC(destroy_cb), browser);  // set the chrome type so it's stored in the object  gtk_moz_embed_set_chrome_mask(GTK_MOZ_EMBED(browser->mozEmbed), chromeMask);  return browser;}