summaryrefslogtreecommitdiff
path: root/glib/src/binding.hg
Commit message (Collapse)AuthorAgeFilesLines
* Glib::Binding: Fix a bind_property() overloadKjell Ahlstedt2023-01-131-2/+2
| | | | | The bind_property() overload with two transformation functions has been wrong since commit 4ed3ff9cad836dc7b24282a112d66847292a9baa.
* Glib::Binding::unbind(): Fix documentationKjell Ahlstedt2022-12-271-3/+2
| | | | Should have been done in commit dc92d02f4d50851a1af59e5fbe2a753dcfd2e9df.
* Glib::Binding: Fix return type from dup_source() and dup_target()Kjell Ahlstedt2021-10-051-5/+5
| | | | Change from Glib::RefPtr<Glib::Object> to Glib::RefPtr<Glib::ObjectBase>.
* Glib, Gio: Add some methods for glibmm 2.70Kjell Ahlstedt2021-10-051-59/+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::Binding, TimeZone: Ignore deprecation of some glib functionsKjell Ahlstedt2020-12-141-5/+62
| | | | | | | g_binding_get_source(), g_binding_get_target() and g_time_zone_new() are deprecated in glib 2.68. We can't use the replacement functions, which are new in glib 2.68. We want to build with -Dwarnings=fatal and run with both glib 2.68 and older versions of glib.
* Glib::Binding: Avoid warning from gcc-10Kjell Ahlstedt2020-12-081-0/+9
| | | | | | | | | | | | g++-10 with optimization level -O1 or higher warns about possible use of an uninitialized variable when tests/glibmm_binding/main.cc is compiled. I don't understand why. There is no warning if the private method Glib::Binding::TransformProp:: operator()() is compiled without optimization. Add an attribute that turns off optimization for this method when it's compiled with with gcc-10 or higher. gcc-9 does not warn. gcc-10 does not warn in glibmm-2.4, where std::optional is not used.
* glib/src/*.hg: Mark _WRAP_ENUM with decl_prefix GLIBMM_APIChun-wei Fan2020-04-041-1/+1
| | | | | | | | | This way we can mark the template<> classes that is generated via _WRAP_ENUM with GLIBMM_API, so that we can export those as well. Note that for this, the _WRAP_ENUM calls with NO_GTYPE specified do not need to be marked with decl_prefix GLIBMM_API as no template<> classes will be generated in this manner.
* glib/src: Decorate classes and methods with GLIBMM_APIChun-wei Fan2020-03-071-2/+2
| | | | | | This prepares for us to export symbols using compiler directives, so that we can eventually retire gendef.exe. This also makes the scripts place GLIBMM_API as appropriate for the generated Glib:Error classes and the wrap() method.
* Glib::Binding: Keep a binding alive even without a RefPtrKjell Ahlstedt2019-12-151-12/+6
| | | | | | | | A binding between properties can remain even after all RefPtr<Binding>s are gone. This is similar to how Gtk::Widget::set_controller() works in gtkmm4. Fixes #62, see !21
* Glib::Binding: get_source() and get_target() return ObjectBase*Kjell Ahlstedt2019-11-151-4/+5
| | | | Fixes #63
* Glib::Binding: Explain why SlotTransform takes GValue*Kjell Ahlstedt2019-11-151-0/+10
| | | | Fixes #61
* Binding: Use std::optional instead of out-ref+boolDaniel Boles2019-11-091-6/+9
| | | | | | The pattern of returning a boolean to indicate whether an output reference was set is messy and error-prone. C++17 adds std::optional, which exists precisely to indicate that a result is available or not.
* Binding: no point to set target value if got falseDaniel Boles2019-11-091-4/+6
| | | | | | | | | If we return false, GBinding ignores target GValue, so there’s no point setting it. Besides, if the transform function returned false, that says they couldn't calculate a target value, so they shouldn’t assign to `to` I default-construct primitive `T_to`s in case anyone *was* reading those for some daft reason, so they get a zero-initialised value instead of UB
* Binding: Move SlotTypeTransform up and document itDaniel Boles2019-11-091-22/+27
| | | | | | | | | | | This is more maintainable than all the arguments to all the overloads of bind_property() manually repeating the signature in their documentation, plus more user-friendly as we document it, users can use the typedef, &c Note: My next thought was we can just take SlotTypeTransforms in the argument list, instead of totally arbitrary functors, so the conversion would be done at call site instead of via extra code in the body. But I didn't get that working yet, and it should be a separate commit anyway.
* Binding: Better explain purpose of SlotTransform,Daniel Boles2019-11-091-1/+6
| | | | and use better formatting for it too.
* Binding: Fix using outdated enums in documentationDaniel Boles2019-11-091-3/+3
| | | | They are not Glib::BINDING_* anymore, but rather Glib::Binding::Flags::*
* Use {} for function arguments initialisationTapasweni Pathak2019-01-131-2/+2
| | | | Closes https://gitlab.gnome.org/GNOME/glibmm/issues/20.
* Binding: Change BindingFlags to Binding::Flags.Murray Cumming2017-04-181-10/+11
|
* Fix build when _WRAP_ENUM generates enum classKjell Ahlstedt2017-04-111-2/+2
| | | | Bug 86864
* Binding: Make a the TransformProp constructor explicit.Murray Cumming2016-12-121-1/+1
|
* sigc3: Binding: TransformProp: Don't use sigc::functor_base.Murray Cumming2016-11-141-2/+1
|
* sigc3: .hg/.ccg files: Use sigc::slot<R(Args...)> syntax.Murray Cumming2016-11-141-14/+14
|
* C++11: .hg/.ccg files: Replace typedefs with using.Murray Cumming2016-03-311-3/+3
|
* Glib: More nullptr instead of 0Kjell Ahlstedt2015-11-231-7/+7
|
* C++11: Use of the override keyword.Murray Cumming2015-07-171-1/+1
|
* Fix the version numbers in some @newin Doxygen commandsKjell Ahlstedt2015-06-021-5/+5
| | | | | | | | | * gio/src/appinfo.hg: Change @newin{3,2} to @newin{2,30}. * gio/src/application.hg: * gio/src/networkmonitor.hg: * gio/src/simpleiostream.hg: * gio/src/tcpwrapperconnection.hg: * glib/src/binding.hg: Add 'newin 2,n"' to some _WRAP_PROPERTY().
* Fix the version numbers in some @newin Doxygen commandsKjell Ahlstedt2015-05-081-8/+8
| | | | | | | | | | | | | * gio/src/application.hg: * gio/src/dbusintrospection.hg: * gio/src/memoryinputstream.hg: * gio/src/networkmonitor.hg: * gio/src/notification.hg: * gio/src/resource.hg: * gio/src/tcpwrapperconnection.hg: * glib/src/binding.hg: * glib/src/variant.hg: Correct the version numbers in some @newin commands by adding 'newin "2,n"' parameters to _WRAP_xxx macros. Bug #748856.
* Glib::Binding: Rename and change BindingTransformSlotKjell Ahlstedt2015-01-131-32/+30
| | | | | | | * glib/src/binding.[hg|ccg]: Change "typedef sigc::slot<bool, const Glib::RefPtr<Binding>&, const GValue*, GValue*> BindingTransformSlot" to "typedef sigc::slot<bool, const GValue*, GValue*> SlotTransform". Bug #738663.
* Add Glib::BindingKjell Ahlstedt2014-11-201-0/+423
* .gitignore: Ignore binding.[h|cc]. * glib/glibmm/objectbase.h: Add a comment. * glib/src/filelist.am: Add glib_signals.defs and binding.hg. * glib/src/glib.defs: Add glib_signals.defs. * glib/glibmm.h: Add binding.h. * tools/extra_defs_gen/generate_defs_glib.cc: Add get_defs(G_TYPE_BINDING). * tools/m4/convert_glib.m4: Add conversion for BindingFlags. * tools/generate_wrap_init.pl.in: Define GLIBMM_INCLUDED_FROM_WRAP_INIT_CC. * glib/src/binding.[hg|ccg]: New files with enum BindingFlags and class Binding. * glib/src/glib_signals.defs: New file with info about GBinding's properties. Bug #738663.