mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
cursor: add helper to get reader
We might need this so that we can access to the updated end time that was determined by iterating frames.
This commit is contained in:
@ -210,3 +210,18 @@ sp_capture_cursor_new (SpCaptureReader *reader)
|
|||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sp_capture_cursor_get_reader:
|
||||||
|
*
|
||||||
|
* Gets the underlying reader that is used by the cursor.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): An #SpCaptureReader
|
||||||
|
*/
|
||||||
|
SpCaptureReader *
|
||||||
|
sp_capture_cursor_get_reader (SpCaptureCursor *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (SP_IS_CAPTURE_CURSOR (self), NULL);
|
||||||
|
|
||||||
|
return self->reader;
|
||||||
|
}
|
||||||
|
|||||||
@ -42,6 +42,7 @@ typedef gboolean (*SpCaptureCursorCallback) (const SpCaptureFrame *frame,
|
|||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
SpCaptureCursor *sp_capture_cursor_new (SpCaptureReader *reader);
|
SpCaptureCursor *sp_capture_cursor_new (SpCaptureReader *reader);
|
||||||
|
SpCaptureReader *sp_capture_cursor_get_reader (SpCaptureCursor *self);
|
||||||
void sp_capture_cursor_foreach (SpCaptureCursor *self,
|
void sp_capture_cursor_foreach (SpCaptureCursor *self,
|
||||||
SpCaptureCursorCallback callback,
|
SpCaptureCursorCallback callback,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|||||||
Reference in New Issue
Block a user