[gedit/master-msvc: 2/10] public headers: Decorate symbols with GEDIT_API




commit 6a1a95c6682ee8d6c9839043d5c2925726e8b05f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Aug 23 18:28:15 2021 +0800

    public headers: Decorate symbols with GEDIT_API
    
    This way, we can make the build export the symbols by using compiler
    directives, when we override GEDIT_API as needed.

 gedit/gedit-app-activatable.h     |  4 ++++
 gedit/gedit-app.h                 |  8 ++++++++
 gedit/gedit-commands.h            |  6 ++++++
 gedit/gedit-debug.h               |  5 +++++
 gedit/gedit-document.h            | 17 +++++++++++++++++
 gedit/gedit-encodings-combo-box.h |  5 +++++
 gedit/gedit-menu-extension.h      |  6 ++++++
 gedit/gedit-message-bus.h         | 20 ++++++++++++++++++++
 gedit/gedit-message.h             |  9 +++++++++
 gedit/gedit-progress-info-bar.h   |  7 +++++++
 gedit/gedit-statusbar.h           |  6 ++++++
 gedit/gedit-tab.h                 | 10 ++++++++++
 gedit/gedit-utils.h               | 14 ++++++++++++++
 gedit/gedit-view-activatable.h    |  4 ++++
 gedit/gedit-view.h                |  2 ++
 gedit/gedit-window-activatable.h  |  5 +++++
 gedit/gedit-window.h              | 21 +++++++++++++++++++++
 gedit/meson.build                 |  2 ++
 18 files changed, 151 insertions(+)
---
diff --git a/gedit/gedit-app-activatable.h b/gedit/gedit-app-activatable.h
index f3f66063f..6e6c35cdf 100644
--- a/gedit/gedit-app-activatable.h
+++ b/gedit/gedit-app-activatable.h
@@ -29,6 +29,7 @@ G_BEGIN_DECLS
 
 #define GEDIT_TYPE_APP_ACTIVATABLE (gedit_app_activatable_get_type ())
 
+GEDIT_API
 G_DECLARE_INTERFACE (GeditAppActivatable, gedit_app_activatable, GEDIT, APP_ACTIVATABLE, GObject)
 
 struct _GeditAppActivatableInterface
@@ -40,7 +41,9 @@ struct _GeditAppActivatableInterface
        void    (*deactivate)           (GeditAppActivatable *activatable);
 };
 
+GEDIT_API
 void    gedit_app_activatable_activate                 (GeditAppActivatable *activatable);
+GEDIT_API
 void    gedit_app_activatable_deactivate               (GeditAppActivatable *activatable);
 
 /**
@@ -55,6 +58,7 @@ void   gedit_app_activatable_deactivate               (GeditAppActivatable *activatable);
  * Returns: (transfer full): a #GeditMenuExtension for the specific section
  * or %NULL if not found.
  */
+GEDIT_API
 GeditMenuExtension     *gedit_app_activatable_extend_menu      (GeditAppActivatable *activatable,
                                                                 const gchar *extension_point);
 
diff --git a/gedit/gedit-app.h b/gedit/gedit-app.h
index 3d7273e04..c0adb1753 100644
--- a/gedit/gedit-app.h
+++ b/gedit/gedit-app.h
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
 
 #define GEDIT_TYPE_APP (gedit_app_get_type())
 
+GEDIT_API
 G_DECLARE_DERIVABLE_TYPE (GeditApp, gedit_app, GEDIT, APP, GtkApplication)
 
 struct _GeditAppClass
@@ -54,23 +55,30 @@ struct _GeditAppClass
                                                 GdkEvent    *event);
 };
 
+GEDIT_API
 GeditWindow    *gedit_app_create_window                (GeditApp    *app,
                                                         GdkScreen   *screen);
 
+GEDIT_API
 GList          *gedit_app_get_main_windows             (GeditApp    *app);
 
+GEDIT_API
 GList          *gedit_app_get_documents                (GeditApp    *app);
 
+GEDIT_API
 GList          *gedit_app_get_views                    (GeditApp    *app);
 
+GEDIT_API
 gboolean        gedit_app_show_help                    (GeditApp    *app,
                                                          GtkWindow   *parent,
                                                          const gchar *name,
                                                          const gchar *link_id);
 
+GEDIT_API
 void            gedit_app_set_window_title             (GeditApp    *app,
                                                          GeditWindow *window,
                                                          const gchar *title);
+GEDIT_API
 gboolean       gedit_app_process_window_event          (GeditApp    *app,
                                                         GeditWindow *window,
                                                         GdkEvent    *event);
diff --git a/gedit/gedit-commands.h b/gedit/gedit-commands.h
index a003c3a70..b8564d75d 100644
--- a/gedit/gedit-commands.h
+++ b/gedit/gedit-commands.h
@@ -30,6 +30,7 @@
 G_BEGIN_DECLS
 
 /* Do nothing if URI does not exist */
+GEDIT_API
 void            gedit_commands_load_location           (GeditWindow             *window,
                                                         GFile                   *location,
                                                         const GtkSourceEncoding *encoding,
@@ -37,24 +38,29 @@ void                 gedit_commands_load_location           (GeditWindow             
*window,
                                                         gint                     column_pos);
 
 /* Ignore non-existing URIs */
+GEDIT_API
 GSList         *gedit_commands_load_locations          (GeditWindow             *window,
                                                         const GSList            *locations,
                                                         const GtkSourceEncoding *encoding,
                                                         gint                     line_pos,
                                                         gint                     column_pos) 
G_GNUC_WARN_UNUSED_RESULT;
 
+GEDIT_API
 void            gedit_commands_save_document           (GeditWindow         *window,
                                                          GeditDocument       *document);
 
+GEDIT_API
 void            gedit_commands_save_document_async     (GeditDocument       *document,
                                                         GeditWindow         *window,
                                                         GCancellable        *cancellable,
                                                         GAsyncReadyCallback  callback,
                                                         gpointer             user_data);
 
+GEDIT_API
 gboolean        gedit_commands_save_document_finish    (GeditDocument       *document,
                                                         GAsyncResult        *result);
 
+GEDIT_API
 void            gedit_commands_save_all_documents      (GeditWindow         *window);
 
 G_END_DECLS
diff --git a/gedit/gedit-debug.h b/gedit/gedit-debug.h
index 49e5127e1..6d91c14c9 100644
--- a/gedit/gedit-debug.h
+++ b/gedit/gedit-debug.h
@@ -24,6 +24,7 @@
 #define GEDIT_DEBUG_H
 
 #include <glib.h>
+#include <gedit/gedit-macros.h>
 
 /**
  * GeditDebugSection:
@@ -63,19 +64,23 @@ typedef enum {
 #define        DEBUG_UTILS     GEDIT_DEBUG_UTILS,   __FILE__, __LINE__, G_STRFUNC
 #define        DEBUG_METADATA  GEDIT_DEBUG_METADATA,__FILE__, __LINE__, G_STRFUNC
 
+GEDIT_API
 void gedit_debug_init (void);
 
+GEDIT_API
 void gedit_debug (GeditDebugSection  section,
                  const gchar       *file,
                  gint               line,
                  const gchar       *function);
 
+GEDIT_API
 void gedit_debug_message (GeditDebugSection  section,
                          const gchar       *file,
                          gint               line,
                          const gchar       *function,
                          const gchar       *format, ...) G_GNUC_PRINTF(5, 6);
 
+GEDIT_API
 void gedit_debug_plugin_message (const gchar       *file,
                                 gint               line,
                                 const gchar       *function,
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index ed52a42fb..835ecc2e5 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -25,11 +25,13 @@
 #define GEDIT_DOCUMENT_H
 
 #include <gtksourceview/gtksource.h>
+#include <gedit/gedit-macros.h>
 
 G_BEGIN_DECLS
 
 #define GEDIT_TYPE_DOCUMENT (gedit_document_get_type())
 
+GEDIT_API
 G_DECLARE_DERIVABLE_TYPE (GeditDocument, gedit_document, GEDIT, DOCUMENT, GtkSourceBuffer)
 
 struct _GeditDocumentClass
@@ -48,42 +50,57 @@ struct _GeditDocumentClass
        void (* saved)                  (GeditDocument *document);
 };
 
+GEDIT_API
 GeditDocument   *gedit_document_new                            (void);
 
+GEDIT_API
 GtkSourceFile  *gedit_document_get_file                        (GeditDocument       *doc);
 
+GEDIT_API
 gchar          *gedit_document_get_short_name_for_display      (GeditDocument       *doc);
 
+GEDIT_API
 gchar          *gedit_document_get_content_type                (GeditDocument       *doc);
 
+GEDIT_API
 gchar          *gedit_document_get_mime_type                   (GeditDocument       *doc);
 
+GEDIT_API
 gboolean        gedit_document_is_untouched                    (GeditDocument       *doc);
 
+GEDIT_API
 gboolean        gedit_document_is_untitled                     (GeditDocument       *doc);
 
+GEDIT_API
 gboolean        gedit_document_goto_line                       (GeditDocument       *doc,
                                                                gint                 line);
 
+GEDIT_API
 gboolean        gedit_document_goto_line_offset                (GeditDocument       *doc,
                                                                 gint                 line,
                                                                 gint                 line_offset);
 
+GEDIT_API
 void            gedit_document_set_language                    (GeditDocument       *doc,
                                                                 GtkSourceLanguage   *lang);
+GEDIT_API
 GtkSourceLanguage
                *gedit_document_get_language                    (GeditDocument       *doc);
 
+GEDIT_API
 gchar          *gedit_document_get_metadata                    (GeditDocument       *doc,
                                                                 const gchar         *key);
 
+GEDIT_API
 void            gedit_document_set_metadata                    (GeditDocument       *doc,
                                                                 const gchar         *first_key,
                                                                 ...);
 
+GEDIT_API
 void            gedit_document_set_search_context              (GeditDocument          *doc,
                                                                 GtkSourceSearchContext *search_context);
 
+GEDIT_API
 GtkSourceSearchContext *
                 gedit_document_get_search_context              (GeditDocument       *doc);
 
diff --git a/gedit/gedit-encodings-combo-box.h b/gedit/gedit-encodings-combo-box.h
index c37f34124..b21bbe562 100644
--- a/gedit/gedit-encodings-combo-box.h
+++ b/gedit/gedit-encodings-combo-box.h
@@ -22,17 +22,22 @@
 #define GEDIT_ENCODINGS_COMBO_BOX_H
 
 #include <gtksourceview/gtksource.h>
+#include <gedit/gedit-macros.h>
 
 G_BEGIN_DECLS
 
 #define GEDIT_TYPE_ENCODINGS_COMBO_BOX (gedit_encodings_combo_box_get_type ())
 
+GEDIT_API
 G_DECLARE_FINAL_TYPE (GeditEncodingsComboBox, gedit_encodings_combo_box, GEDIT, ENCODINGS_COMBO_BOX, 
GtkComboBox)
 
+GEDIT_API
 GtkWidget              *gedit_encodings_combo_box_new                          (gboolean save_mode);
 
+GEDIT_API
 const GtkSourceEncoding        *gedit_encodings_combo_box_get_selected_encoding        
(GeditEncodingsComboBox *menu);
 
+GEDIT_API
 void                    gedit_encodings_combo_box_set_selected_encoding        (GeditEncodingsComboBox  
*menu,
                                                                                 const GtkSourceEncoding 
*encoding);
 
diff --git a/gedit/gedit-menu-extension.h b/gedit/gedit-menu-extension.h
index 1803b3bbf..a11a906dd 100644
--- a/gedit/gedit-menu-extension.h
+++ b/gedit/gedit-menu-extension.h
@@ -23,21 +23,27 @@
 
 #include <glib-object.h>
 #include <gio/gio.h>
+#include <gedit/gedit-macros.h>
 
 G_BEGIN_DECLS
 
 #define GEDIT_TYPE_MENU_EXTENSION (gedit_menu_extension_get_type ())
 
+GEDIT_API
 G_DECLARE_FINAL_TYPE (GeditMenuExtension, gedit_menu_extension, GEDIT, MENU_EXTENSION, GObject)
 
+GEDIT_API
 GeditMenuExtension       *gedit_menu_extension_new                 (GMenu                *menu);
 
+GEDIT_API
 void                      gedit_menu_extension_append_menu_item    (GeditMenuExtension   *menu,
                                                                     GMenuItem            *item);
 
+GEDIT_API
 void                      gedit_menu_extension_prepend_menu_item   (GeditMenuExtension   *menu,
                                                                     GMenuItem            *item);
 
+GEDIT_API
 void                      gedit_menu_extension_remove_items        (GeditMenuExtension   *menu);
 
 G_END_DECLS
diff --git a/gedit/gedit-message-bus.h b/gedit/gedit-message-bus.h
index e8403e00a..dcc4d7529 100644
--- a/gedit/gedit-message-bus.h
+++ b/gedit/gedit-message-bus.h
@@ -69,35 +69,45 @@ typedef void (* GeditMessageBusForeach) (gchar const      *object_path,
                                          gchar const      *method,
                                          gpointer          user_data);
 
+GEDIT_API
 GType             gedit_message_bus_get_type           (void) G_GNUC_CONST;
 
+GEDIT_API
 GeditMessageBus  *gedit_message_bus_get_default        (void);
+GEDIT_API
 GeditMessageBus  *gedit_message_bus_new                (void);
 
+GEDIT_API
 GType             gedit_message_bus_lookup             (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method);
 
+GEDIT_API
 void              gedit_message_bus_register           (GeditMessageBus        *bus,
                                                         GType                   message_type,
                                                         const gchar            *object_path,
                                                         const gchar            *method);
 
+GEDIT_API
 void              gedit_message_bus_unregister         (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method);
 
+GEDIT_API
 void              gedit_message_bus_unregister_all     (GeditMessageBus        *bus,
                                                         const gchar            *object_path);
 
+GEDIT_API
 gboolean          gedit_message_bus_is_registered      (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method);
 
+GEDIT_API
 void              gedit_message_bus_foreach            (GeditMessageBus        *bus,
                                                         GeditMessageBusForeach  func,
                                                         gpointer                user_data);
 
+GEDIT_API
 guint             gedit_message_bus_connect            (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method,
@@ -105,42 +115,52 @@ guint             gedit_message_bus_connect            (GeditMessageBus        *
                                                         gpointer                user_data,
                                                         GDestroyNotify          destroy_data);
 
+GEDIT_API
 void              gedit_message_bus_disconnect         (GeditMessageBus        *bus,
                                                         guint                   id);
 
+GEDIT_API
 void              gedit_message_bus_disconnect_by_func (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method,
                                                         GeditMessageCallback    callback,
                                                         gpointer                user_data);
 
+GEDIT_API
 void              gedit_message_bus_block              (GeditMessageBus        *bus,
                                                         guint                   id);
+GEDIT_API
 void              gedit_message_bus_block_by_func      (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method,
                                                         GeditMessageCallback    callback,
                                                         gpointer                user_data);
 
+GEDIT_API
 void              gedit_message_bus_unblock            (GeditMessageBus        *bus,
                                                         guint                   id);
+GEDIT_API
 void              gedit_message_bus_unblock_by_func    (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method,
                                                         GeditMessageCallback    callback,
                                                         gpointer                user_data);
 
+GEDIT_API
 void              gedit_message_bus_send_message       (GeditMessageBus        *bus,
                                                         GeditMessage           *message);
+GEDIT_API
 void              gedit_message_bus_send_message_sync  (GeditMessageBus        *bus,
                                                         GeditMessage           *message);
 
+GEDIT_API
 void              gedit_message_bus_send               (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method,
                                                         const gchar            *first_property,
                                                         ...) G_GNUC_NULL_TERMINATED;
 
+GEDIT_API
 GeditMessage     *gedit_message_bus_send_sync          (GeditMessageBus        *bus,
                                                         const gchar            *object_path,
                                                         const gchar            *method,
diff --git a/gedit/gedit-message.h b/gedit/gedit-message.h
index 8f1573401..b30c3ba8c 100644
--- a/gedit/gedit-message.h
+++ b/gedit/gedit-message.h
@@ -24,6 +24,7 @@
 #define GEDIT_MESSAGE_H
 
 #include <glib-object.h>
+#include <gedit/gedit-macros.h>
 
 G_BEGIN_DECLS
 
@@ -51,22 +52,30 @@ struct _GeditMessageClass
        GObjectClass parent_class;
 };
 
+GEDIT_API
 GType        gedit_message_get_type             (void) G_GNUC_CONST;
 
+GEDIT_API
 const gchar *gedit_message_get_object_path      (GeditMessage *message);
+GEDIT_API
 const gchar *gedit_message_get_method           (GeditMessage *message);
 
+GEDIT_API
 gboolean     gedit_message_type_has             (GType         gtype,
                                                  const gchar  *propname);
 
+GEDIT_API
 gboolean     gedit_message_type_check           (GType         gtype,
                                                  const gchar  *propname,
                                                  GType         value_type);
 
+GEDIT_API
 gboolean     gedit_message_has                  (GeditMessage *message,
                                                  const gchar  *propname);
 
+GEDIT_API
 gboolean     gedit_message_is_valid_object_path (const gchar  *object_path);
+GEDIT_API
 gchar       *gedit_message_type_identifier      (const gchar  *object_path,
                                                  const gchar  *method);
 
diff --git a/gedit/gedit-progress-info-bar.h b/gedit/gedit-progress-info-bar.h
index 0d820d8e4..ea6153a9c 100644
--- a/gedit/gedit-progress-info-bar.h
+++ b/gedit/gedit-progress-info-bar.h
@@ -26,24 +26,31 @@
 G_BEGIN_DECLS
 
 #define GEDIT_TYPE_PROGRESS_INFO_BAR (gedit_progress_info_bar_get_type ())
+GEDIT_API
 G_DECLARE_FINAL_TYPE (GeditProgressInfoBar, gedit_progress_info_bar, GEDIT, PROGRESS_INFO_BAR, GtkInfoBar)
 
+GEDIT_API
 GtkWidget      *gedit_progress_info_bar_new                    (const gchar          *icon_name,
                                                                 const gchar          *markup,
                                                                 gboolean              has_cancel);
 
+GEDIT_API
 void            gedit_progress_info_bar_set_icon_name          (GeditProgressInfoBar *bar,
                                                                 const gchar          *icon_name);
 
+GEDIT_API
 void            gedit_progress_info_bar_set_markup             (GeditProgressInfoBar *bar,
                                                                 const gchar          *markup);
 
+GEDIT_API
 void            gedit_progress_info_bar_set_text               (GeditProgressInfoBar *bar,
                                                                 const gchar          *text);
 
+GEDIT_API
 void            gedit_progress_info_bar_set_fraction           (GeditProgressInfoBar *bar,
                                                                 gdouble               fraction);
 
+GEDIT_API
 void            gedit_progress_info_bar_pulse                  (GeditProgressInfoBar *bar);
 
 G_END_DECLS
diff --git a/gedit/gedit-statusbar.h b/gedit/gedit-statusbar.h
index 0044842e3..9d0aca5f6 100644
--- a/gedit/gedit-statusbar.h
+++ b/gedit/gedit-statusbar.h
@@ -28,19 +28,25 @@ G_BEGIN_DECLS
 
 #define GEDIT_TYPE_STATUSBAR (gedit_statusbar_get_type ())
 
+GEDIT_API
 G_DECLARE_FINAL_TYPE (GeditStatusbar, gedit_statusbar, GEDIT, STATUSBAR, GtkStatusbar)
 
+GEDIT_API
 GtkWidget      *gedit_statusbar_new                    (void);
 
+GEDIT_API
 void            gedit_statusbar_set_window_state       (GeditStatusbar   *statusbar,
                                                         GeditWindowState  state,
                                                         gint              num_of_errors);
 
+GEDIT_API
 void            gedit_statusbar_set_overwrite          (GeditStatusbar   *statusbar,
                                                         gboolean          overwrite);
 
+GEDIT_API
 void            gedit_statusbar_clear_overwrite        (GeditStatusbar   *statusbar);
 
+GEDIT_API
 void            gedit_statusbar_flash_message          (GeditStatusbar   *statusbar,
                                                         guint             context_id,
                                                         const gchar      *format,
diff --git a/gedit/gedit-tab.h b/gedit/gedit-tab.h
index e3d67d7df..c9007c4c9 100644
--- a/gedit/gedit-tab.h
+++ b/gedit/gedit-tab.h
@@ -46,27 +46,37 @@ typedef enum
 
 #define GEDIT_TYPE_TAB (gedit_tab_get_type())
 
+GEDIT_API
 G_DECLARE_FINAL_TYPE (GeditTab, gedit_tab, GEDIT, TAB, GtkBox)
 
+GEDIT_API
 GeditView      *gedit_tab_get_view                     (GeditTab            *tab);
 
 /* This is only an helper function */
+GEDIT_API
 GeditDocument  *gedit_tab_get_document                 (GeditTab            *tab);
 
+GEDIT_API
 GeditTab       *gedit_tab_get_from_document            (GeditDocument       *doc);
 
+GEDIT_API
 GeditTabState   gedit_tab_get_state                    (GeditTab            *tab);
 
+GEDIT_API
 gboolean        gedit_tab_get_auto_save_enabled        (GeditTab            *tab);
 
+GEDIT_API
 void            gedit_tab_set_auto_save_enabled        (GeditTab            *tab,
                                                         gboolean            enable);
 
+GEDIT_API
 gint            gedit_tab_get_auto_save_interval       (GeditTab            *tab);
 
+GEDIT_API
 void            gedit_tab_set_auto_save_interval       (GeditTab            *tab,
                                                         gint                interval);
 
+GEDIT_API
 void            gedit_tab_set_info_bar                 (GeditTab            *tab,
                                                         GtkWidget           *info_bar);
 
diff --git a/gedit/gedit-utils.h b/gedit/gedit-utils.h
index 64af070d2..aca353d97 100644
--- a/gedit/gedit-utils.h
+++ b/gedit/gedit-utils.h
@@ -24,6 +24,7 @@
 #define GEDIT_UTILS_H
 
 #include <gtksourceview/gtksource.h>
+#include <gedit/gedit-macros.h>
 
 G_BEGIN_DECLS
 
@@ -31,13 +32,18 @@ G_BEGIN_DECLS
 #define GBOOLEAN_TO_POINTER(i) (GINT_TO_POINTER ((i) ? 2 : 1))
 #define GPOINTER_TO_BOOLEAN(i) ((gboolean) ((GPOINTER_TO_INT(i) == 2) ? TRUE : FALSE))
 
+GEDIT_API
 gboolean                   gedit_utils_menu_position_under_tree_view          (GtkTreeView     *tree_view,
                                                                                GdkRectangle    *rect);
 
+GEDIT_API
 gchar                     *gedit_utils_str_middle_truncate                    (const gchar     *string,
                                                                                guint            
truncate_length);
+GEDIT_API
 gchar                     *gedit_utils_str_end_truncate                       (const gchar     *string,
                                                                                guint            
truncate_length);
+
+GEDIT_API
 void                       gedit_utils_set_atk_name_description               (GtkWidget       *widget,
                                                                                const gchar     *name,
                                                                                const gchar     *description);
@@ -45,11 +51,15 @@ void                       gedit_warning                                      (G
                                                                                const gchar    *format,
                                                                                ...) G_GNUC_PRINTF(2, 3);
 
+GEDIT_API
 gchar                     *gedit_utils_location_get_dirname_for_display       (GFile          *location);
+GEDIT_API
 gchar                     *gedit_utils_replace_home_dir_with_tilde            (const gchar    *uri);
 
+GEDIT_API
 gboolean                   gedit_utils_is_valid_location                      (GFile *location);
 
+GEDIT_API
 gchar                     *gedit_utils_basename_for_display                   (GFile *location);
 
 gboolean                   gedit_utils_decode_uri                             (const gchar  *uri,
@@ -60,12 +70,16 @@ gboolean                   gedit_utils_decode_uri                             (c
                                                                                gchar       **path);
 
 /* Turns data from a drop into a list of well formatted uris */
+GEDIT_API
 gchar                    **gedit_utils_drop_get_uris                          (GtkSelectionData     
*selection_data);
 
+GEDIT_API
 gchar                     *gedit_utils_set_direct_save_filename               (GdkDragContext       
*context);
 
+GEDIT_API
 GtkSourceCompressionType   gedit_utils_get_compression_type_from_content_type (const gchar          
*content_type);
 
+GEDIT_API
 const gchar               *gedit_utils_newline_type_to_string                 (GtkSourceNewlineType  
newline_type);
 
 G_END_DECLS
diff --git a/gedit/gedit-view-activatable.h b/gedit/gedit-view-activatable.h
index 77799eac6..ccfe2330f 100644
--- a/gedit/gedit-view-activatable.h
+++ b/gedit/gedit-view-activatable.h
@@ -22,11 +22,13 @@
 #define GEDIT_VIEW_ACTIVATABLE_H
 
 #include <glib-object.h>
+#include <gedit/gedit-macros.h>
 
 G_BEGIN_DECLS
 
 #define GEDIT_TYPE_VIEW_ACTIVATABLE (gedit_view_activatable_get_type ())
 
+GEDIT_API
 G_DECLARE_INTERFACE (GeditViewActivatable, gedit_view_activatable, GEDIT, VIEW_ACTIVATABLE, GObject)
 
 struct _GeditViewActivatableInterface
@@ -38,7 +40,9 @@ struct _GeditViewActivatableInterface
        void    (*deactivate)           (GeditViewActivatable *activatable);
 };
 
+GEDIT_API
 void    gedit_view_activatable_activate        (GeditViewActivatable *activatable);
+GEDIT_API
 void    gedit_view_activatable_deactivate      (GeditViewActivatable *activatable);
 
 G_END_DECLS
diff --git a/gedit/gedit-view.h b/gedit/gedit-view.h
index 7f2ae3ae2..ab7389076 100644
--- a/gedit/gedit-view.h
+++ b/gedit/gedit-view.h
@@ -58,8 +58,10 @@ struct _GeditViewClass
        gpointer padding;
 };
 
+GEDIT_API
 GType          gedit_view_get_type             (void);
 
+GEDIT_API
 GtkWidget *    gedit_view_new                  (GeditDocument *doc);
 
 void           gedit_view_cut_clipboard        (GeditView *view);
diff --git a/gedit/gedit-window-activatable.h b/gedit/gedit-window-activatable.h
index e0ab35f7c..51574f5e4 100644
--- a/gedit/gedit-window-activatable.h
+++ b/gedit/gedit-window-activatable.h
@@ -22,11 +22,13 @@
 #define GEDIT_WINDOW_ACTIVATABLE_H
 
 #include <glib-object.h>
+#include <gedit/gedit-macros.h>
 
 G_BEGIN_DECLS
 
 #define GEDIT_TYPE_WINDOW_ACTIVATABLE (gedit_window_activatable_get_type ())
 
+GEDIT_API
 G_DECLARE_INTERFACE (GeditWindowActivatable, gedit_window_activatable, GEDIT, WINDOW_ACTIVATABLE, GObject)
 
 struct _GeditWindowActivatableInterface
@@ -39,8 +41,11 @@ struct _GeditWindowActivatableInterface
        void    (*update_state)         (GeditWindowActivatable *activatable);
 };
 
+GEDIT_API
 void    gedit_window_activatable_activate      (GeditWindowActivatable *activatable);
+GEDIT_API
 void    gedit_window_activatable_deactivate    (GeditWindowActivatable *activatable);
+GEDIT_API
 void    gedit_window_activatable_update_state  (GeditWindowActivatable *activatable);
 
 G_END_DECLS
diff --git a/gedit/gedit-window.h b/gedit/gedit-window.h
index 74195c1a5..7d5ae6a81 100644
--- a/gedit/gedit-window.h
+++ b/gedit/gedit-window.h
@@ -75,11 +75,14 @@ struct _GeditWindowClass
 };
 
 /* Public methods */
+GEDIT_API
 GType           gedit_window_get_type                  (void) G_GNUC_CONST;
 
+GEDIT_API
 GeditTab       *gedit_window_create_tab                (GeditWindow         *window,
                                                         gboolean             jump_to);
 
+GEDIT_API
 GeditTab       *gedit_window_create_tab_from_location  (GeditWindow             *window,
                                                         GFile                   *location,
                                                         const GtkSourceEncoding *encoding,
@@ -88,6 +91,7 @@ GeditTab      *gedit_window_create_tab_from_location  (GeditWindow             *window
                                                         gboolean                 create,
                                                         gboolean                 jump_to);
 
+GEDIT_API
 GeditTab       *gedit_window_create_tab_from_stream    (GeditWindow             *window,
                                                         GInputStream            *stream,
                                                         const GtkSourceEncoding *encoding,
@@ -95,47 +99,64 @@ GeditTab    *gedit_window_create_tab_from_stream    (GeditWindow             *window,
                                                         gint                     column_pos,
                                                         gboolean                 jump_to);
 
+GEDIT_API
 void            gedit_window_close_tab                 (GeditWindow         *window,
                                                         GeditTab            *tab);
 
+GEDIT_API
 void            gedit_window_close_all_tabs            (GeditWindow         *window);
 
+GEDIT_API
 void            gedit_window_close_tabs                (GeditWindow         *window,
                                                         const GList         *tabs);
 
+GEDIT_API
 GeditTab       *gedit_window_get_active_tab            (GeditWindow         *window);
 
+GEDIT_API
 void            gedit_window_set_active_tab            (GeditWindow         *window,
                                                         GeditTab            *tab);
 
 /* Helper functions */
+GEDIT_API
 GeditView      *gedit_window_get_active_view           (GeditWindow         *window);
+GEDIT_API
 GeditDocument  *gedit_window_get_active_document       (GeditWindow         *window);
 
 /* Returns a newly allocated list with all the documents in the window */
+GEDIT_API
 GList          *gedit_window_get_documents             (GeditWindow         *window);
 
 /* Returns a newly allocated list with all the documents that need to be
    saved before closing the window */
+GEDIT_API
 GList          *gedit_window_get_unsaved_documents     (GeditWindow         *window);
 
 /* Returns a newly allocated list with all the views in the window */
+GEDIT_API
 GList          *gedit_window_get_views                 (GeditWindow         *window);
 
+GEDIT_API
 GtkWindowGroup  *gedit_window_get_group                        (GeditWindow         *window);
 
+GEDIT_API
 GtkWidget      *gedit_window_get_side_panel            (GeditWindow         *window);
 
+GEDIT_API
 GtkWidget      *gedit_window_get_bottom_panel          (GeditWindow         *window);
 
+GEDIT_API
 GtkWidget      *gedit_window_get_statusbar             (GeditWindow         *window);
 
+GEDIT_API
 GeditWindowState gedit_window_get_state                (GeditWindow         *window);
 
+GEDIT_API
 GeditTab        *gedit_window_get_tab_from_location    (GeditWindow         *window,
                                                         GFile               *location);
 
 /* Message bus */
+GEDIT_API
 GeditMessageBus        *gedit_window_get_message_bus           (GeditWindow         *window);
 
 /*
diff --git a/gedit/meson.build b/gedit/meson.build
index fbb0ae998..e9d42bfc2 100644
--- a/gedit/meson.build
+++ b/gedit/meson.build
@@ -166,6 +166,8 @@ install_headers(
 libgedit_public_enum_types = gnome.mkenums_simple(
   'gedit-enum-types',
   sources: libgedit_public_headers,
+  header_prefix: '#include <gedit/gedit-macros.h>',
+  decorator: 'GEDIT_API',
   install_header: true,
   install_dir: headers_install_dir,
 )


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