[sysprof] cursor: add helper to get reader
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] cursor: add helper to get reader
- Date: Wed, 16 May 2018 11:46:33 +0000 (UTC)
commit 590d317a94fadcb72660d4c56d92c0436fb82f40
Author: Christian Hergert <chergert redhat com>
Date: Wed May 16 12:42:44 2018 +0100
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.
lib/capture/sp-capture-cursor.c | 15 +++++++++++++++
lib/capture/sp-capture-cursor.h | 1 +
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/lib/capture/sp-capture-cursor.c b/lib/capture/sp-capture-cursor.c
index eb67524..6877bec 100644
--- a/lib/capture/sp-capture-cursor.c
+++ b/lib/capture/sp-capture-cursor.c
@@ -210,3 +210,18 @@ sp_capture_cursor_new (SpCaptureReader *reader)
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;
+}
diff --git a/lib/capture/sp-capture-cursor.h b/lib/capture/sp-capture-cursor.h
index fb09656..d4ea900 100644
--- a/lib/capture/sp-capture-cursor.h
+++ b/lib/capture/sp-capture-cursor.h
@@ -42,6 +42,7 @@ typedef gboolean (*SpCaptureCursorCallback) (const SpCaptureFrame *frame,
gpointer user_data);
SpCaptureCursor *sp_capture_cursor_new (SpCaptureReader *reader);
+SpCaptureReader *sp_capture_cursor_get_reader (SpCaptureCursor *self);
void sp_capture_cursor_foreach (SpCaptureCursor *self,
SpCaptureCursorCallback callback,
gpointer user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]