+2.43.2 (unstable):
+
+Gio:
+* Added NetworkMonitor.
+ (Murray Cumming)
+* UnixFDList, UnixFDMessage: Correct array lengths in steal_fds()
+ (Kjell Ahlstedt) Bug #741365 (Matthew Balkam)
+
+gmmproc:
+* Don't make one very long line for the enum documentation.
+ (Kjell Ahlstedt)
+* Improve the conversion of Since to @newin.
+ (Kjell Ahlstedt)
+* Add an empty line after @newin where it's missing
+ (Kjell Ahlstedt)
+
+
2.43.1 (unstable):
gmmproc:
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([glibmm], [2.43.1],
+AC_INIT([glibmm], [2.43.2],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
[glibmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
* See get_state_hint().
*
* @newin{2,38}
+ *
* @param value The new state.
*/
template <typename T_Value>
* Detailed action names can have three formats. See parse_detailed_name_variant().
*
* @newin{2,40}
+ *
* @param detailed_name A detailed action name.
* @param[out] action_name The action name.
* @param[out] target_value The target value.
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* See Cancellable::signal_cancelled() for details on how to use this.
*
* @newin{2,22}
+ *
* @param slot The slot to connect.
* @return The id of the signal handler or 0 if @a cancellable has already
* been cancelled.
/** Creates a new CharsetConverter.
*
* @newin{2,24}
+ *
* @param to_charset Destination charset.
* @param from_charset Source charset.
* @return A new CharsetConverter, or <tt>0</tt> on error.
g_file_set_display_name_finish,
errthrow)
- //TODO: Remove the bool results from this and other methods that thrown an exception.
+ //TODO: Remove the bool results from this and other methods that throw an exception.
/** Deletes a file.
* If the file is a directory, it will only be deleted if it is empty.
mount.hg \
mountoperation.hg \
networkaddress.hg \
+ networkmonitor.hg \
networkservice.hg \
notification.hg \
outputstream.hg \
</parameters>
</enum>
+<enum name="GNetworkConnectivity">
+<description>
+The host's network connectivity state, as reported by #GNetworkMonitor.
+
+Since: 2.44
+
+</description>
+<parameters>
+<parameter name="G_NETWORK_CONNECTIVITY_LOCAL">
+<parameter_description> The host is not configured with a
+route to the Internet; it may or may not be connected to a local
+network.
+</parameter_description>
+</parameter>
+<parameter name="G_NETWORK_CONNECTIVITY_LIMITED">
+<parameter_description> The host is connected to a network, but
+does not appear to be able to reach the full Internet, perhaps
+due to upstream network problems.
+</parameter_description>
+</parameter>
+<parameter name="G_NETWORK_CONNECTIVITY_PORTAL">
+<parameter_description> The host is behind a captive portal and
+cannot reach the full Internet.
+</parameter_description>
+</parameter>
+<parameter name="G_NETWORK_CONNECTIVITY_FULL">
+<parameter_description> The host is connected to a network, and
+appears to be able to reach the full Internet.
+</parameter_description>
+</parameter>
+</parameters>
+</enum>
+
<signal name="GNetworkMonitor::network-changed">
<description>
Emitted when the network configuration changes. If @available is
</return>
</function>
+<function name="g_network_monitor_get_connectivity">
+<description>
+Gets a more detailed networking state than
+g_network_monitor_get_network_available().
+
+If #GNetworkMonitor:network-available is %FALSE, then the
+connectivity state will be %G_NETWORK_CONNECTIVITY_LOCAL.
+
+If #GNetworkMonitor:network-available is %TRUE, then the
+connectivity state will be %G_NETWORK_CONNECTIVITY_FULL (if there
+is full Internet connectivity), %G_NETWORK_CONNECTIVITY_LIMITED (if
+the host has a default route, but appears to be unable to actually
+reach the full Internet), or %G_NETWORK_CONNECTIVITY_PORTAL (if the
+host is trapped behind a "captive portal" that requires some sort
+of login or acknowledgement before allowing full Internet access).
+
+Note that in the case of %G_NETWORK_CONNECTIVITY_LIMITED and
+%G_NETWORK_CONNECTIVITY_PORTAL, it is possible that some sites are
+reachable but others are not. In this case, applications can
+attempt to connect to remote servers, but should gracefully fall
+back to their "offline" behavior if the connection attempt fails.
+
+Since: 2.44
+
+</description>
+<parameters>
+<parameter name="monitor">
+<parameter_description> the #GNetworkMonitor
+</parameter_description>
+</parameter>
+</parameters>
+<return> the network connectivity state
+
+</return>
+</function>
+
<function name="g_network_monitor_get_default">
<description>
Gets the default #GNetworkMonitor for the system.
</return>
</function>
+<function name="g_socket_send_messages">
+<description>
+Send multiple data messages from @socket in one go. This is the most
+complicated and fully-featured version of this call. For easier use, see
+g_socket_send(), g_socket_send_to(), and g_socket_send_message().
+
+@messages must point to an array of #GOutputMessage structs and
+@num_messages must be the length of this array. Each #GOutputMessage
+contains an address to send the data to, and a pointer to an array of
+#GOutputVector structs to describe the buffers that the data to be sent
+for each message will be gathered from. Using multiple #GOutputVectors is
+more memory-efficient than manually copying data from multiple sources
+into a single buffer, and more network-efficient than making multiple
+calls to g_socket_send(). Sending multiple messages in one go avoids the
+overhead of making a lot of syscalls in scenarios where a lot of data
+packets need to be sent (e.g. high-bandwidth video streaming over RTP/UDP),
+or where the same data needs to be sent to multiple recipients.
+
+@flags modify how the message is sent. The commonly available arguments
+for this are available in the #GSocketMsgFlags enum, but the
+values there are the same as the system values, and the flags
+are passed in as-is, so you can pass in system-specific flags too.
+
+If the socket is in blocking mode the call will block until there is
+space for all the data in the socket queue. If there is no space available
+and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error
+will be returned if no data was written at all, otherwise the number of
+messages sent will be returned. To be notified when space is available,
+wait for the %G_IO_OUT condition. Note though that you may still receive
+%G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously
+notified of a %G_IO_OUT condition. (On Windows in particular, this is
+very common due to the way the underlying APIs work.)
+
+On error -1 is returned and @error is set accordingly.
+
+Since: 2.44
+
+</description>
+<parameters>
+<parameter name="socket">
+<parameter_description> a #GSocket
+</parameter_description>
+</parameter>
+<parameter name="messages">
+<parameter_description> an array of #GOutputMessage structs
+</parameter_description>
+</parameter>
+<parameter name="num_messages">
+<parameter_description> the number of elements in @messages
+</parameter_description>
+</parameter>
+<parameter name="flags">
+<parameter_description> an int containing #GSocketMsgFlags flags
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> a %GCancellable or %NULL
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> #GError for error reporting, or %NULL to ignore.
+</parameter_description>
+</parameter>
+</parameters>
+<return> number of messages sent, or -1 on error. Note that the number of
+messages sent may be smaller than @num_messages if the socket is
+non-blocking or if @num_messages was larger than UIO_MAXIOV (1024),
+in which case the caller may re-try to send the remaining messages.
+
+</return>
+</function>
+
<function name="g_socket_send_to">
<description>
Tries to send @size bytes from @buffer to @address. If @address is
)
)
+;; Original typedef:
+;; typedef enum {
+;; G_NETWORK_CONNECTIVITY_LOCAL = 1,
+;; G_NETWORK_CONNECTIVITY_LIMITED = 2,
+;; G_NETWORK_CONNECTIVITY_PORTAL = 3,
+;; G_NETWORK_CONNECTIVITY_FULL = 4
+;; } GNetworkConnectivity;
+
+(define-enum-extended NetworkConnectivity
+ (in-module "G")
+ (c-name "GNetworkConnectivity")
+ (values
+ '("local" "G_NETWORK_CONNECTIVITY_LOCAL" "1")
+ '("limited" "G_NETWORK_CONNECTIVITY_LIMITED" "2")
+ '("portal" "G_NETWORK_CONNECTIVITY_PORTAL" "3")
+ '("full" "G_NETWORK_CONNECTIVITY_FULL" "4")
+ )
+)
+
;; From gsettings.h
;; Original typedef:
(gtype-id "G_TYPE_NETWORK_MONITOR_NETLINK")
)
+(define-object MonitorNM
+ (in-module "GNetwork")
+ (parent "GNetworkMonitorNetlink")
+ (c-name "GNetworkMonitorNM")
+ (gtype-id "G_TYPE_NETWORK_MONITOR_NM")
+)
+
(define-object Service
(in-module "GNetwork")
(parent "GObject")
)
)
+(define-enum Connectivity
+ (in-module "GNetwork")
+ (c-name "GNetworkConnectivity")
+ (gtype-id "G_TYPE_NETWORK_CONNECTIVITY")
+ (values
+ '("local" "G_NETWORK_CONNECTIVITY_LOCAL")
+ '("limited" "G_NETWORK_CONNECTIVITY_LIMITED")
+ '("portal" "G_NETWORK_CONNECTIVITY_PORTAL")
+ '("full" "G_NETWORK_CONNECTIVITY_FULL")
+ )
+)
+
(define-flags BindFlags
(in-module "GSettings")
(c-name "GSettingsBindFlags")
(return-type "GType")
)
+(define-function g_network_connectivity_get_type
+ (c-name "g_network_connectivity_get_type")
+ (return-type "GType")
+)
+
(define-function g_settings_bind_flags_get_type
(c-name "g_settings_bind_flags_get_type")
(return-type "GType")
(return-type "gboolean")
)
+(define-method get_connectivity
+ (of-object "GNetworkMonitor")
+ (c-name "g_network_monitor_get_connectivity")
+ (return-type "GNetworkConnectivity")
+)
+
(define-method can_reach
(of-object "GNetworkMonitor")
(c-name "g_network_monitor_can_reach")
+;; From gnetworkmonitornm.h
+
+
+
;; From gnetworkservice.h
(define-function g_network_service_get_type
)
)
+(define-method send_messages
+ (of-object "GSocket")
+ (c-name "g_socket_send_messages")
+ (return-type "gint")
+ (parameters
+ '("GOutputMessage*" "messages")
+ '("guint" "num_messages")
+ '("gint" "flags")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
(define-method close
(of-object "GSocket")
(c-name "g_socket_close")
(construct-only #t)
)
+;; From GNetworkMonitor
+
+(define-signal network-changed
+ (of-object "GNetworkMonitor")
+ (return-type "void")
+ (when "last")
+ (parameters
+ '("gboolean" "p0")
+ )
+)
+
+(define-property connectivity
+ (of-object "GNetworkMonitor")
+ (prop-type "GParamEnum")
+ (docs "Level of network connectivity")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property network-available
+ (of-object "GNetworkMonitor")
+ (prop-type "GParamBoolean")
+ (docs "Whether the network is available")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
;; From GNetworkService
(define-property service
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* does not support content guessing.
*
* @newin{2,18}
+ *
* @param result An AsyncResult.
* @return An array of content types.
* @throw Glib::Error
--- /dev/null
+/* Copyright (C) 2014 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/exceptionhandler.h>
+#include <gio/gio.h>
+#include "slot_async.h"
+
+namespace Gio {
+
+void NetworkMonitor::can_reach_async(const Glib::RefPtr<SocketConnectable>& connectable, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable)
+{
+ // Create a copy of the slot.
+ // A pointer to it will be passed through the callback's data parameter
+ // and deleted in the callback.
+ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+ g_network_monitor_can_reach_async(gobj(),
+ Glib::unwrap(connectable),
+ Glib::unwrap(cancellable),
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+} // namespace Gio
--- /dev/null
+/* Copyright (C) 2014 The giomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <giomm/asyncresult.h>
+#include <giomm/cancellable.h>
+#include <giomm/socketconnectable.h>
+#include <gio/gio.h>
+
+_DEFS(giomm,gio)
+_PINCLUDE(glibmm/private/interface_p.h)
+_PINCLUDE(gio/gio.h)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GNetworkMonitorInterface GNetworkMonitorInterface;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gio
+{
+
+_WRAP_ENUM(NetworkConnectivity, GNetworkConnectivity, NO_GTYPE)
+
+
+/** TODO
+ *
+ * @newin{2,42}
+ */
+class NetworkMonitor : public Glib::Interface
+{
+ _CLASS_INTERFACE(NetworkMonitor, GNetworkMonitor, G_NETWORK_MONITOR, GNetworkMonitorInterface)
+
+public:
+ _WRAP_METHOD(static Glib::RefPtr<NetworkMonitor> get_default(), g_network_monitor_get_default)
+
+ _WRAP_METHOD(bool get_network_available() const, g_network_monitor_get_network_available)
+
+ _WRAP_METHOD(NetworkConnectivity get_connectivity() const, g_network_monitor_get_connectivity)
+
+ _WRAP_METHOD(bool can_reach(const Glib::RefPtr<SocketConnectable>& connectable, const Glib::RefPtr<Cancellable>& cancellable{?}), g_network_monitor_can_reach, errthrow)
+
+ //TODO:
+ void can_reach_async(const Glib::RefPtr<SocketConnectable>& connectable, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
+ _IGNORE(g_network_monitor_can_reach_async)
+
+ _WRAP_METHOD(bool can_reach_finish(const Glib::RefPtr<AsyncResult>& result), g_network_monitor_can_reach_finish, errthrow)
+
+ _WRAP_SIGNAL(void network_changed(bool available), "network-changed")
+
+ //TODO: Wrap vfuncs?
+
+ _WRAP_PROPERTY("network-available", bool)
+ _WRAP_PROPERTY("connectivity", NetworkConnectivity)
+};
+
+} // namespace Gio
* @a action will be activated with @a target as its parameter.
*
* @newin{2,40}
+ *
* @param label Label of the button.
* @param action An action name.
* @param target @a action's parameter.
* was sent on is activated.
*
* @newin{2,40}
+ *
* @param action An action name.
* @param target @a action's parameter.
*/
* must have the same VariantType as the initial state.
*
* @newin{2,38}
+ *
* @param name The name of the action.
* @param state The initial state of the action.
* @return A new SimpleAction.
* must also be bool.
*
* @newin{2,38}
+ *
* @param name The name of the action.
* @param state The initial state of the action.
* @return A new SimpleAction.
/** Creates a new radio action with a string-based target value.
*
* @newin{2,38}
+ *
* @param name The name of the action.
* @param initial_state The initial state of the action.
* @return A new SimpleAction.
/** Creates a new radio action with an integer-based target value.
*
* @newin{2,38}
+ *
* @param name The name of the action.
* @param initial_state The initial state of the action.
* @return A new SimpleAction.
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2009 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* Gio::signal_socket().connect() is a simpler interface to the same functionality.
*
* @newin{2,42}
+ *
* @param condition A Glib::IOCondition mask to monitor.
* @param cancellable A Cancellable. The default value means the source is not cancellable.
* @return A newly allocated SocketSource.
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
{
UnixFDList::UnixFDList(const Glib::ArrayHandle<int>& fds)
-: _CONSTRUCT("fds", fds.data(), "n_fds", fds.size())
-{}
+:
+ // Mark this class as non-derived to allow C++ vfuncs to be skipped.
+ Glib::ObjectBase(0),
+ // g_unix_fd_list_new_from_array() must be called.
+ // Its parameters don't correspond to properties.
+ // _CONSTRUCT() + g_unit_fd_list_append() is not an alternative.
+ // g_unit_fd_list_append() duplicates the file descriptor,
+ // but g_unix_fd_list_new_from_array() does not.
+ Glib::Object((GObject*)g_unix_fd_list_new_from_array(fds.data(), fds.size()))
+{
+}
+
+UnixFDList::UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds)
+:
+ // Mark this class as non-derived to allow C++ vfuncs to be skipped.
+ Glib::ObjectBase(0),
+ // g_unix_fd_list_new_from_array() must be called.
+ // Its parameters don't correspond to properties.
+ // _CONSTRUCT() + g_unit_fd_list_append() is not an alternative.
+ // g_unit_fd_list_append() duplicates the file descriptor,
+ // but g_unix_fd_list_new_from_array() does not.
+ Glib::Object((GObject*)g_unix_fd_list_new_from_array(fds.data(), n_fds))
+{
+}
const Glib::ArrayHandle<int> UnixFDList::peek_fds() const
{
int length = 0;
- const int* fds = g_unix_fd_list_peek_fds(const_cast<GUnixFDList*>(gobj()),
- &length);
- // (length - 1) is used because the array is terminated with a -1.
- return Glib::ArrayHandle<int>(fds, length - 1, Glib::OWNERSHIP_NONE);
+ const int* fds = g_unix_fd_list_peek_fds(const_cast<GUnixFDList*>(gobj()), &length);
+ // The array is terminated with a -1, but that terminating element is
+ // not included in the length that g_unix_fd_list_peek_fds() returns.
+ return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_NONE);
}
Glib::ArrayHandle<int> UnixFDList::steal_fds()
{
int length = 0;
const int* fds = g_unix_fd_list_steal_fds(gobj(), &length);
- // (length - 1) is used because the array is terminated with a -1.
- return Glib::ArrayHandle<int>(fds, length - 1, Glib::OWNERSHIP_DEEP);
+ // The array is terminated with a -1, but that terminating element is
+ // not included in the length that g_unix_fd_list_steal_fds() returns.
+ return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_DEEP);
}
} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
namespace Gio
{
-
/** UnixFDList - An object containing a set of UNIX file descriptors.
* A UnixFDList contains a list of file descriptors. It owns the file
* descriptors that it contains, closing them when finalized.
explicit UnixFDList(const Glib::ArrayHandle<int>& fds);
-#m4 _CONVERSION(`const Glib::ArrayHandle<int>&', `const gint*', `$3.data()')
- _WRAP_CTOR(UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds), g_unix_fd_list_new_from_array)
+ explicit UnixFDList(const Glib::ArrayHandle<int>& fds, int n_fds);
+ _IGNORE(g_unix_fd_list_new_from_array)
public:
_WRAP_METHOD_DOCS_ONLY(g_unix_fd_list_new)
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
{
int length = 0;
const int* fds = g_unix_fd_message_steal_fds(gobj(), &length);
- // (length - 1) is used because the array is terminated with a -1.
- return Glib::ArrayHandle<int>(fds, length - 1, Glib::OWNERSHIP_DEEP);
+ // The array is terminated with a -1, but that terminating element is
+ // not included in the length that g_unix_fd_message_steal_fds() returns.
+ return Glib::ArrayHandle<int>(fds, length, Glib::OWNERSHIP_DEEP);
}
} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
_WRAP_METHOD_DOCS_ONLY(g_unix_fd_message_new_with_fd_list)
_WRAP_CREATE(const Glib::RefPtr<UnixFDList>& fd_list)
- _WRAP_METHOD(Glib::RefPtr<UnixFDList> get_fd_list(), g_unix_fd_message_get_fd_list)
- _WRAP_METHOD(Glib::RefPtr<const UnixFDList> get_fd_list() const, g_unix_fd_message_get_fd_list, constversion)
+ _WRAP_METHOD(Glib::RefPtr<UnixFDList> get_fd_list(), g_unix_fd_message_get_fd_list, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const UnixFDList> get_fd_list() const, g_unix_fd_message_get_fd_list, refreturn, constversion)
_WRAP_METHOD(bool append_fd(int fd), g_unix_fd_message_append_fd, errthrow)
-
/** Returns the array of file descriptors that is contained in this object.
*
* After this call, the descriptors are no longer contained in message.
* TimeSpan that is returned is effectively @a *this - @a other.
*
* @newin{2,26}
+ *
* @param other The other DateTime.
* @return The difference between the two DateTime, as a time
* span expressed in microseconds.
* as a CompareFunc.
*
* @newin{2,26}
+ *
* @param other The DateTime to compare with.
* @return -1, 0 or 1 if @a *this is less than, equal to or greater
* than @a other.
* them to the same time zone.
*
* @newin{2,26}
+ *
* @param other The DateTime to compare with.
* @return <tt>true</tt> if @a *this and @a other are equal.
*/
</parameter>
<parameter name="G_UNICODE_SCRIPT_INHERITED">
<parameter_description> a mark glyph that takes its script from the
-i base glyph to which it is attached
+base glyph to which it is attached
</parameter_description>
</parameter>
<parameter name="G_UNICODE_SCRIPT_ARABIC">
</parameter>
<parameter name="G_UNICODE_SCRIPT_TIRHUTA">
<parameter_description> Tirhuta. Since: 2.42
-@G_UNICODE_SCRIPT_WARANG_CITI Warang Citi. Since: 2.42
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_WARANG_CITI">
+<parameter_description> Warang Citi. Since: 2.42
</parameter_description>
</parameter>
</parameters>
</parameter_description>
</parameter>
</parameters>
-<return></return>
+<return> %TRUE on success, %FALSE if there was an error.
+
+</return>
</function>
<function name="g_closure_add_finalize_notifier">
</parameter_description>
</parameter>
</parameters>
-<return></return>
+<return> %TRUE if @key is in @hash_table, %FALSE otherwise.
+
+</return>
</function>
<function name="g_hash_table_destroy">
%NULL was used as the value for a key.
Note: in the common case of a string-keyed #GHashTable, the return
-value of this function can be conveniently cast to (gchar **).
+value of this function can be conveniently cast to (const gchar **).
You should always free the return result with g_free(). In the
above-mentioned case of a string-keyed hash table, it may be
</parameter_description>
</parameter>
</parameters>
-<return></return>
+<return> %TRUE if strict POSIX is enabled, %FALSE otherwise.
+
+</return>
</function>
<function name="g_option_context_get_summary">
<parameter_description> a #GoptionContext
</parameter_description>
</parameter>
+<parameter name="strict_posix">
+<parameter_description> the new value
+</parameter_description>
+</parameter>
</parameters>
<return></return>
</function>
to #G_MAXSSIZE.
To print or scan values of this type, use
-%G_GSIZE_MODIFIER and/or %G_GSSIZE_FORMAT.
+%G_GSSIZE_MODIFIER and/or %G_GSSIZE_FORMAT.
</description>
<parameters>
If the file could not be loaded then a FileError or KeyFileError exception is thrown.
Since: 2.6
+
\throw Glib::FileError
\throw Glib::KeyFileError
</description>
* If @a key cannot be found then it is created.
*
* @newin{2,12}
+ *
* @param key A key.
* @param value An double value.
*/
/** Checks if @a *this and @a other have the same type and value.
*
* @newin{2,24}
+ *
* @param other The Variant to compare with.
* @return <tt>true</tt> if @a *this and @a other are equal.
*/
<< get_defs(G_TYPE_SRV_TARGET)
<< get_defs(G_TYPE_RESOLVER)
<< get_defs(G_TYPE_NETWORK_ADDRESS)
+ << get_defs(G_TYPE_NETWORK_MONITOR)
<< get_defs(G_TYPE_NETWORK_SERVICE)
<< get_defs(G_TYPE_SETTINGS)
<< get_defs(G_TYPE_SIMPLE_PERMISSION)
_CONV_ENUM(G,MountMountFlags)
_CONV_ENUM(G,MountOperationResult)
_CONV_ENUM(G,MountUnmountFlags)
+_CONV_ENUM(G,NetworkConnectivity)
_CONV_ENUM(G,OutputStreamSpliceFlags)
_CONV_ENUM(G,PasswordSave)
_CONV_ENUM(G,ResolverRecordType)
#MountOperation
#_CONVERSION(`GAskPasswordFlags',`AskPasswordFlags',`($2)$3')
+# NetworkMonitor
+_CONVERSION(`GNetworkMonitor*',`Glib::RefPtr<NetworkMonitor>',`Glib::wrap($3)')
+
+
# Notification
_CONVERSION(`GNotification*',`Glib::RefPtr<Notification>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Notification>&',`GNotification*',__CONVERT_CONST_REFPTR_TO_P)
dnl
dnl _ENUM(cpp_type, c_type, value_suffix, `element_list', `flags', `optional_refdoc_comment', 'get_type_function_name')
+dnl $1 $2 $3 $4 $5 $6 $7
dnl
m4_define(`_ENUM',`dnl
_PUSH()
dnl
dnl
/** $6
+ *
* @ingroup __MODULE_CANONICAL__`'Enums
m4_ifelse($3,Flags,`dnl
* @par Bitwise operators:
$param =~ s/([a-zA-Z0-9]*(_[a-zA-Z0-9]+)*)_?/$1/g;
if(length($desc) > 0)
{
- $desc =~ s/\n/ /g;
- $desc =~ s/ $//;
- $desc =~ s/^\s+//; # Chop off leading whitespace
+ # Chop off leading and trailing whitespace.
+ $desc =~ s/^\s+//;
+ $desc =~ s/\s+$//;
$desc .= '.' unless($desc =~ /(?:^|\.)$/);
- $docs .= "\@var $cpp_enum_name ${param}\n \u${desc}\n\n"; # \u = Convert next char to uppercase
+ $docs .= "\@var $cpp_enum_name ${param}\n\u${desc}\n\n"; # \u = Convert next char to uppercase
}
}
s"<variablelist>\n?(.*?)</variablelist>\n?"&DocsParser::convert_variablelist($1)"esg;
# Use our Doxygen @newin alias.
- # If Since is not followed by a colon, substitute @newin only if it's
- # in a sentence of its own at the end of the string.
- s/\bSince:\s*(\d+)\.(\d+)\.(\d+)\b\.?/\@newin{$1,$2,$3}/g;
- s/\bSince:\s*(\d+)\.(\d+)\b\.?/\@newin{$1,$2}/g;
- s/(\.\s+)Since\s+(\d+)\.(\d+)\.(\d+)\.?$/$1\@newin{$2,$3,$4}/;
- s/(\.\s+)Since\s+(\d+)\.(\d+)\.?$/$1\@newin{$2,$3}/;
-
- s"\b->\b"->"g;
+ # Accept "Since" with or without a following colon.
+ # Require the Since clause to be
+ # - at the end of the string,
+ # - at the end of a line and followed by a blank line, or
+ # - followed by "Deprecated".
+ # If none of these requirements is met, "Since" may be embedded inside
+ # a function description, referring to only a part of the description.
+ # See e.g. g_date_time_format() and gdk_cursor_new_from_pixbuf().
+ # Doxygen assumes that @newin is followed by a paragraph that describes
+ # what is new, but we don't use it that way.
+ my $first_part = '\bSince[:\h]\h*(\d+)\.(\d+)'; # \h == [\t ] (horizontal whitespace)
+ my $last_part = '\.?(\s*$|\h*\n\h*\n|\s+Deprecated)';
+ s/$first_part\.(\d+)$last_part/\@newin{$1,$2,$3}$4/g;
+ s/$first_part$last_part/\@newin{$1,$2}$3/g;
# Doxygen is too dumb to handle —
s"—" \@htmlonly—\@endhtmlonly "g;
DocsParser::lookup_enum_documentation("$c_type", "$cpp_type", " ", \@flags);
# Merge the passed in comment to the existing enum documentation.
- $comment = $comment . "\n * " . $enum_docs;
+ $comment .= "\n * " . $enum_docs if $enum_docs ne "";
my $str = sprintf("_ENUM(%s,%s,%s,\`%s\',\`%s\',\`%s\')dnl\n",
$cpp_type,