summaryrefslogtreecommitdiffstats
path: root/gui/main.c
diff options
context:
space:
mode:
authorpancake <pancake@dazo>2007-06-02 05:32:43 +0200
committerpancake <pancake@dazo>2007-06-02 05:32:43 +0200
commit43d8d4591933762cec4e0f72d434aa47311419d3 (patch)
treea784a16d3debb2590b63af9be904ecaeac767fec /gui/main.c
parentf299486ef9ee5531ebee567211eb7861ae7a93bf (diff)
download0xFFFF-43d8d4591933762cec4e0f72d434aa47311419d3.tar.bz2
* Initial import of the offline work of the GUI environment
- Not yet usable, it's just a sketch with glade O:) - But you can get fun hacking on the source! * Add deinstall target to the Makefile * Add INSTALL file for build & install instructions * Add documentation for local flashing.
Diffstat (limited to 'gui/main.c')
-rw-r--r--gui/main.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gui/main.c b/gui/main.c
new file mode 100644
index 0000000..1f0c20b
--- /dev/null
+++ b/gui/main.c
@@ -0,0 +1,31 @@
+#include <glade/glade.h>
+#include <gtk/gtk.h>
+
+#define U(x) printf("%d\n",x); fflush(stdout);
+
+int main(int argc, char **argv)
+{
+ GtkWidget *w;
+ GladeXML *xml;
+
+ gtk_init(&argc, &argv);
+
+ xml = glade_xml_new("g0xFFFF.glade", "main_window", "");
+ //xml = glade_xml_new("test.glade", "window1", NULL);
+ if(!xml) {
+ g_warning("We could not load the interface!");
+ return 1;
+ }
+
+ glade_xml_signal_autoconnect(xml);
+
+ w = glade_xml_get_widget(xml, "main_window");
+ gtk_signal_connect(GTK_OBJECT(w), "destroy",
+ GTK_SIGNAL_FUNC(gtk_main_quit),NULL);
+ gtk_widget_show_all(w);
+
+ gtk_object_unref(GTK_OBJECT(xml));
+
+ gtk_main();
+ return 0;
+}