2 * Initial main.c file generated by Glade. Edit as required.
3 * Glade will not overwrite this file.
13 #include "interface.h"
15 #include <lttvwindow/mainWindow.h>
16 #include "callbacks.h"
19 systemView * gSysView;
21 typedef void (*call_Event_Selected_Hook)(void * call_data);
22 call_Event_Selected_Hook selected_hook = NULL;
24 view_constructor gConstructor = NULL;
27 main (int argc, char *argv[])
30 GtkWidget * ToolMenuTitle_menu, *insert_view;
32 mainWindow * mw = g_new(mainWindow, 1);
33 gSysView = g_new(systemView, 1);
36 bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
37 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
38 textdomain (GETTEXT_PACKAGE);
42 gtk_init (&argc, &argv);
44 add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
45 add_pixmap_directory ("pixmaps");
46 add_pixmap_directory ("../pixmaps");
49 * The following code was added by Glade to create one of each component
50 * (except popup menus), just so that you see something after building
51 * the project. Delete any components that you don't want shown initially.
53 window1 = create_MWindow ();
54 gtk_widget_show (window1);
56 mw->MWindow = window1;
57 mw->SystemView = gSysView;
59 mw->CurrentTab = NULL;
60 // mw->Attributes = lttv_attributes_new();
64 gm = g_module_open("/home1/yangxx/poly/lttv/modules/libguiEvents.la",0);
65 printf("Main : the address of gm : %d\n", gm);
66 if(!g_module_symbol(gm, "get_constructor", (gpointer)&get_constructor)){
67 g_error("can not get constructor\n");
69 if(!g_module_symbol(gm, "call_Event_Selected_Hook", (gpointer)&selected_hook)){
70 g_error("can not get selected hook\n");
73 gConstructor = get_constructor();
74 ToolMenuTitle_menu = lookup_widget(mw->MWindow,"ToolMenuTitle_menu");
75 insert_view = gtk_menu_item_new_with_mnemonic ("insert_view");
76 gtk_widget_show (insert_view);
77 gtk_container_add (GTK_CONTAINER (ToolMenuTitle_menu), insert_view);
78 g_signal_connect ((gpointer) insert_view, "activate",
79 G_CALLBACK (insertViewTest),
83 gSysView->EventDB = NULL;
84 gSysView->SystemInfo = NULL;
85 gSysView->Options = NULL;
86 gSysView->Window = mw;
87 gSysView->Next = NULL;
89 g_object_set_data(G_OBJECT(window1), "systemView", (gpointer)gSysView);
90 g_object_set_data(G_OBJECT(window1), "mainWindow", (gpointer)mw);