[gtk+/wip/otte/recorder: 1/4] inspector: Add outline for a new "recorder" tab
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/recorder: 1/4] inspector: Add outline for a new "recorder" tab
- Date: Mon, 31 Oct 2016 15:44:25 +0000 (UTC)
commit c9197103f8eeafc00ad28827b82644f1fa3d7893
Author: Benjamin Otte <otte redhat com>
Date: Sat Oct 29 21:11:23 2016 +0200
inspector: Add outline for a new "recorder" tab
gtk/inspector/Makefile.inc | 3 ++
gtk/inspector/init.c | 4 +++
gtk/inspector/recorder.c | 46 +++++++++++++++++++++++++++++++++++++++
gtk/inspector/recorder.h | 51 ++++++++++++++++++++++++++++++++++++++++++++
gtk/inspector/recorder.ui | 25 +++++++++++++++++++++
gtk/inspector/window.c | 1 +
gtk/inspector/window.h | 1 +
gtk/inspector/window.ui | 17 ++++++++++++++
8 files changed, 148 insertions(+), 0 deletions(-)
---
diff --git a/gtk/inspector/Makefile.inc b/gtk/inspector/Makefile.inc
index 7641d3a..61adc38 100644
--- a/gtk/inspector/Makefile.inc
+++ b/gtk/inspector/Makefile.inc
@@ -19,6 +19,7 @@ inspector_c_sources = \
inspector/object-tree.c \
inspector/prop-editor.c \
inspector/prop-list.c \
+ inspector/recorder.c \
inspector/resource-list.c \
inspector/selector.c \
inspector/signals-list.c \
@@ -49,6 +50,7 @@ inspector_h_sources = \
inspector/object-tree.h \
inspector/prop-editor.h \
inspector/prop-list.h \
+ inspector/recorder.h \
inspector/resource-list.h \
inspector/selector.h \
inspector/signals-list.h \
@@ -71,6 +73,7 @@ inspector_templates = \
inspector/object-hierarchy.ui \
inspector/object-tree.ui \
inspector/prop-list.ui \
+ inspector/recorder.ui \
inspector/resource-list.ui \
inspector/selector.ui \
inspector/signals-list.ui \
diff --git a/gtk/inspector/init.c b/gtk/inspector/init.c
index 53a9b9e..159c1f0 100644
--- a/gtk/inspector/init.c
+++ b/gtk/inspector/init.c
@@ -38,6 +38,7 @@
#include "object-hierarchy.h"
#include "object-tree.h"
#include "prop-list.h"
+#include "recorder.h"
#include "resource-list.h"
#include "selector.h"
#include "signals-list.h"
@@ -56,6 +57,8 @@ gtk_inspector_init (void)
{
static GIOExtensionPoint *extension_point = NULL;
+ g_type_ensure (G_TYPE_LIST_STORE);
+
g_type_ensure (GTK_TYPE_CELL_RENDERER_GRAPH);
g_type_ensure (GTK_TYPE_GRAPH_DATA);
g_type_ensure (GTK_TYPE_INSPECTOR_ACTIONS);
@@ -71,6 +74,7 @@ gtk_inspector_init (void)
g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_HIERARCHY);
g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_TREE);
g_type_ensure (GTK_TYPE_INSPECTOR_PROP_LIST);
+ g_type_ensure (GTK_TYPE_INSPECTOR_RECORDER);
g_type_ensure (GTK_TYPE_INSPECTOR_RESOURCE_LIST);
g_type_ensure (GTK_TYPE_INSPECTOR_SELECTOR);
g_type_ensure (GTK_TYPE_INSPECTOR_SIGNALS_LIST);
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
new file mode 100644
index 0000000..c545552
--- /dev/null
+++ b/gtk/inspector/recorder.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+
+#include "recorder.h"
+
+struct _GtkInspectorRecorderPrivate
+{
+ GListStore *recordings;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (GtkInspectorRecorder, gtk_inspector_recorder, GTK_TYPE_BIN)
+
+static void
+gtk_inspector_recorder_class_init (GtkInspectorRecorderClass *klass)
+{
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/recorder.ui");
+
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorRecorder, recordings);
+}
+
+static void
+gtk_inspector_recorder_init (GtkInspectorRecorder *vis)
+{
+ gtk_widget_init_template (GTK_WIDGET (vis));
+}
+
+// vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/recorder.h b/gtk/inspector/recorder.h
new file mode 100644
index 0000000..7684a7c
--- /dev/null
+++ b/gtk/inspector/recorder.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _GTK_INSPECTOR_RECORDER_H_
+#define _GTK_INSPECTOR_RECORDER_H_
+
+#include <gtk/gtkbin.h>
+
+#define GTK_TYPE_INSPECTOR_RECORDER (gtk_inspector_recorder_get_type())
+#define GTK_INSPECTOR_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),
GTK_TYPE_INSPECTOR_RECORDER, GtkInspectorRecorder))
+#define GTK_INSPECTOR_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),
GTK_TYPE_INSPECTOR_RECORDER, GtkInspectorRecorderClass))
+#define GTK_INSPECTOR_IS_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),
GTK_TYPE_INSPECTOR_RECORDER))
+#define GTK_INSPECTOR_IS_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),
GTK_TYPE_INSPECTOR_RECORDER))
+#define GTK_INSPECTOR_RECORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),
GTK_TYPE_INSPECTOR_RECORDER, GtkInspectorRecorderClass))
+
+
+typedef struct _GtkInspectorRecorderPrivate GtkInspectorRecorderPrivate;
+
+typedef struct _GtkInspectorRecorder
+{
+ GtkBin parent;
+} GtkInspectorRecorder;
+
+typedef struct _GtkInspectorRecorderClass
+{
+ GtkBinClass parent;
+} GtkInspectorRecorderClass;
+
+G_BEGIN_DECLS
+
+GType gtk_inspector_recorder_get_type (void);
+
+G_END_DECLS
+
+#endif // _GTK_INSPECTOR_RECORDER_H_
+
+// vim: set et sw=2 ts=2:
diff --git a/gtk/inspector/recorder.ui b/gtk/inspector/recorder.ui
new file mode 100644
index 0000000..ca23b23
--- /dev/null
+++ b/gtk/inspector/recorder.ui
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="gtk40">
+ <object class="GListStore" id="recordings">
+ </object>
+ <template class="GtkInspectorRecorder" parent="GtkBin">
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkPaned">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkListBox" id="visual_box">
+ <property name="visible">True</property>
+ <property name="selection-mode">single</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c
index fcbc33f..9f84a5c 100644
--- a/gtk/inspector/window.c
+++ b/gtk/inspector/window.c
@@ -263,6 +263,7 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, child_prop_list);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, signals_list);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_css_node_tree);
+ gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, widget_recorder);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_hierarchy);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, object_title);
gtk_widget_class_bind_template_child (widget_class, GtkInspectorWindow, selector);
diff --git a/gtk/inspector/window.h b/gtk/inspector/window.h
index 8aef581..13d066a 100644
--- a/gtk/inspector/window.h
+++ b/gtk/inspector/window.h
@@ -60,6 +60,7 @@ typedef struct
GtkWidget *style_prop_list;
GtkWidget *classes_list;
GtkWidget *widget_css_node_tree;
+ GtkWidget *widget_recorder;
GtkWidget *object_hierarchy;
GtkWidget *size_groups;
GtkWidget *data_list;
diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui
index 226a707..6228375 100644
--- a/gtk/inspector/window.ui
+++ b/gtk/inspector/window.ui
@@ -135,6 +135,14 @@
<property name="visible">1</property>
</object>
<packing>
+ <property name="name">recorder</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">1</property>
+ </object>
+ <packing>
<property name="name">visual</property>
</packing>
</child>
@@ -448,6 +456,15 @@
</packing>
</child>
<child>
+ <object class="GtkInspectorRecorder" id="widget_recorder">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="name">recorder</property>
+ <property name="title" translatable="yes">Recorder</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkInspectorVisual">
<property name="visible">True</property>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]