[vte] widget: Deprecate VteCharAttributes struct



commit 467063842ccee1f2917906755103101c476cc982
Author: Christian Persch <chpe src gnome org>
Date:   Tue Feb 8 20:30:31 2022 +0100

    widget: Deprecate VteCharAttributes struct

 src/meson.build         |  1 -
 src/vte/vtedeprecated.h | 12 +++++++++++-
 src/vte/vteterminal.h   |  9 ---------
 src/vtegtk.cc           |  6 ++++++
 4 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index 605dadbf..165ed000 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -296,7 +296,6 @@ incs = [
 libvte_common_cppflags = [
   '-DG_LOG_DOMAIN="VTE"',
   '-DLOCALEDIR="@0@"'.format(vte_prefix / vte_localedir),
-  '-DVTE_DISABLE_DEPRECATION_WARNINGS',
   '-DVTE_COMPILATION',
   '-UPARSER_INCLUDE_NOP',
 ]
diff --git a/src/vte/vtedeprecated.h b/src/vte/vtedeprecated.h
index fd4913eb..b53bd3d9 100644
--- a/src/vte/vtedeprecated.h
+++ b/src/vte/vtedeprecated.h
@@ -25,7 +25,7 @@
 #include "vtepty.h"
 #include "vtemacros.h"
 
-#ifndef VTE_DISABLE_DEPRECATION_WARNINGS
+#if !defined(VTE_DISABLE_DEPRECATION_WARNINGS) && !defined(VTE_COMPILATION)
 #define _VTE_DEPRECATED G_DEPRECATED
 #else
 #define _VTE_DEPRECATED
@@ -175,6 +175,16 @@ _VTE_DEPRECATED
 _VTE_PUBLIC
 gboolean vte_get_encoding_supported(const char *encoding) _VTE_CXX_NOEXCEPT;
 
+typedef struct _VteCharAttributes VteCharAttributes _VTE_DEPRECATED;
+
+/* The structure we return as the supplemental attributes for strings. */
+struct _VteCharAttributes {
+        /*< private >*/
+        long row, column;  /* logical column */
+       PangoColor fore, back;
+       guint underline:1, strikethrough:1, columns:4;
+} _VTE_DEPRECATED;
+
 G_END_DECLS
 
 #undef _VTE_DEPRECATED
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index 7e52a850..0d3cf51c 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -43,7 +43,6 @@ G_BEGIN_DECLS
 typedef struct _VteTerminal             VteTerminal;
 typedef struct _VteTerminalClass        VteTerminalClass;
 typedef struct _VteTerminalClassPrivate VteTerminalClassPrivate;
-typedef struct _VteCharAttributes       VteCharAttributes;
 
 /**
  * VteTerminal:
@@ -128,14 +127,6 @@ struct _VteTerminalClass {
         VteTerminalClassPrivate *priv;
 };
 
-/* The structure we return as the supplemental attributes for strings. */
-struct _VteCharAttributes {
-        /*< private >*/
-        long row, column;  /* logical column */
-       PangoColor fore, back;
-       guint underline:1, strikethrough:1, columns:4;
-};
-
 typedef gboolean (*VteSelectionFunc)(VteTerminal *terminal,
                                      glong column,
                                      glong row,
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 38edab4d..2b86b346 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -4092,6 +4092,12 @@ warn_if_callback(VteSelectionFunc func,
         g_warning ("%s: VteSelectionFunc callback ignored.\n", caller);
 }
 
+/**
+ * VteCharAttributes:
+ *
+ * Deprecated: 0.68
+ */
+
 static void
 warn_if_attributes(void* array,
                    char const* caller = __builtin_FUNCTION()) noexcept


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