[gtksourceview/wip/chergert/gsv-gtk4: 24/84] scheme: add gtksourcestylescheme-private.h



commit dec17ae14a2395343a1ec834eb9cefece16d988a
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 9 13:04:30 2020 -0800

    scheme: add gtksourcestylescheme-private.h

 docs/reference/meson.build                        |  1 +
 gtksourceview/gtksourcebuffer.c                   |  2 +-
 gtksourceview/gtksourcespacedrawer.c              |  2 +-
 gtksourceview/gtksourcestylescheme-private.h      | 55 +++++++++++++++++++++++
 gtksourceview/gtksourcestylescheme.c              |  1 +
 gtksourceview/gtksourcestylescheme.h              | 41 +++--------------
 gtksourceview/gtksourcestyleschemechooserbutton.c |  5 ++-
 gtksourceview/gtksourcestyleschemechooserwidget.c |  2 +-
 gtksourceview/gtksourcestyleschememanager.c       |  2 +-
 gtksourceview/gtksourceview.c                     |  2 +-
 testsuite/test-stylescheme.c                      |  1 +
 11 files changed, 73 insertions(+), 41 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 7d799f51..be89e4c6 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -35,6 +35,7 @@ reference_private_h = [
   'gtksourcepixbufhelper.h',
   'gtksourceregex.h',
   'gtksourcestyle-private.h',
+  'gtksourcestylescheme-private.h',
   'gtksourcestyleschememanager-private.h',
   'gtksourcetypes-private.h',
   'gtksourceundomanagerdefault.h',
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index 76c5ef05..bc32d2b1 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -37,7 +37,7 @@
 #include "gtksourceundomanager.h"
 #include "gtksourceundomanagerdefault.h"
 #include "gtksourcestyle.h"
-#include "gtksourcestylescheme.h"
+#include "gtksourcestylescheme-private.h"
 #include "gtksourcestyleschememanager.h"
 #include "gtksourcemark.h"
 #include "gtksourcemarkssequence.h"
diff --git a/gtksourceview/gtksourcespacedrawer.c b/gtksourceview/gtksourcespacedrawer.c
index 5b95e56c..51ed4219 100644
--- a/gtksourceview/gtksourcespacedrawer.c
+++ b/gtksourceview/gtksourcespacedrawer.c
@@ -30,7 +30,7 @@
 #include "gtksourcebuffer.h"
 #include "gtksourcebuffer-private.h"
 #include "gtksourceiter-private.h"
-#include "gtksourcestylescheme.h"
+#include "gtksourcestylescheme-private.h"
 #include "gtksourcetag.h"
 #include "gtksourceview.h"
 
diff --git a/gtksourceview/gtksourcestylescheme-private.h b/gtksourceview/gtksourcestylescheme-private.h
new file mode 100644
index 00000000..c2846eea
--- /dev/null
+++ b/gtksourceview/gtksourcestylescheme-private.h
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
+ *
+ * This file is part of GtkSourceView
+ *
+ * Copyright 2003 - Paolo Maggi <paolo maggi polito it>
+ *
+ * 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.1 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/>.
+ */
+
+#pragma once
+
+#include "gtksourcestylescheme.h"
+
+G_BEGIN_DECLS
+
+G_GNUC_INTERNAL
+GtkSourceStyleScheme *_gtk_source_style_scheme_new_from_file                (const gchar          *filename);
+G_GNUC_INTERNAL
+GtkSourceStyleScheme *_gtk_source_style_scheme_get_default                  (void);
+G_GNUC_INTERNAL
+const gchar          *_gtk_source_style_scheme_get_parent_id                (GtkSourceStyleScheme *scheme);
+G_GNUC_INTERNAL
+void                  _gtk_source_style_scheme_set_parent                   (GtkSourceStyleScheme *scheme,
+                                                                             GtkSourceStyleScheme 
*parent_scheme);
+G_GNUC_INTERNAL
+void                  _gtk_source_style_scheme_apply                        (GtkSourceStyleScheme *scheme,
+                                                                             GtkSourceView        *view);
+G_GNUC_INTERNAL
+void                  _gtk_source_style_scheme_unapply                      (GtkSourceStyleScheme *scheme,
+                                                                             GtkSourceView        *view);
+G_GNUC_INTERNAL
+GtkSourceStyle       *_gtk_source_style_scheme_get_matching_brackets_style  (GtkSourceStyleScheme *scheme);
+G_GNUC_INTERNAL
+GtkSourceStyle       *_gtk_source_style_scheme_get_right_margin_style       (GtkSourceStyleScheme *scheme);
+G_GNUC_INTERNAL
+GtkSourceStyle       *_gtk_source_style_scheme_get_draw_spaces_style        (GtkSourceStyleScheme *scheme);
+G_GNUC_INTERNAL
+gboolean              _gtk_source_style_scheme_get_current_line_color       (GtkSourceStyleScheme *scheme,
+                                                                             GdkRGBA              *color);
+G_GNUC_INTERNAL
+gboolean              _gtk_source_style_scheme_get_background_pattern_color (GtkSourceStyleScheme *scheme,
+                                                                             GdkRGBA              *color);
+
+G_END_DECLS
diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
index bbba653f..668585e6 100644
--- a/gtksourceview/gtksourcestylescheme.c
+++ b/gtksourceview/gtksourcestylescheme.c
@@ -25,6 +25,7 @@
 #include <glib/gi18n-lib.h>
 
 #include "gtksourcestylescheme.h"
+#include "gtksourcestylescheme-private.h"
 #include "gtksourcestyleschememanager.h"
 #include "gtksourcestyle.h"
 #include "gtksourcestyle-private.h"
diff --git a/gtksourceview/gtksourcestylescheme.h b/gtksourceview/gtksourcestylescheme.h
index a4d2aa6f..6f4dbee8 100644
--- a/gtksourceview/gtksourcestylescheme.h
+++ b/gtksourceview/gtksourcestylescheme.h
@@ -35,44 +35,17 @@ GTK_SOURCE_AVAILABLE_IN_ALL
 G_DECLARE_FINAL_TYPE (GtkSourceStyleScheme, gtk_source_style_scheme, GTK_SOURCE, STYLE_SCHEME, GObject)
 
 GTK_SOURCE_AVAILABLE_IN_ALL
-const gchar          *gtk_source_style_scheme_get_id                        (GtkSourceStyleScheme *scheme);
+const gchar         *gtk_source_style_scheme_get_id          (GtkSourceStyleScheme *scheme);
 GTK_SOURCE_AVAILABLE_IN_ALL
-const gchar          *gtk_source_style_scheme_get_name                      (GtkSourceStyleScheme *scheme);
+const gchar         *gtk_source_style_scheme_get_name        (GtkSourceStyleScheme *scheme);
 GTK_SOURCE_AVAILABLE_IN_ALL
-const gchar          *gtk_source_style_scheme_get_description               (GtkSourceStyleScheme *scheme);
+const gchar         *gtk_source_style_scheme_get_description (GtkSourceStyleScheme *scheme);
 GTK_SOURCE_AVAILABLE_IN_ALL
-const gchar * const  *gtk_source_style_scheme_get_authors                   (GtkSourceStyleScheme *scheme);
+const gchar * const *gtk_source_style_scheme_get_authors     (GtkSourceStyleScheme *scheme);
 GTK_SOURCE_AVAILABLE_IN_ALL
-const gchar          *gtk_source_style_scheme_get_filename                  (GtkSourceStyleScheme *scheme);
+const gchar         *gtk_source_style_scheme_get_filename    (GtkSourceStyleScheme *scheme);
 GTK_SOURCE_AVAILABLE_IN_ALL
-GtkSourceStyle       *gtk_source_style_scheme_get_style                     (GtkSourceStyleScheme *scheme,
-                                                                             const gchar          *style_id);
-G_GNUC_INTERNAL
-GtkSourceStyleScheme *_gtk_source_style_scheme_new_from_file                (const gchar          *filename);
-G_GNUC_INTERNAL
-GtkSourceStyleScheme *_gtk_source_style_scheme_get_default                  (void);
-G_GNUC_INTERNAL
-const gchar          *_gtk_source_style_scheme_get_parent_id                (GtkSourceStyleScheme *scheme);
-G_GNUC_INTERNAL
-void                  _gtk_source_style_scheme_set_parent                   (GtkSourceStyleScheme *scheme,
-                                                                             GtkSourceStyleScheme 
*parent_scheme);
-G_GNUC_INTERNAL
-void                  _gtk_source_style_scheme_apply                        (GtkSourceStyleScheme *scheme,
-                                                                             GtkSourceView        *view);
-G_GNUC_INTERNAL
-void                  _gtk_source_style_scheme_unapply                      (GtkSourceStyleScheme *scheme,
-                                                                             GtkSourceView        *view);
-G_GNUC_INTERNAL
-GtkSourceStyle       *_gtk_source_style_scheme_get_matching_brackets_style  (GtkSourceStyleScheme *scheme);
-G_GNUC_INTERNAL
-GtkSourceStyle       *_gtk_source_style_scheme_get_right_margin_style       (GtkSourceStyleScheme *scheme);
-G_GNUC_INTERNAL
-GtkSourceStyle       *_gtk_source_style_scheme_get_draw_spaces_style        (GtkSourceStyleScheme *scheme);
-G_GNUC_INTERNAL
-gboolean              _gtk_source_style_scheme_get_current_line_color       (GtkSourceStyleScheme *scheme,
-                                                                             GdkRGBA              *color);
-G_GNUC_INTERNAL
-gboolean              _gtk_source_style_scheme_get_background_pattern_color (GtkSourceStyleScheme *scheme,
-                                                                             GdkRGBA              *color);
+GtkSourceStyle      *gtk_source_style_scheme_get_style       (GtkSourceStyleScheme *scheme,
+                                                              const gchar          *style_id);
 
 G_END_DECLS
diff --git a/gtksourceview/gtksourcestyleschemechooserbutton.c 
b/gtksourceview/gtksourcestyleschemechooserbutton.c
index 939a91fa..fb69c0cb 100644
--- a/gtksourceview/gtksourcestyleschemechooserbutton.c
+++ b/gtksourceview/gtksourcestyleschemechooserbutton.c
@@ -21,11 +21,12 @@
 
 #include "config.h"
 
-#include "gtksourcestyleschemechooserbutton.h"
 #include <glib/gi18n-lib.h>
+
+#include "gtksourcestyleschemechooserbutton.h"
 #include "gtksourcestyleschemechooser.h"
 #include "gtksourcestyleschemechooserwidget.h"
-#include "gtksourcestylescheme.h"
+#include "gtksourcestylescheme-private.h"
 
 /**
  * SECTION:styleschemechooserbutton
diff --git a/gtksourceview/gtksourcestyleschemechooserwidget.c 
b/gtksourceview/gtksourcestyleschemechooserwidget.c
index 0f00adf5..68175b51 100644
--- a/gtksourceview/gtksourcestyleschemechooserwidget.c
+++ b/gtksourceview/gtksourcestyleschemechooserwidget.c
@@ -23,7 +23,7 @@
 
 #include "gtksourcestyleschemechooserwidget.h"
 #include "gtksourcestyleschemechooser.h"
-#include "gtksourcestylescheme.h"
+#include "gtksourcestylescheme-private.h"
 #include "gtksourcestyleschememanager.h"
 #include "gtksourcelanguage.h"
 #include "gtksourcelanguagemanager.h"
diff --git a/gtksourceview/gtksourcestyleschememanager.c b/gtksourceview/gtksourcestyleschememanager.c
index fc0f9586..d609d3f5 100644
--- a/gtksourceview/gtksourcestyleschememanager.c
+++ b/gtksourceview/gtksourcestyleschememanager.c
@@ -23,7 +23,7 @@
 #include <string.h>
 
 #include "gtksourcestyleschememanager-private.h"
-#include "gtksourcestylescheme.h"
+#include "gtksourcestylescheme-private.h"
 #include "gtksourceutils-private.h"
 
 /**
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index cf181eaf..4e08e6fc 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -39,7 +39,7 @@
 #include "gtksourcemark.h"
 #include "gtksourcemarkattributes.h"
 #include "gtksource-marshal.h"
-#include "gtksourcestylescheme.h"
+#include "gtksourcestylescheme-private.h"
 #include "gtksourcecompletion.h"
 #include "gtksourcecompletion-private.h"
 #include "gtksourcecompletionprovider.h"
diff --git a/testsuite/test-stylescheme.c b/testsuite/test-stylescheme.c
index adfeb1ae..72241132 100644
--- a/testsuite/test-stylescheme.c
+++ b/testsuite/test-stylescheme.c
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksource.h>
+#include <gtksourceview/gtksourcestylescheme-private.h>
 
 typedef struct _TestFixture TestFixture;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]