summaryrefslogtreecommitdiff
path: root/glib/glibmm
Commit message (Collapse)AuthorAgeFilesLines
* Glib::Source: Replace extra_source_data by instance dataKjell Ahlstedt2016-12-032-55/+23
| | | | | | * glib/glibmm/main.[cc|h]: Replace the std::map containing ExtraSourceData with instance data in Source. The map was just a way of avoiding an ABI break, but now we can break ABI. Bug 561885
* Glib::SignalProxyNormal: Remove connect_() and connect_notify_()Kjell Ahlstedt2016-12-012-50/+23
| | | | | and add connect_impl_(bool notify, const sigc::slot_base& slot, bool after). SignalProxyNormal then becomes more like SignalProxyDetailedBase.
* Rename Glib::SignalProxyDetailedAnyTypeKjell Ahlstedt2016-12-012-42/+19
| | | | | | Rename SignalProxyDetailed to SignalProxyDetailedBase, and SignalProxyDetailedAnyType to SignalProxyDetailed. Remove SignalProxyDetailed# aliases (# = 0..6).
* Glib::ObjectBase: Remove connect_property_changed_with_return()Kjell Ahlstedt2016-11-302-36/+4
| | | | and let connect_property_changed() return a sigc::connection.
* Glib::ObjectBase: Use std::forward_list for interface class pointersKjell Ahlstedt2016-11-256-20/+25
| | | | | | | std::forward_list is ideally suited for storing pointers to the interfaces of custom types. The list is often empty, never long. No need to use a pointer to a container in order to save storage space (as I did in the previous commit). An empty std::forward_list consists of nothing but a pointer.
* Glib::ObjectBase: Replace extra_object_base_data map by instance dataKjell Ahlstedt2016-11-247-82/+19
| | | | | | | | | | | | | | | | | | * glib/glibmm/class.[cc|h]: Remove the clone_custom_type() overload without an interface_class_vector_type argument. * glib/glibmm/interface.cc: * glib/glibmm/object.cc: * glib/glibmm/objectbase.[cc|h]: Replace the std::map containing ExtraObjectBaseData with instance data in ObjectBase. The map was just a way of avoiding an ABI break, but now we can break ABI. The new data is a std::unique_ptr<Class::interface_class_vector_type> rather than a Class::interface_class_vector_type. It's a vector which is used only during a short period during object construction, and only for custom objects. With a pointer to the vector, it need not be created for the majority of objects, and if it is created, it can be deleted when it's no longer needed. * gio/src/application.ccg: * glib/glibmm/main.cc: Add #include <mutex> that should have been there before, but now became necessary, when it was removed from objectbase.h.
* Glib::ObjectBase: overload get_property()Marcin Kolny2016-11-241-0/+14
| | | | | | | | * glib/glibmm/objectbase.h: add convenient overload of get_property(), which gives a property value as a return value, not as an output parameter. https://bugzilla.gnome.org/show_bug.cgi?id=771782
* Remove deprecated API.Murray Cumming2016-11-141-24/+0
|
* Remove deprecated Thread and Threads API.Murray Cumming2016-11-147-576/+0
|
* sigc3: SignalProxy: Use R(Args...) syntax.Murray Cumming2016-11-141-2/+12
| | | | Including using this in gmmproc.
* signal_proxy.h: Remove unused SignalProxy# aliases.Murray Cumming2016-11-141-19/+0
|
* sigc3: .h/.cc files: Use slot/signal<R(Args...)> syntax.Murray Cumming2016-11-1414-74/+74
|
* sigc3: SignalProxyConnectionNode: Derive from sigc::notifiable.Murray Cumming2016-11-142-6/+4
|
* sigc3: SourceConnectionNode: Derive from sigc::notifiable.Murray Cumming2016-11-141-15/+25
| | | | | This shows how having a sigc::notifiable base class is much nicer than using these objects as void* as in libsigc++-2.0.
* ustring: Add cbegin() and cend().Murray Cumming2016-11-082-0/+22
| | | | As in std::string since C++11.
* connection_add_exception_handler(): Use list<slot> instead of signal.Murray Cumming2016-07-051-6/+7
| | | | | | Because libsigc++ 2.10 deprecates signal::slots() and libsigc++ 3.0 now has no signal<>::slots() method. Using a signal for the list of slots seems rather non-obvious anyway.
* ustring: Add {} with a while().Murray Cumming2016-04-141-0/+3
| | | | To make this code slightly clearer.
* RefPtr: Make operator bool() explicit.Murray Cumming2016-04-101-5/+1
| | | | | | As in shared_ptr<>, for instance. See https://bugzilla.gnome.org/show_bug.cgi?id=626858#c4
* Fix some Doxygen warningsKjell Ahlstedt2016-04-031-1/+1
| | | | | | | | * glib/glibmm/property.h: More code within #ifndef DOXYGEN_SHOULD_SKIP_THIS. * glib/src/bytearray.hg: Change parameter name index_ to index. * tools/pm/DocsParser.pm: When the C parameter name does not coincide with the C++ name, change to the C++ name in the documentation also when the C name ends with an underscore.
* Glib::Property: allow to set property nick, blurb and flags.Marcin Kolny2016-04-014-19/+357
| | | | | | | | | | | | | | | | * .gitignore: add paramflags generated files to ignore list. * glib/glibmm.h: add paramflags header to include list. * glib/glibmm/property.{cc|}h: add constructors allowing set nick, blurb. Add getters for this values. and flags of property. * glib/glibmm/value.{cc|h}: * glib/src/filelist.am: add paramflags to a build. * glib/src/enums.{ccg|hg}: add GParamFlags enum wrapper. * glib/glibmm/value_basictypes.{cc|h}.m4: add overloaded create_param_spec() for setting additional property parameters. This patch fixes bug #755256
* C++11: .h/.cc files: Replace typedefs with using.Murray Cumming2016-03-3133-289/+289
|
* Move thread_local check into a GLIBMM_CXX_* macro, like other checks.Murray Cumming2016-03-282-12/+12
| | | | Bug #759791
* Build: Use Threads::Private hen thread_local keyword is not supported.Tom Schoonjans2016-03-282-0/+48
| | | | | | This fix is necessary for compilation of glibmm on OS X, as the clang compiler that currently ships with XCode currently does not support this keyword. Bug #759791
* Fix a tiny typo in a comment.Murray Cumming2016-03-081-1/+1
|
* Rearrange some multiline comments.Murray Cumming2016-02-273-8/+10
| | | | | | Putting the comment before the code, instead of to the right, because clang-format can not (and could not) know which comments are meant to be aligned. I prefer this anyway.
* Re-run clang-format on some files.Murray Cumming2016-02-2612-27/+27
| | | | | I need to make a subsequent commit to fix the now-unaligned trailing comments.
* Run clang-format on glib .cc files.Murray Cumming2016-02-2634-1591/+1833
|
* Run clang-format on glib .h files.Murray Cumming2016-02-2644-2261/+2316
|
* Run clang-format on the *_p.h files.Murray Cumming2016-02-262-7/+4
|
* C++11: Use emplace_back() instead of push_back().Murray Cumming2016-02-057-10/+10
|
* Add some connect() overloads that move the sigc::slotKjell Ahlstedt2016-02-0110-60/+202
| | | | | | | | | | | | | | | * glib/glibmm/dispatcher.[cc|h]: Add Dispatcher::connect(&&). * glib/glibmm/objectbase.[cc|h]: Add ObjectBase::connect_property_changed(&&) and ObjectBase::connect_property_changed_with_return(&&). * glib/glibmm/propertyproxy_base.[cc|h]: Add PropertyProxyConnectionNode(&&) ctor, PropertyProxyConnectionNode::connect_changed() and SignalProxyProperty::connect(&&). * glib/glibmm/signalproxy.[cc|h]: Add SignalProxyNormal::connect_impl_(&&), SignalProxy::connect(&&), SignalProxy::connect_notify(&&), SignalProxyDetailed::connect_impl_(&&), SignalProxyDetailedAnyType::connect(&&) and SignalProxyDetailedAnyType::connect_notify(&&). * glib/glibmm/signalproxy_connectionnode.[cc|h]: Add SignalProxyConnectionNode(&&) ctor
* Glib::PropertyBase: Make custom properties more flexibleKjell Ahlstedt2016-01-252-72/+77
| | | | | | | | * glib/glibmm/property.[h|cc]: Relax the requirements on Property<>. Now custom properties don't have to be direct data menbers of the containing type. Instead, all objects of a class must instantiate the same properties in the same order. This patch is an improved version of a patch supplied by Povilas Kanapickas <povilas@radix.lt>. Bug #731484.
* Glib::SignalProxy: use variadic templatesMarcin Kolny2016-01-212-0/+323
| | | | | | | | | | | | | | | * .gitignore: signalproxy.h file is no more generated, so it has been removed from ignored list. * gio/src/application.{ccg|hg}: don't use old-style SignalProxy class. * glib/glibmm/filelist.am: add signalproxy.h file to distributed files list. * gio/glibmm/signalproxy.h: add implementation of SignalProxy and SignalProxyDetailedAnyType. * glib/src/filelist.am: * glib/src/signalproxy.h.m4: signalproxy.h is not generated, thus remove m4 file. * tools/m4/signal.m4: use new SignalProxy class instead of SignalProxy*.
* Add Glib::c_str_or_nullptr()Kjell Ahlstedt2016-01-211-0/+9
| | | | | | | | * glib/glibmm/utility.h: Add Glib::c_str_or_nullptr(). Code such as "s.empty() ? nullptr : s.c_str()" can be replaced by Glib::c_str_or_nullptr(s) when C functions are called, where s is a std::string or a Glib::ustring. A very small part of a fix of bug #755245.
* utility: Correct the deprecation ifndef.Murray Cumming2016-01-181-5/+4
| | | | And correct the documentation.
* Glib::ustring fix gcc 6 warning in public headerAurelien Jacobs2016-01-181-1/+2
| | | | | Avoid a warning when compiling with gcc 6 with -Wmisleading-indentation. Bug #760641.
* Replace ScopedPtr with make_unique_ptr_gfree().Murray Cumming2016-01-184-31/+50
| | | | | Using std::unique_ptr. ScopedPtr is now deprecated. Bug #760223
* Glib::ustring: Add move operatorsKjell Ahlstedt2016-01-142-6/+49
| | | | Bug #760282
* Put deprecation ifdefs around GLIBMM_INITIALIZE_STRUCT.Murray Cumming2016-01-071-2/+7
| | | | It is already deprecated.
* C++11: Replace virtual keyword with override keyword on destructors.Murray Cumming2015-12-245-7/+7
| | | | This ensures that the base class is really virtual.
* Glib::ustring: Don't allow comparison to 0Kjell Ahlstedt2015-12-111-0/+18
| | | | | * glib/glibmm/ustring.h: Don't allow comparison of a ustring to an integer. Bug #572978.
* Fix the build with --disable-deprecated-apiKjell Ahlstedt2015-12-053-10/+5
| | | | | | | | | | | | | | | | * examples/thread/threadpool.cc: If --disable-deprecated-api, just print a message and exit. * gio/src/<several>.hg: Add _CONFIGINCLUDE(giommconfig.h). * gio/src/menuitem.ccg: Add a missing _DEPRECATE_IFDEF_START/_END pair. * glib/glibmm/sarray.h: * glib/glibmm/threadpool.[cc|h]: #include <glibmmconfig.h> before ifndef GLIBMM_DISABLE_DEPRECATED. * glib/src/filelist.am: Remove glibmm_files_deprecated_hg. List deprecated files in glibmm_files_any_hg. The config file must be included before #ifndef xxx_DISABLE_DEPRECATED both in the .h file and in the .cc file, or else deprecated API is not properly disabled by --disable-deprecated-api.
* Dispatcher: #include <mutex> in Windows builds.T Sailor2015-12-011-0/+1
| | | | Bug #758894
* glibmm/main: More declarations within #ifndef GLIBMM_DISABLE_DEPRECATEDKjell Ahlstedt2015-11-292-6/+7
| | | | | | | | | * glib/glibmm/main.h: Include 'namespace Threads' declarations only if GLIBMM_DISABLE_DEPRECATED is not defined. * glib/glibmm/main.cc: Inlude glibmm/threads.h only if GLIBMM_DISABLE_DEPRECATED is not defined. Use G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS instead of undefining G_DISABLE_DEPRECATED.
* Dispatcher: Actually delete thread_specific_instance_.Murray Cumming2015-11-281-1/+1
| | | | | As suggested by Kjell here: https://bugzilla.gnome.org/show_bug.cgi?id=757674#c17
* Use thread_local instead of Glib::Threads::Private.Murray Cumming2015-11-282-12/+10
| | | | See https://bugzilla.gnome.org/show_bug.cgi?id=757674#c15
* Use std::unique_lock::unlock() instead of release()Kjell Ahlstedt2015-11-281-3/+3
| | | | | | | * glib/blibmm/main.cc: * gio/src/application.ccg: Glib::Threads::Mutex::Lock::release() should have been replaced by std::unique_lock::unlock(). std::unique_lock::release() does not unlock the mutex. Bug #757674.
* Remove now-unnecessary includes of glibmm/threads.h.Murray Cumming2015-11-273-3/+0
|
* Dispatcher: Use std::mutex instead of Glib::Threads::Mutex.Murray Cumming2015-11-271-3/+3
|
* Deprecated Glib::ThreadPool.Murray Cumming2015-11-262-0/+14
| | | | | | Because we should encourage the use of 2 different thread APIs at the same time. Maybe std::async() does what a thread pool would do? If so, we should improve the deprecation documentation.