libsysprof-gtk: add vfunc to get a model item at x,y

This commit is contained in:
Christian Hergert
2023-06-20 13:25:49 -07:00
parent 85b233d0d8
commit cf1b3ae16f
3 changed files with 54 additions and 4 deletions

View File

@ -35,10 +35,13 @@ struct _SysprofChartLayerClass
{
GtkWidgetClass parent_class;
void (*snapshot_motion) (SysprofChartLayer *self,
GtkSnapshot *snapshot,
double x,
double y);
gpointer (*lookup_item) (SysprofChartLayer *self,
double x,
double y);
void (*snapshot_motion) (SysprofChartLayer *self,
GtkSnapshot *snapshot,
double x,
double y);
/*< private >*/
gpointer _reserved[16];
@ -50,6 +53,10 @@ SYSPROF_AVAILABLE_IN_ALL
void sysprof_chart_layer_set_title (SysprofChartLayer *self,
const char *title);
SYSPROF_AVAILABLE_IN_ALL
gpointer sysprof_chart_layer_lookup_item (SysprofChartLayer *self,
double x,
double y);
SYSPROF_AVAILABLE_IN_ALL
void sysprof_chart_layer_snapshot_motion (SysprofChartLayer *self,
GtkSnapshot *snapshot,
double x,