summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools/extra_defs_gen/generate_extra_defs.cc: Update some commentsKjell Ahlstedt2014-04-081-9/+17
| | | | | | | * tools/extra_defs_gen/generate_extra_defs.cc: Change comments stating that get_properties() fails for GVolume. GVolume is an ordinary GInterface. If the first call is get_properties(G_TYPE_VOLUME), it fails if glib bug #465631 has not been fixed.
* gmmproc: Small improvement of enum documentationKjell Ahlstedt2014-04-081-9/+11
| | | | | | | * tools/pm/DocsParser.pm: Some small improvements of lookup_enum_documentation(). E.g. '\n' is replace by ' ' instead of removed, and G_NORMALIZE_DEFAULT is converted to NORMALIZE_DEFAULT instead of Normalize::DEFAULT. But still not perfect.
* TlsInteraction: Add certificate request methods.Murray Cumming2014-04-041-3/+7
| | | | | | * gio/src/tlsinteraction.hg: Add invoke_request_certificate(), request_certificate(), request_certificate_async() and request_certificate_finish().
* Application, ApplicationCommandLine: Wrap API that uses VariantDict.Murray Cumming2014-04-031-0/+2
| | | | | | | | | | * gio/src/application.hg: Add the handle-local-options signal. * gio/src/applicationcommandline: Add get_options_dict(). * tools/m4/convert_glib.m4: Add necessary conversions. I really need to try using this API so we can be sure that it is correct before calling it stable, because this part of the awful GApplication documentation is particularly awful.
* Add Glib::VariantDict, needed for GApplication.Murray Cumming2014-04-032-12/+13
| | | | | | | | | | | | | * glib/src/filelist.am: * glib/src/variantdict.[hg|ccg]: Add it as a generic refcounted type, with templated lookup_value() and insert_value() methods, though these are completely untested so far. * glib/src/variant.hg: Ignore a g_variant_dict_* function that gmmproc thinks is part of Variant. * tools/m4/convert_gio.m4: * tools/m4/convert_glib.m4: Move all Variant* conversion to the glib conversions and add a necessary one. * glib/glibmm.h: Include variantdict.h.
* genereate_defs_glib: Add some more glib GTypes.Murray Cumming2014-04-031-1/+11
| | | | | | Though we don't actually use them or need to use them. Still, it would be nice to see when something changes about these types.
* extra_defs: Add some new gio classes.Murray Cumming2014-04-022-0/+6
| | | | | | | * tools/extra_defs_gen/generate_defs_gio.cc: * tools/extra_defs_gen/generate_defs_glib.cc: Mention some recently-added GTypes. * gio/src/gio/gio_signals.defs: Regenerate.
* h2def.py: Handle *_DEPRECATED_IN_* and AVAILABLE_IN_* with 0 digits.Murray Cumming2014-03-281-2/+2
| | | | | * tools/defs_gen/h2def.py: clean_func(): Use 0-9 instead of just 1-9. clutter's headers showed that this was a problem.
* h2def.py: clean_func() also strip *_DEPRECATE_IN_*_FOR () without a space.Murray Cumming2014-03-281-1/+1
| | | | | | * tools/defs_gen/h2def.py: Because clutter has lines such as this: CLUTTER_DEPRECATED_IN_1_6_FOR(clutter_actor_animate and ClutterActor:depth) without a space after the FOR.
* Application: Add add_main_option_entry() and add_option_group().Murray Cumming2014-03-051-1/+1
| | | | | * gio/src/application.hg: Wrap g_application_add_main_option_entries() and g_application_add_option_group().
* gmmproc: Don't change NULL to 0 in docs, when it's part of a longer nameKjell Ahlstedt2014-01-311-3/+3
| | | | | * tools/pm/DocsParser.pm: Don't change NULL to 0, TRUE to true, FALSE to false, when they are part of a longer name.
* Gio::Action: Add parse_detailed_name() and parse_detailed_name_variant()Kjell Ahlstedt2014-01-301-0/+3
| | | | | | | * gio/src/action.hg: Add parse_detailed_name() and parse_detailed_name_variant(). * tools/m4/initialize_glib.m4: Add _INITIALIZATION of Glib::ustring& from gchar*.
* Add Gio::NotificationKjell Ahlstedt2014-01-281-0/+4
| | | | | | | | | * gio/src/application.hg: Add send_notification(), withdraw_notification(). * gio/src/notification.[hg|ccg]: New files. * gio/src/filelist.am: Add notification.hg. * gio/giomm.h: Add giomm/notification.h. * tools/m4/convert_gio.m4: Add conversions between GNotification and Gio::Notification. Bug #722896.
* tools: h2def.py: Handle *_DEPRECATED_IN_*_FOR (*)Murray Cumming2013-09-201-0/+4
|
* Gio::File: Add measure_disk_usage() and measure_disk_usage_async().Murray Cumming2013-09-201-0/+1
| | | | | | | | * gio/src/file.[hg|ccg]: Wrap g_file_measure_disk_usage(), g_file_measure_disk_usage_async() and g_file_measure_disk_usage_finish(), based on the copy() and copy_async() methods, which also have 2 slots. * tools/m4/convert_glib.m4: Add a conversion for guint64&.
* Port tools/defs_gen to Python 3.Kjell Ahlstedt2013-09-126-93/+90
| | | | | | | * .gitignore: Ignore /tools/defs_gen/__pycache__/. * tools/defs_gen/*.py: Port to Python 3. These Python sources now run with both Python 2 and Python 3. Tested with 2.7.3 and 3.2.3. Bug #690969.
* gmmproc: Pass NULL to C function calls for optional empty strings.José Alburquerque2013-09-081-7/+15
| | | | | | | | | | * tools/pm/Output.pm (convert_args_cpp_to_c): When generating conversions for the C++ arguments, if the argument is optional and it is a std::string or a Glib::ustring, prepend a check for the empty string to the standard conversion, passing NULL to the C function if the string is empty. Bug #686909.
* Revert "gmmproc: Pass 0 (NULL) instead of to C functions."Murray Cumming2013-09-081-4/+4
| | | | This reverts commit 5acce15576a91aec89c04b8fe5f8532b192acb71.
* gmmproc: Pass 0 (NULL) instead of to C functions.Murray Cumming2013-09-031-4/+4
| | | | | | | | | | * tools/m4/convert_glib.m4: Avoid passing "" to C functions because some C developers insist on treating "" and NULL differently even when there is no meaningful distinction and when that means obviously unwanted behaviour in response to the "". Bug #686909 And this should help with bug #702456 .
* gmmproc: Add parameter return_value in _WRAP_VFUNC.Marcin Kolny2013-08-313-13/+34
| | | | | | | * tools/m4/vfunc.m4: * tools/pm/Output.pm: * tools/pm/WrapParser.pm: Add parameter return_value in _WRAP_VFUNC. Bug #705699.
* gmmproc: Fix _WRAP_SIGNAL with 'ifdef' and 'deprecated'.Kjell Ahlstedt2013-08-152-51/+53
| | | | | | | | | * tools/pm/Output.pm: Since 2012-09-18 convert_args_cpp_to_c() returns an array. Use only the first array element ($conversions) when _SIGNAL_CC is written. * tools/pm/WrapParser.pm: _WRAP_SIGNAL: Fix the merge of a doxygen comment in a .hg file with a comment from the .defs file. Write #if[n]def directives before the merged comment. (Was in the middle of the comment.)
* enums.pl: fixed multi-argument defines as enum valuesloganek2013-08-021-2/+28
|
* Gio::MenuItem: Add set/unset_icon().Murray Cumming2013-07-311-0/+1
|
* Gio::Action, ActionGroup: Fix memory problems.Kjell Ahlstedt2013-07-301-1/+1
| | | | | | * gio/src/action.ccg: get_state_bool(): Unref GVariant. * tools/m4/convert_gio.m4: Take a copy when const GVariantType* is converted to Glib::VariantType. Affects Action and ActionGroup. Bug #690134.
* tools: Add docs to the default constructor of _CLASS_OPAQUE_COPYABLE.Kjell Ahlstedt2013-07-231-0/+4
| | | | | | * tools/m4/class_opaque_copyable.m4: Add documentation to the generated default constructor, mentioning that the constructed object is invalid. Bug #704639.
* Use std::memset() instead of GLIBMM_INITIALIZE_STRUCT.Kjell Ahlstedt2013-07-101-2/+4
| | | | | | | | | * glib/glibmm/utility.h: Add a comment that GLIBMM_INITIALIZE_STRUCT is deprecated. It generates compiler warnings when __STRICT_ANSI__ is defined. * glib/glibmm/value.cc: * glib/src/optiongroup.ccg: * tools/m4/class_boxedtype_static.m4: Replace GLIBMM_INITIALIZE_STRUCT by std::memset().
* docextract_to_xml.py: Add '⇒' to the list of escape sequences.José Alburquerque2013-06-301-0/+1
| | | | | * tools/defs_gen/docextract_to_xml.py: It represents a right arrow and some C API documentation uses it.
* gmmproc: Add _WRAP_ENUM_DOCS_ONLY() and simplify enum docs process.José Alburquerque2013-06-304-72/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/pm/DocsParser.pm (lookup_enum_documentation): Renamed from lookup_enum_description(). This subroutine now produces the entire Doxygen enum documentation block. (lookup_enum_value_documentation): Removed this subroutine because it's been merged into the above one. (convert_tags_to_doxygen): Don't convert the Doxygen @enum and @var tags because they appear in the enum documentation obtained from the subroutine above. * tools/pm/Enum.pm (build_element_list): Remove the lines that insert the Doxygen documentation individually for each of the members of the enum because the enum member documentation is already included by the lookup_enum_documentation() subroutine above. * tools/pm/Output.pm (output_wrap_enum): Modified to use the above lookup_enum_documentation() subroutine. (output_wrap_enum_docs_only): Added this subroutine that outputs an enum's Doxygen documentation block if the enum's documentation exists. This is useful for complexly defined C enums (using C macros, for example) that can't presently be wrapped with _WRAP_ENUM() and must be handwritten but outputting their documentation is still desired. (output_wrap_failed): Also produce the source file which caused a _WRAP_* to fail so that it is clear where the error is. * tools/pm/WrapParser.pm (parse_and_build_output): Also check for a _WRAP_ENUM_DOCS_ONLY() so it can be processed. (on_wrap_enum_docs_only): Called by the parse_and_build_output() subroutine above when a _WRAP_ENUM_DOCS_ONLY() is found. Bug #703155.
* Gen Scripts: Minor clean up of the description of the scripts.José Alburquerque2013-06-108-25/+24
| | | | | | | | | | | * tools/gen_scripts/gio_generate_docs.sh: * tools/gen_scripts/gio_generate_enums.sh: * tools/gen_scripts/gio_generate_extra_defs.sh: * tools/gen_scripts/gio_generate_methods.sh: * tools/gen_scripts/glib_generate_docs.sh: * tools/gen_scripts/glib_generate_enums.sh: * tools/gen_scripts/glib_generate_extra_defs.sh: * tools/gen_scripts/glib_generate_methods.sh:
* gmmproc: Use an environment variable for the return mismatches.José Alburquerque2013-06-091-7/+7
| | | | | | | | * tools/gmmproc.in: Check for the GMMPROC_RETURN_MISMATCHES environment variable and use its value as the default for the internal boolean '$main::return_mismatches' variable which when true makes gmmproc report if the return type in a _WRAP_METHOD() does not match the C function return type.
* gmmproc: Write glibmm version in generated files.Kjell Ahlstedt2013-06-073-11/+14
| | | | | | | | | * tools/gmmproc.in: Use autoconf's substitution variable @PACKAGE_VERSION@. * tools/m4/base.m4: _START() macro: Add argument glibmm_version. * tools/pm/Output.pm: output_temp_g1(): Add argument glibmm_version. The problems with gtkmm 2.24.3 (bug 697835 and bug 700495) show that it can be useful to easily see which version of gmmproc/glibmm has generated a file.
* Gio::DBusInterfaceSkeleton: Constant corrections.José Alburquerque2013-06-061-0/+1
| | | | | | | | | * gio/src/dbusinterfaceskeleton.hg (get_info): Add a const get_info() method returning a constant InterfaceInfo and make the original one non-constant. (has_connection): Accept the Connection as constant because it should not be modified. * tools/m4/convert_gio.m4: Add a needed conversion.
* giomm: Add the Gio::DBus::InterfaceSkeleton class.José Alburquerque2013-06-052-0/+5
| | | | | | | | | | | | | * gio/src/dbusinterfaceskeleton.{ccg,hg}: * gio/src/filelist.am: Add the sources wrapping the methods, properties and signals and list the sources in the list of files to be built. * gio/src/gio_signals.defs: * tools/extra_defs_gen/generate_defs_gio.cc: Add the GDBUSInterfaceSkeleton GType to the properties and signals defs generation tool and regenerate the .defs file. * tools/m4/convert_gio.m4: Add the conversions for the wrapped methods, properties and signals.
* tools: Improve the testheaders.sh script.Kjell Ahlstedt2013-05-211-0/+5
| | | | * tools/test_scripts/testheaders.sh: Stop if pkg-config fails.
* tools: Add the testheaders.sh script.Kjell Ahlstedt2013-05-181-0/+80
| | | | | * tools/test_scripts/testheaders.sh: New file. Compiles each specified header file, one at a time. Bug #697835.
* tools: Add the testmmh.sh script.Kjell Ahlstedt2013-05-181-0/+38
| | | | | * tools/test_scripts/testmmh.sh: New file. Checks if all header files are included in a <name>mm.h file. Bug #699993.
* gmmproc: Output.pm: Use a better name for the c param mappings hash.José Alburquerque2013-04-291-11/+11
| | | | | | | * tools/pm/Output.pm (output_wrap_meth, convert_args_cpp_to_c, get_ctor_properties): Replace the 'cpp_param_mappings' variable name with 'c_param_name_mappings' which describes the function of the hash a little better.
* tools: Remove blank lines in files.José Alburquerque2013-04-296-12/+12
|
* Output.pm: convert_args_c_to_cpp(): Reverse mappings hash correctly.José Alburquerque2013-04-291-2/+4
| | | | | | | | | | * tools/pm/Output.pm (convert_args_c_to_cpp): Reverse the hash that maps from parameter names to indexes to a hash that maps from indexes to parameter names correctly (by dereferencing the hash reference) so that parameter reordering for virtual functions works for all Perl versions. Bug #698989 (David Evans, John Ralls)
* gmmproc: Fix _WRAP_SIGNAL(custom_c_callback) for void func().Kjell Ahlstedt2013-04-291-2/+3
| | | | | | | * tools/m4/signal.m4: If custom_c_callback is specified, and the signal handler takes no arguments and returns void, generate a SignalProxyInfo structure with pointers to local functions instead of &Glib::SignalProxyNormal::slot0_void_callback. Bug #605728.
* gmmproc: Parse the argument list of methods correctly.José Alburquerque2013-04-101-52/+22
| | | | | | | | | | | | | | | | | | * tools/pm/Function.pm (parse_param): When splitting the argument list split the parameter '{...}' options out and separately and deal with them in their own 'elsif' which is more clear and avoids code duplication. Also, don't split the '<...>' matches greedily because that causes problems when a Glib::RefPtr<> parameter has a default value. This problem was discovered while trying to not use the optional parameter syntax for the Gio::TlsCertificate::verify() method by using a default value for the 'trusted_ca' parameter although upon investigation it became clear that keeping the syntax (and the method overloads) would be useful because a verify() with no parameters can be used to verify things about a certificate unrelated to the identity and the trusted_ca (see the TlsCertificateFlags enum that the method returns).
* Gio::TlsClientConnection: Make the class work correctly.José Alburquerque2013-04-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/m4/class_interface.m4 (_CUSTOM_CTOR_CAST): Add a new macro so that classes wrapped by the _CLASS_INTERFACE() macro can implement a custom cast constructor. This is so that classes like Tls[Client|Server]Connection, that derive from Glib::Interface but should also derive from a Glib::Object derived type, though they do not do so in the C API, don't produce warnings from an attempt to set the non-existent properties of the GObject derived type when an attempt to construct the C object is made in the default Glib::Object constructor. Glib::wrap_auto_interface<>(), which is called by Glib::wrap() for interfaces, uses the cast constructor to create the wrapper which calls the cast constructor of Glib::Interface. If the Glib::Object derived base class of the wrapper has a default constructor, that constructor is then called which leads to the Glib::Object default constructor being called, which tries to construct the C object and set its properties thus producing the property setting warnings. A custom cast constructor can chain up to the cast constructor of the Glib::Object derived type thus avoiding the call to the Glib::Object default constructor and the non-existent property setting warnings. * glib/glibmm/interface.cc: * glib/glibmm/interface.h (Interface): Add a default constructor so that in the cases above (when the cast constructor of the Glib::Object's derived type is used), the compiler can find a Glib::Interface default constructor to use. Using the Glib::Interface cast constructor as well as the cast constructor of the Glib::Object derived type would cause "ObjectBase::initialize() called twice for the same GObject" errors.
* Gio::SocketClient: Added some methods.Murray Cumming2013-03-251-0/+2
| | | | | | | | | * gio/src/socketclient.hg: Added get/set_tls(), get/set_tls_validation_flags(), get/set_proxy_resolver(). Added timeout, tls, enable-proxy, tls-validation, and proxy-resolver properties. Added the event signal. * tools/m4/convert_gio.m4: Added necessary conversions.
* gmmproc: Verify that void methods should not return a value.José Alburquerque2013-03-223-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | * tools/gmmproc.in: ($main::return_mismatches): Add boolean to store whether method return mismatches should be checked. Make it false by default. (parse_command_line_args): Add logic to parse a new --return-mismatches option to specify if gmmproc should verify that void methods should not return a value. (print_usage): Modify the usage message to describe the new option. For convenience, output the source for which there are unwrapped functions, properties and signals. * tools/pm/DocsParser.pm (remove_example_code): Also output the source being processed when the example code is removed (for convenience). * tools/pm/Output.pm (error): Once more, output the source being processed when an error occurs, for convenience. (convert_args_cpp_to_c): Add a check for when the C++ method for which the parameters are being converted returns void but the C function does not return void. If the added option above is specified, output a warning. Bug #696364.
* Gio::FileInfo: Added get_deletion_date().Murray Cumming2013-03-211-0/+1
| | | | | | * glib/src/fileenumerator.hg: Wrap the new g_file_info_get_deletion_date() function. * tools/m4/convert_glib.m4: Add a necessary conversion.
* h2def.py: Handle GLIB_AVAILABLE_IN_ALLMurray Cumming2013-03-191-0/+4
| | | | | | | | | | * tools/defs_gen/h2def.py: Do not just ignore functions prefixed with GLIB_AVAILABLE_IN_ALL. This handles the latest glib/gio/gactiongroup.h file. However, we still need to handle the new GLIB_DEPRECATED_IN_2_36_FOR(old_func) form now used in glib/gio/gioschedule.h.
* Tls*: Add the rest of the (unwrapped) properties, methods and vfuncs.José Alburquerque2013-02-261-1/+3
| | | | | | | | | | | | | | | * gio/src/tlscertificate.{ccg,hg}: Wrap the "certificate" property. * gio/src/tlsclientconnection.hg: Add the get_accepted_cas() methods and the "accepted-cas" property. * gio/src/tlsdatabase.hg: Add the lookup_certificates_issued_by*() methods and virtual functions. Correct a TlsCertificate conversion for the virtual functions so that the underlying GObject is properly copied from the C++ wrapper. * tools/m4/convert_gio.m4: Add a ByteArray conversion. * gio/src/tlspassword.hg: Clarify a TODO. * glib/glibmm.h: Add bytes.h and bytearray.h to the includes.
* glibmm: Add ByteArray.José Alburquerque2013-02-251-0/+3
| | | | | | | | | | | * glib/src/bytearray.{ccg,hg}: * glib/src/filelist.am: Add the new sources for the ByteArray class that wraps GByteArray and include the sources in the build. Some of the GTls* API uses GByteArray so it is necessary to wrap it. * glib/src/glib_extra_objects.defs: Include an object definition for GByteArray to avoid a gmmproc documentation warning. * tools/m4/convert_glib.m4: Add a GByteArray conversion so the sources can be processed properly.
* gmmproc: Improve the conversion of documentation to Doxygen format.Kjell Ahlstedt2013-01-294-29/+85
| | | | | | | | | | * tools/defs_gen/docextract.py: Handle 'Since ' without a colon. * tools/m4/signal.m4: * tools/pm/Output.pm: When a function declaration is surrounded by ifdef/endif, put its documentation inside the ifdef/endif. * tools/pm/DocsParser.pm: Handle 'Since ' without a colon. Escape most backslashes, not just \r and \n. Convert more <tags> to something that Doxygen understands.
* TlsConnection: Wrap the virtual functions.José Alburquerque2013-01-171-5/+5
| | | | | | | | | | * gio/src/tlsconnection.hg: Wrap the three virtual functions that were left as TODO's now that it's possible to wrap virtual functions with slots. * tools/m4/vfunc.m4: Use 'retval' instead of 'result' for variables that store the result of the C base virtual function invocation and the C++ virtual function invocation because 'result' conflicts with the AsyncResult 'result' parameter of the handshake_finish_vfunc().