[vte] build: Use -fvisibility=hidden to control symbol visibility



commit b77cec8080cdb14541cf106a5afe5bb89718f0b7
Author: Christian Persch <chpe gnome org>
Date:   Thu Jan 14 17:05:33 2016 +0100

    build: Use -fvisibility=hidden to control symbol visibility
    
    Use -fvisibility=hidden and explicitly mark the exported symbols
    with __attribute__((__visibility__("default"))).

 configure.ac                   |    6 +++
 src/Makefile.am                |    1 -
 src/vte/vtedeprecated.h        |    7 +++
 src/vte/vteglobals.h           |    4 ++
 src/vte/vtemacros.h            |    2 +
 src/vte/vtepty.h               |   13 +++++-
 src/vte/vteregex.h             |   10 ++++
 src/vte/vteterminal.h          |   94 +++++++++++++++++++++++++++++++++++++--
 src/vte/vteversion.h.in        |    5 ++
 src/vtetypebuiltins.h.template |    3 +
 10 files changed, 137 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 11d4b8a..44aa380 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,6 +154,8 @@ m4_define([compiler_flags_only_c],[ dnl
 m4_define([compiler_flags_only_cxx],[ dnl
   -fno-rtti dnl
   -fno-exceptions dnl
+  -fvisibility=hidden dnl
+  -fvisibility-inlines-hidden dnl
 ])
 
 CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[compiler_flags_common compiler_flags_only_c])
@@ -162,6 +164,10 @@ AC_LANG_PUSH([C++])
 CC_CHECK_FLAGS_APPEND([AM_CXXFLAGS],[CXXFLAGS],[compiler_flags_common compiler_flags_only_cxx])
 AC_LANG_POP([C++])
 
+if test "$cc_cv_cxx_CXXFLAGS__fvisibility_hidden" != "yes"; then
+  AC_MSG_ERROR([$CXX doesn't support required flag -fvisibility=hidden])
+fi
+
 ##########################################################
 # Check for -Bsymbolic-functions linker flag used to avoid
 # intra-library PLT jumps, if available.
diff --git a/src/Makefile.am b/src/Makefile.am
index ebe40ba..490206d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -124,7 +124,6 @@ libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_CXXFLAGS = \
 libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LDFLAGS = \
        $(VTE_CXXLDFLAGS) \
        -version-info $(LT_VERSION_INFO) \
-       -export-symbols-regex "^vte_.*" \
        $(AM_LDFLAGS)
 
 libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LIBADD = \
diff --git a/src/vte/vtedeprecated.h b/src/vte/vtedeprecated.h
index 32f2684..b3303e3 100644
--- a/src/vte/vtedeprecated.h
+++ b/src/vte/vtedeprecated.h
@@ -32,21 +32,25 @@
 G_BEGIN_DECLS
 
 _VTE_DEPRECATED
+_VTE_PUBLIC
 int vte_terminal_match_add_gregex(VteTerminal *terminal,
                                   GRegex *gregex,
                                   GRegexMatchFlags gflags) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
 
 _VTE_DEPRECATED
+_VTE_PUBLIC
 void vte_terminal_match_set_cursor(VteTerminal *terminal,
                                    int tag,
                                    GdkCursor *cursor) _VTE_GNUC_NONNULL(1);
 
 _VTE_DEPRECATED
+_VTE_PUBLIC
 char *vte_terminal_match_check(VteTerminal *terminal,
                               glong column, glong row,
                               int *tag) _VTE_GNUC_NONNULL(1) G_GNUC_MALLOC;
 
 _VTE_DEPRECATED
+_VTE_PUBLIC
 gboolean vte_terminal_event_check_gregex_simple(VteTerminal *terminal,
                                                 GdkEvent *event,
                                                 GRegex **regexes,
@@ -55,14 +59,17 @@ gboolean vte_terminal_event_check_gregex_simple(VteTerminal *terminal,
                                                 char **matches) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
 
 _VTE_DEPRECATED
+_VTE_PUBLIC
 void      vte_terminal_search_set_gregex      (VteTerminal *terminal,
                                               GRegex      *gregex,
                                                GRegexMatchFlags gflags) _VTE_GNUC_NONNULL(1);
 
 _VTE_DEPRECATED
+_VTE_PUBLIC
 GRegex   *vte_terminal_search_get_gregex      (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 _VTE_DEPRECATED
+_VTE_PUBLIC
 void vte_pty_close (VtePty *pty) _VTE_GNUC_NONNULL(1);
 
 G_END_DECLS
diff --git a/src/vte/vteglobals.h b/src/vte/vteglobals.h
index bda3bbd..08eff71 100644
--- a/src/vte/vteglobals.h
+++ b/src/vte/vteglobals.h
@@ -21,10 +21,14 @@
 
 #include <glib.h>
 
+#include "vte/vtemacros.h"
+
 G_BEGIN_DECLS
 
+_VTE_PUBLIC
 char *vte_get_user_shell(void);
 
+_VTE_PUBLIC
 const char *vte_get_features (void);
 
 G_END_DECLS
diff --git a/src/vte/vtemacros.h b/src/vte/vtemacros.h
index 121eaf5..bed104d 100644
--- a/src/vte/vtemacros.h
+++ b/src/vte/vtemacros.h
@@ -35,4 +35,6 @@
 #define _VTE_GNUC_NONNULL(position)
 #endif
 
+#define _VTE_PUBLIC __attribute__((__visibility__("default"))) extern
+
 #endif /* __VTE_VTE_MACROS_H__ */
diff --git a/src/vte/vtepty.h b/src/vte/vtepty.h
index 07dd92f..dabef60 100644
--- a/src/vte/vtepty.h
+++ b/src/vte/vtepty.h
@@ -25,13 +25,14 @@
 
 #include <gio/gio.h>
 
-#include "vteenums.h"
-#include "vtemacros.h"
+#include "vte/vteenums.h"
+#include "vte/vtemacros.h"
 
 G_BEGIN_DECLS
 
 #define VTE_SPAWN_NO_PARENT_ENVV (1 << 25)
 
+_VTE_PUBLIC
 GQuark vte_pty_error_quark (void);
 
 /**
@@ -54,30 +55,38 @@ GQuark vte_pty_error_quark (void);
 typedef struct _VtePty        VtePty;
 typedef struct _VtePtyClass   VtePtyClass;
 
+_VTE_PUBLIC
 GType vte_pty_get_type (void);
 
+_VTE_PUBLIC
 VtePty *vte_pty_new_sync (VtePtyFlags flags,
                           GCancellable *cancellable,
                           GError **error);
 
+_VTE_PUBLIC
 VtePty *vte_pty_new_foreign_sync (int fd,
                                   GCancellable *cancellable,
                                   GError **error);
 
+_VTE_PUBLIC
 int vte_pty_get_fd (VtePty *pty) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 void vte_pty_child_setup (VtePty *pty) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 gboolean vte_pty_get_size (VtePty *pty,
                            int *rows,
                            int *columns,
                            GError **error) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 gboolean vte_pty_set_size (VtePty *pty,
                            int rows,
                            int columns,
                            GError **error) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 gboolean vte_pty_set_utf8 (VtePty *pty,
                            gboolean utf8,
                            GError **error) _VTE_GNUC_NONNULL(1);
diff --git a/src/vte/vteregex.h b/src/vte/vteregex.h
index bf6e577..7e236de 100644
--- a/src/vte/vteregex.h
+++ b/src/vte/vteregex.h
@@ -25,28 +25,38 @@
 #include <glib.h>
 #include <glib-object.h>
 
+#include "vte/vtemacros.h"
+
 G_BEGIN_DECLS
 
 typedef struct _VteRegex VteRegex;
 
 #define VTE_TYPE_REGEX (vte_regex_get_type())
+
+_VTE_PUBLIC
 GType vte_regex_get_type (void);
 
 #define VTE_REGEX_ERROR (vte_regex_error_quark())
+
+_VTE_PUBLIC
 GQuark vte_regex_error_quark (void);
 
 /* This is PCRE2_NO_UTF_CHECK | PCRE2_UTF | PCRE2_NEVER_BACKSLASH_C */
 #define VTE_REGEX_FLAGS_DEFAULT (0x00080000u | 0x40000000u | 0x00100000u)
 
+_VTE_PUBLIC
 VteRegex *vte_regex_ref      (VteRegex *regex) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 VteRegex *vte_regex_unref    (VteRegex *regex) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 VteRegex *vte_regex_new      (const char *pattern,
                               gssize      pattern_length,
                               guint32     flags,
                               GError    **error) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 gboolean  vte_regex_jit     (VteRegex *regex,
                              guint32   flags,
                              GError  **error) _VTE_GNUC_NONNULL(1);
diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h
index 19f83ed..1c5fb69 100644
--- a/src/vte/vteterminal.h
+++ b/src/vte/vteterminal.h
@@ -28,10 +28,10 @@
 #include <pango/pango.h>
 #include <gtk/gtk.h>
 
-#include "vteenums.h"
-#include "vtemacros.h"
-#include "vtepty.h"
-#include "vteregex.h"
+#include "vte/vteenums.h"
+#include "vte/vtemacros.h"
+#include "vte/vtepty.h"
+#include "vte/vteregex.h"
 
 #if defined(VTE_COMPILATION) && defined(__cplusplus)
 class VteTerminalPrivate;
@@ -131,18 +131,23 @@ typedef gboolean (*VteSelectionFunc)(VteTerminal *terminal,
                                      gpointer data) _VTE_GNUC_NONNULL(1);
 
 /* The widget's type. */
+_VTE_PUBLIC
 GType vte_terminal_get_type(void);
 
+_VTE_PUBLIC
 GtkWidget *vte_terminal_new(void);
 
+_VTE_PUBLIC
 VtePty *vte_terminal_pty_new_sync (VteTerminal *terminal,
                                    VtePtyFlags flags,
                                    GCancellable *cancellable,
                                    GError **error) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 void vte_terminal_watch_child (VteTerminal *terminal,
                                GPid child_pid) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 gboolean vte_terminal_spawn_sync(VteTerminal *terminal,
                                  VtePtyFlags pty_flags,
                                  const char *working_directory,
@@ -157,111 +162,154 @@ gboolean vte_terminal_spawn_sync(VteTerminal *terminal,
 
 /* Send data to the terminal to display, or to the terminal's forked command
  * to handle in some way.  If it's 'cat', they should be the same. */
+_VTE_PUBLIC
 void vte_terminal_feed(VteTerminal *terminal,
                        const char *data,
                        gssize length) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_feed_child(VteTerminal *terminal,
                              const char *text,
                              gssize length) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_feed_child_binary(VteTerminal *terminal,
                                     const guint8 *data,
                                     gsize length) _VTE_GNUC_NONNULL(1);
 
 /* Copy currently-selected text to the clipboard, or from the clipboard to
  * the terminal. */
+_VTE_PUBLIC
 void vte_terminal_copy_clipboard(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_paste_clipboard(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_copy_primary(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_paste_primary(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
-
+_VTE_PUBLIC
 void vte_terminal_select_all(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_unselect_all(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* By-word selection */
+_VTE_PUBLIC
 void vte_terminal_set_word_char_exceptions(VteTerminal *terminal,
                                            const char *exceptions) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 const char *vte_terminal_get_word_char_exceptions(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Set the terminal's size. */
+_VTE_PUBLIC
 void vte_terminal_set_size(VteTerminal *terminal,
                           glong columns, glong rows) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 void vte_terminal_set_font_scale(VteTerminal *terminal,
                                  gdouble scale) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gdouble vte_terminal_get_font_scale(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Set various on-off settings. */
+_VTE_PUBLIC
 void vte_terminal_set_audible_bell(VteTerminal *terminal,
                                    gboolean is_audible) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean vte_terminal_get_audible_bell(VteTerminal *terminal);
+_VTE_PUBLIC
 void vte_terminal_set_scroll_on_output(VteTerminal *terminal,
                                        gboolean scroll) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_scroll_on_keystroke(VteTerminal *terminal,
                                          gboolean scroll);
+_VTE_PUBLIC
 void vte_terminal_set_rewrap_on_resize(VteTerminal *terminal,
                                        gboolean rewrap) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean vte_terminal_get_rewrap_on_resize(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Set the color scheme. */
+_VTE_PUBLIC
 void vte_terminal_set_color_bold(VteTerminal *terminal,
                                  const GdkRGBA *bold) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_color_foreground(VteTerminal *terminal,
                                        const GdkRGBA *foreground) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
+_VTE_PUBLIC
 void vte_terminal_set_color_background(VteTerminal *terminal,
                                        const GdkRGBA *background) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
+_VTE_PUBLIC
 void vte_terminal_set_color_cursor(VteTerminal *terminal,
                                    const GdkRGBA *cursor_background) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_color_cursor_foreground(VteTerminal *terminal,
                                               const GdkRGBA *cursor_foreground) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_color_highlight(VteTerminal *terminal,
                                       const GdkRGBA *highlight_background) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_color_highlight_foreground(VteTerminal *terminal,
                                                  const GdkRGBA *highlight_foreground) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_colors(VteTerminal *terminal,
                              const GdkRGBA *foreground,
                              const GdkRGBA *background,
                              const GdkRGBA *palette,
                              gsize palette_size) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 void vte_terminal_set_default_colors(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Set whether or not the cursor blinks. */
+_VTE_PUBLIC
 void vte_terminal_set_cursor_blink_mode(VteTerminal *terminal,
                                        VteCursorBlinkMode mode) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 VteCursorBlinkMode vte_terminal_get_cursor_blink_mode(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Set cursor shape */
+_VTE_PUBLIC
 void vte_terminal_set_cursor_shape(VteTerminal *terminal,
                                   VteCursorShape shape) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Set the number of scrollback lines, above or at an internal minimum. */
+_VTE_PUBLIC
 void vte_terminal_set_scrollback_lines(VteTerminal *terminal,
                                        glong lines) _VTE_GNUC_NONNULL(1);
 
 /* Set or retrieve the current font. */
+_VTE_PUBLIC
 void vte_terminal_set_font(VteTerminal *terminal,
                           const PangoFontDescription *font_desc) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 const PangoFontDescription *vte_terminal_get_font(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_allow_bold(VteTerminal *terminal,
                                  gboolean allow_bold) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean vte_terminal_get_allow_bold(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Check if the terminal is the current selection owner. */
+_VTE_PUBLIC
 gboolean vte_terminal_get_has_selection(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Set what happens when the user strikes backspace or delete. */
+_VTE_PUBLIC
 void vte_terminal_set_backspace_binding(VteTerminal *terminal,
                                        VteEraseBinding binding) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_set_delete_binding(VteTerminal *terminal,
                                     VteEraseBinding binding) _VTE_GNUC_NONNULL(1);
 
 /* Manipulate the autohide setting. */
+_VTE_PUBLIC
 void vte_terminal_set_mouse_autohide(VteTerminal *terminal,
                                      gboolean setting) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean vte_terminal_get_mouse_autohide(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Reset the terminal, optionally clearing the tab stops and line history. */
+_VTE_PUBLIC
 void vte_terminal_reset(VteTerminal *terminal,
                         gboolean clear_tabstops,
                        gboolean clear_history) _VTE_GNUC_NONNULL(1);
@@ -272,46 +320,57 @@ void vte_terminal_reset(VteTerminal *terminal,
  * VteCharAttributes structure in the passed GArray, if the array was not %NULL.
  * Note that it will have one entry per byte, not per character, so indexes
  * should match up exactly. */
+_VTE_PUBLIC
 char *vte_terminal_get_text(VteTerminal *terminal,
                            VteSelectionFunc is_selected,
                            gpointer user_data,
                            GArray *attributes) _VTE_GNUC_NONNULL(1) G_GNUC_MALLOC;
+_VTE_PUBLIC
 char *vte_terminal_get_text_include_trailing_spaces(VteTerminal *terminal,
                                                    VteSelectionFunc is_selected,
                                                    gpointer user_data,
                                                    GArray *attributes) _VTE_GNUC_NONNULL(1) G_GNUC_MALLOC;
+_VTE_PUBLIC
 char *vte_terminal_get_text_range(VteTerminal *terminal,
                                  glong start_row, glong start_col,
                                  glong end_row, glong end_col,
                                  VteSelectionFunc is_selected,
                                  gpointer user_data,
                                  GArray *attributes) _VTE_GNUC_NONNULL(1) G_GNUC_MALLOC;
+_VTE_PUBLIC
 void vte_terminal_get_cursor_position(VteTerminal *terminal,
                                      glong *column,
                                       glong *row) _VTE_GNUC_NONNULL(1);
 
 /* Add a matching expression, returning the tag the widget assigns to that
  * expression. */
+_VTE_PUBLIC
 int vte_terminal_match_add_regex(VteTerminal *terminal,
                                  VteRegex *regex,
                                  guint32 flags) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
 /* Set the cursor to be used when the pointer is over a given match. */
+_VTE_PUBLIC
 void vte_terminal_match_set_cursor_type(VteTerminal *terminal,
                                        int tag,
                                         GdkCursorType cursor_type) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_match_set_cursor_name(VteTerminal *terminal,
                                        int tag,
                                         const char *cursor_name) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(3);
+_VTE_PUBLIC
 void vte_terminal_match_remove(VteTerminal *terminal,
                                int tag) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void vte_terminal_match_remove_all(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Check if a given cell on the screen contains part of a matched string.  If
  * it does, return the string, and store the match tag in the optional tag
  * argument. */
+_VTE_PUBLIC
 char *vte_terminal_match_check_event(VteTerminal *terminal,
                                      GdkEvent *event,
                                      int *tag) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2) G_GNUC_MALLOC;
+_VTE_PUBLIC
 gboolean vte_terminal_event_check_regex_simple(VteTerminal *terminal,
                                                GdkEvent *event,
                                                VteRegex **regexes,
@@ -319,56 +378,81 @@ gboolean vte_terminal_event_check_regex_simple(VteTerminal *terminal,
                                                guint32 match_flags,
                                                char **matches) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
 
+_VTE_PUBLIC
 void      vte_terminal_search_set_regex      (VteTerminal *terminal,
                                               VteRegex    *regex,
                                               guint32      flags) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 VteRegex *vte_terminal_search_get_regex      (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 void      vte_terminal_search_set_wrap_around (VteTerminal *terminal,
                                               gboolean     wrap_around) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean  vte_terminal_search_get_wrap_around (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean  vte_terminal_search_find_previous   (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean  vte_terminal_search_find_next       (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 
 /* Set the character encoding.  Most of the time you won't need this. */
+_VTE_PUBLIC
 gboolean vte_terminal_set_encoding(VteTerminal *terminal,
                                    const char *codeset,
                                    GError **error) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 const char *vte_terminal_get_encoding(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* CJK compatibility setting */
+_VTE_PUBLIC
 void vte_terminal_set_cjk_ambiguous_width(VteTerminal *terminal,
                                           int width) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 int vte_terminal_get_cjk_ambiguous_width(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
+_VTE_PUBLIC
 void vte_terminal_set_pty(VteTerminal *terminal,
                           VtePty *pty) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 VtePty *vte_terminal_get_pty(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Accessors for bindings. */
+_VTE_PUBLIC
 glong vte_terminal_get_char_width(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 glong vte_terminal_get_char_height(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 glong vte_terminal_get_row_count(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 const char *vte_terminal_get_icon_title(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* misc */
+_VTE_PUBLIC
 void vte_terminal_set_input_enabled (VteTerminal *terminal,
                                      gboolean enabled) _VTE_GNUC_NONNULL(1);
+_VTE_PUBLIC
 gboolean vte_terminal_get_input_enabled (VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
 
 /* Window geometry helpers */
+_VTE_PUBLIC
 void vte_terminal_get_geometry_hints(VteTerminal *terminal,
                                      GdkGeometry *hints,
                                      int min_rows,
                                      int min_columns) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
+_VTE_PUBLIC
 void vte_terminal_set_geometry_hints_for_window(VteTerminal *terminal,
                                                 GtkWindow *window) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2);
 
 /* Writing contents out */
+_VTE_PUBLIC
 gboolean vte_terminal_write_contents_sync (VteTerminal *terminal,
                                            GOutputStream *stream,
                                            VteWriteFlags flags,
diff --git a/src/vte/vteversion.h.in b/src/vte/vteversion.h.in
index 92d46f7..a60eb63 100644
--- a/src/vte/vteversion.h.in
+++ b/src/vte/vteversion.h.in
@@ -25,6 +25,8 @@
 
 #include <glib.h>
 
+#include "vte/vtemacros.h"
+
 G_BEGIN_DECLS
 
 /**
@@ -73,10 +75,13 @@ G_BEGIN_DECLS
    (VTE_MAJOR_VERSION == (major) && VTE_MINOR_VERSION > (minor)) || \
    (VTE_MAJOR_VERSION == (major) && VTE_MINOR_VERSION == (minor) && VTE_MICRO_VERSION >= (micro)))
 
+_VTE_PUBLIC
 guint vte_get_major_version (void) G_GNUC_CONST;
 
+_VTE_PUBLIC
 guint vte_get_minor_version (void) G_GNUC_CONST;
 
+_VTE_PUBLIC
 guint vte_get_micro_version (void) G_GNUC_CONST;
 
 G_END_DECLS
diff --git a/src/vtetypebuiltins.h.template b/src/vtetypebuiltins.h.template
index b608350..7f3c868 100644
--- a/src/vtetypebuiltins.h.template
+++ b/src/vtetypebuiltins.h.template
@@ -8,6 +8,8 @@
 
 #include <glib-object.h>
 
+#include "vte/vtemacros.h"
+
 G_BEGIN_DECLS
 /*** END file-header ***/
 
@@ -17,6 +19,7 @@ G_BEGIN_DECLS
 /*** END file-production ***/
 
 /*** BEGIN value-header ***/
+_VTE_PUBLIC
 GType @enum_name _get_type (void);
 #define VTE_TYPE_ ENUMSHORT@ (@enum_name _get_type ())
 /*** END value-header ***/


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