[tepl] GotoLineBar: class skeleton
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] GotoLineBar: class skeleton
- Date: Sat, 25 Apr 2020 13:40:48 +0000 (UTC)
commit 695006b5475eaa514f719c2ecd3cb006710d8688
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Apr 24 16:54:12 2020 +0200
GotoLineBar: class skeleton
po/POTFILES.in | 1 +
tepl/meson.build | 2 ++
tepl/tepl-goto-line-bar.c | 54 +++++++++++++++++++++++++++++++++++++++++
tepl/tepl-goto-line-bar.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++
tepl/tepl.h | 1 +
5 files changed, 120 insertions(+)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 771f78a..78fcf4d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -12,6 +12,7 @@ tepl/tepl-file-content.c
tepl/tepl-file-content-loader.c
tepl/tepl-file-loader.c
tepl/tepl-file-saver.c
+tepl/tepl-goto-line-bar.c
tepl/tepl-info-bar.c
tepl/tepl-init.c
tepl/tepl-io-error-info-bars.c
diff --git a/tepl/meson.build b/tepl/meson.build
index b4964d2..794c64e 100644
--- a/tepl/meson.build
+++ b/tepl/meson.build
@@ -9,6 +9,7 @@ tepl_public_headers = [
'tepl-file-loader.h',
'tepl-file-saver.h',
'tepl-fold-region.h',
+ 'tepl-goto-line-bar.h',
'tepl-gutter-renderer-folds.h',
'tepl-info-bar.h',
'tepl-init.h',
@@ -38,6 +39,7 @@ tepl_public_c_files = [
'tepl-file-loader.c',
'tepl-file-saver.c',
'tepl-fold-region.c',
+ 'tepl-goto-line-bar.c',
'tepl-gutter-renderer-folds.c',
'tepl-info-bar.c',
'tepl-init.c',
diff --git a/tepl/tepl-goto-line-bar.c b/tepl/tepl-goto-line-bar.c
new file mode 100644
index 0000000..acaa680
--- /dev/null
+++ b/tepl/tepl-goto-line-bar.c
@@ -0,0 +1,54 @@
+/*
+ * 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-goto-line-bar.h"
+
+struct _TeplGotoLineBarPrivate
+{
+ gint something;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE (TeplGotoLineBar, tepl_goto_line_bar, GTK_TYPE_GRID)
+
+static void
+tepl_goto_line_bar_dispose (GObject *object)
+{
+
+ G_OBJECT_CLASS (tepl_goto_line_bar_parent_class)->dispose (object);
+}
+
+static void
+tepl_goto_line_bar_class_init (TeplGotoLineBarClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->dispose = tepl_goto_line_bar_dispose;
+}
+
+static void
+tepl_goto_line_bar_init (TeplGotoLineBar *bar)
+{
+ bar->priv = tepl_goto_line_bar_get_instance_private (bar);
+}
+
+TeplGotoLineBar *
+tepl_goto_line_bar_new (void)
+{
+ return g_object_new (TEPL_TYPE_GOTO_LINE_BAR, NULL);
+}
diff --git a/tepl/tepl-goto-line-bar.h b/tepl/tepl-goto-line-bar.h
new file mode 100644
index 0000000..5644363
--- /dev/null
+++ b/tepl/tepl-goto-line-bar.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_GOTO_LINE_BAR_H
+#define TEPL_GOTO_LINE_BAR_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_GOTO_LINE_BAR (tepl_goto_line_bar_get_type ())
+#define TEPL_GOTO_LINE_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEPL_TYPE_GOTO_LINE_BAR,
TeplGotoLineBar))
+#define TEPL_GOTO_LINE_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TEPL_TYPE_GOTO_LINE_BAR,
TeplGotoLineBarClass))
+#define TEPL_IS_GOTO_LINE_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEPL_TYPE_GOTO_LINE_BAR))
+#define TEPL_IS_GOTO_LINE_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TEPL_TYPE_GOTO_LINE_BAR))
+#define TEPL_GOTO_LINE_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TEPL_TYPE_GOTO_LINE_BAR,
TeplGotoLineBarClass))
+
+typedef struct _TeplGotoLineBar TeplGotoLineBar;
+typedef struct _TeplGotoLineBarClass TeplGotoLineBarClass;
+typedef struct _TeplGotoLineBarPrivate TeplGotoLineBarPrivate;
+
+struct _TeplGotoLineBar
+{
+ GtkGrid parent;
+
+ TeplGotoLineBarPrivate *priv;
+};
+
+struct _TeplGotoLineBarClass
+{
+ GtkGridClass parent_class;
+
+ gpointer padding[12];
+};
+
+GType tepl_goto_line_bar_get_type (void);
+
+TeplGotoLineBar * tepl_goto_line_bar_new (void);
+
+G_END_DECLS
+
+#endif /* TEPL_GOTO_LINE_BAR_H */
diff --git a/tepl/tepl.h b/tepl/tepl.h
index d32aad8..34569ec 100644
--- a/tepl/tepl.h
+++ b/tepl/tepl.h
@@ -35,6 +35,7 @@
#include <tepl/tepl-file-loader.h>
#include <tepl/tepl-file-saver.h>
#include <tepl/tepl-fold-region.h>
+#include <tepl/tepl-goto-line-bar.h>
#include <tepl/tepl-gutter-renderer-folds.h>
#include <tepl/tepl-info-bar.h>
#include <tepl/tepl-init.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]