/* * Initial main.c file generated by Glade. Edit as required. * Glade will not overwrite this file. */ #ifdef HAVE_CONFIG_H # include #endif #include #include "interface.h" #include "support.h" #include #include #include #include GtkWidget *GPEBatMon; extern gint timeout_callback_tag; gint update_bat_values(gpointer data); #define TS_DEV "/dev/touchscreen/0raw" int TSfd = 0; int main (int argc, char *argv[]) { GtkWidget *widget; #ifdef ENABLE_NLS bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); textdomain (PACKAGE); #endif gtk_set_locale (); gtk_init (&argc, &argv); add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps"); add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); TSfd=open(TS_DEV, O_RDWR); if (TSfd < 0) { g_print("could not open touchscreen device '%s'\n", TS_DEV); perror("open"); exit(1); }; /* * The following code was added by Glade to create one of each component * (except popup menus), just so that you see something after building * the project. Delete any components that you don't want shown initially. */ GPEBatMon = create_GPEBatMon (); update_bat_values(NULL); timeout_callback_tag=gtk_timeout_add(5000 /*msec*/,update_bat_values,NULL); widget=lookup_widget(GPEBatMon,"MainMenu"); gtk_widget_hide(widget); gtk_widget_show (GPEBatMon); gtk_main (); return 0; }