Se, per un motivo o per un altro, state cercando un modo per nascondere il file xml con estensione ".glade", ovvero cercate di nascondere l'interfaccia grafica e il suo sorgente, un modo è quello di inserire la vostra interfaccia grafica in un file di inclusione (.h), e poi richiamarla con un apposito comando.
Esempio: file "ui.h":
char *uistr = "<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->"
"<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">"
""
"<glade-interface>"
""
"<widget class="GtkWindow" id="window1">"
" <property name="visible">True</property>"
" <property name="title" translatable="yes">window1</property>"
" <property name="type">GTK_WINDOW_TOPLEVEL</property>"
" <property name="window_position">GTK_WIN_POS_NONE</property>"
" <property name="modal">False</property>"
" <property name="default_width">500</property>"
" <property name="default_height">400</property>"
" <property name="resizable">True</property>"
" <property name="destroy_with_parent">False</property>"
" "
" <child>"
" <placeholder/>"
" </child>"
" </widget>"
" </glade-interface>"
" ";
/* Created by Anjuta version 1.2.4a */
/* This file will not be overwritten */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gnome.h>
#include <glade/glade.h>
#include "ui.h"
int main (int argc, char *argv[])
{
GtkWidget *window1;
GladeXML *xml;
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
textdomain (PACKAGE);
#endif
gnome_init (PACKAGE, VERSION, argc, argv);
glade_gnome_init ();
/*
* The .glade filename should be on the next line.
*/
//xml = glade_xml_new (PACKAGE_SOURCE_DIR"/ceiling_gui.glade", NULL, NULL);
xml = glade_xml_new_from_buffer(uistr,strlen(uistr),"window1", NULL);
/* This is important */
glade_xml_signal_autoconnect (xml);
window1 = glade_xml_get_widget (xml, "window1");
gtk_widget_show (window1);
gtk_main ();
return 0;
}