mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-ui: stub out marks view
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
<file preprocess="xml-stripblanks">ui/sysprof-callgraph-view.ui</file>
|
||||
<file preprocess="xml-stripblanks">ui/sysprof-empty-state-view.ui</file>
|
||||
<file preprocess="xml-stripblanks">ui/sysprof-failed-state-view.ui</file>
|
||||
<file preprocess="xml-stripblanks">ui/sysprof-marks-view.ui</file>
|
||||
<file preprocess="xml-stripblanks">ui/sysprof-process-model-row.ui</file>
|
||||
<file preprocess="xml-stripblanks">ui/sysprof-profiler-menu-button.ui</file>
|
||||
<file preprocess="xml-stripblanks">ui/sysprof-recording-state-view.ui</file>
|
||||
|
||||
@ -5,6 +5,7 @@ libsysprof_ui_public_sources = [
|
||||
'sysprof-empty-state-view.c',
|
||||
'sysprof-failed-state-view.c',
|
||||
'sysprof-line-visualizer-row.c',
|
||||
'sysprof-marks-view.c',
|
||||
'sysprof-mark-visualizer-row.c',
|
||||
'sysprof-model-filter.c',
|
||||
'sysprof-multi-paned.c',
|
||||
@ -33,6 +34,7 @@ libsysprof_ui_public_headers = [
|
||||
'sysprof-empty-state-view.h',
|
||||
'sysprof-failed-state-view.h',
|
||||
'sysprof-line-visualizer-row.h',
|
||||
'sysprof-marks-view.h',
|
||||
'sysprof-mark-visualizer-row.h',
|
||||
'sysprof-model-filter.h',
|
||||
'sysprof-multi-paned.h',
|
||||
|
||||
58
src/libsysprof-ui/sysprof-marks-view.c
Normal file
58
src/libsysprof-ui/sysprof-marks-view.c
Normal file
@ -0,0 +1,58 @@
|
||||
/* sysprof-marks-view.c
|
||||
*
|
||||
* Copyright 2019 Christian Hergert <chergert@redhat.com>
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#define G_LOG_DOMAIN "sysprof-marks-view"
|
||||
|
||||
#include "sysprof-marks-view.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkTreeView *tree_view;
|
||||
} SysprofMarksViewPrivate;
|
||||
|
||||
G_DEFINE_TYPE (SysprofMarksView, sysprof_marks_view, GTK_TYPE_BIN)
|
||||
|
||||
static void
|
||||
sysprof_marks_view_class_init (SysprofMarksViewClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/ui/sysprof-marks-view.ui");
|
||||
gtk_widget_class_bind_template_child_private (widget_class, SysprofMarksView, tree_view);
|
||||
}
|
||||
|
||||
static void
|
||||
sysprof_marks_view_init (SysprofMarksView *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
sysprof_marks_view_new (void)
|
||||
{
|
||||
return g_object_new (SYSPROF_TYPE_MARKS_VIEW, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
sysprof_marks_view_set_reader (SysprofMarksView *self,
|
||||
SysprofCaptureReader *reader)
|
||||
{
|
||||
g_return_if_fail (SYSPROF_IS_MARKS_VIEW (self));
|
||||
}
|
||||
47
src/libsysprof-ui/sysprof-marks-view.h
Normal file
47
src/libsysprof-ui/sysprof-marks-view.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* sysprof-marks-view.h
|
||||
*
|
||||
* Copyright 2019 Christian Hergert <chergert@redhat.com>
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <sysprof-capture.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define SYSPROF_TYPE_MARKS_VIEW (sysprof_marks_view_get_type())
|
||||
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
G_DECLARE_DERIVABLE_TYPE (SysprofMarksView, sysprof_marks_view, SYSPROF, MARKS_VIEW, GtkBin)
|
||||
|
||||
struct _SysprofMarksViewClass
|
||||
{
|
||||
GtkBinClass parent_class;
|
||||
|
||||
/*< private >*/
|
||||
gpointer _reserved[16];
|
||||
};
|
||||
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
GtkWidget *sysprof_marks_view_new (void);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
void sysprof_marks_view_set_reader (SysprofMarksView *self,
|
||||
SysprofCaptureReader *reader);
|
||||
|
||||
G_END_DECLS
|
||||
@ -29,14 +29,16 @@ G_BEGIN_DECLS
|
||||
# include "sysprof-callgraph-view.h"
|
||||
# include "sysprof-cell-renderer-percent.h"
|
||||
# include "sysprof-cpu-visualizer-row.h"
|
||||
# include "sysprof-empty-state-view.h"
|
||||
# include "sysprof-failed-state-view.h"
|
||||
# include "sysprof-line-visualizer-row.h"
|
||||
# include "sysprof-empty-state-view.h"
|
||||
# include "sysprof-marks-view.h"
|
||||
# include "sysprof-mark-visualizer-row.h"
|
||||
# include "sysprof-model-filter.h"
|
||||
# include "sysprof-multi-paned.h"
|
||||
# include "sysprof-recording-state-view.h"
|
||||
# include "sysprof-process-model-row.h"
|
||||
# include "sysprof-profiler-menu-button.h"
|
||||
# include "sysprof-recording-state-view.h"
|
||||
# include "sysprof-visualizer-row.h"
|
||||
# include "sysprof-visualizer-view.h"
|
||||
# include "sysprof-zoom-manager.h"
|
||||
|
||||
33
src/libsysprof-ui/ui/sysprof-marks-view.ui
Normal file
33
src/libsysprof-ui/ui/sysprof-marks-view.ui
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="SysprofMarksView" parent="GtkBin">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scroller">
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="tree_view">
|
||||
<property name="headers-visible">true</property>
|
||||
<property name="visible">true</property>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="text_column">
|
||||
<property name="title" translatable="yes">Mark</property>
|
||||
<property name="expand">false</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="text_cell">
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="duration_column">
|
||||
<property name="title" translatable="yes">Duration</property>
|
||||
<property name="expand">true</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
Reference in New Issue
Block a user