[glibmm/use-dllexport-2-62: 7/8] gio/giomm/*.h: Mark classes and functions with GIOMM_API



commit 2362f6143828ca68c8d1df85332d71806bb317ba
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Mar 6 12:31:46 2020 +0800

    gio/giomm/*.h: Mark classes and functions with GIOMM_API
    
    This prepares the build to use compiler directives to export symbols, in
    our bid to drop gendef.exe.

 gio/giomm/contenttype.h  | 13 +++++++++++++
 gio/giomm/init.h         |  1 +
 gio/giomm/slot_async.h   |  4 ++++
 gio/giomm/socketsource.h |  7 ++++---
 gio/giomm/wrap_init.h    |  3 +++
 5 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/gio/giomm/contenttype.h b/gio/giomm/contenttype.h
index de1821b2..6429b8c5 100644
--- a/gio/giomm/contenttype.h
+++ b/gio/giomm/contenttype.h
@@ -42,6 +42,7 @@ namespace Gio
  *
  * @return true if the two strings are identical or equivalent, false otherwise.
  */
+GIOMM_API
 bool content_type_equals(const Glib::ustring& type1, const Glib::ustring& type2);
 
 /**
@@ -52,6 +53,7 @@ bool content_type_equals(const Glib::ustring& type1, const Glib::ustring& type2)
  *
  * @return true if @a type is a kind of @a supertype, false otherwise.
  */
+GIOMM_API
 bool content_type_is_a(const Glib::ustring& type, const Glib::ustring& supertype);
 
 /**
@@ -63,6 +65,7 @@ bool content_type_is_a(const Glib::ustring& type, const Glib::ustring& supertype
  *
  * @return true if the type is the unknown type.
  */
+GIOMM_API
 bool content_type_is_unknown(const Glib::ustring& type);
 
 /**
@@ -72,6 +75,7 @@ bool content_type_is_unknown(const Glib::ustring& type);
  *
  * @return a short description of the content type @a type.
  */
+GIOMM_API
 Glib::ustring content_type_get_description(const Glib::ustring& type);
 
 /**
@@ -81,6 +85,7 @@ Glib::ustring content_type_get_description(const Glib::ustring& type);
  *
  * @return the registered mime-type for the given @a type, or an empty string if unknown.
  */
+GIOMM_API
 Glib::ustring content_type_get_mime_type(const Glib::ustring& type);
 
 /**
@@ -90,6 +95,7 @@ Glib::ustring content_type_get_mime_type(const Glib::ustring& type);
  *
  * @return Icon corresponding to the content type.
  */
+GIOMM_API
 Glib::RefPtr<Icon> content_type_get_icon(const Glib::ustring& type);
 
 #ifdef G_OS_UNIX
@@ -101,6 +107,7 @@ Glib::RefPtr<Icon> content_type_get_icon(const Glib::ustring& type);
  *
  * @newin{2,34}
  */
+GIOMM_API
 Glib::RefPtr<Icon> content_type_get_symbolic_icon(const Glib::ustring& type);
 #endif
 
@@ -113,6 +120,7 @@ Glib::RefPtr<Icon> content_type_get_symbolic_icon(const Glib::ustring& type);
  * @return true if the file type corresponds to a type that can be executable,
  * false otherwise.
  */
+GIOMM_API
 bool content_type_can_be_executable(const Glib::ustring& type);
 
 /** Tries to find a content type based on the mime type name.
@@ -122,6 +130,7 @@ bool content_type_can_be_executable(const Glib::ustring& type);
  *
  * @newin{2,20}
  */
+GIOMM_API
 Glib::ustring content_type_from_mime_type(const Glib::ustring& mime_type);
 
 /**
@@ -137,6 +146,7 @@ Glib::ustring content_type_from_mime_type(const Glib::ustring& mime_type);
  * @return A string indicating a guessed content type for the
  * given data.
  */
+GIOMM_API
 Glib::ustring content_type_guess(
   const std::string& filename, const guchar* data, gsize data_size, bool& result_uncertain);
 
@@ -151,6 +161,7 @@ Glib::ustring content_type_guess(
  * @return A string indicating a guessed content type for the
  * given data.
  */
+GIOMM_API
 Glib::ustring content_type_guess(
   const std::string& filename, const std::string& data, bool& result_uncertain);
 
@@ -169,6 +180,7 @@ Glib::ustring content_type_guess(
  *
  * @newin{2,18}
  */
+GIOMM_API
 Glib::StringArrayHandle content_type_guess_for_tree(const Glib::RefPtr<const File>& root);
 
 /**
@@ -177,6 +189,7 @@ Glib::StringArrayHandle content_type_guess_for_tree(const Glib::RefPtr<const Fil
  *
  * @return List of the registered content types.
  */
+GIOMM_API
 Glib::ListHandle<Glib::ustring> content_types_get_registered();
 
 /** @} group giommContentType */
diff --git a/gio/giomm/init.h b/gio/giomm/init.h
index 1ce3ac5d..e6f36ad2 100644
--- a/gio/giomm/init.h
+++ b/gio/giomm/init.h
@@ -32,6 +32,7 @@ namespace Gio
  * You do not need to call %Gio::init() if you are using Gtk::Application,
  * because it calls %Gio::init() for you.
  */
+GIOMM_API
 void init();
 
 } // end namespace Gio
diff --git a/gio/giomm/slot_async.h b/gio/giomm/slot_async.h
index 228e1c9c..72f5286e 100644
--- a/gio/giomm/slot_async.h
+++ b/gio/giomm/slot_async.h
@@ -13,11 +13,15 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
  */
+
+#include <giommconfig.h>
+
 #include <gio/gio.h>
 
 namespace Gio
 {
 
+GIOMM_API
 void SignalProxy_async_callback(GObject*, GAsyncResult* res, void* data);
 
 } // namespace Gio
diff --git a/gio/giomm/socketsource.h b/gio/giomm/socketsource.h
index c1345c6d..2e3e3b47 100644
--- a/gio/giomm/socketsource.h
+++ b/gio/giomm/socketsource.h
@@ -25,12 +25,12 @@
 
 namespace Gio
 {
-class Socket;
+class GIOMM_API Socket;
 
 /** @newin{2,42}
  * @ingroup NetworkIO
  */
-class SignalSocket
+class GIOMM_API SignalSocket
 {
 public:
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -88,6 +88,7 @@ private:
  * @newin{2,42}
  * @ingroup NetworkIO
  */
+GIOMM_API
 SignalSocket signal_socket(
   const Glib::RefPtr<Glib::MainContext>& context = Glib::RefPtr<Glib::MainContext>());
 
@@ -97,7 +98,7 @@ SignalSocket signal_socket(
  * @newin{2,42}
  * @ingroup NetworkIO
  */
-class SocketSource : public Glib::IOSource
+class GIOMM_API SocketSource : public Glib::IOSource
 {
 public:
   using CppObjectType = Gio::SocketSource;
diff --git a/gio/giomm/wrap_init.h b/gio/giomm/wrap_init.h
index cb7d947f..4b44fb0b 100644
--- a/gio/giomm/wrap_init.h
+++ b/gio/giomm/wrap_init.h
@@ -19,8 +19,11 @@
  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <giommconfig.h>
+
 namespace Gio
 {
+GIOMM_API
 void wrap_init();
 }
 


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