summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-03-06 12:31:46 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-03-12 14:38:26 +0800
commit419ca38193388348c0a0ce5dc8640748eba16df0 (patch)
tree26cf179f5b37fbfe35cb68d26e513ae9623c11eb
parent6c99b4fbdbaaf973c9a5d47d36c2119a2509a6ff (diff)
downloadglibmm-419ca38193388348c0a0ce5dc8640748eba16df0.tar.gz
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.
-rw-r--r--gio/giomm/contenttype.h13
-rw-r--r--gio/giomm/init.h1
-rw-r--r--gio/giomm/slot_async.h4
-rw-r--r--gio/giomm/socketsource.h7
-rw-r--r--gio/giomm/wrap_init.h3
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();
}