[gnome-builder/wip/gtk4-port: 332/343] libide/sourceview: add textutil to public API
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 332/343] libide/sourceview: add textutil to public API
- Date: Mon, 4 Apr 2022 20:02:25 +0000 (UTC)
commit 47ea2ab517a0f6307f0a23f9292f04e5e55210c5
Author: Christian Hergert <chergert redhat com>
Date: Sun Apr 3 16:19:13 2022 -0700
libide/sourceview: add textutil to public API
src/libide/sourceview/ide-text-util.c | 4 ++++
src/libide/sourceview/ide-text-util.h | 10 +++++++++-
src/libide/sourceview/libide-sourceview.h | 1 +
src/libide/sourceview/meson.build | 3 ++-
4 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/sourceview/ide-text-util.c b/src/libide/sourceview/ide-text-util.c
index 33172c1b8..f166a1191 100644
--- a/src/libide/sourceview/ide-text-util.c
+++ b/src/libide/sourceview/ide-text-util.c
@@ -22,6 +22,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
+#define G_LOG_DOMAIN "ide-text-util"
+
+#include "config.h"
+
#include "ide-text-util.h"
void
diff --git a/src/libide/sourceview/ide-text-util.h b/src/libide/sourceview/ide-text-util.h
index 31a49411a..2080ce3a5 100644
--- a/src/libide/sourceview/ide-text-util.h
+++ b/src/libide/sourceview/ide-text-util.h
@@ -20,12 +20,20 @@
#pragma once
-#include <gtksourceview/gtksource.h>
+#if !defined (IDE_SOURCEVIEW_INSIDE) && !defined (IDE_SOURCEVIEW_COMPILATION)
+# error "Only <libide-sourceview.h> can be included directly."
+#endif
+
+#include <gtk/gtk.h>
+
+#include <libide-core.h>
G_BEGIN_DECLS
+IDE_AVAILABLE_IN_ALL
void ide_text_util_delete_line (GtkTextView *text_view,
int count);
+IDE_AVAILABLE_IN_ALL
void ide_text_util_remove_common_prefix (GtkTextIter *begin,
const gchar *prefix);
diff --git a/src/libide/sourceview/libide-sourceview.h b/src/libide/sourceview/libide-sourceview.h
index 6b0654e7e..597c2e60e 100644
--- a/src/libide/sourceview/libide-sourceview.h
+++ b/src/libide/sourceview/libide-sourceview.h
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
#include "ide-line-change-gutter-renderer.h"
#include "ide-source-view.h"
+#include "ide-text-util.h"
#define IDE_SOURCEVIEW_INSIDE
diff --git a/src/libide/sourceview/meson.build b/src/libide/sourceview/meson.build
index a4a3dde8a..957dbc985 100644
--- a/src/libide/sourceview/meson.build
+++ b/src/libide/sourceview/meson.build
@@ -16,6 +16,7 @@ libide_sourceview_private_headers = [
libide_sourceview_public_headers = [
'ide-line-change-gutter-renderer.h',
'ide-source-view.h',
+ 'ide-text-util.h',
'libide-sourceview.h',
]
@@ -30,12 +31,12 @@ install_headers(libide_sourceview_public_headers, subdir: libide_sourceview_head
#
libide_sourceview_private_sources = [
- 'ide-text-util.c',
]
libide_sourceview_public_sources = [
'ide-line-change-gutter-renderer.c',
'ide-source-view.c',
+ 'ide-text-util.c',
]
#
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]