libsysprof-gtk: make xy series compile

We aren't using this, but this makes it fit the form of the rest of the
things in here.
This commit is contained in:
Christian Hergert
2023-06-23 18:16:03 -07:00
parent 808c633068
commit 4282ff2b15
3 changed files with 21 additions and 5 deletions

View File

@ -14,6 +14,7 @@ libsysprof_gtk_public_sources = [
'sysprof-split-layer.c',
'sysprof-time-span-layer.c',
'sysprof-weighted-callgraph-view.c',
'sysprof-xy-series.c',
]
libsysprof_gtk_public_headers = [
@ -34,6 +35,7 @@ libsysprof_gtk_public_headers = [
'sysprof-split-layer.h',
'sysprof-time-span-layer.h',
'sysprof-weighted-callgraph-view.h',
'sysprof-xy-series.h',
]
libsysprof_gtk_private_sources = [

View File

@ -20,6 +20,7 @@
#include "config.h"
#include "sysprof-series-private.h"
#include "sysprof-xy-series.h"
#include "sysprof-xy-series-item-private.h"
@ -30,6 +31,11 @@ struct _SysprofXYSeries
GtkExpression *y_expression;
};
struct _SysprofXYSeriesClass
{
SysprofSeriesClass parent_instance;
};
enum {
PROP_0,
PROP_X_EXPRESSION,
@ -42,9 +48,12 @@ G_DEFINE_FINAL_TYPE (SysprofXYSeries, sysprof_xy_series, SYSPROF_TYPE_SERIES)
static GParamSpec *properties [N_PROPS];
static gpointer
sysprof_xy_series_get_series_item (SysprofXYSeries *self,
gpointer item)
sysprof_xy_series_get_series_item (SysprofSeries *series,
guint position,
gpointer item)
{
SysprofXYSeries *self = SYSPROF_XY_SERIES (series);
return _sysprof_xy_series_item_new (item,
gtk_expression_ref (self->x_expression),
gtk_expression_ref (self->y_expression));

View File

@ -26,11 +26,16 @@
G_BEGIN_DECLS
#define SYSPROF_TYPE_XY_SERIES (sysprof_xy_series_get_type())
#define SYSPROF_TYPE_XY_SERIES (sysprof_xy_series_get_type())
#define SYSPROF_IS_XY_SERIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, SYSPROF_TYPE_XY_SERIES))
#define SYSPROF_XY_SERIES(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, SYSPROF_TYPE_XY_SERIES, SysprofXYSeries))
#define SYSPROF_XY_SERIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, SYSPROF_TYPE_XY_SERIES, SysprofXYSeriesClass))
typedef struct _SysprofXYSeries SysprofXYSeries;
typedef struct _SysprofXYSeriesClass SysprofXYSeriesClass;
SYSPROF_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (SysprofXYSeries, sysprof_xy_series, SYSPROF, XY_SERIES, SysprofSeries)
GType sysprof_xy_series_get_type (void) G_GNUC_CONST;
SYSPROF_AVAILABLE_IN_ALL
SysprofSeries *sysprof_xy_series_new (const char *title,
GListModel *model,