diff options
author | Chun-wei Fan <fanc999@yahoo.com.tw> | 2020-03-12 06:45:04 +0000 |
---|---|---|
committer | Chun-wei Fan <fanc999@yahoo.com.tw> | 2020-03-12 06:45:04 +0000 |
commit | 43df172af0733c9ad5580e194a9e0a64f5384c2c (patch) | |
tree | 650f93bc24deca3259456c39b1ee4088b385489a | |
parent | fe045951967568b5fc107debfe7b363b093c678d (diff) | |
parent | 5201fbd5ecedb0b04d3bb92127d8631771806757 (diff) | |
download | glibmm-43df172af0733c9ad5580e194a9e0a64f5384c2c.tar.gz |
Merge branch 'use-dllexport-2-62' into 'glibmm-2-62'
Drop gendef.exe and use __declspec(dllexport) for glibmm-2-62
See merge request GNOME/glibmm!30
230 files changed, 956 insertions, 884 deletions
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak index f6d5c2fc..f3f5cf03 100644 --- a/MSVC_NMake/build-rules-msvc.mak +++ b/MSVC_NMake/build-rules-msvc.mak @@ -93,14 +93,14 @@ $** # $(dependent_objects) # << # @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 -$(GLIBMM_DLL): vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\glibmm.def $(glibmm_OBJS) - link /DLL $(LDFLAGS_NOLTCG) $(GOBJECT_LIBS) $(LIBSIGC_LIB) /implib:$(GLIBMM_LIB) /def:vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\glibmm.def -out:$@ @<< +$(GLIBMM_DLL): vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm $(glibmm_OBJS) + link /DLL $(LDFLAGS_NOLTCG) $(GOBJECT_LIBS) $(LIBSIGC_LIB) /implib:$(GLIBMM_LIB) -out:$@ @<< $(glibmm_OBJS) << - @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 -$(GIOMM_DLL): $(GLIBMM_LIB) vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\giomm.def $(giomm_OBJS) - link /DLL $(LDFLAGS_NOLTCG) $(GLIBMM_LIB) $(GIO_LIBS) $(LIBSIGC_LIB) /implib:$(GIOMM_LIB) /def:vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\giomm.def -out:$@ @<< + +$(GIOMM_DLL): vs$(PDBVER)\$(CFG)\$(PLAT)\giomm $(GLIBMM_LIB) $(giomm_OBJS) + link /DLL $(LDFLAGS_NOLTCG) $(GLIBMM_LIB) $(GIO_LIBS) $(LIBSIGC_LIB) /implib:$(GIOMM_LIB) -out:$@ @<< $(giomm_OBJS) << @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 @@ -113,11 +113,6 @@ $(giomm_OBJS) # << # @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1 -# For the gendef tool -{.\gendef\}.cc{vs$(PDBVER)\$(CFG)\$(PLAT)\}.exe: - @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\gendef\ $(MAKE) -f Makefile.vc CFG=$(CFG) vs$(PDBVER)\$(CFG)\$(PLAT)\gendef - $(CXX) $(GLIBMM_BASE_CFLAGS) $(CFLAGS) /Fo$(@D)\gendef\ /Fd$(@D)\gendef\ $< /link $(LDFLAGS) /out:$@ - # For the buildable glibmm examples vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm-ex-compose.exe: ..\examples\compose\main.cc $(GLIBMM_LIB) vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm-ex-dispatcher2.exe: ..\examples\thread\dispatcher2.cc $(GLIBMM_LIB) @@ -281,8 +276,6 @@ clean: @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\*.cc @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\private\*.h @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\*.h - @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\gendef\*.obj - @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\gendef\*.pdb @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\giomm-tests rd vs$(PDBVER)\$(CFG)\$(PLAT)\giomm-tests @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\giomm-ex @@ -292,6 +285,5 @@ clean: @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm-ex @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\private @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm - @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\gendef .SUFFIXES: .cc .h .ccg .hg .obj .cc.m4 .h.m4 diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak index 872e9cb0..93029a0c 100644 --- a/MSVC_NMake/config-msvc.mak +++ b/MSVC_NMake/config-msvc.mak @@ -26,7 +26,7 @@ GLIBMM_BASE_CFLAGS = \ /Ivs$(PDBVER)\$(CFG)\$(PLAT) \ /I..\untracked\glib /I..\untracked\glib\glibmm \ /I..\glib /I..\glib\glibmm /I.\glibmm \ - /wd4530 /EHsc \ + /wd4530 /wd4251 /wd4275 /EHsc \ /FImsvc_recommended_pragmas.h GIOMM_BASE_CFLAGS = \ @@ -75,7 +75,6 @@ GIOMM_LIBNAME = giomm-vc$(PDBVER)0$(DEBUG_SUFFIX)-$(GLIBMM_MAJOR_VERSION)_$(GLIB GIOMM_DLL = vs$(PDBVER)\$(CFG)\$(PLAT)\$(GIOMM_LIBNAME).dll GIOMM_LIB = vs$(PDBVER)\$(CFG)\$(PLAT)\$(GIOMM_LIBNAME).lib -GENDEF = vs$(PDBVER)\$(CFG)\$(PLAT)\gendef.exe GOBJECT_LIBS = gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib GIO_LIBS = gio-2.0.lib $(GOBJECT_LIBS) diff --git a/MSVC_NMake/filelist.am b/MSVC_NMake/filelist.am index 51cd3147..c450c502 100644 --- a/MSVC_NMake/filelist.am +++ b/MSVC_NMake/filelist.am @@ -6,7 +6,6 @@ msvc_nmake_data = \ create-lists.bat \ create-lists-msvc.mak \ detectenv-msvc.mak \ - gendef/gendef.cc \ generate-msvc.mak \ glibmm/glibmmconfig.h \ glibmm/glibmm.rc \ diff --git a/MSVC_NMake/gendef/gendef.cc b/MSVC_NMake/gendef/gendef.cc deleted file mode 100644 index d18ac9fb..00000000 --- a/MSVC_NMake/gendef/gendef.cc +++ /dev/null @@ -1,104 +0,0 @@ -/* - * MICO --- an Open Source CORBA implementation - * Copyright (c) 2003 Harald Böhme - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * For more information, visit the MICO Home Page at - * http://www.mico.org/ - */ - -/* Modified by Cedric Gustin <cedric.gustin@gmail.com> on 2006/01/13 : - * Redirect the output of dumpbin to dumpbin.out instead of reading the - * output stream of popen, as it fails with Visual Studio 2005 in - * pre-link build events. - */ - -#include <fstream> -#include <iostream> -#include <stdio.h> - -using namespace std; - -int -main(int argc, char** argv) -{ - if (argc < 4) - { - cerr << "Usage: " << argv[0] << " <def-file-name> <dll-base-name> <obj-file> ...." << endl; - return 2; - } - - // CG : Explicitly redirect stdout to dumpbin.out. - string dumpbin = "dumpbin /SYMBOLS /OUT:dumpbin.out"; - int i = 3; - - for (; i < argc;) - { - dumpbin += " "; - dumpbin += argv[i++]; - } - - FILE* dump; - - if ((dump = _popen(dumpbin.c_str(), "r")) == NULL) - { - cerr << "could not popen dumpbin" << endl; - return 3; - } - - // CG : Wait for the dumpbin process to finish and open dumpbin.out. - _pclose(dump); - dump = fopen("dumpbin.out", "r"); - - ofstream def_file(argv[1]); - - def_file << "LIBRARY " << argv[2] << endl; - def_file << "EXPORTS" << endl; - - i = 0; - while (!feof(dump)) - { - char buf[65000]; - - if (fgets(buf, 64999, dump) != NULL) - { - if (!strstr(buf, " UNDEF ") && strstr(buf, " External ")) - { - char* s = strchr(buf, '|') + 1; - while (*s == ' ' || *s == '\t') - s++; - char* e = s; - while (*e != ' ' && *e != '\t' && *e != '\0' && *e != '\n') - e++; - *e = '\0'; - - if (strchr(s, '?') == 0 && s[0] == '_' && - strchr(s, '@') == 0) // this is a C export type: _fct -> fct - def_file << " " << (s + 1) << endl; - else if (strchr(s, '?') != 0 && strncmp(s, "??_G", 4) != 0 && strncmp(s, "??_E", 4) != 0) - { - def_file << " " << s << endl; - } - } - } - } - - // CG : Close dumpbin.out and delete it. - fclose(dump); - remove("dumpbin.out"); - - cout << dumpbin.c_str() << endl; -} diff --git a/MSVC_NMake/gendef/meson.build b/MSVC_NMake/gendef/meson.build deleted file mode 100644 index 3dc9cc25..00000000 --- a/MSVC_NMake/gendef/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -# MSVC_NMake/gendef - -# Input: is_msvc -# Output: gendef - -# Used to generate the .def file required to obtain the import .lib file -if is_msvc - gendef = executable('gendef', 'gendef.cc', install: false) -endif diff --git a/MSVC_NMake/generate-msvc.mak b/MSVC_NMake/generate-msvc.mak index ed897e5e..bd9a9dd6 100644 --- a/MSVC_NMake/generate-msvc.mak +++ b/MSVC_NMake/generate-msvc.mak @@ -4,7 +4,6 @@ # one is maintaining the NMake build files. # Create the build directories -vs$(PDBVER)\$(CFG)\$(PLAT)\gendef \ vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm \ vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\private \ vs$(PDBVER)\$(CFG)\$(PLAT)\giomm \ @@ -16,13 +15,6 @@ vs$(PDBVER)\$(CFG)\$(PLAT)\giomm-tests \ vs$(PDBVER)\$(CFG)\$(PLAT)\glib-extra-defs-gen: @-md $@ -# Generate .def files -vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\glibmm.def: $(GENDEF) vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm $(glibmm_OBJS) - vs$(PDBVER)\$(CFG)\$(PLAT)\gendef.exe $@ $(GLIBMM_LIBNAME) vs$(PDBVER)\$(CFG)\$(PLAT)\glibmm\*.obj - -vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\giomm.def: $(GENDEF) vs$(PDBVER)\$(CFG)\$(PLAT)\giomm $(giomm_OBJS) - vs$(PDBVER)\$(CFG)\$(PLAT)\gendef.exe $@ $(GIOMM_LIBNAME) vs$(PDBVER)\$(CFG)\$(PLAT)\giomm\*.obj - # Compile schema for giomm settings example vs$(PDBVER)\$(CFG)\$(PLAT)\gschema.compiled: ..\examples\settings\org.gtkmm.demo.gschema.xml $(GLIB_COMPILE_SCHEMAS) --targetdir=vs$(PDBVER)\$(CFG)\$(PLAT) ..\examples\settings diff --git a/Makefile.am b/Makefile.am index f2f18f7d..31aa2419 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,7 +57,6 @@ DISTCLEANFILES = $(filter %mmconfig.h,$(msvc_files)) EXTRA_DIST = \ meson.build \ meson_options.txt \ - MSVC_NMake/gendef/meson.build \ MSVC_NMake/giomm/meson.build \ MSVC_NMake/glibmm/meson.build \ docs/reference/meson.build \ 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/meson.build b/gio/giomm/meson.build index a64cb8c7..99aa3d68 100644 --- a/gio/giomm/meson.build +++ b/gio/giomm/meson.build @@ -3,7 +3,7 @@ # Input: giomm_build_dep, giomm_pcname, maintainer_mode, project_source_root, # generate_binding_py, handle_built_files_py, m4_files, pm_files, # glibmm_libversion, install_includedir, python3, giomm_rc, gmmproc_dir, -# is_host_windows, gendef, gmmproc, generate_wrap_init_pl +# is_host_windows, gmmproc, generate_wrap_init_pl # Output: giomm_hg_ccg_basenames, giomm_extra_h_files, built_files_root, # giomm_built_h_file_targets, giomm_dep @@ -210,6 +210,16 @@ install_headers(giomm_extra_h_files, subdir: giomm_pcname / 'giomm') untracked_giomm = 'untracked' / 'gio' / 'giomm' src_untracked_giomm = project_source_root / untracked_giomm +extra_giomm_objects = [] +giomm_cpp_flags = [ '-DGIOMM_BUILD=1' ] + +# Build the .rc file for Windows builds and link to it +if is_host_windows + windows = import('windows') + giomm_res = windows.compile_resources(giomm_rc) + extra_giomm_objects += giomm_res +endif + if maintainer_mode # Maintainer mode. Generate .h and .cc files from .hg and .ccg files in ../src. @@ -291,13 +301,15 @@ if maintainer_mode ) extra_include_dirs = ['..', '..' / '..' / 'glib'] - gio_int_lib = static_library('giomm-int', + + giomm_library = library(giomm_pcname, extra_giomm_objects, giomm_used_built_cc_file_targets, giomm_extra_cc_files, built_dummy_h_file_target, + version: glibmm_libversion, include_directories: extra_include_dirs, - cpp_args: '-DGIOMM_BUILD=1', + cpp_args: giomm_cpp_flags, dependencies: giomm_build_dep, link_with: glibmm_library, - install: false, + install: true, ) built_h_cc_dir = meson.current_build_dir() @@ -338,56 +350,20 @@ else # not maintainer_mode '..' / '..' / 'glib', '..' / '..' / 'untracked' / 'glib', ] - # We need this so that we can run gendef.exe to get the .def file - # needed for obtaining the .lib file for the giomm DLL - gio_int_lib = static_library('giomm-int', + giomm_library = library(giomm_pcname, extra_giomm_objects, built_cc_files, giomm_extra_cc_files, + version: glibmm_libversion, include_directories: extra_include_dirs, - cpp_args: '-DGIOMM_BUILD=1', + cpp_args: giomm_cpp_flags, dependencies: giomm_build_dep, link_with: glibmm_library, - install: false, + install: true, ) built_h_cc_dir = src_untracked_giomm endif -giomm_def = [] -giomm_extra_link_args = [] -extra_giomm_objects = [] - -if is_msvc - giomm_def = custom_target('giomm.def', - output: 'giomm.def', - depends: gio_int_lib, - command: [ gendef, - '@OUTPUT@', - '@0@-@1@.dll'.format(giomm_pcname, glibmm_libversion.split('.')[0]), - gio_int_lib.full_path(), - ], - install: false, - ) - giomm_extra_link_args = ['/def:@0@'.format(giomm_def.full_path())] -endif - -# Build the .rc file for Windows builds and link to it -if is_host_windows - windows = import('windows') - giomm_res = windows.compile_resources(giomm_rc) - extra_giomm_objects += giomm_res -endif - -giomm_library = library(giomm_pcname, extra_giomm_objects, - objects: gio_int_lib.extract_all_objects(), - version: glibmm_libversion, - dependencies: giomm_build_dep, - link_depends: giomm_def, - link_args: giomm_extra_link_args, - link_with: glibmm_library, - install: true, -) - # Install built .h and _p.h files. meson.add_install_script( python3.path(), generate_binding_py, 'install_built_h_files', 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(); } diff --git a/gio/giommconfig.h.in b/gio/giommconfig.h.in index 8f27b73d..b9579c6e 100644 --- a/gio/giommconfig.h.in +++ b/gio/giommconfig.h.in @@ -19,20 +19,17 @@ #undef GIOMM_STATIC_LIB // Enable DLL-specific stuff only when not building a static library -#if !defined(__CYGWIN__) && defined(__MINGW32__) && !defined(GIOMM_STATIC_LIB) +#if !defined(__CYGWIN__) && (defined(__MINGW32__) || defined(_MSC_VER)) && !defined(GIOMM_STATIC_LIB) # define GIOMM_DLL 1 #endif #ifdef GIOMM_DLL -# if defined(GIOMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ -# define GIOMM_API -# elif !defined(GIOMM_BUILD) -# define GIOMM_API __declspec(dllimport) +# if defined(GIOMM_BUILD) +# define GIOMM_API __declspec(dllexport) # else - /* Build a static library */ -# define GIOMM_API -# endif /* GIOMM_BUILD - _WINDLL */ +# define GIOMM_API __declspec(dllimport) +# endif +/* Build a static library or non-native-Windows library */ #else # define GIOMM_API #endif /* GIOMM_DLL */ diff --git a/gio/giommconfig.h.meson b/gio/giommconfig.h.meson index 82aedddf..9ac31c6d 100644 --- a/gio/giommconfig.h.meson +++ b/gio/giommconfig.h.meson @@ -19,20 +19,17 @@ #mesondefine GIOMM_STATIC_LIB // Enable DLL-specific stuff only when not building a static library -#if !defined(__CYGWIN__) && defined(__MINGW32__) && !defined(GIOMM_STATIC_LIB) +#if !defined(__CYGWIN__) && (defined(__MINGW32__) || defined(_MSC_VER)) && !defined(GIOMM_STATIC_LIB) # define GIOMM_DLL 1 #endif #ifdef GIOMM_DLL -# if defined(GIOMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ -# define GIOMM_API -# elif !defined(GIOMM_BUILD) -# define GIOMM_API __declspec(dllimport) +# if defined(GIOMM_BUILD) +# define GIOMM_API __declspec(dllexport) # else - /* Build a static library */ -# define GIOMM_API -# endif /* GIOMM_BUILD - _WINDLL */ +# define GIOMM_API __declspec(dllimport) +# endif +/* Build a static library or non-native-Windows library */ #else # define GIOMM_API #endif /* GIOMM_DLL */ diff --git a/gio/src/action.hg b/gio/src/action.hg index c893cbca..9b947622 100644 --- a/gio/src/action.hg +++ b/gio/src/action.hg @@ -63,9 +63,9 @@ namespace Gio * * @newin{2,32} */ -class Action : public Glib::Interface +class GIOMM_API Action : public Glib::Interface { - _CLASS_INTERFACE(Action, GAction, G_ACTION, GActionInterface) + _CLASS_INTERFACE(Action, GAction, G_ACTION, GActionInterface, , , GIOMM_API) public: _WRAP_METHOD(Glib::ustring get_name() const, g_action_get_name) diff --git a/gio/src/actiongroup.hg b/gio/src/actiongroup.hg index 2c40a165..1dca1cd1 100644 --- a/gio/src/actiongroup.hg +++ b/gio/src/actiongroup.hg @@ -31,9 +31,9 @@ typedef struct _GActionGroupInterface GActionGroupInterface; namespace Glib { -class VariantBase; -class VariantContainerBase; -class VariantType; +class GIOMM_API VariantBase; +class GIOMM_API VariantContainerBase; +class GIOMM_API VariantType; } @@ -56,9 +56,9 @@ namespace Gio * Signals are emitted on the action group in response to state changes on * individual actions. */ -class ActionGroup : public Glib::Interface +class GIOMM_API ActionGroup : public Glib::Interface { - _CLASS_INTERFACE(ActionGroup, GActionGroup, G_ACTION_GROUP, GActionGroupInterface) + _CLASS_INTERFACE(ActionGroup, GActionGroup, G_ACTION_GROUP, GActionGroupInterface, , , GIOMM_API) public: _WRAP_METHOD(bool has_action(const Glib::ustring& action_name) const, g_action_group_has_action) diff --git a/gio/src/actionmap.hg b/gio/src/actionmap.hg index 74b3dd60..43075b72 100644 --- a/gio/src/actionmap.hg +++ b/gio/src/actionmap.hg @@ -28,7 +28,7 @@ typedef struct _GActionMapInterface GActionMapInterface; namespace Gio { -class Action; +class GIOMM_API Action; //TODO: Instead derive from ActionGroup, when we can break ABI, //because the GActionMap interface requires the GActionGroup interface. @@ -44,9 +44,9 @@ class Action; * or "win."). This is the motivation for the 'Map' part of the interface name. * @newin{2,32} */ -class ActionMap : public Glib::Interface +class GIOMM_API ActionMap : public Glib::Interface { - _CLASS_INTERFACE(ActionMap, GActionMap, G_ACTION_MAP, GActionMapInterface) + _CLASS_INTERFACE(ActionMap, GActionMap, G_ACTION_MAP, GActionMapInterface, , , GIOMM_API) // The various add_action...() methods are our equivalent for g_action_map_add_action_entries(). _IGNORE(g_action_map_add_action_entries) diff --git a/gio/src/appinfo.hg b/gio/src/appinfo.hg index 4dd48fa7..0c34ba98 100644 --- a/gio/src/appinfo.hg +++ b/gio/src/appinfo.hg @@ -44,7 +44,7 @@ namespace Gio _WRAP_ENUM(AppInfoCreateFlags, GAppInfoCreateFlags, NO_GTYPE) -class File; +class GIOMM_API File; /** Application information, to describe applications installed on the system, * and launch them. @@ -52,9 +52,9 @@ class File; * * @newin{2,16} */ -class AppInfo : public Glib::Interface +class GIOMM_API AppInfo : public Glib::Interface { - _CLASS_INTERFACE(AppInfo, GAppInfo, G_APP_INFO, GAppInfoIface) + _CLASS_INTERFACE(AppInfo, GAppInfo, G_APP_INFO, GAppInfoIface, , , GIOMM_API) public: static Glib::RefPtr<AppInfo> create_from_commandline(const std::string& commandline, diff --git a/gio/src/applaunchcontext.hg b/gio/src/applaunchcontext.hg index 3096e8ef..c81ff362 100644 --- a/gio/src/applaunchcontext.hg +++ b/gio/src/applaunchcontext.hg @@ -30,17 +30,17 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class AppInfo; -class File; +class GIOMM_API AppInfo; +class GIOMM_API File; /** This is used to handle, for instance, startup notification and launching of the new application on the same screen as the launching window. * See also AppInfo. * * @newin{2,16} */ -class AppLaunchContext : public Glib::Object +class GIOMM_API AppLaunchContext : public Glib::Object { - _CLASS_GOBJECT(AppLaunchContext, GAppLaunchContext, G_APP_LAUNCH_CONTEXT, Glib::Object, GObject) + _CLASS_GOBJECT(AppLaunchContext, GAppLaunchContext, G_APP_LAUNCH_CONTEXT, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT() diff --git a/gio/src/application.hg b/gio/src/application.hg index 6dea85e3..a8bf9660 100644 --- a/gio/src/application.hg +++ b/gio/src/application.hg @@ -83,9 +83,9 @@ _WRAP_ENUM(ApplicationFlags, GApplicationFlags) * * @newin{2,32} */ -class Application : public Glib::Object, public ActionGroup, public ActionMap +class GIOMM_API Application : public Glib::Object, public ActionGroup, public ActionMap { - _CLASS_GOBJECT(Application, GApplication, G_APPLICATION, Glib::Object, GObject) + _CLASS_GOBJECT(Application, GApplication, G_APPLICATION, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(ActionGroup) _IMPLEMENTS_INTERFACE(ActionMap) diff --git a/gio/src/applicationcommandline.hg b/gio/src/applicationcommandline.hg index 3c117456..1bc0a095 100644 --- a/gio/src/applicationcommandline.hg +++ b/gio/src/applicationcommandline.hg @@ -54,9 +54,9 @@ namespace Gio * return until the editing is done. * @newin{2,32} */ -class ApplicationCommandLine : public Glib::Object +class GIOMM_API ApplicationCommandLine : public Glib::Object { - _CLASS_GOBJECT(ApplicationCommandLine, GApplicationCommandLine, G_APPLICATION_COMMAND_LINE, Glib::Object, GObject) + _CLASS_GOBJECT(ApplicationCommandLine, GApplicationCommandLine, G_APPLICATION_COMMAND_LINE, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/asyncinitable.hg b/gio/src/asyncinitable.hg index 6961eddb..842ec45d 100644 --- a/gio/src/asyncinitable.hg +++ b/gio/src/asyncinitable.hg @@ -29,7 +29,7 @@ typedef struct _GAsyncInitableIface GAsyncInitableIface; namespace Gio { -class Cancellable; +class GIOMM_API Cancellable; /** AsyncInitable - Asynchronously failable object initialization interface. * This is the asynchronous version of Initable; it behaves the same in all @@ -45,9 +45,9 @@ class Cancellable; * g_async_initable_init_async() under the cover, calling back with nullptr and a * set GError on failure. */ -class AsyncInitable : public Glib::Interface +class GIOMM_API AsyncInitable : public Glib::Interface { - _CLASS_INTERFACE(AsyncInitable, GAsyncInitable, G_ASYNC_INITABLE, GAsyncInitableIface) + _CLASS_INTERFACE(AsyncInitable, GAsyncInitable, G_ASYNC_INITABLE, GAsyncInitableIface, , , GIOMM_API) protected: /** Starts asynchronous initialization of the object implementing the diff --git a/gio/src/asyncresult.hg b/gio/src/asyncresult.hg index 7472dc6f..e31aa289 100644 --- a/gio/src/asyncresult.hg +++ b/gio/src/asyncresult.hg @@ -29,7 +29,7 @@ typedef struct _GAsyncResultIface GAsyncResultIface; namespace Gio { -class AsyncResult; +class GIOMM_API AsyncResult; /** A function that will be called when an asynchronous operation within GIO has been completed. * @param result The asynchronous function's results. @@ -109,9 +109,9 @@ using SlotAsyncReady = sigc::slot<void, Glib::RefPtr<AsyncResult>&>; * * @newin{2,16} */ -class AsyncResult : public Glib::Interface +class GIOMM_API AsyncResult : public Glib::Interface { - _CLASS_INTERFACE(AsyncResult, GAsyncResult, G_ASYNC_RESULT, GAsyncResultIface) + _CLASS_INTERFACE(AsyncResult, GAsyncResult, G_ASYNC_RESULT, GAsyncResultIface, , , GIOMM_API) public: _IGNORE(g_async_result_get_user_data) diff --git a/gio/src/bufferedinputstream.hg b/gio/src/bufferedinputstream.hg index c50ecc81..4e5ecb21 100644 --- a/gio/src/bufferedinputstream.hg +++ b/gio/src/bufferedinputstream.hg @@ -39,9 +39,9 @@ namespace Gio * * @newin{2,16} */ -class BufferedInputStream : public Gio::FilterInputStream +class GIOMM_API BufferedInputStream : public Gio::FilterInputStream { - _CLASS_GOBJECT(BufferedInputStream, GBufferedInputStream, G_BUFFERED_INPUT_STREAM, Gio::FilterInputStream, GFilterInputStream) + _CLASS_GOBJECT(BufferedInputStream, GBufferedInputStream, G_BUFFERED_INPUT_STREAM, Gio::FilterInputStream, GFilterInputStream, , , GIOMM_API) protected: _WRAP_CTOR(BufferedInputStream(const Glib::RefPtr<InputStream>& base_stream), g_buffered_input_stream_new) diff --git a/gio/src/bufferedoutputstream.hg b/gio/src/bufferedoutputstream.hg index 0d2aba2d..0d076709 100644 --- a/gio/src/bufferedoutputstream.hg +++ b/gio/src/bufferedoutputstream.hg @@ -37,9 +37,9 @@ namespace Gio * * @newin{2,16} */ -class BufferedOutputStream : public Gio::FilterOutputStream +class GIOMM_API BufferedOutputStream : public Gio::FilterOutputStream { - _CLASS_GOBJECT(BufferedOutputStream, GBufferedOutputStream, G_BUFFERED_OUTPUT_STREAM, Gio::FilterOutputStream, GFilterOutputStream) + _CLASS_GOBJECT(BufferedOutputStream, GBufferedOutputStream, G_BUFFERED_OUTPUT_STREAM, Gio::FilterOutputStream, GFilterOutputStream, , , GIOMM_API) protected: _WRAP_CTOR(BufferedOutputStream(const Glib::RefPtr<OutputStream>& base_stream), g_buffered_output_stream_new) diff --git a/gio/src/cancellable.hg b/gio/src/cancellable.hg index 94b97ac1..85976e3b 100644 --- a/gio/src/cancellable.hg +++ b/gio/src/cancellable.hg @@ -14,6 +14,7 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) #include <glibmm/object.h> @@ -28,9 +29,9 @@ namespace Gio * * @newin{2,16} */ -class Cancellable : public Glib::Object +class GIOMM_API Cancellable : public Glib::Object { - _CLASS_GOBJECT(Cancellable, GCancellable, G_CANCELLABLE, Glib::Object, GObject) + _CLASS_GOBJECT(Cancellable, GCancellable, G_CANCELLABLE, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/charsetconverter.hg b/gio/src/charsetconverter.hg index b5bb2343..fb7ee550 100644 --- a/gio/src/charsetconverter.hg +++ b/gio/src/charsetconverter.hg @@ -27,9 +27,9 @@ namespace Gio * CharsetConverter is an implementation of Converter based on GIConv. * @newin{2,34} */ -class CharsetConverter : public Glib::Object, public Converter +class GIOMM_API CharsetConverter : public Glib::Object, public Converter { - _CLASS_GOBJECT(CharsetConverter, GCharsetConverter, G_CHARSET_CONVERTER, Glib::Object, GObject) + _CLASS_GOBJECT(CharsetConverter, GCharsetConverter, G_CHARSET_CONVERTER, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Converter) protected: diff --git a/gio/src/converter.hg b/gio/src/converter.hg index 2c219ad4..ce0691c2 100644 --- a/gio/src/converter.hg +++ b/gio/src/converter.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> _DEFS(giomm,gio) @@ -39,9 +41,9 @@ _WRAP_ENUM(ConverterFlags, GConverterFlags) * * @newin{2,34} */ -class Converter : public Glib::Interface +class GIOMM_API Converter : public Glib::Interface { - _CLASS_INTERFACE(Converter, GConverter, G_CONVERTER, GConverterIface) + _CLASS_INTERFACE(Converter, GConverter, G_CONVERTER, GConverterIface, , , GIOMM_API) public: _WRAP_METHOD(ConverterResult convert(const void* inbuf, gsize inbuf_size, void* outbuf, gsize outbuf_size, ConverterFlags flags, gsize& bytes_read, gsize& bytes_written), g_converter_convert, errthrow) diff --git a/gio/src/converterinputstream.hg b/gio/src/converterinputstream.hg index ae65e597..9f221d65 100644 --- a/gio/src/converterinputstream.hg +++ b/gio/src/converterinputstream.hg @@ -23,8 +23,8 @@ _PINCLUDE(giomm/private/filterinputstream_p.h) namespace Gio { -class Converter; -class InputStream; +class GIOMM_API Converter; +class GIOMM_API InputStream; /** ConverterInputstream - Converter Input Stream. * Converter input stream implements InputStream and allows conversion of data @@ -32,10 +32,10 @@ class InputStream; * PollableInputStream interface. * @newin{2,34} */ -class ConverterInputStream : public FilterInputStream, - public PollableInputStream +class GIOMM_API ConverterInputStream : public FilterInputStream, + public PollableInputStream { - _CLASS_GOBJECT(ConverterInputStream, GConverterInputStream, G_CONVERTER_INPUT_STREAM, FilterInputStream, GFilterInputStream) + _CLASS_GOBJECT(ConverterInputStream, GConverterInputStream, G_CONVERTER_INPUT_STREAM, FilterInputStream, GFilterInputStream, , , GIOMM_API) _IMPLEMENTS_INTERFACE(PollableInputStream) protected: diff --git a/gio/src/converteroutputstream.hg b/gio/src/converteroutputstream.hg index 1729aacb..76348985 100644 --- a/gio/src/converteroutputstream.hg +++ b/gio/src/converteroutputstream.hg @@ -23,8 +23,8 @@ _PINCLUDE(giomm/private/filteroutputstream_p.h) namespace Gio { -class Converter; -class OutputStream; +class GIOMM_API Converter; +class GIOMM_API OutputStream; /** ConverterOutputstream - Converter Output Stream. * Converter output stream implements OutputStream and allows conversion of @@ -32,10 +32,10 @@ class OutputStream; * the PollableOutputStream interface. * @newin{2,34} */ -class ConverterOutputStream : public FilterOutputStream, - public PollableOutputStream +class GIOMM_API ConverterOutputStream : public FilterOutputStream, + public PollableOutputStream { - _CLASS_GOBJECT(ConverterOutputStream, GConverterOutputStream, G_CONVERTER_OUTPUT_STREAM, FilterOutputStream, GFilterOutputStream) + _CLASS_GOBJECT(ConverterOutputStream, GConverterOutputStream, G_CONVERTER_OUTPUT_STREAM, FilterOutputStream, GFilterOutputStream, , , GIOMM_API) _IMPLEMENTS_INTERFACE(PollableOutputStream) protected: diff --git a/gio/src/credentials.hg b/gio/src/credentials.hg index 31d50cd7..66c6cca7 100644 --- a/gio/src/credentials.hg +++ b/gio/src/credentials.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> _DEFS(giomm,gio) @@ -46,9 +48,9 @@ _WRAP_ENUM(CredentialsType, GCredentialsType, NO_GTYPE) * * @newin{2,28} */ -class Credentials : public Glib::Object +class GIOMM_API Credentials : public Glib::Object { - _CLASS_GOBJECT(Credentials, GCredentials, G_CREDENTIALS, Glib::Object, GObject) + _CLASS_GOBJECT(Credentials, GCredentials, G_CREDENTIALS, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/datainputstream.hg b/gio/src/datainputstream.hg index bac690da..27cc6846 100644 --- a/gio/src/datainputstream.hg +++ b/gio/src/datainputstream.hg @@ -31,9 +31,9 @@ namespace Gio * * @newin{2,16} */ -class DataInputStream : public Gio::BufferedInputStream +class GIOMM_API DataInputStream : public Gio::BufferedInputStream { - _CLASS_GOBJECT(DataInputStream, GDataInputStream, G_DATA_INPUT_STREAM, Gio::BufferedInputStream, GBufferedInputStream) + _CLASS_GOBJECT(DataInputStream, GDataInputStream, G_DATA_INPUT_STREAM, Gio::BufferedInputStream, GBufferedInputStream, , , GIOMM_API) protected: _WRAP_CTOR(DataInputStream(const Glib::RefPtr<InputStream>& base_stream), g_data_input_stream_new) diff --git a/gio/src/dataoutputstream.hg b/gio/src/dataoutputstream.hg index a74dd46c..749bc34b 100644 --- a/gio/src/dataoutputstream.hg +++ b/gio/src/dataoutputstream.hg @@ -31,9 +31,9 @@ namespace Gio * * @newin{2,16} */ -class DataOutputStream : public Gio::BufferedOutputStream +class GIOMM_API DataOutputStream : public Gio::BufferedOutputStream { - _CLASS_GOBJECT(DataOutputStream, GDataOutputStream, G_DATA_OUTPUT_STREAM, Gio::BufferedOutputStream, GBufferedOutputStream) + _CLASS_GOBJECT(DataOutputStream, GDataOutputStream, G_DATA_OUTPUT_STREAM, Gio::BufferedOutputStream, GBufferedOutputStream, , , GIOMM_API) protected: _WRAP_CTOR(DataOutputStream(const Glib::RefPtr<OutputStream>& base_stream), g_data_output_stream_new) diff --git a/gio/src/dbusactiongroup.hg b/gio/src/dbusactiongroup.hg index aafd8e2d..ae9bb6fd 100644 --- a/gio/src/dbusactiongroup.hg +++ b/gio/src/dbusactiongroup.hg @@ -27,7 +27,7 @@ namespace Gio namespace DBus { -class Connection; +class GIOMM_API Connection; _GMMPROC_EXTRA_NAMESPACE(DBus) @@ -37,10 +37,10 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * Gio::DBus::Connection::export_action_group(). * @newin{2,32} */ -class ActionGroup +class GIOMM_API ActionGroup : public Glib::Object, public ::Gio::ActionGroup, public RemoteActionGroup { - _CLASS_GOBJECT(ActionGroup, GDBusActionGroup, G_DBUS_ACTION_GROUP, Glib::Object, GObject) + _CLASS_GOBJECT(ActionGroup, GDBusActionGroup, G_DBUS_ACTION_GROUP, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(::Gio::ActionGroup) _IMPLEMENTS_INTERFACE(RemoteActionGroup) diff --git a/gio/src/dbusaddress.hg b/gio/src/dbusaddress.hg index aa105e70..7993892b 100644 --- a/gio/src/dbusaddress.hg +++ b/gio/src/dbusaddress.hg @@ -38,6 +38,7 @@ namespace Address * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_address(const std::string& string); /** Like is_address() but also checks if the library supports the transports @@ -50,6 +51,7 @@ bool is_address(const std::string& string); * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_supported(const std::string& address); /** Asynchronously connects to an endpoint specified by @a address and sets up @@ -68,10 +70,12 @@ bool is_supported(const std::string& address); * @newin{2,28} * @ingroup DBus */ +GIOMM_API void get_stream(const std::string& address, const SlotAsyncReady slot, const Glib::RefPtr<Cancellable>& cancellable); /// A non-cancellable version of get_stream(). +GIOMM_API void get_stream(const std::string& address, const SlotAsyncReady slot); /** Finishes an operation started with get_stream(). @@ -85,6 +89,7 @@ void get_stream(const std::string& address, const SlotAsyncReady slot); * @newin{2,28} * @ingroup DBus */ +GIOMM_API Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res, std::string& out_guid); @@ -97,6 +102,7 @@ Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res, * @newin{2,28} * @ingroup DBus */ +GIOMM_API Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res); /** Synchronously connects to an endpoint specified by @a address and sets up @@ -115,10 +121,12 @@ Glib::RefPtr<IOStream> get_stream_finish(const Glib::RefPtr<AsyncResult>& res); * @newin{2,28} * @ingroup DBus */ +GIOMM_API Glib::RefPtr<IOStream> get_stream_sync(const std::string& address, const Glib::RefPtr<Cancellable>& cancellable, std::string& out_guid); /// A non-cancellable version of get_stream_sync(). +GIOMM_API Glib::RefPtr<IOStream> get_stream_sync(const std::string& address, std::string& out_guid); @@ -136,10 +144,12 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address, * @newin{2,28} * @ingroup DBus */ +GIOMM_API Glib::RefPtr<IOStream> get_stream_sync(const std::string& address, const Glib::RefPtr<Cancellable>& cancellable); /// A non-cancellable version of get_stream_sync(). +GIOMM_API Glib::RefPtr<IOStream> get_stream_sync(const std::string& address); /** Synchronously looks up the D-Bus address for the well-known message bus @@ -153,10 +163,12 @@ Glib::RefPtr<IOStream> get_stream_sync(const std::string& address); * @newin{2,28} * @ingroup DBus */ +GIOMM_API std::string get_for_bus_sync(BusType bus_type, const Glib::RefPtr<Cancellable>& cancellable); /// A non-cancellable get_for_bus_sync(). +GIOMM_API std::string get_for_bus_sync(BusType bus_type); } // namespace Address diff --git a/gio/src/dbusauthobserver.hg b/gio/src/dbusauthobserver.hg index 03876c0e..df2536e9 100644 --- a/gio/src/dbusauthobserver.hg +++ b/gio/src/dbusauthobserver.hg @@ -66,9 +66,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,28} * @ingroup DBus */ -class AuthObserver : public Glib::Object +class GIOMM_API AuthObserver : public Glib::Object { - _CLASS_GOBJECT(AuthObserver, GDBusAuthObserver, G_DBUS_AUTH_OBSERVER, Glib::Object, GObject) + _CLASS_GOBJECT(AuthObserver, GDBusAuthObserver, G_DBUS_AUTH_OBSERVER, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg index 0986f934..1cc7a376 100644 --- a/gio/src/dbusconnection.hg +++ b/gio/src/dbusconnection.hg @@ -33,9 +33,9 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class ActionGroup; -class MenuModel; -class UnixFDList; +class GIOMM_API ActionGroup; +class GIOMM_API MenuModel; +class GIOMM_API UnixFDList; namespace DBus @@ -71,11 +71,11 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,28} * @ingroup DBus */ -class Connection +class GIOMM_API Connection : public Glib::Object, public Initable, public AsyncInitable { protected: - _CLASS_GOBJECT(Connection, GDBusConnection, G_DBUS_CONNECTION, Glib::Object, GObject) + _CLASS_GOBJECT(Connection, GDBusConnection, G_DBUS_CONNECTION, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Initable) _IMPLEMENTS_INTERFACE(AsyncInitable) _CUSTOM_WRAP_FUNCTION diff --git a/gio/src/dbuserror.hg b/gio/src/dbuserror.hg index 95bfe598..2489256c 100644 --- a/gio/src/dbuserror.hg +++ b/gio/src/dbuserror.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/error.h> _DEFS(giomm,gio) @@ -27,7 +29,7 @@ namespace DBus //The GMMPROC_EXTRA_NAMESPACE() macro is a hint to generate_wrap_init.pl to put it in the DBus sub-namespace _GMMPROC_EXTRA_NAMESPACE(DBus) -_WRAP_GERROR(Error, GDBusError, G_DBUS_ERROR, NO_GTYPE) +_WRAP_GERROR(Error, GDBusError, G_DBUS_ERROR, NO_GTYPE, decl_prefix GIOMM_API) } //namespace DBus diff --git a/gio/src/dbuserrorutils.hg b/gio/src/dbuserrorutils.hg index 084fa0c4..47982c03 100644 --- a/gio/src/dbuserrorutils.hg +++ b/gio/src/dbuserrorutils.hg @@ -14,12 +14,14 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + _DEFS(giomm,gio) namespace Glib { -class Error; +class GLIBMM_API Error; } @@ -41,6 +43,7 @@ namespace ErrorUtils * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_remote_error(const Glib::Error& error); /** Gets the D-Bus error name used for @a error, if any. @@ -56,6 +59,7 @@ bool is_remote_error(const Glib::Error& error); * @newin{2,28} * @ingroup DBus */ +GIOMM_API Glib::ustring get_remote_error(const Glib::Error& error); /** Looks for extra information in the error message used to recover the D-Bus @@ -70,6 +74,7 @@ Glib::ustring get_remote_error(const Glib::Error& error); * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool strip_remote_error(Glib::Error& error); } // namespace ErrorUtils diff --git a/gio/src/dbusinterface.hg b/gio/src/dbusinterface.hg index 8725f38d..6b3a9801 100644 --- a/gio/src/dbusinterface.hg +++ b/gio/src/dbusinterface.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> _DEFS(giomm,gio) @@ -30,8 +32,8 @@ namespace Gio namespace DBus { -class InterfaceInfo; -class Object; +class GIOMM_API InterfaceInfo; +class GIOMM_API Object; _GMMPROC_EXTRA_NAMESPACE(DBus) @@ -43,9 +45,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,34} */ -class Interface : public Glib::Interface +class GIOMM_API Interface : public Glib::Interface { - _CLASS_INTERFACE(Interface, GDBusInterface, G_DBUS_INTERFACE, GDBusInterfaceIface) + _CLASS_INTERFACE(Interface, GDBusInterface, G_DBUS_INTERFACE, GDBusInterfaceIface, , , GIOMM_API) public: _WRAP_METHOD(Glib::RefPtr<InterfaceInfo> get_info(), g_dbus_interface_get_info) diff --git a/gio/src/dbusinterfaceskeleton.hg b/gio/src/dbusinterfaceskeleton.hg index 2261216a..287c363d 100644 --- a/gio/src/dbusinterfaceskeleton.hg +++ b/gio/src/dbusinterfaceskeleton.hg @@ -29,20 +29,20 @@ namespace DBus _WRAP_ENUM(InterfaceSkeletonFlags, GDBusInterfaceSkeletonFlags, gtype_func g_dbus_interface_skeleton_flags_get_type) -class InterfaceInfo; -class Connection; -class MethodInvocation; +class GIOMM_API InterfaceInfo; +class GIOMM_API Connection; +class GIOMM_API MethodInvocation; _GMMPROC_EXTRA_NAMESPACE(DBus) /** Abstract base class for D-Bus interfaces on the service side. * @newin{2,38} */ -class InterfaceSkeleton +class GIOMM_API InterfaceSkeleton : public Glib::Object, public Interface { - _CLASS_GOBJECT(InterfaceSkeleton, GDBusInterfaceSkeleton, G_DBUS_INTERFACE_SKELETON, Glib::Object, GObject) + _CLASS_GOBJECT(InterfaceSkeleton, GDBusInterfaceSkeleton, G_DBUS_INTERFACE_SKELETON, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Interface) public: diff --git a/gio/src/dbusinterfacevtable.hg b/gio/src/dbusinterfacevtable.hg index 287c2c48..4430895d 100644 --- a/gio/src/dbusinterfacevtable.hg +++ b/gio/src/dbusinterfacevtable.hg @@ -44,7 +44,7 @@ namespace DBus * @newin{2,28} * @ingroup DBus */ -class InterfaceVTable +class GIOMM_API InterfaceVTable { _CLASS_GENERIC(InterfaceVTable, GDBusInterfaceVTable) diff --git a/gio/src/dbusintrospection.hg b/gio/src/dbusintrospection.hg index 0ec349c8..51869965 100644 --- a/gio/src/dbusintrospection.hg +++ b/gio/src/dbusintrospection.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <gio/gio.h> #include <glibmm/arrayhandle.h> @@ -33,9 +35,9 @@ _WRAP_ENUM(PropertyInfoFlags, GDBusPropertyInfoFlags, s#^DBUS_##, NO_GTYPE) * @newin{2,28} * @ingroup DBus */ -class AnnotationInfo final +class GIOMM_API AnnotationInfo final { - _CLASS_OPAQUE_REFCOUNTED(AnnotationInfo, GDBusAnnotationInfo, NONE, g_dbus_annotation_info_ref, g_dbus_annotation_info_unref) + _CLASS_OPAQUE_REFCOUNTED(AnnotationInfo, GDBusAnnotationInfo, NONE, g_dbus_annotation_info_ref, g_dbus_annotation_info_unref, GIOMM_API) _IGNORE(g_dbus_annotation_info_ref, g_dbus_annotation_info_unref) public: @@ -49,9 +51,9 @@ public: * @newin{2,28} * @ingroup DBus */ -class ArgInfo final +class GIOMM_API ArgInfo final { - _CLASS_OPAQUE_REFCOUNTED(ArgInfo, GDBusArgInfo, NONE, g_dbus_arg_info_ref, g_dbus_arg_info_unref) + _CLASS_OPAQUE_REFCOUNTED(ArgInfo, GDBusArgInfo, NONE, g_dbus_arg_info_ref, g_dbus_arg_info_unref, GIOMM_API) _IGNORE(g_dbus_arg_info_ref, g_dbus_arg_info_unref) public: @@ -62,9 +64,9 @@ public: * @newin{2,28} * @ingroup DBus */ -class MethodInfo final +class GIOMM_API MethodInfo final { - _CLASS_OPAQUE_REFCOUNTED(MethodInfo, GDBusMethodInfo, NONE, g_dbus_method_info_ref, g_dbus_method_info_unref) + _CLASS_OPAQUE_REFCOUNTED(MethodInfo, GDBusMethodInfo, NONE, g_dbus_method_info_ref, g_dbus_method_info_unref, GIOMM_API) _IGNORE(g_dbus_method_info_ref, g_dbus_method_info_unref) public: @@ -75,9 +77,9 @@ public: * @newin{2,28} * @ingroup DBus */ -class SignalInfo final +class GIOMM_API SignalInfo final { - _CLASS_OPAQUE_REFCOUNTED(SignalInfo, GDBusSignalInfo, NONE, g_dbus_signal_info_ref, g_dbus_signal_info_unref) + _CLASS_OPAQUE_REFCOUNTED(SignalInfo, GDBusSignalInfo, NONE, g_dbus_signal_info_ref, g_dbus_signal_info_unref, GIOMM_API) _IGNORE(g_dbus_signal_info_ref, g_dbus_signal_info_unref) public: @@ -88,9 +90,9 @@ public: * @newin{2,28} * @ingroup DBus */ -class PropertyInfo final +class GIOMM_API PropertyInfo final { - _CLASS_OPAQUE_REFCOUNTED(PropertyInfo, GDBusPropertyInfo, NONE, g_dbus_property_info_ref, g_dbus_property_info_unref) + _CLASS_OPAQUE_REFCOUNTED(PropertyInfo, GDBusPropertyInfo, NONE, g_dbus_property_info_ref, g_dbus_property_info_unref, GIOMM_API) _IGNORE(g_dbus_property_info_ref, g_dbus_property_info_unref) public: @@ -101,9 +103,9 @@ public: * @newin{2,28} * @ingroup DBus */ -class InterfaceInfo final +class GIOMM_API InterfaceInfo final { - _CLASS_OPAQUE_REFCOUNTED(InterfaceInfo, GDBusInterfaceInfo, NONE, g_dbus_interface_info_ref, g_dbus_interface_info_unref) + _CLASS_OPAQUE_REFCOUNTED(InterfaceInfo, GDBusInterfaceInfo, NONE, g_dbus_interface_info_ref, g_dbus_interface_info_unref, GIOMM_API) _IS_REFCOUNTED_BOXEDTYPE(g_dbus_interface_info_get_type) _IGNORE(g_dbus_interface_info_ref, g_dbus_interface_info_unref) @@ -129,9 +131,9 @@ public: * @newin{2,28} * @ingroup DBus */ -class NodeInfo final +class GIOMM_API NodeInfo final { - _CLASS_OPAQUE_REFCOUNTED(NodeInfo, GDBusNodeInfo, NONE, g_dbus_node_info_ref, g_dbus_node_info_unref) + _CLASS_OPAQUE_REFCOUNTED(NodeInfo, GDBusNodeInfo, NONE, g_dbus_node_info_ref, g_dbus_node_info_unref, GIOMM_API) _IGNORE(g_dbus_node_info_ref, g_dbus_node_info_unref) public: diff --git a/gio/src/dbusmenumodel.hg b/gio/src/dbusmenumodel.hg index f704350f..1f24ad6d 100644 --- a/gio/src/dbusmenumodel.hg +++ b/gio/src/dbusmenumodel.hg @@ -25,7 +25,7 @@ namespace Gio namespace DBus { -class Connection; +class GIOMM_API Connection; _GMMPROC_EXTRA_NAMESPACE(DBus) @@ -35,9 +35,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * Gio::DBus::Connection::export_menu_model(). * @newin{2,32} */ -class MenuModel : public ::Gio::MenuModel +class GIOMM_API MenuModel : public ::Gio::MenuModel { - _CLASS_GOBJECT(MenuModel, GDBusMenuModel, G_DBUS_MENU_MODEL, ::Gio::MenuModel, GMenuModel) + _CLASS_GOBJECT(MenuModel, GDBusMenuModel, G_DBUS_MENU_MODEL, ::Gio::MenuModel, GMenuModel, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/dbusmessage.hg b/gio/src/dbusmessage.hg index da0a382a..7fb609f7 100644 --- a/gio/src/dbusmessage.hg +++ b/gio/src/dbusmessage.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> #include <glibmm/variant.h> #include <glibmm/utility.h> @@ -44,9 +46,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,28} * @ingroup DBus */ -class Message : public Glib::Object +class GIOMM_API Message : public Glib::Object { - _CLASS_GOBJECT(Message, GDBusMessage, G_DBUS_MESSAGE, Glib::Object, GObject) + _CLASS_GOBJECT(Message, GDBusMessage, G_DBUS_MESSAGE, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/dbusmethodinvocation.hg b/gio/src/dbusmethodinvocation.hg index 65e81c02..90fd7769 100644 --- a/gio/src/dbusmethodinvocation.hg +++ b/gio/src/dbusmethodinvocation.hg @@ -26,7 +26,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Glib { -class Error; +class GLIBMM_API Error; } @@ -36,7 +36,7 @@ namespace Gio namespace DBus { -class Connection; +class GIOMM_API Connection; _GMMPROC_EXTRA_NAMESPACE(DBus) @@ -52,9 +52,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,28} * @ingroup DBus */ -class MethodInvocation : public Glib::Object +class GIOMM_API MethodInvocation : public Glib::Object { - _CLASS_GOBJECT(MethodInvocation, GDBusMethodInvocation, G_DBUS_METHOD_INVOCATION, Glib::Object, GObject) + _CLASS_GOBJECT(MethodInvocation, GDBusMethodInvocation, G_DBUS_METHOD_INVOCATION, Glib::Object, GObject, , , GIOMM_API) public: _WRAP_METHOD(Glib::ustring get_sender() const, g_dbus_method_invocation_get_sender) diff --git a/gio/src/dbusobject.hg b/gio/src/dbusobject.hg index 9618aa52..b2b8806a 100644 --- a/gio/src/dbusobject.hg +++ b/gio/src/dbusobject.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> _DEFS(giomm,gio) @@ -30,7 +32,7 @@ namespace Gio namespace DBus { -class Interface; +class GIOMM_API Interface; _GMMPROC_EXTRA_NAMESPACE(DBus) @@ -41,9 +43,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,34} */ -class Object : public Glib::Interface +class GIOMM_API Object : public Glib::Interface { - _CLASS_INTERFACE(Object, GDBusObject, G_DBUS_OBJECT, GDBusObjectIface) + _CLASS_INTERFACE(Object, GDBusObject, G_DBUS_OBJECT, GDBusObjectIface, , , GIOMM_API) public: _WRAP_METHOD(Glib::ustring get_object_path() const, g_dbus_object_get_object_path) diff --git a/gio/src/dbusobjectmanager.hg b/gio/src/dbusobjectmanager.hg index 00f60cab..61fa89dd 100644 --- a/gio/src/dbusobjectmanager.hg +++ b/gio/src/dbusobjectmanager.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> #include <glibmm/ustring.h> #include <vector> @@ -31,8 +33,8 @@ namespace Gio namespace DBus { -class Interface; -class Object; +class GIOMM_API Interface; +class GIOMM_API Object; _GMMPROC_EXTRA_NAMESPACE(DBus) @@ -49,9 +51,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,62} * @ingroup DBus */ -class ObjectManager : public Glib::Interface +class GIOMM_API ObjectManager : public Glib::Interface { - _CLASS_INTERFACE(ObjectManager, GDBusObjectManager, G_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface) + _CLASS_INTERFACE(ObjectManager, GDBusObjectManager, G_DBUS_OBJECT_MANAGER, GDBusObjectManagerIface, , , GIOMM_API) public: _WRAP_METHOD(Glib::ustring get_object_path() const, g_dbus_object_manager_get_object_path) diff --git a/gio/src/dbusobjectmanagerclient.hg b/gio/src/dbusobjectmanagerclient.hg index 61e1e322..c05c742d 100644 --- a/gio/src/dbusobjectmanagerclient.hg +++ b/gio/src/dbusobjectmanagerclient.hg @@ -116,13 +116,13 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,62} * @ingroup DBus */ -class ObjectManagerClient +class GIOMM_API ObjectManagerClient : public Glib::Object, public Initable, public AsyncInitable, public ObjectManager { - _CLASS_GOBJECT(ObjectManagerClient, GDBusObjectManagerClient, G_DBUS_OBJECT_MANAGER_CLIENT, Glib::Object, GObject) + _CLASS_GOBJECT(ObjectManagerClient, GDBusObjectManagerClient, G_DBUS_OBJECT_MANAGER_CLIENT, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Initable) _IMPLEMENTS_INTERFACE(AsyncInitable) _IMPLEMENTS_INTERFACE(DBus::ObjectManager) diff --git a/gio/src/dbusobjectmanagerserver.hg b/gio/src/dbusobjectmanagerserver.hg index 1497d4b7..03392e61 100644 --- a/gio/src/dbusobjectmanagerserver.hg +++ b/gio/src/dbusobjectmanagerserver.hg @@ -57,9 +57,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,62} * @ingroup DBus */ -class ObjectManagerServer : public Glib::Object, public ObjectManager +class GIOMM_API ObjectManagerServer : public Glib::Object, public ObjectManager { - _CLASS_GOBJECT(ObjectManagerServer, GDBusObjectManagerServer, G_DBUS_OBJECT_MANAGER_SERVER, Glib::Object, GObject) + _CLASS_GOBJECT(ObjectManagerServer, GDBusObjectManagerServer, G_DBUS_OBJECT_MANAGER_SERVER, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(DBus::ObjectManager) protected: diff --git a/gio/src/dbusobjectproxy.hg b/gio/src/dbusobjectproxy.hg index 755b4fc9..fb1b0646 100644 --- a/gio/src/dbusobjectproxy.hg +++ b/gio/src/dbusobjectproxy.hg @@ -39,9 +39,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,62} * @ingroup DBus */ -class ObjectProxy : public Glib::Object, public Object +class GIOMM_API ObjectProxy : public Glib::Object, public Object { - _CLASS_GOBJECT(ObjectProxy, GDBusObjectProxy, G_DBUS_OBJECT_PROXY, Glib::Object, GObject) + _CLASS_GOBJECT(ObjectProxy, GDBusObjectProxy, G_DBUS_OBJECT_PROXY, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(DBus::Object) protected: diff --git a/gio/src/dbusobjectskeleton.hg b/gio/src/dbusobjectskeleton.hg index 41197da9..1ca7c674 100644 --- a/gio/src/dbusobjectskeleton.hg +++ b/gio/src/dbusobjectskeleton.hg @@ -41,9 +41,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,62} * @ingroup DBus */ -class ObjectSkeleton : public Glib::Object, public Object +class GIOMM_API ObjectSkeleton : public Glib::Object, public Object { - _CLASS_GOBJECT(ObjectSkeleton, GDBusObjectSkeleton, G_DBUS_OBJECT_SKELETON, Glib::Object, GObject) + _CLASS_GOBJECT(ObjectSkeleton, GDBusObjectSkeleton, G_DBUS_OBJECT_SKELETON, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(DBus::Object) protected: diff --git a/gio/src/dbusownname.hg b/gio/src/dbusownname.hg index 5971bf26..2f476831 100644 --- a/gio/src/dbusownname.hg +++ b/gio/src/dbusownname.hg @@ -109,6 +109,7 @@ using SlotNameLost = sigc::slot<void, const Glib::RefPtr<Gio::DBus::Connection>& * @newin{2,28} * @ingroup DBus */ +GIOMM_API guint own_name( BusType bus_type, const Glib::ustring& name, @@ -122,6 +123,7 @@ _IGNORE(g_bus_own_name) /** Stops owning a name. * @param owner_id An identifier obtained from own_name(). */ +GIOMM_API void unown_name(guint owner_id); _IGNORE(g_bus_unown_name) diff --git a/gio/src/dbusproxy.hg b/gio/src/dbusproxy.hg index 1c753f06..3a31a141 100644 --- a/gio/src/dbusproxy.hg +++ b/gio/src/dbusproxy.hg @@ -60,12 +60,12 @@ _WRAP_ENUM(ProxyFlags, GDBusProxyFlags, s#^DBUS_##, gtype_func g_dbus_proxy_flag * @newin{2,28} * @ingroup DBus */ -class Proxy +class GIOMM_API Proxy : public Glib::Object, public Initable, public AsyncInitable { - _CLASS_GOBJECT(Proxy, GDBusProxy, G_DBUS_PROXY, Glib::Object, GObject) + _CLASS_GOBJECT(Proxy, GDBusProxy, G_DBUS_PROXY, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Initable) _IMPLEMENTS_INTERFACE(AsyncInitable) diff --git a/gio/src/dbusserver.hg b/gio/src/dbusserver.hg index 6f1bb986..f983350c 100644 --- a/gio/src/dbusserver.hg +++ b/gio/src/dbusserver.hg @@ -48,9 +48,9 @@ _GMMPROC_EXTRA_NAMESPACE(DBus) * @newin{2,28} * @ingroup DBus */ -class Server : public Glib::Object, public Initable +class GIOMM_API Server : public Glib::Object, public Initable { - _CLASS_GOBJECT(Server, GDBusServer, G_DBUS_SERVER, Glib::Object, GObject) + _CLASS_GOBJECT(Server, GDBusServer, G_DBUS_SERVER, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Initable) protected: diff --git a/gio/src/dbussubtreevtable.hg b/gio/src/dbussubtreevtable.hg index 0fe4d53a..8dfbae3e 100644 --- a/gio/src/dbussubtreevtable.hg +++ b/gio/src/dbussubtreevtable.hg @@ -41,7 +41,7 @@ namespace DBus * @newin{2,28} * @ingroup DBus */ -class SubtreeVTable +class GIOMM_API SubtreeVTable { _CLASS_GENERIC(SubtreeVTable, GDBusSubtreeVTable) diff --git a/gio/src/dbusutils.hg b/gio/src/dbusutils.hg index 85844dcd..68b0e139 100644 --- a/gio/src/dbusutils.hg +++ b/gio/src/dbusutils.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + _DEFS(giomm,gio) namespace Gio @@ -32,6 +34,7 @@ namespace DBus * @newin{2,28} * @ingroup DBus */ +GIOMM_API std::string generate_guid(); /** Checks if @a string is a D-Bus GUID. @@ -44,6 +47,7 @@ std::string generate_guid(); * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_guid(const std::string& string); /** Checks if @a string is a valid D-Bus bus name (either unique or @@ -54,6 +58,7 @@ bool is_guid(const std::string& string); * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_name(const Glib::ustring& string); /** Checks if @a string is a valid D-Bus unique bus name. @@ -63,6 +68,7 @@ bool is_name(const Glib::ustring& string); * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_unique_name(const Glib::ustring& string); /** Checks if @a string is a valid D-Bus member (e.g. signal or method) name. @@ -72,6 +78,7 @@ bool is_unique_name(const Glib::ustring& string); * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_member_name(const Glib::ustring& string); /** Checks if @a string is a valid D-Bus interface name. @@ -81,6 +88,7 @@ bool is_member_name(const Glib::ustring& string); * @newin{2,28} * @ingroup DBus */ +GIOMM_API bool is_interface_name(const Glib::ustring& string); } diff --git a/gio/src/dbuswatchname.hg b/gio/src/dbuswatchname.hg index bb8b6718..ce4a8174 100644 --- a/gio/src/dbuswatchname.hg +++ b/gio/src/dbuswatchname.hg @@ -83,6 +83,7 @@ using SlotNameVanished = sigc::slot<void, const Glib::RefPtr<Gio::DBus::Connecti * @newin{2,28} * @ingroup DBus */ +GIOMM_API guint watch_name( BusType bus_type, const Glib::ustring& name, @@ -106,6 +107,7 @@ _IGNORE(g_bus_watch_name) * @newin{2,28} * @ingroup DBus */ +GIOMM_API guint watch_name( const Glib::RefPtr<Connection>& connection, const Glib::ustring& name, @@ -119,6 +121,7 @@ _IGNORE(g_bus_watch_name_on_connection) * @param watcher_id An identifier obtained from watch_name(). * @ingroup DBus */ +GIOMM_API void unwatch_name(guint watcher_id); _IGNORE(g_bus_unwatch_name) diff --git a/gio/src/desktopappinfo.hg b/gio/src/desktopappinfo.hg index 5fb2024b..e561ce87 100644 --- a/gio/src/desktopappinfo.hg +++ b/gio/src/desktopappinfo.hg @@ -28,7 +28,7 @@ _GMMPROC_WRAP_CONDITIONALLY(if !defined(G_OS_WIN32) && !defined(GLIBMM_OS_COCOA) namespace Glib { -class KeyFile; +class GLIBMM_API KeyFile; } @@ -40,11 +40,11 @@ namespace Gio * * @newin{2,16} */ -class DesktopAppInfo +class GIOMM_API DesktopAppInfo : public Glib::Object, public AppInfo { - _CLASS_GOBJECT(DesktopAppInfo, GDesktopAppInfo, G_DESKTOP_APP_INFO, Glib::Object, GObject) + _CLASS_GOBJECT(DesktopAppInfo, GDesktopAppInfo, G_DESKTOP_APP_INFO, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(AppInfo) public: diff --git a/gio/src/drive.hg b/gio/src/drive.hg index 4871a3a2..21d28563 100644 --- a/gio/src/drive.hg +++ b/gio/src/drive.hg @@ -46,9 +46,9 @@ _WRAP_ENUM(DriveStartStopType, GDriveStartStopType) * * @newin{2,16} */ -class Drive : public Glib::Interface +class GIOMM_API Drive : public Glib::Interface { - _CLASS_INTERFACE(Drive, GDrive, G_DRIVE, GDriveIface) + _CLASS_INTERFACE(Drive, GDrive, G_DRIVE, GDriveIface, , , GIOMM_API) public: _WRAP_METHOD(Glib::ustring get_name() const, g_drive_get_name) @@ -176,6 +176,7 @@ namespace Glib { //Pre-declare this so we can use it in TypeTrait: +GIOMM_API Glib::RefPtr<Gio::Drive> wrap(GDrive* object, bool take_copy); namespace Container_Helpers @@ -187,7 +188,7 @@ namespace Container_Helpers * would not return a wrapper for an interface. */ template <> -struct TypeTraits< Glib::RefPtr<Gio::Drive> > +struct GIOMM_API TypeTraits< Glib::RefPtr<Gio::Drive> > { using CppType = Glib::RefPtr<Gio::Drive>; using CType = GDrive*; diff --git a/gio/src/emblem.hg b/gio/src/emblem.hg index fd4431e8..712d50cc 100644 --- a/gio/src/emblem.hg +++ b/gio/src/emblem.hg @@ -36,11 +36,11 @@ _WRAP_ENUM(EmblemOrigin, GEmblemOrigin, NO_GTYPE) * * @newin{2,20} */ -class Emblem +class GIOMM_API Emblem : public Glib::Object, public Icon { - _CLASS_GOBJECT(Emblem, GEmblem, G_EMBLEM, Glib::Object, GObject) + _CLASS_GOBJECT(Emblem, GEmblem, G_EMBLEM, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Icon) protected: diff --git a/gio/src/emblemedicon.hg b/gio/src/emblemedicon.hg index 31d0c781..c8f1cf1f 100644 --- a/gio/src/emblemedicon.hg +++ b/gio/src/emblemedicon.hg @@ -35,11 +35,11 @@ namespace Gio * * @newin{2,20} */ -class EmblemedIcon +class GIOMM_API EmblemedIcon : public Glib::Object, public Icon { - _CLASS_GOBJECT(EmblemedIcon, GEmblemedIcon, G_EMBLEMED_ICON, Glib::Object, GObject) + _CLASS_GOBJECT(EmblemedIcon, GEmblemedIcon, G_EMBLEMED_ICON, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Icon) protected: diff --git a/gio/src/error.hg b/gio/src/error.hg index 7df46d2f..a754e219 100644 --- a/gio/src/error.hg +++ b/gio/src/error.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/error.h> #include <glibmm/interface.h> @@ -38,9 +40,9 @@ namespace Gio /** Exception class for giomm errors. */ -_WRAP_GERROR(Error, GIOErrorEnum, G_IO_ERROR, NO_GTYPE) -_WRAP_GERROR(ResolverError, GResolverError, G_RESOLVER_ERROR, NO_GTYPE) -_WRAP_GERROR(TlsError, GTlsError, G_TLS_ERROR, NO_GTYPE, s#^EOF$#ENDOFFILE#) +_WRAP_GERROR(Error, GIOErrorEnum, G_IO_ERROR, NO_GTYPE, decl_prefix GIOMM_API) +_WRAP_GERROR(ResolverError, GResolverError, G_RESOLVER_ERROR, NO_GTYPE, decl_prefix GIOMM_API) +_WRAP_GERROR(TlsError, GTlsError, G_TLS_ERROR, NO_GTYPE, s#^EOF$#ENDOFFILE#, decl_prefix GIOMM_API) } // namespace Gio diff --git a/gio/src/file.hg b/gio/src/file.hg index 7fb60af1..e49dee82 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -40,8 +40,8 @@ typedef struct _GFileIface GFileIface; namespace Gio { -class Mount; -class Volume; +class GIOMM_API Mount; +class GIOMM_API Volume; _WRAP_ENUM(FileQueryInfoFlags, GFileQueryInfoFlags, NO_GTYPE) _WRAP_ENUM(FileCreateFlags, GFileCreateFlags, NO_GTYPE) @@ -74,9 +74,9 @@ _WRAP_ENUM(FileMeasureFlags, GFileMeasureFlags, NO_GTYPE) * * @newin{2,16} */ -class File : public Glib::Interface +class GIOMM_API File : public Glib::Interface { - _CLASS_INTERFACE(File, GFile, G_FILE, GFileIface) + _CLASS_INTERFACE(File, GFile, G_FILE, GFileIface, , , GIOMM_API) public: @@ -2441,6 +2441,7 @@ namespace Glib { //Pre-declare this so we can use it in TypeTrait: +GIOMM_API Glib::RefPtr<Gio::File> wrap(GFile* object, bool take_copy); namespace Container_Helpers @@ -2452,7 +2453,7 @@ namespace Container_Helpers * would not return a wrapper for an interface. */ template <> -struct TypeTraits< Glib::RefPtr<Gio::File> > +struct GIOMM_API TypeTraits< Glib::RefPtr<Gio::File> > { using CppType = Glib::RefPtr<Gio::File>; using CType = GFile*; diff --git a/gio/src/fileattributeinfo.hg b/gio/src/fileattributeinfo.hg index 846c568b..4fd21f8b 100644 --- a/gio/src/fileattributeinfo.hg +++ b/gio/src/fileattributeinfo.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <string> #include <gio/gio.h> //TODO: avoid this include #include <glibmm/object.h> @@ -32,7 +34,7 @@ _WRAP_ENUM(FileAttributeStatus, GFileAttributeStatus) * * @newin{2,16} */ -class FileAttributeInfo +class GIOMM_API FileAttributeInfo { _CLASS_GENERIC(FileAttributeInfo, GFileAttributeInfo) public: diff --git a/gio/src/fileattributeinfolist.hg b/gio/src/fileattributeinfolist.hg index 5578b5bc..32a9149a 100644 --- a/gio/src/fileattributeinfolist.hg +++ b/gio/src/fileattributeinfolist.hg @@ -44,12 +44,13 @@ namespace Gio * * @newin{2,16} */ -class FileAttributeInfoList final +class GIOMM_API FileAttributeInfoList final { _CLASS_OPAQUE_REFCOUNTED(FileAttributeInfoList, GFileAttributeInfoList, g_file_attribute_info_list_new, g_file_attribute_info_list_ref, - g_file_attribute_info_list_unref) + g_file_attribute_info_list_unref, + GIOMM_API) _IGNORE(g_file_attribute_info_list_new, g_file_attribute_info_list_ref, g_file_attribute_info_list_unref) public: diff --git a/gio/src/fileenumerator.hg b/gio/src/fileenumerator.hg index f6e05680..e432d0d5 100644 --- a/gio/src/fileenumerator.hg +++ b/gio/src/fileenumerator.hg @@ -29,7 +29,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class File; +class GIOMM_API File; //TODO: Consider wrapping this like a std::iterator (or at least renaming it), though the asyncness probably makes that unsuitable. @@ -46,9 +46,9 @@ class File; * * @newin{2,16} */ -class FileEnumerator : public Glib::Object +class GIOMM_API FileEnumerator : public Glib::Object { - _CLASS_GOBJECT(FileEnumerator, GFileEnumerator, G_FILE_ENUMERATOR, Glib::Object, GObject) + _CLASS_GOBJECT(FileEnumerator, GFileEnumerator, G_FILE_ENUMERATOR, Glib::Object, GObject, , , GIOMM_API) public: _WRAP_METHOD(Glib::RefPtr<FileInfo> next_file(const Glib::RefPtr<Cancellable>& cancellable{?}), diff --git a/gio/src/fileicon.hg b/gio/src/fileicon.hg index 24c39821..7406876a 100644 --- a/gio/src/fileicon.hg +++ b/gio/src/fileicon.hg @@ -31,12 +31,12 @@ namespace Gio * * @newin{2,16} */ -class FileIcon +class GIOMM_API FileIcon : public Glib::Object, //Already derived by LoadableIcon: public Icon, public LoadableIcon { - _CLASS_GOBJECT(FileIcon, GFileIcon, G_FILE_ICON, Glib::Object, GObject) + _CLASS_GOBJECT(FileIcon, GFileIcon, G_FILE_ICON, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(LoadableIcon) protected: diff --git a/gio/src/fileinfo.hg b/gio/src/fileinfo.hg index 9fe4e10e..ae5be38d 100644 --- a/gio/src/fileinfo.hg +++ b/gio/src/fileinfo.hg @@ -44,10 +44,11 @@ const FileType FILE_TYPE_UNKNOWN = FILE_TYPE_NOT_KNOWN; * * @newin{2,16} */ -class FileAttributeMatcher final +class GIOMM_API FileAttributeMatcher final { _CLASS_OPAQUE_REFCOUNTED(FileAttributeMatcher, GFileAttributeMatcher, - NONE, g_file_attribute_matcher_ref, g_file_attribute_matcher_unref) + NONE, g_file_attribute_matcher_ref, g_file_attribute_matcher_unref, + GIOMM_API) _IGNORE(g_file_attribute_matcher_ref, g_file_attribute_matcher_unref) public: @@ -79,9 +80,9 @@ public: * * FileAttributeMatcher allows for searching through a FileInfo for attributes. */ -class FileInfo : public Glib::Object +class GIOMM_API FileInfo : public Glib::Object { - _CLASS_GOBJECT(FileInfo, GFileInfo, G_FILE_INFO, Glib::Object, GObject) + _CLASS_GOBJECT(FileInfo, GFileInfo, G_FILE_INFO, Glib::Object, GObject, , , GIOMM_API) public: _CTOR_DEFAULT() diff --git a/gio/src/fileinputstream.hg b/gio/src/fileinputstream.hg index 0159d8ce..23d9a706 100644 --- a/gio/src/fileinputstream.hg +++ b/gio/src/fileinputstream.hg @@ -36,11 +36,11 @@ namespace Gio * * @newin{2,16} */ -class FileInputStream +class GIOMM_API FileInputStream : public Gio::InputStream, public Seekable { - _CLASS_GOBJECT(FileInputStream, GFileInputStream, G_FILE_INPUT_STREAM, Gio::InputStream, GInputStream) + _CLASS_GOBJECT(FileInputStream, GFileInputStream, G_FILE_INPUT_STREAM, Gio::InputStream, GInputStream, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Seekable) public: diff --git a/gio/src/fileiostream.hg b/gio/src/fileiostream.hg index 80c2ea72..518e4b63 100644 --- a/gio/src/fileiostream.hg +++ b/gio/src/fileiostream.hg @@ -36,11 +36,11 @@ namespace Gio * * @newin{2,22} */ -class FileIOStream +class GIOMM_API FileIOStream : public Gio::IOStream, public Gio::Seekable { - _CLASS_GOBJECT(FileIOStream, GFileIOStream, G_FILE_IO_STREAM, Gio::IOStream, GIOStream) + _CLASS_GOBJECT(FileIOStream, GFileIOStream, G_FILE_IO_STREAM, Gio::IOStream, GIOStream, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Seekable) public: diff --git a/gio/src/filemonitor.hg b/gio/src/filemonitor.hg index 2318595b..3bd46a3c 100644 --- a/gio/src/filemonitor.hg +++ b/gio/src/filemonitor.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + //#include <giomm/file.h> #include <glibmm/object.h> @@ -26,7 +28,7 @@ namespace Gio _WRAP_ENUM(FileMonitorEvent, GFileMonitorEvent, NO_GTYPE) -class File; +class GIOMM_API File; /** Monitors a file or directory for changes. * To obtain a FileMonitor for a file or directory, use File::monitor_file() or @@ -37,9 +39,9 @@ class File; * * @newin{2,16} */ -class FileMonitor : public Glib::Object +class GIOMM_API FileMonitor : public Glib::Object { - _CLASS_GOBJECT(FileMonitor, GFileMonitor, G_FILE_MONITOR, Glib::Object, GObject) + _CLASS_GOBJECT(FileMonitor, GFileMonitor, G_FILE_MONITOR, Glib::Object, GObject, , , GIOMM_API) protected: public: diff --git a/gio/src/filenamecompleter.hg b/gio/src/filenamecompleter.hg index 676d1967..b998b64f 100644 --- a/gio/src/filenamecompleter.hg +++ b/gio/src/filenamecompleter.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + //#include <giomm/file.h> #include <glibmm/arrayhandle.h> #include <glibmm/object.h> @@ -25,16 +27,16 @@ _PINCLUDE(gio/gio.h) namespace Gio { -class File; +class GIOMM_API File; /** Completes partial file and directory names given a partial string by looking in the file system for clues. * Can return a list of possible completion strings for widget implementation. * * @newin{2,16} */ -class FilenameCompleter : public Glib::Object +class GIOMM_API FilenameCompleter : public Glib::Object { - _CLASS_GOBJECT(FilenameCompleter, GFilenameCompleter, G_FILENAME_COMPLETER, Glib::Object, GObject) + _CLASS_GOBJECT(FilenameCompleter, GFilenameCompleter, G_FILENAME_COMPLETER, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT _IGNORE(g_filename_completer_new) diff --git a/gio/src/fileoutputstream.hg b/gio/src/fileoutputstream.hg index dc82d8df..248908d5 100644 --- a/gio/src/fileoutputstream.hg +++ b/gio/src/fileoutputstream.hg @@ -39,11 +39,11 @@ namespace Gio * * @newin{2,16} */ -class FileOutputStream +class GIOMM_API FileOutputStream : public OutputStream, public Seekable { - _CLASS_GOBJECT(FileOutputStream, GFileOutputStream, G_FILE_OUTPUT_STREAM, Gio::OutputStream, GOutputStream) + _CLASS_GOBJECT(FileOutputStream, GFileOutputStream, G_FILE_OUTPUT_STREAM, Gio::OutputStream, GOutputStream, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Seekable) public: diff --git a/gio/src/filterinputstream.hg b/gio/src/filterinputstream.hg index 1549bd4e..92ad7f52 100644 --- a/gio/src/filterinputstream.hg +++ b/gio/src/filterinputstream.hg @@ -31,9 +31,9 @@ namespace Gio * * @newin{2,16} */ -class FilterInputStream : public Gio::InputStream +class GIOMM_API FilterInputStream : public Gio::InputStream { - _CLASS_GOBJECT(FilterInputStream, GFilterInputStream, G_FILTER_INPUT_STREAM, Gio::InputStream, GInputStream) + _CLASS_GOBJECT(FilterInputStream, GFilterInputStream, G_FILTER_INPUT_STREAM, Gio::InputStream, GInputStream, , , GIOMM_API) protected: // This needs to be hand-coded because there is no public GFilterInputStream constructor. diff --git a/gio/src/filteroutputstream.hg b/gio/src/filteroutputstream.hg index 7a9f762b..67d59f51 100644 --- a/gio/src/filteroutputstream.hg +++ b/gio/src/filteroutputstream.hg @@ -32,9 +32,9 @@ namespace Gio * * @newin{2,16} */ -class FilterOutputStream : public Gio::OutputStream +class GIOMM_API FilterOutputStream : public Gio::OutputStream { - _CLASS_GOBJECT(FilterOutputStream, GFilterOutputStream, G_FILTER_OUTPUT_STREAM, Gio::OutputStream, GOutputStream) + _CLASS_GOBJECT(FilterOutputStream, GFilterOutputStream, G_FILTER_OUTPUT_STREAM, Gio::OutputStream, GOutputStream, , , GIOMM_API) protected: // This needs to be hand-coded because there is no public GFilterOutputStream constructor. diff --git a/gio/src/icon.hg b/gio/src/icon.hg index ce9b07ae..9d3249be 100644 --- a/gio/src/icon.hg +++ b/gio/src/icon.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> #include <glibmm/variant.h> @@ -43,9 +45,9 @@ namespace Gio * * @newin{2,16} */ -class Icon : public Glib::Interface +class GIOMM_API Icon : public Glib::Interface { - _CLASS_INTERFACE(Icon, GIcon, G_ICON, GIconIface) + _CLASS_INTERFACE(Icon, GIcon, G_ICON, GIconIface, , , GIOMM_API) public: // We can't just use a _WRAP_CREATE macro here since this is an abstract diff --git a/gio/src/inetaddress.hg b/gio/src/inetaddress.hg index e4c0c0ae..7a3145d8 100644 --- a/gio/src/inetaddress.hg +++ b/gio/src/inetaddress.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> #include <giomm/enums.h> @@ -37,10 +39,10 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class InetAddress +class GIOMM_API InetAddress : public Glib::Object { - _CLASS_GOBJECT(InetAddress, GInetAddress, G_INET_ADDRESS, Glib::Object, GObject) + _CLASS_GOBJECT(InetAddress, GInetAddress, G_INET_ADDRESS, Glib::Object, GObject, , , GIOMM_API) protected: _WRAP_CTOR(InetAddress(const guint8 *bytes, SocketFamily family), g_inet_address_new_from_bytes) diff --git a/gio/src/inetsocketaddress.hg b/gio/src/inetsocketaddress.hg index 59c9fca9..92204805 100644 --- a/gio/src/inetsocketaddress.hg +++ b/gio/src/inetsocketaddress.hg @@ -35,10 +35,10 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class InetSocketAddress +class GIOMM_API InetSocketAddress : public SocketAddress { - _CLASS_GOBJECT(InetSocketAddress, GInetSocketAddress, G_INET_SOCKET_ADDRESS, SocketAddress, GSocketAddress) + _CLASS_GOBJECT(InetSocketAddress, GInetSocketAddress, G_INET_SOCKET_ADDRESS, SocketAddress, GSocketAddress, , , GIOMM_API) protected: _WRAP_CTOR(InetSocketAddress(const Glib::RefPtr<InetAddress>& address, guint16 port), g_inet_socket_address_new) diff --git a/gio/src/initable.hg b/gio/src/initable.hg index 27e9e1ba..2be91248 100644 --- a/gio/src/initable.hg +++ b/gio/src/initable.hg @@ -48,9 +48,9 @@ namespace Gio * * @newin{2,24} */ -class Initable : public Glib::Interface +class GIOMM_API Initable : public Glib::Interface { - _CLASS_INTERFACE(Initable, GInitable, G_INITABLE, GInitableIface) + _CLASS_INTERFACE(Initable, GInitable, G_INITABLE, GInitableIface, , , GIOMM_API) protected: _WRAP_METHOD(void init(const Glib::RefPtr<Cancellable>& cancellable{?}), diff --git a/gio/src/inputstream.hg b/gio/src/inputstream.hg index d1227101..5ed092b8 100644 --- a/gio/src/inputstream.hg +++ b/gio/src/inputstream.hg @@ -35,9 +35,9 @@ namespace Gio * * @newin{2,16} */ -class InputStream : public Glib::Object +class GIOMM_API InputStream : public Glib::Object { - _CLASS_GOBJECT(InputStream, GInputStream, G_INPUT_STREAM, Glib::Object, GObject) + _CLASS_GOBJECT(InputStream, GInputStream, G_INPUT_STREAM, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/iostream.hg b/gio/src/iostream.hg index b53be022..5b93a968 100644 --- a/gio/src/iostream.hg +++ b/gio/src/iostream.hg @@ -60,9 +60,9 @@ _WRAP_ENUM(IOStreamSpliceFlags, GIOStreamSpliceFlags, NO_GTYPE) * * @newin{2,22} */ -class IOStream : public Glib::Object +class GIOMM_API IOStream : public Glib::Object { - _CLASS_GOBJECT(IOStream, GIOStream, G_IO_STREAM, Glib::Object, GObject) + _CLASS_GOBJECT(IOStream, GIOStream, G_IO_STREAM, Glib::Object, GObject, , , GIOMM_API) public: diff --git a/gio/src/listmodel.hg b/gio/src/listmodel.hg index b7abfe96..3d1f31fe 100644 --- a/gio/src/listmodel.hg +++ b/gio/src/listmodel.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> #include <gio/gio.h> @@ -73,9 +75,9 @@ namespace Gio * * @newin{2,50} */ -class ListModel : public Glib::Interface +class GIOMM_API ListModel : public Glib::Interface { - _CLASS_INTERFACE(ListModel, GListModel, G_LIST_MODEL, GListModelInterface) + _CLASS_INTERFACE(ListModel, GListModel, G_LIST_MODEL, GListModelInterface, , , GIOMM_API) protected: _WRAP_METHOD(void items_changed(guint position, guint removed, guint added), g_list_model_items_changed, newin "2,50") diff --git a/gio/src/liststore.hg b/gio/src/liststore.hg index 16b8cddf..844041da 100644 --- a/gio/src/liststore.hg +++ b/gio/src/liststore.hg @@ -34,11 +34,11 @@ namespace Gio * * @newin{2,50} */ -class ListStoreBase +class GIOMM_API ListStoreBase : public Glib::Object, public ListModel { - _CLASS_GOBJECT(ListStoreBase, GListStore, G_LIST_STORE, Glib::Object, GObject) + _CLASS_GOBJECT(ListStoreBase, GListStore, G_LIST_STORE, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(ListModel) _STRUCT_NOT_HIDDEN diff --git a/gio/src/loadableicon.hg b/gio/src/loadableicon.hg index 0d7a4852..88111277 100644 --- a/gio/src/loadableicon.hg +++ b/gio/src/loadableicon.hg @@ -32,9 +32,9 @@ namespace Gio * * @newin{2,16} */ -class LoadableIcon : public Icon +class GIOMM_API LoadableIcon : public Icon { - _CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableIconIface, Icon, GIcon) + _CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableIconIface, Icon, GIcon, , , GIOMM_API) public: /** diff --git a/gio/src/memoryinputstream.hg b/gio/src/memoryinputstream.hg index 9fed8da4..d65956f8 100644 --- a/gio/src/memoryinputstream.hg +++ b/gio/src/memoryinputstream.hg @@ -31,11 +31,11 @@ namespace Gio * * @newin{2,16} */ -class MemoryInputStream +class GIOMM_API MemoryInputStream : public Gio::InputStream, public Seekable { - _CLASS_GOBJECT(MemoryInputStream, GMemoryInputStream, G_MEMORY_INPUT_STREAM, Gio::InputStream, GInputStream) + _CLASS_GOBJECT(MemoryInputStream, GMemoryInputStream, G_MEMORY_INPUT_STREAM, Gio::InputStream, GInputStream, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Seekable) protected: diff --git a/gio/src/memoryoutputstream.hg b/gio/src/memoryoutputstream.hg index 329329e1..4d4d15ed 100644 --- a/gio/src/memoryoutputstream.hg +++ b/gio/src/memoryoutputstream.hg @@ -27,7 +27,7 @@ namespace Glib { // Forward declaration. -class Bytes; +class GLIBMM_API Bytes; } @@ -42,11 +42,11 @@ namespace Gio * * @newin{2,20} */ -class MemoryOutputStream : +class GIOMM_API MemoryOutputStream : public OutputStream, public Seekable { - _CLASS_GOBJECT(MemoryOutputStream, GMemoryOutputStream, G_MEMORY_OUTPUT_STREAM, Gio::OutputStream, GOutputStream) + _CLASS_GOBJECT(MemoryOutputStream, GMemoryOutputStream, G_MEMORY_OUTPUT_STREAM, Gio::OutputStream, GOutputStream, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Seekable) protected: diff --git a/gio/src/menu.hg b/gio/src/menu.hg index c5d3831a..29f92bff 100644 --- a/gio/src/menu.hg +++ b/gio/src/menu.hg @@ -34,9 +34,9 @@ namespace Gio * * @newin{2,32} */ -class Menu : public Gio::MenuModel +class GIOMM_API Menu : public Gio::MenuModel { - _CLASS_GOBJECT(Menu, GMenu, G_MENU, ::Gio::MenuModel, GMenuModel) + _CLASS_GOBJECT(Menu, GMenu, G_MENU, ::Gio::MenuModel, GMenuModel, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/menuattributeiter.hg b/gio/src/menuattributeiter.hg index 16bfb3b7..10fcddc3 100644 --- a/gio/src/menuattributeiter.hg +++ b/gio/src/menuattributeiter.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> _DEFS(giomm,gio) @@ -25,9 +27,9 @@ namespace Gio /** MenuAttributeIter - A menu attribute iterator. * @newin{2,32} */ -class MenuAttributeIter : public Glib::Object +class GIOMM_API MenuAttributeIter : public Glib::Object { - _CLASS_GOBJECT(MenuAttributeIter, GMenuAttributeIter, G_MENU_ATTRIBUTE_ITER, Glib::Object, GObject) + _CLASS_GOBJECT(MenuAttributeIter, GMenuAttributeIter, G_MENU_ATTRIBUTE_ITER, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/menuitem.hg b/gio/src/menuitem.hg index 3215ec14..e6482f4b 100644 --- a/gio/src/menuitem.hg +++ b/gio/src/menuitem.hg @@ -30,9 +30,9 @@ namespace Gio * * @newin{2,32} */ -class MenuItem : public Glib::Object +class GIOMM_API MenuItem : public Glib::Object { - _CLASS_GOBJECT(MenuItem, GMenuItem, G_MENU_ITEM, Glib::Object, GObject) + _CLASS_GOBJECT(MenuItem, GMenuItem, G_MENU_ITEM, Glib::Object, GObject, , , GIOMM_API) protected: /** Creates a new MenuItem. diff --git a/gio/src/menulinkiter.hg b/gio/src/menulinkiter.hg index 8cba9dfc..10f6cada 100644 --- a/gio/src/menulinkiter.hg +++ b/gio/src/menulinkiter.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> _DEFS(giomm,gio) @@ -22,14 +24,14 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class MenuModel; +class GIOMM_API MenuModel; /** MenuLinkIter - A menu link iterator. * @newin{2,32} */ -class MenuLinkIter : public Glib::Object +class GIOMM_API MenuLinkIter : public Glib::Object { - _CLASS_GOBJECT(MenuLinkIter, GMenuLinkIter, G_MENU_LINK_ITER, Glib::Object, GObject) + _CLASS_GOBJECT(MenuLinkIter, GMenuLinkIter, G_MENU_LINK_ITER, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/menumodel.hg b/gio/src/menumodel.hg index 36a5ea7e..0402ee7e 100644 --- a/gio/src/menumodel.hg +++ b/gio/src/menumodel.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> _DEFS(giomm,gio) @@ -43,8 +45,8 @@ enum MenuLink MENU_LINK_SUBMENU }; -class MenuAttributeIter; -class MenuLinkIter; +class GIOMM_API MenuAttributeIter; +class GIOMM_API MenuLinkIter; /** MenuModel - An abstract class representing the contents of a menu. * MenuModel represents the contents of a menu -- an ordered list of menu @@ -120,9 +122,9 @@ class MenuLinkIter; * See the C API docs for a graphical example. * @newin{2,32} */ -class MenuModel : public Glib::Object +class GIOMM_API MenuModel : public Glib::Object { - _CLASS_GOBJECT(MenuModel, GMenuModel, G_MENU_MODEL, Glib::Object, GObject) + _CLASS_GOBJECT(MenuModel, GMenuModel, G_MENU_MODEL, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/mount.hg b/gio/src/mount.hg index 6078d7d9..b3f00f27 100644 --- a/gio/src/mount.hg +++ b/gio/src/mount.hg @@ -37,9 +37,9 @@ namespace Gio _WRAP_ENUM(MountUnmountFlags, GMountUnmountFlags, NO_GTYPE) _WRAP_ENUM(MountMountFlags, GMountMountFlags, NO_GTYPE) -class File; -class Drive; -class Volume; +class GIOMM_API File; +class GIOMM_API Drive; +class GIOMM_API Volume; /** The Mount interface represents user-visible mounts. * Mount is a "mounted" filesystem that you can access. Mounted is in quotes because it's not the same as a unix mount: @@ -53,9 +53,9 @@ class Volume; * * @newin{2,16} */ -class Mount : public Glib::Interface +class GIOMM_API Mount : public Glib::Interface { - _CLASS_INTERFACE(Mount, GMount, G_MOUNT, GMountIface) + _CLASS_INTERFACE(Mount, GMount, G_MOUNT, GMountIface, , , GIOMM_API) public: @@ -242,6 +242,7 @@ namespace Glib { //Pre-declare this so we can use it in TypeTrait: +GIOMM_API Glib::RefPtr<Gio::Mount> wrap(GMount* object, bool take_copy); namespace Container_Helpers @@ -253,7 +254,7 @@ namespace Container_Helpers * would not return a wrapper for an interface. */ template <> -struct TypeTraits< Glib::RefPtr<Gio::Mount> > +struct GIOMM_API TypeTraits< Glib::RefPtr<Gio::Mount> > { using CppType = Glib::RefPtr<Gio::Mount>; using CType = GMount*; diff --git a/gio/src/mountoperation.hg b/gio/src/mountoperation.hg index 99492b3b..c45a4282 100644 --- a/gio/src/mountoperation.hg +++ b/gio/src/mountoperation.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> #include <glibmm/arrayhandle.h> @@ -40,9 +42,9 @@ _WRAP_ENUM(MountOperationResult, GMountOperationResult, NO_GTYPE) * * @newin{2,16} */ -class MountOperation : public Glib::Object +class GIOMM_API MountOperation : public Glib::Object { - _CLASS_GOBJECT(MountOperation, GMountOperation, G_MOUNT_OPERATION, Glib::Object, GObject) + _CLASS_GOBJECT(MountOperation, GMountOperation, G_MOUNT_OPERATION, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/networkaddress.hg b/gio/src/networkaddress.hg index ff5e123e..41bd61fd 100644 --- a/gio/src/networkaddress.hg +++ b/gio/src/networkaddress.hg @@ -32,10 +32,10 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class NetworkAddress : public Glib::Object, +class GIOMM_API NetworkAddress : public Glib::Object, public SocketConnectable { - _CLASS_GOBJECT(NetworkAddress, GNetworkAddress, G_NETWORK_ADDRESS, Glib::Object, GObject) + _CLASS_GOBJECT(NetworkAddress, GNetworkAddress, G_NETWORK_ADDRESS, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(SocketConnectable) _WRAP_CTOR(NetworkAddress(const std::string& hostname, guint16 port), g_network_address_new) diff --git a/gio/src/networkmonitor.hg b/gio/src/networkmonitor.hg index 9c39588f..b376e47c 100644 --- a/gio/src/networkmonitor.hg +++ b/gio/src/networkmonitor.hg @@ -44,9 +44,9 @@ _WRAP_ENUM(NetworkConnectivity, GNetworkConnectivity) * * @newin{2,44} */ -class NetworkMonitor : public Glib::Interface +class GIOMM_API NetworkMonitor : public Glib::Interface { - _CLASS_INTERFACE(NetworkMonitor, GNetworkMonitor, G_NETWORK_MONITOR, GNetworkMonitorInterface) + _CLASS_INTERFACE(NetworkMonitor, GNetworkMonitor, G_NETWORK_MONITOR, GNetworkMonitorInterface, , , GIOMM_API) public: _WRAP_METHOD(static Glib::RefPtr<NetworkMonitor> get_default(), g_network_monitor_get_default, newin "2,44") diff --git a/gio/src/networkservice.hg b/gio/src/networkservice.hg index 581fc788..47a07bb2 100644 --- a/gio/src/networkservice.hg +++ b/gio/src/networkservice.hg @@ -36,10 +36,10 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class NetworkService : public Glib::Object, +class GIOMM_API NetworkService : public Glib::Object, public SocketConnectable { - _CLASS_GOBJECT(NetworkService, GNetworkService, G_NETWORK_SERVICE, Glib::Object, GObject) + _CLASS_GOBJECT(NetworkService, GNetworkService, G_NETWORK_SERVICE, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(SocketConnectable) _WRAP_CTOR(NetworkService(const Glib::ustring& service, const Glib::ustring& protocol, const Glib::ustring& domain), g_network_service_new) diff --git a/gio/src/notification.hg b/gio/src/notification.hg index df9a7ee3..8e65c90b 100644 --- a/gio/src/notification.hg +++ b/gio/src/notification.hg @@ -25,7 +25,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class Icon; +class GIOMM_API Icon; _WRAP_ENUM(NotificationPriority, GNotificationPriority, newin "2,44") @@ -55,9 +55,9 @@ _WRAP_ENUM(NotificationPriority, GNotificationPriority, newin "2,44") * * @newin{2,40} */ -class Notification : public Glib::Object +class GIOMM_API Notification : public Glib::Object { - _CLASS_GOBJECT(Notification, GNotification, G_NOTIFICATION, Glib::Object, GObject) + _CLASS_GOBJECT(Notification, GNotification, G_NOTIFICATION, Glib::Object, GObject, , , GIOMM_API) protected: // Can't use _WRAP_CTOR. GNotification has no properties, but it must have a title. diff --git a/gio/src/outputstream.hg b/gio/src/outputstream.hg index 835a0a5e..d51d5492 100644 --- a/gio/src/outputstream.hg +++ b/gio/src/outputstream.hg @@ -34,9 +34,9 @@ _WRAP_ENUM(OutputStreamSpliceFlags, GOutputStreamSpliceFlags, NO_GTYPE) * * @newin{2,16} */ -class OutputStream : public Glib::Object +class GIOMM_API OutputStream : public Glib::Object { - _CLASS_GOBJECT(OutputStream, GOutputStream, G_OUTPUT_STREAM, Glib::Object, GObject) + _CLASS_GOBJECT(OutputStream, GOutputStream, G_OUTPUT_STREAM, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/permission.hg b/gio/src/permission.hg index d702b5be..b6b939da 100644 --- a/gio/src/permission.hg +++ b/gio/src/permission.hg @@ -45,9 +45,9 @@ namespace Gio * * @newin{2,42} */ -class Permission : public Glib::Object +class GIOMM_API Permission : public Glib::Object { - _CLASS_GOBJECT(Permission, GPermission, G_PERMISSION, Glib::Object, GObject) + _CLASS_GOBJECT(Permission, GPermission, G_PERMISSION, Glib::Object, GObject, , , GIOMM_API) public: diff --git a/gio/src/pollableinputstream.hg b/gio/src/pollableinputstream.hg index 7dc7a45d..dd6e7f86 100644 --- a/gio/src/pollableinputstream.hg +++ b/gio/src/pollableinputstream.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> _DEFS(giomm,gio) @@ -27,7 +29,7 @@ typedef struct _GPollableInputStreamInterface GPollableInputStreamInterface; namespace Gio { -class Cancellable; +class GIOMM_API Cancellable; //TODO: Instead derive from InputStream, when we can break ABI, //because the GPollableInputStream interface requires the GInputStream interface. @@ -39,9 +41,9 @@ class Cancellable; * expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style. * @newin{2,34} */ -class PollableInputStream : public Glib::Interface +class GIOMM_API PollableInputStream : public Glib::Interface { - _CLASS_INTERFACE(PollableInputStream, GPollableInputStream, G_POLLABLE_INPUT_STREAM, GPollableInputStreamInterface) + _CLASS_INTERFACE(PollableInputStream, GPollableInputStream, G_POLLABLE_INPUT_STREAM, GPollableInputStreamInterface, , , GIOMM_API) public: _WRAP_METHOD(bool can_poll() const, g_pollable_input_stream_can_poll) diff --git a/gio/src/pollableoutputstream.hg b/gio/src/pollableoutputstream.hg index 88915c1b..523d6eea 100644 --- a/gio/src/pollableoutputstream.hg +++ b/gio/src/pollableoutputstream.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> _DEFS(giomm,gio) @@ -27,7 +29,7 @@ typedef struct _GPollableOutputStreamInterface GPollableOutputStreamInterface; namespace Gio { -class Cancellable; +class GIOMM_API Cancellable; //TODO: Instead derive from OutputStream, when we can break ABI, //because the GPollableOutputStream interface requires the GOutputStream interface. @@ -40,9 +42,9 @@ class Cancellable; * GIO-style. * @newin{2,34} */ -class PollableOutputStream : public Glib::Interface +class GIOMM_API PollableOutputStream : public Glib::Interface { - _CLASS_INTERFACE(PollableOutputStream, GPollableOutputStream, G_POLLABLE_OUTPUT_STREAM, GPollableOutputStreamInterface) + _CLASS_INTERFACE(PollableOutputStream, GPollableOutputStream, G_POLLABLE_OUTPUT_STREAM, GPollableOutputStreamInterface, , , GIOMM_API) public: _WRAP_METHOD(bool can_poll() const, g_pollable_output_stream_can_poll) diff --git a/gio/src/proxy.hg b/gio/src/proxy.hg index 4fb94d24..eac5139b 100644 --- a/gio/src/proxy.hg +++ b/gio/src/proxy.hg @@ -43,9 +43,9 @@ namespace Gio * @ingroup NetworkIO * @newin{2,28} */ -class Proxy : public Glib::Interface +class GIOMM_API Proxy : public Glib::Interface { - _CLASS_INTERFACE(Proxy, GProxy, G_PROXY, GProxyInterface) + _CLASS_INTERFACE(Proxy, GProxy, G_PROXY, GProxyInterface, , , GIOMM_API) public: diff --git a/gio/src/proxyaddress.hg b/gio/src/proxyaddress.hg index 5d64bdd4..4df5b086 100644 --- a/gio/src/proxyaddress.hg +++ b/gio/src/proxyaddress.hg @@ -28,10 +28,10 @@ namespace Gio * @ingroup NetworkIO * @newin{2,28} */ -class ProxyAddress +class GIOMM_API ProxyAddress : public InetSocketAddress { - _CLASS_GOBJECT(ProxyAddress, GProxyAddress, G_PROXY_ADDRESS, InetSocketAddress, GInetSocketAddress) + _CLASS_GOBJECT(ProxyAddress, GProxyAddress, G_PROXY_ADDRESS, InetSocketAddress, GInetSocketAddress, , , GIOMM_API) protected: _WRAP_CTOR(ProxyAddress(const Glib::RefPtr<InetAddress>& address, diff --git a/gio/src/proxyresolver.hg b/gio/src/proxyresolver.hg index 43c2af41..dbd75bcb 100644 --- a/gio/src/proxyresolver.hg +++ b/gio/src/proxyresolver.hg @@ -39,9 +39,9 @@ namespace Gio * @ingroup NetworkIO * @newin{2,28} */ -class ProxyResolver : public Glib::Interface +class GIOMM_API ProxyResolver : public Glib::Interface { - _CLASS_INTERFACE(ProxyResolver, GProxyResolver, G_PROXY_RESOLVER, GProxyResolverInterface) + _CLASS_INTERFACE(ProxyResolver, GProxyResolver, G_PROXY_RESOLVER, GProxyResolverInterface, , , GIOMM_API) public: diff --git a/gio/src/remoteactiongroup.hg b/gio/src/remoteactiongroup.hg index e3b3cd6b..1369966f 100644 --- a/gio/src/remoteactiongroup.hg +++ b/gio/src/remoteactiongroup.hg @@ -16,6 +16,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/interface.h> _DEFS(giomm,gio) @@ -56,9 +58,9 @@ namespace Gio * platform data for action invocations that arrive by way of D-Bus. * @newin{2,32} */ -class RemoteActionGroup : public Glib::Interface +class GIOMM_API RemoteActionGroup : public Glib::Interface { - _CLASS_INTERFACE(RemoteActionGroup, GRemoteActionGroup, G_REMOTE_ACTION_GROUP, GRemoteActionGroupInterface) + _CLASS_INTERFACE(RemoteActionGroup, GRemoteActionGroup, G_REMOTE_ACTION_GROUP, GRemoteActionGroupInterface, , , GIOMM_API) public: _WRAP_METHOD(void activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter, const Glib::VariantBase& platform_data), g_remote_action_group_activate_action_full) diff --git a/gio/src/resolver.hg b/gio/src/resolver.hg index e01be3ce..599ecb92 100644 --- a/gio/src/resolver.hg +++ b/gio/src/resolver.hg @@ -28,7 +28,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Glib { -class VariantContainerBase; +class GLIBMM_API VariantContainerBase; } @@ -50,10 +50,10 @@ _WRAP_ENUM(ResolverRecordType, GResolverRecordType) * @newin{2,24} * @ingroup NetworkIO */ -class Resolver +class GIOMM_API Resolver : public Glib::Object { - _CLASS_GOBJECT(Resolver, GResolver, G_RESOLVER, Glib::Object, GObject) + _CLASS_GOBJECT(Resolver, GResolver, G_RESOLVER, Glib::Object, GObject, , , GIOMM_API) protected: @@ -167,10 +167,19 @@ public: _WRAP_SIGNAL(void reload(), reload, no_default_handler) }; +GIOMM_API std::string hostname_to_ascii (const Glib::ustring& hostname); + +GIOMM_API Glib::ustring hostname_to_unicode (const Glib::ustring& hostname); + +GIOMM_API bool hostname_is_non_ascii (const Glib::ustring& hostname); + +GIOMM_API bool hostname_is_ascii_encoded (const Glib::ustring& hostname); + +GIOMM_API bool hostname_is_ip_address (const Glib::ustring& hostname); } // namespace Gio diff --git a/gio/src/resource.hg b/gio/src/resource.hg index be41fac4..88855145 100644 --- a/gio/src/resource.hg +++ b/gio/src/resource.hg @@ -32,7 +32,7 @@ namespace Gio /** Exception class for resource file handling errors. */ -_WRAP_GERROR(ResourceError, GResourceError, G_RESOURCE_ERROR, NO_GTYPE, newin "2,34") +_WRAP_GERROR(ResourceError, GResourceError, G_RESOURCE_ERROR, NO_GTYPE, newin "2,34", decl_prefix GIOMM_API) _WRAP_ENUM(ResourceFlags, GResourceFlags, newin "2,44") _WRAP_ENUM(ResourceLookupFlags, GResourceLookupFlags, newin "2,44") @@ -127,9 +127,9 @@ _WRAP_ENUM(ResourceLookupFlags, GResourceLookupFlags, newin "2,44") * * @newin{2,44} */ -class Resource final +class GIOMM_API Resource final { - _CLASS_OPAQUE_REFCOUNTED(Resource, GResource, NONE, g_resource_ref, g_resource_unref) + _CLASS_OPAQUE_REFCOUNTED(Resource, GResource, NONE, g_resource_ref, g_resource_unref, GIOMM_API) _IGNORE(g_resource_ref, g_resource_unref) public: diff --git a/gio/src/seekable.hg b/gio/src/seekable.hg index ec3a635b..1749bf7f 100644 --- a/gio/src/seekable.hg +++ b/gio/src/seekable.hg @@ -41,9 +41,9 @@ namespace Gio * * @newin{2,16} */ -class Seekable : public Glib::Interface +class GIOMM_API Seekable : public Glib::Interface { - _CLASS_INTERFACE(Seekable, GSeekable, G_SEEKABLE, GSeekableIface) + _CLASS_INTERFACE(Seekable, GSeekable, G_SEEKABLE, GSeekableIface, , , GIOMM_API) public: _WRAP_METHOD(goffset tell() const, g_seekable_tell) diff --git a/gio/src/settings.hg b/gio/src/settings.hg index 218a4412..b335881c 100644 --- a/gio/src/settings.hg +++ b/gio/src/settings.hg @@ -26,7 +26,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class SettingsSchema; +class GIOMM_API SettingsSchema; _WRAP_ENUM(SettingsBindFlags, GSettingsBindFlags) @@ -37,9 +37,9 @@ class SettingsSchema; * * @newin{2,28} */ -class Settings : public Glib::Object +class GIOMM_API Settings : public Glib::Object { - _CLASS_GOBJECT(Settings, GSettings, G_SETTINGS, Glib::Object, GObject) + _CLASS_GOBJECT(Settings, GSettings, G_SETTINGS, Glib::Object, GObject, , , GIOMM_API) protected: _WRAP_CTOR(Settings(const Glib::ustring& schema_id), g_settings_new) diff --git a/gio/src/settingsschema.hg b/gio/src/settingsschema.hg index 5d4da543..4bd9d590 100644 --- a/gio/src/settingsschema.hg +++ b/gio/src/settingsschema.hg @@ -51,9 +51,9 @@ namespace Gio * * @newin{2,32} */ -class SettingsSchema final +class GIOMM_API SettingsSchema final { - _CLASS_OPAQUE_REFCOUNTED(SettingsSchema, GSettingsSchema, NONE, g_settings_schema_ref, g_settings_schema_unref) + _CLASS_OPAQUE_REFCOUNTED(SettingsSchema, GSettingsSchema, NONE, g_settings_schema_ref, g_settings_schema_unref, GIOMM_API) _IS_REFCOUNTED_BOXEDTYPE protected: diff --git a/gio/src/settingsschemakey.hg b/gio/src/settingsschemakey.hg index 4734ca05..49bcf418 100644 --- a/gio/src/settingsschemakey.hg +++ b/gio/src/settingsschemakey.hg @@ -35,9 +35,9 @@ namespace Gio * * @newin{2,32} */ -class SettingsSchemaKey final +class GIOMM_API SettingsSchemaKey final { - _CLASS_OPAQUE_REFCOUNTED(SettingsSchemaKey, GSettingsSchemaKey, NONE, g_settings_schema_key_ref, g_settings_schema_key_unref) + _CLASS_OPAQUE_REFCOUNTED(SettingsSchemaKey, GSettingsSchemaKey, NONE, g_settings_schema_key_ref, g_settings_schema_key_unref, GIOMM_API) protected: _IGNORE(g_settings_schema_key_ref, g_settings_schema_key_unref) diff --git a/gio/src/settingsschemasource.hg b/gio/src/settingsschemasource.hg index 5975c38c..536fe5bb 100644 --- a/gio/src/settingsschemasource.hg +++ b/gio/src/settingsschemasource.hg @@ -34,9 +34,9 @@ namespace Gio * * @newin{2,32} */ -class SettingsSchemaSource final +class GIOMM_API SettingsSchemaSource final { - _CLASS_OPAQUE_REFCOUNTED(SettingsSchemaSource, GSettingsSchemaSource, NONE, g_settings_schema_source_ref, g_settings_schema_source_unref) + _CLASS_OPAQUE_REFCOUNTED(SettingsSchemaSource, GSettingsSchemaSource, NONE, g_settings_schema_source_ref, g_settings_schema_source_unref, GIOMM_API) protected: _IGNORE(g_settings_schema_source_ref, g_settings_schema_source_unref) diff --git a/gio/src/simpleaction.hg b/gio/src/simpleaction.hg index 58741121..6e1445c7 100644 --- a/gio/src/simpleaction.hg +++ b/gio/src/simpleaction.hg @@ -37,9 +37,9 @@ namespace Gio * * @newin{2,32} */ -class SimpleAction : public Glib::Object, public Action +class GIOMM_API SimpleAction : public Glib::Object, public Action { - _CLASS_GOBJECT(SimpleAction, GSimpleAction, G_SIMPLE_ACTION, Glib::Object, GObject) + _CLASS_GOBJECT(SimpleAction, GSimpleAction, G_SIMPLE_ACTION, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Action) _STRUCT_NOT_HIDDEN diff --git a/gio/src/simpleactiongroup.hg b/gio/src/simpleactiongroup.hg index 770b0294..1e60d7d8 100644 --- a/gio/src/simpleactiongroup.hg +++ b/gio/src/simpleactiongroup.hg @@ -25,7 +25,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class Action; +class GIOMM_API Action; /** SimpleActionGroup - A simple ActionGroup implementation. * SimpleActionGroup is a hash table filled with Action objects, implementing @@ -33,11 +33,11 @@ class Action; * * @newin{2,32} */ -class SimpleActionGroup : public Glib::Object, - public ActionGroup, - public ActionMap +class GIOMM_API SimpleActionGroup : public Glib::Object, + public ActionGroup, + public ActionMap { - _CLASS_GOBJECT(SimpleActionGroup, GSimpleActionGroup, G_SIMPLE_ACTION_GROUP, Glib::Object, GObject) + _CLASS_GOBJECT(SimpleActionGroup, GSimpleActionGroup, G_SIMPLE_ACTION_GROUP, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(ActionGroup) _IMPLEMENTS_INTERFACE(ActionMap) diff --git a/gio/src/simpleiostream.hg b/gio/src/simpleiostream.hg index e510649d..af5714d9 100644 --- a/gio/src/simpleiostream.hg +++ b/gio/src/simpleiostream.hg @@ -36,9 +36,9 @@ namespace Gio * * @newin{2,46} */ -class SimpleIOStream : public Gio::IOStream +class GIOMM_API SimpleIOStream : public Gio::IOStream { - _CLASS_GOBJECT(SimpleIOStream, GSimpleIOStream, G_SIMPLE_IO_STREAM, Gio::IOStream, GIOStream) + _CLASS_GOBJECT(SimpleIOStream, GSimpleIOStream, G_SIMPLE_IO_STREAM, Gio::IOStream, GIOStream, , , GIOMM_API) protected: /** Creates a new SimpleIOStream wrapping @a input_stream and @a output_stream. diff --git a/gio/src/simplepermission.hg b/gio/src/simplepermission.hg index cce3b6bb..21dab98a 100644 --- a/gio/src/simplepermission.hg +++ b/gio/src/simplepermission.hg @@ -31,9 +31,9 @@ namespace Gio * Calling Permission::acquire() or Permission::release() will result * in errors. */ -class SimplePermission : public Permission +class GIOMM_API SimplePermission : public Permission { - _CLASS_GOBJECT(SimplePermission, GSimplePermission, G_SIMPLE_PERMISSION, Gio::Permission, GPermission) + _CLASS_GOBJECT(SimplePermission, GSimplePermission, G_SIMPLE_PERMISSION, Gio::Permission, GPermission, , , GIOMM_API) protected: diff --git a/gio/src/socket.hg b/gio/src/socket.hg index b3b0e292..7e386091 100644 --- a/gio/src/socket.hg +++ b/gio/src/socket.hg @@ -28,7 +28,7 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class SocketSource; +class GIOMM_API SocketSource; _WRAP_ENUM(SocketType, GSocketType) _WRAP_ENUM(SocketProtocol, GSocketProtocol) @@ -85,9 +85,9 @@ _WRAP_ENUM(SocketMsgFlags, GSocketMsgFlags) * @newin{2,24} * @ingroup NetworkIO */ -class Socket : public Glib::Object, public Initable +class GIOMM_API Socket : public Glib::Object, public Initable { - _CLASS_GOBJECT(Socket, GSocket, G_SOCKET, Glib::Object, GObject) + _CLASS_GOBJECT(Socket, GSocket, G_SOCKET, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Initable) protected: diff --git a/gio/src/socketaddress.hg b/gio/src/socketaddress.hg index 713986b8..4c6409e2 100644 --- a/gio/src/socketaddress.hg +++ b/gio/src/socketaddress.hg @@ -32,10 +32,10 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class SocketAddress : public Glib::Object, +class GIOMM_API SocketAddress : public Glib::Object, public SocketConnectable { - _CLASS_GOBJECT(SocketAddress, GSocketAddress, G_SOCKET_ADDRESS, Glib::Object, GObject) + _CLASS_GOBJECT(SocketAddress, GSocketAddress, G_SOCKET_ADDRESS, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(SocketConnectable) public: diff --git a/gio/src/socketaddressenumerator.hg b/gio/src/socketaddressenumerator.hg index 28cf187d..050cc6af 100644 --- a/gio/src/socketaddressenumerator.hg +++ b/gio/src/socketaddressenumerator.hg @@ -24,16 +24,16 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class SocketAddress; +class GIOMM_API SocketAddress; /** Enumerator type for objects that contain or generate SocketAddresses * * @newin{2,24} * @ingroup NetworkIO */ -class SocketAddressEnumerator : public Glib::Object +class GIOMM_API SocketAddressEnumerator : public Glib::Object { - _CLASS_GOBJECT(SocketAddressEnumerator, GSocketAddressEnumerator, G_SOCKET_ADDRESS_ENUMERATOR, Glib::Object, GObject) + _CLASS_GOBJECT(SocketAddressEnumerator, GSocketAddressEnumerator, G_SOCKET_ADDRESS_ENUMERATOR, Glib::Object, GObject, , , GIOMM_API) public: _WRAP_METHOD(Glib::RefPtr<SocketAddress> next(const Glib::RefPtr<Cancellable>& cancellable{?}), g_socket_address_enumerator_next, errthrow) diff --git a/gio/src/socketclient.hg b/gio/src/socketclient.hg index 152b06fd..635c0e5d 100644 --- a/gio/src/socketclient.hg +++ b/gio/src/socketclient.hg @@ -51,9 +51,9 @@ _WRAP_ENUM(SocketClientEvent, GSocketClientEvent) * @newin{2,24} * @ingroup NetworkIO */ -class SocketClient : public Glib::Object +class GIOMM_API SocketClient : public Glib::Object { - _CLASS_GOBJECT(SocketClient, GSocketClient, G_SOCKET_CLIENT, Glib::Object, GObject) + _CLASS_GOBJECT(SocketClient, GSocketClient, G_SOCKET_CLIENT, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/socketconnectable.hg b/gio/src/socketconnectable.hg index 266a8a64..2488b8de 100644 --- a/gio/src/socketconnectable.hg +++ b/gio/src/socketconnectable.hg @@ -32,9 +32,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class SocketConnectable : public Glib::Interface +class GIOMM_API SocketConnectable : public Glib::Interface { - _CLASS_INTERFACE(SocketConnectable, GSocketConnectable, G_SOCKET_CONNECTABLE, GSocketConnectableIface) + _CLASS_INTERFACE(SocketConnectable, GSocketConnectable, G_SOCKET_CONNECTABLE, GSocketConnectableIface, , , GIOMM_API) public: _WRAP_METHOD (Glib::RefPtr<SocketAddressEnumerator> enumerate(), g_socket_connectable_enumerate) diff --git a/gio/src/socketconnection.hg b/gio/src/socketconnection.hg index 1c9a7386..64237676 100644 --- a/gio/src/socketconnection.hg +++ b/gio/src/socketconnection.hg @@ -46,9 +46,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class SocketConnection : public Gio::IOStream +class GIOMM_API SocketConnection : public Gio::IOStream { - _CLASS_GOBJECT(SocketConnection, GSocketConnection, G_SOCKET_CONNECTION, Gio::IOStream, GIOStream) + _CLASS_GOBJECT(SocketConnection, GSocketConnection, G_SOCKET_CONNECTION, Gio::IOStream, GIOStream, , , GIOMM_API) public: _WRAP_METHOD(bool connect(const Glib::RefPtr<SocketAddress>& address, const Glib::RefPtr<Cancellable>& cancellable{?}), g_socket_connection_connect, errthrow) diff --git a/gio/src/socketcontrolmessage.hg b/gio/src/socketcontrolmessage.hg index 1ca652a1..8d04d0ba 100644 --- a/gio/src/socketcontrolmessage.hg +++ b/gio/src/socketcontrolmessage.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> #include <set> @@ -48,9 +50,9 @@ namespace Gio * @ingroup NetworkIO * @newin{2,28} */ -class SocketControlMessage : public Glib::Object +class GIOMM_API SocketControlMessage : public Glib::Object { - _CLASS_GOBJECT(SocketControlMessage, GSocketControlMessage, G_SOCKET_CONTROL_MESSAGE, Glib::Object, GObject) + _CLASS_GOBJECT(SocketControlMessage, GSocketControlMessage, G_SOCKET_CONTROL_MESSAGE, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/socketlistener.hg b/gio/src/socketlistener.hg index 4520635e..e19af91d 100644 --- a/gio/src/socketlistener.hg +++ b/gio/src/socketlistener.hg @@ -42,9 +42,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class SocketListener : public Glib::Object +class GIOMM_API SocketListener : public Glib::Object { - _CLASS_GOBJECT(SocketListener, GSocketListener, G_SOCKET_LISTENER, Glib::Object, GObject) + _CLASS_GOBJECT(SocketListener, GSocketListener, G_SOCKET_LISTENER, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/socketservice.hg b/gio/src/socketservice.hg index a21eb187..871af83a 100644 --- a/gio/src/socketservice.hg +++ b/gio/src/socketservice.hg @@ -54,9 +54,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class SocketService : public Gio::SocketListener +class GIOMM_API SocketService : public Gio::SocketListener { - _CLASS_GOBJECT(SocketService, GSocketService, G_SOCKET_SERVICE, Gio::SocketListener, GSocketListener) + _CLASS_GOBJECT(SocketService, GSocketService, G_SOCKET_SERVICE, Gio::SocketListener, GSocketListener, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/srvtarget.hg b/gio/src/srvtarget.hg index 5ca8f60a..70403093 100644 --- a/gio/src/srvtarget.hg +++ b/gio/src/srvtarget.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/listhandle.h> // unfortunately we need to include the C header for the type traits @@ -43,9 +45,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class SrvTarget +class GIOMM_API SrvTarget { - _CLASS_BOXEDTYPE(SrvTarget, GSrvTarget, NONE, g_srv_target_copy, g_srv_target_free) + _CLASS_BOXEDTYPE(SrvTarget, GSrvTarget, NONE, g_srv_target_copy, g_srv_target_free, GIOMM_API) public: SrvTarget(const Glib::ustring& hostname, guint16 port, guint16 priority, guint16 weight); diff --git a/gio/src/tcpconnection.hg b/gio/src/tcpconnection.hg index 6352c179..7a6394fd 100644 --- a/gio/src/tcpconnection.hg +++ b/gio/src/tcpconnection.hg @@ -32,9 +32,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class TcpConnection : public Gio::SocketConnection +class GIOMM_API TcpConnection : public Gio::SocketConnection { - _CLASS_GOBJECT(TcpConnection, GTcpConnection, G_TCP_CONNECTION, Gio::SocketConnection, GSocketConnection) + _CLASS_GOBJECT(TcpConnection, GTcpConnection, G_TCP_CONNECTION, Gio::SocketConnection, GSocketConnection, , , GIOMM_API) public: _WRAP_METHOD(void set_graceful_disconnect (bool graceful_disconnect), g_tcp_connection_set_graceful_disconnect) diff --git a/gio/src/tcpwrapperconnection.hg b/gio/src/tcpwrapperconnection.hg index 420d17ab..53a2c3f1 100644 --- a/gio/src/tcpwrapperconnection.hg +++ b/gio/src/tcpwrapperconnection.hg @@ -33,9 +33,9 @@ namespace Gio * @newin{2,44} * @ingroup NetworkIO */ -class TcpWrapperConnection : public Gio::TcpConnection +class GIOMM_API TcpWrapperConnection : public Gio::TcpConnection { - _CLASS_GOBJECT(TcpWrapperConnection, GTcpWrapperConnection, G_TCP_WRAPPER_CONNECTION, Gio::TcpConnection, GTcpConnection) + _CLASS_GOBJECT(TcpWrapperConnection, GTcpWrapperConnection, G_TCP_WRAPPER_CONNECTION, Gio::TcpConnection, GTcpConnection, , , GIOMM_API) public: diff --git a/gio/src/themedicon.hg b/gio/src/themedicon.hg index 7aaf2332..f8efcbd5 100644 --- a/gio/src/themedicon.hg +++ b/gio/src/themedicon.hg @@ -36,11 +36,11 @@ namespace Gio * * @newin{2,16} */ -class ThemedIcon +class GIOMM_API ThemedIcon : public Glib::Object, public Icon { - _CLASS_GOBJECT(ThemedIcon, GThemedIcon, G_THEMED_ICON, Glib::Object, GObject) + _CLASS_GOBJECT(ThemedIcon, GThemedIcon, G_THEMED_ICON, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Icon) protected: diff --git a/gio/src/threadedsocketservice.hg b/gio/src/threadedsocketservice.hg index ef239745..ce804550 100644 --- a/gio/src/threadedsocketservice.hg +++ b/gio/src/threadedsocketservice.hg @@ -44,9 +44,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class ThreadedSocketService : public Gio::SocketService +class GIOMM_API ThreadedSocketService : public Gio::SocketService { - _CLASS_GOBJECT(ThreadedSocketService, GThreadedSocketService, G_THREADED_SOCKET_SERVICE, Gio::SocketService, GSocketService) + _CLASS_GOBJECT(ThreadedSocketService, GThreadedSocketService, G_THREADED_SOCKET_SERVICE, Gio::SocketService, GSocketService, , , GIOMM_API) protected: _WRAP_CTOR(ThreadedSocketService(int max_threads), g_threaded_socket_service_new) diff --git a/gio/src/tlscertificate.hg b/gio/src/tlscertificate.hg index 09c992e2..47869aca 100644 --- a/gio/src/tlscertificate.hg +++ b/gio/src/tlscertificate.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> #include <giomm/enums.h> @@ -24,14 +26,14 @@ namespace Glib { // Forward declaration. -class ByteArray; +class GLIBMM_API ByteArray; } namespace Gio { -class SocketConnectable; +class GIOMM_API SocketConnectable; /** TlsCertificate - TLS certificate. * A certificate used for TLS authentication and encryption. This can represent @@ -40,9 +42,9 @@ class SocketConnectable; * needed when acting as a TlsServerConnection). * @newin{2,36} */ -class TlsCertificate : public Glib::Object +class GIOMM_API TlsCertificate : public Glib::Object { - _CLASS_GOBJECT(TlsCertificate, GTlsCertificate, G_TLS_CERTIFICATE, Glib::Object, GObject) + _CLASS_GOBJECT(TlsCertificate, GTlsCertificate, G_TLS_CERTIFICATE, Glib::Object, GObject, , , GIOMM_API) protected: _WRAP_CTOR(TlsCertificate(const std::string& data, gssize length), g_tls_certificate_new_from_pem, errthrow) diff --git a/gio/src/tlsclientconnection.hg b/gio/src/tlsclientconnection.hg index 5937a82d..aa096e12 100644 --- a/gio/src/tlsclientconnection.hg +++ b/gio/src/tlsclientconnection.hg @@ -29,18 +29,18 @@ typedef struct _GTlsClientConnectionInterface GTlsClientConnectionInterface; namespace Gio { -class SocketConnectable; +class GIOMM_API SocketConnectable; /** TlsClientConnection - TLS client-side connection. * TlsClientConnection is the client-side subclass of TlsConnection, * representing a client-side TLS connection. * @newin{2,36} */ -class TlsClientConnection +class GIOMM_API TlsClientConnection : public Glib::Interface, public TlsConnection { - _CLASS_INTERFACE(TlsClientConnection, GTlsClientConnection, G_TLS_CLIENT_CONNECTION, GTlsClientConnectionInterface) + _CLASS_INTERFACE(TlsClientConnection, GTlsClientConnection, G_TLS_CLIENT_CONNECTION, GTlsClientConnectionInterface, , , GIOMM_API) _CUSTOM_CTOR_CAST public: diff --git a/gio/src/tlsconnection.hg b/gio/src/tlsconnection.hg index 142bd2b3..f332abe1 100644 --- a/gio/src/tlsconnection.hg +++ b/gio/src/tlsconnection.hg @@ -28,9 +28,9 @@ namespace Gio _WRAP_ENUM(TlsRehandshakeMode,GTlsRehandshakeMode) -class Cancellable; -class TlsDatabase; -class TlsInteraction; +class GIOMM_API Cancellable; +class GIOMM_API TlsDatabase; +class GIOMM_API TlsInteraction; /** TlsConnection - TLS connection type. * TlsConnection is the base TLS connection class type, which wraps an IOStream @@ -39,9 +39,9 @@ class TlsInteraction; * server-side TLS, respectively. * @newin{2,36} */ -class TlsConnection : public IOStream +class GIOMM_API TlsConnection : public IOStream { - _CLASS_GOBJECT(TlsConnection, GTlsConnection, G_TLS_CONNECTION, IOStream, GIOStream) + _CLASS_GOBJECT(TlsConnection, GTlsConnection, G_TLS_CONNECTION, IOStream, GIOStream, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/tlsdatabase.hg b/gio/src/tlsdatabase.hg index a99daaae..95d577c4 100644 --- a/gio/src/tlsdatabase.hg +++ b/gio/src/tlsdatabase.hg @@ -25,7 +25,7 @@ namespace Glib { // Forward declaration. -class ByteArray; +class GLIBMM_API ByteArray; } @@ -35,10 +35,10 @@ namespace Gio _WRAP_ENUM(TlsDatabaseVerifyFlags, GTlsDatabaseVerifyFlags) _WRAP_ENUM(TlsDatabaseLookupFlags, GTlsDatabaseLookupFlags) -class Cancellable; -class SocketConnectable; -class TlsCertificate; -class TlsInteraction; +class GIOMM_API Cancellable; +class GIOMM_API SocketConnectable; +class GIOMM_API TlsCertificate; +class GIOMM_API TlsInteraction; /** TlsDatabase - TLS database type. * TlsDatabase is used to lookup certificates and other information from a @@ -49,9 +49,9 @@ class TlsInteraction; * It is used internally by TlsConnection. * @newin{2,36} */ -class TlsDatabase : public Glib::Object +class GIOMM_API TlsDatabase : public Glib::Object { - _CLASS_GOBJECT(TlsDatabase, GTlsDatabase, G_TLS_DATABASE, Glib::Object, GObject) + _CLASS_GOBJECT(TlsDatabase, GTlsDatabase, G_TLS_DATABASE, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/tlsfiledatabase.hg b/gio/src/tlsfiledatabase.hg index bed39f83..1fa26f5f 100644 --- a/gio/src/tlsfiledatabase.hg +++ b/gio/src/tlsfiledatabase.hg @@ -36,11 +36,11 @@ namespace Gio * * @newin{2,36} */ -class TlsFileDatabase +class GIOMM_API TlsFileDatabase : public Glib::Interface, public TlsDatabase { - _CLASS_INTERFACE(TlsFileDatabase, GTlsFileDatabase, G_TLS_FILE_DATABASE, GTlsFileDatabaseInterface) + _CLASS_INTERFACE(TlsFileDatabase, GTlsFileDatabase, G_TLS_FILE_DATABASE, GTlsFileDatabaseInterface, , , GIOMM_API) public: //TODO: It is not possible to use _WRAP_CTOR()/WRAP_CREATE() here because this diff --git a/gio/src/tlsinteraction.hg b/gio/src/tlsinteraction.hg index 09bb2cb8..ed1ed019 100644 --- a/gio/src/tlsinteraction.hg +++ b/gio/src/tlsinteraction.hg @@ -28,8 +28,8 @@ namespace Gio _WRAP_ENUM(TlsInteractionResult, GTlsInteractionResult) _WRAP_ENUM(TlsCertificateRequestFlags, GTlsCertificateRequestFlags) -class Cancellable; -class TlsPassword; +class GIOMM_API Cancellable; +class GIOMM_API TlsPassword; /** TlsInteraction - Interaction with the user during TLS operations. * TlsInteraction provides a mechanism for the TLS connection and database code @@ -53,9 +53,9 @@ class TlsPassword; * finish method. * @newin{2,36} */ -class TlsInteraction : public Glib::Object +class GIOMM_API TlsInteraction : public Glib::Object { - _CLASS_GOBJECT(TlsInteraction, GTlsInteraction, G_TLS_INTERACTION, Glib::Object, GObject) + _CLASS_GOBJECT(TlsInteraction, GTlsInteraction, G_TLS_INTERACTION, Glib::Object, GObject, , , GIOMM_API) protected: _CTOR_DEFAULT diff --git a/gio/src/tlspassword.hg b/gio/src/tlspassword.hg index 28a54135..12e8baf8 100644 --- a/gio/src/tlspassword.hg +++ b/gio/src/tlspassword.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> _DEFS(giomm,gio) @@ -28,9 +30,9 @@ _WRAP_ENUM(TlsPasswordFlags, GTlsPasswordFlags) * Holds a password used in TLS. * @newin{2,36} */ -class TlsPassword : public Glib::Object +class GIOMM_API TlsPassword : public Glib::Object { - _CLASS_GOBJECT(TlsPassword, GTlsPassword, G_TLS_PASSWORD, Glib::Object, GObject) + _CLASS_GOBJECT(TlsPassword, GTlsPassword, G_TLS_PASSWORD, Glib::Object, GObject, , , GIOMM_API) protected: _WRAP_CTOR(TlsPassword(const Glib::ustring& description{.}, TlsPasswordFlags flags{.} = Gio::TLS_PASSWORD_NONE), g_tls_password_new) diff --git a/gio/src/tlsserverconnection.hg b/gio/src/tlsserverconnection.hg index a9b52a43..7b4c8b8b 100644 --- a/gio/src/tlsserverconnection.hg +++ b/gio/src/tlsserverconnection.hg @@ -34,9 +34,9 @@ namespace Gio * representing a server-side TLS connection. * @newin{2,36} */ -class TlsServerConnection : public Glib::Interface, public TlsConnection +class GIOMM_API TlsServerConnection : public Glib::Interface, public TlsConnection { - _CLASS_INTERFACE(TlsServerConnection, GTlsServerConnection, G_TLS_SERVER_CONNECTION, GTlsServerConnectionInterface) + _CLASS_INTERFACE(TlsServerConnection, GTlsServerConnection, G_TLS_SERVER_CONNECTION, GTlsServerConnectionInterface, , , GIOMM_API) _CUSTOM_CTOR_CAST public: diff --git a/gio/src/unixconnection.hg b/gio/src/unixconnection.hg index 1ddd1d24..3b157ab3 100644 --- a/gio/src/unixconnection.hg +++ b/gio/src/unixconnection.hg @@ -35,9 +35,9 @@ namespace Gio * @newin{2,24} * @ingroup NetworkIO */ -class UnixConnection : public Gio::SocketConnection +class GIOMM_API UnixConnection : public Gio::SocketConnection { - _CLASS_GOBJECT(UnixConnection, GUnixConnection, G_UNIX_CONNECTION, Gio::SocketConnection, GSocketConnection) + _CLASS_GOBJECT(UnixConnection, GUnixConnection, G_UNIX_CONNECTION, Gio::SocketConnection, GSocketConnection, , , GIOMM_API) _GTKMMPROC_WIN32_NO_WRAP public: diff --git a/gio/src/unixcredentialsmessage.hg b/gio/src/unixcredentialsmessage.hg index 9ba8239a..49eb02e1 100644 --- a/gio/src/unixcredentialsmessage.hg +++ b/gio/src/unixcredentialsmessage.hg @@ -22,7 +22,7 @@ _PINCLUDE(giomm/private/socketcontrolmessage_p.h) namespace Gio { -class Credentials; +class GIOMM_API Credentials; /** UnixCredentialsMessage - A SocketControlMessage containing credentials. * This SocketControlMessage contains a Credentials instance. It may be sent @@ -37,9 +37,9 @@ class Credentials; * @ingroup NetworkIO * @newin{2,28} */ -class UnixCredentialsMessage : public SocketControlMessage +class GIOMM_API UnixCredentialsMessage : public SocketControlMessage { - _CLASS_GOBJECT(UnixCredentialsMessage, GUnixCredentialsMessage, G_UNIX_CREDENTIALS_MESSAGE, Gio::SocketControlMessage, GSocketControlMessage) + _CLASS_GOBJECT(UnixCredentialsMessage, GUnixCredentialsMessage, G_UNIX_CREDENTIALS_MESSAGE, Gio::SocketControlMessage, GSocketControlMessage, , , GIOMM_API) _GTKMMPROC_WIN32_NO_WRAP protected: diff --git a/gio/src/unixfdlist.hg b/gio/src/unixfdlist.hg index 838793f8..0f06dccf 100644 --- a/gio/src/unixfdlist.hg +++ b/gio/src/unixfdlist.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> #include <glibmm/arrayhandle.h> @@ -34,9 +36,9 @@ namespace Gio * @ingroup NetworkIO * @newin{2,28} */ -class UnixFDList : public Glib::Object +class GIOMM_API UnixFDList : public Glib::Object { - _CLASS_GOBJECT(UnixFDList, GUnixFDList, G_UNIX_FD_LIST, Glib::Object, GObject) + _CLASS_GOBJECT(UnixFDList, GUnixFDList, G_UNIX_FD_LIST, Glib::Object, GObject, , , GIOMM_API) _GTKMMPROC_WIN32_NO_WRAP protected: diff --git a/gio/src/unixfdmessage.hg b/gio/src/unixfdmessage.hg index f418f94b..4b065b2f 100644 --- a/gio/src/unixfdmessage.hg +++ b/gio/src/unixfdmessage.hg @@ -23,7 +23,7 @@ _PINCLUDE(giomm/private/socketcontrolmessage_p.h) namespace Gio { -class UnixFDList; +class GIOMM_API UnixFDList; /** UnixFDMessage — A GSocketControlMessage containing a GUnixFDList. * This SocketControlMessage contains a UnixFDList. It may be sent using @@ -38,9 +38,9 @@ class UnixFDList; * @ingroup NetworkIO * @newin{2,28} */ -class UnixFDMessage : public SocketControlMessage +class GIOMM_API UnixFDMessage : public SocketControlMessage { - _CLASS_GOBJECT(UnixFDMessage, GUnixFDMessage, G_UNIX_FD_MESSAGE, Gio::SocketControlMessage, GSocketControlMessage) + _CLASS_GOBJECT(UnixFDMessage, GUnixFDMessage, G_UNIX_FD_MESSAGE, Gio::SocketControlMessage, GSocketControlMessage, , , GIOMM_API) _GTKMMPROC_WIN32_NO_WRAP protected: diff --git a/gio/src/unixinputstream.hg b/gio/src/unixinputstream.hg index de00b229..b299e9c9 100644 --- a/gio/src/unixinputstream.hg +++ b/gio/src/unixinputstream.hg @@ -33,9 +33,9 @@ namespace Gio * * @newin{2,16} */ -class UnixInputStream : public Gio::InputStream +class GIOMM_API UnixInputStream : public Gio::InputStream { - _CLASS_GOBJECT(UnixInputStream, GUnixInputStream, G_UNIX_INPUT_STREAM, Gio::InputStream, GInputStream) + _CLASS_GOBJECT(UnixInputStream, GUnixInputStream, G_UNIX_INPUT_STREAM, Gio::InputStream, GInputStream, , , GIOMM_API) _GTKMMPROC_WIN32_NO_WRAP protected: diff --git a/gio/src/unixmount.hg b/gio/src/unixmount.hg index 7c8f2f63..f815de6c 100644 --- a/gio/src/unixmount.hg +++ b/gio/src/unixmount.hg @@ -32,11 +32,11 @@ namespace Gio // TODO: GUnixMount seems to be hidden (the gunixmount.h header is not installed.) // But we do need to wrap GUnixMountPoint, GUnixMountEntry and GUnixMountMonitor from gunixmounts.h - notice the s. murrayc. /* -class UnixMount +class GIOMM_API UnixMount : public Glib::Object, public Mount { - _CLASS_GOBJECT(UnixMount, GUnixMount, G_UNIX_MOUNT, Glib::Object, GObject) + _CLASS_GOBJECT(UnixMount, GUnixMount, G_UNIX_MOUNT, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Mount) _GTKMMPROC_WIN32_NO_WRAP }; diff --git a/gio/src/unixoutputstream.hg b/gio/src/unixoutputstream.hg index be49ac40..5850fc56 100644 --- a/gio/src/unixoutputstream.hg +++ b/gio/src/unixoutputstream.hg @@ -32,9 +32,9 @@ namespace Gio * * @newin{2,16} */ -class UnixOutputStream : public Gio::OutputStream +class GIOMM_API UnixOutputStream : public Gio::OutputStream { - _CLASS_GOBJECT(UnixOutputStream, GUnixOutputStream, G_UNIX_OUTPUT_STREAM, Gio::OutputStream, GOutputStream) + _CLASS_GOBJECT(UnixOutputStream, GUnixOutputStream, G_UNIX_OUTPUT_STREAM, Gio::OutputStream, GOutputStream, , , GIOMM_API) _GTKMMPROC_WIN32_NO_WRAP protected: diff --git a/gio/src/unixsocketaddress.hg b/gio/src/unixsocketaddress.hg index 5cfdc947..25cbb6e8 100644 --- a/gio/src/unixsocketaddress.hg +++ b/gio/src/unixsocketaddress.hg @@ -26,7 +26,7 @@ namespace Gio _WRAP_ENUM(UnixSocketAddressType, GUnixSocketAddressType) -class ByteArray; +class GLIBMM_API ByteArray; /** UnixSocketAddress - UNIX SocketAddress. * Support for UNIX-domain (also known as local) sockets. @@ -45,10 +45,10 @@ class ByteArray; * @newin{2,28} * @ingroup NetworkIO */ -class UnixSocketAddress +class GIOMM_API UnixSocketAddress : public SocketAddress { - _CLASS_GOBJECT(UnixSocketAddress, GUnixSocketAddress, G_UNIX_SOCKET_ADDRESS, SocketAddress, GSocketAddress) + _CLASS_GOBJECT(UnixSocketAddress, GUnixSocketAddress, G_UNIX_SOCKET_ADDRESS, SocketAddress, GSocketAddress, , , GIOMM_API) _GTKMMPROC_WIN32_NO_WRAP protected: diff --git a/gio/src/volume.hg b/gio/src/volume.hg index a1488d83..03b3f610 100644 --- a/gio/src/volume.hg +++ b/gio/src/volume.hg @@ -33,8 +33,8 @@ namespace Gio // Making a forward declaration here to avoid circular dependency. // file.hg already includes volume.h. -class File; -class Drive; +class GIOMM_API File; +class GIOMM_API Drive; /** The Volume interface represents user-visible objects that can be mounted. * @@ -50,9 +50,9 @@ class Drive; * * @newin{2,16} */ -class Volume : public Glib::Interface +class GIOMM_API Volume : public Glib::Interface { - _CLASS_INTERFACE(Volume, GVolume, G_DRIVE, GVolumeIface) + _CLASS_INTERFACE(Volume, GVolume, G_DRIVE, GVolumeIface, , , GIOMM_API) public: _WRAP_METHOD(std::string get_name() const, g_volume_get_name) _WRAP_METHOD(std::string get_uuid() const, g_volume_get_uuid) @@ -187,6 +187,7 @@ namespace Glib { //Pre-declare this so we can use it in TypeTrait: +GIOMM_API Glib::RefPtr<Gio::Volume> wrap(GVolume* object, bool take_copy); namespace Container_Helpers @@ -198,7 +199,7 @@ namespace Container_Helpers * would not return a wrapper for an interface. */ template <> -struct TypeTraits< Glib::RefPtr<Gio::Volume> > +struct GIOMM_API TypeTraits< Glib::RefPtr<Gio::Volume> > { using CppType = Glib::RefPtr<Gio::Volume>; using CType = GVolume*; diff --git a/gio/src/volumemonitor.hg b/gio/src/volumemonitor.hg index f51ac1c1..59725365 100644 --- a/gio/src/volumemonitor.hg +++ b/gio/src/volumemonitor.hg @@ -33,9 +33,9 @@ namespace Gio * * @newin{2,16} */ -class VolumeMonitor : public Glib::Object +class GIOMM_API VolumeMonitor : public Glib::Object { - _CLASS_GOBJECT(VolumeMonitor, GVolumeMonitor, G_VOLUME_MONITOR, Glib::Object, GObject) + _CLASS_GOBJECT(VolumeMonitor, GVolumeMonitor, G_VOLUME_MONITOR, Glib::Object, GObject, , , GIOMM_API) protected: public: diff --git a/gio/src/zlibcompressor.hg b/gio/src/zlibcompressor.hg index 58e7cc86..a0127087 100644 --- a/gio/src/zlibcompressor.hg +++ b/gio/src/zlibcompressor.hg @@ -14,6 +14,8 @@ * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ +_CONFIGINCLUDE(giommconfig.h) + #include <glibmm/object.h> #include <giomm/converter.h> @@ -25,16 +27,16 @@ namespace Gio _WRAP_ENUM(ZlibCompressorFormat, GZlibCompressorFormat) -class FileInfo; +class GIOMM_API FileInfo; /** ZlibCompressor - Zlib compressor. * ZlibCompressor is an implementation of Converter that compresses data using * zlib. * @newin{2,34} */ -class ZlibCompressor : public Glib::Object, public Converter +class GIOMM_API ZlibCompressor : public Glib::Object, public Converter { - _CLASS_GOBJECT(ZlibCompressor, GZlibCompressor, G_ZLIB_COMPRESSOR, Glib::Object, GObject) + _CLASS_GOBJECT(ZlibCompressor, GZlibCompressor, G_ZLIB_COMPRESSOR, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Converter) protected: diff --git a/gio/src/zlibdecompressor.hg b/gio/src/zlibdecompressor.hg index aab97633..7ff479a1 100644 --- a/gio/src/zlibdecompressor.hg +++ b/gio/src/zlibdecompressor.hg @@ -24,16 +24,16 @@ _PINCLUDE(glibmm/private/object_p.h) namespace Gio { -class FileInfo; +class GIOMM_API FileInfo; /** ZlibDecompressor - Zlib decompressor. * ZlibDecompressor is an implementation of Converter that decompresses data * compressed with zlib. * @newin{2,34} */ -class ZlibDecompressor : public Glib::Object, public Converter +class GIOMM_API ZlibDecompressor : public Glib::Object, public Converter { - _CLASS_GOBJECT(ZlibDecompressor, GZlibDecompressor, G_ZLIB_DECOMPRESSOR, Glib::Object, GObject) + _CLASS_GOBJECT(ZlibDecompressor, GZlibDecompressor, G_ZLIB_DECOMPRESSOR, Glib::Object, GObject, , , GIOMM_API) _IMPLEMENTS_INTERFACE(Converter) protected: diff --git a/glib/glibmm/arrayhandle.h b/glib/glibmm/arrayhandle.h index 735b6618..97319cc8 100644 --- a/glib/glibmm/arrayhandle.h +++ b/glib/glibmm/arrayhandle.h @@ -281,7 +281,7 @@ private: }; template <> -class ArrayHandle<bool, Container_Helpers::TypeTraits<bool>> +class GLIBMM_API ArrayHandle<bool, Container_Helpers::TypeTraits<bool>> { public: using Me = ArrayHandle<bool, Container_Helpers::TypeTraits<bool>>; 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 41e19ce4..59e96a7e 100644 --- a/glib/glibmm/class.h +++ b/glib/glibmm/class.h @@ -31,9 +31,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/containerhandle_shared.h b/glib/glibmm/containerhandle_shared.h index 851df9c2..21db8080 100644 --- a/glib/glibmm/containerhandle_shared.h +++ b/glib/glibmm/containerhandle_shared.h @@ -264,7 +264,7 @@ struct TypeTraits<Glib::RefPtr<const T>> * the output type cannot be 'const char*'. */ template <> -struct TypeTraits<Glib::ustring> +struct GLIBMM_API TypeTraits<Glib::ustring> { using CppType = Glib::ustring; using CType = const char*; @@ -286,7 +286,7 @@ struct TypeTraits<Glib::ustring> * cannot be 'const char*'. */ template <> -struct TypeTraits<std::string> +struct GLIBMM_API TypeTraits<std::string> { using CppType = std::string; using CType = const char*; @@ -305,7 +305,7 @@ struct TypeTraits<std::string> * @ingroup ContHelpers */ template <> -struct TypeTraits<bool> +struct GLIBMM_API TypeTraits<bool> { using CppType = bool; using CType = gboolean; @@ -321,7 +321,7 @@ struct TypeTraits<bool> * @ingroup ContHelpers */ template <> -struct TypeTraits<Glib::VariantBase> +struct GLIBMM_API TypeTraits<Glib::VariantBase> { using CppType = Glib::VariantBase; using CType = GVariant*; @@ -340,7 +340,7 @@ struct TypeTraits<Glib::VariantBase> * @ingroup ContHelpers */ template <> -struct TypeTraits<Glib::VariantContainerBase> +struct GLIBMM_API TypeTraits<Glib::VariantContainerBase> { using CppType = Glib::VariantContainerBase; using CType = GVariant*; diff --git a/glib/glibmm/dispatcher.h b/glib/glibmm/dispatcher.h index 9b7b9678..91340300 100644 --- a/glib/glibmm/dispatcher.h +++ b/glib/glibmm/dispatcher.h @@ -66,7 +66,7 @@ class DispatchNotifier; * 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 f9d83eb9..1cd3b007 100644 --- a/glib/glibmm/error.h +++ b/glib/glibmm/error.h @@ -25,7 +25,7 @@ namespace Glib { -class Error : public Glib::Exception +class GLIBMM_API Error : public Glib::Exception { public: Error(); @@ -74,7 +74,7 @@ protected: // This is needed so Glib::Error can be used with // Glib::Value and _WRAP_PROPERTY. 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/exception.h b/glib/glibmm/exception.h index 726f39e0..62c11359 100644 --- a/glib/glibmm/exception.h +++ b/glib/glibmm/exception.h @@ -24,7 +24,7 @@ namespace Glib { -class Exception +class GLIBMM_API Exception { public: virtual ~Exception() noexcept = 0; diff --git a/glib/glibmm/exceptionhandler.h b/glib/glibmm/exceptionhandler.h index 34a02503..22ecdc87 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 ec5740f5..c2c6ce34 100644 --- a/glib/glibmm/extraclassinit.h +++ b/glib/glibmm/extraclassinit.h @@ -75,7 +75,7 @@ namespace Glib * * @newin{2,60} */ -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 509e7170..5bf7e200 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 { @@ -28,6 +30,7 @@ namespace Glib * You do not need to call %Glib::init() if you are using Gtk::Application or * Gio::init(), because they call %Glib::init() for you. */ +GLIBMM_API void init(); } // namespace Glib diff --git a/glib/glibmm/interface.h b/glib/glibmm/interface.h index 9e35b5eb..e4f04d48 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. @@ -78,6 +78,7 @@ public: inline const GObject* gobj() const { return gobject_; } }; +GLIBMM_API RefPtr<ObjectBase> wrap_interface(GObject* object, bool take_copy = false); } // namespace Glib diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h index cfed1253..547123ec 100644 --- a/glib/glibmm/main.h +++ b/glib/glibmm/main.h @@ -30,13 +30,13 @@ namespace Glib { #ifndef GLIBMM_DISABLE_DEPRECATED -class Cond; -class Mutex; +class GLIBMM_API Cond; +class GLIBMM_API Mutex; namespace Threads { -class Cond; -class Mutex; +class GLIBMM_API Cond; +class GLIBMM_API Mutex; } #endif // GLIBMM_DISABLE_DEPRECATED @@ -44,8 +44,7 @@ class Mutex; * Manages all available sources of events. * @{ */ - -class PollFD +class GLIBMM_API PollFD { public: using fd_t = decltype(GPollFD::fd); @@ -80,7 +79,7 @@ private: // In a single-threaded program auto-disconnection of trackable slots is safe // and can be useful. -class SignalTimeout +class GLIBMM_API SignalTimeout { public: #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -216,7 +215,7 @@ private: SignalTimeout& operator=(const SignalTimeout&); }; -class SignalIdle +class GLIBMM_API SignalIdle { public: #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -274,7 +273,7 @@ private: SignalIdle& operator=(const SignalIdle&); }; -class SignalIO +class GLIBMM_API SignalIO { public: #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -345,7 +344,7 @@ private: SignalIO& operator=(const SignalIO&); }; -class SignalChildWatch +class GLIBMM_API SignalChildWatch { public: #ifndef DOXYGEN_SHOULD_SKIP_THIS @@ -379,26 +378,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; @@ -618,9 +621,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; @@ -676,9 +680,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; @@ -840,7 +845,7 @@ public: #endif /* DOXYGEN_SHOULD_SKIP_THIS */ }; -class TimeoutSource : public Glib::Source +class GLIBMM_API TimeoutSource : public Glib::Source { public: using CppObjectType = Glib::TimeoutSource; @@ -863,7 +868,7 @@ private: unsigned int interval_; }; -class IdleSource : public Glib::Source +class GLIBMM_API IdleSource : public Glib::Source { public: using CppObjectType = Glib::IdleSource; @@ -880,7 +885,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/meson.build b/glib/glibmm/meson.build index c69dd3c8..fc4630c9 100644 --- a/glib/glibmm/meson.build +++ b/glib/glibmm/meson.build @@ -3,7 +3,7 @@ # Input: glibmm_build_dep, glibmm_pcname, maintainer_mode, project_source_root, # generate_binding_py, handle_built_files_py, m4_files, pm_files, # glibmm_libversion, install_includedir, python3, glibmm_rc, gmmproc_dir, -# is_host_windows, gendef, gmmproc, generate_wrap_init_pl +# is_host_windows, gmmproc, generate_wrap_init_pl # Output: glibmm_hg_ccg_basenames, glibmm_extra_h_files, built_files_root, # glibmm_built_h_file_targets, glibmm_dep @@ -145,6 +145,16 @@ install_headers(glibmm_extra_ph_files, subdir: glibmm_pcname / 'glibmm' / 'priva untracked_glibmm = 'untracked' / 'glib' / 'glibmm' src_untracked_glibmm = project_source_root / untracked_glibmm +extra_glibmm_objects = [] +glibmm_cpp_args = [ '-DGLIBMM_BUILD=1' ] + +# Build the .rc file for Windows builds and link to it +if is_host_windows + windows = import('windows') + glibmm_res = windows.compile_resources(glibmm_rc) + extra_glibmm_objects += glibmm_res +endif + if maintainer_mode # Maintainer mode. Generate .h and .cc files from .hg and .ccg files in ../src. @@ -246,12 +256,14 @@ if maintainer_mode ) extra_include_dirs = ['..'] - glib_int_lib = static_library('glibmm-int', + + glibmm_library = library(glibmm_pcname, extra_glibmm_objects, glibmm_built_cc_file_targets, glibmm_extra_cc_files, built_dummy_h_file_target, include_directories: extra_include_dirs, - cpp_args: '-DGLIBMM_BUILD=1', + cpp_args: glibmm_cpp_args, + version: glibmm_libversion, dependencies: glibmm_build_dep, - install: false, + install: true, ) built_h_cc_dir = meson.current_build_dir() @@ -297,54 +309,19 @@ else # not maintainer_mode extra_include_dirs = [ '..', '..' / '..' / 'untracked' / 'glib' ] - # We need this so that we can run gendef.exe to get the .def file - # needed for obtaining the .lib file for the glibmm DLL - glib_int_lib = static_library('glibmm-int', + glibmm_library = library(glibmm_pcname, extra_glibmm_objects, built_cc_files, glibmm_extra_cc_files, include_directories: extra_include_dirs, - cpp_args: '-DGLIBMM_BUILD=1', + cpp_args: glibmm_cpp_args, + version: glibmm_libversion, dependencies: glibmm_build_dep, - install: false, + install: true, ) built_h_cc_dir = src_untracked_glibmm endif -glibmm_def = [] -glibmm_extra_link_args = [] -extra_glibmm_objects = [] - -if is_msvc - glibmm_def = custom_target('glibmm.def', - output: 'glibmm.def', - depends: glib_int_lib, - command: [ gendef, - '@OUTPUT@', - '@0@-@1@.dll'.format(glibmm_pcname, glibmm_libversion.split('.')[0]), - glib_int_lib.full_path(), - ], - install: false, - ) - glibmm_extra_link_args = ['/def:@0@'.format(glibmm_def.full_path())] -endif - -# Build the .rc file for Windows builds and link to it -if is_host_windows - windows = import('windows') - glibmm_res = windows.compile_resources(glibmm_rc) - extra_glibmm_objects += glibmm_res -endif - -glibmm_library = library(glibmm_pcname, extra_glibmm_objects, - objects: glib_int_lib.extract_all_objects(), - version: glibmm_libversion, - dependencies: glibmm_build_dep, - link_depends: glibmm_def, - link_args: glibmm_extra_link_args, - install: true, -) - # Install built .h and _p.h files. meson.add_install_script( python3.path(), generate_binding_py, 'install_built_h_files', diff --git a/glib/glibmm/object.h b/glib/glibmm/object.h index f9f316a4..824c6b73 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 @@ -65,7 +65,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 bba6bdc9..16d1a799 100644 --- a/glib/glibmm/objectbase.h +++ b/glib/glibmm/objectbase.h @@ -41,8 +41,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 @@ -312,6 +312,7 @@ ObjectBase::get_property(const Glib::ustring& property_name, PropertyType& value #endif /* DOXYGEN_SHOULD_SKIP_THIS */ +GLIBMM_API bool _gobject_cppinstance_already_deleted(GObject* gobject); } // namespace Glib 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 4103b9c5..a7fa6765 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 bc76c322..ef5cbfb1 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 8820d40f..93781b16 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, SignalProxyDetailed 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 SignalProxyDetailed. */ -class SignalProxyNormal : public SignalProxyBase +class GLIBMM_API SignalProxyNormal : public SignalProxyBase { public: ~SignalProxyNormal() noexcept; @@ -251,7 +251,7 @@ using SignalProxy6 = SignalProxy<R, T1, T2, T3, T4, T5, T6>; * the template derivatives, which serve as gatekeepers for the * types allowed on a particular signal. */ -class SignalProxyDetailed : public SignalProxyBase +class GLIBMM_API SignalProxyDetailed : public SignalProxyBase { public: ~SignalProxyDetailed() noexcept; diff --git a/glib/glibmm/signalproxy_connectionnode.h b/glib/glibmm/signalproxy_connectionnode.h index 30da5c0f..226b685b 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 +class GLIBMM_API SignalProxyConnectionNode { public: /** @param slot The signal handler for the glib signal. diff --git a/glib/glibmm/streamiochannel.h b/glib/glibmm/streamiochannel.h index 28a1ae77..7b101102 100644 --- a/glib/glibmm/streamiochannel.h +++ b/glib/glibmm/streamiochannel.h @@ -29,7 +29,7 @@ namespace Glib /** @deprecated This whole class was deprecated in glibmm 2.2 - See the Glib::IOChannel * documentation for an explanation. */ -class StreamIOChannel : public Glib::IOChannel +class GLIBMM_API StreamIOChannel : public Glib::IOChannel { public: ~StreamIOChannel() noexcept override; 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/threadpool.h b/glib/glibmm/threadpool.h index 684fcbcf..a7a7553e 100644 --- a/glib/glibmm/threadpool.h +++ b/glib/glibmm/threadpool.h @@ -44,7 +44,7 @@ namespace Glib * * @deprecated This is deprecated in favor of the standard C++ concurrency API in C++11 and C++14. */ -class ThreadPool +class GLIBMM_API ThreadPool { public: /** Constructs a new thread pool. 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/timeval.h b/glib/glibmm/timeval.h index 8cab311f..831ed7ab 100644 --- a/glib/glibmm/timeval.h +++ b/glib/glibmm/timeval.h @@ -38,7 +38,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * * @deprecated Use Glib::DateTime instead. */ -struct TimeVal : public GTimeVal +struct GLIBMM_API TimeVal : public GTimeVal { inline TimeVal(); inline TimeVal(long seconds, long microseconds); diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h index 834bdaa1..24b2f525 100644 --- a/glib/glibmm/ustring.h +++ b/glib/glibmm/ustring.h @@ -29,6 +29,11 @@ #include <cstddef> /* for std::ptrdiff_t */ #endif +/* work around linker error on Visual Studio if we don't have GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS */ +#if (_MSC_VER >= 1600) && !defined (GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS) +const std::basic_string<char>::size_type std::basic_string<char>::npos = (std::basic_string<char>::size_type) -1; +#endif + namespace Glib { @@ -132,6 +137,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 @@ -221,7 +227,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; @@ -252,11 +258,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. @@ -966,18 +972,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 @@ -1013,12 +1020,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 @@ -1027,12 +1036,14 @@ std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string); * @relates Glib::ustring * @throw Glib::ConvertError */ +GLIBMM_API std::wistream& operator>>(std::wistream& is, ustring& utf8_string); /** Wide stream output operator. * @relates Glib::ustring * @throw Glib::ConvertError */ +GLIBMM_API std::wostream& operator<<(std::wostream& os, const ustring& utf8_string); #endif /* GLIBMM_HAVE_WIDE_STREAM */ @@ -1389,7 +1400,7 @@ public: /// A template specialization for Stringify<ustring>: template <> -class ustring::Stringify<ustring> +class GLIBMM_API ustring::Stringify<ustring> { private: const ustring& string_; @@ -1408,7 +1419,7 @@ public: * because the regular template has ambiguous constructor overloads for char*. */ template <> -class ustring::Stringify<const char*> +class GLIBMM_API ustring::Stringify<const char*> { private: const ustring string_; diff --git a/glib/glibmm/utility.h b/glib/glibmm/utility.h index 0f1e9ef6..9ce3b054 100644 --- a/glib/glibmm/utility.h +++ b/glib/glibmm/utility.h @@ -145,6 +145,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 c34cc91e..f2364714 100644 --- a/glib/glibmm/value.h +++ b/glib/glibmm/value.h @@ -27,8 +27,8 @@ namespace Glib { -class ObjectBase; -class Object; +class GLIBMM_API ObjectBase; +class GLIBMM_API Object; /** @defgroup glibmmValue Generic Values * @@ -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; @@ -116,7 +116,7 @@ protected: /** * @ingroup glibmmValue */ -class ValueBase_Object : public ValueBase +class GLIBMM_API ValueBase_Object : public ValueBase { public: static GType value_type() G_GNUC_CONST; @@ -137,7 +137,7 @@ protected: /** * @ingroup glibmmValue */ -class ValueBase_Enum : public ValueBase +class GLIBMM_API ValueBase_Enum : public ValueBase { public: using CType = gint; @@ -158,7 +158,7 @@ protected: /** * @ingroup glibmmValue */ -class ValueBase_Flags : public ValueBase +class GLIBMM_API ValueBase_Flags : public ValueBase { public: using CType = guint; @@ -179,7 +179,7 @@ protected: /** * @ingroup glibmmValue */ -class ValueBase_String : public ValueBase +class GLIBMM_API ValueBase_String : public ValueBase { public: using CType = const gchar*; @@ -200,7 +200,7 @@ protected: /** * @ingroup glibmmValue */ -class ValueBase_Variant : public ValueBase +class GLIBMM_API ValueBase_Variant : public ValueBase { public: static GType value_type() G_GNUC_CONST; @@ -320,7 +320,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; @@ -333,7 +333,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; @@ -346,7 +346,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>; @@ -361,7 +361,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 d2ea01ce..53da3dba 100644 --- a/glib/glibmm/value_custom.h +++ b/glib/glibmm/value_custom.h @@ -42,6 +42,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); @@ -49,6 +51,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 */ 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 diff --git a/glib/glibmmconfig.h.in b/glib/glibmmconfig.h.in index abaaeb31..5e3dba0d 100644 --- a/glib/glibmmconfig.h.in +++ b/glib/glibmmconfig.h.in @@ -117,23 +117,11 @@ # define GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED 1 # pragma warning (disable: 4786 4355 4800 4181) -#if (_MSC_VER < 1900) -/* The C++-11 keywords noexcept and thread_local are supported on - * Visual Studio 2013 via Microsoft-specific extensions, but are - * supported directly in Visual Studio 2015 - */ - -#define _ALLOW_KEYWORD_MACROS 1 - -#ifndef noexcept -#define noexcept _NOEXCEPT -#endif - -#ifndef thread_local -#define thread_local __declspec (thread) +/* We have GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS for Visual Studio 2017+ */ +#if (_MSC_VER >= 1910) +#define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS 1 #endif -#endif /* _MSC_VER < 1900 */ #endif /* GLIBMM_MSC */ /* Dummy macro definition for compatibility with old code that expects @@ -146,16 +134,13 @@ #endif #ifdef GLIBMM_DLL -# if defined(GLIBMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ -# define GLIBMM_API -# elif !defined(GLIBMM_BUILD) -# define GLIBMM_API __declspec(dllimport) +# if defined(GLIBMM_BUILD) +# define GLIBMM_API __declspec(dllexport) # else - /* Build a static library */ -# define GLIBMM_API +# define GLIBMM_API __declspec(dllimport) # endif /* GLIBMM_BUILD - _WINDLL */ #else +/* Build a static library or a non-native-Windows library */ # define GLIBMM_API #endif /* GLIBMM_DLL */ diff --git a/glib/glibmmconfig.h.meson b/glib/glibmmconfig.h.meson index 12e80ac6..6fff5057 100644 --- a/glib/glibmmconfig.h.meson +++ b/glib/glibmmconfig.h.meson @@ -118,27 +118,16 @@ # define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1 # define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1 # define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1 +# define GLIBMM_CAN_USE_THREAD_LOCAL 1 # define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1 # define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1 # pragma warning (disable: 4786 4355 4800 4181) -#if (_MSC_VER < 1900) -/* The C++-11 keywords noexcept and thread_local are supported on - * Visual Studio 2013 via Microsoft-specific extensions, but are - * supported directly in Visual Studio 2015 - */ - -#define _ALLOW_KEYWORD_MACROS 1 - -#ifndef noexcept -#define noexcept _NOEXCEPT -#endif - -#ifndef thread_local -#define thread_local __declspec (thread) +/* We have GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS for Visual Studio 2017+ */ +#if (_MSC_VER >= 1910) +#define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS 1 #endif -#endif /* _MSC_VER < 1900 */ #endif /* GLIBMM_MSC */ /* Enable DLL-specific stuff only when not building a static library */ @@ -147,16 +136,13 @@ #endif #ifdef GLIBMM_DLL -# if defined(GLIBMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ -# define GLIBMM_API -# elif !defined(GLIBMM_BUILD) -# define GLIBMM_API __declspec(dllimport) +# if defined(GLIBMM_BUILD) +# define GLIBMM_API __declspec(dllexport) # else - /* Build a static library */ -# define GLIBMM_API +# define GLIBMM_API __declspec(dllimport) # endif /* GLIBMM_BUILD - _WINDLL */ #else +/* Build a static library or a non-native-Windows library */ # define GLIBMM_API #endif /* GLIBMM_DLL */ diff --git a/glib/meson.build b/glib/meson.build index 1b918c00..99c43772 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -32,7 +32,16 @@ pkg_conf_data.set('GLIBMM_MICRO_VERSION', glibmm_micro_version) pkg_conf_data.set('GIOMM_MAJOR_VERSION', glibmm_major_version) pkg_conf_data.set('GIOMM_MINOR_VERSION', glibmm_minor_version) pkg_conf_data.set('GIOMM_MICRO_VERSION', glibmm_micro_version) -if get_option('default_library') == 'static' + +library_build_type = get_option('default_library') + +if cpp_compiler.get_argument_syntax() == 'msvc' + if library_build_type == 'static' or library_build_type == 'both' + error('Static builds are not supported by MSVC-style builds') + endif +endif + +if library_build_type == 'static' pkg_conf_data.set('GLIBMM_STATIC_LIB', 1) pkg_conf_data.set('GIOMM_STATIC_LIB', 1) endif diff --git a/glib/src/binding.hg b/glib/src/binding.hg index 9f192727..c8c7f35e 100644 --- a/glib/src/binding.hg +++ b/glib/src/binding.hg @@ -96,9 +96,9 @@ _WRAP_ENUM(BindingFlags, GBindingFlags, newin "2,44") * * @newin{2,44} */ -class Binding : public Glib::Object +class GLIBMM_API Binding : public Glib::Object { - _CLASS_GOBJECT(Binding, GBinding, G_BINDING, Glib::Object, GObject) + _CLASS_GOBJECT(Binding, GBinding, G_BINDING, Glib::Object, GObject, , , GLIBMM_API) public: /** A slot to be called to transform values in a binding created by diff --git a/glib/src/bytearray.hg b/glib/src/bytearray.hg index 9dac5e20..cf222b21 100644 --- a/glib/src/bytearray.hg +++ b/glib/src/bytearray.hg @@ -41,9 +41,9 @@ namespace Glib * * @newin{2,36} */ -class ByteArray final +class GLIBMM_API ByteArray final { - _CLASS_OPAQUE_REFCOUNTED(ByteArray, GByteArray, NONE, g_byte_array_ref, g_byte_array_unref) + _CLASS_OPAQUE_REFCOUNTED(ByteArray, GByteArray, NONE, g_byte_array_ref, g_byte_array_unref, GLIBMM_API) _IGNORE(g_byte_array_ref, g_byte_array_unref) public: @@ -98,7 +98,7 @@ public: #ifndef DOXYGEN_SHOULD_SKIP_THIS template <> -class Value< Glib::RefPtr<Glib::ByteArray> > : public ValueBase_Boxed +class GLIBMM_API Value< Glib::RefPtr<Glib::ByteArray> > : public ValueBase_Boxed { public: static GType value_type() { return Glib::ByteArray::get_type(); } diff --git a/glib/src/bytes.hg b/glib/src/bytes.hg index 867b99c1..dd5cc3d3 100644 --- a/glib/src/bytes.hg +++ b/glib/src/bytes.hg @@ -50,9 +50,9 @@ namespace Glib * * @newin{2,34} */ -class Bytes final +class GLIBMM_API Bytes final { - _CLASS_OPAQUE_REFCOUNTED(Bytes, GBytes, NONE, g_bytes_ref, g_bytes_unref) + _CLASS_OPAQUE_REFCOUNTED(Bytes, GBytes, NONE, g_bytes_ref, g_bytes_unref, GLIBMM_API) _IGNORE(g_bytes_ref, g_bytes_unref) public: diff --git a/glib/src/checksum.hg b/glib/src/checksum.hg index 56a6b8cc..0a78434c 100644 --- a/glib/src/checksum.hg +++ b/glib/src/checksum.hg @@ -39,9 +39,9 @@ namespace Glib * * @newin{2,16} */ -class Checksum +class GLIBMM_API Checksum { - _CLASS_OPAQUE_COPYABLE(Checksum, GChecksum, NONE, g_checksum_copy, g_checksum_free) + _CLASS_OPAQUE_COPYABLE(Checksum, GChecksum, NONE, g_checksum_copy, g_checksum_free, GLIBMM_API) _IGNORE(g_checksum_copy, g_checksum_free) public: @@ -103,7 +103,7 @@ public: #ifndef DOXYGEN_SHOULD_SKIP_THIS // This is needed so Glib::Checksum can be used with Glib::Value and _WRAP_PROPERTY. template <> -class Value<Glib::Checksum> : public ValueBase_Boxed +class GLIBMM_API Value<Glib::Checksum> : public ValueBase_Boxed { public: using CppType = Glib::Checksum; diff --git a/glib/src/convert.hg b/glib/src/convert.hg index 9c211bc9..d07e8e35 100644 --- a/glib/src/convert.hg +++ b/glib/src/convert.hg @@ -40,7 +40,7 @@ namespace Glib * you should always catch those errors, and then try to recover, or tell the * user the input was invalid. */ -_WRAP_GERROR(ConvertError, GConvertError, G_CONVERT_ERROR, NO_GTYPE) +_WRAP_GERROR(ConvertError, GConvertError, G_CONVERT_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) /** Thin %iconv() wrapper. @@ -49,7 +49,7 @@ _WRAP_GERROR(ConvertError, GConvertError, G_CONVERT_ERROR, NO_GTYPE) * creating an IConv object once and using the convert() method could * be useful when converting multiple times between the same charsets. */ -class IConv +class GLIBMM_API IConv { public: /** Open new conversion descriptor. @@ -107,12 +107,14 @@ private: /** Get the charset used by the current locale. * @return Whether the current locale uses the UTF-8 charset. */ +GLIBMM_API bool get_charset(); /** Get the charset used by the current locale. * @param charset Will be filled with the charset's name. * @return Whether the current locale uses the UTF-8 charset. */ +GLIBMM_API bool get_charset(std::string& charset); /** Convert from one encoding to another. @@ -122,6 +124,7 @@ bool get_charset(std::string& charset); * @return The converted string. * @throw Glib::ConvertError */ +GLIBMM_API std::string convert(const std::string& str, const std::string& to_codeset, const std::string& from_codeset); @@ -136,6 +139,7 @@ std::string convert(const std::string& str, * @return The converted string. * @throw Glib::ConvertError */ +GLIBMM_API std::string convert_with_fallback(const std::string& str, const std::string& to_codeset, const std::string& from_codeset); @@ -156,6 +160,7 @@ std::string convert_with_fallback(const std::string& str, * @return The converted string. * @throw Glib::ConvertError */ +GLIBMM_API std::string convert_with_fallback(const std::string& str, const std::string& to_codeset, const std::string& from_codeset, @@ -168,6 +173,7 @@ std::string convert_with_fallback(const std::string& str, * @return The input string converted to UTF-8 encoding. * @throw Glib::ConvertError */ +GLIBMM_API Glib::ustring locale_to_utf8(const std::string& opsys_string); /** Convert from UTF-8 to the current locale's encoding. @@ -177,6 +183,7 @@ Glib::ustring locale_to_utf8(const std::string& opsys_string); * system's current locale. * @throw Glib::ConvertError */ +GLIBMM_API std::string locale_from_utf8(const Glib::ustring& utf8_string); /** Converts a string which is in the encoding used for filenames into @@ -185,6 +192,7 @@ std::string locale_from_utf8(const Glib::ustring& utf8_string); * @return The converted string. * @throw Glib::ConvertError */ +GLIBMM_API Glib::ustring filename_to_utf8(const std::string& opsys_string); /** Converts a string from UTF-8 to the encoding used for filenames. @@ -192,6 +200,7 @@ Glib::ustring filename_to_utf8(const std::string& opsys_string); * @return The converted string. * @throw Glib::ConvertError */ +GLIBMM_API std::string filename_from_utf8(const Glib::ustring& utf8_string); /** Converts an escaped UTF-8 encoded URI to a local filename @@ -202,6 +211,7 @@ std::string filename_from_utf8(const Glib::ustring& utf8_string); * @return The resulting filename. * @throw Glib::ConvertError */ +GLIBMM_API std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname); /** Converts an escaped UTF-8 encoded URI to a local filename in the encoding @@ -210,6 +220,7 @@ std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname) * @return The resulting filename. * @throw Glib::ConvertError */ +GLIBMM_API std::string filename_from_uri(const Glib::ustring& uri); /** Converts an absolute filename to an escaped UTF-8 encoded URI. @@ -219,6 +230,7 @@ std::string filename_from_uri(const Glib::ustring& uri); * @return The resulting URI. * @throw Glib::ConvertError */ +GLIBMM_API Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname); /** Converts an absolute filename to an escaped UTF-8 encoded URI. @@ -227,6 +239,7 @@ Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& * @return The resulting URI. * @throw Glib::ConvertError */ +GLIBMM_API Glib::ustring filename_to_uri(const std::string& filename); /** Returns the display basename for the particular filename, guaranteed @@ -243,6 +256,7 @@ Glib::ustring filename_to_uri(const std::string& filename); * @param filename An absolute pathname in the GLib file name encoding. * @result A string containing a rendition of the basename of the filename in valid UTF-8 */ +GLIBMM_API Glib::ustring filename_display_basename(const std::string& filename); /** Converts a filename into a valid UTF-8 string. The @@ -260,6 +274,7 @@ Glib::ustring filename_display_basename(const std::string& filename); * @param filename: a pathname hopefully in the GLib file name encoding * @result A string containing a rendition of the filename in valid UTF-8. */ +GLIBMM_API Glib::ustring filename_display_name(const std::string& filename); /** @} group CharsetConv */ diff --git a/glib/src/date.hg b/glib/src/date.hg index 12728311..c1ec4a05 100644 --- a/glib/src/date.hg +++ b/glib/src/date.hg @@ -30,7 +30,7 @@ namespace Glib /** Julian calendar date. */ -class Date +class GLIBMM_API Date { public: using Day = guint8 ; diff --git a/glib/src/datetime.hg b/glib/src/datetime.hg index 280df71a..ff62b529 100644 --- a/glib/src/datetime.hg +++ b/glib/src/datetime.hg @@ -60,9 +60,9 @@ using TimeSpan = GTimeSpan; * in length). * @newin{2,30} */ -class DateTime +class GLIBMM_API DateTime { - _CLASS_OPAQUE_COPYABLE(DateTime, GDateTime, NONE, g_date_time_ref, g_date_time_unref) + _CLASS_OPAQUE_COPYABLE(DateTime, GDateTime, NONE, g_date_time_ref, g_date_time_unref, GLIBMM_API) _IGNORE(g_date_time_ref, g_date_time_unref) public: @@ -173,7 +173,7 @@ public: #ifndef DOXYGEN_SHOULD_SKIP_THIS // This is needed so Glib::DateTime can be used with Glib::Value and _WRAP_PROPERTY. template <> -class Value<Glib::DateTime> : public ValueBase_Boxed +class GLIBMM_API Value<Glib::DateTime> : public ValueBase_Boxed { public: using CppType = Glib::DateTime; diff --git a/glib/src/fileutils.hg b/glib/src/fileutils.hg index c6e73ede..46b6f540 100644 --- a/glib/src/fileutils.hg +++ b/glib/src/fileutils.hg @@ -59,7 +59,8 @@ _WRAP_GERROR(FileError, GFileError, G_FILE_ERROR, NO_GTYPE, s#^AGAIN$#TRYAGAIN#, s#^INTR$#INTERRUPTED#, s#^IO$#IO_ERROR#, - s#^PERM$#NOT_OWNER# + s#^PERM$#NOT_OWNER#, + decl_prefix GLIBMM_API ) /** @enum FileError::Code @@ -204,12 +205,12 @@ _WRAP_GERROR(FileError, GFileError, G_FILE_ERROR, NO_GTYPE, * enumerations. Returned if no specific code applies. */ -class Dir; +class GLIBMM_API Dir; /** The iterator type of Glib::Dir. * @ingroup FileUtils */ -class DirIterator +class GLIBMM_API DirIterator { public: typedef std::input_iterator_tag iterator_category; @@ -253,7 +254,7 @@ private: * @note The encoding of the directory entries isn't necessarily UTF-8. * Use Glib::filename_to_utf8() if you need to display them. */ -class Dir +class GLIBMM_API Dir { public: using iterator = DirIterator; @@ -330,6 +331,7 @@ private: * @param test Bitfield of Glib::FileTest flags. * @return Whether a test was true. */ +GLIBMM_API bool file_test(const std::string& filename, FileTest test); /** Opens a temporary file. @@ -345,6 +347,7 @@ bool file_test(const std::string& filename, FileTest test); * is a difference. The file handle should be closed with close(). In * case of errors, <tt>-1</tt> is returned. */ +GLIBMM_API int mkstemp(std::string& filename_template); /** Opens a file for writing in the preferred directory for temporary files @@ -362,6 +365,7 @@ int mkstemp(std::string& filename_template); * difference. The file handle should be closed with <tt>close()</tt>. * @throw Glib::FileError */ +GLIBMM_API int file_open_tmp(std::string& name_used, const std::string& prefix); /** Opens a file for writing in the preferred directory for temporary files @@ -376,6 +380,7 @@ int file_open_tmp(std::string& name_used, const std::string& prefix); * difference. The file handle should be closed with <tt>close()</tt>. * @throw Glib::FileError */ +GLIBMM_API int file_open_tmp(std::string& name_used); /** Reads an entire file into a string, with good error checking. @@ -384,6 +389,7 @@ int file_open_tmp(std::string& name_used); * @return The file contents. * @throw Glib::FileError */ +GLIBMM_API std::string file_get_contents(const std::string& filename); /** Writes all of @a contents to a file named @a filename, with good error checking. @@ -421,11 +427,13 @@ std::string file_get_contents(const std::string& filename); * * @newin{2,22} **/ +GLIBMM_API void file_set_contents (const std::string& filename, const gchar *contents, gssize length); /** A variant of file_set_contents which accepts a standard C++ string * * @newin{2,22} * */ +GLIBMM_API void file_set_contents (const std::string& filename, const std::string& contents); } // namespace Glib diff --git a/glib/src/iochannel.hg b/glib/src/iochannel.hg index 00e49e36..84120e47 100644 --- a/glib/src/iochannel.hg +++ b/glib/src/iochannel.hg @@ -31,8 +31,8 @@ extern "C" { typedef struct _GIOChannel GIOChannel; } namespace Glib { -class Source; -class IOSource; +class GLIBMM_API Source; +class GLIBMM_API IOSource; _WRAP_ENUM(SeekType, GSeekType, NO_GTYPE, s#^SEEK_#SEEK_TYPE_#) _WRAP_ENUM(IOStatus, GIOStatus, NO_GTYPE) @@ -62,10 +62,11 @@ _WRAP_GERROR(IOChannelError, GIOChannelError, G_IO_CHANNEL_ERROR, NO_GTYPE, s#^ACCES$#ACCESS_DENIED#, s#^FBIG$#FILE_TOO_BIG#, s#^IO$#IO_ERROR#, - s#^OVERFLOW$#OVERFLOWN#) + s#^OVERFLOW$#OVERFLOWN#, + decl_prefix GLIBMM_API) #ifndef DOXYGEN_SHOULD_SKIP_THIS -class GlibmmIOChannel; +class GLIBMM_API GlibmmIOChannel; #endif /** IOChannel aims to provide portable I/O support for files, pipes @@ -79,7 +80,7 @@ class GlibmmIOChannel; * * You can create an IOChannel with one of the static create methods. */ -class IOChannel : public sigc::trackable +class GLIBMM_API IOChannel : public sigc::trackable { _CLASS_GENERIC(IOChannel, GIOChannel) @@ -477,6 +478,7 @@ private: void release_gobject(); }; +GLIBMM_API Glib::RefPtr<IOChannel> wrap(GIOChannel* gobject, bool take_copy = false); } // namespace Glib diff --git a/glib/src/keyfile.hg b/glib/src/keyfile.hg index 899ebf24..60afd904 100644 --- a/glib/src/keyfile.hg +++ b/glib/src/keyfile.hg @@ -34,7 +34,7 @@ namespace Glib /** Exception class for KeyFile errors. */ -_WRAP_GERROR(KeyFileError, GKeyFileError, G_KEY_FILE_ERROR, NO_GTYPE) +_WRAP_GERROR(KeyFileError, GKeyFileError, G_KEY_FILE_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) /** This class lets you parse, edit or create files containing groups of key-value pairs, which we call key files * for lack of a better name. Several freedesktop.org specifications use key files now, e.g the Desktop Entry @@ -91,7 +91,7 @@ _WRAP_GERROR(KeyFileError, GKeyFileError, G_KEY_FILE_ERROR, NO_GTYPE) * * @newin{2,14} */ -class KeyFile +class GLIBMM_API KeyFile { _CLASS_GENERIC(KeyFile, GKeyFile) public: diff --git a/glib/src/markup.hg b/glib/src/markup.hg index bd1d24b6..2bd258ce 100644 --- a/glib/src/markup.hg +++ b/glib/src/markup.hg @@ -63,7 +63,7 @@ namespace Glib /** %Exception class for markup parsing errors. */ -_WRAP_GERROR(MarkupError, GMarkupError, G_MARKUP_ERROR, NO_GTYPE) +_WRAP_GERROR(MarkupError, GMarkupError, G_MARKUP_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) /*! @var MarkupError::Code MarkupError::BAD_UTF8 * Text being parsed was not valid UTF-8. @@ -93,7 +93,7 @@ _WRAP_GERROR(MarkupError, GMarkupError, G_MARKUP_ERROR, NO_GTYPE) namespace Markup { -class ParseContext; +class GLIBMM_API ParseContext; /** @ingroup Markup */ using Error = Glib::MarkupError; @@ -107,6 +107,7 @@ using Error = Glib::MarkupError; * @param text Some valid UTF-8 text. * @return Escaped text. */ +GLIBMM_API Glib::ustring escape_text(const Glib::ustring& text); @@ -128,7 +129,7 @@ _WRAP_ENUM(ParseFlags, GMarkupParseFlags, NO_GTYPE, s#^MARKUP_##) * the AttributeKeyLess predicate is locale-independent. This is both * more correct and much more efficient. */ -class AttributeKeyLess +class GLIBMM_API AttributeKeyLess { public: using first_argument_type = Glib::ustring; @@ -157,7 +158,7 @@ class ParserCallbacks; * error from a method, Glib::Markup::ParseContext::parse() will report that * error back to its caller. */ -class Parser : public sigc::trackable +class GLIBMM_API Parser : public sigc::trackable { public: typedef std::map<Glib::ustring, Glib::ustring, Glib::Markup::AttributeKeyLess> AttributeMap; @@ -253,7 +254,7 @@ private: * occur; once an error occurs, the parse context can't continue to parse text * (you have to destroy it and create a new parse context). */ -class ParseContext : public sigc::trackable +class GLIBMM_API ParseContext : public sigc::trackable { public: /** Creates a new parse context. diff --git a/glib/src/miscutils.hg b/glib/src/miscutils.hg index 5b0ba58c..75c3288f 100644 --- a/glib/src/miscutils.hg +++ b/glib/src/miscutils.hg @@ -40,6 +40,7 @@ _WRAP_ENUM(FormatSizeFlags, GFormatSizeFlags, NO_GTYPE) * * @return Human-readable application name. May return <tt>""</tt>. */ +GLIBMM_API Glib::ustring get_application_name(); /** Sets a human-readable name for the application. @@ -55,6 +56,7 @@ Glib::ustring get_application_name(); * * @param application_name Localized name of the application. */ +GLIBMM_API void set_application_name(const Glib::ustring& application_name); /** Gets the name of the program. @@ -68,11 +70,13 @@ void set_application_name(const Glib::ustring& application_name); * * @return The name of the program. */ +GLIBMM_API std::string get_prgname(); /** Sets the name of the program. * @param prgname The name of the program. */ +GLIBMM_API void set_prgname(const std::string& prgname); /** Returns the value of an environment variable. The name and value @@ -86,6 +90,7 @@ void set_prgname(const std::string& prgname); * @param[out] found Whether the environment variable has been found. * @return The value of the environment variable, or <tt>""</tt> if not found. */ +GLIBMM_API std::string getenv(const std::string& variable, bool& found); /** Returns the value of an environment variable. The name and value @@ -98,6 +103,7 @@ std::string getenv(const std::string& variable, bool& found); * @param variable The environment variable to get. * @return The value of the environment variable, or <tt>""</tt> if not found. */ +GLIBMM_API std::string getenv(const std::string& variable); @@ -114,6 +120,7 @@ std::string getenv(const std::string& variable); * @param overwrite Whether to change the variable if it already exists. * @result false if the environment variable couldn't be set. */ +GLIBMM_API bool setenv(const std::string& variable, const std::string& value, bool overwrite = true); /** Removes an environment variable from the environment. @@ -125,6 +132,7 @@ bool setenv(const std::string& variable, const std::string& value, bool overwrit * * @param variable: the environment variable to remove. It must not contain '='. **/ +GLIBMM_API void unsetenv(const std::string& variable); /** Gets the names of all variables set in the environment. @@ -139,6 +147,7 @@ void unsetenv(const std::string& variable); * @return Array of environment names (The generic ArrayHandle will be * implicitly converted to any STL compatible container type). */ +GLIBMM_API Glib::ArrayHandle<std::string> listenv(); /** Gets the user name of the current user. @@ -150,6 +159,7 @@ Glib::ArrayHandle<std::string> listenv(); * * @return The name of the current user. */ +GLIBMM_API std::string get_user_name(); /** Gets the real name of the current user. @@ -161,11 +171,13 @@ std::string get_user_name(); * * @return The current user's real name. */ +GLIBMM_API std::string get_real_name(); /** Gets the current user's home directory. * @return The current user's home directory or an empty string if not defined. */ +GLIBMM_API std::string get_home_dir(); /** Gets the directory to use for temporary files. @@ -174,11 +186,13 @@ std::string get_home_dir(); * <tt>"/tmp"</tt> is returned on UNIX and <tt>"C:\\"</tt> on Windows. * @return The directory to use for temporary files. */ +GLIBMM_API std::string get_tmp_dir(); /** Gets the current directory. * @return The current directory. */ +GLIBMM_API std::string get_current_dir(); #ifndef GLIBMM_DISABLE_DEPRECATED @@ -200,6 +214,7 @@ std::string get_current_dir(); * @newin{2,14} * @deprecated Use get_user_special_dir(Glib::UserDirectory directory) instead. */ +GLIBMM_API std::string get_user_special_dir(GUserDirectory directory); #endif // GLIBMM_DISABLE_DEPRECATED @@ -220,6 +235,7 @@ std::string get_user_special_dir(GUserDirectory directory); * * @newin{2,46} */ +GLIBMM_API std::string get_user_special_dir(UserDirectory directory); /** Returns a base directory in which to access application data such as icons @@ -230,6 +246,7 @@ std::string get_user_special_dir(UserDirectory directory); * * @newin{2,14} */ +GLIBMM_API std::string get_user_data_dir(); /** Returns a base directory in which to store user-specific application @@ -240,6 +257,7 @@ std::string get_user_data_dir(); * * @newin{2,14} */ +GLIBMM_API std::string get_user_config_dir(); /** Returns an ordered list of base directories in which to access system-wide application data. @@ -247,6 +265,7 @@ std::string get_user_config_dir(); * * @newin{2,18} */ +GLIBMM_API std::vector<std::string> get_system_data_dirs(); /** Returns an ordered list of base directories in which to access system-wide configuration information. @@ -254,6 +273,7 @@ std::vector<std::string> get_system_data_dirs(); * * @newin{2,18} */ +GLIBMM_API std::vector<std::string> get_system_config_dirs(); /** Returns a base directory in which to store non-essential, cached data @@ -264,6 +284,7 @@ std::vector<std::string> get_system_config_dirs(); * * @newin{2,14} */ +GLIBMM_API std::string get_user_cache_dir(); /** Returns @c true if the given @a filename is an absolute file name, i.e.\ it @@ -272,6 +293,7 @@ std::string get_user_cache_dir(); * @param filename A file name. * @return Whether @a filename is an absolute path. */ +GLIBMM_API bool path_is_absolute(const std::string& filename); /** Returns the remaining part of @a filename after the root component, @@ -280,12 +302,14 @@ bool path_is_absolute(const std::string& filename); * @param filename A file name. * @return The file name without the root component, or <tt>""</tt>. */ +GLIBMM_API std::string path_skip_root(const std::string& filename); /** Gets the name of the file without any leading directory components. * @param filename The name of the file. * @return The name of the file without any leading directory components. */ +GLIBMM_API std::string path_get_basename(const std::string& filename); /** Gets the directory components of a file name. @@ -293,6 +317,7 @@ std::string path_get_basename(const std::string& filename); * @param filename The name of the file. * @return The directory components of the file. */ +GLIBMM_API std::string path_get_dirname(const std::string& filename); /** Creates a filename from a series of elements using the correct @@ -305,6 +330,7 @@ std::string path_get_dirname(const std::string& filename); * Any STL compatible container type is accepted. * @return The resulting path. */ +GLIBMM_API std::string build_filename(const Glib::ArrayHandle<std::string>& elements); /** Creates a filename from two elements using the correct separator for filenames. @@ -314,6 +340,7 @@ std::string build_filename(const Glib::ArrayHandle<std::string>& elements); * @param elem2 Second path element. * @return The resulting path. */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2); /** Creates a filename from three elements using the correct separator for filenames. @@ -326,6 +353,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2); * * @newin{2,28} */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2, const std::string& elem3); @@ -341,6 +369,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2, * * @newin{2,28} */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2, const std::string& elem3, const std::string& elem4); @@ -354,6 +383,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2, * @param elem5 Fifth path element. * @return The resulting path. */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2, const std::string& elem3, const std::string& elem4, const std::string& elem5); @@ -371,6 +401,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2, * * @newin{2,28} */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2, const std::string& elem3, const std::string& elem4, const std::string& elem5, const std::string& elem6); @@ -389,6 +420,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2, * * @newin{2,28} */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2, const std::string& elem3, const std::string& elem4, const std::string& elem5, const std::string& elem6, @@ -409,6 +441,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2, * * @newin{2,28} */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2, const std::string& elem3, const std::string& elem4, const std::string& elem5, const std::string& elem6, @@ -430,6 +463,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2, * * @newin{2,28} */ +GLIBMM_API std::string build_filename(const std::string& elem1, const std::string& elem2, const std::string& elem3, const std::string& elem4, const std::string& elem5, const std::string& elem6, @@ -470,6 +504,7 @@ std::string build_filename(const std::string& elem1, const std::string& elem2, * Any STL compatible container type is accepted. * @return The resulting path. */ +GLIBMM_API std::string build_path(const std::string& separator, const Glib::ArrayHandle<std::string>& elements); @@ -493,6 +528,7 @@ std::string build_path(const std::string& separator, * @param program A program name. * @return An absolute path, or <tt>""</tt>. */ +GLIBMM_API std::string find_program_in_path(const std::string& program); /** Formats a size (for example the size of a file) into a human readable string. @@ -510,6 +546,7 @@ std::string find_program_in_path(const std::string& program); * * @newin{2,46} */ +GLIBMM_API Glib::ustring format_size(guint64 size, FormatSizeFlags flags = FORMAT_SIZE_DEFAULT); /** @} group MiscUtils */ diff --git a/glib/src/module.hg b/glib/src/module.hg index ecfb2020..e0e23aa8 100644 --- a/glib/src/module.hg +++ b/glib/src/module.hg @@ -37,7 +37,7 @@ _WRAP_ENUM(ModuleFlags, GModuleFlags, NO_GTYPE) * (e.g. Linux/Sun), as well as HP-UX via its shl_load() mechanism, * and Windows platforms via DLLs. */ -class Module +class GLIBMM_API Module { _CLASS_GENERIC(Module, GModule) _IGNORE(g_module_open, g_module_close) diff --git a/glib/src/optioncontext.hg b/glib/src/optioncontext.hg index 7c665913..7fdfcccd 100644 --- a/glib/src/optioncontext.hg +++ b/glib/src/optioncontext.hg @@ -31,7 +31,7 @@ namespace Glib /** Exception class for options. */ -_WRAP_GERROR(OptionError, GOptionError, G_OPTION_ERROR, NO_GTYPE) +_WRAP_GERROR(OptionError, GOptionError, G_OPTION_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) /** An OptionContext defines and parses commandline options, using OptionGroup%s and \link OptionEntry option entries \endlink. * @@ -83,7 +83,7 @@ _WRAP_GERROR(OptionError, GOptionError, G_OPTION_ERROR, NO_GTYPE) * * */ -class OptionContext +class GLIBMM_API OptionContext { _CLASS_GENERIC(OptionContext, GOptionContext) _IGNORE(g_option_context_free) diff --git a/glib/src/optionentry.hg b/glib/src/optionentry.hg index d1f1ecce..ff177253 100644 --- a/glib/src/optionentry.hg +++ b/glib/src/optionentry.hg @@ -39,7 +39,7 @@ namespace Glib * * The arg_descripton is the placeholder to use for the extra argument parsed by the option in --help output. */ -class OptionEntry +class GLIBMM_API OptionEntry { _CLASS_GENERIC(OptionEntry, GOptionEntry) public: diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg index c1c8b404..e491f306 100644 --- a/glib/src/optiongroup.hg +++ b/glib/src/optiongroup.hg @@ -32,8 +32,8 @@ namespace Glib { #ifndef DOXYGEN_SHOULD_SKIP_THIS -class OptionEntry; -class OptionContext; +class GLIBMM_API OptionEntry; +class GLIBMM_API OptionContext; #endif //DOXYGEN_SHOULD_SKIP_THIS //TODO: GOptionGroup is now refcounted. See https://bugzilla.gnome.org/show_bug.cgi?id=743349 @@ -42,7 +42,7 @@ class OptionContext; * Libraries which need to parse commandline options are expected to provide a function that allows their OptionGroups to * be added to the application's OptionContext. */ -class OptionGroup +class GLIBMM_API OptionGroup { _CLASS_GENERIC(OptionGroup, GOptionGroup) public: diff --git a/glib/src/regex.hg b/glib/src/regex.hg index 1b9eb443..514b990d 100644 --- a/glib/src/regex.hg +++ b/glib/src/regex.hg @@ -35,10 +35,10 @@ _WRAP_ENUM(RegexMatchFlags, GRegexMatchFlags, NO_GTYPE) /** Exception class for Regex */ -_WRAP_GERROR(RegexError, GRegexError, G_REGEX_ERROR, NO_GTYPE) +_WRAP_GERROR(RegexError, GRegexError, G_REGEX_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) -class MatchInfo; +class GLIBMM_API MatchInfo; /** Perl-compatible regular expressions - matches strings against regular expressions. * @@ -104,9 +104,9 @@ class MatchInfo; * * @newin{2,14} */ -class Regex final +class GLIBMM_API Regex final { - _CLASS_OPAQUE_REFCOUNTED(Regex, GRegex, NONE, g_regex_ref, g_regex_unref) + _CLASS_OPAQUE_REFCOUNTED(Regex, GRegex, NONE, g_regex_ref, g_regex_unref, GLIBMM_API) _IGNORE(g_regex_ref, g_regex_unref) public: @@ -232,7 +232,7 @@ public: * expression match which created it. * @newin{2,28} */ -class MatchInfo +class GLIBMM_API MatchInfo { _CLASS_GENERIC(MatchInfo, GMatchInfo) _IGNORE(g_match_info_ref, g_match_info_unref, g_match_info_free) diff --git a/glib/src/shell.hg b/glib/src/shell.hg index 6f0e2fce..737b6ade 100644 --- a/glib/src/shell.hg +++ b/glib/src/shell.hg @@ -31,7 +31,7 @@ namespace Glib /** Exception class for shell utility errors. */ -_WRAP_GERROR(ShellError, GShellError, G_SHELL_ERROR, NO_GTYPE) +_WRAP_GERROR(ShellError, GShellError, G_SHELL_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) /** Parses a command line into an argument vector, in much the same way the @@ -46,6 +46,7 @@ _WRAP_GERROR(ShellError, GShellError, G_SHELL_ERROR, NO_GTYPE) * converted to any STL compatible container type). * @throw Glib::ShellError */ +GLIBMM_API Glib::ArrayHandle<std::string> shell_parse_argv(const std::string& command_line); /** Quotes a string so that the shell (/bin/sh) will interpret the quoted @@ -55,6 +56,7 @@ Glib::ArrayHandle<std::string> shell_parse_argv(const std::string& command_line) * @param unquoted_string A literal string. * @return A quoted string. */ +GLIBMM_API std::string shell_quote(const std::string& unquoted_string); /** Unquotes a string as the shell (/bin/sh) would. Only handles quotes; if @@ -80,6 +82,7 @@ std::string shell_quote(const std::string& unquoted_string); * @return An unquoted string. * @throw Glib::ShellError */ +GLIBMM_API std::string shell_unquote(const std::string& quoted_string); /** @} group ShellUtils */ diff --git a/glib/src/spawn.hg b/glib/src/spawn.hg index 785665aa..c40dc71a 100644 --- a/glib/src/spawn.hg +++ b/glib/src/spawn.hg @@ -36,7 +36,7 @@ _WRAP_ENUM(SpawnFlags, GSpawnFlags, NO_GTYPE) /** %Exception class for errors occuring when spawning processes. */ -_WRAP_GERROR(SpawnError, GSpawnError, G_SPAWN_ERROR, NO_GTYPE, s#^2BIG$#TOOBIG#) +_WRAP_GERROR(SpawnError, GSpawnError, G_SPAWN_ERROR, NO_GTYPE, s#^2BIG$#TOOBIG#, decl_prefix GLIBMM_API) /** For instance,<br> * void on_child_setup(); @@ -191,6 +191,7 @@ using SlotSpawnChildSetup = sigc::slot<void>; * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output, * and @a standard_error will not be filled with valid values. */ +GLIBMM_API void spawn_async_with_pipes(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, const Glib::ArrayHandle<std::string>& envp, @@ -218,6 +219,7 @@ void spawn_async_with_pipes(const std::string& working_directory, * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output, * and @a standard_error will not be filled with valid values. */ +GLIBMM_API void spawn_async_with_pipes(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, SpawnFlags flags = SPAWN_DEFAULT, @@ -248,6 +250,7 @@ void spawn_async_with_pipes(const std::string& working_directory, * the message field of returned errors should be displayed * to users. */ +GLIBMM_API void spawn_async(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, const Glib::ArrayHandle<std::string>& envp, @@ -268,6 +271,7 @@ void spawn_async(const std::string& working_directory, * the message field of returned errors should be displayed * to users. */ +GLIBMM_API void spawn_async(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, SpawnFlags flags = SPAWN_DEFAULT, @@ -306,6 +310,7 @@ void spawn_async(const std::string& working_directory, * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output, * and @a standard_error will not be filled with valid values. */ +GLIBMM_API void spawn_sync(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, const Glib::ArrayHandle<std::string>& envp, @@ -331,6 +336,7 @@ void spawn_sync(const std::string& working_directory, * to users. If an error occurs, @a child_pid, @a standard_input, @a standard_output, * and @a standard_error will not be filled with valid values. */ +GLIBMM_API void spawn_sync(const std::string& working_directory, const Glib::ArrayHandle<std::string>& argv, SpawnFlags flags = SPAWN_DEFAULT, @@ -356,6 +362,7 @@ void spawn_sync(const std::string& working_directory, * to users. * @throws ShellError If the command line could not be parsed. */ +GLIBMM_API void spawn_command_line_async(const std::string& command_line); /** A simple version of spawn_sync() with little-used parameters @@ -391,6 +398,7 @@ void spawn_command_line_async(const std::string& command_line); * to users. * @throws ShellError If the command line could not be parsed. */ +GLIBMM_API void spawn_command_line_sync(const std::string& command_line, std::string* standard_output = nullptr, std::string* standard_error = nullptr, @@ -403,6 +411,7 @@ void spawn_command_line_sync(const std::string& command_line, * * @param pid The process identifier to close. */ +GLIBMM_API void spawn_close_pid(Pid pid); /** @} group Spawn */ diff --git a/glib/src/thread.hg b/glib/src/thread.hg index c98a06ea..7c628b9c 100644 --- a/glib/src/thread.hg +++ b/glib/src/thread.hg @@ -127,18 +127,18 @@ enum NotLock { NOT_LOCK }; */ enum TryLock { TRY_LOCK }; -class Mutex; -class RecMutex; -class RWLock; +class GLIBMM_API Mutex; +class GLIBMM_API RecMutex; +class GLIBMM_API RWLock; -struct StaticRecMutex; -struct StaticRWLock; +struct GLIBMM_API StaticRecMutex; +struct GLIBMM_API StaticRWLock; /** Exception class for thread-related errors. * @deprecated Use Glib::Threads::ThreadError instead. */ -_WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE) +_WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) /** Represents a running thread. @@ -160,7 +160,7 @@ _WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE) * * @deprecated Use Glib::Threads::Thread instead. */ -class Thread +class GLIBMM_API Thread { public: @@ -306,7 +306,7 @@ private: * * @deprecated Use Glib::Threads::Thread::Exit instead. */ -class Thread::Exit +class GLIBMM_API Thread::Exit {}; @@ -368,7 +368,7 @@ struct StaticMutex * * @deprecated Use Glib::Threads::Mutex instead. */ -class Mutex +class GLIBMM_API Mutex { public: class Lock; @@ -423,7 +423,7 @@ private: * * @deprecated Use Glib::Threads::Mutex::Lock instead. */ -class Mutex::Lock +class GLIBMM_API Mutex::Lock { public: explicit inline Lock(Mutex& mutex); @@ -479,7 +479,7 @@ struct StaticRecMutex * * @deprecated Use Glib::Threads::RecMutex instead. */ -class RecMutex : public StaticRecMutex +class GLIBMM_API RecMutex : public StaticRecMutex { public: class Lock; @@ -497,7 +497,7 @@ private: * * @deprecated Use Glib::Threads::RecMutex instead. */ -class RecMutex::Lock +class GLIBMM_API RecMutex::Lock { public: explicit inline Lock(RecMutex& mutex); @@ -556,7 +556,7 @@ struct StaticRWLock * * @deprecated Use Glib::Threads::RWLock instead. */ -class RWLock : public StaticRWLock +class GLIBMM_API RWLock : public StaticRWLock { public: class ReaderLock; @@ -574,7 +574,7 @@ public: * * @deprecated Use Glib::Threads::RWLock::ReaderLock instead. */ -class RWLock::ReaderLock +class GLIBMM_API RWLock::ReaderLock { public: explicit inline ReaderLock(RWLock& rwlock); @@ -600,7 +600,7 @@ private: * * @deprecated Use Glib::Threads::RWLock::WriterLock instead. */ -class RWLock::WriterLock +class GLIBMM_API RWLock::WriterLock { public: explicit inline WriterLock(RWLock& rwlock); @@ -656,7 +656,7 @@ private: * * @deprecated Use Glib::Threads::Cond instead. */ -class Cond +class GLIBMM_API Cond { public: Cond(); diff --git a/glib/src/threads.hg b/glib/src/threads.hg index c82a6130..99ecbb32 100644 --- a/glib/src/threads.hg +++ b/glib/src/threads.hg @@ -59,15 +59,15 @@ enum NotLock { NOT_LOCK }; /// @deprecated Please use std::lock_guard or std::unique_lock instead. enum TryLock { TRY_LOCK }; -class Mutex; -class RecMutex; -class RWLock; +class GLIBMM_API Mutex; +class GLIBMM_API RecMutex; +class GLIBMM_API RWLock; /** %Exception class for thread-related errors. * * @deprecated Please use std::lock_guard or std::unique_lock instead. */ -_WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE) +_WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) /** Represents a running thread. @@ -87,7 +87,7 @@ _WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE) * * @deprecated Please use std::thread instead. */ -class Thread +class GLIBMM_API Thread { public: @@ -185,7 +185,7 @@ private: * * @deprecated Please use std::thread instead. */ -class Thread::Exit +class GLIBMM_API Thread::Exit {}; /** A C++ wrapper for the C object. @@ -210,7 +210,7 @@ Thread* wrap(GThread* gobject); * * @deprecated Please use std::mutex instead. */ -class Mutex +class GLIBMM_API Mutex { public: class Lock; @@ -265,7 +265,7 @@ private: * * @deprecated Please use std::lock_guard or std::unique_lock instead. */ -class Mutex::Lock +class GLIBMM_API Mutex::Lock { public: explicit inline Lock(Mutex& mutex); @@ -307,7 +307,7 @@ Mutex* wrap(GMutex* gobject); * * @deprecated Please use std::recursive_mutex instead. */ -class RecMutex +class GLIBMM_API RecMutex { public: class Lock; @@ -333,7 +333,7 @@ private: * * @deprecated Please use std::lock_guard or std::unique_lock instead. */ -class RecMutex::Lock +class GLIBMM_API RecMutex::Lock { public: explicit inline Lock(RecMutex& mutex); @@ -380,7 +380,7 @@ RecMutex* wrap(GRecMutex* gobject); * * @deprecated Please use std::lock_guard or std::unique_lock instead, with std::shared_timed_mutex. */ -class RWLock +class GLIBMM_API RWLock { public: class ReaderLock; @@ -411,7 +411,7 @@ private: * * @deprecated Please use std::lock_guard or std::unique_lock instead, with std::shared_timed_mutex. */ -class RWLock::ReaderLock +class GLIBMM_API RWLock::ReaderLock { public: explicit inline ReaderLock(RWLock& rwlock); @@ -437,7 +437,7 @@ private: * * @deprecated Please use std::lock_guard or std::unique_lock instead, with std::shared_timed_mutex. */ -class RWLock::WriterLock +class GLIBMM_API RWLock::WriterLock { public: explicit inline WriterLock(RWLock& rwlock); @@ -494,7 +494,7 @@ private: * } * @endcode */ -class Cond +class GLIBMM_API Cond { public: Cond(); diff --git a/glib/src/timezone.hg b/glib/src/timezone.hg index cc6105ad..35fe8586 100644 --- a/glib/src/timezone.hg +++ b/glib/src/timezone.hg @@ -54,9 +54,9 @@ _WRAP_ENUM(TimeType, GTimeType, NO_GTYPE) * changing. * @newin{2,30} */ -class TimeZone +class GLIBMM_API TimeZone { - _CLASS_OPAQUE_COPYABLE(TimeZone, GTimeZone, NONE, g_time_zone_ref, g_time_zone_unref) + _CLASS_OPAQUE_COPYABLE(TimeZone, GTimeZone, NONE, g_time_zone_ref, g_time_zone_unref, GLIBMM_API) _IGNORE(g_time_zone_ref, g_time_zone_unref) public: diff --git a/glib/src/uriutils.hg b/glib/src/uriutils.hg index 05358a46..7078a7d8 100644 --- a/glib/src/uriutils.hg +++ b/glib/src/uriutils.hg @@ -42,6 +42,7 @@ namespace Glib * @ingroup UriUtils * @newin{2,16} */ +GLIBMM_API std::string uri_unescape_string(const std::string& escaped_string, const std::string& illegal_characters = std::string()); //TODO: Use iterator? @@ -61,6 +62,7 @@ std::string uri_unescape_string(const std::string& escaped_string, const std::st * @ingroup UriUtils * @newin{2,16} */ +GLIBMM_API std::string uri_parse_scheme(const std::string& uri); /** Escapes a string for use in a URI. @@ -80,6 +82,7 @@ std::string uri_parse_scheme(const std::string& uri); * @ingroup UriUtils * @newin{2,16} */ +GLIBMM_API std::string uri_escape_string(const std::string& unescaped, const std::string& reserved_chars_allowed = std::string(), bool allow_utf8 = true); } // namespace Glib diff --git a/glib/src/value_basictypes.h.m4 b/glib/src/value_basictypes.h.m4 index 5381b8bd..8cd90e77 100644 --- a/glib/src/value_basictypes.h.m4 +++ b/glib/src/value_basictypes.h.m4 @@ -29,7 +29,7 @@ LINE(]__line__[)dnl * @ingroup glibmmValue */ template <> -class Value<$1> : public ValueBase +class GLIBMM_API Value<$1> : public ValueBase { public: using CppType = $1; diff --git a/glib/src/valuearray.hg b/glib/src/valuearray.hg index 1e9bed08..326079cc 100644 --- a/glib/src/valuearray.hg +++ b/glib/src/valuearray.hg @@ -42,9 +42,9 @@ namespace Glib * @deprecated Use std::vector<Glib::ValueBase*> or std::vector< Glib::Value<> > * instead of Glib::ValueArray. */ -class ValueArray +class GLIBMM_API ValueArray { - _CLASS_BOXEDTYPE(ValueArray, GValueArray, NONE, g_value_array_copy, g_value_array_free) + _CLASS_BOXEDTYPE(ValueArray, GValueArray, NONE, g_value_array_copy, g_value_array_free, GLIBMM_API) _IGNORE(g_value_array_copy, g_value_array_free) _CUSTOM_DEFAULT_CTOR diff --git a/glib/src/variant.hg b/glib/src/variant.hg index 74f080cc..807e52ef 100644 --- a/glib/src/variant.hg +++ b/glib/src/variant.hg @@ -72,7 +72,7 @@ class Bytes; // Now (2014-01-30) it's also thrown by Gio::Action::parse_detailed_name(). /** %Exception class for Variant parse errors. */ -_WRAP_GERROR(VariantParseError, GVariantParseError, G_VARIANT_PARSE_ERROR, NO_GTYPE) +_WRAP_GERROR(VariantParseError, GVariantParseError, G_VARIANT_PARSE_ERROR, NO_GTYPE, decl_prefix GLIBMM_API) //TODO: Add this documentation from the API if we are confident of it for the C++ wrapper: // #GVariant is completely threadsafe. A #GVariant instance can be @@ -90,9 +90,9 @@ _WRAP_GERROR(VariantParseError, GVariantParseError, G_VARIANT_PARSE_ERROR, NO_GT * @newin{2,28} * @ingroup Variant */ -class VariantBase +class GLIBMM_API VariantBase { - _CLASS_OPAQUE_COPYABLE(VariantBase, GVariant, NONE, g_variant_ref_sink, g_variant_unref) + _CLASS_OPAQUE_COPYABLE(VariantBase, GVariant, NONE, g_variant_ref_sink, g_variant_unref, GLIBMM_API) _CUSTOM_CTOR_CAST() _IGNORE(g_variant_ref, g_variant_ref_sink, g_variant_take_ref, g_variant_unref, g_variant_get, g_variant_get_va) @@ -293,7 +293,7 @@ V_CastTo VariantBase::cast_dynamic(const VariantBase& v) * @newin{2,28} * @ingroup Variant */ -class VariantStringBase : public VariantBase +class GLIBMM_API VariantStringBase : public VariantBase { // Trick gmmproc into thinking this is derived from GVariant to wrap some methods. _CLASS_GENERIC(VariantStringBase, GVariant) @@ -348,7 +348,7 @@ public: * @newin{2,28} * @ingroup Variant */ -class VariantContainerBase : public VariantBase +class GLIBMM_API VariantContainerBase : public VariantBase { // Trick gmmproc into thinking this is derived from GVariant to wrap some methods. _CLASS_GENERIC(VariantContainerBase, GVariant) @@ -434,7 +434,7 @@ protected: }; template<> -VariantContainerBase VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v); +GLIBMM_API VariantContainerBase VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v); /** Template class used for the specialization of the Variant<> classes. * @newin{2,28} @@ -459,7 +459,7 @@ public: * @ingroup Variant */ template<> -class Variant<VariantBase> : public VariantContainerBase +class GLIBMM_API Variant<VariantBase> : public VariantContainerBase { // Trick gmmproc into thinking this is derived from GVariant to wrap some methods. _CLASS_GENERIC(Variant<VariantBase>, GVariant) @@ -558,7 +558,7 @@ public: * @ingroup Variant */ template<> -class Variant<Glib::ustring> : public VariantStringBase +class GLIBMM_API Variant<Glib::ustring> : public VariantStringBase { // Trick gmmproc into thinking this is derived from GVariant to wrap some methods. _CLASS_GENERIC(Variant<Glib::ustring>, GVariant) @@ -601,7 +601,7 @@ public: //TODO: When we can break ABI, remove this template specialization. template<> -Variant<Glib::ustring> VariantBase::cast_dynamic< Variant<Glib::ustring> >(const VariantBase& v); +GLIBMM_API Variant<Glib::ustring> VariantBase::cast_dynamic< Variant<Glib::ustring> >(const VariantBase& v); /** Specialization of Variant containing a Glib::DBusObjectPathString, * for variants of type object path. @@ -609,7 +609,7 @@ Variant<Glib::ustring> VariantBase::cast_dynamic< Variant<Glib::ustring> >(const * @ingroup Variant */ template<> -class Variant<Glib::DBusObjectPathString> : public VariantStringBase +class GLIBMM_API Variant<Glib::DBusObjectPathString> : public VariantStringBase { // Trick gmmproc into thinking this is derived from GVariant to wrap some methods. _CLASS_GENERIC(Variant<Glib::DBusObjectPathString>, GVariant) @@ -655,7 +655,7 @@ public: * @ingroup Variant */ template<> -class Variant<Glib::DBusSignatureString> : public VariantStringBase +class GLIBMM_API Variant<Glib::DBusSignatureString> : public VariantStringBase { // Trick gmmproc into thinking this is derived from GVariant to wrap some methods. _CLASS_GENERIC(Variant<Glib::DBusSignatureString>, GVariant) @@ -702,7 +702,7 @@ public: * @ingroup Variant */ template<> -class Variant<std::string> : public VariantStringBase +class GLIBMM_API Variant<std::string> : public VariantStringBase { // Trick gmmproc into thinking this is derived from GVariant to wrap some methods. _CLASS_GENERIC(Variant<std::string>, GVariant) @@ -741,7 +741,7 @@ public: //TODO: When we can break ABI, remove this template specialization. template<> -Variant<std::string> VariantBase::cast_dynamic< Variant<std::string> >(const VariantBase& v); +GLIBMM_API Variant<std::string> VariantBase::cast_dynamic< Variant<std::string> >(const VariantBase& v); /** Specialization of Variant containing a dictionary entry. See also * Variant< std::map<K, V> >. @@ -867,7 +867,7 @@ public: * @ingroup Variant */ template<> -class Variant< std::vector<Glib::ustring> > : public VariantContainerBase +class GLIBMM_API Variant< std::vector<Glib::ustring> > : public VariantContainerBase { public: using CppType = Glib::ustring ; @@ -931,7 +931,7 @@ public: * @ingroup Variant */ template<> -class Variant<std::vector<Glib::DBusObjectPathString>> : public VariantContainerBase +class GLIBMM_API Variant<std::vector<Glib::DBusObjectPathString>> : public VariantContainerBase { public: using CppType = Glib::DBusObjectPathString; @@ -993,7 +993,7 @@ public: * @ingroup Variant */ template<> -class Variant< std::vector<std::string> > : public VariantContainerBase +class GLIBMM_API Variant< std::vector<std::string> > : public VariantContainerBase { public: using CppType = std::string ; @@ -1673,7 +1673,7 @@ VariantIter Variant<std::tuple<Types...>>::get_iter() const // This is needed so Glib::VariantBase can be used with // Glib::Value and _WRAP_PROPERTY in Gio::Action and elsewhere. template <> -class Value<Glib::VariantBase> : public ValueBase_Variant +class GLIBMM_API Value<Glib::VariantBase> : public ValueBase_Variant { public: using CppType = Glib::VariantBase; diff --git a/glib/src/variant_basictypes.h.m4 b/glib/src/variant_basictypes.h.m4 index 54151771..199295b9 100644 --- a/glib/src/variant_basictypes.h.m4 +++ b/glib/src/variant_basictypes.h.m4 @@ -39,7 +39,7 @@ LINE(]__line__[)dnl * @ingroup Variant */ template <> -class Variant<$1> : public VariantBase +class GLIBMM_API Variant<$1> : public VariantBase { public: using CType = $2; diff --git a/glib/src/variantdict.hg b/glib/src/variantdict.hg index 1f9a5a16..4b69a085 100644 --- a/glib/src/variantdict.hg +++ b/glib/src/variantdict.hg @@ -32,11 +32,11 @@ namespace Glib * * newin{2,40} */ -class VariantDict final +class GLIBMM_API VariantDict final { //GVariantDict is registered as a boxed type, but it has ref/unref functions instead of copy/free, //so we use it via RefPtr. - _CLASS_OPAQUE_REFCOUNTED(VariantDict, GVariantDict, NONE, g_variant_dict_ref, g_variant_dict_unref) + _CLASS_OPAQUE_REFCOUNTED(VariantDict, GVariantDict, NONE, g_variant_dict_ref, g_variant_dict_unref, GLIBMM_API) _IGNORE(g_variant_dict_ref, g_variant_dict_unref, g_variant_dict_init) public: diff --git a/glib/src/variantiter.hg b/glib/src/variantiter.hg index 401bc4ad..a35c2e59 100644 --- a/glib/src/variantiter.hg +++ b/glib/src/variantiter.hg @@ -20,8 +20,8 @@ _DEFS(glibmm,glib) namespace Glib { -class VariantBase; -class VariantContainerBase; +class GLIBMM_API VariantBase; +class GLIBMM_API VariantContainerBase; //This can't be like a real iterator (like Gtk::TextIter), //because g_iter_value_get_next_value() both gets a value and changes the iterator. @@ -30,9 +30,9 @@ class VariantContainerBase; * VariantBase containers such as arrays. * @newin{2,28} */ -class VariantIter +class GLIBMM_API VariantIter { - _CLASS_OPAQUE_COPYABLE(VariantIter, GVariantIter, NONE, g_variant_iter_copy, g_variant_iter_free) + _CLASS_OPAQUE_COPYABLE(VariantIter, GVariantIter, NONE, g_variant_iter_copy, g_variant_iter_free, GLIBMM_API) _IGNORE(g_variant_iter_copy, g_variant_iter_free) public: //TODO: The variant parameter should be a VariantContainerBase. diff --git a/glib/src/varianttype.hg b/glib/src/varianttype.hg index a326e111..848c4f99 100644 --- a/glib/src/varianttype.hg +++ b/glib/src/varianttype.hg @@ -88,9 +88,9 @@ namespace Glib * @newin{2,28} * @ingroup Variant */ -class VariantType +class GLIBMM_API VariantType { - _CLASS_OPAQUE_COPYABLE(VariantType, GVariantType, NONE, g_variant_type_copy, g_variant_type_free) + _CLASS_OPAQUE_COPYABLE(VariantType, GVariantType, NONE, g_variant_type_copy, g_variant_type_free, GLIBMM_API) _IGNORE(g_variant_type_copy, g_variant_type_free) public: @@ -193,63 +193,63 @@ public: _IGNORE(g_variant_type_info_get) }; -extern const VariantType VARIANT_TYPE_BOOL; +extern GLIBMM_API const VariantType VARIANT_TYPE_BOOL; -extern const VariantType VARIANT_TYPE_BYTE; +extern GLIBMM_API const VariantType VARIANT_TYPE_BYTE; -extern const VariantType VARIANT_TYPE_INT16; +extern GLIBMM_API const VariantType VARIANT_TYPE_INT16; -extern const VariantType VARIANT_TYPE_UINT16; +extern GLIBMM_API const VariantType VARIANT_TYPE_UINT16; -extern const VariantType VARIANT_TYPE_INT32; +extern GLIBMM_API const VariantType VARIANT_TYPE_INT32; -extern const VariantType VARIANT_TYPE_UINT32; +extern GLIBMM_API const VariantType VARIANT_TYPE_UINT32; -extern const VariantType VARIANT_TYPE_INT64; +extern GLIBMM_API const VariantType VARIANT_TYPE_INT64; -extern const VariantType VARIANT_TYPE_UINT64; +extern GLIBMM_API const VariantType VARIANT_TYPE_UINT64; -extern const VariantType VARIANT_TYPE_DOUBLE; +extern GLIBMM_API const VariantType VARIANT_TYPE_DOUBLE; -extern const VariantType VARIANT_TYPE_STRING; +extern GLIBMM_API const VariantType VARIANT_TYPE_STRING; -extern const VariantType VARIANT_TYPE_OBJECT_PATH; +extern GLIBMM_API const VariantType VARIANT_TYPE_OBJECT_PATH; -extern const VariantType VARIANT_TYPE_SIGNATURE; +extern GLIBMM_API const VariantType VARIANT_TYPE_SIGNATURE; -extern const VariantType VARIANT_TYPE_VARIANT; +extern GLIBMM_API const VariantType VARIANT_TYPE_VARIANT; -extern const VariantType VARIANT_TYPE_HANDLE; +extern GLIBMM_API const VariantType VARIANT_TYPE_HANDLE; -extern const VariantType VARIANT_TYPE_UNIT; +extern GLIBMM_API const VariantType VARIANT_TYPE_UNIT; -extern const VariantType VARIANT_TYPE_ANY; +extern GLIBMM_API const VariantType VARIANT_TYPE_ANY; -extern const VariantType VARIANT_TYPE_BASIC; +extern GLIBMM_API const VariantType VARIANT_TYPE_BASIC; -extern const VariantType VARIANT_TYPE_MAYBE; +extern GLIBMM_API const VariantType VARIANT_TYPE_MAYBE; -extern const VariantType VARIANT_TYPE_ARRAY; +extern GLIBMM_API const VariantType VARIANT_TYPE_ARRAY; -extern const VariantType VARIANT_TYPE_TUPLE; +extern GLIBMM_API const VariantType VARIANT_TYPE_TUPLE; -extern const VariantType VARIANT_TYPE_DICT_ENTRY; +extern GLIBMM_API const VariantType VARIANT_TYPE_DICT_ENTRY; -extern const VariantType VARIANT_TYPE_DICTIONARY; +extern GLIBMM_API const VariantType VARIANT_TYPE_DICTIONARY; -extern const VariantType VARIANT_TYPE_STRING_ARRAY; +extern GLIBMM_API const VariantType VARIANT_TYPE_STRING_ARRAY; -extern const VariantType VARIANT_TYPE_OBJECT_PATH_ARRAY; +extern GLIBMM_API const VariantType VARIANT_TYPE_OBJECT_PATH_ARRAY; -extern const VariantType VARIANT_TYPE_BYTESTRING; +extern GLIBMM_API const VariantType VARIANT_TYPE_BYTESTRING; -extern const VariantType VARIANT_TYPE_BYTESTRING_ARRAY; +extern GLIBMM_API const VariantType VARIANT_TYPE_BYTESTRING_ARRAY; #ifndef DOXYGEN_SHOULD_SKIP_THIS // This is needed so Glib::VariantType can be used with // Glib::Value and _WRAP_PROPERTY in Gio::Action and elsewhere. template <> -class Value<Glib::VariantType> : public ValueBase_Boxed +class GLIBMM_API Value<Glib::VariantType> : public ValueBase_Boxed { public: using CppType = Glib::VariantType; diff --git a/meson.build b/meson.build index 366e26e0..0fa3f4cd 100644 --- a/meson.build +++ b/meson.build @@ -189,13 +189,12 @@ add_project_arguments(warning_flags, language: 'cpp') # that should not be overlooked stand out. if is_msvc disabled_warnings = cpp_compiler.get_supported_arguments([ - '/FImsvc_recommended_pragmas.h', '/wd4146', '/wd4267', '/wd4530', '/wd4589' + '/FImsvc_recommended_pragmas.h', '/wd4146', '/wd4251', '/wd4275', '/wd4267', '/wd4530', '/wd4589', '/utf-8' ]) add_project_arguments(disabled_warnings, language: 'cpp') endif subdir('tools') -subdir('MSVC_NMake/gendef') subdir('glib') subdir('MSVC_NMake/glibmm') subdir('glib/glibmm') diff --git a/tools/m4/class_boxedtype.m4 b/tools/m4/class_boxedtype.m4 index a5046f5c..a31f1f0a 100644 --- a/tools/m4/class_boxedtype.m4 +++ b/tools/m4/class_boxedtype.m4 @@ -1,7 +1,7 @@ dnl $Id$ dnl -dnl _CLASS_BOXEDTYPE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy) +dnl _CLASS_BOXEDTYPE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy, api_decoration) dnl define(`_CLASS_BOXEDTYPE',`dnl @@ -13,6 +13,7 @@ define(`__CNAME__',`$2') define(`__BOXEDTYPE_FUNC_NEW',`$3') define(`__BOXEDTYPE_FUNC_COPY',`$4') define(`__BOXEDTYPE_FUNC_FREE',`$5') +define(`__BOXEDTYPE_FUNC_DECORATION',`$6') define(`_CUSTOM_DEFAULT_CTOR',`dnl _PUSH() @@ -79,12 +80,13 @@ ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl * * @relates __NAMESPACE__::__CPPNAME__ */ +__BOXEDTYPE_FUNC_DECORATION __NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false); ')dnl endif __BOOL_NO_WRAP_FUNCTION__ #ifndef DOXYGEN_SHOULD_SKIP_THIS template <> -class Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__> +class __BOXEDTYPE_FUNC_DECORATION Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__> {}; #endif /* DOXYGEN_SHOULD_SKIP_THIS */ diff --git a/tools/m4/class_boxedtype_static.m4 b/tools/m4/class_boxedtype_static.m4 index 926ac496..bbb34411 100644 --- a/tools/m4/class_boxedtype_static.m4 +++ b/tools/m4/class_boxedtype_static.m4 @@ -1,7 +1,7 @@ dnl $Id$ dnl -dnl _CLASS_BOXEDTYPE_STATIC(TreeIter, GtkTreeIter) +dnl _CLASS_BOXEDTYPE_STATIC(TreeIter, GtkTreeIter, api_decoration) dnl define(`_CLASS_BOXEDTYPE_STATIC',`dnl _PUSH() @@ -9,6 +9,7 @@ dnl dnl Define the args for later macros define(`__CPPNAME__',`$1') define(`__CNAME__',`$2') +define(`__FUNC_DECORATION__',`$3') define(`_CUSTOM_DEFAULT_CTOR',`dnl _PUSH() @@ -53,18 +54,20 @@ ifdef(`__BOOL_NO_WRAP_FUNCTION__',`dnl * @param object The C instance * @result A C++ instance that wraps this C instance. */ +__FUNC_DECORATION__ __NAMESPACE__::__CPPNAME__& wrap(__CNAME__* object); /** @relates __NAMESPACE__::__CPPNAME__ * @param object The C instance * @result A C++ instance that wraps this C instance. */ +__FUNC_DECORATION__ const __NAMESPACE__::__CPPNAME__& wrap(const __CNAME__* object); ')dnl endif __BOOL_NO_WRAP_FUNCTION__ #ifndef DOXYGEN_SHOULD_SKIP_THIS template <> -class Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__> +class __FUNC_DECORATION__ Value<__NAMESPACE__::__CPPNAME__> : public Glib::Value_Boxed<__NAMESPACE__::__CPPNAME__> {}; #endif /* DOXYGEN_SHOULD_SKIP_THIS */ diff --git a/tools/m4/class_gobject.m4 b/tools/m4/class_gobject.m4 index 0e0e4f6e..86359460 100644 --- a/tools/m4/class_gobject.m4 +++ b/tools/m4/class_gobject.m4 @@ -19,6 +19,8 @@ dnl the problem by supporting optional __REAL_* arguments to this macro. define(`__REAL_CNAME__',ifelse(`$6',,__CNAME__,`$6')) define(`__REAL_CPARENT__',ifelse(`$7',,__CPARENT__,`$7')) +dnl $8 is for the optional api_decoration used for import/export +define(`__FUNC_DECORATION__',`$8') _POP() _SECTION(SECTION_CLASS2) @@ -124,7 +126,7 @@ _STRUCT_PROTOTYPE() ')dnl #ifndef DOXYGEN_SHOULD_SKIP_THIS -__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__ +__NAMESPACE_BEGIN__ class __FUNC_DECORATION__ __CPPNAME__`'_Class; __NAMESPACE_END__ #endif //DOXYGEN_SHOULD_SKIP_THIS _SECTION(SECTION_HEADER3) @@ -141,6 +143,7 @@ namespace Glib * * @relates __NAMESPACE__::__CPPNAME__ */ + __FUNC_DECORATION__ Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy = false); } ')dnl diff --git a/tools/m4/class_interface.m4 b/tools/m4/class_interface.m4 index 3c0b93ef..b77c7893 100644 --- a/tools/m4/class_interface.m4 +++ b/tools/m4/class_interface.m4 @@ -15,6 +15,8 @@ define(`__CPARENT__',m4_ifelse($6,`',`GObject',$6)) #Optional parameter. define(`__PCAST__',`(__CPARENT__`'*)') define(`__BOOL_IS_INTERFACE__',`1') +dnl $7 is for the optional api_decoration used for import/export +define(`__FUNC_DECORATION__',`$7') dnl For classes that need custom code in their cast constructor. define(`_CUSTOM_CTOR_CAST',`dnl @@ -118,7 +120,7 @@ _SECTION(SECTION_HEADER1) _STRUCT_PROTOTYPE() #ifndef DOXYGEN_SHOULD_SKIP_THIS -__NAMESPACE_BEGIN__ class __CPPNAME__`'_Class; __NAMESPACE_END__ +__NAMESPACE_BEGIN__ class __FUNC_DECORATION__ __CPPNAME__`'_Class; __NAMESPACE_END__ #endif // DOXYGEN_SHOULD_SKIP_THIS _SECTION(SECTION_HEADER3) @@ -135,6 +137,7 @@ namespace Glib * * @relates __NAMESPACE__::__CPPNAME__ */ + __FUNC_DECORATION__ Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__`'* object, bool take_copy = false); } // namespace Glib diff --git a/tools/m4/class_opaque_copyable.m4 b/tools/m4/class_opaque_copyable.m4 index 7e04921c..c725a42a 100644 --- a/tools/m4/class_opaque_copyable.m4 +++ b/tools/m4/class_opaque_copyable.m4 @@ -1,7 +1,7 @@ dnl $Id$ dnl -dnl _CLASS_OPAQUE_COPYABLE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy) +dnl _CLASS_OPAQUE_COPYABLE(Region, GdkRegion, gdk_region_new, gdk_region_copy, gdk_region_destroy, api_decoration) dnl define(`_CLASS_OPAQUE_COPYABLE',`dnl @@ -13,6 +13,7 @@ define(`__CNAME__',`$2') define(`__OPAQUE_FUNC_NEW',`$3') define(`__OPAQUE_FUNC_COPY',`$4') define(`__OPAQUE_FUNC_FREE',`$5') +define(`__OPAQUE_FUNC_DECORATION',`$6') define(`_CUSTOM_DEFAULT_CTOR',`dnl _PUSH() @@ -65,7 +66,8 @@ namespace Glib * * @relates __NAMESPACE__::__CPPNAME__ */ -__NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false); + __OPAQUE_FUNC_DECORATION + __NAMESPACE__::__CPPNAME__ wrap(__CNAME__* object, bool take_copy = false); } // namespace Glib ')dnl endif __BOOL_NO_WRAP_FUNCTION__ diff --git a/tools/m4/class_opaque_refcounted.m4 b/tools/m4/class_opaque_refcounted.m4 index 439c1361..2a5b9134 100644 --- a/tools/m4/class_opaque_refcounted.m4 +++ b/tools/m4/class_opaque_refcounted.m4 @@ -1,5 +1,5 @@ dnl -dnl _CLASS_OPAQUE_REFCOUNTED(Coverage, PangoCoverage, pango_coverage_new, pango_coverage_ref, pango_coverage_unref) +dnl _CLASS_OPAQUE_REFCOUNTED(Coverage, PangoCoverage, pango_coverage_new, pango_coverage_ref, pango_coverage_unref, api_decoration) dnl define(`_CLASS_OPAQUE_REFCOUNTED',`dnl @@ -11,6 +11,7 @@ define(`__CNAME__',`$2') define(`__OPAQUE_FUNC_NEW',`$3') define(`__OPAQUE_FUNC_REF',`$4') define(`__OPAQUE_FUNC_UNREF',`$5') +define(`__OPAQUE_FUNC_DECORATION',`$6') undefine(`__OPAQUE_FUNC_GTYPE__') _POP() @@ -56,12 +57,13 @@ namespace Glib * * @relates __NAMESPACE__::__CPPNAME__ */ +__OPAQUE_FUNC_DECORATION Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__CNAME__* object, bool take_copy = false); ifdef(`__OPAQUE_FUNC_GTYPE__',`dnl #ifndef DOXYGEN_SHOULD_SKIP_THIS template <> -class Value<Glib::RefPtr<__NAMESPACE__::__CPPNAME__>> : public Glib::Value_RefPtrBoxed<__NAMESPACE__::__CPPNAME__> +class __OPAQUE_FUNC_DECORATION Value<Glib::RefPtr<__NAMESPACE__::__CPPNAME__>> : public Glib::Value_RefPtrBoxed<__NAMESPACE__::__CPPNAME__> { public: CppType get() const { return Glib::wrap(static_cast<__CNAME__*>(get_boxed()), true); } diff --git a/tools/m4/gerror.m4 b/tools/m4/gerror.m4 index 51b4985c..78046ffc 100644 --- a/tools/m4/gerror.m4 +++ b/tools/m4/gerror.m4 @@ -1,6 +1,6 @@ dnl -dnl _GERROR(cpp_type, c_type, domain, `element_list', `gtype_func', `class_docs', `enum_docs', 'deprecated') -dnl $1 $2 $3 $4 $5 $6 $7 $8 +dnl _GERROR(cpp_type, c_type, domain, `element_list', `gtype_func', `class_docs', `enum_docs', 'deprecated', `decl_prefix') +dnl $1 $2 $3 $4 $5 $6 $7 $8 $9 dnl m4_define(`_GERROR',`dnl @@ -17,7 +17,7 @@ ifelse(`$6',,,`dnl /** $6 */ ')dnl -class __CPPNAME__ : public Glib::Error +class $9 __CPPNAME__ : public Glib::Error { public: /** $7 @@ -36,7 +36,7 @@ private: static void throw_func(GError* gobject); - friend void wrap_init(); // uses throw_func() + friend $9 void wrap_init(); // uses throw_func() _IMPORT(SECTION_H_GERROR_PRIVATE) #endif //DOXYGEN_SHOULD_SKIP_THIS diff --git a/tools/pm/Output.pm b/tools/pm/Output.pm index ed630d2b..63dcd697 100644 --- a/tools/pm/Output.pm +++ b/tools/pm/Output.pm @@ -759,12 +759,12 @@ sub output_wrap_enum_docs_only($$$$$$$$$$$) # void output_wrap_gerror($filename, $line_num, $cpp_type, $c_type, $domain, # $class_docs, $ref_subst_in, $ref_subst_out, $gtype_func, -# $deprecated, $deprecation_docs, $newin) -sub output_wrap_gerror($$$$$$$$$$$$$) +# $deprecated, $deprecation_docs, $newin, $decl_prefix) +sub output_wrap_gerror($$$$$$$$$$$$$$) { my ($self, $filename, $line_num, $cpp_type, $c_type, $domain, $class_docs, $ref_subst_in, $ref_subst_out, $gtype_func, - $deprecated, $deprecation_docs, $newin) = @_; + $deprecated, $deprecation_docs, $newin, $decl_prefix) = @_; my $objDefsParser = $$self{objDefsParser}; @@ -822,7 +822,7 @@ sub output_wrap_gerror($$$$$$$$$$$$$) # Prevent Doxygen from auto-linking to a class called Exception. $class_docs =~ s/([^%])(Exception class)/$1%$2/g; - my $str = sprintf("_GERROR(%s,%s,%s,\`%s\',\`%s\',\`%s\',\`%s\',\`%s\')dnl\n", + my $str = sprintf("_GERROR(%s,%s,%s,\`%s\',\`%s\',\`%s\',\`%s\',\`%s\',\`%s\')dnl\n", $cpp_type, $c_type, $domain, @@ -830,7 +830,8 @@ sub output_wrap_gerror($$$$$$$$$$$$$) $gtype_func, $class_docs, $enum_docs, - $deprecated + $deprecated, + $decl_prefix ); $self->append($str); diff --git a/tools/pm/WrapParser.pm b/tools/pm/WrapParser.pm index bf2597f1..2e2121a8 100644 --- a/tools/pm/WrapParser.pm +++ b/tools/pm/WrapParser.pm @@ -1444,6 +1444,7 @@ sub on_wrap_any_enum($$) my $argDeprecated = ""; my $deprecation_docs = ""; my $newin = ""; + my $decl_prefix = ""; # $gtype_func: # 1. If an empty string, the M4 macro _ENUM or _GERROR calls _GET_TYPE_FUNC() @@ -1485,9 +1486,13 @@ sub on_wrap_any_enum($$) { $newin = string_unquote(string_trim($1)); } + elsif ($arg =~ /^decl_prefix(.*)/) #If decl_prefix is at the start. + { + $decl_prefix = string_unquote(string_trim($1)); + } } return ($cpp_type, $c_type, $domain, \@subst_in, \@subst_out, $gtype_func, - $argDeprecated, $deprecation_docs, $newin); + $argDeprecated, $deprecation_docs, $newin, $decl_prefix); } sub on_wrap_enum($) @@ -1542,12 +1547,12 @@ sub on_wrap_gerror($) # get the arguments my ($cpp_type, $c_type, $domain, $ref_subst_in, $ref_subst_out, $gtype_func, - $argDeprecated, $deprecation_docs, $newin) = $self->on_wrap_any_enum(1); + $argDeprecated, $deprecation_docs, $newin, $decl_prefix) = $self->on_wrap_any_enum(1); $$self{objOutputter}->output_wrap_gerror( $$self{filename}, $$self{line_num}, $cpp_type, $c_type, $domain, $class_docs, $ref_subst_in, $ref_subst_out, $gtype_func, - $argDeprecated, $deprecation_docs, $newin); + $argDeprecated, $deprecation_docs, $newin, $decl_prefix); } sub on_wrap_any_property($) |