Fix tar.gz build by removing legacy include to ltt directory
[lttv.git] / lttv / modules / gui / lttvwindow / lttvwindow / test_main.c
1 /*
2 * Initial main.c file generated by Glade. Edit as required.
3 * Glade will not overwrite this file.
4 */
5
6 #ifdef HAVE_CONFIG_H
7 # include <config.h>
8 #endif
9
10 #include <gtk/gtk.h>
11 #include <gmodule.h>
12
13 #include "interface.h"
14 #include "support.h"
15 #include <lttvwindow/mainWindow.h>
16 #include "callbacks.h"
17
18 /* global variable */
19 systemView * gSysView;
20
21 typedef void (*call_Event_Selected_Hook)(void * call_data);
22 call_Event_Selected_Hook selected_hook = NULL;
23 GModule *gm;
24 view_constructor gConstructor = NULL;
25
26 int
27 main (int argc, char *argv[])
28 {
29 GModule *gm;
30 GtkWidget * ToolMenuTitle_menu, *insert_view;
31 GtkWidget *window1;
32 mainWindow * mw = g_new(mainWindow, 1);
33 gSysView = g_new(systemView, 1);
34
35 #ifdef ENABLE_NLS
36 bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
37 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
38 textdomain (GETTEXT_PACKAGE);
39 #endif
40
41 gtk_set_locale ();
42 gtk_init (&argc, &argv);
43
44 add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
45 add_pixmap_directory ("pixmaps");
46 add_pixmap_directory ("../pixmaps");
47
48 /*
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.
52 */
53 window1 = create_MWindow ();
54 gtk_widget_show (window1);
55
56 mw->MWindow = window1;
57 mw->SystemView = gSysView;
58 mw->Tab = NULL;
59 mw->CurrentTab = NULL;
60 // mw->Attributes = lttv_attributes_new();
61
62 //test
63
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");
68 }
69 if(!g_module_symbol(gm, "call_Event_Selected_Hook", (gpointer)&selected_hook)){
70 g_error("can not get selected hook\n");
71 }
72
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),
80 NULL);
81 //end
82
83 gSysView->EventDB = NULL;
84 gSysView->SystemInfo = NULL;
85 gSysView->Options = NULL;
86 gSysView->Window = mw;
87 gSysView->Next = NULL;
88
89 g_object_set_data(G_OBJECT(window1), "systemView", (gpointer)gSysView);
90 g_object_set_data(G_OBJECT(window1), "mainWindow", (gpointer)mw);
91
92 gtk_main ();
93 return 0;
94 }
95
This page took 0.030578 seconds and 4 git commands to generate.