summaryrefslogtreecommitdiff
path: root/gio
Commit message (Collapse)AuthorAgeFilesLines
* Add Gio::giomm_SignalProxy_async_callback() with C linkageKjell Ahlstedt2023-03-3136-217/+272
| | | | | and use it instead of SignalProxy_async_callback(). Part of issue #1
* Glib: Use callback functions with C linkageglibmm-2-76Kjell Ahlstedt2023-03-311-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Gio: Use callback functions with C linkageKjell Ahlstedt2023-03-2712-25/+116
| | | | | | | | | | | | | | | | | | | | | | * gio/giomm/socketsource.cc: Add extern "C". * gio/src/application.[ccg|hg]: Call Application_Class::open_callback() via a local function with C linkage. * gio/src/asyncinitable.[ccg|hg]: Call AsyncInitable_Class::init_async_vfunc_callback() and init_finish_vfunc_callback() via local functions with C linkage. * gio/src/dbusobjectmanagerclient.ccg: Use a local function with C linkage instead of Glib::destroy_notify_delete<SlotProxyType>. * gio/src/file.ccg: Add extern "C". * gio/src/liststore.ccg: Add a TODO comment. * gio/src/memoryinputstream.ccg: Add extern "C". * gio/src/settings.ccg: Add extern "C". * gio/src/socketcontrolmessage.[ccg|hg]: Call SocketControlMessage_Class::deserialize_async_vfunc_callback() via a local function with C linkage. Code that mixes up C linkage and C++ linkage has undefined behavior. Most compilers make no difference between C and C++ linkage, so it has not been an issue so far. Part of issue #1
* Gio::Settings: Add an #includeKjell Ahlstedt2023-03-121-0/+1
|
* Glib, Gio: Regenerate docs.xml and .defs filesKjell Ahlstedt2023-03-121-17/+80
| | | | using glib files from glib 2.76.0.
* Gio::ListModel: Add get_typed_object()Kjell Ahlstedt2023-03-071-0/+96
| | | | | | | | | Inspired by gtkmm#132. A test case has been added at gtkmm/tests/filedialog. It's difficult to make a meaningful test case without involving gtkmm. A good test case shall contain a GListModel with objects of a class which has no corresponding C++ class, and implements an interface which is wrapped in a C++ class.
* Glib, Gio: Regenerate docs.xml and .defs filesKjell Ahlstedt2023-01-174-50/+136
| | | | using glib files from glib 2.75.2. Update gio_docs_override.xml.
* Gio::Settings: Add bind() overloads and unbind()Kjell Ahlstedt2023-01-162-4/+353
| | | | Add the bind() overloads with mapping functions.
* liststore.hg: Rename a local variableChun-wei Fan2023-01-091-2/+2
| | | | | | | | | | | | | In the templatized implementation of std::pair<bool, unsigned int> ListStore<T_item>::find, replace 'result' with 'find_result' for what g_list_store_find_with_equal_func_full() returns, to avoid a compiler warning when building the giomm_listmodel test program when '-Dwarnings=max' is specified, for Visual Studio builds, as we are using a variable 'result' in a rather global scrope there[1]. This will help fix 'meson dist' on Visual Studio builds. [1]: https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4459
* Meson build: Don't copy files with configure_file()Kjell Ahlstedt2023-01-041-2/+3
| | | | | | It's deprecated from Meson 0.64. The replacement, fs.copyfile(), is not useful here. It only copies from the source directory to the build directory.
* Add Gio::BytesIconKjell Ahlstedt2022-12-026-0/+95
| | | | | | | | | | | | | * gio/giomm.h: * gio/giomm/meson.build: * gio/src/filelist.am: Add BytesIcon. * glib/src/bytes.[ccg|hg]: Add Glib::Value specialization. Required by _WRAP_PROPERTY in bytesicon.hg. * tools/extra_defs_gen/generate_defs_gio.cc: Add G_TYPE_BYTES_ICON. * gio/src/gio_signals.defs: Add BytesIcon property. * gio/src/bytesicon.[ccg|hg]: New files. Fixes #107
* Gio::AppInfo: Add get_[recommended|fallback]_for_type()Kjell Ahlstedt2022-12-021-1/+5
| | | | Fixes #105
* Gio::NetworkMonitor::get_default(): Add refreturnKjell Ahlstedt2022-11-051-1/+1
| | | | Fixes #104
* Glib, Gio: Regenerate docs.xml filesKjell Ahlstedt2022-09-191-2/+18
| | | | using gtk files from glib 2.74.0.
* Gio::File docs: Add @throwsKjell Ahlstedt2022-09-021-32/+116
| | | | and other minor documentation fixes.
* Gio::File: Add create_tmp()Kjell Ahlstedt2022-09-012-7/+52
| | | | | | * gio/src/file.[ccg|hg]: Add create_tmp(). Document create_for_parse_name(). * tests/giomm_simple/main.cc: Test File::create_tmp().
* Gio::ListStore::find() docs: Small changesKjell Ahlstedt2022-09-011-4/+4
|
* Gio::ListStore: Add find()Kjell Ahlstedt2022-08-292-0/+162
| | | | | | * gio/src/liststore.[ccg|hg]: Add two ListStoreBase::find() and two ListStore::find(). * tests/giomm_listmodel/main.cc: Test ListStore::find().
* Gio: Add some methods for glibmm 2.74Kjell Ahlstedt2022-08-225-4/+42
| | | | | | | | | | | | | * configure.ac: * meson.build: Require glib-2.0 >= 2.73.2. * gio/src/appinfo.hg: Add get_default_for_type_async/finish(), get_default_for_uri_scheme_async/finish(). * gio/src/file.hg: Add make_symbolic_link_async/finish(). * gio/src/liststore.hg: Add property_n_items(). * gio/src/resolver.hg: Add enum Resolver::NameLookupFlags, lookup_by_name_with_flags(), lookup_by_name_with_flags_async/finish(). * gio/src/gio_docs_override.xml: * tools/m4/convert_gio.m4: Add conversions for Resolver::NameLookupFlags.
* Glib, Gio: Regenerate docs.xml and .defs filesKjell Ahlstedt2022-08-224-9/+630
| | | | using gtk files from glib 2.73.3.
* Gio::DBus::Proxy: Add some refreturnglibmm-2-72Kjell Ahlstedt2022-07-291-4/+4
| | | | | | get_connection() and get_interface_info() must add a reference. The error in get_connection() was noticed by 우정모 (kr.woaini). Fixes #102
* Gio::ListStore: Don't derive a gtkmm__GListStore GTypeKjell Ahlstedt2022-06-081-0/+2
| | | | GListStore is declared G_DECLARE_FINAL_TYPE.
* Gio::Action: Improve the documentationKjell Ahlstedt2022-06-061-17/+18
| | | | See issue #100
* Gio::TlsCertificate: Fix the create*() methodsKjell Ahlstedt2022-04-082-20/+11
| | | | | Don't call constructors that don't work because the g_tls_certificate_new_*() functions do more than just call g_object_new().
* Glib, Gio: Add some methods for glibmm 2.72Kjell Ahlstedt2022-04-076-44/+133
| | | | | | | | | | | | | * 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.
* Glib, Gio: Regenerate docs.xml and .defs filesKjell Ahlstedt2022-04-075-138/+877
| | | | | using gtk files from glib 2.72.0. And update gio/src/gio_signals.defs.patch.
* Add Gio::AppInfoMonitorKjell Ahlstedt2022-02-165-2/+99
| | | | Fixes #97
* meson.build: Specify 'check' option in run_command()Kjell Ahlstedt2022-02-141-2/+3
| | | | | | The default value will be changed in future Meson releases. Don't use deprecated python3.path() and execute(..., gui_app: ...).
* Gio: Use _WRAP_METHOD(..., ignore_deprecations)Kjell Ahlstedt2021-11-264-44/+8
|
* Gio::SocketClient, TlsClientConnection: Ignore some deprecationsKjell Ahlstedt2021-11-244-7/+57
| | | | | | | g_socket_client_[set,get]_tls_validation_flags() and g_tls_client_connection_[set,get]_validation_flags() are deprecated in glib 2.72. They can't be deprecated in glibmm 2.70. Ignore the deprecations, so it will still be possible to compile with warnings=fatal.
* Glib, Gio: Add some methods for glibmm 2.70Kjell Ahlstedt2021-10-054-0/+22
| | | | | | | | | | | | | | | | | | * configure.ac: * meson.build: Require glib-2.0 >= 2.69.1. * glib/src/binding.[ccg|hg]: Add dup_source(), dup_target(), Deprecate get_source(), get_target(). * glib/src/spawn.[ccg|hg]: Change parameter name, exit_status to wait_status. * glib/src/timezone.[ccg|hg]: Add operator bool(), create_identifier(). Deprecate create(). * gio/src/fileinfo.hg: Add get/set_access_date(), get/set_creation_date(). * gio/src/notification.hg: Add set_category(). * gio/src/tlscertificate.hg: Add property/get_not_valid_before(), property/get_not_valid_after(), property/get_subject_name(), property/get_issuer_name(). * gio/src/tlsconnection.hg: Add enum Gio::TlsProtocolVersion, property/get_protocol_version(), property/get_ciphersuite_name(). * tools/m4/convert_gio.m4: Add conversion for enum TlsProtocolVersion.
* Glib, Gio: Regenerate docs.xml and .defs filesKjell Ahlstedt2021-10-055-140/+1559
| | | | | using gtk files from glib 2.70.0. And update gio_docs_override.xml and glib_extra_objects.defs.
* Declare some copy assignment operators deleted (=delete)Kjell Ahlstedt2021-08-271-1/+1
| | | | | | | | 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.
* Gio::AppInfo::get_all(): Use a local TypeTraits in ListHandlerKjell Ahlstedt2021-07-292-10/+7
| | | | | | | Instead of a specialization of Glib::Container_Helpers::TypeTraits for Glib::RefPtr<Gio::AppInfo>, add and use struct TypeTraits_AppInfo, local in gio/src/appinfo.ccg and appinfo.cc. Modifies the issue #94 fix.
* Gio::AppInfo::get_all(): Use Glib::wrap_auto_interface()Kjell Ahlstedt2021-07-261-0/+32
| | | | | | | | | | | | Applies also to get_all_for_type(). Make a complete specialization of Glib::Container_Helpers::TypeTraits for Glib::RefPtr<Gio::AppInfo>, calling Glib::wrap(GAppInfo*, bool) which uses Glib::wrap_auto_interface(). The partial specialization in containerhandle_shared.h calls Glib::wrap_auto(), which is not acceptable if the GAppInfo object does not already have a wrapper, and its class type has been wrapped in a C++ class (e.g. GWin32AppInfo or GOsxAppInfo). Fixes #94
* Gio::ListModel::get_object(): Don't try to cast to Glib::ObjectKjell Ahlstedt2021-07-151-0/+4
| | | | | | | Gio::ListModel::get_object() returns Glib::RefPtr<Glib::ObjectBase>. Don't try to dynamic_cast it to Glib::Object. It would fail if the object has been constructed as an interface, and e.g. has a Gio::File wrapper. Fixes #93
* fileenumerator.hg: Remove refreturn to avoid memory leaktalisein2021-07-101-2/+2
|
* Update gio_docs_override.xmlKjell Ahlstedt2021-06-041-2/+13
|
* Don't mark the Glib::Source class with GLIBMM_APIChun-wei Fan2021-05-072-8/+8
| | | | | | | 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
* fileattributeinfo.hg: Avoid exporting classes with std::string membersChun-wei Fan2021-05-071-10/+10
| | | | | | | ...and templates that inherit std::string. This will help us to also eliminate C4251 warnings from code that use thid class and related items, and avoid ABI compatibility issues when building code that link and run aginst glibmm on Visual Studio builds.
* 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-2639-38/+40
| | | | | | | 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.
* g[io|lib]mmconfig.h.*: Don't dllimport on MinGWChun-wei Fan2021-03-092-2/+6
| | | | | | | This will fix warnings when building items using glibmm and giomm with MinGW/GCC. Please see: https://gitlab.gnome.org/GNOME/gtkmm/-/issues/90
* Meson build: Use relative paths to untracked/Kjell Ahlstedt2021-02-241-2/+3
| | | | | | | 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
* Glib, Gio: Regenerate docs.xml and .defs filesKjell Ahlstedt2020-12-184-78/+688
| | | | | | and update gio/src/gio_docs_override.xml. Regenerated while the glib-2-66 branch was checked out from glib.
* Gio::File docs: Fix names of thrown exceptionsKjell Ahlstedt2020-11-014-8/+6
| | | | and remove unnecessary TODO comments in several files.
* Meson build: Fix versioning on macOSKjell Ahlstedt2020-09-301-1/+4
| | | | See https://github.com/libsigcplusplus/libsigcplusplus/pull/65
* Rewrite Gio::Tls[Client,Server]ConnectionImplKjell Ahlstedt2020-08-1210-106/+80
| | | | | | | | | | | TlsConnection_Class::wrap_new() can wrap a C object in a TlsConnection, TlsClientConnectionImpl or TlsServerConnectionImpl depending on which interface, if any, the C object implements. No need for special wrap*() functions in Tls[Client,Server]Connection or SocketClient::signal_event(). This is similar to Gdk::DeviceWithPad.
* Gio::Tls[Client,Server]ConnectionImpl: Improve the wrap*() functionsKjell Ahlstedt2020-08-022-12/+18
| | | | | | Make Glib::wrap_tls_[client,server]_connection_impl() do like other wrap() functions for ref-counted objects when they are given a nullptr: return an empty RefPtr.