[gtk+] textview: Make the semi-private headrs really private



commit 17600b6baba746c86751fea8c69bce5485f913f6
Author: Benjamin Otte <otte redhat com>
Date:   Sat Nov 11 05:01:31 2017 +0100

    textview: Make the semi-private headrs really private
    
    Rename the files to have the private.h ending.
    
    And remove gtktextdisplay.h from the installed files.

 gtk/gtktextbtree.c                                |    3 +--
 gtk/gtktextbuffer.c                               |    1 -
 gtk/gtktextchild.c                                |    3 +--
 gtk/gtktextdisplay.c                              |    3 +--
 gtk/{gtktextdisplay.h => gtktextdisplayprivate.h} |    8 ++++----
 gtk/gtktextiter.c                                 |    1 -
 gtk/gtktextlayout.c                               |    3 +--
 gtk/{gtktextlayout.h => gtktextlayoutprivate.h}   |   16 +++-------------
 gtk/gtktextmark.c                                 |    1 -
 gtk/gtktextmarkprivate.h                          |    2 +-
 gtk/gtktextsegment.c                              |    3 +--
 gtk/gtktextutil.c                                 |    4 +---
 gtk/gtktextview.c                                 |    3 +--
 gtk/meson.build                                   |    2 --
 14 files changed, 15 insertions(+), 38 deletions(-)
---
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c
index 330d1af..c63c65a 100644
--- a/gtk/gtktextbtree.c
+++ b/gtk/gtktextbtree.c
@@ -52,7 +52,6 @@
  *
  */
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "config.h"
 #include "gtktextbtree.h"
 #include <string.h>
@@ -62,7 +61,7 @@
 #include "gtktexttag.h"
 #include "gtktexttagprivate.h"
 #include "gtktexttagtable.h"
-#include "gtktextlayout.h"
+#include "gtktextlayoutprivate.h"
 #include "gtktextiterprivate.h"
 #include "gtkdebug.h"
 #include "gtktextmarkprivate.h"
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index b75ba63..77d7352 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -27,7 +27,6 @@
 #include <string.h>
 #include <stdarg.h>
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "gtkclipboard.h"
 #include "gtkdnd.h"
 #include "gtkinvisible.h"
diff --git a/gtk/gtktextchild.c b/gtk/gtktextchild.c
index 2ff7de2..10f5628 100644
--- a/gtk/gtktextchild.c
+++ b/gtk/gtktextchild.c
@@ -47,11 +47,10 @@
  *
  */
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "config.h"
 #include "gtktextchild.h"
 #include "gtktextbtree.h"
-#include "gtktextlayout.h"
+#include "gtktextlayoutprivate.h"
 #include "gtkintl.h"
 
 #define CHECK_IN_BUFFER(anchor)                                         \
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c
index 8c10096..1af3bfa 100644
--- a/gtk/gtktextdisplay.c
+++ b/gtk/gtktextdisplay.c
@@ -73,9 +73,8 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "config.h"
-#include "gtktextdisplay.h"
+#include "gtktextdisplayprivate.h"
 #include "gtktextviewprivate.h"
 #include "gtkwidgetprivate.h"
 #include "gtkstylecontextprivate.h"
diff --git a/gtk/gtktextdisplay.h b/gtk/gtktextdisplayprivate.h
similarity index 96%
rename from gtk/gtktextdisplay.h
rename to gtk/gtktextdisplayprivate.h
index 93296e5..ce6bc71 100644
--- a/gtk/gtktextdisplay.h
+++ b/gtk/gtktextdisplayprivate.h
@@ -73,10 +73,10 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#ifndef __GTK_TEXT_DISPLAY_H__
-#define __GTK_TEXT_DISPLAY_H__
+#ifndef __GTK_TEXT_DISPLAY_PRIVATE_H__
+#define __GTK_TEXT_DISPLAY_PRIVATE_H__
 
-#include <gtk/gtktextlayout.h>
+#include "gtktextlayoutprivate.h"
 
 G_BEGIN_DECLS
 
@@ -97,4 +97,4 @@ void gtk_text_layout_draw (GtkTextLayout        *layout,
 
 G_END_DECLS
 
-#endif  /* __GTK_TEXT_DISPLAY_H__ */
+#endif  /* __GTK_TEXT_DISPLAY_PRIVATE_H__ */
diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c
index ae00873..277a280 100644
--- a/gtk/gtktextiter.c
+++ b/gtk/gtktextiter.c
@@ -22,7 +22,6 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "config.h"
 #include "gtktextiter.h"
 #include "gtktextbtree.h"
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index 564d1be..0d3ce08 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -75,10 +75,9 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "config.h"
 #include "gtkmarshalers.h"
-#include "gtktextlayout.h"
+#include "gtktextlayoutprivate.h"
 #include "gtktextbtree.h"
 #include "gtktextbufferprivate.h"
 #include "gtktextiterprivate.h"
diff --git a/gtk/gtktextlayout.h b/gtk/gtktextlayoutprivate.h
similarity index 97%
rename from gtk/gtktextlayout.h
rename to gtk/gtktextlayoutprivate.h
index 684d868..8f0b189 100644
--- a/gtk/gtktextlayout.h
+++ b/gtk/gtktextlayoutprivate.h
@@ -75,18 +75,8 @@
  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
-#ifndef __GTK_TEXT_LAYOUT_H__
-#define __GTK_TEXT_LAYOUT_H__
-
-/* This is a "semi-private" header; it is intended for
- * use by the text widget, and the text canvas item,
- * but that’s all. We may have to install it so the
- * canvas item can use it, but users are not supposed
- * to use it.
- */
-#ifndef GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
-#error "You are not supposed to be including this file; the equivalent public API is in gtktextview.h"
-#endif
+#ifndef __GTK_TEXT_LAYOUT_PRIVATE_H__
+#define __GTK_TEXT_LAYOUT_PRIVATE_H__
 
 #include <gtk/gtk.h>
 #include <gtk/gtktextattributes.h>
@@ -476,4 +466,4 @@ void gtk_text_layout_spew (GtkTextLayout *layout);
 
 G_END_DECLS
 
-#endif  /* __GTK_TEXT_LAYOUT_H__ */
+#endif  /* __GTK_TEXT_LAYOUT_PRIVATE_H__ */
diff --git a/gtk/gtktextmark.c b/gtk/gtktextmark.c
index ba2544a..4e966ce 100644
--- a/gtk/gtktextmark.c
+++ b/gtk/gtktextmark.c
@@ -47,7 +47,6 @@
  *
  */
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "config.h"
 #include "gtktextbtree.h"
 #include "gtkprivate.h"
diff --git a/gtk/gtktextmarkprivate.h b/gtk/gtktextmarkprivate.h
index c9e1459..3c0ede5 100644
--- a/gtk/gtktextmarkprivate.h
+++ b/gtk/gtktextmarkprivate.h
@@ -26,7 +26,7 @@
 #define __GTK_TEXT_MARK_PRIVATE_H__
 
 #include <gtk/gtktexttypes.h>
-#include <gtk/gtktextlayout.h>
+#include "gtktextlayoutprivate.h"
 
 G_BEGIN_DECLS
 
diff --git a/gtk/gtktextsegment.c b/gtk/gtktextsegment.c
index 8539db5..96e8ee2 100644
--- a/gtk/gtktextsegment.c
+++ b/gtk/gtktextsegment.c
@@ -50,7 +50,6 @@
  *
  */
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "config.h"
 #include "gtktextbtree.h"
 #include <string.h>
@@ -58,7 +57,7 @@
 #include <stdio.h>
 #include "gtktexttag.h"
 #include "gtktexttagtable.h"
-#include "gtktextlayout.h"
+#include "gtktextlayoutprivate.h"
 #include "gtktextiterprivate.h"
 #include "gtkdebug.h"
 
diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c
index c10c2ef..5a59ee5 100644
--- a/gtk/gtktextutil.c
+++ b/gtk/gtktextutil.c
@@ -27,9 +27,7 @@
 #include "gtktextview.h"
 #include "gtktextutil.h"
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
-
-#include "gtktextdisplay.h"
+#include "gtktextdisplayprivate.h"
 #include "gtktextbuffer.h"
 #include "gtkmenuitem.h"
 #include "gtkintl.h"
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index b0d280e..162fcfd 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -29,7 +29,6 @@
 
 #include <string.h>
 
-#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "gtkadjustmentprivate.h"
 #include "gtkbindings.h"
 #include "gtkdnd.h"
@@ -44,7 +43,7 @@
 #include "gtksettings.h"
 #include "gtkselectionprivate.h"
 #include "gtktextbufferrichtext.h"
-#include "gtktextdisplay.h"
+#include "gtktextdisplayprivate.h"
 #include "gtktextiterprivate.h"
 #include "gtkimmulticontext.h"
 #include "gtkprivate.h"
diff --git a/gtk/meson.build b/gtk/meson.build
index 8dedfdd..c961f29 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -556,7 +556,6 @@ gtk_public_headers = files([
   'gtktextbuffer.h',
   'gtktextbufferrichtext.h',
   'gtktextchild.h',
-  'gtktextdisplay.h',
   'gtktextiter.h',
   'gtktextmark.h',
   'gtktexttag.h',
@@ -1004,7 +1003,6 @@ if build_gir
                                  '--c-include=gtk/gtk.h',
                                  '--include-uninstalled=./gtk/Gdk-4.0.gir',
                                  '--include-uninstalled=./gtk/Gsk-4.0.gir',
-                                 '-DGTK_TEXT_USE_INTERNAL_UNSUPPORTED_API',
                                  '-DGTK_COMPILATION',
                                ])
   gtk_dep_sources += gtk_gir


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