[tepl] Statusbar: class skeleton
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] Statusbar: class skeleton
- Date: Sun, 19 Apr 2020 23:22:45 +0000 (UTC)
commit 6a1cce0644a193e6c7fc9249219fb1fd72354e58
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Apr 20 00:20:16 2020 +0200
Statusbar: class skeleton
docs/reference/tepl-docs.xml | 1 +
docs/reference/tepl-sections.txt | 16 ++++++++++
po/POTFILES.in | 1 +
tepl/meson.build | 2 ++
tepl/tepl-statusbar.c | 66 ++++++++++++++++++++++++++++++++++++++++
tepl/tepl-statusbar.h | 62 +++++++++++++++++++++++++++++++++++++
tepl/tepl.h | 1 +
7 files changed, 149 insertions(+)
---
diff --git a/docs/reference/tepl-docs.xml b/docs/reference/tepl-docs.xml
index bf23649..9903a03 100644
--- a/docs/reference/tepl-docs.xml
+++ b/docs/reference/tepl-docs.xml
@@ -65,6 +65,7 @@
<title>Misc</title>
<xi:include href="xml/info-bar.xml"/>
<xi:include href="xml/iter.xml"/>
+ <xi:include href="xml/statusbar.xml"/>
<xi:include href="xml/utils.xml"/>
</chapter>
</part>
diff --git a/docs/reference/tepl-sections.txt b/docs/reference/tepl-sections.txt
index 6cbfcce..76a6736 100644
--- a/docs/reference/tepl-sections.txt
+++ b/docs/reference/tepl-sections.txt
@@ -318,6 +318,22 @@ TeplMetadataManagerPrivate
tepl_metadata_manager_get_type
</SECTION>
+<SECTION>
+<FILE>statusbar</FILE>
+TeplStatusbar
+tepl_statusbar_new
+<SUBSECTION Standard>
+TEPL_IS_STATUSBAR
+TEPL_IS_STATUSBAR_CLASS
+TEPL_STATUSBAR
+TEPL_STATUSBAR_CLASS
+TEPL_STATUSBAR_GET_CLASS
+TEPL_TYPE_STATUSBAR
+TeplStatusbarClass
+TeplStatusbarPrivate
+tepl_statusbar_get_type
+</SECTION>
+
<SECTION>
<FILE>tab</FILE>
TeplTab
diff --git a/po/POTFILES.in b/po/POTFILES.in
index fe423ae..db4eb68 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -23,6 +23,7 @@ tepl/tepl-metadata-manager.c
tepl/tepl-metadata-parser.c
tepl/tepl-notebook.c
tepl/tepl-signal-group.c
+tepl/tepl-statusbar.c
tepl/tepl-tab.c
tepl/tepl-tab-group.c
tepl/tepl-tab-label.c
diff --git a/tepl/meson.build b/tepl/meson.build
index 5bad8a3..7aea597 100644
--- a/tepl/meson.build
+++ b/tepl/meson.build
@@ -18,6 +18,7 @@ tepl_public_headers = [
'tepl-metadata.h',
'tepl-metadata-manager.h',
'tepl-notebook.h',
+ 'tepl-statusbar.h',
'tepl-tab.h',
'tepl-tab-group.h',
'tepl-tab-label.h',
@@ -44,6 +45,7 @@ tepl_public_c_files = [
'tepl-metadata.c',
'tepl-metadata-manager.c',
'tepl-notebook.c',
+ 'tepl-statusbar.c',
'tepl-tab.c',
'tepl-tab-group.c',
'tepl-tab-label.c',
diff --git a/tepl/tepl-statusbar.c b/tepl/tepl-statusbar.c
new file mode 100644
index 0000000..d2699ed
--- /dev/null
+++ b/tepl/tepl-statusbar.c
@@ -0,0 +1,66 @@
+/*
+ * This file is part of Tepl, a text editor library.
+ *
+ * Copyright 2020 - Sébastien Wilmet <swilmet gnome org>
+ *
+ * Tepl 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.1 of the License, or (at your
+ * option) any later version.
+ *
+ * Tepl 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 "tepl-statusbar.h"
+
+/**
+ * SECTION:statusbar
+ * @Title: TeplStatusbar
+ * @Short_description: Subclass of #GtkStatusbar
+ */
+
+struct _TeplStatusbarPrivate
+{
+ gint something;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (TeplStatusbar, tepl_statusbar, GTK_TYPE_STATUSBAR)
+
+static void
+tepl_statusbar_finalize (GObject *object)
+{
+
+ G_OBJECT_CLASS (tepl_statusbar_parent_class)->finalize (object);
+}
+
+static void
+tepl_statusbar_class_init (TeplStatusbarClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = tepl_statusbar_finalize;
+}
+
+static void
+tepl_statusbar_init (TeplStatusbar *statusbar)
+{
+ statusbar->priv = tepl_statusbar_get_instance_private (statusbar);
+}
+
+/**
+ * tepl_statusbar_new:
+ *
+ * Returns: (transfer floating): a new #TeplStatusbar.
+ * Since: 5.0
+ */
+TeplStatusbar *
+tepl_statusbar_new (void)
+{
+ return g_object_new (TEPL_TYPE_STATUSBAR, NULL);
+}
diff --git a/tepl/tepl-statusbar.h b/tepl/tepl-statusbar.h
new file mode 100644
index 0000000..a80fb8a
--- /dev/null
+++ b/tepl/tepl-statusbar.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Tepl, a text editor library.
+ *
+ * Copyright 2020 - Sébastien Wilmet <swilmet gnome org>
+ *
+ * Tepl 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.1 of the License, or (at your
+ * option) any later version.
+ *
+ * Tepl 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 TEPL_STATUSBAR_H
+#define TEPL_STATUSBAR_H
+
+#if !defined (TEPL_H_INSIDE) && !defined (TEPL_COMPILATION)
+#error "Only <tepl/tepl.h> can be included directly."
+#endif
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define TEPL_TYPE_STATUSBAR (tepl_statusbar_get_type ())
+#define TEPL_STATUSBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEPL_TYPE_STATUSBAR,
TeplStatusbar))
+#define TEPL_STATUSBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEPL_TYPE_STATUSBAR,
TeplStatusbarClass))
+#define TEPL_IS_STATUSBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEPL_TYPE_STATUSBAR))
+#define TEPL_IS_STATUSBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TEPL_TYPE_STATUSBAR))
+#define TEPL_STATUSBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEPL_TYPE_STATUSBAR,
TeplStatusbarClass))
+
+typedef struct _TeplStatusbar TeplStatusbar;
+typedef struct _TeplStatusbarClass TeplStatusbarClass;
+typedef struct _TeplStatusbarPrivate TeplStatusbarPrivate;
+
+struct _TeplStatusbar
+{
+ GtkStatusbar parent;
+
+ TeplStatusbarPrivate *priv;
+};
+
+struct _TeplStatusbarClass
+{
+ GtkStatusbarClass parent_class;
+
+ gpointer padding[12];
+};
+
+GType tepl_statusbar_get_type (void);
+
+TeplStatusbar * tepl_statusbar_new (void);
+
+G_END_DECLS
+
+#endif /* TEPL_STATUSBAR_H */
diff --git a/tepl/tepl.h b/tepl/tepl.h
index 9efa715..d54d0f1 100644
--- a/tepl/tepl.h
+++ b/tepl/tepl.h
@@ -44,6 +44,7 @@
#include <tepl/tepl-metadata.h>
#include <tepl/tepl-metadata-manager.h>
#include <tepl/tepl-notebook.h>
+#include <tepl/tepl-statusbar.h>
#include <tepl/tepl-tab.h>
#include <tepl/tepl-tab-group.h>
#include <tepl/tepl-tab-label.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]