libsysprof-analyze: expose properties for some data

This commit is contained in:
Christian Hergert
2023-06-26 16:39:43 -07:00
parent 6a3ae18165
commit 453882a39a

View File

@ -102,6 +102,8 @@ typedef struct _SysprofDocumentFramePointer
enum {
PROP_0,
PROP_ALLOCATIONS,
PROP_SAMPLES,
PROP_TIME_SPAN,
N_PROPS
};
@ -267,6 +269,14 @@ sysprof_document_get_property (GObject *object,
switch (prop_id)
{
case PROP_ALLOCATIONS:
g_value_take_object (value, sysprof_document_list_allocations (self));
break;
case PROP_SAMPLES:
g_value_take_object (value, sysprof_document_list_samples (self));
break;
case PROP_TIME_SPAN:
g_value_set_boxed (value, sysprof_document_get_time_span (self));
break;
@ -284,6 +294,16 @@ sysprof_document_class_init (SysprofDocumentClass *klass)
object_class->finalize = sysprof_document_finalize;
object_class->get_property = sysprof_document_get_property;
properties [PROP_ALLOCATIONS] =
g_param_spec_object ("allocations", NULL, NULL,
G_TYPE_LIST_MODEL,
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
properties [PROP_SAMPLES] =
g_param_spec_object ("samples", NULL, NULL,
G_TYPE_LIST_MODEL,
(G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
properties [PROP_TIME_SPAN] =
g_param_spec_boxed ("time-span", NULL, NULL,
SYSPROF_TYPE_TIME_SPAN,