1 /*! \file gtkTraceSet.h
2 * \brief API used by the graphical viewers to interact with their top window.
4 * Main window (gui module) is the place to contain and display viewers.
5 * Viewers (lttv plugins) interacte with main window through this API and
7 * This header file should be included in each graphic module.
8 * This library is used by graphical modules to interact with the
15 #include <lttv/hook.h>
18 * Function to register a view constructor so that main window can generate
19 * a toolbar item for the viewer in order to generate a new instance easily.
20 * It will be called by init function of the module.
21 * @param ButtonPixmap image shown on the toolbar item.
22 * @param tooltip tooltip of the toolbar item.
23 * @param view_constructor constructor of the viewer.
26 void ToolbarItemReg(gchar
**ButtonPixmap
, char *tooltip
, void *view_constructor
);
30 * Function to unregister the viewer's constructor, release the space
31 * occupied by pixmap, tooltip and constructor of the viewer.
32 * It will be called when a module is unloaded.
33 * @param view_constructor constructor of the viewer which is used as
34 * a reference to find out where the pixmap and tooltip are.
37 void ToolbarItemUnreg(void *view_constructor
);
41 * Function to register a view constructor so that main window can generate
42 * a menu item for the viewer in order to generate a new instance easily.
43 * It will be called by init function of the module.
44 * @param menu_path path of the menu item.
45 * @param menu_text text of the menu item.
46 * @param view_constructor constructor of the viewer.
49 void MenuItemReg(char *menu_path
, char *menu_text
, void *view_constructor
);
53 * Function to unregister the viewer's constructor, release the space
54 * occupied by menu_path, menu_text and constructor of the viewer.
55 * It will be called when a module is unloaded.
56 * @param view_constructor constructor of the viewer which is used as
57 * a reference to find out where the menu_path and menu_text are.
60 void MenuItemUnreg(void *view_constructor
);
64 * Attach a viewer to the current tab.
65 * It will be called in the constructor of the viewer.
66 * @param main_win the main window the viewer belongs to.
67 * @param viewer viewer to be attached to the current tab
70 // Not Needed : Main window add widget returned by constructor
71 //void AttachViewer(MainWindow *main_win, GtkWidget *viewer);
74 /* ?? Maybe we do not need this function, when a widget is destroyed,
75 * it will be removed automatically from its container
79 * Detach a viewer from the current tab.
80 * It will be called in the destructor of the viewer.
81 * @param main_win the main window the viewer belongs to.
82 * @param viewer viewer to be detached from the current tab.
85 //void DetachViewer(MainWindow *main_win, GtkWidget *viewer);
89 * Update the status bar whenever something changed in the viewer.
90 * @param main_win the main window the viewer belongs to.
91 * @param info the message which will be shown in the status bar.
94 void UpdateStatus(MainWindow
*main_win
, char *info
);
98 * Function to get the current time interval of the current tab.
99 * It will be called by a viewer's hook function to update the
100 * time interval of the viewer and also be called by the constructor
102 * @param main_win the main window the viewer belongs to.
103 * @param time_interval a pointer where time interval will be stored.
106 void GetTimeInterval(MainWindow
*main_win
, TimeInterval
*time_interval
);
110 * Function to set the time interval of the current tab.
111 * It will be called by a viewer's signal handle associated with
112 * the move_slider signal
113 * @param main_win the main window the viewer belongs to.
114 * @param time_interval a pointer where time interval is stored.
117 void SetTimeInterval(MainWindow
*main_win
, TimeInterval
*time_interval
);
121 * Function to get the current time/event of the current tab.
122 * It will be called by a viewer's hook function to update the
123 * current time/event of the viewer.
124 * @param main_win the main window the viewer belongs to.
125 * @param ltt_time a pointer where time will be stored.
128 void GetCurrentTime(MainWindow
*main_win
, ltt_time
*time
);
132 * Function to set the current time/event of the current tab.
133 * It will be called by a viewer's signal handle associated with
134 * the button-release-event signal
135 * @param main_win the main window the viewer belongs to.
136 * @param ltt_time a pointer where time is stored.
139 void SetCurrentTime(MainWindow
*main_win
, ltt_time
*time
);
143 * Function to get the traceset from the current tab.
144 * It will be called by the constructor of the viewer and also be
145 * called by a hook funtion of the viewer to update its traceset.
146 * @param main_win the main window the viewer belongs to.
147 * @param traceset a pointer to a traceset.
150 void GetTraceset(MainWindow
*main_win
, Traceset
*traceset
);
154 * Function to get the filter of the current tab.
155 * It will be called by the constructor of the viewer and also be
156 * called by a hook funtion of the viewer to update its filter.
157 * @param main_win, the main window the viewer belongs to.
158 * @param filter, a pointer to a filter.
161 void GetFilter(MainWindow
*main_win
, Filter
*filter
);
165 * Function to register a hook function for a viewer to set/update its
167 * It will be called by the constructor of the viewer.
168 * @param hook hook function of the viewer.
169 * @param hook_data hook data associated with the hook function.
170 * @param main_win the main window the viewer belongs to.
173 void RegUpdateTimeInterval(lttv_hook
*hook
, TimeInterval
*hook_data
,
174 MainWindow
* main_win
);
178 * Function to unregister a viewer's hook function which is used to
179 * set/update the time interval of the viewer.
180 * It will be called by the destructor of the viewer.
181 * @param hook hook function of the viewer.
182 * @param hook_data hook data associated with the hook function.
183 * @param main_win the main window the viewer belongs to.
186 void UnregUpdateTimeInterval(lttv_hook
*hook
, TimeInterval
*hook_data
,
187 MainWindow
* main_win
);
191 * Function to register a hook function for a viewer to set/update its
193 * It will be called by the constructor of the viewer.
194 * @param hook hook function of the viewer.
195 * @param hook_data hook data associated with the hook function.
196 * @param main_win the main window the viewer belongs to.
199 void RegUpdateTraceset(lttv_hook
*hook
, Traceset
*hook_data
,
200 MainWindow
* main_win
);
204 * Function to unregister a viewer's hook function which is used to
205 * set/update the traceset of the viewer.
206 * It will be called by the destructor of the viewer.
207 * @param hook hook function of the viewer.
208 * @param hook_data hook data associated with the hook function.
209 * @param main_win the main window the viewer belongs to.
212 void UnregUpdateTraceset(lttv_hook
*hook
, Traceset
*hook_data
,
213 MainWindow
* main_win
);
217 * Function to register a hook function for a viewer to set/update its
219 * It will be called by the constructor of the viewer.
220 * @param hook hook function of the viewer.
221 * @param hook_data hook data associated with the hook function.
222 * @param main_win the main window the viewer belongs to.
225 void RegUpdateFilter(lttv_hook
*hook
, Filter
*hook_data
,
226 MainWindow
*main_win
);
230 * Function to unregister a viewer's hook function which is used to
231 * set/update the filter of the viewer.
232 * It will be called by the destructor of the viewer.
233 * @param hook hook function of the viewer.
234 * @param hook_data hook data associated with the hook function.
235 * @param main_win the main window the viewer belongs to.
238 void UnregUpdateFilter(lttv_hook
*hook
, Filter
*hook_data
,
239 MainWindow
* main_win
);
243 * Function to register a hook function for a viewer to set/update its
245 * It will be called by the constructor of the viewer.
246 * @param hook hook function of the viewer.
247 * @param hook_data hook data associated with the hook function.
248 * @param main_win the main window the viewer belongs to.
251 void RegUpdateCurrentTime(lttv_hook
*hook
, ltt_time
*hook_data
,
252 MainWindow
*main_win
);
256 * Function to unregister a viewer's hook function which is used to
257 * set/update the current time of the viewer.
258 * It will be called by the destructor of the viewer.
259 * @param hook hook function of the viewer.
260 * @param hook_data hook data associated with the hook function.
261 * @param main_win the main window the viewer belongs to.
264 void UnregUpdateCurrentTime(lttv_hook
*hook
, ltt_time
*hook_data
,
265 MainWindow
* main_win
);
This page took 0.042801 seconds and 4 git commands to generate.