From 59501e18aca137b97cb075caef25a7d15493cb10 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Sun, 6 Sep 2020 23:38:02 -0700 Subject: [PATCH] Imported Upstream version 2.33.2 --- ChangeLog | 50 ++ NEWS | 5 + configure.ac | 4 +- gio/src/gio_docs.xml | 1174 +++++++++++++++++++++++-- gio/src/gio_enums.defs | 36 +- gio/src/gio_methods.defs | 364 +++++++- gio/src/gio_signals.defs | 27 + glib/src/glib_docs.xml | 156 +++- glib/src/glib_enums.defs | 4 +- glib/src/glib_functions.defs | 10 + glib/src/gobject_functions.defs | 6 + tools/gen_scripts/gio_generate_docs.sh | 13 +- tools/gen_scripts/gio_generate_enums.sh | 13 +- tools/gen_scripts/gio_generate_extra_defs.sh | 3 +- tools/gen_scripts/gio_generate_methods.sh | 13 +- tools/gen_scripts/glib_generate_docs.sh | 13 +- tools/gen_scripts/glib_generate_enums.sh | 14 +- tools/gen_scripts/glib_generate_extra_defs.sh | 3 +- tools/gen_scripts/glib_generate_methods.sh | 17 +- 19 files changed, 1744 insertions(+), 181 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15b8b77..dd77723 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,53 @@ +2.33.2: + +2012-06-19 Murray Cumming + + gio_signals.defs: Regenerate. + + * gio/src/gio_signals.defs: Regenerate with gen_scripts. + +2012-06-19 Murray Cumming + + gen_scripts: Correct some comments/documentation. + + * tools/gen_scripts/gio_generate_extra_defs.sh: + * tools/gen_scripts/glib_generate_extra_defs.sh: + These do not need JHBUILD_SOURCES to be defined. + +2012-06-13 Murray Cumming + + Updated the *docs.xml files. + + * gio/src/gio_docs.xml: + * glib/src/glib_docs.xml: Used the gen_scripts. + +2012-06-13 Murray Cumming + + Updated the methods .defs. + + * gio/src/gio_methods.defs: + * glib/src/glib_functions.defs: + * glib/src/gobject_functions.defs: Used the gen_scripts. + +2012-06-13 Murray Cumming + + Updated the enums .defs. + + * gio/src/gio_enums.defs: + * glib/src/glib_enums.defs: Used the gen_scripts. + +2012-06-13 Murray Cumming + + Simplify the gen_scripts slightly. + + * tools/gen_scripts/gio_generate_docs.sh: + * tools/gen_scripts/gio_generate_enums.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_methods.sh: + Do not require changes to PATH. + 2.33.1 (unstable): 2012-06-08 Michał Wróbel diff --git a/NEWS b/NEWS index 56c2f81..9db40eb 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +2.33.2 (unstable): + +* Added some enum values and documentation. + (Murray Cumming) + 2.33.1 (unstable): Gio: diff --git a/configure.ac b/configure.ac index 5e27956..e488e39 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . -AC_INIT([glibmm], [2.33.1], +AC_INIT([glibmm], [2.33.2], [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm], [glibmm], [http://www.gtkmm.org/]) AC_PREREQ([2.59]) @@ -60,7 +60,7 @@ AS_IF([test "x$enable_static" = xyes], AC_DEFINE([GIOMM_STATIC_LIB], [1], [Define if giomm is built as a static library]) ]) -glibreq='2.0 >= 2.33.1' +glibreq='2.0 >= 2.33.2' GLIBMM_MODULES="sigc++-2.0 >= 2.2.10 glib-$glibreq gobject-$glibreq gmodule-$glibreq" GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq" diff --git a/gio/src/gio_docs.xml b/gio/src/gio_docs.xml index 494b5c7..ad03118 100644 --- a/gio/src/gio_docs.xml +++ b/gio/src/gio_docs.xml @@ -1593,6 +1593,28 @@ cancellable signal should not do something that can block. + + +Emitted to check if @mechanism is allowed to be used. + +Since: 2.34 + + + + + The #GDBusAuthObserver emitting the signal. + + + + The name of the mechanism, e.g. <literal>DBUS_COOKIE_SHA1</literal>. + + + + %TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not. + + + + Emitted to check if a peer that is successfully authenticated @@ -2146,7 +2168,7 @@ Since: 2.22 Emitted when @file has been changed. If using #G_FILE_MONITOR_SEND_MOVED flag and @event_type is -#G_FILE_MONITOR_SEND_MOVED, @file will be set to a #GFile containing the +#G_FILE_MONITOR_EVENT_MOVED, @file will be set to a #GFile containing the old path, and @other_file will be set to a #GFile containing the new path. In all the other cases, @other_file will be set to #NULL. @@ -17190,6 +17212,12 @@ content types from a given @appinfo, %FALSE if not. Creates a new #GAppInfo from the given information. +Note that for @commandline, the quoting rules of the Exec key of the +<ulink url="http://freedesktop.org/Standards/desktop-entry-spec">freedesktop.org Desktop +Entry Specification</ulink> are applied. For example, if the @commandline contains +percent-encoded URIs, the percent-character must be doubled in order to prevent it from +being swallowed by Exec key unquoting. See the specification for exact quoting rules. + @@ -17528,6 +17556,30 @@ for given @content_type or %NULL on error. + + +Retrieves the list of content types that @app_info claims to support. +If this information is not provided by the environment, this function +will return %NULL. +This function does not take in consideration associations added with +g_app_info_add_supports_type(), but only those exported directly by +the application. + +Since: 2.34 + + + + + a #GAppInfo that can handle files + + + + +a list of content types. + + + + Launches the application. Passes @files to the launched application @@ -18290,6 +18342,67 @@ Since: 2.28 + + +Gets the #GDBusConnection being used by the application, or %NULL. + +If #GApplication is using its D-Bus backend then this function will +return the #GDBusConnection being used for uniqueness and +communication with the desktop environment and other instances of the +application. + +If #GApplication is not using D-Bus then this function will return +%NULL. This includes the situation where the D-Bus backend would +normally be in use but we were unable to connect to the bus. + +This function must not be called before the application has been +registered. See g_application_get_is_registered(). + +Since: 2.34 + + + + + a #GApplication + + + + a #GDBusConnection, or %NULL + + + + + + +Gets the D-Bus object path being used by the application, or %NULL. + +If #GApplication is using its D-Bus backend then this function will +return the D-Bus object path that #GApplication is using. If the +application is the primary instance then there is an object published +at this path. If the application is not the primary instance then +the result of this function is undefined. + +If #GApplication is not using D-Bus then this function will return +%NULL. This includes the situation where the D-Bus backend would +normally be in use but we were unable to connect to the bus. + +This function must not be called before the application has been +registered. See g_application_get_is_registered(). + +Since: 2.34 + + + + + a #GApplication + + + + the object path, or %NULL + + + + Returns the default #GApplication instance for this process. @@ -18454,7 +18567,11 @@ Creates a new #GApplication instance. This function calls g_type_init() for you. -The application id must be valid. See g_application_id_is_valid(). +If non-%NULL, the application id must be valid. See +g_application_id_is_valid(). + +If no application ID is given then some features of #GApplication +(most notably application uniqueness) will be disabled. @@ -18547,6 +18664,9 @@ primary instance. This is implemented by attempting to acquire the application identifier as a unique bus name on the session bus using GDBus. +If there is no application ID or if %G_APPLICATION_NON_UNIQUE was +given, then this process will always become the primary instance. + Due to the internal architecture of GDBus, method calls can be dispatched at any time (even if a main loop is not running). For this reason, you must ensure that any object paths that you wish to @@ -18556,7 +18676,8 @@ If the application has already been registered then %TRUE is returned with no work performed. The #GApplication::startup signal is emitted if registration succeeds -and @application is the primary instance. +and @application is the primary instance (including the non-unique +case). In the event of an error (such as @cancellable being cancelled, or a failure to connect to the session bus), %FALSE is returned and @error @@ -18732,7 +18853,8 @@ Sets the unique identifier for @application. The application id can only be modified if @application has not yet been registered. -The application id must be valid. See g_application_id_is_valid(). +If non-%NULL, the application id must be valid. See +g_application_id_is_valid(). Since: 2.28 @@ -22435,6 +22557,28 @@ Since: 2.26 + + +Emits the #GDBusAuthObserver::allow-mechanism signal on @observer. + +Since: 2.34 + + + + + A #GDBusAuthObserver. + + + + The name of the mechanism, e.g. <literal>DBUS_COOKIE_SHA1</literal>. + + + + %TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not. + + + + Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer. @@ -23331,6 +23475,29 @@ Since: 2.26 + + +Retrieves the last serial number assigned to a #GDBusMessage on +the current thread. This includes messages sent via both low-level +API such as g_dbus_connection_send_message() as well as +high-level API such as g_dbus_connection_emit_signal(), +g_dbus_connection_call() or g_dbus_proxy_call(). + +Since: 2.34 + + + + + A #GDBusConnection. + + + + the last used serial or zero when no message has been sent +within the current thread. + + + + Gets the credentials of the authenticated peer. This will always @@ -29222,6 +29389,27 @@ otherwise. + + +Retrieves the StartupWMClass field from @app_info. This represents the +WM_CLASS property of the main window of the application, if launched through +@app_info. + +Since: 2.34 + + + + + a #GDesktopAppInfo that supports startup notify + + + + the startup WM class, or %NULL if none is set +in the desktop file. + + + + This function performs the equivalent of g_app_info_launch_uris(), @@ -37693,7 +37881,7 @@ operation will finish as much as possible. A stream that failed to close will still return %G_IO_ERROR_CLOSED for all operations. Still, it is important to check and report the error to the user. -If @cancellable is not NULL, then the operation can be cancelled by +If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Cancelling a close will still leave the stream closed, but some streams @@ -37829,9 +38017,9 @@ It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file. Zero is returned on end of file (or if @count is zero), but never otherwise. -If @cancellable is not NULL, then the operation can be cancelled by +If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an +was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. @@ -37861,7 +38049,7 @@ On error -1 is returned and @error is set accordingly. - Number of bytes read, or -1 on error + Number of bytes read, or -1 on error, or 0 on end of file. @@ -37974,6 +38162,136 @@ of the request. + + +Like g_input_stream_read(), this tries to read @count bytes from +the stream in a blocking fashion. However, rather than reading into +a user-supplied buffer, this will create a new #GBytes containing +the data that was read. This may be easier to use from language +bindings. + +If count is zero, returns a zero-length #GBytes and does nothing. A +value of @count larger than %G_MAXSSIZE will cause a +%G_IO_ERROR_INVALID_ARGUMENT error. + +On success, a new #GBytes is returned. It is not an error if the +size of this object is not the same as the requested size, as it +can happen e.g. near the end of a file. A zero-length #GBytes is +returned on end of file (or if @count is zero), but never +otherwise. + +If @cancellable is not %NULL, then the operation can be cancelled by +triggering the cancellable object from another thread. If the operation +was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an +operation was partially finished when the operation was cancelled the +partial result will be returned, without an error. + +On error %NULL is returned and @error is set accordingly. + + + + + + a #GInputStream. + + + + maximum number of bytes that will be read from the stream. Common +values include 4096 and 8192. + + + + optional #GCancellable object, %NULL to ignore. + + + + location to store the error occurring, or %NULL to ignore + + + + a new #GBytes, or %NULL on error + + + + + +Request an asynchronous read of @count bytes from the stream into a +new #GBytes. When the operation is finished @callback will be +called. You can then call g_input_stream_read_bytes_finish() to get the +result of the operation. + +During an async request no other sync and async calls are allowed +on @stream, and will result in %G_IO_ERROR_PENDING errors. + +A value of @count larger than %G_MAXSSIZE will cause a +%G_IO_ERROR_INVALID_ARGUMENT error. + +On success, the new #GBytes will be passed to the callback. It is +not an error if this is smaller than the requested size, as it can +happen e.g. near the end of a file, but generally we try to read as +many bytes as requested. Zero is returned on end of file (or if +@count is zero), but never otherwise. + +Any outstanding I/O request with higher priority (lower numerical +value) will be executed before an outstanding request with lower +priority. Default priority is %G_PRIORITY_DEFAULT. + + + + + A #GInputStream. + + + + the number of bytes that will be read from the stream + + + + the <link linkend="io-priority">I/O priority</link> +of the request. + + + + optional #GCancellable object, %NULL to ignore. + + + + callback to call when the request is satisfied + + + + the data to pass to callback function + + + + + + + + +Finishes an asynchronous stream read-into-#GBytes operation. + + + + + + a #GInputStream. + + + + a #GAsyncResult. + + + + a #GError location to store the error occurring, or %NULL to +ignore. + + + + the newly-allocated #GBytes, or %NULL on error + + + Finishes an asynchronous stream read operation. @@ -37995,7 +38313,7 @@ ignore. - number of bytes read in, or -1 on error. + number of bytes read in, or -1 on error, or 0 on end of file. @@ -39198,6 +39516,26 @@ Returns a new #GVfs handle for a local vfs. + + +Appends @bytes to data that can be read from the input stream. + +Since: 2.34 + + + + + a #GMemoryInputStream + + + + input data + + + + + + Appends @data to data that can be read from the input stream @@ -39236,6 +39574,23 @@ Creates a new empty #GMemoryInputStream. + + +Creates a new #GMemoryInputStream with data from the given @bytes. + +Since: 2.34 + + + + + a #GBytes + + + + new #GInputStream read from @bytes + + + Creates a new #GMemoryInputStream with data in memory of a given size. @@ -39372,6 +39727,25 @@ finalized, or %NULL + + +Returns data from the @ostream as a #GBytes. @ostream must be +closed before calling this function. + +Since: 2.34 + + + + + a #GMemoryOutputStream + + + + the stream's data + + + + Gets any loaded data from the @ostream. Ownership of the data @@ -39416,7 +39790,7 @@ Since: 2.28 Convenience function for appending a normal menu item to the end of -@menu. Combine g_menu_new() and g_menu_insert_item() for a more +@menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative. Since: 2.32 @@ -39647,7 +40021,7 @@ Since: 2.32 Convenience function for inserting a normal menu item into @menu. -Combine g_menu_new() and g_menu_insert_item() for a more flexible +Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative. Since: 2.32 @@ -40616,7 +40990,7 @@ Since: 2.32 Convenience function for prepending a normal menu item to the start -of @menu. Combine g_menu_new() and g_menu_insert_item() for a more +of @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more flexible alternative. Since: 2.32 @@ -42224,7 +42598,7 @@ close will still return %G_IO_ERROR_CLOSED for all operations. Still, it is important to check and report the error to the user, otherwise there might be a loss of data as all data might not be written. -If @cancellable is not NULL, then the operation can be cancelled by +If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. Cancelling a close will still leave the stream closed, but there some streams @@ -42609,7 +42983,7 @@ storage in the stream. All writes block until at least one byte is written or an error occurs; 0 is never returned (unless @count is 0). -If @cancellable is not NULL, then the operation can be cancelled by +If @cancellable is not %NULL, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an operation was partially finished when the operation was cancelled the @@ -42658,7 +43032,7 @@ write as many bytes as requested, only stopping on an error. On a successful write of @count bytes, %TRUE is returned, and @bytes_written is set to @count. -If there is an error during the operation FALSE is returned and @error +If there is an error during the operation %FALSE is returned and @error is set to indicate the error status, @bytes_written is updated to contain the number of bytes written into the stream before the error occurred. @@ -42762,6 +43136,137 @@ g_output_stream_write(). + + +Tries to write the data from @bytes into the stream. Will block +during the operation. + +If @bytes is 0-length, returns 0 and does nothing. A #GBytes larger +than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. + +On success, the number of bytes written to the stream is returned. +It is not an error if this is not the same as the requested size, as it +can happen e.g. on a partial I/O error, or if there is not enough +storage in the stream. All writes block until at least one byte +is written or an error occurs; 0 is never returned (unless +the size of @bytes is 0). + +If @cancellable is not %NULL, then the operation can be cancelled by +triggering the cancellable object from another thread. If the operation +was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an +operation was partially finished when the operation was cancelled the +partial result will be returned, without an error. + +On error -1 is returned and @error is set accordingly. + + + + + + a #GOutputStream. + + + + the #GBytes to write + + + + optional cancellable object + + + + location to store the error occurring, or %NULL to ignore + + + + Number of bytes written, or -1 on error + + + + + +Request an asynchronous write of the data in @bytes to the stream. +When the operation is finished @callback will be called. You can +then call g_output_stream_write_bytes_finish() to get the result of +the operation. + +During an async request no other sync and async calls are allowed, +and will result in %G_IO_ERROR_PENDING errors. + +A #GBytes larger than %G_MAXSSIZE will cause a +%G_IO_ERROR_INVALID_ARGUMENT error. + +On success, the number of bytes written will be passed to the +@callback. It is not an error if this is not the same as the +requested size, as it can happen e.g. on a partial I/O error, +but generally we try to write as many bytes as requested. + +You are guaranteed that this method will never fail with +%G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the +method will just wait until this changes. + +Any outstanding I/O request with higher priority (lower numerical +value) will be executed before an outstanding request with lower +priority. Default priority is %G_PRIORITY_DEFAULT. + +For the synchronous, blocking version of this function, see +g_output_stream_write_bytes(). + + + + + A #GOutputStream. + + + + The bytes to write + + + + the io priority of the request. + + + + optional #GCancellable object, %NULL to ignore. + + + + callback to call when the request is satisfied + + + + the data to pass to callback function + + + + + + + + +Finishes a stream write-from-#GBytes operation. + + + + + + a #GOutputStream. + + + + a #GAsyncResult. + + + + a #GError location to store the error occurring, or %NULL to +ignore. + + + + a #gssize containing the number of bytes written to the stream. + + + Finishes a stream write operation. @@ -43180,7 +43685,7 @@ next attempt to read will return the error. -Attempts to read up to @size bytes from @stream into @buffer, as +Attempts to read up to @count bytes from @stream into @buffer, as with g_input_stream_read(). If @stream is not currently readable, this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can use g_pollable_input_stream_create_source() to create a #GSource @@ -43201,11 +43706,11 @@ Virtual: read_nonblocking - a buffer to read data into (which should be at least @size + a buffer to read data into (which should be at least @count bytes long). - + the number of bytes you want to read @@ -43306,7 +43811,7 @@ next attempt to write will return the error. -Attempts to write up to @size bytes from @buffer to @stream, as +Attempts to write up to @count bytes from @buffer to @stream, as with g_output_stream_write(). If @stream is not currently writable, this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can use g_pollable_output_stream_create_source() to create a #GSource @@ -43331,7 +43836,7 @@ Virtual: write_nonblocking data from - + the number of bytes you want to write @@ -43371,9 +43876,196 @@ Since: 2.28 + + +Utility method for #GPollableInputStream and #GPollableOutputStream +implementations. Creates a new #GSource, as with +g_pollable_source_new(), but also attaching @child_source (with a +dummy callback), and @cancellable, if they are non-%NULL. + +Since: 2.34 + + + + + the stream associated with the +new source + + + + optional child source to attach + + + + optional #GCancellable to attach + + + + the new #GSource. + + + + + + +Tries to read from @stream, as with g_input_stream_read() (if +@blocking is %TRUE) or g_pollable_input_stream_read_nonblocking() +(if @blocking is %FALSE). This can be used to more easily share +code between blocking and non-blocking implementations of a method. + +If @blocking is %FALSE, then @stream must be a +#GPollableInputStream for which g_pollable_input_stream_can_poll() +returns %TRUE, or else the behavior is undefined. If @blocking is +%TRUE, then @stream does not need to be a #GPollableInputStream. + +Since: 2.34 + + + + + a #GInputStream + + + + a buffer to read data into + + + + the number of bytes to read + + + + whether to do blocking I/O + + + + optional #GCancellable object, %NULL to ignore. + + + + location to store the error occurring, or %NULL to ignore + + + + the number of bytes read, or -1 on error. + + + + + + +Tries to write to @stream, as with g_output_stream_write() (if +@blocking is %TRUE) or g_pollable_output_stream_write_nonblocking() +(if @blocking is %FALSE). This can be used to more easily share +code between blocking and non-blocking implementations of a method. + +If @blocking is %FALSE, then @stream must be a +#GPollableOutputStream for which +g_pollable_output_stream_can_poll() returns %TRUE or else the +behavior is undefined. If @blocking is %TRUE, then @stream does not +need to be a #GPollableOutputStream. + +Since: 2.34 + + + + + a #GOutputStream. + + + + the buffer +containing the data to write. + + + + the number of bytes to write + + + + whether to do blocking I/O + + + + optional #GCancellable object, %NULL to ignore. + + + + location to store the error occurring, or %NULL to ignore + + + + the number of bytes written, or -1 on error. + + + + + + +Tries to write @count bytes to @stream, as with +g_output_stream_write_all(), but using g_pollable_stream_write() +rather than g_output_stream_write(). + +On a successful write of @count bytes, %TRUE is returned, and +@bytes_written is set to @count. + +If there is an error during the operation (including +%G_IO_ERROR_WOULD_BLOCK in the non-blocking case), %FALSE is +returned and @error is set to indicate the error status, +@bytes_written is updated to contain the number of bytes written +into the stream before the error occurred. + +As with g_pollable_stream_write(), if @blocking is %FALSE, then +@stream must be a #GPollableOutputStream for which +g_pollable_output_stream_can_poll() returns %TRUE or else the +behavior is undefined. If @blocking is %TRUE, then @stream does not +need to be a #GPollableOutputStream. + +Since: 2.34 + + + + + a #GOutputStream. + + + + the buffer +containing the data to write. + + + + the number of bytes to write + + + + whether to do blocking I/O + + + + location to store the number of bytes that was +written to the stream + + + + optional #GCancellable object, %NULL to ignore. + + + + location to store the error occurring, or %NULL to ignore + + + + %TRUE on success, %FALSE if there was an error + + + + -Gets @proxy's destination hostname. +Gets @proxy's destination hostname; that is, the name of the host +that will be connected to via the proxy, not the name of the proxy +itself. Since: 2.26 @@ -43391,7 +44083,9 @@ Since: 2.26 -Gets @proxy's destination port. +Gets @proxy's destination port; that is, the port on the +destination host that will be connected to via the proxy, not the +port number of the proxy itself. Since: 2.26 @@ -43407,6 +44101,25 @@ Since: 2.26 + + +Gets the protocol that is being spoken to the destination +server; eg, "http" or "ftp". + +Since: 2.34 + + + + + a #GProxyAddress + + + + the @proxy's destination protocol + + + + Gets @proxy's password. @@ -43427,7 +44140,7 @@ Since: 2.26 -Gets @proxy's protocol. +Gets @proxy's protocol. eg, "socks" or "http" Since: 2.26 @@ -43443,6 +44156,24 @@ Since: 2.26 + + +Gets the proxy URI that @proxy was constructed from. + +Since: 2.34 + + + + + a #GProxyAddress + + + + the @proxy's URI, or %NULL if unknown + + + + Gets @proxy's username. @@ -43466,6 +44197,10 @@ Since: 2.26 Creates a new #GProxyAddress for @inetaddr with @protocol that should tunnel through @dest_hostname and @dest_port. +(Note that this method doesn't set the #GProxyAddress:uri or +#GProxyAddress:destination-protocol fields; use g_object_new() +directly if you want to set those.) + Since: 2.26 @@ -44162,6 +44897,124 @@ for more details. + + +Synchronously performs a DNS record lookup for the given @rrname and returns +a list of records as #GVariant tuples. See #GResolverRecordType for +information on what the records contain for each @record_type. + +If the DNS resolution fails, @error (if non-%NULL) will be set to +a value from #GResolverError. + +If @cancellable is non-%NULL, it can be used to cancel the +operation, in which case @error (if non-%NULL) will be set to +%G_IO_ERROR_CANCELLED. + +Since: 2.34 + + + + + a #GResolver + + + + the DNS name to lookup the record for + + + + the type of DNS record to lookup + + + + a #GCancellable, or %NULL + + + + return location for a #GError, or %NULL + + + + a #GList of #GVariant, +or %NULL on error. You must free each of the records and the list when you are +done with it. (You can use g_list_free_full() with g_variant_unref() to do this.) + + + + + + +Begins asynchronously performing a DNS lookup for the given +@rrname, and eventually calls @callback, which must call +g_resolver_lookup_records_finish() to get the final result. See +g_resolver_lookup_records() for more details. + +Since: 2.34 + + + + + a #GResolver + + + + the DNS name to lookup the record for + + + + the type of DNS record to lookup + + + + a #GCancellable, or %NULL + + + + callback to call after resolution completes + + + + data for @callback + + + + + + + + +Retrieves the result of a previous call to +g_resolver_lookup_records_async(). Returns a list of records as #GVariant +tuples. See #GResolverRecordType for information on what the records contain. + +If the DNS resolution failed, @error (if non-%NULL) will be set to +a value from #GResolverError. If the operation was cancelled, +@error will be set to %G_IO_ERROR_CANCELLED. + +Since: 2.34 + + + + + a #GResolver + + + + the result passed to your #GAsyncReadyCallback + + + + return location for a #GError, or %NULL + + + + a #GList of #GVariant, +or %NULL on error. You must free each of the records and the list when you are +done with it. (You can use g_list_free_full() with g_variant_unref() to do this.) + + + + Synchronously performs a DNS SRV lookup for the given @service and @@ -44336,19 +45189,19 @@ Since: 2.32 - A #GResource. + A #GResource - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags - return location for a #GError, or %NULL. + return location for a #GError, or %NULL @@ -44366,7 +45219,7 @@ Since: 2.32 - a #GQuark. + a #GQuark @@ -44383,15 +45236,15 @@ Since: 2.32 - A #GResource. + A #GResource - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags @@ -44405,11 +45258,11 @@ or %NULL if the length is not needed - return location for a #GError, or %NULL. + return location for a #GError, or %NULL - %TRUE if the file was found. %FALSE if there were errors. + %TRUE if the file was found. %FALSE if there were errors @@ -44427,15 +45280,15 @@ Since: 2.32 - the path of a filename to load, in the GLib filename encoding. + the path of a filename to load, in the GLib filename encoding - return location for a #GError, or %NULL. + return location for a #GError, or %NULL - a new #GResource, or %NULL on error. + a new #GResource, or %NULL on error @@ -44462,24 +45315,24 @@ Since: 2.32 - A #GResource. + A #GResource - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags - return location for a #GError, or %NULL. + return location for a #GError, or %NULL #GBytes or %NULL on error. -Free the returned object with g_bytes_unref(). +Free the returned object with g_bytes_unref() @@ -44498,15 +45351,15 @@ Since: 2.32 - A #GBytes. + A #GBytes - return location for a #GError, or %NULL. + return location for a #GError, or %NULL - a new #GResource, or %NULL on error. + a new #GResource, or %NULL on error @@ -44523,24 +45376,24 @@ Since: 2.32 - A #GResource. + A #GResource - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags - return location for a #GError, or %NULL. + return location for a #GError, or %NULL #GInputStream or %NULL on error. -Free the returned object with g_object_unref(). +Free the returned object with g_object_unref() @@ -44555,11 +45408,11 @@ Since: 2.32 - A #GResource. + A #GResource - The passed in #GResource. + The passed in #GResource @@ -44576,7 +45429,7 @@ Since: 2.32 - A #GResource. + A #GResource @@ -44597,15 +45450,15 @@ Since: 2.32 - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags - return location for a #GError, or %NULL. + return location for a #GError, or %NULL @@ -44626,11 +45479,11 @@ Since: 2.32 - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags @@ -44644,11 +45497,11 @@ or %NULL if the length is not needed - return location for a #GError, or %NULL. + return location for a #GError, or %NULL - %TRUE if the file was found. %FALSE if there were errors. + %TRUE if the file was found. %FALSE if there were errors @@ -44675,20 +45528,20 @@ Since: 2.32 - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags - return location for a #GError, or %NULL. + return location for a #GError, or %NULL #GBytes or %NULL on error. -Free the returned object with g_bytes_unref(). +Free the returned object with g_bytes_unref() @@ -44706,20 +45559,20 @@ Since: 2.32 - A pathname inside the resource. + A pathname inside the resource - A #GResourceLookupFlags. + A #GResourceLookupFlags - return location for a #GError, or %NULL. + return location for a #GError, or %NULL #GInputStream or %NULL on error. -Free the returned object with g_object_unref(). +Free the returned object with g_object_unref() @@ -44735,7 +45588,7 @@ Since: 2.32 - A #GResource. + A #GResource @@ -44751,7 +45604,7 @@ Since: 2.32 - A #GResource. + A #GResource @@ -51547,18 +52400,18 @@ Since: 2.22 -Finalized a GResource initialized by g_static_resource_init (). +Finalized a GResource initialized by g_static_resource_init(). This is normally used by code generated by -<link linkend="glib-compile-resources">glib-compile-resources</link> and is -not typically used by other code. +<link linkend="glib-compile-resources">glib-compile-resources</link> +and is not typically used by other code. Since: 2.32 - pointer to a static #GStaticResource. + pointer to a static #GStaticResource @@ -51567,22 +52420,22 @@ Since: 2.32 -Gets the GResource that was registred by a call to g_static_resource_init (). +Gets the GResource that was registred by a call to g_static_resource_init(). This is normally used by code generated by -<link linkend="glib-compile-resources">glib-compile-resources</link> and is -not typically used by other code. +<link linkend="glib-compile-resources">glib-compile-resources</link> +and is not typically used by other code. Since: 2.32 - pointer to a static #GStaticResource. + pointer to a static #GStaticResource - a #GResource. + a #GResource @@ -51593,15 +52446,15 @@ Initializes a GResource from static data using a GStaticResource. This is normally used by code generated by -<link linkend="glib-compile-resources">glib-compile-resources</link> and is -not typically used by other code. +<link linkend="glib-compile-resources">glib-compile-resources</link> +and is not typically used by other code. Since: 2.32 - pointer to a static #GStaticResource. + pointer to a static #GStaticResource @@ -51693,6 +52546,146 @@ Since: 2.28 + + +Add a path where dbus-daemon will lookup for .services files. This can't be +called after g_test_dbus_up(). + + + + + a #GTestDBus + + + + path to a directory containing .service files + + + + + + + + +Stop the session bus started by g_test_dbus_up(). + +This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() +is destroyed. This is done to ensure that the next unit test won't get a +leaked singleton from this test. + + + + + a #GTestDBus + + + + + + + + +Get the address on which dbus-daemon is running. if g_test_dbus_up() has not +been called yet, %NULL is returned. This can be used with +g_dbus_connection_new_for_address() + + + + + + a #GTestDBus + + + + the address of the bus, or %NULL. + + + + + + + + + + a #GTestDBus + + + + the value of #GTestDBus:flags property + + + + + +Create a new #GTestDBus object. + + + + + + a #GTestDBusFlags + + + + a new #GTestDBus. + + + + + +Stop the session bus started by g_test_dbus_up(). + +Unlike g_test_dbus_down(), this won't verify the #GDBusConnection +singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit +tests wanting to verify behaviour after the session bus has been stopped +can use this function but should still call g_test_dbus_down() when done. + + + + + a #GTestDBus + + + + + + + + +Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test +won't use user's session bus. + +This is useful for unit tests that want to verify behaviour when no session +bus is running. It is not necessary to call this if unit test already calls +g_test_dbus_up() before acquiring the session bus. + + + + + + + + + +Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this +call, it is safe for unit tests to start sending messages on the session bug. + +If this function is called from setup callback of g_test_add(), +g_test_dbus_down() must be called in its teardown callback. + +If this function is called from unit test's main(), then g_test_dbus_down() +must be called after g_test_run(). + + + + + a #GTestDBus + + + + + + Append a name to the list of icons from within @icon. @@ -55382,7 +56375,7 @@ Gets the default #GVfs for the system. - a #GVfs. + a #GVfs. @@ -55402,7 +56395,7 @@ Gets a #GFile for @path. - a #GFile. + a #GFile. Free the returned object with g_object_unref(). @@ -55412,7 +56405,7 @@ Free the returned object with g_object_unref(). Gets a #GFile for @uri. This operation never fails, but the returned object -might not support any I/O operation if the URI +might not support any I/O operation if the URI is malformed or if the URI scheme is not supported. @@ -55423,11 +56416,11 @@ is malformed or if the URI scheme is not supported. - a string containing a URI + a string containing a URI - a #GFile. + a #GFile. Free the returned object with g_object_unref(). @@ -55457,7 +56450,7 @@ Gets a list of URI schemes supported by @vfs. a %NULL-terminated array of strings. -The returned array belongs to GIO and must +The returned array belongs to GIO and must not be freed or modified. @@ -55474,14 +56467,15 @@ Checks if the VFS is active. - %TRUE if construction of the @vfs was successful and it is now active. + %TRUE if construction of the @vfs was successful +and it is now active. -This operation never fails, but the returned object might -not support any I/O operations if the @parse_name cannot +This operation never fails, but the returned object might +not support any I/O operations if the @parse_name cannot be parsed by the #GVfs module. diff --git a/gio/src/gio_enums.defs b/gio/src/gio_enums.defs index ea27a83..405db2d 100644 --- a/gio/src/gio_enums.defs +++ b/gio/src/gio_enums.defs @@ -613,6 +613,27 @@ ;; Original typedef: ;; typedef enum { +;; G_RESOLVER_RECORD_SRV = 1, +;; G_RESOLVER_RECORD_MX, +;; G_RESOLVER_RECORD_TXT, +;; G_RESOLVER_RECORD_SOA, +;; G_RESOLVER_RECORD_NS +;; } GResolverRecordType; + +(define-enum-extended ResolverRecordType + (in-module "G") + (c-name "GResolverRecordType") + (values + '("srv" "G_RESOLVER_RECORD_SRV" "1") + '("mx" "G_RESOLVER_RECORD_MX" "2") + '("txt" "G_RESOLVER_RECORD_TXT" "3") + '("soa" "G_RESOLVER_RECORD_SOA" "4") + '("ns" "G_RESOLVER_RECORD_NS" "5") + ) +) + +;; Original typedef: +;; typedef enum { ;; G_RESOURCE_ERROR_NOT_FOUND, ;; G_RESOURCE_ERROR_INTERNAL ;; } GResourceError; @@ -657,9 +678,7 @@ ;; Original typedef: ;; typedef enum { ;; G_SOCKET_FAMILY_INVALID, -;; #ifdef GLIB_SYSDEF_AF_UNIX ;; G_SOCKET_FAMILY_UNIX = GLIB_SYSDEF_AF_UNIX, -;; #endif ;; G_SOCKET_FAMILY_IPV4 = GLIB_SYSDEF_AF_INET, ;; G_SOCKET_FAMILY_IPV6 = GLIB_SYSDEF_AF_INET6 ;; } GSocketFamily; @@ -1443,6 +1462,19 @@ ) ) +;; Original typedef: +;; typedef enum /*< flags >*/ { +;; G_TEST_DBUS_NONE = 0 +;; } GTestDBusFlags; + +(define-flags-extended TestDBusFlags + (in-module "G") + (c-name "GTestDBusFlags") + (values + '("us-none" "G_TEST_DBUS_NONE" "0x0") + ) +) + ;; From gsettings.h ;; Original typedef: diff --git a/gio/src/gio_methods.defs b/gio/src/gio_methods.defs index e7973e1..9fa65f1 100644 --- a/gio/src/gio_methods.defs +++ b/gio/src/gio_methods.defs @@ -1114,6 +1114,19 @@ ) ) +(define-enum RecordType + (in-module "GResolver") + (c-name "GResolverRecordType") + (gtype-id "G_TYPE_RESOLVER_RECORD_TYPE") + (values + '("srv" "G_RESOLVER_RECORD_SRV") + '("mx" "G_RESOLVER_RECORD_MX") + '("txt" "G_RESOLVER_RECORD_TXT") + '("soa" "G_RESOLVER_RECORD_SOA") + '("ns" "G_RESOLVER_RECORD_NS") + ) +) + (define-enum Error (in-module "GResource") (c-name "GResourceError") @@ -1606,6 +1619,15 @@ ) ) +(define-enum DBusFlags + (in-module "GTest") + (c-name "GTestDBusFlags") + (gtype-id "G_TYPE_TEST_DBUS_FLAGS") + (values + '("none" "G_TEST_DBUS_NONE") + ) +) + (define-flags BindFlags (in-module "GSettings") (c-name "GSettingsBindFlags") @@ -2057,6 +2079,12 @@ ) ) +(define-method get_supported_types + (of-object "GAppInfo") + (c-name "g_app_info_get_supported_types") + (return-type "const-char**") +) + (define-method can_delete (of-object "GAppInfo") (c-name "g_app_info_can_delete") @@ -2336,6 +2364,18 @@ ) ) +(define-method get_dbus_connection + (of-object "GApplication") + (c-name "g_application_get_dbus_connection") + (return-type "GDBusConnection*") +) + +(define-method get_dbus_object_path + (of-object "GApplication") + (c-name "g_application_get_dbus_object_path") + (return-type "const-gchar*") +) + (define-method get_inactivity_timeout (of-object "GApplication") (c-name "g_application_get_inactivity_timeout") @@ -3628,6 +3668,15 @@ ) ) +(define-method allow_mechanism + (of-object "GDBusAuthObserver") + (c-name "g_dbus_auth_observer_allow_mechanism") + (return-type "gboolean") + (parameters + '("const-gchar*" "mechanism") + ) +) + ;; From gdbusconnection.h @@ -3773,6 +3822,12 @@ (return-type "GCredentials*") ) +(define-method get_last_serial + (of-object "GDBusConnection") + (c-name "g_dbus_connection_get_last_serial") + (return-type "guint32") +) + (define-method get_exit_on_close (of-object "GDBusConnection") (c-name "g_dbus_connection_get_exit_on_close") @@ -4113,6 +4168,14 @@ +;; From gdbus-daemon-generated.h + + + +;; From gdbusdaemon.h + + + ;; From gdbuserror.h (define-function g_dbus_error_quark @@ -6048,6 +6111,12 @@ ) ) +(define-method get_startup_wm_class + (of-object "GDesktopAppInfo") + (c-name "g_desktop_app_info_get_startup_wm_class") + (return-type "const-char*") +) + (define-function g_desktop_app_info_new (c-name "g_desktop_app_info_new") (is-constructor-of "GDesktopAppInfo") @@ -9101,6 +9170,17 @@ ) ) +(define-method read_bytes + (of-object "GInputStream") + (c-name "g_input_stream_read_bytes") + (return-type "GBytes*") + (parameters + '("gsize" "count") + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + (define-method skip (of-object "GInputStream") (c-name "g_input_stream_skip") @@ -9146,6 +9226,29 @@ ) ) +(define-method read_bytes_async + (of-object "GInputStream") + (c-name "g_input_stream_read_bytes_async") + (return-type "none") + (parameters + '("gsize" "count") + '("int" "io_priority") + '("GCancellable*" "cancellable") + '("GAsyncReadyCallback" "callback") + '("gpointer" "user_data") + ) +) + +(define-method read_bytes_finish + (of-object "GInputStream") + (c-name "g_input_stream_read_bytes_finish") + (return-type "GBytes*") + (parameters + '("GAsyncResult*" "result") + '("GError**" "error") + ) +) + (define-method skip_async (of-object "GInputStream") (c-name "g_input_stream_skip_async") @@ -9361,6 +9464,11 @@ (return-type "GType") ) +(define-function g_resolver_record_type_get_type + (c-name "g_resolver_record_type_get_type") + (return-type "GType") +) + (define-function g_resource_error_get_type (c-name "g_resource_error_get_type") (return-type "GType") @@ -9561,6 +9669,11 @@ (return-type "GType") ) +(define-function g_test_dbus_flags_get_type + (c-name "g_test_dbus_flags_get_type") + (return-type "GType") +) + (define-function g_settings_bind_flags_get_type (c-name "g_settings_bind_flags_get_type") (return-type "GType") @@ -10038,6 +10151,14 @@ ) ) +(define-function g_memory_input_stream_new_from_bytes + (c-name "g_memory_input_stream_new_from_bytes") + (return-type "GInputStream*") + (parameters + '("GBytes*" "bytes") + ) +) + (define-method add_data (of-object "GMemoryInputStream") (c-name "g_memory_input_stream_add_data") @@ -10049,6 +10170,15 @@ ) ) +(define-method add_bytes + (of-object "GMemoryInputStream") + (c-name "g_memory_input_stream_add_bytes") + (return-type "none") + (parameters + '("GBytes*" "bytes") + ) +) + ;; From gmemoryoutputstream.h @@ -10094,6 +10224,12 @@ (return-type "gpointer") ) +(define-method steal_as_bytes + (of-object "GMemoryOutputStream") + (c-name "g_memory_output_stream_steal_as_bytes") + (return-type "GBytes*") +) + ;; From gmenuexporter.h @@ -11141,6 +11277,17 @@ ) ) +(define-method write_bytes + (of-object "GOutputStream") + (c-name "g_output_stream_write_bytes") + (return-type "gssize") + (parameters + '("GBytes*" "bytes") + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + (define-method splice (of-object "GOutputStream") (c-name "g_output_stream_splice") @@ -11197,6 +11344,29 @@ ) ) +(define-method write_bytes_async + (of-object "GOutputStream") + (c-name "g_output_stream_write_bytes_async") + (return-type "none") + (parameters + '("GBytes*" "bytes") + '("int" "io_priority") + '("GCancellable*" "cancellable") + '("GAsyncReadyCallback" "callback") + '("gpointer" "user_data") + ) +) + +(define-method write_bytes_finish + (of-object "GOutputStream") + (c-name "g_output_stream_write_bytes_finish") + (return-type "gssize") + (parameters + '("GAsyncResult*" "result") + '("GError**" "error") + ) +) + (define-method splice_async (of-object "GOutputStream") (c-name "g_output_stream_splice_async") @@ -11434,21 +11604,12 @@ (return-type "gssize") (parameters '("void*" "buffer") - '("gsize" "size") + '("gsize" "count") '("GCancellable*" "cancellable") '("GError**" "error") ) ) -(define-function g_pollable_source_new - (c-name "g_pollable_source_new") - (is-constructor-of "GPollableSource") - (return-type "GSource*") - (parameters - '("GObject*" "pollable_stream") - ) -) - ;; From gpollableoutputstream.h @@ -11485,7 +11646,70 @@ (return-type "gssize") (parameters '("const-void*" "buffer") - '("gsize" "size") + '("gsize" "count") + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + + + +;; From gpollableutils.h + +(define-function g_pollable_source_new + (c-name "g_pollable_source_new") + (is-constructor-of "GPollableSource") + (return-type "GSource*") + (parameters + '("GObject*" "pollable_stream") + ) +) + +(define-function g_pollable_source_new_full + (c-name "g_pollable_source_new_full") + (return-type "GSource*") + (parameters + '("gpointer" "pollable_stream") + '("GSource*" "child_source") + '("GCancellable*" "cancellable") + ) +) + +(define-function g_pollable_stream_read + (c-name "g_pollable_stream_read") + (return-type "gssize") + (parameters + '("GInputStream*" "stream") + '("void*" "buffer") + '("gsize" "count") + '("gboolean" "blocking") + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + +(define-function g_pollable_stream_write + (c-name "g_pollable_stream_write") + (return-type "gssize") + (parameters + '("GOutputStream*" "stream") + '("const-void*" "buffer") + '("gsize" "count") + '("gboolean" "blocking") + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + +(define-function g_pollable_stream_write_all + (c-name "g_pollable_stream_write_all") + (return-type "gboolean") + (parameters + '("GOutputStream*" "stream") + '("const-void*" "buffer") + '("gsize" "count") + '("gboolean" "blocking") + '("gsize*" "bytes_written") '("GCancellable*" "cancellable") '("GError**" "error") ) @@ -11534,6 +11758,12 @@ (return-type "const-gchar*") ) +(define-method get_destination_protocol + (of-object "GProxyAddress") + (c-name "g_proxy_address_get_destination_protocol") + (return-type "const-gchar*") +) + (define-method get_destination_hostname (of-object "GProxyAddress") (c-name "g_proxy_address_get_destination_hostname") @@ -11558,6 +11788,12 @@ (return-type "const-gchar*") ) +(define-method get_uri + (of-object "GProxyAddress") + (c-name "g_proxy_address_get_uri") + (return-type "const-gchar*") +) + ;; From gproxy.h @@ -11835,6 +12071,41 @@ ) ) +(define-method lookup_records + (of-object "GResolver") + (c-name "g_resolver_lookup_records") + (return-type "GList*") + (parameters + '("const-gchar*" "rrname") + '("GResolverRecordType" "record_type") + '("GCancellable*" "cancellable") + '("GError**" "error") + ) +) + +(define-method lookup_records_async + (of-object "GResolver") + (c-name "g_resolver_lookup_records_async") + (return-type "none") + (parameters + '("const-gchar*" "rrname") + '("GResolverRecordType" "record_type") + '("GCancellable*" "cancellable") + '("GAsyncReadyCallback" "callback") + '("gpointer" "user_data") + ) +) + +(define-method lookup_records_finish + (of-object "GResolver") + (c-name "g_resolver_lookup_records_finish") + (return-type "GList*") + (parameters + '("GAsyncResult*" "result") + '("GError**" "error") + ) +) + (define-function g_resolver_free_targets (c-name "g_resolver_free_targets") (return-type "none") @@ -12877,6 +13148,15 @@ (return-type "gboolean") ) +(define-method set_check_cancellable + (of-object "GSimpleAsyncResult") + (c-name "g_simple_async_result_set_check_cancellable") + (return-type "none") + (parameters + '("GCancellable*" "check_cancellable") + ) +) + (define-method get_source_tag (of-object "GSimpleAsyncResult") (c-name "g_simple_async_result_get_source_tag") @@ -14340,6 +14620,68 @@ +;; From gtestdbus.h + +(define-function g_test_dbus_get_type + (c-name "g_test_dbus_get_type") + (return-type "GType") +) + +(define-function g_test_dbus_new + (c-name "g_test_dbus_new") + (is-constructor-of "GTestDbus") + (return-type "GTestDBus*") + (parameters + '("GTestDBusFlags" "flags") + ) +) + +(define-method get_flags + (of-object "GTestDBus") + (c-name "g_test_dbus_get_flags") + (return-type "GTestDBusFlags") +) + +(define-method get_bus_address + (of-object "GTestDBus") + (c-name "g_test_dbus_get_bus_address") + (return-type "const-gchar*") +) + +(define-method add_service_dir + (of-object "GTestDBus") + (c-name "g_test_dbus_add_service_dir") + (return-type "none") + (parameters + '("const-gchar*" "path") + ) +) + +(define-method up + (of-object "GTestDBus") + (c-name "g_test_dbus_up") + (return-type "none") +) + +(define-method stop + (of-object "GTestDBus") + (c-name "g_test_dbus_stop") + (return-type "none") +) + +(define-method down + (of-object "GTestDBus") + (c-name "g_test_dbus_down") + (return-type "none") +) + +(define-function g_test_dbus_unset + (c-name "g_test_dbus_unset") + (return-type "none") +) + + + ;; From gthemedicon.h (define-function g_themed_icon_get_type diff --git a/gio/src/gio_signals.defs b/gio/src/gio_signals.defs index 784f9e5..313ae6b 100644 --- a/gio/src/gio_signals.defs +++ b/gio/src/gio_signals.defs @@ -691,6 +691,15 @@ (construct-only #t) ) +(define-property destination-protocol + (of-object "GProxyAddress") + (prop-type "GParamString") + (docs "The proxy destination protocol") + (readable #t) + (writable #t) + (construct-only #t) +) + (define-property destination-hostname (of-object "GProxyAddress") (prop-type "GParamString") @@ -727,6 +736,15 @@ (construct-only #t) ) +(define-property uri + (of-object "GProxyAddress") + (prop-type "GParamString") + (docs "The proxy's URI") + (readable #t) + (writable #t) + (construct-only #t) +) + ;; From GProxyAddressEnumerator (define-property uri @@ -1710,6 +1728,15 @@ ) ) +(define-signal allow-mechanism + (of-object "GDBusAuthObserver") + (return-type "gboolean") + (when "last") + (parameters + '("const-gchar*" "p0") + ) +) + ;; From GDBusConnection (define-signal closed diff --git a/glib/src/glib_docs.xml b/glib/src/glib_docs.xml index 2f1bacc..6990f0d 100644 --- a/glib/src/glib_docs.xml +++ b/glib/src/glib_docs.xml @@ -1747,7 +1747,7 @@ You do not need to hold the lock to call this function. Increases the reference count of the asynchronous @queue by 1. -@Deprecated: Since 2.8, reference counting is done atomically +Deprecated: 2.8: Reference counting is done atomically. so g_async_queue_ref() can be used regardless of the @queue's lock. @@ -2030,7 +2030,7 @@ and releases the lock. This function must be called while holding the @queue's lock. If the reference count went to 0, the @queue will be destroyed and the memory allocated will be freed. -@Deprecated: Since 2.8, reference counting is done atomically +Deprecated: 2.8: Reference counting is done atomically. so g_async_queue_unref() can be used regardless of the @queue's lock. @@ -6530,7 +6530,7 @@ Windows a handle for a process (which doesn't have to be a child). - function to call when the idle is removed, or %NULL + function to call when the idle is removed, or %NULL @@ -6650,6 +6650,38 @@ Since: 2.28 + + +Clears a reference to a variable. + +@pp must not be %NULL. + +If the reference is %NULL then this function does nothing. +Otherwise, the variable is destroyed using @destroy and the +pointer is set to %NULL. + +This function is threadsafe and modifies the pointer atomically, +using memory barriers where needed. + +A macro is also included that allows this function to be used without +pointer casts. + +Since: 2.34 + + + + + a pointer to a variable, struct member etc. holding a pointer + + + + a function to which a gpointer can be passed, to destroy *@pp + + + + + + Registers a finalization notifier which will be called when the @@ -10498,7 +10530,7 @@ the local time zone. This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_local(). -Since: 2.26. +Since: 2.26 @@ -10602,7 +10634,7 @@ UTC. This call is equivalent to calling g_date_time_new() with the time zone returned by g_time_zone_new_utc(). -Since: 2.26. +Since: 2.26 @@ -11554,7 +11586,8 @@ Since: 2.32 an environment -list (eg, as returned from g_get_environ()) +list (eg, as returned from g_get_environ()), or %NULL +for an empty environment list @@ -11586,7 +11619,8 @@ Since: 2.32 an environment -list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()) +list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or %NULL +for an empty environment list @@ -11619,7 +11653,8 @@ Since: 2.32 an environment -list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()) +list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), +or %NULL for an empty environment list @@ -14967,7 +15002,7 @@ range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. - function to call when the idle is removed, or %NULL + function to call when the idle is removed, or %NULL @@ -21079,10 +21114,6 @@ previously installed the #glib_mem_profiler_table with g_mem_set_vtable(). - - - - @@ -22872,7 +22903,9 @@ Since: 2.10 Increases the freeze count on @object. If the freeze count is non-zero, the emission of "notify" signals on @object is stopped. The signals are queued until the freeze count is decreased -to zero. +to zero. Duplicate notifications are squashed so that at most one +#GObject::notify signal is emitted for each property modified while the +object is frozen. This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified. @@ -23681,7 +23714,10 @@ g_object_set_qdata_full(). Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on @object -and when it reaches zero, all queued "notify" signals are emitted. +and when it reaches zero, queued "notify" signals are emitted. + +Duplicate notifications for each property are squashed so that at most one +#GObject::notify signal is emitted for each property. It is an error to call this function when the freeze count is zero. @@ -35115,8 +35151,15 @@ specified by the only argument that must be provided, @argv. @argv should be a %NULL-terminated array of strings, to be passed as the argument vector for the child. The first string in @argv is of course the name of the program to execute. By default, the name of -the program must be a full path; the <envar>PATH</envar> shell variable -will only be searched if you pass the %G_SPAWN_SEARCH_PATH flag. +the program must be a full path. If @flags contains the +%G_SPAWN_SEARCH_PATH flag, the <envar>PATH</envar> environment variable +is used to search for the executable. If @flags contains the +%G_SPAWN_SEARCH_PATH_FROM_ENVP flag, the <envar>PATH</envar> variable from +@envp is used to search for the executable. +If both the %G_SPAWN_SEARCH_PATH and %G_SPAWN_SEARCH_PATH_FROM_ENVP +flags are set, the <envar>PATH</envar> variable from @envp takes precedence +over the environment variable. + If the program name is not a full path and %G_SPAWN_SEARCH_PATH flag is not used, then the program will be run from the current directory (or @working_directory, if specified); this might be unexpected or even @@ -35182,7 +35225,11 @@ descriptors will be inherited by the child; otherwise all descriptors except stdin/stdout/stderr will be closed before calling exec() in the child. %G_SPAWN_SEARCH_PATH means that <literal>argv[0]</literal> need not be an absolute path, it -will be looked for in the user's <envar>PATH</envar>. +will be looked for in the <envar>PATH</envar> environment variable. +%G_SPAWN_SEARCH_PATH_FROM_ENVP means need not be an absolute path, it +will be looked for in the <envar>PATH</envar> variable from @envp. If +both %G_SPAWN_SEARCH_PATH and %G_SPAWN_SEARCH_PATH_FROM_ENVP are used, +the value from @envp takes precedence over the environment. %G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standard output will be discarded, instead of going to the same location as the parent's standard output. If you use this flag, @standard_output must be %NULL. @@ -38153,7 +38200,7 @@ Since: 2.16 - Slash-separated test case path name for the test. + /-separated test case path name for the test. @@ -38180,7 +38227,7 @@ Since: 2.16 - Slash-separated test case path name for the test. + /-separated test case path name for the test. @@ -40041,7 +40088,7 @@ this function returns the same value, without modifying @time_. This function may, however, modify @time_ in order to deal with non-existent times. If the non-existent local @time_ of 02:30 were -requested on March 13th 2010 in Toronto then this function would +requested on March 14th 2010 in Toronto then this function would adjust @time_ to be 03:00 and return the interval containing the adjusted time. @@ -40405,7 +40452,7 @@ the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. - function to call when the timeout is removed, or %NULL + function to call when the timeout is removed, or %NULL @@ -40512,7 +40559,7 @@ the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. - function to call when the timeout is removed, or %NULL + function to call when the timeout is removed, or %NULL @@ -41505,7 +41552,7 @@ macro. - #TRUE if @instance is valid, #FALSE otherwise. + %TRUE if @instance is valid, %FALSE otherwise. @@ -41856,6 +41903,33 @@ includes the type itself, so that e.g. a fundamental type has depth 1. + + +Ensures that the indicated @type has been registered with the +type system, and its _class_init() method has been run. + +In theory, simply calling the type's _get_type() method (or using +the corresponding macro) is supposed take care of this. However, +_get_type() methods are often marked %G_GNUC_CONST for performance +reasons, even though this is technically incorrect (since +%G_GNUC_CONST requires that the function not have side effects, +which _get_type() methods do on the first call). As a result, if +you write a bare call to a _get_type() macro, it may get optimized +out by the compiler. Using g_type_ensure() guarantees that the +type's _get_type() method is called. + +Since: 2.34 + + + + + a #GType. + + + + + + Frees an instance of a type, returning it to the instance pool for @@ -46900,8 +46974,8 @@ the length (not including the nul terminator) - (transfer full) (array zero-terminated=1 length=length) -(element-type guint8): a newly allocated string + +a newly allocated string @@ -47065,6 +47139,11 @@ linkend='gvariant-format-strings'>GVariant Format Strings</link>. Please note that the syntax of the format string is very likely to be extended in the future. +@format_string determines the C types that are used for unpacking +the values and also determines if the values are copied or borrowed, +see the section on +<link linkend='gvariant-format-strings-pointers'>GVariant Format Strings</link>. + Since: 2.24 @@ -47198,6 +47277,11 @@ deconstructs it according to @format_string. This call is essentially a combination of g_variant_get_child_value() and g_variant_get(). +@format_string determines the C types that are used for unpacking +the values and also determines if the values are copied or borrowed, +see the section on +<link linkend='gvariant-format-strings-pointers'>GVariant Format Strings</link>. + Since: 2.24 @@ -47784,6 +47868,11 @@ These two generalisations allow mixing of multiple calls to g_variant_new_va() and g_variant_get_va() within a single actual varargs call by the user. +@format_string determines the C types that are used for unpacking +the values and also determines if the values are copied or borrowed, +see the section on +<link linkend='gvariant-format-strings-pointers'>GVariant Format Strings</link>. + Since: 2.24 @@ -48131,6 +48220,11 @@ types, g_variant_iter_next() is definitely preferred. For string types, use the '&' prefix to avoid allocating any memory at all (and thereby avoiding the need to free anything as well). +@format_string determines the C types that are used for unpacking +the values and also determines if the values are copied or borrowed, +see the section on +<link linkend='gvariant-format-strings-pointers'>GVariant Format Strings</link>. + Since: 2.24 @@ -48244,6 +48338,11 @@ g_free (key); For a solution that is likely to be more convenient to C programmers when dealing with loops, see g_variant_iter_loop(). +@format_string determines the C types that are used for unpacking +the values and also determines if the values are copied or borrowed, +see the section on +<link linkend='gvariant-format-strings-pointers'>GVariant Format Strings</link>. + Since: 2.24 @@ -48321,7 +48420,10 @@ g_variant_get(). In the case that %NULL would have been returned, this function returns %FALSE. Otherwise, it unpacks the returned value and returns %TRUE. -See g_variant_get() for information about @format_string. +@format_string determines the C types that are used for unpacking +the values and also determines if the values are copied or borrowed, +see the section on +<link linkend='gvariant-format-strings-pointers'>GVariant Format Strings</link>. Since: 2.28 diff --git a/glib/src/glib_enums.defs b/glib/src/glib_enums.defs index f7fca47..0ef9028 100644 --- a/glib/src/glib_enums.defs +++ b/glib/src/glib_enums.defs @@ -1102,7 +1102,8 @@ ;; G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, ;; G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, ;; G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, -;; G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 +;; G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6, +;; G_SPAWN_SEARCH_PATH_FROM_ENVP = 1 << 7 ;; } GSpawnFlags; (define-flags-extended SpawnFlags @@ -1116,6 +1117,7 @@ '("stderr-to-dev-null" "G_SPAWN_STDERR_TO_DEV_NULL" "1 << 4") '("child-inherits-stdin" "G_SPAWN_CHILD_INHERITS_STDIN" "1 << 5") '("file-and-argv-zero" "G_SPAWN_FILE_AND_ARGV_ZERO" "1 << 6") + '("search-path-from-envp" "G_SPAWN_SEARCH_PATH_FROM_ENVP" "1 << 7") ) ) diff --git a/glib/src/glib_functions.defs b/glib/src/glib_functions.defs index 4da0924..18737bc 100644 --- a/glib/src/glib_functions.defs +++ b/glib/src/glib_functions.defs @@ -562,6 +562,7 @@ '("stderr-to-dev-null" "G_SPAWN_STDERR_TO_DEV_NULL") '("child-inherits-stdin" "G_SPAWN_CHILD_INHERITS_STDIN") '("file-and-argv-zero" "G_SPAWN_FILE_AND_ARGV_ZERO") + '("search-path-from-envp" "G_SPAWN_SEARCH_PATH_FROM_ENVP") ) ) @@ -6904,6 +6905,15 @@ ) ) +(define-function g_clear_pointer + (c-name "g_clear_pointer") + (return-type "none") + (parameters + '("gpointer*" "pp") + '("GDestroyNotify" "destroy") + ) +) + (define-function g_malloc (c-name "g_malloc") (return-type "gpointer") diff --git a/glib/src/gobject_functions.defs b/glib/src/gobject_functions.defs index f90d47b..2d54613 100644 --- a/glib/src/gobject_functions.defs +++ b/glib/src/gobject_functions.defs @@ -2567,6 +2567,12 @@ ) ) +(define-method ensure + (of-object "GType") + (c-name "g_type_ensure") + (return-type "none") +) + (define-method get_plugin (of-object "GType") (c-name "g_type_get_plugin") diff --git a/tools/gen_scripts/gio_generate_docs.sh b/tools/gen_scripts/gio_generate_docs.sh index 190163a..edad682 100755 --- a/tools/gen_scripts/gio_generate_docs.sh +++ b/tools/gen_scripts/gio_generate_docs.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that docextract_to_xml.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the XML file will be placed in gio/src. +# jhbuild sources. The XML files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then - echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \ -docextract_to_xml.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -19,4 +17,5 @@ for dir in "$PREFIX"/glib/gio; do PARAMS="$PARAMS -s $dir" done -docextract_to_xml.py $PARAMS > "$OUT_DIR"/gio_docs.xml +DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py" +$DOCEXTRACT_TO_XML_PY $PARAMS > "$OUT_DIR"/gio_docs.xml diff --git a/tools/gen_scripts/gio_generate_enums.sh b/tools/gen_scripts/gio_generate_enums.sh index d8c6f6d..dd6d2a4 100755 --- a/tools/gen_scripts/gio_generate_enums.sh +++ b/tools/gen_scripts/gio_generate_enums.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that enum.pl should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the defs files will be placed in gio/src. +# jhbuild sources. The defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -enum.pl\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,5 +13,6 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/gio/src" -enum.pl "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_enums.defs +ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl" +$ENUM_PL "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_enums.defs patch "$OUT_DIR"/gio_enums.defs "$OUT_DIR"/gio_enums.defs.patch diff --git a/tools/gen_scripts/gio_generate_extra_defs.sh b/tools/gen_scripts/gio_generate_extra_defs.sh index b57683b..b6b77e2 100755 --- a/tools/gen_scripts/gio_generate_extra_defs.sh +++ b/tools/gen_scripts/gio_generate_extra_defs.sh @@ -1,7 +1,6 @@ #!/bin/bash -# Note that JHBUILD_SOURCES should be defined to contain the path to the root -# of the jhbuild sources. The script assumes that it resides in the +# This script assumes that it resides in the # tools/gen_scripts directory and the defs files will be placed in gio/src. ROOT_DIR="$(dirname "$0")/../.." diff --git a/tools/gen_scripts/gio_generate_methods.sh b/tools/gen_scripts/gio_generate_methods.sh index 29add54..711c9c5 100755 --- a/tools/gen_scripts/gio_generate_methods.sh +++ b/tools/gen_scripts/gio_generate_methods.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that h2def.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the defs files will be placed in gio/src. +# jhbuild sources. The defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -h2def.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,5 +13,6 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/gio/src" -h2def.py "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_methods.defs +H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py" +$H2DEF_PY "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_methods.defs #patch "$OUT_DIR"/gio_methods.defs "$OUT_DIR"/gio_methods.defs.patch diff --git a/tools/gen_scripts/glib_generate_docs.sh b/tools/gen_scripts/glib_generate_docs.sh index 3f23190..cb841cb 100755 --- a/tools/gen_scripts/glib_generate_docs.sh +++ b/tools/gen_scripts/glib_generate_docs.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that docextract_to_xml.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the XML file will be placed in glib/src. +# jhbuild sources. The XML files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then - echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \ -docextract_to_xml.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -19,4 +17,5 @@ for dir in "$PREFIX"/glib/{glib,gmodule,gobject,gthread}; do PARAMS="$PARAMS -s $dir" done -docextract_to_xml.py $PARAMS > "$OUT_DIR/glib_docs.xml" +DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py" +$DOCEXTRACT_TO_XML_PY $PARAMS > "$OUT_DIR/glib_docs.xml" diff --git a/tools/gen_scripts/glib_generate_enums.sh b/tools/gen_scripts/glib_generate_enums.sh index 9cd99ee..c7bca21 100755 --- a/tools/gen_scripts/glib_generate_enums.sh +++ b/tools/gen_scripts/glib_generate_enums.sh @@ -1,13 +1,12 @@ #!/bin/bash -# Note that enum.pl should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the # jhbuild sources. The script assumes that it resides in the tools/gen_scripts # directory and the defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -enum.pl\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,8 +14,9 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/glib/src" -enum.pl "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_enums.defs +ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl" +$ENUM_PL "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_enums.defs patch "$OUT_DIR"/glib_enums.defs "$OUT_DIR"/glib_enums.defs.patch -enum.pl "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_enums.defs -enum.pl "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_enums.defs +$ENUM_PL "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_enums.defs +$ENUM_PL "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_enums.defs diff --git a/tools/gen_scripts/glib_generate_extra_defs.sh b/tools/gen_scripts/glib_generate_extra_defs.sh index 37296b0..217d7e0 100755 --- a/tools/gen_scripts/glib_generate_extra_defs.sh +++ b/tools/gen_scripts/glib_generate_extra_defs.sh @@ -1,7 +1,6 @@ #!/bin/bash -# Note that JHBUILD_SOURCES should be defined to contain the path to the root -# of the jhbuild sources. The script assumes that it resides in the +# This script assumes that it resides in the # tools/gen_scripts directory and the defs files will be placed in glib/src. ROOT_DIR="$(dirname "$0")/../.." diff --git a/tools/gen_scripts/glib_generate_methods.sh b/tools/gen_scripts/glib_generate_methods.sh index 32f2680..e585b45 100755 --- a/tools/gen_scripts/glib_generate_methods.sh +++ b/tools/gen_scripts/glib_generate_methods.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that h2def.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the defs files will be placed in glib/src. +# jhbuild sources. The defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -h2def.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,8 +13,9 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/glib/src" -h2def.py "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_functions.defs +H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py" +$H2DEF_PY "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_functions.defs patch "$OUT_DIR"/glib_functions.defs "$OUT_DIR"/glib_functions.defs.patch -h2def.py "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_functions.defs -h2def.py "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_functions.defs +$H2DEF_PY "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_functions.defs +$H2DEF_PY "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_functions.defs -- 2.7.4