2 * Copyright © 2009 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20 static void usage(void) {
21 printf("aoview [--device|-d device_file]");
25 static void destroy_event(GtkWidget *widget, gpointer data)
30 int main(int argc, char **argv)
33 GtkWidget *mainwindow;
35 GtkAboutDialog *about_dialog;
37 static struct option long_options[] = {
38 { "device", 1, 0, 'd'},
44 c = getopt_long_only(argc, argv, "d:", long_options, &temp);
57 gtk_init(&argc, &argv);
60 xml = glade_xml_new("aoview.glade", NULL, NULL);
61 /* connect the signals in the interface */
62 glade_xml_signal_autoconnect(xml);
64 /* Hook up the close button. */
65 mainwindow = glade_xml_get_widget(xml, "aoview");
68 g_signal_connect (G_OBJECT(mainwindow), "destroy",
69 G_CALLBACK(destroy_event), NULL);
71 about_dialog = GTK_ABOUT_DIALOG(glade_xml_get_widget(xml, "about_dialog"));
73 gtk_about_dialog_set_version(about_dialog, AOVIEW_VERSION);
75 aoview_dev_dialog_init(xml);
77 aoview_state_init(xml);
81 aoview_table_init(xml);