Files
sysprof/lib/sp-visualizer-row.h
Christian Hergert 5ceff81d5d visualizer: add set_time_range() and get_time_range()
This allows the row to be notified of the visible range, which
can result from changing the zoom or a new reader being set.
2016-09-25 15:35:14 -07:00

91 lines
2.9 KiB
C

/* sp-visualizer-row.h
*
* Copyright (C) 2016 Christian Hergert <christian@hergert.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SP_VISUALIZER_ROW_H
#define SP_VISUALIZER_ROW_H
#include <gtk/gtk.h>
#include "sp-capture-reader.h"
G_BEGIN_DECLS
#define SP_TYPE_VISUALIZER_ROW (sp_visualizer_row_get_type())
G_DECLARE_DERIVABLE_TYPE (SpVisualizerRow, sp_visualizer_row, SP, VISUALIZER_ROW, GtkListBoxRow)
struct _SpVisualizerRowClass
{
GtkListBoxRowClass parent_class;
/**
* SpVisualizerRow::set_reader:
*
* Sets the reader that the row should use to extract counters.
* This reader is private to the row and should be freed when
* no longer in use with sp_capture_reader_unref().
*/
void (*set_reader) (SpVisualizerRow *self,
SpCaptureReader *reader);
/**
* SpVisualizerRow::set_time_range:
* @self: A #SpVisualizerRow
* @begin_time: the beginning time for the row.
* @end_time: the end time for the row.
*
* This function is used to notify the row that the range the
* row should be displaying has changed. This might happen when
* the user has altered the zoom level, selected a region, in or
* a new capture was loaded.
*/
void (*set_time_range) (SpVisualizerRow *self,
gint64 begin_time,
gint64 end_time);
gpointer _reserved1;
gpointer _reserved2;
gpointer _reserved3;
gpointer _reserved4;
gpointer _reserved5;
gpointer _reserved6;
gpointer _reserved7;
gpointer _reserved8;
gpointer _reserved9;
gpointer _reserved10;
gpointer _reserved11;
gpointer _reserved12;
gpointer _reserved13;
gpointer _reserved14;
gpointer _reserved15;
gpointer _reserved16;
};
void sp_visualizer_row_set_reader (SpVisualizerRow *self,
SpCaptureReader *reader);
void sp_visualizer_row_get_time_range (SpVisualizerRow *self,
gint64 *begin_time,
gint64 *end_time);
void sp_visualizer_row_set_time_range (SpVisualizerRow *self,
gint64 begin_time,
gint64 end_time);
G_END_DECLS
#endif /* SP_VISUALIZER_ROW_H */