Added to the lttvwindow API :
-- lttvwindow_events_request
-( MainWindow *main_win,
- LttTime start_time,
- LttvTracesetPosition start_position,
- LttTime end_time,
- guint num_events,
- LttvTracesetPosition end_position,
- LttvHooksById before_traceset,
- LttvHooksById before_trace,
- LttvHooksById before_tracefile,
- LttvHooksById middle,
- LttvHooksById after_tracefile,
- LttvHooksById after_trace,
- LttvHooksById after_traceset)
+void lttvwindow_events_request
+( MainWindow *main_win,
+ EventsRequest events_request);
Internal functions :
registers a pending request for the next g_idle if none is registered.
typedef struct _EventsRequest {
- LttTime start_time,
- LttvTracesetPosition start_position,
- LttTime end_time,
- guint num_events,
- LttvTracesetPosition end_position,
- LttvHooksById before_traceset,
- LttvHooksById before_trace,
- LttvHooksById before_tracefile,
- LttvHooksById middle,
- LttvHooksById after_tracefile,
- LttvHooksById after_trace,
- LttvHooksById after_traceset)
+ LttTime start_time, /* Unset : { 0, 0 } */
+ LttvTracesetContextPosition start_position, /* Unset : num_traces = 0 */
+ LttTime end_time, /* Unset : { 0, 0 } */
+ guint num_events, /* Unset : G_MAXUINT */
+ LttvTracesetContextPosition end_position, /* Unset : num_traces = 0 */
+ LttvHooksById *before_traceset, /* Unset : NULL */
+ LttvHooksById *before_trace, /* Unset : NULL */
+ LttvHooksById *before_tracefile, /* Unset : NULL */
+ LttvHooksById *middle, /* Unset : NULL */
+ LttvHooksById *after_tracefile, /* Unset : NULL */
+ LttvHooksById *after_trace, /* Unset : NULL */
+ LttvHooksById *after_traceset /* Unset : NULL */
} EventsRequest;
(1.3.2 middle hooks added)
2. Else, list_in is not empty, we continue a read
2.1 For each req of list_out
- - if req.start time == current time
+ - if req.start time == current context time
- Add to list_in, remove from list_out
- Call begin
- if req.start position == current position
- if req.num == 0
- Call end for req
- remove req from list_in
- - if req.end time == current time
+ - if current context time > req.end time
- Call end for req
- remove req from list_in
- if req.end pos == current pos