2 * Main window (main module) is the place to contain and display viewers.
3 * Viewers (lttv modules) interacter with main window though API of the
4 * main window and hooks of itself.
5 * This header file should be included in each graphic module.
10 #include <lttv/hook.h>
13 * Function to register a view constructor so that main window can generate
14 * a toolbar item for the viewer in order to generate a new instance easily.
15 * It will be called by init function of the module.
16 * @param pixmap, pixmap shown on the toolbar item.
17 * @param tooltip, tooltip of the toolbar item.
18 * @view_constructor, constructor of the viewer.
21 void ToolbarItemReg(GdkPixmap
*pixmap
, char *tooltip
, void *view_constructor
);
25 * Function to unregister the viewer's constructor, release the space
26 * occupied by pixmap, tooltip and constructor of the viewer.
27 * It will be called when a module is unloaded.
28 * @param view_constructor, constructor of the viewer which is used as
29 * a reference to find out where the pixmap and tooltip are.
32 void ToolbarItemUnreg(void *view_constructor
);
36 * Function to register a view constructor so that main window can generate
37 * a menu item for the viewer in order to generate a new instance easily.
38 * It will be called by init function of the module.
39 * @param menu_path, path of the menu item.
40 * @param menu_text, text of the menu item.
41 * @view_constructor, constructor of the viewer.
44 void MenuItemReg(char *menu_path
, char *menu_text
, void *view_constructor
);
48 * Function to unregister the viewer's constructor, release the space
49 * occupied by menu_path, menu_text and constructor of the viewer.
50 * It will be called when a module is unloaded.
51 * @param view_constructor, constructor of the viewer which is used as
52 * a reference to find out where the menu_path and menu_text are.
55 void MenuItemUnreg(void *view_constructor
);
59 * Attach a viewer to the current tab.
60 * It will be called in the constructor of the viewer.
61 * @param main_win, the main window the viewer belongs to.
62 * @param viewer, viewer to be attached to the current tab
65 void AttachViewer(MainWindow
*main_win
, GtkWidget
*viewer
);
68 /* ?? Maybe we do not need this function, when a widget is destoried,
69 * it will be removed automatically from its container
73 * Detach a viewer from the current tab.
74 * It will be called in the destructor of the viewer.
75 * @param main_win, the main window the viewer belongs to.
76 * @param viewer, viewer to be detached from the current tab.
79 void DetachViewer(MainWindow
*main_win
, GtkWidget
*viewer
);
83 * Update the status bar whenever something changed in the viewer.
84 * @param main_win, the main window the viewer belongs to.
85 * @param info, the message which will be shown in the status bar.
88 void UpdateStatus(MainWindow
*main_win
, char *info
);
92 * Function to get the current time interval of the current tab.
93 * It will be called by a viewer's hook function to update the
94 * time interval of the viewer and also be called by the constructor
96 * @param main_win, the main window the viewer belongs to.
97 * @param time_interval, a pointer where time interval will be stored.
100 void GetTimeInterval(MainWindow
*main_win
, TimeInterval
*time_interval
);
104 * Function to set the time interval of the current tab.
105 * It will be called by a viewer's signal handle associated with
106 * the move_slider signal
107 * @param main_win, the main window the viewer belongs to.
108 * @param time_interval, a pointer where time interval is stored.
111 void SetTimeInterval(MainWindow
*main_win
, TimeInterval
*time_interval
);
115 * Function to get the current time/event of the current tab.
116 * It will be called by a viewer's hook function to update the
117 * current time/event of the viewer.
118 * @param main_win, the main window the viewer belongs to.
119 * @param ltt_time, a pointer where time will be stored.
122 void GetCurrentTime(MainWindow
*main_win
, ltt_time
*time
);
126 * Function to set the current time/event of the current tab.
127 * It will be called by a viewer's signal handle associated with
128 * the button-release-event signal
129 * @param main_win, the main window the viewer belongs to.
130 * @param ltt_time, a pointer where time is stored.
133 void SetCurrentTime(MainWindow
*main_win
, ltt_time
*time
);
137 * Function to get the traceset from the current tab.
138 * It will be called by the constructor of the viewer and also be
139 * called by a hook funtion of the viewer to update its traceset.
140 * @param main_win, the main window the viewer belongs to.
141 * @param traceset, a pointer to a traceset.
144 void GetTraceset(MainWindow
*main_win
, Traceset
*traceset
);
148 * Function to get the filter of the current tab.
149 * It will be called by the constructor of the viewer and also be
150 * called by a hook funtion of the viewer to update its filter.
151 * @param main_win, the main window the viewer belongs to.
152 * @param filter, a pointer to a filter.
155 void GetFilter(MainWindow
*main_win
, Filter
*filter
);
159 * Function to register a hook function for a viewer to set/update its
161 * It will be called by the constructor of the viewer.
162 * @param hook, hook function of the viewer.
163 * @param hook_data, hook data associated with the hook function.
164 * @param main_win, the main window the viewer belongs to.
167 void RegUpdateTimeInterval(lttv_hook
*hook
, TimeInterval
*hook_data
,
168 MainWindow
* main_win
);
172 * Function to unregister a viewer's hook function which is used to
173 * set/update the time interval of the viewer.
174 * It will be called by the destructor of the viewer.
175 * @param hook, hook function of the viewer.
176 * @param hook_data, hook data associated with the hook function.
177 * @param main_win, the main window the viewer belongs to.
180 void UnregUpdateTimeInterval(lttv_hook
*hook
, TimeInterval
*hook_data
,
181 MainWindow
* main_win
);
185 * Function to register a hook function for a viewer to set/update its
187 * It will be called by the constructor of the viewer.
188 * @param hook, hook function of the viewer.
189 * @param hook_data, hook data associated with the hook function.
190 * @param main_win, the main window the viewer belongs to.
193 void RegUpdateTraceset(lttv_hook
*hook
, Traceset
*hook_data
,
194 MainWindow
* main_win
);
198 * Function to unregister a viewer's hook function which is used to
199 * set/update the traceset of the viewer.
200 * It will be called by the destructor of the viewer.
201 * @param hook, hook function of the viewer.
202 * @param hook_data, hook data associated with the hook function.
203 * @param main_win, the main window the viewer belongs to.
206 void UnregUpdateTraceset(lttv_hook
*hook
, Traceset
*hook_data
,
207 MainWindow
* main_win
);
211 * Function to register a hook function for a viewer to set/update its
213 * It will be called by the constructor of the viewer.
214 * @param hook, hook function of the viewer.
215 * @param hook_data, hook data associated with the hook function.
216 * @param main_win, the main window the viewer belongs to.
219 void RegUpdateFilter(lttv_hook
*hook
, Filter
*hook_data
,
220 MainWindow
*main_win
);
224 * Function to unregister a viewer's hook function which is used to
225 * set/update the filter of the viewer.
226 * It will be called by the destructor of the viewer.
227 * @param hook, hook function of the viewer.
228 * @param hook_data, hook data associated with the hook function.
229 * @param main_win, the main window the viewer belongs to.
232 void UnregUpdateFilter(lttv_hook
*hook
, Filter
*hook_data
,
233 MainWindow
* main_win
);
237 * Function to register a hook function for a viewer to set/update its
239 * It will be called by the constructor of the viewer.
240 * @param hook, hook function of the viewer.
241 * @param hook_data, hook data associated with the hook function.
242 * @param main_win, the main window the viewer belongs to.
245 void RegUpdateCurrentTime(lttv_hook
*hook
, ltt_time
*hook_data
,
246 MainWindow
*main_win
);
250 * Function to unregister a viewer's hook function which is used to
251 * set/update the current time of the viewer.
252 * It will be called by the destructor of the viewer.
253 * @param hook, hook function of the viewer.
254 * @param hook_data, hook data associated with the hook function.
255 * @param main_win, the main window the viewer belongs to.
258 void UnregUpdateCurrentTime(lttv_hook
*hook
, ltt_time
*hook_data
,
259 MainWindow
* main_win
);
This page took 0.042475 seconds and 5 git commands to generate.