summaryrefslogtreecommitdiff
path: root/glib/glibmm
Commit message (Collapse)AuthorAgeFilesLines
* Glib: NodeTree etc.: Use callback functions with C linkageKjell Ahlstedt2023-04-025-13/+71
| | | | | | | | | | | | | * glib/glibmm/class.cc: Use glibmm_custom_[get|set]_property_callback(). * glib/glibmm/object.[cc|h]: Add set_data_with_c_callback(). Don't call g_object_set_qdata_full() with a function with C++ linkage, if GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS is defined. * glib/glibmm/property.[cc|h]: Declare some local functions extern "C". Add glibmm_custom_[get|set]_property_callback(). * glib/src/nodetree.[ccg|hg]: Add glibmm_NodeTree_c_callback_[traverse|foreach]() and struct NodeTreeCallback[Traverse|Foreach]Data. Part of issue #1
* Glib: value_custom: Use callback functions with C linkageKjell Ahlstedt2023-03-312-4/+66
| | | | | | * glib/glibmm/value_custom.[cc|h]: Add custom_boxed_type_cpp_register(). * tests/glibmm_value/main.cc: Add test of copying custom Value. Part of issue #1
* Add Gio::giomm_SignalProxy_async_callback() with C linkageKjell Ahlstedt2023-03-311-0/+4
| | | | | and use it instead of SignalProxy_async_callback(). Part of issue #1
* Glib: Use callback functions with C linkageglibmm-2-76Kjell Ahlstedt2023-03-317-33/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | * gio/src/cancellable.ccg: Add TODO comment. * glib/glibmm/class.cc: Call custom_class_base_finalize_function() and custom_class_init_function() via local functions with C linkage. * glib/glibmm/extraclassinit.h: Point out in the class documentation that the class init and instance init functions shall have C linkage. * glib/glibmm/main.[cc|h]: Call prepare_vfunc(), check_vfunc() and dispatch_vfunc() via local functions with C linkage. * glib/glibmm/objectbase.cc: Call destroy_notify_callback() via a local function with C linkage. * glib/glibmm/propertyproxy_base.cc: Call PropertyProxyConnectionNode:: callback() and destroy_notify_handler() via local functions with C linkage. * glib/glibmm/signalproxy.cc: Call SignalProxyNormal::slot0_void_callback() and SignalProxyConnectionNode::destroy_notify_handler() via local functions with C linkage. * glib/src/binding.ccg: Add extern "C". * glib/src/bytearray.ccg: Add a TODO comment. * glib/src/markup.ccg: Call functions in the vfunc table via local functions with C linkage. * glib/src/optioncontext.ccg: Add extern "C". * glib/src/optiongroup.ccg: Call post_parse_callback() and option_arg_callback() via local functions with C linkage. Part of issue #1
* Glib::Dispatcher: Add const versions of emit() and operator()()Kjell Ahlstedt2023-02-222-0/+29
| | | | | and deprecate the non-const versions. Fixes #103
* Glib::Dispatcher: Remove a g_warning()Kjell Ahlstedt2023-02-221-7/+0
| | | | | Don't warn when a Dispatcher is deleted while messages are pending. Fixes #108
* Add the GLIBMM_CHECK_VERSION() preprocessor macroKjell Ahlstedt2023-01-163-0/+80
|
* Glib::RefPtr: Put the documentation in a Doxygen groupKjell Ahlstedt2022-10-101-0/+11
| | | | | A group (but not a 'using' alias) gets its own html file, which can be referred to from outside glibmm.
* Add Glib::ustring::release()Kjell Ahlstedt2022-08-211-0/+11
| | | | Fixes #101
* gmmproc: Improved handling of final typesKjell Ahlstedt2022-06-082-0/+16
| | | | | | | | | | | Some GObject-derived classes shall not be derived from. * glib/glibmm/class.cc: * glib/glibmm/interface.cc: Don't derive or add interfaces to a class if G_TYPE_IS_FINAL(gtype) is true. * tools/m4/class_shared.m4: Fix gtype_ when _DO_NOT_DERIVE_GTYPE is used. Add _ABI_AS_WITH_DERIVED_GTYPE, making it possible to add _DO_NOT_DERIVE_GTYPE without breaking ABI.
* Glib::RefPtr: Improve the documentationKjell Ahlstedt2022-06-061-0/+15
| | | | See issue gtkmm#119
* Revert "ustring_Iterator: Declare the copy constructor =default"Kjell Ahlstedt2022-05-041-8/+7
| | | | | This reverts commit 7b811a0be824675f31a422d40a75bbb5d10e32ad. It broke ABI. See #98
* Glib, Gio: Add some methods for glibmm 2.72Kjell Ahlstedt2022-04-072-2/+21
| | | | | | | | | | | | | * configure.ac: * meson.build: Require glib-2.0 >= 2.71.2. * gio/src/dbusproxy.hg: signal_signal() accepts a signal name. * gio/src/file.[ccg|hg]: Add move_async() and move_finish(). * gio/src/socketclient.hg: Deprecate set/get/property_tls_validation_flags(). * gio/src/tlscertificate.hg: Add properties private_key, private_key_pem, pkcs11_uri, private_key_pkcs11_uri. * gio/src/tlsclientconnection.hg: Deprecate set/get/property_validation_flags(). * glib/glibmm/main.[cc|h]: Add create(MainContextFlags flags). * glib/src/enums.hg: Add enum Glib::MainContextFlags.
* ustring_Iterator: Declare the copy constructor =defaultKjell Ahlstedt2022-02-151-7/+8
| | | | | | | Avoid warnings from the clang++ compiler. It's deprecated to implicitly declare a copy constructor, if there is a user-defined copy assignment operator.
* meson.build: Specify 'check' option in run_command()Kjell Ahlstedt2022-02-141-4/+6
| | | | | | The default value will be changed in future Meson releases. Don't use deprecated python3.path() and execute(..., gui_app: ...).
* Glib::wrap_register_init(): Don't use g_quark_from_static_string()Kjell Ahlstedt2021-10-041-2/+2
| | | | | | | Replace it by g_quark_from_string(). g_quark_from_static_string() shall not be used, if glibmm (but not glib) is loaded and unloaded several times. Fixes #96
* Declare some copy assignment operators deleted (=delete)Kjell Ahlstedt2021-08-271-6/+7
| | | | | | | | Avoid warnings from the clang++ compiler. It's deprecated in C++ to implicitly declare a copy constructor, if there is a user-defined copy assignment operator. Instead of declaring copy assignment operators private without implementation, declare them deleted.
* Glib::ustring: Remove extraneous GLIBMM_APIKjell Ahlstedt2021-05-311-2/+2
| | | | | Deleted methods shall not be decorated with GLIBMM_API. Fixes #92
* Add Glib::Environ and tests/glibmm_environKjell Ahlstedt2021-05-234-0/+154
| | | | Fixes #89
* Glib::Timer: Add resume() and is_active()Kjell Ahlstedt2021-05-232-1/+29
| | | | Fixes #87
* Don't mark the Glib::Source class with GLIBMM_APIChun-wei Fan2021-05-071-64/+64
| | | | | | | Instead, mark the individual members with GLIBMM_API so that we avoid having the code tied to a particular STL and compiler version. Update the classes that derive from Glib::Source accordingly as well
* error.h Avoid exporting class deriving frm std::exceptionChun-wei Fan2021-05-071-19/+19
| | | | | | | | | This will avoid having the ABI tied to a particular STL and compiler version, and so will eliminate C4275 compiler warnings when building the code. Also update gerror.m4 so that it will generate code deriving from Glib::Error with the export macro markings with the member functions, so that things continue to build properly
* variantdbusstring.h: Don't mark classes with GLIBMM_APIChun-wei Fan2021-05-071-2/+2
| | | | | It's actually not necessary here, and it will cause issues with the previous commit
* ustring.h: Avoid exporting classes with std::string membersChun-wei Fan2021-05-071-165/+165
| | | | | | | ...and templates that inherit std::string. This will help us to also eliminate C4251 warnings from code that use the ustring class and related items, and avoid ABI compatibility issues when building code that link and run aginst glibmm on Visual Studio builds.
* Glib::PatternSpec: Ignore deprecation of g_pattern_match()Kjell Ahlstedt2021-05-051-0/+4
|
* Subprojects can use meson.add_dist_script() if meson.version() >= 0.58.0Kjell Ahlstedt2021-05-051-3/+2
| | | | | | | | | | | * meson.build: * docs/reference/meson.build: * gio/giomm/meson.build: * glib/glibmm/meson.build: Call add_dist_script() in a subproject, if meson.version() >= 0.58.0. * tools/build_scripts/handle-built-files.py: Use MESON_PROJECT_DIST_ROOT if it exists, else MESON_DIST_ROOT. It exists if meson.version() >= 0.58.0.
* Meson build: No implicit_include_directoriesKjell Ahlstedt2021-03-261-0/+2
| | | | | | | It shall not be possible to find a glibmm header file with #include <xxx.h> instead of #include <glibmm/xxx.h>. Not fully fixed until https://github.com/mesonbuild/meson/issues/8562 has been fixed.
* Meson build: Make it possible to use glibmm as a subprojectKjell Ahlstedt2021-03-121-4/+4
| | | | glib and sigc++ can be subprojects of glibmm.
* Meson build: Use relative paths to untracked/Kjell Ahlstedt2021-02-241-3/+4
| | | | | | | The paths to the source code in untracked/ shall be relative to the meson.build file, when library files are built from a tarball. With absolute paths Meson may generate too long file names. See gtkmm!61
* Meson build: Fix versioning on macOSKjell Ahlstedt2020-09-301-1/+4
| | | | See https://github.com/libsigcplusplus/libsigcplusplus/pull/65
* Meson build: Add missing Glib::Value and Variant documentationKjell Ahlstedt2020-09-131-2/+2
| | | | | The value_basictypes.h and variant_basictypes.h files, which are generated from .m4 files, were not included in the input to Doxygen.
* Remove Glib::BalancedTreeKjell Ahlstedt2020-09-071-1/+0
| | | | Use std::map or std::unordered_map instead.
* glib/glibmm/private/*.h: Decorate the classes with GLIBMM_APIChun-wei Fan2020-08-282-2/+2
| | | | | This is done for completeness' sake, as we are doing for the private headers that we generate.
* Meson/Visual Studio builds: Include toolset version by defaultChun-wei Fan2020-06-181-3/+3
| | | | | | | | | | | | | | | | | | This makes the built DLL and .lib's contain the toolset version if the build is carried out using Visual Studio 2017 or later, unless the 'msvc14x-parallel-installable' option is set to be false during configuration. The reasoning behind this change is that there are subtle problems when, for instance, one tries to link to a Visual Studio 2017-built glibmm when building gtkmm and libxml++ with Visual Studio 2019. This is unfortunate as Microsoft did try hard to make interoperating between binaries built with Visual Studio 2015, 2017 and 2019 as easy as possible in terms of ABI and API, but unfortunately this hits the corner cases where this compatibility does not work. As the name suggests, this attempts to make Visual Studio 2017 and 2019 builds share a single set of underlying C DLLs easier, while avoiding breakages caused by such subtle differences.
* glib/glibmm/ustring.h: Fix Visual Studio macro checkChun-wei Fan2020-06-151-1/+1
| | | | | | | Commit 8b8af81f accidentally changed the macro check from '_MSC_VER' to 'MSC_VER', fix that. It probably does not matter since Visual Studio 2017 is required, where 'GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS' is enabled, but fix that for consistency's sake.
* propertyproxy_base: Fix using notify w/o prop nameDaniel Boles2020-06-031-1/+10
| | | | | | | | | | GLib has now specified that if you want to connect to a signal without a detail argument, you omit the `::`. So, glibmm users previously connecting to `notify::` to listen for changes to all properties broke. Fix that by only passing `notify` i.e. no superfluous `::` in that case. Close https://gitlab.gnome.org/GNOME/glibmm/-/issues/74 Close https://gitlab.gnome.org/GNOME/glibmm/-/merge_requests/35
* ustring: Silence warning if MSC_VER is undefined/0Daniel Boles2020-06-021-1/+1
|
* Glib, Gio: Add missing #includesKjell Ahlstedt2020-03-182-0/+3
| | | | Fixes #69
* glibmm/objectbase.h: Mark _gobject_cppinstance_already_deleted()Chun-wei Fan2020-03-121-0/+1
| | | | | ...with GLIBMM_API. This is needed for building gtkmm, with Visual Studio.
* glibmm: Update glibmmconfig.h.[in|meson] for MSVCChun-wei Fan2020-03-091-0/+5
| | | | | | | | | | | Visual Studio 2015 or later has thread_local, so make sure that it is enabled. Also update for Visual Studio 2017+ as the compiler does allow static members to be initialized inline to std::string::npos (GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS), but use a work around for pre-Visual Studio 2015 so that we do not get a linker error as GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS is not supported.
* build: Do not use gendef.exe for glibmmChun-wei Fan2020-03-071-42/+19
| | | | | | | | | | | Clean up the build files a bit and update the glibmmconfig.h.[in|meson] so that we use __declspec(dllexport) when GLIBMM_BUILD is defined (i.e. during the build of glibmm) on Visual Studio. Also, for the meson builds, disable warnings 4251 and 4275 as they all relate to building DLLs regarding symbol export, which is harmless as we know clearly that we are indeed building DLLs in our case, and we have already set GLIBMM_API appropriately
* glib/glibmm/*.h: Mark classes and methods with GLIBMM_APIChun-wei Fan2020-03-0528-68/+118
| | | | | This prepares the code to use __declspec(dllexport) to export all symbols, so that we can eventually bid farewell to gendf.exe
* Meson build: Add some dependencies when generating source filesKjell Ahlstedt2020-03-021-2/+3
| | | | | wrap_init.cc shall be rebuilt when generate_wrap_init.pl has been rebuilt. Generated .h and .cc files shall be rebuilt when gmmproc has been rebuilt.
* glib/glibmm/meson.build: Use glibmm-int rule for all buildsChun-wei Fan2020-03-021-36/+35
| | | | | | | | Let builds from release tarballs and GIT checkouts build the glibmm-int static library, and link the final .so/.dll from the objects that form glibmm-int static .lib. By doing so we can build glibmm with the import libraries for Visual Studio builds with gendef, as well as linking in the version resource for all Windows builds.
* Add support for building glibmm with MesonKjell Ahlstedt2020-03-011-0/+373
| | | | | | glibmm can be built with either Autotools or Meson. See MR !27
* Prepare existing files for building with MesonKjell Ahlstedt2020-03-011-0/+8
| | | | | | | | * examples/network/resolver.cc: Don't include config.h. It's not used. * glib/glibmm/ustring.cc: Check if GLIBMM_SIZEOF_WCHAR_T is defined. * tools/generate_wrap_init.pl.in: * tools/gmmproc.in: Change '\@' to '\ @'. Meson's configure_file() removes a backslash immediately before an at-sign.
* Derive Glib::Error from std::exception, remove Glib::ExceptionKjell Ahlstedt2019-12-145-83/+6
| | | | | | Glib::Error::what() returns const char* (was Glib::ustring). It overrides std::exception::what() that returns const char* and is noexcept. Fixes #23
* Use Glib::UStringView with Glib::ustring::compare()Thomas Holder2019-11-302-155/+115
| | | | | | | | and with the comparison operators, operator==(), etc. Add the glibmm_ustring_compare test case. https://gitlab.gnome.org/GNOME/glibmm/issues/64 https://gitlab.gnome.org/GNOME/glibmm/issues/65
* Glib: Replace StringView with StdStringView and UStringViewKjell Ahlstedt2019-11-201-26/+59
| | | | | | StdStringView and UStringView force users to be explicit (by using c_str()) when using a std::string where a Glib::ustring is recommended or vice versa. See issue #64
* Update value_custom.hPavlo Solntsev2019-11-181-4/+4
|