[libpeas/msvc: 4/10] libpeas: Mark public APIs and needed internal APIs for export



commit bb99abb9569035fca6be6d2731342468c2fb6ffd
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Oct 15 13:09:11 2018 +0800

    libpeas: Mark public APIs and needed internal APIs for export
    
    Include peas-macros.h in the public headers, as well as the private
    headers where we need to export the symbls, and mark the corresponding
    symbols with PEAS_API (public) or _PEAS_EXTERN (privte symbols that we
    need to export).

 libpeas/peas-activatable.h    |  8 ++++++++
 libpeas/peas-engine.h         | 35 ++++++++++++++++++++++++++++++++++-
 libpeas/peas-extension-base.h |  5 +++++
 libpeas/peas-extension-set.h  | 13 +++++++++++++
 libpeas/peas-extension.h      | 10 ++++++++++
 libpeas/peas-i18n.h           |  2 ++
 libpeas/peas-object-module.h  | 22 ++++++++++++++++++++++
 libpeas/peas-plugin-info.h    | 43 +++++++++++++++++++++++++++++++++++++++++++
 libpeas/peas-plugin-loader.h  |  8 ++++++++
 libpeas/peas.h                |  1 +
 10 files changed, 146 insertions(+), 1 deletion(-)
---
diff --git a/libpeas/peas-activatable.h b/libpeas/peas-activatable.h
index 2c5f486..14ce399 100644
--- a/libpeas/peas-activatable.h
+++ b/libpeas/peas-activatable.h
@@ -23,6 +23,7 @@
 #define __PEAS_ACTIVATABLE_H__
 
 #include <glib-object.h>
+#include "peas-macros.h"
 
 G_BEGIN_DECLS
 
@@ -65,10 +66,17 @@ struct _PeasActivatableInterface {
 /*
  * Public methods
  */
+PEAS_API
 GType             peas_activatable_get_type       (void)  G_GNUC_CONST;
 
+
+PEAS_API
 void              peas_activatable_activate       (PeasActivatable *activatable);
+
+PEAS_API
 void              peas_activatable_deactivate     (PeasActivatable *activatable);
+
+PEAS_API
 void              peas_activatable_update_state   (PeasActivatable *activatable);
 
 G_END_DECLS
diff --git a/libpeas/peas-engine.h b/libpeas/peas-engine.h
index 8453c57..b8a143f 100644
--- a/libpeas/peas-engine.h
+++ b/libpeas/peas-engine.h
@@ -73,53 +73,86 @@ struct _PeasEngineClass {
   gpointer padding[8];
 };
 
+PEAS_API
 GType             peas_engine_get_type            (void) G_GNUC_CONST;
+
+PEAS_API
 PeasEngine       *peas_engine_new                 (void);
+
+PEAS_API
 PeasEngine       *peas_engine_new_with_nonglobal_loaders
                                                   (void);
+
+PEAS_API
 PeasEngine       *peas_engine_get_default         (void);
 
+
+PEAS_API
 void              peas_engine_add_search_path     (PeasEngine      *engine,
                                                    const gchar     *module_dir,
                                                    const gchar     *data_dir);
+
+PEAS_API
 void              peas_engine_prepend_search_path (PeasEngine      *engine,
                                                    const gchar     *module_dir,
                                                    const gchar     *data_dir);
 
 /* plugin management */
+PEAS_API
 void              peas_engine_enable_loader       (PeasEngine      *engine,
                                                    const gchar     *loader_name);
+
+PEAS_API
 void              peas_engine_rescan_plugins      (PeasEngine      *engine);
+
+PEAS_API
 const GList      *peas_engine_get_plugin_list     (PeasEngine      *engine);
+
+PEAS_API
 gchar           **peas_engine_get_loaded_plugins  (PeasEngine      *engine);
+
+PEAS_API
 void              peas_engine_set_loaded_plugins  (PeasEngine      *engine,
                                                    const gchar    **plugin_names);
+
+PEAS_API
 PeasPluginInfo   *peas_engine_get_plugin_info     (PeasEngine      *engine,
                                                    const gchar     *plugin_name);
 
 /* plugin loading and unloading */
+PEAS_API
 gboolean          peas_engine_load_plugin         (PeasEngine      *engine,
                                                    PeasPluginInfo  *info);
+
+PEAS_API
 gboolean          peas_engine_unload_plugin       (PeasEngine      *engine,
                                                    PeasPluginInfo  *info);
+
+PEAS_API
 void              peas_engine_garbage_collect     (PeasEngine      *engine);
 
+
+PEAS_API
 gboolean          peas_engine_provides_extension  (PeasEngine      *engine,
                                                    PeasPluginInfo  *info,
                                                    GType            extension_type);
 
-
+PEAS_API
 PeasExtension    *peas_engine_create_extensionv   (PeasEngine      *engine,
                                                    PeasPluginInfo  *info,
                                                    GType            extension_type,
                                                    guint            n_parameters,
                                                    GParameter      *parameters);
+
+PEAS_API
 PeasExtension    *peas_engine_create_extension_valist
                                                   (PeasEngine      *engine,
                                                    PeasPluginInfo  *info,
                                                    GType            extension_type,
                                                    const gchar     *first_property,
                                                    va_list          var_args);
+
+PEAS_API
 PeasExtension    *peas_engine_create_extension    (PeasEngine      *engine,
                                                    PeasPluginInfo  *info,
                                                    GType            extension_type,
diff --git a/libpeas/peas-extension-base.h b/libpeas/peas-extension-base.h
index e58dec1..b9fd9dd 100644
--- a/libpeas/peas-extension-base.h
+++ b/libpeas/peas-extension-base.h
@@ -69,9 +69,14 @@ struct _PeasExtensionBaseClass {
 /*
  * Public methods
  */
+PEAS_API
 GType            peas_extension_base_get_type         (void)  G_GNUC_CONST;
 
+
+PEAS_API
 PeasPluginInfo  *peas_extension_base_get_plugin_info  (PeasExtensionBase *extbase);
+
+PEAS_API
 gchar           *peas_extension_base_get_data_dir     (PeasExtensionBase *extbase);
 
 G_END_DECLS
diff --git a/libpeas/peas-extension-set.h b/libpeas/peas-extension-set.h
index 302609c..abcb832 100644
--- a/libpeas/peas-extension-set.h
+++ b/libpeas/peas-extension-set.h
@@ -110,37 +110,50 @@ typedef void (*PeasExtensionSetForeachFunc) (PeasExtensionSet *set,
 /*
  * Public methods
  */
+PEAS_API
 GType              peas_extension_set_get_type    (void)  G_GNUC_CONST;
 
 #ifndef __GI_SCANNER__
 #ifndef PEAS_DISABLE_DEPRECATED
+PEAS_API
 gboolean           peas_extension_set_call        (PeasExtensionSet *set,
                                                    const gchar      *method_name,
                                                    ...);
+
+PEAS_API
 gboolean           peas_extension_set_call_valist (PeasExtensionSet *set,
                                                    const gchar      *method_name,
                                                    va_list           va_args);
+
+PEAS_API
 gboolean           peas_extension_set_callv       (PeasExtensionSet *set,
                                                    const gchar      *method_name,
                                                    GIArgument       *args);
 #endif
 #endif
 
+PEAS_API
 void               peas_extension_set_foreach     (PeasExtensionSet *set,
                                                    PeasExtensionSetForeachFunc func,
                                                    gpointer          data);
 
+PEAS_API
 PeasExtension     *peas_extension_set_get_extension (PeasExtensionSet *set,
                                                      PeasPluginInfo   *info);
 
+PEAS_API
 PeasExtensionSet  *peas_extension_set_newv        (PeasEngine       *engine,
                                                    GType             exten_type,
                                                    guint             n_parameters,
                                                    GParameter       *parameters);
+
+PEAS_API
 PeasExtensionSet  *peas_extension_set_new_valist  (PeasEngine       *engine,
                                                    GType             exten_type,
                                                    const gchar      *first_property,
                                                    va_list           var_args);
+
+PEAS_API
 PeasExtensionSet  *peas_extension_set_new         (PeasEngine       *engine,
                                                    GType             exten_type,
                                                    const gchar      *first_property,
diff --git a/libpeas/peas-extension.h b/libpeas/peas-extension.h
index e61a5ef..9747ec7 100644
--- a/libpeas/peas-extension.h
+++ b/libpeas/peas-extension.h
@@ -24,6 +24,7 @@
 
 #include <glib-object.h>
 #include <girepository.h>
+#include "peas-macros.h"
 
 G_BEGIN_DECLS
 
@@ -48,17 +49,26 @@ typedef GObject PeasExtension;
  */
 #ifndef __GI_SCANNER__
 #ifndef PEAS_DISABLE_DEPRECATED
+PEAS_API
 GType        peas_extension_get_type        (void)  G_GNUC_CONST;
 
+
+PEAS_API
 GType        peas_extension_get_extension_type
                                             (PeasExtension *exten);
 
+
+PEAS_API
 gboolean     peas_extension_call            (PeasExtension *exten,
                                              const gchar   *method_name,
                                              ...);
+
+PEAS_API
 gboolean     peas_extension_call_valist     (PeasExtension *exten,
                                              const gchar   *method_name,
                                              va_list        args);
+
+PEAS_API
 gboolean     peas_extension_callv           (PeasExtension *exten,
                                              const gchar   *method_name,
                                              GIArgument    *args,
diff --git a/libpeas/peas-i18n.h b/libpeas/peas-i18n.h
index 26b0d47..a7fad7d 100644
--- a/libpeas/peas-i18n.h
+++ b/libpeas/peas-i18n.h
@@ -31,6 +31,7 @@
 #endif
 
 #include <glib.h>
+#include "peas-macros.h"
 
 G_BEGIN_DECLS
 
@@ -64,6 +65,7 @@ G_BEGIN_DECLS
 #    define N_(String) (String)
 #endif
 
+_PEAS_EXTERN
 const gchar *peas_gettext (const char *msgid) G_GNUC_FORMAT(1);
 
 /* not really I18N-related, but also a string marker macro */
diff --git a/libpeas/peas-object-module.h b/libpeas/peas-object-module.h
index 08c5d6b..23c75a8 100644
--- a/libpeas/peas-object-module.h
+++ b/libpeas/peas-object-module.h
@@ -27,6 +27,7 @@
 
 #include <glib-object.h>
 #include <gmodule.h>
+#include "peas-macros.h"
 
 G_BEGIN_DECLS
 
@@ -83,36 +84,57 @@ struct _PeasObjectModuleClass {
   gpointer padding[8];
 };
 
+PEAS_API
 GType               peas_object_module_get_type               (void) G_GNUC_CONST;
 PeasObjectModule   *peas_object_module_new                    (const gchar      *module_name,
                                                                const gchar      *path,
                                                                gboolean          resident);
+
+PEAS_API
 PeasObjectModule   *peas_object_module_new_full               (const gchar      *module_name,
                                                                const gchar      *path,
                                                                gboolean          resident,
                                                                gboolean          local_linkage);
+
+PEAS_API
 PeasObjectModule   *peas_object_module_new_embedded           (const gchar      *module_name,
                                                                const gchar      *symbol);
 
+
+PEAS_API
 GObject            *peas_object_module_create_object          (PeasObjectModule *module,
                                                                GType             exten_type,
                                                                guint             n_parameters,
                                                                GParameter       *parameters);
+
+PEAS_API
 gboolean            peas_object_module_provides_object        (PeasObjectModule *module,
                                                                GType             exten_type);
 
+
+PEAS_API
 const gchar        *peas_object_module_get_path               (PeasObjectModule *module);
+
+PEAS_API
 const gchar        *peas_object_module_get_module_name        (PeasObjectModule *module);
+
+PEAS_API
 const gchar        *peas_object_module_get_symbol             (PeasObjectModule *module);
 
+
+PEAS_API
 GModule            *peas_object_module_get_library            (PeasObjectModule *module);
 
+
+PEAS_API
 void                peas_object_module_register_extension_factory
                                                               (PeasObjectModule *module,
                                                                GType             exten_type,
                                                                PeasFactoryFunc   factory_func,
                                                                gpointer          user_data,
                                                                GDestroyNotify    destroy_func);
+
+PEAS_API
 void                peas_object_module_register_extension_type
                                                               (PeasObjectModule *module,
                                                                GType             exten_type,
diff --git a/libpeas/peas-plugin-info.h b/libpeas/peas-plugin-info.h
index 556d8a5..4f422fa 100644
--- a/libpeas/peas-plugin-info.h
+++ b/libpeas/peas-plugin-info.h
@@ -24,6 +24,7 @@
 #define __PEAS_PLUGIN_INFO_H__
 
 #include <gio/gio.h>
+#include "peas-macros.h"
 
 G_BEGIN_DECLS
 
@@ -68,33 +69,75 @@ typedef enum {
  */
 typedef struct _PeasPluginInfo PeasPluginInfo;
 
+
+PEAS_API
 GType         peas_plugin_info_get_type         (void) G_GNUC_CONST;
+
+PEAS_API
 GQuark        peas_plugin_info_error_quark      (void);
 
+
+PEAS_API
 gboolean      peas_plugin_info_is_loaded        (const PeasPluginInfo *info);
+
+PEAS_API
 gboolean      peas_plugin_info_is_available     (const PeasPluginInfo *info,
                                                  GError               **error);
+
+PEAS_API
 gboolean      peas_plugin_info_is_builtin       (const PeasPluginInfo *info);
+
+PEAS_API
 gboolean      peas_plugin_info_is_hidden        (const PeasPluginInfo *info);
 
+
+PEAS_API
 const gchar  *peas_plugin_info_get_module_name  (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_module_dir   (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_data_dir     (const PeasPluginInfo *info);
+
+PEAS_API
 GSettings    *peas_plugin_info_get_settings     (const PeasPluginInfo *info,
                                                  const gchar          *schema_id);
+
+PEAS_API
 const gchar **peas_plugin_info_get_dependencies (const PeasPluginInfo *info);
+
+PEAS_API
 gboolean      peas_plugin_info_has_dependency   (const PeasPluginInfo *info,
                                                  const gchar          *module_name);
 
+
+PEAS_API
 const gchar  *peas_plugin_info_get_name         (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_description  (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_icon_name    (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar **peas_plugin_info_get_authors      (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_website      (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_copyright    (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_version      (const PeasPluginInfo *info);
+
+PEAS_API
 const gchar  *peas_plugin_info_get_help_uri     (const PeasPluginInfo *info);
 
+
+PEAS_API
 const gchar  *peas_plugin_info_get_external_data (const PeasPluginInfo *info,
                                                   const gchar          *key);
 
diff --git a/libpeas/peas-plugin-loader.h b/libpeas/peas-plugin-loader.h
index 25552a5..53396f0 100644
--- a/libpeas/peas-plugin-loader.h
+++ b/libpeas/peas-plugin-loader.h
@@ -65,24 +65,32 @@ struct _PeasPluginLoaderClass {
   void           (*garbage_collect)       (PeasPluginLoader *loader);
 };
 
+_PEAS_EXTERN
 GType         peas_plugin_loader_get_type             (void)  G_GNUC_CONST;
 
+_PEAS_EXTERN
 gboolean      peas_plugin_loader_initialize           (PeasPluginLoader *loader);
+_PEAS_EXTERN
 gboolean      peas_plugin_loader_is_global            (PeasPluginLoader *loader);
 
+_PEAS_EXTERN
 gboolean      peas_plugin_loader_load                 (PeasPluginLoader *loader,
                                                        PeasPluginInfo   *info);
+_PEAS_EXTERN
 void          peas_plugin_loader_unload               (PeasPluginLoader *loader,
                                                        PeasPluginInfo   *info);
 
+_PEAS_EXTERN
 gboolean      peas_plugin_loader_provides_extension   (PeasPluginLoader *loader,
                                                        PeasPluginInfo   *info,
                                                        GType             ext_type);
+_PEAS_EXTERN
 PeasExtension *peas_plugin_loader_create_extension    (PeasPluginLoader *loader,
                                                        PeasPluginInfo   *info,
                                                        GType             ext_type,
                                                        guint             n_parameters,
                                                        GParameter       *parameters);
+_PEAS_EXTERN
 void          peas_plugin_loader_garbage_collect      (PeasPluginLoader *loader);
 
 G_END_DECLS
diff --git a/libpeas/peas.h b/libpeas/peas.h
index e46bbfc..dfd54c9 100644
--- a/libpeas/peas.h
+++ b/libpeas/peas.h
@@ -26,6 +26,7 @@
 #include "peas-extension.h"
 #include "peas-extension-base.h"
 #include "peas-extension-set.h"
+#include "peas-macros.h"
 #include "peas-object-module.h"
 #include "peas-plugin-info.h"
 


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