libsysprof-gtk: add sysprof_session_select_time()

This allows changing the time to a specific section within the document
time span.

It may also update the visible time to include the selected time.
This commit is contained in:
Christian Hergert
2023-06-16 15:52:39 -07:00
parent dc4d15442f
commit ac9a95a92b
2 changed files with 46 additions and 6 deletions

View File

@ -34,14 +34,17 @@ SYSPROF_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (SysprofSession, sysprof_session, SYSPROF, SESSION, GObject)
SYSPROF_AVAILABLE_IN_ALL
SysprofSession *sysprof_session_new (SysprofDocument *document);
SysprofSession *sysprof_session_new (SysprofDocument *document);
SYSPROF_AVAILABLE_IN_ALL
SysprofDocument *sysprof_session_get_document (SysprofSession *self);
SysprofDocument *sysprof_session_get_document (SysprofSession *self);
SYSPROF_AVAILABLE_IN_ALL
GtkFilter *sysprof_session_get_filter (SysprofSession *self);
GtkFilter *sysprof_session_get_filter (SysprofSession *self);
SYSPROF_AVAILABLE_IN_ALL
const SysprofTimeSpan *sysprof_session_get_selected_time (SysprofSession *self);
const SysprofTimeSpan *sysprof_session_get_selected_time (SysprofSession *self);
SYSPROF_AVAILABLE_IN_ALL
const SysprofTimeSpan *sysprof_session_get_visible_time (SysprofSession *self);
const SysprofTimeSpan *sysprof_session_get_visible_time (SysprofSession *self);
SYSPROF_AVAILABLE_IN_ALL
void sysprof_session_select_time (SysprofSession *self,
const SysprofTimeSpan *time_span);
G_END_DECLS