}
-__inline__ GtkWidget *guicontrolflow_get_widget(
- ControlFlowData *control_flow_data)
-{
- return control_flow_data->top_widget ;
-}
-
-__inline__ ProcessList *guicontrolflow_get_process_list
- (ControlFlowData *control_flow_data)
-{
- return control_flow_data->process_list ;
-}
-
guicontrolflow_destructor_full(ControlFlowData *control_flow_data);
void
guicontrolflow_destructor(ControlFlowData *control_flow_data);
-__inline__ GtkWidget *guicontrolflow_get_widget(
- ControlFlowData *control_flow_data);
-__inline__ ProcessList *guicontrolflow_get_process_list(
- ControlFlowData *control_flow_data);
+
+inline GtkWidget *guicontrolflow_get_widget(
+ ControlFlowData *control_flow_data)
+{
+ return control_flow_data->top_widget ;
+}
+
+inline ProcessList *guicontrolflow_get_process_list
+ (ControlFlowData *control_flow_data)
+{
+ return control_flow_data->process_list ;
+}
+
#endif // _CFV_H
return drawing->vbox;
}
-/* convert_pixels_to_time
- *
- * Convert from window pixel and time interval to an absolute time.
- */
-__inline__ void convert_pixels_to_time(
- gint width,
- guint x,
- TimeWindow time_window,
- LttTime *time)
-{
- double time_d;
-
- time_d = time_window.time_width_double;
- time_d = time_d / (double)width * (double)x;
- *time = ltt_time_from_double(time_d);
- *time = ltt_time_add(time_window.start_time, *time);
-}
-
-
-__inline__ void convert_time_to_pixels(
- TimeWindow time_window,
- LttTime time,
- int width,
- guint *x)
-{
- double time_d;
-#ifdef EXTRA_CHECK
- g_assert(ltt_time_compare(window_time_begin, time) <= 0 &&
- ltt_time_compare(window_time_end, time) >= 0);
-#endif //EXTRA_CHECK
-
- time = ltt_time_sub(time, time_window.start_time);
-
- time_d = ltt_time_to_double(time);
-
- if(time_window.time_width_double == 0.0) {
- g_assert(time_d == 0.0);
- *x = 0;
- } else {
- *x = (guint)(time_d / time_window.time_width_double * (double)width);
- }
-
-}
-
void drawing_draw_line( Drawing_t *drawing,
GdkPixmap *pixmap,
guint x1, guint y1,
guint y,
guint height);
-__inline__ void convert_pixels_to_time(
- gint width,
- guint x,
- TimeWindow time_window,
- LttTime *time);
-
-__inline__ void convert_time_to_pixels(
- TimeWindow time_window,
- LttTime time,
- gint width,
- guint *x);
-
void drawing_update_ruler(Drawing_t *drawing, TimeWindow *time_window);
void drawing_request_expose(EventsRequest *events_request,
GtkTreeViewColumn *arg2,
gpointer user_data);
+
+/* convert_pixels_to_time
+ *
+ * Convert from window pixel and time interval to an absolute time.
+ */
+inline void convert_pixels_to_time(
+ gint width,
+ guint x,
+ TimeWindow time_window,
+ LttTime *time)
+{
+ double time_d;
+
+ time_d = time_window.time_width_double;
+ time_d = time_d / (double)width * (double)x;
+ *time = ltt_time_from_double(time_d);
+ *time = ltt_time_add(time_window.start_time, *time);
+}
+
+
+inline void convert_time_to_pixels(
+ TimeWindow time_window,
+ LttTime time,
+ int width,
+ guint *x)
+{
+ double time_d;
+#ifdef EXTRA_CHECK
+ g_assert(ltt_time_compare(window_time_begin, time) <= 0 &&
+ ltt_time_compare(window_time_end, time) >= 0);
+#endif //EXTRA_CHECK
+
+ time = ltt_time_sub(time, time_window.start_time);
+
+ time_d = ltt_time_to_double(time);
+
+ if(time_window.time_width_double == 0.0) {
+ g_assert(time_d == 0.0);
+ *x = 0;
+ } else {
+ *x = (guint)(time_d / time_window.time_width_double * (double)width);
+ }
+
+}
+
+
+
#endif // _DRAWING_H
#define MAX_PATH_LEN 256
/* drawing hook functions */
-__inline__ gboolean draw_text( void *hook_data, void *call_data)
+gboolean draw_text( void *hook_data, void *call_data)
{
PropertiesText *properties = (PropertiesText*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
/* To speed up the process, search in already loaded icons list first. Only
* load it if not present.
*/
-__inline__ gboolean draw_icon( void *hook_data, void *call_data)
+gboolean draw_icon( void *hook_data, void *call_data)
{
PropertiesIcon *properties = (PropertiesIcon*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
return 0;
}
-__inline__ gboolean draw_line( void *hook_data, void *call_data)
+gboolean draw_line( void *hook_data, void *call_data)
{
PropertiesLine *properties = (PropertiesLine*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
return 0;
}
-__inline__ gboolean draw_arc( void *hook_data, void *call_data)
+gboolean draw_arc( void *hook_data, void *call_data)
{
PropertiesArc *properties = (PropertiesArc*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
return 0;
}
-__inline__ gboolean draw_bg( void *hook_data, void *call_data)
+gboolean draw_bg( void *hook_data, void *call_data)
{
PropertiesBG *properties = (PropertiesBG*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
* different items.
*/
-__inline__ gboolean draw_text( void *hook_data, void *call_data);
-__inline__ gboolean draw_icon( void *hook_data, void *call_data);
-__inline__ gboolean draw_line( void *hook_data, void *call_data);
-__inline__ gboolean draw_arc( void *hook_data, void *call_data);
-__inline__ gboolean draw_bg( void *hook_data, void *call_data);
+gboolean draw_text( void *hook_data, void *call_data);
+gboolean draw_icon( void *hook_data, void *call_data);
+gboolean draw_line( void *hook_data, void *call_data);
+gboolean draw_arc( void *hook_data, void *call_data);
+gboolean draw_bg( void *hook_data, void *call_data);
#endif // _DRAW_ITEM_H
}
/* Function that selects the color of status&exemode line */
-static __inline__ PropertiesLine prepare_s_e_line(LttvProcessState *process)
+static inline PropertiesLine prepare_s_e_line(LttvProcessState *process)
{
PropertiesLine prop_line;
prop_line.line_width = 2;
}
#if 0
-static __inline__ PropertiesLine prepare_status_line(LttvProcessState *process)
+static inline PropertiesLine prepare_status_line(LttvProcessState *process)
{
PropertiesLine prop_line;
prop_line.line_width = 2;
}
#if 0
-static __inline__ PropertiesLine prepare_execmode_line(LttvProcessState *process)
+static inline PropertiesLine prepare_execmode_line(LttvProcessState *process)
{
PropertiesLine prop_line;
prop_line.line_width = 1;
* Methods to synchronize process list *
*****************************************************************************/
-//static __inline__ guint get_cpu_number_from_name(GQuark name);
+//static inline guint get_cpu_number_from_name(GQuark name);
/* Enumeration of the columns */
enum
-static __inline__ gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view)
+static inline gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view)
{
gint height = process_list->cell_height_cache;
if(height != -1) return height;
}
-__inline__ guint processlist_get_height(ProcessList *process_list)
-{
- return get_cell_height(process_list,
- (GtkTreeView*)process_list->process_list_widget)
- * process_list->number_of_process ;
-}
-
-
-__inline__ HashedProcessData *processlist_get_process_data(
- ProcessList *process_list,
- guint pid, guint cpu, LttTime *birth, guint trace_num)
-{
- ProcessInfo process_info;
- gint *path_indices;
- GtkTreePath *tree_path;
-
- process_info.pid = pid;
- if(pid == 0)
- process_info.cpu = cpu;
- else
- process_info.cpu = 0;
- process_info.birth = *birth;
- process_info.trace_num = trace_num;
-
- return (HashedProcessData*)g_hash_table_lookup(
- process_list->process_hash,
- &process_info);
-}
-
-
-__inline__ gint processlist_get_pixels_from_data( ProcessList *process_list,
- HashedProcessData *hashed_process_data,
- guint *y,
- guint *height)
-{
- gint *path_indices;
- GtkTreePath *tree_path;
-
- tree_path = gtk_tree_model_get_path((GtkTreeModel*)process_list->list_store,
- &hashed_process_data->y_iter);
- path_indices = gtk_tree_path_get_indices (tree_path);
-
- *height = get_cell_height(process_list,
- (GtkTreeView*)process_list->process_list_widget);
- *y = *height * path_indices[0];
- gtk_tree_path_free(tree_path);
-
- return 0;
-
-}
-
#if 0
-static __inline__ guint get_cpu_number_from_name(GQuark name)
+static inline guint get_cpu_number_from_name(GQuark name)
{
const gchar *string;
char *begin;
int processlist_remove(ProcessList *process_list, guint pid, guint cpu,
LttTime *birth, guint trace_num);
-__inline__ guint processlist_get_height(ProcessList *process_list);
-__inline__ HashedProcessData *processlist_get_process_data(
- ProcessList *process_list,
- guint pid, guint cpu, LttTime *birth, guint trace_num);
-
-__inline__ gint processlist_get_pixels_from_data( ProcessList *process_list,
+inline guint processlist_get_height(ProcessList *process_list)
+{
+ return get_cell_height(process_list,
+ (GtkTreeView*)process_list->process_list_widget)
+ * process_list->number_of_process ;
+}
+
+
+inline HashedProcessData *processlist_get_process_data(
+ ProcessList *process_list,
+ guint pid, guint cpu, LttTime *birth, guint trace_num)
+{
+ ProcessInfo process_info;
+ gint *path_indices;
+ GtkTreePath *tree_path;
+
+ process_info.pid = pid;
+ if(pid == 0)
+ process_info.cpu = cpu;
+ else
+ process_info.cpu = 0;
+ process_info.birth = *birth;
+ process_info.trace_num = trace_num;
+
+ return (HashedProcessData*)g_hash_table_lookup(
+ process_list->process_hash,
+ &process_info);
+}
+
+
+inline gint processlist_get_pixels_from_data( ProcessList *process_list,
HashedProcessData *hashed_process_data,
guint *y,
- guint *height);
+ guint *height)
+{
+ gint *path_indices;
+ GtkTreePath *tree_path;
+
+ tree_path = gtk_tree_model_get_path((GtkTreeModel*)process_list->list_store,
+ &hashed_process_data->y_iter);
+ path_indices = gtk_tree_path_get_indices (tree_path);
+
+ *height = get_cell_height(process_list,
+ (GtkTreeView*)process_list->process_list_widget);
+ *y = *height * path_indices[0];
+ gtk_tree_path_free(tree_path);
+
+ return 0;
+
+}
+
+
#endif // _PROCESS_LIST_H
}
-
-/**
- * Function to get the current time interval shown on the current tab.
- * It will be called by a viewer's hook function to update the
- * shown time interval of the viewer and also be called by the constructor
- * of the viewer.
- * @param tab viewer's tab
- * @return time window.
- */
-
-__inline__ TimeWindow lttvwindow_get_time_window(Tab *tab)
-{
- return tab->time_window;
-
-}
-
-
/**
* Function to get the current time/event of the current tab.
* It will be called by a viewer's hook function to update the
/**
- * Function to get the current time window of the current tab.
- *
- * @param tab the tab the viewer belongs to.
- * @return the current tab's time interval.
+ * Function to get the current time interval shown on the current tab.
+ * It will be called by a viewer's hook function to update the
+ * shown time interval of the viewer and also be called by the constructor
+ * of the viewer.
+ * @param tab viewer's tab
+ * @return time window.
*/
-__inline__ TimeWindow lttvwindow_get_time_window(Tab *tab);
+inline TimeWindow lttvwindow_get_time_window(Tab *tab)
+{
+ return tab->time_window;
+}
/**
#include <lttvwindow/menu.h>
-inline LttvMenus *lttv_menus_new() {
+LttvMenus *lttv_menus_new() {
return g_array_new(FALSE, FALSE, sizeof(LttvMenuClosure));
}
/* MD: delete elements of the array also, but don't free pointed addresses
* (functions).
*/
-inline void lttv_menus_destroy(LttvMenus *h) {
+void lttv_menus_destroy(LttvMenus *h) {
g_debug("lttv_menus_destroy()");
g_array_free(h, TRUE);
}
-inline LttvMenuClosure lttv_menus_add(LttvMenus *h, lttvwindow_viewer_constructor f, char* menu_path, char* menu_text, GtkWidget *widget)
+LttvMenuClosure lttv_menus_add(LttvMenus *h,
+ lttvwindow_viewer_constructor f,
+ char* menu_path, char* menu_text, GtkWidget *widget)
{
LttvMenuClosure c;
#include <lttv/lttv.h>
#include <lttvwindow/toolbar.h>
-inline LttvToolbars *lttv_toolbars_new() {
+LttvToolbars *lttv_toolbars_new() {
return g_array_new(FALSE, FALSE, sizeof(LttvToolbarClosure));
}
/* MD: delete elements of the array also, but don't free pointed addresses
* (functions).
*/
-inline void lttv_toolbars_destroy(LttvToolbars *h) {
+void lttv_toolbars_destroy(LttvToolbars *h) {
g_debug("lttv_toolbars_destroy");
g_array_free(h, TRUE);
}
-inline LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget)
+LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h,
+ lttvwindow_viewer_constructor f,
+ char* tooltip, char ** pixmap, GtkWidget *widget)
{
LttvToolbarClosure c;