[glibmm/glibmm-master-use-dllexport: 2/6] glib/glibmm/*.h: Mark classes and methods with GLIBMM_API
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-master-use-dllexport: 2/6] glib/glibmm/*.h: Mark classes and methods with GLIBMM_API
- Date: Thu, 5 Mar 2020 08:07:46 +0000 (UTC)
commit 52ee0d1cb30bcac34279e99bcf0f271a3fa9a6a3
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Mar 5 12:36:30 2020 +0800
glib/glibmm/*.h: Mark classes and methods with GLIBMM_API
This prepares the code to use __declspec(dllexport) to export all symbols, so
that we can eventually bid farewell to gendf.exe
glib/glibmm/base64.h | 4 ++++
glib/glibmm/class.h | 4 ++--
glib/glibmm/dispatcher.h | 2 +-
glib/glibmm/error.h | 4 ++--
glib/glibmm/exceptionhandler.h | 2 ++
glib/glibmm/extraclassinit.h | 2 +-
glib/glibmm/init.h | 5 +++++
glib/glibmm/interface.h | 2 +-
glib/glibmm/main.h | 29 +++++++++++++++++------------
glib/glibmm/object.h | 8 ++++----
glib/glibmm/objectbase.h | 4 ++--
glib/glibmm/pattern.h | 2 +-
glib/glibmm/property.h | 4 +++-
glib/glibmm/propertyproxy_base.h | 10 +++++-----
glib/glibmm/quark.h | 4 ++--
glib/glibmm/random.h | 2 +-
glib/glibmm/signalproxy.h | 8 ++++----
glib/glibmm/signalproxy_connectionnode.h | 4 +++-
glib/glibmm/stringutils.h | 10 ++++++++++
glib/glibmm/timer.h | 3 ++-
glib/glibmm/ustring.h | 24 +++++++++++++++---------
glib/glibmm/utility.h | 1 +
glib/glibmm/value.h | 22 +++++++++++-----------
glib/glibmm/value_custom.h | 7 +++++--
glib/glibmm/variantdbusstring.h | 4 ++--
glib/glibmm/vectorutils.h | 3 ++-
glib/glibmm/wrap.h | 11 +++++++++--
glib/glibmm/wrap_init.h | 1 +
28 files changed, 118 insertions(+), 68 deletions(-)
---
diff --git a/glib/glibmm/base64.h b/glib/glibmm/base64.h
index 5fae475b..e981dd7f 100644
--- a/glib/glibmm/base64.h
+++ b/glib/glibmm/base64.h
@@ -18,6 +18,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <glibmmconfig.h>
+
#include <string>
#include <glib.h>
@@ -40,12 +42,14 @@ namespace Base64
* @param break_lines Enables/disables line breaking.
* @return The string encoded in Base-64.
*/
+GLIBMM_API
std::string encode(const std::string& source, bool break_lines = false);
/** Decode the given base64 encoded string.
* @param source A string to decode.
* @return The resulting decode string
*/
+GLIBMM_API
std::string decode(const std::string& source);
}
diff --git a/glib/glibmm/class.h b/glib/glibmm/class.h
index 127b9c9c..77b745a3 100644
--- a/glib/glibmm/class.h
+++ b/glib/glibmm/class.h
@@ -28,9 +28,9 @@
namespace Glib
{
-class Interface_Class;
+class GLIBMM_API Interface_Class;
-class Class
+class GLIBMM_API Class
{
public:
/* No constructor/destructor:
diff --git a/glib/glibmm/dispatcher.h b/glib/glibmm/dispatcher.h
index 00c6384e..83bd24e9 100644
--- a/glib/glibmm/dispatcher.h
+++ b/glib/glibmm/dispatcher.h
@@ -62,7 +62,7 @@ namespace Glib
* likely minor and the notification still happens asynchronously. Apart
* from the additional lock the behavior matches the Unix implementation.
*/
-class Dispatcher
+class GLIBMM_API Dispatcher
{
public:
/** Create new Dispatcher instance using the default main context.
diff --git a/glib/glibmm/error.h b/glib/glibmm/error.h
index 32e3a60c..19e37416 100644
--- a/glib/glibmm/error.h
+++ b/glib/glibmm/error.h
@@ -25,7 +25,7 @@
namespace Glib
{
-class Error : public std::exception
+class GLIBMM_API Error : public std::exception
{
public:
Error();
@@ -74,7 +74,7 @@ protected:
// This is needed so Glib::Error can be used with
// Glib::Value and _WRAP_PROPERTY in Gtk::MediaStream.
template <>
-class Value<Glib::Error> : public ValueBase_Boxed
+class GLIBMM_API Value<Glib::Error> : public ValueBase_Boxed
{
public:
using CppType = Glib::Error;
diff --git a/glib/glibmm/exceptionhandler.h b/glib/glibmm/exceptionhandler.h
index a34fdbf3..36317c81 100644
--- a/glib/glibmm/exceptionhandler.h
+++ b/glib/glibmm/exceptionhandler.h
@@ -27,10 +27,12 @@ namespace Glib
/** Specify a slot to be called when an exception is thrown by a signal handler.
*/
+GLIBMM_API
sigc::connection add_exception_handler(const sigc::slot<void()>& slot);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// internal
+GLIBMM_API
void exception_handlers_invoke() noexcept;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/glib/glibmm/extraclassinit.h b/glib/glibmm/extraclassinit.h
index 29c2a952..b5b9e698 100644
--- a/glib/glibmm/extraclassinit.h
+++ b/glib/glibmm/extraclassinit.h
@@ -75,7 +75,7 @@ namespace Glib
*
* @newin{2,58}
*/
-class ExtraClassInit : virtual public ObjectBase
+class GLIBMM_API ExtraClassInit : virtual public ObjectBase
{
protected:
/** Constructor.
diff --git a/glib/glibmm/init.h b/glib/glibmm/init.h
index f41040af..63c5c813 100644
--- a/glib/glibmm/init.h
+++ b/glib/glibmm/init.h
@@ -17,6 +17,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <glibmmconfig.h>
+
namespace Glib
{
@@ -31,6 +33,7 @@ namespace Glib
*
* @see set_init_to_users_preferred_locale()
*/
+GLIBMM_API
void init();
/** Instruct Glib::init() which global locale to set.
@@ -57,6 +60,7 @@ void init();
*
* @newin{2,58}
*/
+GLIBMM_API
void set_init_to_users_preferred_locale(bool state = true);
/** Get the state, set with set_init_to_users_preferred_locale().
@@ -65,6 +69,7 @@ void set_init_to_users_preferred_locale(bool state = true);
*
* @newin{2,58}
*/
+GLIBMM_API
bool get_init_to_users_preferred_locale();
} // namespace Glib
diff --git a/glib/glibmm/interface.h b/glib/glibmm/interface.h
index 9e35b5eb..1e2189c3 100644
--- a/glib/glibmm/interface.h
+++ b/glib/glibmm/interface.h
@@ -23,7 +23,7 @@ namespace Glib
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class Interface_Class;
+class GLIBMM_API Interface_Class;
#endif
// There is no base GInterface struct in Glib, though there is G_TYPE_INTERFACE enum value.
diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h
index aa03d96e..d468552e 100644
--- a/glib/glibmm/main.h
+++ b/glib/glibmm/main.h
@@ -32,8 +32,7 @@ namespace Glib
* Manages all available sources of events.
* @{
*/
-
-class PollFD
+class GLIBMM_API PollFD
{
public:
using fd_t = decltype(GPollFD::fd);
@@ -58,7 +57,7 @@ private:
GPollFD gobject_;
};
-class SignalTimeout
+class GLIBMM_API SignalTimeout
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -194,7 +193,7 @@ private:
SignalTimeout& operator=(const SignalTimeout&);
};
-class SignalIdle
+class GLIBMM_API SignalIdle
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -252,7 +251,7 @@ private:
SignalIdle& operator=(const SignalIdle&);
};
-class SignalIO
+class GLIBMM_API SignalIO
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -323,7 +322,7 @@ private:
SignalIO& operator=(const SignalIO&);
};
-class SignalChildWatch
+class GLIBMM_API SignalChildWatch
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -357,26 +356,30 @@ private:
/** Convenience timeout signal.
* @return A signal proxy; you want to use SignalTimeout::connect().
*/
+GLIBMM_API
SignalTimeout signal_timeout();
/** Convenience idle signal.
* @return A signal proxy; you want to use SignalIdle::connect().
*/
+GLIBMM_API
SignalIdle signal_idle();
/** Convenience I/O signal.
* @return A signal proxy; you want to use SignalIO::connect().
*/
+GLIBMM_API
SignalIO signal_io();
/** Convenience child watch signal.
* @return A signal proxy; you want to use SignalChildWatch::connect().
*/
+GLIBMM_API
SignalChildWatch signal_child_watch();
/** Main context.
*/
-class MainContext
+class GLIBMM_API MainContext
{
public:
using CppObjectType = Glib::MainContext;
@@ -636,9 +639,10 @@ private:
};
/** @relates Glib::MainContext */
+GLIBMM_API
Glib::RefPtr<MainContext> wrap(GMainContext* gobject, bool take_copy = false);
-class MainLoop
+class GLIBMM_API MainLoop
{
public:
using CppObjectType = Glib::MainLoop;
@@ -694,9 +698,10 @@ private:
};
/** @relates Glib::MainLoop */
+GLIBMM_API
Glib::RefPtr<MainLoop> wrap(GMainLoop* gobject, bool take_copy = false);
-class Source
+class GLIBMM_API Source
{
public:
using CppObjectType = Glib::Source;
@@ -856,7 +861,7 @@ public:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
};
-class TimeoutSource : public Glib::Source
+class GLIBMM_API TimeoutSource : public Glib::Source
{
public:
using CppObjectType = Glib::TimeoutSource;
@@ -877,7 +882,7 @@ private:
unsigned int interval_; // milliseconds
};
-class IdleSource : public Glib::Source
+class GLIBMM_API IdleSource : public Glib::Source
{
public:
using CppObjectType = Glib::IdleSource;
@@ -894,7 +899,7 @@ protected:
bool dispatch(sigc::slot_base* slot_data) override;
};
-class IOSource : public Glib::Source
+class GLIBMM_API IOSource : public Glib::Source
{
public:
using CppObjectType = Glib::IOSource;
diff --git a/glib/glibmm/object.h b/glib/glibmm/object.h
index cda15529..6db4b5cb 100644
--- a/glib/glibmm/object.h
+++ b/glib/glibmm/object.h
@@ -47,9 +47,9 @@ namespace Glib
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class Class;
-class Object_Class;
-class GSigConnectionNode;
+class GLIBMM_API Class;
+class GLIBMM_API Object_Class;
+class GLIBMM_API GSigConnectionNode;
/* ConstructParams::ConstructParams() takes a varargs list of properties
* and values, like g_object_new() does. This list will then be converted
@@ -66,7 +66,7 @@ class GSigConnectionNode;
* The comments in object.cc and objectbase.cc should explain in detail
* how this works.
*/
-class ConstructParams
+class GLIBMM_API ConstructParams
{
public:
const Glib::Class& glibmm_class;
diff --git a/glib/glibmm/objectbase.h b/glib/glibmm/objectbase.h
index cf391dcf..885e6d4a 100644
--- a/glib/glibmm/objectbase.h
+++ b/glib/glibmm/objectbase.h
@@ -39,8 +39,8 @@ namespace Glib
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class GSigConnectionNode;
-class Interface_Class;
+class GLIBMM_API GSigConnectionNode;
+class GLIBMM_API Interface_Class;
#endif
// This inherits virtually from sigc::trackable so that people can multiply inherit glibmm classes
diff --git a/glib/glibmm/pattern.h b/glib/glibmm/pattern.h
index 0446907e..db364469 100644
--- a/glib/glibmm/pattern.h
+++ b/glib/glibmm/pattern.h
@@ -33,7 +33,7 @@ namespace Glib
* @{
*/
-class PatternSpec
+class GLIBMM_API PatternSpec
{
public:
explicit PatternSpec(const Glib::ustring& pattern);
diff --git a/glib/glibmm/property.h b/glib/glibmm/property.h
index 35e074c8..daf92eca 100644
--- a/glib/glibmm/property.h
+++ b/glib/glibmm/property.h
@@ -32,9 +32,11 @@ namespace Glib
extern "C" {
#endif // GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
+GLIBMM_API
void custom_get_property_callback(
GObject* object, unsigned int property_id, GValue* value, GParamSpec* param_spec);
+GLIBMM_API
void custom_set_property_callback(
GObject* object, unsigned int property_id, const GValue* value, GParamSpec* param_spec);
@@ -49,7 +51,7 @@ void custom_set_property_callback(
* This class manages the generic parts of the object properties.
* Derived (templated) classes handle the specific value types.
*/
-class PropertyBase
+class GLIBMM_API PropertyBase
{
public:
// noncopyable
diff --git a/glib/glibmm/propertyproxy_base.h b/glib/glibmm/propertyproxy_base.h
index 1e840704..dd4bd8bc 100644
--- a/glib/glibmm/propertyproxy_base.h
+++ b/glib/glibmm/propertyproxy_base.h
@@ -26,11 +26,11 @@
namespace Glib
{
-class ObjectBase;
+class GLIBMM_API ObjectBase;
/// Use the connect() method, with sigc::ptr_fun() or sigc::mem_fun() to connect signals to signal
/// handlers.
-class SignalProxyProperty : public SignalProxyBase
+class GLIBMM_API SignalProxyProperty : public SignalProxyBase
{
public:
friend class PropertyProxy_Base;
@@ -51,7 +51,7 @@ private:
SignalProxyProperty& operator=(const SignalProxyProperty&); // not implemented
};
-class PropertyProxy_Base
+class GLIBMM_API PropertyProxy_Base
{
public:
PropertyProxy_Base(ObjectBase* obj, const char* property_name);
@@ -79,13 +79,13 @@ private:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class SignalProxyProperty;
+class GLIBMM_API SignalProxyProperty;
/** PropertyProxyConnectionNode is a connection node for use with SignalProxyProperty.
* It's like SignalProxyConnectionNode, but it contains the property name too.
* This is not public API.
*/
-class PropertyProxyConnectionNode : public SignalProxyConnectionNode
+class GLIBMM_API PropertyProxyConnectionNode : public SignalProxyConnectionNode
{
public:
friend class SignalProxyProperty;
diff --git a/glib/glibmm/quark.h b/glib/glibmm/quark.h
index b860e741..bf839596 100644
--- a/glib/glibmm/quark.h
+++ b/glib/glibmm/quark.h
@@ -39,7 +39,7 @@ namespace Glib
* void set_data (const Quark&, void * data);
* void* get_data (const QueryQuark&);
*/
-class QueryQuark
+class GLIBMM_API QueryQuark
{
public:
QueryQuark(const GQuark& q);
@@ -56,7 +56,7 @@ private:
GQuark quark_;
};
-class Quark : public QueryQuark
+class GLIBMM_API Quark : public QueryQuark
{
public:
Quark(const ustring& s);
diff --git a/glib/glibmm/random.h b/glib/glibmm/random.h
index 3b9893e5..83d2caa2 100644
--- a/glib/glibmm/random.h
+++ b/glib/glibmm/random.h
@@ -33,7 +33,7 @@ namespace Glib
* @{
*/
-class Rand
+class GLIBMM_API Rand
{
public:
Rand();
diff --git a/glib/glibmm/signalproxy.h b/glib/glibmm/signalproxy.h
index 8641d24d..39711eba 100644
--- a/glib/glibmm/signalproxy.h
+++ b/glib/glibmm/signalproxy.h
@@ -33,7 +33,7 @@ namespace Glib
{
// Forward declarations
-class ObjectBase;
+class GLIBMM_API ObjectBase;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -47,7 +47,7 @@ struct SignalProxyInfo
#endif // DOXYGEN_SHOULD_SKIP_THIS
// This base class is used by SignalProxyNormal, SignalProxyDetailedBase and SignalProxyProperty.
-class SignalProxyBase
+class GLIBMM_API SignalProxyBase
{
public:
SignalProxyBase(Glib::ObjectBase* obj);
@@ -80,7 +80,7 @@ private:
*
* For signals with a detailed name (signal_name::detail_name) see SignalProxyDetailedBase.
*/
-class SignalProxyNormal : public SignalProxyBase
+class GLIBMM_API SignalProxyNormal : public SignalProxyBase
{
public:
~SignalProxyNormal() noexcept;
@@ -272,7 +272,7 @@ public:
* the template derivatives, which serve as gatekeepers for the
* types allowed on a particular signal.
*/
-class SignalProxyDetailedBase : public SignalProxyBase
+class GLIBMM_API SignalProxyDetailedBase : public SignalProxyBase
{
public:
~SignalProxyDetailedBase() noexcept;
diff --git a/glib/glibmm/signalproxy_connectionnode.h b/glib/glibmm/signalproxy_connectionnode.h
index da82bdf1..8cd39630 100644
--- a/glib/glibmm/signalproxy_connectionnode.h
+++ b/glib/glibmm/signalproxy_connectionnode.h
@@ -19,6 +19,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <glibmmconfig.h>
+
#include <sigc++/sigc++.h>
#include <glib.h>
@@ -36,7 +38,7 @@ namespace Glib
* It lives between the layer of Gtk+ and libsigc++.
* It is very much an internal class.
*/
-class SignalProxyConnectionNode : public sigc::notifiable
+class GLIBMM_API SignalProxyConnectionNode : public sigc::notifiable
{
public:
/** @param slot The signal handler for the glib signal.
diff --git a/glib/glibmm/stringutils.h b/glib/glibmm/stringutils.h
index 466a9b6e..66ad2c51 100644
--- a/glib/glibmm/stringutils.h
+++ b/glib/glibmm/stringutils.h
@@ -34,6 +34,7 @@ namespace Glib
* @param prefix The prefix to look for.
* @return <tt>true</tt> if @a str begins with @a prefix, <tt>false</tt> otherwise.
*/
+GLIBMM_API
bool str_has_prefix(const std::string& str, const std::string& prefix);
/** Looks whether the string @a str ends with @a suffix.
@@ -42,6 +43,7 @@ bool str_has_prefix(const std::string& str, const std::string& prefix);
* @param suffix The suffix to look for.
* @return <tt>true</tt> if @a str ends with @a suffix, <tt>false</tt> otherwise.
*/
+GLIBMM_API
bool str_has_suffix(const std::string& str, const std::string& suffix);
namespace Ascii
@@ -65,6 +67,7 @@ namespace Ascii
* @throw std::overflow_error Thrown if the correct value would cause overflow.
* @throw std::underflow_error Thrown if the correct value would cause underflow.
*/
+GLIBMM_API
double strtod(const std::string& str);
/** Converts a string to a <tt>double</tt> value.
@@ -88,6 +91,7 @@ double strtod(const std::string& str);
* @throw std::overflow_error Thrown if the correct value would cause overflow.
* @throw std::underflow_error Thrown if the correct value would cause underflow.
*/
+GLIBMM_API
double strtod(const std::string& str, std::string::size_type& end_index,
std::string::size_type start_index = 0);
@@ -100,6 +104,7 @@ double strtod(const std::string& str, std::string::size_type& end_index,
* @param d The <tt>double</tt> value to convert.
* @return The converted string.
*/
+GLIBMM_API
std::string dtostr(double d);
} // namespace Ascii
@@ -118,6 +123,7 @@ std::string dtostr(double d);
* @param source A string to escape.
* @return A copy of @a source with certain characters escaped. See above.
*/
+GLIBMM_API
std::string strescape(const std::string& source);
/** Escapes all special characters in the string.
@@ -136,6 +142,7 @@ std::string strescape(const std::string& source);
* @param exceptions A string of characters not to escape in @a source.
* @return A copy of @a source with certain characters escaped. See above.
*/
+GLIBMM_API
std::string strescape(const std::string& source, const std::string& exceptions);
/** Replaces all escaped characters with their one byte equivalent.
@@ -145,6 +152,7 @@ std::string strescape(const std::string& source, const std::string& exceptions);
* @param source A string to compress.
* @return A copy of @a source with all escaped characters compressed.
*/
+GLIBMM_API
std::string strcompress(const std::string& source);
/** Returns a string corresponding to the given error code, e.g.\ <tt>"no such process"</tt>.
@@ -156,6 +164,7 @@ std::string strcompress(const std::string& source);
* @return A string describing the error code. If the error code is unknown,
* <tt>"unknown error (<em>\<errnum\></em>)"</tt> is returned.
*/
+GLIBMM_API
Glib::ustring strerror(int errnum);
/** Returns a string describing the given signal, e.g.\ <tt>"Segmentation fault"</tt>.
@@ -167,6 +176,7 @@ Glib::ustring strerror(int errnum);
* @return A string describing the signal. If the signal is unknown,
* <tt>"unknown signal (<em>\<signum\></em>)"</tt> is returned.
*/
+GLIBMM_API
Glib::ustring strsignal(int signum);
} // namespace Glib
diff --git a/glib/glibmm/timer.h b/glib/glibmm/timer.h
index fcee92b4..43fff375 100644
--- a/glib/glibmm/timer.h
+++ b/glib/glibmm/timer.h
@@ -29,7 +29,7 @@ namespace Glib
/** Portable stop watch interface.
* This resembles a convient and portable timer with microseconds resolution.
*/
-class Timer
+class GLIBMM_API Timer
{
public:
/** Create a new timer.
@@ -66,6 +66,7 @@ private:
GTimer* gobject_;
};
+GLIBMM_API
void usleep(unsigned long microseconds);
} // namespace Glib
diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h
index 38414c9e..c9e24cd1 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -32,7 +32,7 @@
namespace Glib
{
-class ustring;
+class GLIBMM_API ustring;
//********** Glib::StdStringView and Glib::UStringView *************
@@ -72,7 +72,7 @@ class ustring;
*
* @newin{2,64}
*/
-class StdStringView
+class GLIBMM_API StdStringView
{
public:
StdStringView(const std::string& s) : pstring_(s.c_str()) {}
@@ -108,7 +108,7 @@ private:
*
* @newin{2,64}
*/
-class UStringView
+class GLIBMM_API UStringView
{
public:
inline UStringView(const Glib::ustring& s);
@@ -220,6 +220,7 @@ private:
* but it might be useful as utility function if you prefer using
* std::string even for UTF-8 encoding.
*/
+GLIBMM_API
gunichar get_unichar_from_std_iterator(std::string::const_iterator pos) G_GNUC_PURE;
/** %Glib::ustring has much the same interface as std::string, but contains
@@ -311,7 +312,7 @@ gunichar get_unichar_from_std_iterator(std::string::const_iterator pos) G_GNUC_P
* reimplement the interface so that all operations are based on characters
* instead of bytes.
*/
-class ustring
+class GLIBMM_API ustring
{
public:
using size_type = std::string::size_type;
@@ -342,11 +343,11 @@ public:
#endif /* GLIBMM_HAVE_SUN_REVERSE_ITERATOR */
#ifdef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS
- static GLIBMM_API const size_type npos = std::string::npos;
+ static const size_type npos = std::string::npos;
#else
// The IRIX MipsPro compiler says "The indicated constant value is not known",
// so we need to initalize the static member data elsewhere.
- static GLIBMM_API const size_type npos;
+ static const size_type npos;
#endif
/*! Default constructor, which creates an empty string.
@@ -959,18 +960,19 @@ struct ustring::SequenceToString<In, gunichar> : public std::string
};
template <>
-struct ustring::SequenceToString<Glib::ustring::iterator, gunichar> : public std::string
+struct GLIBMM_API ustring::SequenceToString<Glib::ustring::iterator, gunichar> : public std::string
{
SequenceToString(Glib::ustring::iterator pbegin, Glib::ustring::iterator pend);
};
template <>
-struct ustring::SequenceToString<Glib::ustring::const_iterator, gunichar> : public std::string
+struct GLIBMM_API ustring::SequenceToString<Glib::ustring::const_iterator, gunichar> : public std::string
{
SequenceToString(Glib::ustring::const_iterator pbegin, Glib::ustring::const_iterator pend);
};
-class ustring::FormatStream
+
+class GLIBMM_API ustring::FormatStream
{
public:
// noncopyable
@@ -1006,12 +1008,14 @@ public:
* @relates Glib::ustring
* @throw Glib::ConvertError
*/
+GLIBMM_API
std::istream& operator>>(std::istream& is, Glib::ustring& utf8_string);
/** Stream output operator.
* @relates Glib::ustring
* @throw Glib::ConvertError
*/
+GLIBMM_API
std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string);
#ifdef GLIBMM_HAVE_WIDE_STREAM
@@ -1019,6 +1023,7 @@ std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string);
/** Wide stream input operator.
* @relates Glib::ustring
* @throw Glib::ConvertError
+GLIBMM_API
*/
std::wistream& operator>>(std::wistream& is, ustring& utf8_string);
@@ -1026,6 +1031,7 @@ std::wistream& operator>>(std::wistream& is, ustring& utf8_string);
* @relates Glib::ustring
* @throw Glib::ConvertError
*/
+GLIBMM_API
std::wostream& operator<<(std::wostream& os, const ustring& utf8_string);
#endif /* GLIBMM_HAVE_WIDE_STREAM */
diff --git a/glib/glibmm/utility.h b/glib/glibmm/utility.h
index 6c7378af..4179e6ce 100644
--- a/glib/glibmm/utility.h
+++ b/glib/glibmm/utility.h
@@ -80,6 +80,7 @@ c_str_or_nullptr(const T& str)
}
// Append type_name to dest, while replacing special characters with '+'.
+GLIBMM_API
void append_canonical_typename(std::string& dest, const char* type_name);
// Delete data referred to by a void*.
diff --git a/glib/glibmm/value.h b/glib/glibmm/value.h
index 8afc5bfb..f43194a1 100644
--- a/glib/glibmm/value.h
+++ b/glib/glibmm/value.h
@@ -49,7 +49,7 @@ class Object;
/**
* @ingroup glibmmValue
*/
-class ValueBase
+class GLIBMM_API ValueBase
{
public:
/** Initializes the GValue, but without a type. You have to
@@ -97,7 +97,7 @@ protected:
/**
* @ingroup glibmmValue
*/
-class ValueBase_Boxed : public ValueBase
+class GLIBMM_API ValueBase_Boxed : public ValueBase
{
public:
static GType value_type() G_GNUC_CONST;
@@ -115,7 +115,7 @@ protected:
/**
* @ingroup glibmmValue
*/
-class ValueBase_Object : public ValueBase
+class GLIBMM_API ValueBase_Object : public ValueBase
{
public:
static GType value_type() G_GNUC_CONST;
@@ -134,7 +134,7 @@ protected:
/**
* @ingroup glibmmValue
*/
-class ValueBase_Enum : public ValueBase
+class GLIBMM_API ValueBase_Enum : public ValueBase
{
public:
static GType value_type() G_GNUC_CONST;
@@ -152,7 +152,7 @@ protected:
/**
* @ingroup glibmmValue
*/
-class ValueBase_Flags : public ValueBase
+class GLIBMM_API ValueBase_Flags : public ValueBase
{
public:
static GType value_type() G_GNUC_CONST;
@@ -170,7 +170,7 @@ protected:
/**
* @ingroup glibmmValue
*/
-class ValueBase_String : public ValueBase
+class GLIBMM_API ValueBase_String : public ValueBase
{
public:
static GType value_type() G_GNUC_CONST;
@@ -188,7 +188,7 @@ protected:
/**
* @ingroup glibmmValue
*/
-class ValueBase_Variant : public ValueBase
+class GLIBMM_API ValueBase_Variant : public ValueBase
{
public:
static GType value_type() G_GNUC_CONST;
@@ -331,7 +331,7 @@ namespace Glib
* @ingroup glibmmValue
*/
template <>
-class Value<std::string> : public ValueBase_String
+class GLIBMM_API Value<std::string> : public ValueBase_String
{
public:
using CppType = std::string;
@@ -344,7 +344,7 @@ public:
* @ingroup glibmmValue
*/
template <>
-class Value<Glib::ustring> : public ValueBase_String
+class GLIBMM_API Value<Glib::ustring> : public ValueBase_String
{
public:
using CppType = Glib::ustring;
@@ -357,7 +357,7 @@ public:
* @ingroup glibmmValue
*/
template <>
-class Value<std::vector<std::string>> : public ValueBase_Boxed
+class GLIBMM_API Value<std::vector<std::string>> : public ValueBase_Boxed
{
public:
using CppType = std::vector<std::string>;
@@ -372,7 +372,7 @@ public:
* @ingroup glibmmValue
*/
template <>
-class Value<std::vector<Glib::ustring>> : public ValueBase_Boxed
+class GLIBMM_API Value<std::vector<Glib::ustring>> : public ValueBase_Boxed
{
public:
using CppType = std::vector<Glib::ustring>;
diff --git a/glib/glibmm/value_custom.h b/glib/glibmm/value_custom.h
index 8c333994..421fa28a 100644
--- a/glib/glibmm/value_custom.h
+++ b/glib/glibmm/value_custom.h
@@ -43,6 +43,8 @@ typedef void (*ValueCopyFunc)(const GValue*, GValue*);
* as subtype of G_TYPE_BOXED, via this function. The type_name argument
* should be the C++ RTTI name.
*/
+
+GLIBMM_API
GType custom_boxed_type_register(
const char* type_name, ValueInitFunc init_func, ValueFreeFunc free_func, ValueCopyFunc copy_func);
@@ -50,6 +52,7 @@ GType custom_boxed_type_register(
* each T* or const T* will be registered as a subtype of G_TYPE_POINTER,
* via this function. The type_name argument should be the C++ RTTI name.
*/
+GLIBMM_API
GType custom_pointer_type_register(const char* type_name);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
@@ -134,7 +137,7 @@ private:
* pointer, you must take care of that yourself.
*/
template <class T, typename Enable>
-class Value<T*, Enable> : public Value_Pointer<T*>
+class GLIBMM_API Value<T*, Enable> : public Value_Pointer<T*>
{
};
@@ -144,7 +147,7 @@ class Value<T*, Enable> : public Value_Pointer<T*>
* pointer, you must take care of that yourself.
*/
template <class T, typename Enable>
-class Value<const T*, Enable> : public Value_Pointer<const T*>
+class GLIBMM_API Value<const T*, Enable> : public Value_Pointer<const T*>
{
};
diff --git a/glib/glibmm/variantdbusstring.h b/glib/glibmm/variantdbusstring.h
index f6a6e75a..ced63b8c 100644
--- a/glib/glibmm/variantdbusstring.h
+++ b/glib/glibmm/variantdbusstring.h
@@ -36,7 +36,7 @@ namespace Glib
* @newin{2,54}
* @ingroup Variant
*/
-class DBusObjectPathString : public Glib::ustring
+class GLIBMM_API DBusObjectPathString : public Glib::ustring
{
public:
using Glib::ustring::ustring;
@@ -53,7 +53,7 @@ public:
* @newin{2,54}
* @ingroup Variant
*/
-class DBusSignatureString : public Glib::ustring
+class GLIBMM_API DBusSignatureString : public Glib::ustring
{
public:
using Glib::ustring::ustring;
diff --git a/glib/glibmm/vectorutils.h b/glib/glibmm/vectorutils.h
index f68903d1..7339ef0a 100644
--- a/glib/glibmm/vectorutils.h
+++ b/glib/glibmm/vectorutils.h
@@ -110,6 +110,7 @@ create_array(typename std::vector<typename Tr::CppType>::const_iterator pbegin,
/* first class function for bools, because std::vector<bool> is a specialization
* which does not conform to being an STL container.
*/
+GLIBMM_API
gboolean* create_bool_array(std::vector<bool>::const_iterator pbegin, std::size_t size);
/* Create and fill a GList as efficient as possible.
@@ -479,7 +480,7 @@ public:
};
template <>
-class ArrayHandler<bool>
+class GLIBMM_API ArrayHandler<bool>
{
public:
using CType = gboolean;
diff --git a/glib/glibmm/wrap.h b/glib/glibmm/wrap.h
index dfa4c96a..0b54a7ee 100644
--- a/glib/glibmm/wrap.h
+++ b/glib/glibmm/wrap.h
@@ -26,22 +26,27 @@ namespace Glib
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class ObjectBase;
-class Object;
+class GLIBMM_API ObjectBase;
+class GLIBMM_API Object;
// Type of the per-class wrap_new() functions.
using WrapNewFunction = Glib::ObjectBase*(*)(GObject*);
// Setup and free the structures used by wrap_register().
// Both functions might be called more than once.
+GLIBMM_API
void wrap_register_init();
+
+GLIBMM_API
void wrap_register_cleanup();
// Register a new type for auto allocation.
+GLIBMM_API
void wrap_register(GType type, WrapNewFunction func);
// Return the current C++ wrapper instance of the GObject,
// or automatically generate a new wrapper if there's none.
+GLIBMM_API
Glib::ObjectBase* wrap_auto(GObject* object, bool take_copy = false);
/** Create a C++ instance of a known C++ type that is mostly closely associated with the GType of
@@ -50,6 +55,7 @@ Glib::ObjectBase* wrap_auto(GObject* object, bool take_copy = false);
* @param interface_gtype The returned instance will implement this interface. Otherwise it will be
* NULL.
*/
+GLIBMM_API
Glib::ObjectBase* wrap_create_new_wrapper_for_interface(GObject* object, GType interface_gtype);
// Return the current C++ wrapper instance of the GObject,
@@ -107,6 +113,7 @@ wrap_auto_interface(GObject* object, bool take_copy = false)
// use take_copy = true when wrapping a struct member.
// TODO: move to object.h ?
/** @relates Glib::Object */
+GLIBMM_API
Glib::RefPtr<Glib::Object> wrap(GObject* object, bool take_copy = false);
/** Get the underlying C instance from the C++ instance. This is just
diff --git a/glib/glibmm/wrap_init.h b/glib/glibmm/wrap_init.h
index df27023b..950816fa 100644
--- a/glib/glibmm/wrap_init.h
+++ b/glib/glibmm/wrap_init.h
@@ -24,6 +24,7 @@
namespace Glib
{
+GLIBMM_API
void wrap_init();
} // namespace Glib
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]