summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
authorjaortega <jaortega>2001-02-26 23:16:00 +0000
committerjaortega <jaortega>2001-02-26 23:16:00 +0000
commit119a5240f57ded266447b485e5a7c0eec6dd67f8 (patch)
tree4df3fae87486ff21770f07099f213ed7f2efea2c /mixgtk
parentf00a95b117a3db4eed75ce66b9dd6ddb6a54748c (diff)
downloadmdk-119a5240f57ded266447b485e5a7c0eec6dd67f8.tar.gz
mdk-119a5240f57ded266447b485e5a7c0eec6dd67f8.tar.bz2
gtk front-end files
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/.cvsignore4
-rw-r--r--mixgtk/Makefile.am20
-rw-r--r--mixgtk/mixgtk.c49
-rw-r--r--mixgtk/mixgtk.glade1125
-rw-r--r--mixgtk/mixgtk_cmd_dispatcher.c117
-rw-r--r--mixgtk/mixgtk_cmd_dispatcher.h43
-rw-r--r--mixgtk/mixgtk_gen_handlers.c79
-rw-r--r--mixgtk/mixgtk_gen_handlers.h46
-rw-r--r--mixgtk/mixgtk_widgets.c71
-rw-r--r--mixgtk/mixgtk_widgets.h75
10 files changed, 1629 insertions, 0 deletions
diff --git a/mixgtk/.cvsignore b/mixgtk/.cvsignore
new file mode 100644
index 0000000..a285cd3
--- /dev/null
+++ b/mixgtk/.cvsignore
@@ -0,0 +1,4 @@
+.deps
+Makefile
+Makefile.in
+mixgtk
diff --git a/mixgtk/Makefile.am b/mixgtk/Makefile.am
new file mode 100644
index 0000000..bb1881f
--- /dev/null
+++ b/mixgtk/Makefile.am
@@ -0,0 +1,20 @@
+## Process this file with automake to produce Makefile.in
+
+# Copyright (C) 2001 Free Software Foundation, Inc.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+EXTRA_DIST = mixgtk.glade
+INCLUDES = -I$(includedir)
+LDADD = $(top_builddir)/mixlib/libmix.a
+
+bin_PROGRAMS = mixgtk
+mixgtk_SOURCES = mixgtk.c mixgtk_gen_handlers.h mixgtk_gen_handlers.c \
+ mixgtk_cmd_dispatcher.h mixgtk_cmd_dispatcher.c \
+ mixgtk_widgets.h mixgtk_widgets.c
diff --git a/mixgtk/mixgtk.c b/mixgtk/mixgtk.c
new file mode 100644
index 0000000..368f392
--- /dev/null
+++ b/mixgtk/mixgtk.c
@@ -0,0 +1,49 @@
+/* -*-c-*- -------------- mixgtk.c :
+ * Main function of the mix gtk front-end
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: "01/02/26 02:54:24 jose"
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "mixgtk_widgets.h"
+#include "mixgtk_cmd_dispatcher.h"
+
+int
+main(int argc, char *argv[])
+{
+ const gchar *glade_file = "mixgtk.glade";
+
+ gtk_init(&argc, &argv);
+
+ if (!mixgtk_widget_factory_init (glade_file)) {
+ g_error ("Unable to initialise application (using %s)\n", glade_file);
+ return EXIT_FAILURE;
+ }
+
+ if (!mixgtk_cmd_dispatcher_init ()) {
+ g_error ("Unable to initialise application\n");
+ return EXIT_FAILURE;
+ }
+
+ gtk_main();
+
+ return EXIT_SUCCESS;
+}
diff --git a/mixgtk/mixgtk.glade b/mixgtk/mixgtk.glade
new file mode 100644
index 0000000..0100ad4
--- /dev/null
+++ b/mixgtk/mixgtk.glade
@@ -0,0 +1,1125 @@
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+ <name>mixgtk</name>
+ <program_name>mixgtk</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>pixmaps</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>False</gnome_support>
+ <gettext_support>True</gettext_support>
+ <use_widget_names>True</use_widget_names>
+</project>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>main_window</name>
+ <signal>
+ <name>destroy</name>
+ <handler>on_main_window_destroy</handler>
+ <last_modification_time>Tue, 20 Feb 2001 21:58:29 GMT</last_modification_time>
+ </signal>
+ <title>mixgtk</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>650</default_width>
+ <default_height>500</default_height>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>True</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>main_vbox</name>
+ <border_width>2</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GtkMenuBar</class>
+ <name>mainmenubar</name>
+ <shadow_type>GTK_SHADOW_OUT</shadow_type>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>file</name>
+ <label>_File</label>
+ <right_justify>False</right_justify>
+
+ <widget>
+ <class>GtkMenu</class>
+ <name>file_menu</name>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>file_open</name>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_F3</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_file_open_activate</handler>
+ <last_modification_time>Tue, 20 Feb 2001 22:37:58 GMT</last_modification_time>
+ </signal>
+ <label>_Open...</label>
+ <right_justify>False</right_justify>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>file_exit</name>
+ <accelerator>
+ <modifiers>GDK_MOD1_MASK</modifiers>
+ <key>GDK_Q</key>
+ <signal>activate</signal>
+ </accelerator>
+ <signal>
+ <name>activate</name>
+ <handler>on_file_exit_activate</handler>
+ <last_modification_time>Tue, 20 Feb 2001 22:37:58 GMT</last_modification_time>
+ </signal>
+ <label>_Exit</label>
+ <right_justify>False</right_justify>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkMenuItem</class>
+ <name>debug</name>
+ <label>_Debug</label>
+ <right_justify>False</right_justify>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkToolbar</class>
+ <name>main_toolbar</name>
+ <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
+ <type>GTK_TOOLBAR_ICONS</type>
+ <space_size>5</space_size>
+ <space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ <tooltips>True</tooltips>
+ <child>
+ <padding>1</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>inner_vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>main_notebook</name>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>mixvm_widget</name>
+ <border_width>10</border_width>
+ <width>375</width>
+ <height>287</height>
+
+ <widget>
+ <class>GtkCList</class>
+ <name>cells_clist</name>
+ <x>128</x>
+ <y>64</y>
+ <width>225</width>
+ <height>208</height>
+ <can_focus>True</can_focus>
+ <columns>2</columns>
+ <column_widths>80,80</column_widths>
+ <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+ <show_titles>True</show_titles>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label95</name>
+ <label>address</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label96</name>
+ <label>contents</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rJ_entry</name>
+ <x>40</x>
+ <y>48</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>- 00 23</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rA_entry</name>
+ <x>40</x>
+ <y>8</y>
+ <width>118</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>+ 01 45 34 49 49</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rX_entry</name>
+ <x>232</x>
+ <y>8</y>
+ <width>118</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI2_entry</name>
+ <x>40</x>
+ <y>120</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI1_entry</name>
+ <x>40</x>
+ <y>88</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI3_entry</name>
+ <x>40</x>
+ <y>152</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI4_entry</name>
+ <x>40</x>
+ <y>184</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI5_entry</name>
+ <x>40</x>
+ <y>216</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rI6_entry</name>
+ <x>40</x>
+ <y>248</y>
+ <width>60</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label99</name>
+ <x>8</x>
+ <y>50</y>
+ <width>31</width>
+ <height>16</height>
+ <label>J</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label100</name>
+ <x>8</x>
+ <y>91</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I1</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label101</name>
+ <x>8</x>
+ <y>124</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I2</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label102</name>
+ <x>8</x>
+ <y>155</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I3</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label103</name>
+ <x>8</x>
+ <y>187</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I4</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label104</name>
+ <x>8</x>
+ <y>219</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I5</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label105</name>
+ <x>8</x>
+ <y>251</y>
+ <width>31</width>
+ <height>16</height>
+ <label>I6</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>devices_notebook</name>
+ <x>380</x>
+ <y>10</y>
+ <width>252</width>
+ <height>262</height>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow45</name>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+
+ <widget>
+ <class>GtkText</class>
+ <name>text37</name>
+ <can_focus>True</can_focus>
+ <editable>False</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label156</name>
+ <label>term</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow46</name>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+
+ <widget>
+ <class>GtkText</class>
+ <name>text38</name>
+ <can_focus>True</can_focus>
+ <editable>False</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label157</name>
+ <label>disk1</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow47</name>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+
+ <widget>
+ <class>GtkText</class>
+ <name>text39</name>
+ <can_focus>True</can_focus>
+ <editable>False</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label158</name>
+ <label>paper</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkVSeparator</class>
+ <name>vseparator1</name>
+ <x>360</x>
+ <y>8</y>
+ <width>16</width>
+ <height>264</height>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label97</name>
+ <x>8</x>
+ <y>12</y>
+ <width>31</width>
+ <height>16</height>
+ <label>A</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label98</name>
+ <x>200</x>
+ <y>11</y>
+ <width>31</width>
+ <height>16</height>
+ <label>X</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>lesser_radio</name>
+ <x>136</x>
+ <y>40</y>
+ <width>35</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <label>L</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>equal_radio</name>
+ <x>176</x>
+ <y>40</y>
+ <width>31</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <label>E</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>greater_radio</name>
+ <x>216</x>
+ <y>40</y>
+ <width>32</width>
+ <height>24</height>
+ <can_focus>True</can_focus>
+ <label>G</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>over_radio</name>
+ <x>279</x>
+ <y>45</y>
+ <width>76</width>
+ <height>14</height>
+ <can_focus>True</can_focus>
+ <label>Overflow</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label105</name>
+ <label>MIX</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox2</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow26</name>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>mixal_text</name>
+ <can_focus>True</can_focus>
+ <editable>False</editable>
+ <text>*** sample program
+ ORG 2000
+START LDA 1000
+....</text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow27</name>
+ <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkCList</class>
+ <name>prog_info_clist</name>
+ <can_focus>True</can_focus>
+ <columns>3</columns>
+ <column_widths>80,173,80</column_widths>
+ <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+ <show_titles>True</show_titles>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label110</name>
+ <label>address</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label111</name>
+ <label>translation</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label112</name>
+ <label>binary</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label106</name>
+ <label>MIXAL</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow25</name>
+ <border_width>2</border_width>
+ <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkViewport</class>
+ <name>viewport1</name>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>prompt_vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow48</name>
+ <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkText</class>
+ <name>command_log</name>
+ <can_focus>True</can_focus>
+ <editable>False</editable>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>command_prompt</name>
+ <tooltip>Enter MIXVM command here</tooltip>
+ <can_focus>True</can_focus>
+ <signal>
+ <name>activate</name>
+ <handler>on_mixvm_cmd_entry_activate</handler>
+ <last_modification_time>Thu, 22 Feb 2001 23:26:28 GMT</last_modification_time>
+ </signal>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkStatusbar</class>
+ <name>main_statusbar</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkDialog</class>
+ <name>word_dialog</name>
+ <visible>False</visible>
+ <title>Enter word</title>
+ <type>GTK_WINDOW_DIALOG</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>True</modal>
+ <default_width>250</default_width>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>False</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>Dialog:vbox</child_name>
+ <name>dialog-vbox5</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkHBox</class>
+ <child_name>Dialog:action_area</child_name>
+ <name>dialog-action_area5</name>
+ <border_width>10</border_width>
+ <width>250</width>
+ <homogeneous>True</homogeneous>
+ <spacing>5</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox5</name>
+ <width>250</width>
+ <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
+ <spacing>30</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button11</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>Reset</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button12</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>OK</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button13</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>Cancel</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkFixed</class>
+ <name>fixed3</name>
+ <width>250</width>
+ <height>97</height>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry31</name>
+ <x>88</x>
+ <y>32</y>
+ <width>143</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>-63</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry34</name>
+ <x>136</x>
+ <y>64</y>
+ <width>22</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>00</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry35</name>
+ <x>160</x>
+ <y>64</y>
+ <width>22</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>01</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry38</name>
+ <x>160</x>
+ <y>64</y>
+ <width>22</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>00</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry39</name>
+ <x>184</x>
+ <y>64</y>
+ <width>22</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>00</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry41</name>
+ <x>208</x>
+ <y>64</y>
+ <width>22</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>63</text>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label60</name>
+ <x>16</x>
+ <y>34</y>
+ <width>67</width>
+ <height>20</height>
+ <label>Decimal</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry40</name>
+ <x>112</x>
+ <y>64</y>
+ <width>22</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>00</text>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry42</name>
+ <x>88</x>
+ <y>64</y>
+ <width>16</width>
+ <height>22</height>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>-</text>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label61</name>
+ <x>22</x>
+ <y>67</y>
+ <width>41</width>
+ <height>16</height>
+ <label>Bytes</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label63</name>
+ <x>152</x>
+ <y>8</y>
+ <width>80</width>
+ <height>16</height>
+ <label>Register A</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label62</name>
+ <x>48</x>
+ <y>8</y>
+ <width>104</width>
+ <height>16</height>
+ <label>Enter word for:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+</GTK-Interface>
diff --git a/mixgtk/mixgtk_cmd_dispatcher.c b/mixgtk/mixgtk_cmd_dispatcher.c
new file mode 100644
index 0000000..c5fef58
--- /dev/null
+++ b/mixgtk/mixgtk_cmd_dispatcher.c
@@ -0,0 +1,117 @@
+/* -*-c-*- -------------- mixgtk_cmd_dispatcher.c :
+ * Implementation of the functions declared in mixgtk_cmd_dispatcher.h
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: "01/02/26 03:15:18 jose"
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#define _GNU_SOURCE 1
+
+#include <stdio.h>
+#include <mixlib/mix_vm_command.h>
+#include "mixgtk_cmd_dispatcher.h"
+
+/* a mix vm command dispatcher */
+struct mixgtk_dispatch_
+{
+ mix_vm_cmd_dispatcher_t *dispatcher;
+ FILE *out;
+ char *out_buffer;
+ size_t out_buffer_size;
+ GtkWidget *prompt;
+ GtkWidget *log;
+};
+
+static struct mixgtk_dispatch_ dis_data_ = {NULL};
+
+/* global hooks for the command dispatcher */
+static void
+global_pre_hook_ (mix_vm_cmd_dispatcher_t *dis,
+ mix_vm_command_t cmd, const gchar *arg, gpointer data)
+{
+ if (cmd < MIX_CMD_INVALID)
+ {
+ gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL,
+ "MIX> ", -1);
+ gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL,
+ mix_vm_command_to_string (cmd), -1);
+ gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL,
+ " ", -1);
+ gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL,
+ arg, -1);
+ gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL,
+ "\n", -1);
+ }
+ else
+ {
+ gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL,
+ _("*** Invalid command\n"), -1);
+ }
+}
+
+static void
+global_post_hook_ (mix_vm_cmd_dispatcher_t *dis,
+ mix_vm_command_t cmd, const gchar *arg, gpointer data)
+{
+ fflush (dis_data_.out);
+ if (cmd < MIX_CMD_INVALID)
+ {
+ gtk_text_insert (GTK_TEXT (dis_data_.log), NULL, NULL, NULL,
+ dis_data_.out_buffer, dis_data_.out_buffer_size);
+ }
+ rewind (dis_data_.out);
+}
+
+
+/* initialise the command dispatcher */
+gboolean
+mixgtk_cmd_dispatcher_init (void)
+{
+ if (!dis_data_.prompt)
+ {
+ dis_data_.prompt = mixgtk_widget_factory_get (MIXGTK_WIDGET_PROMPT);
+ if (!dis_data_.prompt) return FALSE;
+ dis_data_.log = mixgtk_widget_factory_get (MIXGTK_WIDGET_LOG);
+ if (!dis_data_.log) return FALSE;
+ }
+
+ if (!dis_data_.dispatcher)
+ {
+ FILE *out = open_memstream (&(dis_data_.out_buffer),
+ &(dis_data_.out_buffer_size));
+ if (!out) return FALSE;
+ dis_data_.out = out;
+ dis_data_.dispatcher = mix_vm_cmd_dispatcher_new (out, out);
+ mix_vm_cmd_dispatcher_global_pre_hook(dis_data_.dispatcher,
+ global_pre_hook_, NULL);
+ mix_vm_cmd_dispatcher_global_post_hook(dis_data_.dispatcher,
+ global_post_hook_, NULL);
+ }
+ return TRUE;
+}
+
+/* process new command */
+void
+on_mixvm_cmd_entry_activate (GtkWidget *w, gpointer e)
+{
+ gchar *text;
+ text = gtk_entry_get_text (GTK_ENTRY (w));
+ mix_vm_cmd_dispatcher_dispatch_text (dis_data_.dispatcher, text);
+ gtk_entry_set_text (GTK_ENTRY (w), "");
+}
diff --git a/mixgtk/mixgtk_cmd_dispatcher.h b/mixgtk/mixgtk_cmd_dispatcher.h
new file mode 100644
index 0000000..0169a5d
--- /dev/null
+++ b/mixgtk/mixgtk_cmd_dispatcher.h
@@ -0,0 +1,43 @@
+/* -*-c-*- ---------------- mixgtk_cmd_dispatcher.h :
+ * functions to access the command dispatcher
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: <01/02/25 17:24:28 jose>
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef MIXGTK_CMD_DISPATCHER_H
+#define MIXGTK_CMD_DISPATCHER_H
+
+#include "mixgtk_widgets.h"
+
+/* initialise the command dispatcher */
+extern gboolean
+mixgtk_cmd_dispatcher_init ();
+
+
+/* make gtk signal callbacks accessible to glade */
+/* new command handler */
+extern void
+on_mixvm_cmd_entry_activate (GtkWidget *w, gpointer e);
+
+
+
+#endif /* MIXGTK_CMD_DISPATCHER_H */
+
diff --git a/mixgtk/mixgtk_gen_handlers.c b/mixgtk/mixgtk_gen_handlers.c
new file mode 100644
index 0000000..e472341
--- /dev/null
+++ b/mixgtk/mixgtk_gen_handlers.c
@@ -0,0 +1,79 @@
+/* -*-c-*- -------------- mixgtk_gen_handlers.c :
+ * Implementation of the functions declared in mixgtk_gen_handlers.h
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: "01/02/23 00:36:31 jose"
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#include "mixgtk_gen_handlers.h"
+
+void
+on_main_window_destroy (GtkWidget *w, gpointer data)
+{
+ gtk_main_quit ();
+}
+
+static void
+on_file_open_ok_ (GtkWidget *w, gpointer fs)
+{
+ const gchar *file = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs));
+ g_print ("File %s selected\n", file);
+ gtk_widget_destroy (GTK_WIDGET (fs));
+}
+
+static void
+on_file_open_destroy_ (GtkWidget *w, gpointer data)
+{
+ gtk_grab_remove (GTK_WIDGET (w));
+}
+
+void
+on_file_open_activate (GtkWidget *w, gpointer data)
+{
+ GtkWidget *file = gtk_file_selection_new ("Open program");
+ gtk_signal_connect (GTK_OBJECT (file), "destroy",
+ (GtkSignalFunc) on_file_open_destroy_,
+ GTK_OBJECT (file));
+ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file)->ok_button),
+ "clicked", (GtkSignalFunc) on_file_open_ok_,
+ GTK_OBJECT (file));
+ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
+ (file)->cancel_button),
+ "clicked", (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT (file));
+ gtk_widget_show (file);
+ gtk_grab_add (file);
+}
+
+void
+on_file_exit_activate (GtkWidget *w, gpointer data)
+{
+ g_message ("File_exit activated");
+ gtk_main_quit ();
+}
+
+void
+on_debug_activate (GtkWidget *w, gpointer data)
+{
+}
+
+
+
+
diff --git a/mixgtk/mixgtk_gen_handlers.h b/mixgtk/mixgtk_gen_handlers.h
new file mode 100644
index 0000000..e1aed47
--- /dev/null
+++ b/mixgtk/mixgtk_gen_handlers.h
@@ -0,0 +1,46 @@
+/* -*-c-*- ---------------- mixgtk_gen_handlers.h :
+ * general signal handlers declarations
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: <01/02/23 00:36:35 jose>
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef MIXGTK_GEN_HANDLERS_H
+#define MIXGTK_GEN_HANDLERS_H
+
+#include <gtk/gtk.h>
+
+extern void
+on_main_window_destroy (GtkWidget *w, gpointer data);
+
+extern void
+on_file_open_activate (GtkWidget *w, gpointer data);
+
+extern void
+on_file_exit_activate (GtkWidget *w, gpointer data);
+
+extern void
+on_debug_activate (GtkWidget *w, gpointer data);
+
+
+
+
+#endif /* MIXGTK_GEN_HANDLERS_H */
+
diff --git a/mixgtk/mixgtk_widgets.c b/mixgtk/mixgtk_widgets.c
new file mode 100644
index 0000000..aa06643
--- /dev/null
+++ b/mixgtk/mixgtk_widgets.c
@@ -0,0 +1,71 @@
+/* -*-c-*- -------------- mixgtk_widgets.c :
+ * Implementation of the functions declared in mixgtk_widgets.h
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: "01/02/26 02:57:02 jose"
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#include "mixgtk_widgets.h"
+
+#include <glade/glade.h>
+
+/* the glade spec */
+static GladeXML *xml_ = NULL;
+
+/* widget names */
+static const gchar *names_[] = {
+ "main_window",
+ "word_dialog",
+ "command_prompt",
+ "command_log"
+};
+
+#define WIDGET_NO_ (sizeof (names_) / sizeof (names_[0]))
+
+/* create a new factory from an xml glade file */
+gboolean
+mixgtk_widget_factory_init (const char *glade_file)
+{
+ glade_init ();
+ xml_ = glade_xml_new (glade_file, NULL);
+ if (!xml_) return FALSE;
+ glade_xml_signal_autoconnect (xml_);
+ return TRUE;
+}
+
+/* get a widget */
+GtkWidget *
+mixgtk_widget_factory_get (mixgtk_widget_id_t widget)
+{
+ g_return_val_if_fail (widget < WIDGET_NO_, NULL);
+ return glade_xml_get_widget (xml_, names_[widget]);
+}
+
+/* update a widget from a virtual machine */
+extern void
+mixgtk_widget_factory_update_widget (mixgtk_widget_id_t widget,
+ const mix_vm_t *vm);
+
+/* update the virtual machine from a widget */
+extern void
+mixgtk_widget_factory_update_vm (mixgtk_widget_id_t widget,
+ mix_vm_t *vm);
+
+
diff --git a/mixgtk/mixgtk_widgets.h b/mixgtk/mixgtk_widgets.h
new file mode 100644
index 0000000..60781e4
--- /dev/null
+++ b/mixgtk/mixgtk_widgets.h
@@ -0,0 +1,75 @@
+/* -*-c-*- ---------------- mixgtk_widgets.h :
+ * glade-based factory of mixvm widgets
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: <01/02/25 12:51:58 jose>
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#ifndef MIXGTK_WIDGETS_H
+#define MIXGTK_WIDGETS_H
+
+#include <gtk/gtk.h>
+#include <mixlib/mix_vm.h>
+
+/* enumeration of mixvm widget ids */
+typedef enum {
+ MIXGTK_WIDGET_MAIN, /* main app window */
+ MIXGTK_WIDGET_WORD_DIALOG, /* input dialog for a mix word */
+ MIXGTK_WIDGET_PROMPT, /* command prompt */
+ MIXGTK_WIDGET_LOG, /* command output */
+ MIXGTK_WIDGET_rA,
+ MIXGTK_WIDGET_rX,
+ MIXGTK_WIDGET_rJ,
+ MIXGTK_WIDGET_rI1,
+ MIXGTK_WIDGET_rI2,
+ MIXGTK_WIDGET_rI3,
+ MIXGTK_WIDGET_rI4,
+ MIXGTK_WIDGET_rI5,
+ MIXGTK_WIDGET_rI6,
+ MIXGTK_WIDGET_CMP,
+ MIXGTK_WIDGET_OVER,
+ MIXGTK_WIDGET_CELLS,
+ MIXGTK_WIDGET_DEVICE,
+ MIXGTK_WIDGET_NONE
+} mixgtk_widget_id_t;
+
+
+/* create a new factory from an xml glade file */
+extern gboolean
+mixgtk_widget_factory_init (const char *glade_file);
+
+
+/* get a widget */
+extern GtkWidget *
+mixgtk_widget_factory_get (mixgtk_widget_id_t widget);
+
+/* update a widget from a virtual machine */
+extern void
+mixgtk_widget_factory_update_widget (mixgtk_widget_id_t widget,
+ const mix_vm_t *vm);
+
+/* update the virtual machine from a widget */
+extern void
+mixgtk_widget_factory_update_vm (mixgtk_widget_id_t widget,
+ mix_vm_t *vm);
+
+
+#endif /* MIXGTK_WIDGETS_H */
+