summaryrefslogtreecommitdiff
path: root/tools/m4
Commit message (Collapse)AuthorAgeFilesLines
* gmmproc: _WRAP_ENUM and _WRAP_GERROR: Add gtype_func parameterKjell Ahlstedt2019-01-072-7/+15
| | | | | | The M4 macro _GET_TYPE_FUNC() does not generate correct function names for GDBus* enums. This fix makes it possible to specify the function name in the call to _WRAP_ENUM or _WRAP_GERROR. See issue #37
* member.m4: Add _MEMBER_SET_STR, setter for stringsPavlo Solntsev2018-03-021-0/+21
| | | | | Introduce a macro to generate appropriate setter for a structure which has gchar* as a member. Bug 793778
* gmmproc: Remove obsolete TODO commentsKjell Ahlstedt2017-09-071-2/+2
|
* gmmproc: swap() implementations: Use std::swap().Murray Cumming2016-07-282-6/+2
| | | | Because this simplifies the code.
* gmmproc: Add optional argument err_return_value in _WRAP_VFUNCKjell Ahlstedt2016-06-021-8/+8
| | | | | | | | * tools/m4/vfunc.m4: * tools/pm/Output.pm: * tools/pm/WrapParser.pm: Add the optional argument err_return_value in _WRAP_VFUNC. This return value, if specified, applies only when the C++ vfunc throws an exception, which is propagated to the C callback function.
* gmmproc: Discard unused m4 sectionsKjell Ahlstedt2016-05-251-1/+1
| | | | | | | tools/m4/base.m4: At the end of the _END macro, discard all remaining sections. m4_divert(-1) + m4_undivert() was probably meant to do just that, but it does nothing. m4_divert(-1) + m4_undivert, without parentheses, discards all remaining sections. Bug #756593
* Remove trailing whitespace.Murray Cumming2016-05-166-18/+18
|
* Gio::DBus::Proxy: allow using GDBusProxy* conversion outside DBus namespaceMarcin Kolny2016-04-051-1/+1
| | | | | | * gio/src/dbusproxy.hg: fix _WRAP_METHOD usage * tools/m4/convert_gio.m4: update converstion definition - use Gio::DBus::Proxy instead of Proxy.
* gmmproc: Add 'deprecated' option in _WRAP_ENUM and _WRAP_GERRORKjell Ahlstedt2016-04-032-9/+21
| | | | | | | | | | | | | * tools/m4/enum.m4: * tools/m4/gerror.m4: Surround code and documentation by #ifndef xxx_DISABLE_DEPRECATED, if it's deprecated. * tools/pm/DocsParser.pm: lookup_enum_documentation(): Move the parsing of options to WrapParser. Add deprecation docs, if any. * tools/pm/Enum.pm: build_element_list(): Move the parsing of options to WrapParser. * tools/pm/Output.pm: output_wrap_enum(), output_wrap_enum_docs_only(), output_wrap_gerror(): Handle deprecation docs. * tools/pm/WrapParser.pm: Parse options in the new on_wrap_any_enum() function.
* gmmproc: _CLASS_GOBJECT(): allow provide custom moveMarcin Kolny2016-04-011-0/+15
| | | | | | | | | | operations. If class contains movable fields, custom move constructor and move assignment operator should be provided. Use macro _CUSTOM_MOVE_OPERATIONS for NOT generating default move operations. https://bugzilla.gnome.org/show_bug.cgi?id=756593
* C++11: gmmproc: Use using instead of typedef.Murray Cumming2016-03-3110-38/+38
|
* gmmproc: Fix errthrow in _WRAP_VFUNCKjell Ahlstedt2016-02-251-17/+25
| | | | | | * tools/m4/vfunc.m4: Propagate a Glib::Error exception to GError** error. Don't throw an exception in the callback function, called from C code. Bug #762437
* gmmproc: _MEMBER_GET: Remove extra spaces, indenting and trailing.Murray Cumming2016-02-111-24/+24
| | | | | | | By changing ) dnl to )dnl
* Glib::SignalProxy: use variadic templatesMarcin Kolny2016-01-211-12/+12
| | | | | | | | | | | | | | | * .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*.
* C++11: gmmproc: GObject/GInterface: Use override on destructor.Murray Cumming2015-12-242-2/+2
| | | | | | Don't repeat the virtual declaration from Glib::ObjectBase's destructor. Instead use override to show that we expect the base destructor to be virtual.
* gmmproc: _CONFIGINCLUDE() + _IS_DEPRECATED = #include in .cc fileKjell Ahlstedt2015-12-051-5/+19
| | | | | | | | | | * tools/m4/base.m4: If both _CONFIGINCLUDE() and _IS_DEPRECATED are used in the .hg file, then #include <xxxconfig.h> is included before ifndef xxx_DISABLE_DEPRECATED in the generated .cc file. This is useful if the mm module is configured with --disable-deprecated-api, because xxx_DISABLE_DEPRECATED is defined in the config file. The .cc file can be compiled, but does not generate any executable code. No need to exclude it from the build by tampering with the filelist.am file.
* gmmproc: Use nullptr instead of 0.Murray Cumming2015-11-203-12/+12
|
* gmmproc: _CLASS_GOBJECT(): Move = deleted stuff to public.Murray Cumming2015-09-221-4/+4
| | | | | It doesn't seem useful as private. The other classes already do this correctly.
* TlsClientConnection: Add copy_session_state().Murray Cumming2015-09-141-0/+3
|
* gmmproc: Make all move operations noexcept.Murray Cumming2015-08-312-8/+8
| | | | This is useful for standard containers, for instance.
* gmmproc: Make destructors explicitly noexcept.Murray Cumming2015-08-314-8/+8
|
* gmmproc: _CLASS_BOXEDTYPE_STATIC: Add copy operations.Murray Cumming2015-08-221-0/+15
| | | | | | | These were previously implicitly generated by the compiler, but are no longer generated because we now have explicit move operations. Being explicit seems like a better way to preserve ABI anyway.
* gmmproc: _CLASS_BOXEDTYPE: Make the static swap() noexcept.Murray Cumming2015-08-221-1/+1
| | | | | | | | | | | This is generally a good idea because it lets standard containers use the swap() while maintaining their own noexcept. This would not be an ABI break, hopefully, because this is an inline method in the header anyway. We have recently added the noexcept to the member swap() method, but hopefully that is not an ABI break either. Removing noexcept would be an ABI break, I think.
* gmmproc: _CLASS_OPAQUE_COPYABLE: Generate static swap().Murray Cumming2015-08-221-0/+11
| | | | | As in _CLASS_BOXEDTYPE(). This can then be used by std::swap(), used by standard containers.
* gmmproc: _CLASS_BOXEDTYPE_STATIC(): Add move operations.Murray Cumming2015-08-221-0/+18
| | | | Roughly as in _CLASS_BOXEDTYPE().
* gmmproc: _CLASS_OPAQUE_COPYABLE(): Add move operations.Murray Cumming2015-08-221-0/+26
| | | | The same as in _CLASS_BOXEDTYPE().
* C++11: Mark all _CLASS_OPAQUE_REFCOUNTED classes as final.Murray Cumming2015-08-221-3/+2
| | | | | | | | | | Because _CLASS_OPAQUE_REFCOUNTED already generates a comment telling us not to derive from them, presumably because they can only be instantiated by reinterpret_cast<>ing a base C struct. Ideally, _CLASS_OPAQUE_REFCOUNTED would add the final keyword, but the class line is is not generated, so that would be a little difficult.
* gmmproc: _CLASS_OPAQUE_REFCOUNTED: Use = delete for the default constructor.Murray Cumming2015-08-221-4/+6
| | | | And move it (and the = deleted copy operations) to public.
* gmmproc: _CLASS_GOBJECT(): Move operations: Call interfaces' move operations.Murray Cumming2015-08-223-0/+20
| | | | | The (virtual base) ObjectBase's move operations will not be called multiple times, so this might be useless, but it seems more complete.
* gmmproc: _CLASS_INTERFACE(): Generate move operations.Murray Cumming2015-08-221-0/+14
|
* gmmproc: _CLASS_GOBJECT(): Generate move operations.Murray Cumming2015-08-221-0/+14
| | | | | Generate move constructor and move assignment operator. These might never be used, but it seems generally wise to have them.
* Boxed types: Declare move operations as noexcept.Murray Cumming2015-08-151-6/+6
| | | | | | | | | Because this can let standard containers more efficiently reallocate memory while still preserving their own noexcept guarantees. I found out about this in Scott Meyer's Effective Modern C++11: Item 14. Likewise make swap() noexcept because we use it in our noexcept move assignment operator.
* C++11: Use = delete instead of private to make classes noncopyable.Murray Cumming2015-07-183-10/+9
|
* C++11: Use nullptr.Murray Cumming2015-07-166-10/+10
|
* C++11: gmmproc: Use of auto in generated files.Murray Cumming2015-07-157-28/+28
|
* C++11: _CLASS_BOXEDTYPE: Generate move constructors and assignment operators.Murray Cumming2015-07-091-0/+17
| | | | Bug #751432
* tools/m4/list.m4: GP_LIST: Remove this because nothing uses it.Murray Cumming2015-06-292-233/+0
| | | | | | | | I think this has not been used by any *mm projects since gtkmm-2.4 We can add it back if I am wrong. And we doing new gtkmm-2.4 releases is hard enough anyway so there isn't much point in keeping stuff around just for that.
* Add SettingsSchema, SettingsSchemaKey and SettingsSchemaSource.Murray Cumming2015-06-211-0/+8
| | | | | However, these are completely untested, and not all functions have been wrapped.
* gmmproc: _WRAP_METHOD: Use G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONSKjell Ahlstedt2015-06-171-22/+25
| | | | | | | * tools/m4/method.m4: Put G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS around deprecated code. In most cases it's then not necessary to undef [G|GDK|GTK]_DISABLE_DEPRECATED and define [GLIB|GDK]_DISABLE_DEPRECATION_WARNINGS. Bug #750379.
* gmmproc: _WRAP_SIGNAL: Add support for detail_nameKjell Ahlstedt2015-05-231-1/+33
| | | | | | | * tools/m4/signal.m4: * tools/pm/Output.pm: * tools/pm/WrapParser.pm: Add support for optional 'detail_name $name' and 'two_signal_methods' parameter in _WRAP_SIGNAL. Bug #749034.
* gmmproc: _WRAP_SIGNAL: Fix the exception_handler parameterKjell Ahlstedt2015-05-211-3/+3
| | | | | | * tools/m4/signal.m4: Fix the exception_handler parameter. It was added as a result of bug #735132, but the code was enough changed after it was copied from vfunc.m4.
* gmmproc: _WRAP_PROPERTY: Remove a line from the generated docsKjell Ahlstedt2015-04-131-1/+0
| | | | | | | * tools/m4/property.m4: Remove the line "You rarely need to use properties..." It's becoming less true. Some new glib and gtk+ classes (GSimpleIOStream, GtkModelButton, GtkPopoverMenu) have no public set/get methods corresponding to their properties.
* gmmproc: No #ifdef GLIBMM_*_ENABLED in generated codeKjell Ahlstedt2015-03-233-24/+0
| | | | | | | | * gio/src/asyncinitable.ccg: Remove #ifdef GLIBMM_EXCEPTIONS_ENABLED. * tools/m4/property.m4: No #ifdef GLIBMM_PROPERTIES_ENABLED in generated code. * tools/m4/signal.m4: * tools/m4/vfunc.m4: No #ifdef GLIBMM_EXCEPTIONS_ENABLED in generated code. These preprocessor macros are always defined.
* gmmproc: _WRAP_VFUNC: Add the keep_return parameterKjell Ahlstedt2015-03-171-18/+36
| | | | | | | | * glib/glibmm/utility.h: Add template function destroy_notify_delete(). * tools/pm/WrapParser.pm: * tools/pm/Output.pm: * tools/m4/vfunc.m4: Add optional parameter keep_return to _WRAP_VFUNC(). Bug #705124.
* Gio::Notification: Add set_priority() and enum NotificationPriorityKjell Ahlstedt2015-02-181-0/+1
| | | | | * gio/src/notification.hg: Add enum NotificationPriority and set_priority(). * tools/m4/convert_gio.m4: Add conversion of GNotificationPriority.
* gmmproc: Put DOXYGEN_SHOULD_SKIP_THIS around *_Class prototypes.Murray Cumming2015-02-032-0/+6
| | | | | | | | These predeclarations, such as below, seem to confuse doxygen. See bug #743918 . namespace Gtk { class Window_Class; } // namespace Gtk
* Gio: Added NetworkMonitor.Murray Cumming2014-12-151-0/+5
|
* gmmproc: Improve the conversion of Since to @newinKjell Ahlstedt2014-12-111-0/+2
| | | | | | * tools/m4/enum.m4: Add a blank line in the enum documentation. * tools/pm/Output.pm: Don't always add a blank line in the enum documentation. * tools/pm/DocsParser.pm: Improve the rules for conversion of Since to @newin.
* gmmproc: Tidy up the generation of enum docsKjell Ahlstedt2014-12-011-1/+1
| | | | | | | | | * tools/m4/gerror.m4: Add "/** " at the start of the documentation, like enum.m4 does. * tools/pm/DocsParser.pm: lookup_enum_documentation(): Don't add "/** " which is deleted by the caller. Add "\n * " with the right indentation. * tools/pm/Output.pm: output_wrap_enum(), output_wrap_enum_docs_only(), output_wrap_gerror(): Don't delete "/** ". Don't change indentation.
* gmmproc: _WRAP_GERROR: Add documentation to the generated enum CodeKjell Ahlstedt2014-11-211-3/+4
| | | | | | | | | | * tools/pm/Output.pm: output_wrap_gerror(): Get the enum documentation from the docs.xml file. * tools/m4/gerror.m4: Include the documentation before 'enum Code' in the generated code. _WRAP_GERROR was overlooked when José Alburquerque implemented the documentation of other enums (bug 544694).