| 1 | //FIXME by including ltt.h |
| 2 | #include <time.h> |
| 3 | typedef time_t ltt_time; |
| 4 | |
| 5 | typedef struct _ltt_time_interval |
| 6 | { |
| 7 | ltt_time time_begin, time_end; |
| 8 | } ltt_time_interval; |
| 9 | |
| 10 | // ??? |
| 11 | |
| 12 | |
| 13 | /* Setup the hooks */ |
| 14 | Draw_Before_Hooks = lttv_hooks_new(); |
| 15 | Draw_Event_Hooks = lttv_hooks_new(); |
| 16 | Draw_After_Hooks = lttv_hooks_new(); |
| 17 | |
| 18 | lttv_hooks_add(Draw_Before_Hooks, Draw_Before_Hook, NULL); |
| 19 | lttv_hooks_add(Draw_Event_Hooks, Draw_Event_Hook, NULL); |
| 20 | lttv_hooks_add(Draw_After_Hooks, Draw_After_Hook, NULL); |
| 21 | |
| 22 | /* Destroy the hooks */ |
| 23 | |
| 24 | lttv_hooks_destroy(Draw_Before_Hooks); |
| 25 | lttv_hooks_destroy(Draw_Event_Hooks); |
| 26 | lttv_hooks_destroy(Draw_After_Hooks); |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | /***************************************************************************** |
| 32 | * Definition of structures * |
| 33 | *****************************************************************************/ |
| 34 | |
| 35 | /* Structure used to store and use information relative to one events refresh |
| 36 | * request. Typically filled in by the expose event callback, then passed to the |
| 37 | * library call, then used by the drawing hooks. Then, once all the events are |
| 38 | * sent, it is freed by the hook called after the reading. |
| 39 | */ |
| 40 | typedef struct _EventRequest |
| 41 | { |
| 42 | ControlFlowData *Control_Flow_Data; |
| 43 | ltt_time time_begin, time_end; |
| 44 | /* Fill the Events_Context during the initial expose, before calling for |
| 45 | * events. |
| 46 | */ |
| 47 | GArray Events_Context; //FIXME |
| 48 | } EventRequest ; |
| 49 | |
| 50 | |
| 51 | |
| 52 | /***************************************************************************** |
| 53 | * Function prototypes * |
| 54 | *****************************************************************************/ |
| 55 | //! Control Flow Viewer's constructor hook |
| 56 | GtkWidget *hGuiControlFlow(GtkWidget *pmParentWindow); |
| 57 | //! Control Flow Viewer's constructor |
| 58 | ControlFlowData *GuiControlFlow(void); |
| 59 | //! Control Flow Viewer's destructor |
| 60 | void GuiControlFlow_Destructor(ControlFlowData *Control_Flow_Data); |
| 61 | |
| 62 | |
| 63 | static int Event_Selected_Hook(void *hook_data, void *call_data); |
| 64 | |
| 65 | static lttv_hooks |
| 66 | *Draw_Before_Hooks, |
| 67 | *Draw_Event_Hooks, |
| 68 | *Draw_After_Hooks; |
| 69 | |
| 70 | Draw_Before_Hook(void *hook_data, void *call_data) |
| 71 | Draw_Event_Hook(void *hook_data, void *call_data) |
| 72 | Draw_After_Hook(void *hook_data, void *call_data) |
| 73 | |
| 74 | |
| 75 | //void Tree_V_set_cursor(ControlFlowData *Control_Flow_Data); |
| 76 | //void Tree_V_get_cursor(ControlFlowData *Control_Flow_Data); |
| 77 | |
| 78 | /* Prototype for selection handler callback */ |
| 79 | //static void tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data); |
| 80 | static void v_scroll_cb (GtkAdjustment *adjustment, gpointer data); |
| 81 | //static void Tree_V_size_allocate_cb (GtkWidget *widget, GtkAllocation *alloc, gpointer data); |
| 82 | //static void Tree_V_size_request_cb (GtkWidget *widget, GtkRequisition *requisition, gpointer data); |
| 83 | //static void Tree_V_cursor_changed_cb (GtkWidget *widget, gpointer data); |
| 84 | //static void Tree_V_move_cursor_cb (GtkWidget *widget, GtkMovementStep arg1, gint arg2, gpointer data); |
| 85 | |
| 86 | static void expose_event_cb (GtkWidget *widget, GdkEventExpose *expose, gpointer data); |
| 87 | |
| 88 | void add_test_process(ControlFlowData *Control_Flow_Data); |
| 89 | |
| 90 | static void get_test_data(guint Event_Number, guint List_Height, |
| 91 | ControlFlowData *Control_Flow_Data); |
| 92 | |
| 93 | void add_test_data(ControlFlowData *Control_Flow_Data); |
| 94 | void test_draw(ControlFlowData *Control_Flow_Data); |
| 95 | |
| 96 | void Drawing_Area_Init(ControlFlowData *Control_Flow_Data); |
| 97 | |
| 98 | |
| 99 | /*\@}*/ |