Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
notice is found.
- <one line to give the library's name and a brief idea of what it
-does.>
+ <one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 of the License, or (at your option) any later version.
+ 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
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper
mail.
+2.55.2: (unstable):
+Distro packagers should probably not package this yet.
+
+Glib:
+* IOCondition: Add an IO_ prefix to the enumerator names
+ (Kjell Ahlstedt)
+* TimeoutSource: Use monotonic time consistently
+ (Kjell Ahlstedt) Bug #792524 (Dainis Jonitis)
+* Source: Remove get_current_time().
+ (Kjell Ahlstedt)
+* KeyFile, OptionContext, Regex: Add exception specs to errthrow.
+ (Kjell Ahlstedt)
+* ustring:
+ - Replace 8×format() with 1 variadic template.
+ - Replace 9×compose() with 1 variadic template.
+ - Use std::initializer_list instead of pointer + size
+ (Daniel Boles) Bug #784211
+* VariantBase:
+ - Add operator==() and operator!=().
+ (Kjell Ahlstedt) Bug #789330 (Daniel Boles)
+ - cast_dynamic(): Remove noexcept(false).
+ (Kjell Ahlstedt)
+
+Glib::Gio:
+* AppInfo: Update the name of the AppLaunchContext parameters
+ (Kjell Ahlstedt)
+* Action: Add exception specs to errthrow.
+ (Kjell Ahlstedt)
+* Application: Fix property_resource_base_path()'s type
+ (Kjell Ahlstedt)
+* Credentials, et al.: Add exception specs to errthrow.
+ (Kjell Ahlstedt)
+* DataInputStream:
+ - Remove read_until*().
+ - Fix the documentation of read_line_utf8().
+ (Kjell Ahlstedt)
+* InetSocketAddress, ProxyAddress: No guint16 in _WRAP_PROPERTY().
+ (Kjell Ahlstedt)
+* Settings: set_int() and friends shall return bool.
+ (Kjell Ahlstedt) Bug #784211
+* TlsClientConnection: Remove get/set/property_use_ssl3().
+ (Kjell Ahlstedt)
+
+gmmproc:
+* Warn if parameter lists are not compatible
+ (Kjell Ahlstedt)
+* _WRAP_METHOD: Accept optional list of exceptions in errthrow
+ (Kjell Ahlstedt)
+* _WRAP_METHOD_DOCS_ONLY: Optionally suppress @return section.
+ (Kjell Ahlstedt) Bug #787978
+* docextract_to_xml.py: Add --exclude-file option.
+ (Kjell Ahlstedt)
+* Suppress the @return section if return type is void.
+ (Kjell Ahlstedt)
+* generate_extra_defs.cc:
+ - Write signal flags to .defs files.
+ - Write default values of properties to .defs files.
+ - Write default values of properties to generated documentation.
+ (Kjell Ahlstedt) Bug #785895 (Daniel Boles)
+* Warn for unmatched deprecations in signals and properties.
+ (Kjell Ahlstedt)
+
+Documentation:
+* Glib::ObjectBase: Don't mention GtkObject in comments.
+ (Kjell Ahlstedt)
+* Glib::Variant: Hide namespace Glib::detail from Doxygen
+ (Kjell Ahlstedt) Bug #787698 (Daniel Boles)
+* Glib::Variant: Slightly elaborate Variant<Variant> docs.
+ (Daniel Boles) Bug #778219 (Daniel Boles)
+
+
2.55.1: (unstable):
Distro packagers should probably not package this yet.
## for more details.
##
## You should have received a copy of the GNU General Public License along
-## with danielk's Autostuff; if not, write to the Free Software Foundation,
-## Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+## with danielk's Autostuff. If not, see <http://www.gnu.org/licenses/>.
#serial 20110910
## 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.55.1],
+AC_INIT([glibmm], [2.55.2],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
[glibmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* This is a basic server providing a clock like functionality. Clients can
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* This is a basic server providing a clock like functionality. Clients can
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "fdstream.h"
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fcntl.h>
bool
MyCallback(Glib::IOCondition io_condition)
{
- if ((io_condition & Glib::IOCondition::IN) != Glib::IOCondition::IN)
+ if ((io_condition & Glib::IOCondition::IO_IN) != Glib::IOCondition::IO_IN)
{
std::cerr << "Invalid fifo response" << std::endl;
}
}
input_stream.attach(read_fd);
- input_stream.connect(sigc::ptr_fun(MyCallback), Glib::IOCondition::IN);
+ input_stream.connect(sigc::ptr_fun(MyCallback), Glib::IOCondition::IO_IN);
// and last but not least - run the application main loop
mainloop->run();
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
* 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., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * 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/>.
*/
#ifndef _WIN32
signal(SIGINT, interrupted);
chan = Glib::IOChannel::create_from_fd(cancel_fds[0]);
- const auto source = chan->create_watch(Glib::IOCondition::IN);
+ const auto source = chan->create_watch(Glib::IOCondition::IO_IN);
watch_conn = source->connect(sigc::bind(sigc::ptr_fun(async_cancel), cancellable));
#endif
buffer[to_send] = '\0';
while (to_send > 0)
{
- ensure_condition(socket, "send", cancellable, Glib::IOCondition::OUT);
+ ensure_condition(socket, "send", cancellable, Glib::IOCondition::IO_OUT);
try
{
if (use_udp)
to_send -= size;
}
- ensure_condition(socket, "receive", cancellable, Glib::IOCondition::IN);
+ ensure_condition(socket, "receive", cancellable, Glib::IOCondition::IO_IN);
try
{
if (use_udp)
std::cout << Glib::ustring::compose("listening on port %1...\n", port);
- ensure_condition(socket, "accept", cancellable, Glib::IOCondition::IN);
+ ensure_condition(socket, "accept", cancellable, Glib::IOCondition::IO_IN);
try
{
new_socket = socket->accept(cancellable);
gchar buffer[4096] = {};
gssize size;
- ensure_condition(recv_socket, "receive", cancellable, Glib::IOCondition::IN);
+ ensure_condition(recv_socket, "receive", cancellable, Glib::IOCondition::IO_IN);
try
{
if (use_udp)
while (to_send > 0)
{
- ensure_condition(recv_socket, "send", cancellable, Glib::IOCondition::OUT);
+ ensure_condition(recv_socket, "send", cancellable, Glib::IOCondition::IO_OUT);
try
{
if (use_udp)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/contenttype.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GIOMM_CONTENTTYPE_H
#define _GIOMM_CONTENTTYPE_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "init.h"
-// -*- c++ -*-
#ifndef _GIOMM_INIT_H
#define _GIOMM_INIT_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Gio
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "slot_async.h"
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- c++ -*-
#ifndef _GIOMM_WRAP_INIT_H
#define _GIOMM_WRAP_INIT_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2011 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
static void parse_detailed_name(const Glib::ustring& detailed_name, Glib::ustring& action_name, T_Value& target_value);
_WRAP_METHOD(static void parse_detailed_name_variant(const Glib::ustring& detailed_name,
- Glib::ustring& action_name{>>}, Glib::VariantBase& target_value{>>}), g_action_parse_detailed_name, errthrow)
+ Glib::ustring& action_name{>>}, Glib::VariantBase& target_value{>>}), g_action_parse_detailed_name, errthrow "Glib::VariantParseError")
/** Formats a detailed action name from the action's action_name and @a target_value.
*
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
//TODO: Add templated method, renaming this to action_state_changed_variant).
_WRAP_METHOD(void action_state_changed (const Glib::ustring& action_name, const Glib::VariantBase& state), g_action_group_action_state_changed)
- _WRAP_SIGNAL(void action_added(const Glib::ustring& action_name), "action-added")
- _WRAP_SIGNAL(void action_enabled_changed(const Glib::ustring& action_name, bool enabled), "action-enabled-changed")
- _WRAP_SIGNAL(void action_removed(const Glib::ustring& action_name), "action-removed")
+ _WRAP_SIGNAL(void action_added(const Glib::ustring& action_name), "action-added", detail_name action_name)
+ _WRAP_SIGNAL(void action_enabled_changed(const Glib::ustring& action_name, bool enabled), "action-enabled-changed", detail_name action_name)
+ _WRAP_SIGNAL(void action_removed(const Glib::ustring& action_name), "action-removed", detail_name action_name)
#m4 _CONVERSION(`GVariant*', `const Glib::VariantBase&', `Glib::wrap($3, true)')
- _WRAP_SIGNAL(void action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& value), "action-state-changed")
+ _WRAP_SIGNAL(void action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& value), "action-state-changed", detail_name action_name)
_WRAP_VFUNC(bool has_action(const Glib::ustring& name) const, "has_action")
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/action.h>
on_action_radio_string(
const Glib::VariantBase& parameter, const Gio::ActionMap::ActivateWithStringParameterSlot& slot)
{
- // TODO: This syntax is odd:
- const auto variantDerived = parameter.cast_dynamic<Glib::Variant<Glib::ustring>>(parameter);
+ const auto variantDerived = Glib::VariantBase::cast_dynamic<Glib::Variant<Glib::ustring>>(parameter);
const auto str = variantDerived.get();
slot(str);
}
on_action_radio_int(
const Glib::VariantBase& parameter, const Gio::ActionMap::ActivateWithIntParameterSlot& slot)
{
- // TODO: This syntax is odd:
- const auto variantDerived = parameter.cast_dynamic<Glib::Variant<int>>(parameter);
+ const auto variantDerived = Glib::VariantBase::cast_dynamic<Glib::Variant<int>>(parameter);
const auto str = variantDerived.get();
slot(str);
}
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/file.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
#m4 _CONVERSION(`const std::vector< Glib::RefPtr<Gio::File> >&',`GList*',`Glib::ListHandler<Glib::RefPtr<Gio::File> >::vector_to_list($3).data ()')
/** Launches the application. This passes the @a file to the launched application
- * as an argument, using the optional @a launch_context to get information
+ * as an argument, using the optional @a context to get information
* about the details of the launcher (like what screen it is on).
* On error, an exception will be thrown accordingly.
*
* @c GIO_LAUNCHED_DESKTOP_FILE, should it be inherited
* by further processes. The @c DISPLAY and
* @c DESKTOP_STARTUP_ID environment variables are also
- * set, based on information provided in @a launch_context.
+ * set, based on information provided in @a context.
* @param file A File object.
- * @param launch_context An AppLaunchContext.
+ * @param context An AppLaunchContext.
* @return <tt>true</tt> on successful launch, <tt>false</tt> otherwise.
*
* @newin{2,30}
*/
- bool launch(const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<AppLaunchContext>& launch_context);
+ bool launch(const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<AppLaunchContext>& context);
/** Launches the application. This passes the @a file to the launched application
* as an argument.
* @c GIO_LAUNCHED_DESKTOP_FILE, should it be inherited
* by further processes. The @c DISPLAY and
* @c DESKTOP_STARTUP_ID environment variables are also
- * set, based on information provided in @a launch_context.
+ * set, based on information provided in @a context.
* @param file A File object.
* @return <tt>true</tt> on successful launch, <tt>false</tt> otherwise.
*
bool launch(const Glib::RefPtr<Gio::File>& file);
_WRAP_METHOD(bool launch(const std::vector< Glib::RefPtr<Gio::File> >& files,
- const Glib::RefPtr<AppLaunchContext>& launch_context{?}),
+ const Glib::RefPtr<AppLaunchContext>& context{?}),
g_app_info_launch,
errthrow)
//TODO: I think we use Glib::ustring elsewhere for URIs:
_WRAP_METHOD(bool launch_uris(const std::vector<std::string>& uris,
- const Glib::RefPtr<AppLaunchContext>& launch_context{?}),
+ const Glib::RefPtr<AppLaunchContext>& context{?}),
g_app_info_launch_uris,
errthrow)
/** Launches the application. This passes the @a uri to the launched application
- * as an arguments, using the optional @a launch_context to get information
+ * as an arguments, using the optional @a context to get information
* about the details of the launcher (like what screen it is on).
* On error, an exception will be thrown accordingly.
*
* can fail to start if it runs into problems during startup. There is
* no way to detect this.
* @param uris A URIs to launch.
- * @param launch_context An AppLaunchContext.
+ * @param context An AppLaunchContext.
* @return <tt>true</tt> on successful launch, <tt>false</tt> otherwise.
*
* @newin{2,30}
*/
- bool launch_uri(const std::string& uris, const Glib::RefPtr<AppLaunchContext>& launch_context);
+ bool launch_uri(const std::string& uris, const Glib::RefPtr<AppLaunchContext>& context);
/** A launch_uri() convenience overload.
*
_WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_type(const std::string& content_type, bool must_support_uris = true), g_app_info_get_default_for_type)
_WRAP_METHOD(static Glib::RefPtr<AppInfo> get_default_for_uri_scheme(const std::string& uri_scheme), g_app_info_get_default_for_uri_scheme)
_WRAP_METHOD(static void reset_type_associations(const std::string& content_type), g_app_info_reset_type_associations)
- _WRAP_METHOD(static bool launch_default_for_uri(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& launch_context{?}), g_app_info_launch_default_for_uri, errthrow)
+ _WRAP_METHOD(static bool launch_default_for_uri(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context{?}), g_app_info_launch_default_for_uri, errthrow)
- _WRAP_METHOD(static void launch_default_for_uri_async(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& launch_context{.?},
+ _WRAP_METHOD(static void launch_default_for_uri_async(const std::string& uri, const Glib::RefPtr<AppLaunchContext>& context{.?},
const SlotAsyncReady& slot{callback?}, const Glib::RefPtr<Cancellable>& cancellable{.?}), g_app_info_launch_default_for_uri_async, slot_name slot, slot_callback SignalProxy_async_callback)
_IGNORE(g_app_info_launch_default_for_uri_async)
_WRAP_METHOD(static bool launch_default_for_uri_finish(const Glib::RefPtr<AsyncResult>& result), g_app_info_launch_default_for_uri_finish, errthrow)
//_WRAP_VFUNC(std::string get_description() const, "get_description")
//_WRAP_VFUNC(std::string get_executable() const, "get_executable")
//_WRAP_VFUNC(Glib::RefPtr<Icon> get_icon() const, "get_icon")
- //_WRAP_VFUNC(bool launch(const std::vector<Gio::File>& filenames, const Glib::RefPtr<AppLaunchContext>& launch_context, GError** error), "launch")
+ //_WRAP_VFUNC(bool launch(const std::vector<Gio::File>& filenames, const Glib::RefPtr<AppLaunchContext>& context, GError** error), "launch")
//_WRAP_VFUNC(bool supports_uris() const, "supports_uris")
//_WRAP_VFUNC(bool supports_files() const, "supports_files")
- //_WRAP_VFUNC(bool launch_uris(const std::vector<std::string>& uris, const Glib::RefPtr<AppLaunchContext>& launch_context, GError** error), "launch_uris")
+ //_WRAP_VFUNC(bool launch_uris(const std::vector<std::string>& uris, const Glib::RefPtr<AppLaunchContext>& context, GError** error), "launch_uris")
//_WRAP_VFUNC(bool should_show() const, "should_show")
//_WRAP_VFUNC(bool set_as_default_for_type(const std::string& content_type, GError** error), "set_as_default_for_type")
//_WRAP_VFUNC(bool set_as_default_for_extension(const std::string& extension, GError** error), "set_as_default_for_extension")
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/appinfo.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <exception>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
Application::Application(const Glib::ustring& application_id, Flags flags)
: // Mark this class as non-derived to allow C++ vfuncs to be skipped.
+ // GApplication complains about "" but allows nullptr, so we avoid passing "".
Glib::ObjectBase(nullptr),
- Glib::Object(Glib::ConstructParams(custom_class_init(), "application_id",
- Glib::c_str_or_nullptr(application_id), "flags", ((GApplicationFlags)(flags)), nullptr))
+ Glib::Object(Glib::ConstructParams(custom_class_init(),
+ "application_id", Glib::c_str_or_nullptr(application_id),
+ "flags", static_cast<GApplicationFlags>(flags), nullptr))
{
}
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
_WRAP_PROPERTY("inactivity-timeout", guint)
_WRAP_PROPERTY("is-registered", bool)
_WRAP_PROPERTY("is-remote", bool)
- _WRAP_PROPERTY("resource-base-path", bool, newin "2,44")
+ _WRAP_PROPERTY("resource-base-path", std::string, newin "2,44")
_WRAP_PROPERTY("is-busy", bool)
_WRAP_SIGNAL(void startup(), "startup")
_WRAP_VFUNC(void dbus_unregister(const Glib::RefPtr<DBus::Connection>& connection, const Glib::ustring& object_path), "dbus_unregister")
private:
- /** This is just a way to call Glib::init() (which calls g_type_init()) before
- * calling application_class_.init(), so that
- * g_application_get_type() will always succeed.
- * See https://bugzilla.gnome.org/show_bug.cgi?id=639925
+ /** This is just a way to call Glib::init() before calling a Glib::Object ctor,
+ * so that glibmm's GQuarks are created before they are used.
*/
const Glib::Class& custom_class_init();
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/file.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <gio/gasyncresult.h> //We are not allowed to include individual headers.
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/filterinputstream.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/filteroutputstream.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/filterinputstream.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/filteroutputstream.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
_WRAP_METHOD(gpointer get_native(Type native_type), g_credentials_get_native)
_WRAP_METHOD(void set_native(Type native_type, gpointer native), g_credentials_set_native)
- _WRAP_METHOD(bool is_same_user(const Glib::RefPtr<const Credentials>& other_credentials), g_credentials_is_same_user, errthrow)
+ _WRAP_METHOD(bool is_same_user(const Glib::RefPtr<const Credentials>& other_credentials), g_credentials_is_same_user, errthrow "Gio::Error")
- _WRAP_METHOD(uid_t get_unix_user(), g_credentials_get_unix_user, errthrow, ifdef G_OS_UNIX)
- _WRAP_METHOD(bool set_unix_user(uid_t uid), g_credentials_set_unix_user, errthrow, ifdef G_OS_UNIX)
+ _WRAP_METHOD(uid_t get_unix_user(), g_credentials_get_unix_user, errthrow "Gio::Error", ifdef G_OS_UNIX)
+ _WRAP_METHOD(bool set_unix_user(uid_t uid), g_credentials_set_unix_user, errthrow "Gio::Error", ifdef G_OS_UNIX)
- _WRAP_METHOD(pid_t get_unix_pid() const, g_credentials_get_unix_pid, errthrow, ifdef G_OS_UNIX)
+ _WRAP_METHOD(pid_t get_unix_pid() const, g_credentials_get_unix_pid, errthrow "Gio::Error", ifdef G_OS_UNIX)
};
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
}
bool
-DataInputStream::read_until(
- std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable)
-{
- GError* gerror = nullptr;
- char* c_str = g_data_input_stream_read_until(gobj(), stop_chars.c_str(),
- nullptr, // pass nullptr since we can easily determine the length from the returned std::string
- Glib::unwrap(cancellable), &gerror);
- if (gerror)
- ::Glib::Error::throw_exception(gerror);
- if (c_str)
- {
- data = c_str;
- g_free(c_str);
- return true;
- }
- // end of stream reached, return failure status
- return false;
-}
-
-/** non-cancellable version of read_until()
- */
-bool
-DataInputStream::read_until(std::string& data, const std::string& stop_chars)
-{
- GError* gerror = nullptr;
- char* c_str = g_data_input_stream_read_until(gobj(), stop_chars.c_str(),
- nullptr, // pass nullptr since we can easily determine the length from the returned std::string
- nullptr, &gerror);
- if (gerror)
- ::Glib::Error::throw_exception(gerror);
- if (c_str)
- {
- data = c_str;
- g_free(c_str);
- return true;
- }
- // end of stream reached, return failure status
- return false;
-}
-
-void
-DataInputStream::read_until_async(const std::string& stop_chars, const SlotAsyncReady& slot,
- const Glib::RefPtr<Cancellable>& cancellable, int io_priority)
-{
- // Create a copy of the slot.
- // A pointer to it will be passed through the callback's data parameter
- // and deleted in the callback.
- auto slot_copy = new SlotAsyncReady(slot);
-
- g_data_input_stream_read_until_async(gobj(), stop_chars.c_str(), io_priority,
- Glib::unwrap(cancellable), &SignalProxy_async_callback, slot_copy);
-}
-
-bool
-DataInputStream::read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data)
-{
- GError* gerror = nullptr;
- gsize size = 0;
- gchar* buffer =
- g_data_input_stream_read_until_finish(gobj(), Glib::unwrap(result), &size, &(gerror));
- if (gerror)
- ::Glib::Error::throw_exception(gerror);
-
- bool retval = false;
- if (buffer && size)
- {
- retval = (buffer != nullptr);
- data = std::string(buffer, size);
- g_free(buffer);
- }
-
- return retval;
-}
-
-bool
DataInputStream::read_upto(
std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable)
{
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/bufferedinputstream.h>
* another thread. If the operation
* was cancelled, a Gio::Error with CANCELLED will be thrown.
*
- * @param line A string to fill with the read data (without the newlines).
+ * @param[out] line A string to fill with the read data (without the newlines).
* @param cancellable A cancellable object.
* @result true if the read succeeded without error.
*/
/** A non-cancellable version of read_line().
*
- * @param line A string to fill with the read data (without the newlines).
+ * @param[out] line A string to fill with the read data (without the newlines).
* @result true if the read succeeded without error.
*/
bool read_line(std::string& line);
-// The below initialization is unusual because it stores the return in a 'tmp'
-// variable, sets the output parameter and then frees the return. If this is
-// too weird, the methods can probably be just handwritten.
-# _INITIALIZATION(`std::string&',`return-char*',`char* tmp = $4; $3 = tmp; g_free(tmp)')
-
+#m4 _INITIALIZATION(`std::string&',`return-char*',`$3 = Glib::convert_return_gchar_ptr_to_stdstring($4)')
+ /** Reads a UTF-8 encoded line from the data input stream.
+ *
+ * If @a cancellable is supplied and not equal to Glib::RefPtr<Cancellable>(),
+ * then the operation can be cancelled by triggering the cancellable object
+ * from another thread. If the operation was cancelled, Gio::Error with
+ * code() == Gio::Error::CANCELLED will be thrown.
+ *
+ * @newin{2,30}
+ *
+ * @param[out] line A UTF-8 string with the line that was read in (without the newlines).
+ * Supply @a length to get the length of the read line. On an error,
+ * @a line is set to an empty string and an exception is thrown. For UTF-8
+ * conversion errors, a Glib::ConvertError is thrown. If there's no content
+ * to read, @a line will still be set to an empty string, but no exception
+ * will be thrown.
+ * @param cancellable Optional Cancellable object.
+ * @param[out] length An optional gsize to get the length of the data read in.
+ */
_WRAP_METHOD(void read_line_utf8(std::string& line{OUT}, const Glib::RefPtr<Cancellable>& cancellable{.?}, gsize& length{.?}), g_data_input_stream_read_line_utf8, errthrow)
- /** The asynchronous version of read_until(). It is
+ /** The asynchronous version of read_line(). It is
* an error to have two outstanding calls to this function.
*
* @param slot The slot to call when the request is satisfied.
* @param cancellable A cancellable object.
* @param io_priority The I/O priority of the request.
- * @result true if the read succeeded without error.
*/
void read_line_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
_IGNORE(g_data_input_stream_read_line_async)
/** Finish an asynchronous call started by read_line_async().
*
* @param result The AsyncResult that was provided to the callback slot.
- * @param data A string to fill with the read data.
+ * @param[out] data A string to fill with the read data.
* @result true if the read succeeded without error.
*/
bool read_line_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
_IGNORE(g_data_input_stream_read_line_finish)
- _WRAP_METHOD(void read_line_finish_utf8(const Glib::RefPtr<AsyncResult>& result{.}, std::string& data{OUT}, gsize& length{.?}), g_data_input_stream_read_line_finish_utf8, errthrow)
-
- /** Reads a string from the data input stream, up to the first
- * occurrence of any of the stop characters.
- *
- * Note that, in contrast to read_until_async(),
- * this function consumes the stop character that it finds.
- *
- * Don't use this function in new code. Its functionality is
- * inconsistent with read_until_async(). Both
- * functions will be marked as deprecated in a future release. Use
- * read_upto() instead, but note that that method
- * does not consume the stop character.
- *
- * @param data A string to fill with the read data.
- * @param stop_chars Characters to terminate the read.
- * @param cancellable A cancellable object.
- * @result true if the read succeeded without error.
- */
- bool read_until(std::string& data, const std::string& stop_chars, const Glib::RefPtr<Cancellable>& cancellable);
- _IGNORE(g_data_input_stream_read_until)
-
- //TODO: This will be really deprecated sometime, maybe sometime after glib 2.30.0.
- /** A non-cancellable version of read_until().
- *
- * Note that, in contrast to read_until_async(),
- * this function consumes the stop character that it finds.
- *
- * Don't use this function in new code. Its functionality is
- * inconsistent with read_until_async(). Both
- * functions will be marked as deprecated in a future release. Use
- * read_upto() instead, but note that that method
- * does not consume the stop character.
- *
- * @param data A string to fill with the read data.
- * @param stop_chars Characters to terminate the read.
- * @result true if the read succeeded without error.
- */
- bool read_until(std::string& data, const std::string& stop_chars);
-
- //TODO: This will be really deprecated sometime after glib 2.30.0.
- /** The asynchronous version of read_until(). It is
- * an error to have two outstanding calls to this function.
- *
- * Note that, in contrast to ead_until(),
- * this function does not consume the stop character that it finds. You
- * must read it for yourself.
- *
+ /** Finish an asynchronous call started by read_line_async().
*
- * Don't use this function in new code. Its functionality is
- * inconsistent with read_until(). Both functions
- * will be marked as deprecated in a future release. Use
- * read_upto_async() instead.
+ * @newin{2,30}
*
- * @param stop_chars Characters to terminate the read.
- * @param slot The slot to call when the request is satisfied.
- * @param cancellable A cancellable object.
- * @param io_priority The I/O priority of the request.
- * @result true if the read succeeded without error.
- */
- void read_until_async(const std::string& stop_chars, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
- _IGNORE(g_data_input_stream_read_until_async)
-
- //TODO: This will be really deprecated sometime after glib 2.30.0.
- /** Finish an asynchronous call started by read_until_async().
- *
- * @param result The AsyncResult that was provided to the callback slot.
- * @param data A string to fill with the read data.
- * @result true if the read succeeded without error.
+ * @param result The AsyncResult that was provided to the callback.
+ * @param[out] data A UTF-8 string with the line that was read in (without the newlines).
+ * Supply @a length to get the length of the read line. On an error,
+ * @a line is set to an empty string and an exception is thrown. For UTF-8
+ * conversion errors, a Glib::ConvertError is thrown. If there's no content
+ * to read, @a line will still be set to an empty string, but no exception
+ * will be thrown.
+ * @param[out] length An optional gsize to get the length of the data read in.
*/
- bool read_until_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
- _IGNORE(g_data_input_stream_read_until_finish)
-
+ _WRAP_METHOD(void read_line_finish_utf8(const Glib::RefPtr<AsyncResult>& result{.}, std::string& data{OUT}, gsize& length{.?}), g_data_input_stream_read_line_finish_utf8, errthrow)
/** Reads a string from the data input stream, up to the first
* occurrence of any of the stop characters.
*
- * In contrast to read_until(), this method
- * does <em>not</em> consume the stop character. You have
- * to use read_byte() to get it before calling
- * read_upto() again.
+ * This method does <em>not</em> consume the stop character. You have
+ * to use read_byte() to get it before calling %read_upto() again.
*
- * @param data A string to fill with the read data.
+ * @param[out] data A string to fill with the read data.
* @param stop_chars Characters to terminate the read.
* @param cancellable A cancellable object.
* @result true if the read succeeded without error.
_IGNORE(g_data_input_stream_read_upto)
/** A non-cancellable version of read_upto().
- * @param data A string to fill with the read data.
+ * @param[out] data A string to fill with the read data.
* @param stop_chars Characters to terminate the read.
* @result true if the read succeeded without error.
*/
/** The asynchronous version of read_upto(). It is
* an error to have two outstanding calls to this function.
*
- * In contrast to read_until(), this method
- * does <em>not</em> consume the stop character. You have
- * to use read_byte() to get it before calling
- * read_upto() again.
+ * This method does <em>not</em> consume the stop character. You have
+ * to use read_byte() to get it before calling %read_upto_async() again.
*
* @param stop_chars Characters to terminate the read.
* @param slot The slot to call when the request is satisfied.
* @param cancellable A cancellable object.
* @param io_priority The I/O priority of the request.
- * @result true if the read succeeded without error.
*/
void read_upto_async(const std::string& stop_chars, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
_IGNORE(g_data_input_stream_read_upto_async)
* get it before calling read_upto_async() again.
*
* @param result The AsyncResult that was provided to the callback slot.
- * @param data A string to fill with the read data.
+ * @param[out] data A string to fill with the read data.
* @result true if the read succeeded without error.
*/
bool read_upto_finish(const Glib::RefPtr<AsyncResult>& result, std::string& data);
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/filteroutputstream.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/dbusconnection.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
*/
static void get(BusType bus_type, const SlotAsyncReady& slot);
- _WRAP_METHOD_DOCS_ONLY( g_bus_get_finish, errthrow)
- /// @throw Glib::Error.
_WRAP_METHOD(static Glib::RefPtr<Connection> get_finish(const Glib::RefPtr<AsyncResult>& res), g_bus_get_finish, errthrow)
_WRAP_METHOD(static Glib::RefPtr<Connection> get_sync(BusType bus_type, const Glib::RefPtr<Cancellable>& cancellable{?}), g_bus_get_sync, errthrow)
const SlotAsyncReady& slot,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_finish)
- /// @throw Glib::Error.
_WRAP_METHOD(static Glib::RefPtr<Connection> create_finish(const Glib::RefPtr<AsyncResult>& res), g_dbus_connection_new_finish, errthrow)
_WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address)
const SlotAsyncReady& slot,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_finish)
- /// @throw Glib::Error.
_WRAP_METHOD(static Glib::RefPtr<Connection> create_for_address_finish(const Glib::RefPtr<AsyncResult>& res), g_dbus_connection_new_for_address_finish, errthrow)
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync, errthrow)
static Glib::RefPtr<Connection> create_sync(
const Glib::RefPtr<IOStream>& stream,
const std::string& guid,
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_sync, errthrow)
static Glib::RefPtr<Connection> create_sync(
const Glib::RefPtr<IOStream>& stream,
const std::string& guid,
const std::string& guid,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync, errthrow)
static Glib::RefPtr<Connection> create_for_address_sync(
const std::string& address,
const Glib::RefPtr<AuthObserver>& observer,
const Glib::RefPtr<Cancellable>& cancellable,
ConnectionFlags flags = Gio::DBus::ConnectionFlags::NONE);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_new_for_address_sync, errthrow)
static Glib::RefPtr<Connection> create_for_address_sync(
const std::string& address,
const Glib::RefPtr<Cancellable>& cancellable,
int timeout_msec,
const SlotAsyncReady& slot);
- _WRAP_METHOD_DOCS_ONLY(g_dbus_connection_send_message_with_reply_finish)
- /// @throw Glib::Error.
_WRAP_METHOD(Glib::RefPtr<Message> send_message_with_reply_finish(const Glib::RefPtr<AsyncResult>& res), g_dbus_connection_send_message_with_reply_finish, errthrow)
/** Synchronously sends @a message to the peer represented by the connection
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(giomm,gio)
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/dbusconnection.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/dbusmethodinvocation.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/refptr.h>
_IGNORE(g_dbus_node_info_ref, g_dbus_node_info_unref)
public:
- _WRAP_METHOD_DOCS_ONLY(g_dbus_node_info_new_for_xml)
- /// @throw Glib::Error.
- _WRAP_METHOD(static Glib::RefPtr<NodeInfo> create_for_xml(const Glib::ustring& xml_data), g_dbus_node_info_new_for_xml, errthrow)
+ _WRAP_METHOD(static Glib::RefPtr<NodeInfo> create_for_xml(const Glib::ustring& xml_data), g_dbus_node_info_new_for_xml, errthrow "Glib::MarkupError")
_WRAP_METHOD(Glib::RefPtr<InterfaceInfo> lookup_interface(const Glib::ustring& name), g_dbus_node_info_lookup_interface, refreturn)
_WRAP_METHOD(Glib::RefPtr<const InterfaceInfo> lookup_interface(const Glib::ustring& name) const, g_dbus_node_info_lookup_interface, constversion, refreturn)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/menumodel.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
// Ignore variable argument functions.
_IGNORE(g_dbus_message_new_method_error, g_dbus_message_new_method_error_valist)
- _WRAP_METHOD(static Glib::RefPtr<Message> create_from_blob(const guchar* blob, gsize blob_len, CapabilityFlags capabilities = CapabilityFlags::NONE), g_dbus_message_new_from_blob, errthrow)
+ _WRAP_METHOD(static Glib::RefPtr<Message> create_from_blob(const guchar* blob, gsize blob_len, CapabilityFlags capabilities = CapabilityFlags::NONE), g_dbus_message_new_from_blob, errthrow "Gio::Error")
_WRAP_METHOD(Glib::ustring print(guint indent), g_dbus_message_print)
_WRAP_METHOD(bool get_locked() const, g_dbus_message_get_locked)
_WRAP_METHOD(void lock() ,g_dbus_message_lock)
- _WRAP_METHOD(Glib::RefPtr<Message> copy() const, g_dbus_message_copy, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<Message> copy() const, g_dbus_message_copy, errthrow "Gio::Error")
_WRAP_METHOD(MessageType get_message_type() const, g_dbus_message_get_message_type)
_WRAP_METHOD(void set_message_type(MessageType type), g_dbus_message_set_message_type)
_WRAP_METHOD(Glib::ustring get_arg0() const, g_dbus_message_get_arg0)
- _WRAP_METHOD(static gssize bytes_needed(const guchar* blob, gsize blob_len), g_dbus_message_bytes_needed, errthrow)
+ _WRAP_METHOD(static gssize bytes_needed(const guchar* blob, gsize blob_len), g_dbus_message_bytes_needed, errthrow "Gio::Error")
- _WRAP_METHOD(guchar* to_blob(gsize& out_size, CapabilityFlags capabilities = CapabilityFlags::NONE), g_dbus_message_to_blob, errthrow)
+ _WRAP_METHOD(guchar* to_blob(gsize& out_size, CapabilityFlags capabilities = CapabilityFlags::NONE), g_dbus_message_to_blob, errthrow "Gio::Error")
_WRAP_METHOD(void to_exception(), g_dbus_message_to_gerror, errthrow)
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <giomm/dbusconnection.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/dbusconnection.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/dbusmethodinvocation.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(giomm,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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/dbusconnection.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/mount.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<Emblem>>',`Glib::ListHandler<Glib::RefPtr<Emblem>>::list_to_vector($3, Glib::OWNERSHIP_NONE)')
_WRAP_METHOD(std::vector<Glib::RefPtr<Emblem>> get_emblems(), g_emblemed_icon_get_emblems)
-
-//TODO: #m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<const Emblem>>',`$2($3, Glib::OWNERSHIP_NONE)')
-// _WRAP_METHOD(std::vector<Glib::RefPtr<const Emblem>> get_emblems() const, g_emblemed_icon_get_emblems, constversion)
+ dnl// Can't use the constversion parameter in _WRAP_METHOD() when a vector is returned.
+#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<const Emblem>>',`Glib::ListHandler<Glib::RefPtr<const Emblem>>::list_to_vector($3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(std::vector<Glib::RefPtr<const Emblem>> get_emblems() const, g_emblemed_icon_get_emblems)
_WRAP_METHOD(void add_emblem(const Glib::RefPtr<Emblem>& emblem), g_emblemed_icon_add_emblem)
_WRAP_METHOD(void clear_emblems(), g_emblemed_icon_clear_emblems)
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/mount.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/fileattributeinfo.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/datetime.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/fileinfo.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/fileinfo.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <giomm/file.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <giomm/file.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/outputstream.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/inputstream.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/outputstream.h>
specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
</parameter_description>
</parameter>
+<parameter name="G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE">
+<parameter_description> If another message bus connection owns the name, immediately
+return an error from g_bus_own_name() rather than entering the waiting queue for that name. (Since 2.54)
+</parameter_description>
+</parameter>
</parameters>
</enum>
</parameter_description>
</parameter>
<parameter name="invalidated_properties">
-<parameter_description> A %NULL terminated array of properties that was invalidated.
+<parameter_description> A %NULL terminated
+array of properties that were invalidated.
</parameter_description>
</parameter>
</parameters>
</parameter_description>
</parameter>
<parameter name="G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES">
-<parameter_description> If set, the property value for any <emphasis>invalidated property</emphasis> will be (asynchronously) retrieved upon receiving the <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">PropertiesChanged</ulink> D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32.
+<parameter_description> If set, the property value for any __invalidated property__ will be (asynchronously) retrieved upon receiving the [`PropertiesChanged`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties) D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32.
</parameter_description>
</parameter>
<parameter name="G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION">
<description>
The certificate database to use when verifying this TLS connection.
If no certificate database is set, then the default database will be
-used. See g_dtls_backend_get_default_database().
+used. See g_tls_backend_get_default_database().
Since: 2.48
<parameter name="G_FILE_MONITOR_EVENT_RENAMED">
<parameter_description> the file was renamed within the
current directory -- only sent if the %G_FILE_MONITOR_WATCH_MOVES
-flag is set. Since: 2.44.
+flag is set. Since: 2.46.
</parameter_description>
</parameter>
<parameter name="G_FILE_MONITOR_EVENT_MOVED_IN">
<parameter_description> the file was moved into the
monitored directory from another location -- only sent if the
-%G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.44.
+%G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46.
</parameter_description>
</parameter>
<parameter name="G_FILE_MONITOR_EVENT_MOVED_OUT">
<parameter_description> the file was moved out of the
monitored directory to another location -- only sent if the
-%G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.44
+%G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46
</parameter_description>
</parameter>
</parameters>
by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED
event instead (NB: not supported on all backends; the default
behaviour -without specifying this flag- is to send single DELETED
-and CREATED events). Deprecated since 2.44: use
+and CREATED events). Deprecated since 2.46: use
%G_FILE_MONITOR_WATCH_MOVES instead.
</parameter_description>
</parameter>
<parameter_description> Watch for rename operations on a
monitored directory. This causes %G_FILE_MONITOR_EVENT_RENAMED,
%G_FILE_MONITOR_EVENT_MOVED_IN and %G_FILE_MONITOR_EVENT_MOVED_OUT
-events to be emitted when possible. Since: 2.44.
+events to be emitted when possible. Since: 2.46.
</parameter_description>
</parameter>
</parameters>
<signal name="GMount::pre-unmount">
<description>
-This signal is emitted when the #GMount is about to be
+This signal may be emitted when the #GMount is about to be
unmounted.
+This signal depends on the backend and is only emitted if
+GIO was used to unmount.
+
Since: 2.22
</description>
<return></return>
</signal>
-<property name="GSettings:context">
+<property name="GSettings:backend">
<description>
The name of the context that the settings are stored in.
<enum name="GTlsDatabaseLookupFlags">
<description>
-Flags for g_tls_database_lookup_certificate_handle(),
+Flags for g_tls_database_lookup_certificate_for_handle(),
g_tls_database_lookup_certificate_issuer(),
and g_tls_database_lookup_certificates_issued_by().
<signal name="GVolumeMonitor::mount-pre-unmount">
<description>
-Emitted when a mount is about to be removed.
+May be emitted when a mount is about to be removed.
+
+This signal depends on the backend and is only emitted if
+GIO was used to unmount.
</description>
<parameters>
</return>
</signal>
+<signal name="GXdpDocuments::handle-add-full">
+<description>
+Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddFull">AddFull()</link> D-Bus method.
+
+If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_documents_complete_add_full() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
+
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpDocuments.
+</parameter_description>
+</parameter>
+<parameter name="invocation">
+<parameter_description> A #GDBusMethodInvocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="arg_o_path_fds">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+<parameter name="arg_flags">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+<parameter name="arg_app_id">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+<parameter name="arg_permissions">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+</return>
+</signal>
+
<signal name="GXdpDocuments::handle-add-named">
<description>
Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddNamed">AddNamed()</link> D-Bus method.
</return>
</signal>
+<property name="GXdpDocuments:version">
+<description>
+Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-Documents.version">"version"</link>.
+
+Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
+
+</description>
+</property>
+
<signal name="GXdpNetworkMonitor::changed">
<description>
On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-org-freedesktop-portal-NetworkMonitor.changed">"changed"</link> is received.
</description>
</property>
+<signal name="GXdpOpenURI::handle-open-file">
+<description>
+Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenFile">OpenFile()</link> D-Bus method.
+
+If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_open_uri_complete_open_file() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
+
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpOpenURI.
+</parameter_description>
+</parameter>
+<parameter name="invocation">
+<parameter_description> A #GDBusMethodInvocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="arg_parent_window">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+<parameter name="arg_fd">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+<parameter name="arg_options">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+</return>
+</signal>
+
+<signal name="GXdpOpenURI::handle-open-uri">
+<description>
+Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenURI">OpenURI()</link> D-Bus method.
+
+If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call gxdp_open_uri_complete_open_uri() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
+
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpOpenURI.
+</parameter_description>
+</parameter>
+<parameter name="invocation">
+<parameter_description> A #GDBusMethodInvocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_parent_window">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+<parameter name="arg_uri">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+<parameter name="arg_options">
+<parameter_description> Argument passed by remote caller.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
+</return>
+</signal>
+
+<property name="GXdpOpenURI:version">
+<description>
+Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-portal-OpenURI.version">"version"</link>.
+
+Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
+
+</description>
+</property>
+
<signal name="GXdpProxyResolver::handle-lookup">
<description>
Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-portal-ProxyResolver.Lookup">Lookup()</link> D-Bus method.
<description>
Checks if two #GAppInfos are equal.
+Note that the check <emphasis>may not</emphasis> compare each individual
+field, and only does an identity check. In case detecting changes in the
+contents is needed, program code must additionally compare relevant fields.
+
</description>
<parameters>
<function name="g_app_info_launch">
<description>
Launches the application. Passes @files to the launched application
-as arguments, using the optional @launch_context to get information
+as arguments, using the optional @context to get information
about the details of the launcher (like what screen it is on).
On error, @error will be set accordingly.
process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`,
should it be inherited by further processes. The `DISPLAY` and
`DESKTOP_STARTUP_ID` environment variables are also set, based
-on information provided in @launch_context.
+on information provided in @context.
</description>
<parameter_description> a #GList of #GFile objects
</parameter_description>
</parameter>
-<parameter name="launch_context">
+<parameter name="context">
<parameter_description> a #GAppLaunchContext or %NULL
</parameter_description>
</parameter>
<parameter_description> the uri to show
</parameter_description>
</parameter>
-<parameter name="launch_context">
+<parameter name="context">
<parameter_description> an optional #GAppLaunchContext
</parameter_description>
</parameter>
</parameter>
<parameter name="context">
<parameter_description> an optional #GAppLaunchContext
-cancellable: (allow-none): a #GCancellable
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> a #GCancellable
</parameter_description>
</parameter>
<parameter name="callback">
<function name="g_app_info_launch_uris">
<description>
Launches the application. This passes the @uris to the launched application
-as arguments, using the optional @launch_context to get information
+as arguments, using the optional @context to get information
about the details of the launcher (like what screen it is on).
On error, @error will be set accordingly.
<parameter_description> a #GList containing URIs to launch.
</parameter_description>
</parameter>
-<parameter name="launch_context">
+<parameter name="context">
<parameter_description> a #GAppLaunchContext or %NULL
</parameter_description>
</parameter>
</parameter_description>
</parameter>
</parameters>
-<return> the
-child's environment
+<return>
+the child's environment
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the string array
-containing the arguments (the argv)
+<return> (array length=argc) (element-type filename) (transfer full)
+the string array containing the arguments (the argv)
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the environment
-strings, or %NULL if they were not sent
+<return>
+the environment strings, or %NULL if they were not sent
</return>
</function>
"[A-Z][a-z][0-9]_-." and must not begin with a digit.
- Application identifiers must contain at least one '.' (period)
-character (and thus at least three elements).
+character (and thus at least two elements).
- Application identifiers must not begin or end with a '.' (period)
character.
calling only the 'shutdown' function before doing so.
The hold count is ignored.
+Take care if your code has called g_application_hold() on the application and
+is therefore still expecting it to exist.
+(Note that you may have called g_application_hold() indirectly, for example
+through gtk_application_add_window().)
The result of calling g_application_run() again after it returns is
unspecified.
</parameter_description>
</parameter>
<parameter name="argv">
-<parameter_description> the argv from main(), or %NULL
+<parameter_description>
+the argv from main(), or %NULL
</parameter_description>
</parameter>
</parameters>
initial construction. If the object also implements #GInitable you can
optionally call g_initable_init() instead.
+This method is intended for language bindings. If writing in C,
+g_async_initable_new_async() should typically be used instead.
+
When the initialization is finished, @callback will be called. You can
then call g_async_initable_init_finish() to get the result of the
initialization.
have undefined behaviour. They will often fail with g_critical() or
g_warning(), but this must not be relied on.
-Implementations of this method must be idempotent: i.e. multiple calls
-to this function with the same argument should return the same results.
-Only the first call initializes the object; further calls return the result
-of the first call. This is so that it's safe to implement the singleton
-pattern in the GObject constructor function.
+Callers should not assume that a class which implements #GAsyncInitable can
+be initialized multiple times; for more information, see g_initable_init().
+If a class explicitly supports being initialized multiple times,
+implementation requires yielding all subsequent calls to init_async() on the
+results of the first call.
For classes that also support the #GInitable interface, the default
implementation of this method will run the g_initable_init() function
for any errors.
Since: 2.22
+Deprecated: 2.54: Use g_object_new_with_properties() and
+g_async_initable_init_async() instead. See #GParameter for more information.
</description>
<parameters>
</parameter_description>
</parameter>
</parameters>
-<return> a new reference to the source object for the @res,
-or %NULL if there is none.
+<return> a new reference to the source
+object for the @res, or %NULL if there is none.
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> a #gssize of the read stream, or %-1 on an error.
+<return> a #gssize of the read stream, or `-1` on an error.
</return>
</function>
signal handler is removed. See #GCancellable::cancelled for
details on how to use this.
-If @cancellable is %NULL or @handler_id is %0 this function does
+If @cancellable is %NULL or @handler_id is `0` this function does
nothing.
Since: 2.22
</parameter_description>
</parameter>
<parameter name="handler_id">
-<parameter_description> Handler id of the handler to be disconnected, or %0.
+<parameter_description> Handler id of the handler to be disconnected, or `0`.
</parameter_description>
</parameter>
</parameters>
</return>
</function>
+<function name="g_content_type_is_mime_type">
+<description>
+Determines if @type is a subset of @mime_type.
+Convenience wrapper around g_content_type_is_a().
+
+Since: 2.52
+
+</description>
+<parameters>
+<parameter name="type">
+<parameter_description> a content type string
+</parameter_description>
+</parameter>
+<parameter name="mime_type">
+<parameter_description> a mime type string
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @type is a kind of @mime_type,
+%FALSE otherwise.
+
+</return>
+</function>
+
<function name="g_content_type_is_unknown">
<description>
Checks if the content type is the generic "unknown" type.
On UNIX this is the "application/octet-stream" mimetype,
-while on win32 it is "*".
+while on win32 it is "*" and on OSX it is a dynamic type
+or octet-stream.
</description>
</parameter_description>
</parameter>
<parameter name="bus_name">
-<parameter_description> the bus name which exports the action group
+<parameter_description> the bus name which exports the action
+group or %NULL if @connection is not a message bus connection
</parameter_description>
</parameter>
<parameter name="object_path">
Escape @string so it can appear in a D-Bus address as the value
part of a key-value pair.
-For instance, if @string is "/run/bus-for-:0",
-this function would return "/run/bus-for-%3A0",
+For instance, if @string is `/run/bus-for-:0`,
+this function would return `/run/bus-for-%3A0`,
which could be used in a D-Bus address like
-"unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0".
+`unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0`.
Since: 2.36
bus instance specified by @bus_type. This may involve using various
platform specific mechanisms.
+The returned address will be in the
+[D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
+
Since: 2.26
</description>
<description>
Asynchronously connects to an endpoint specified by @address and
sets up the connection so it is in a state to run the client-side
-of the D-Bus authentication conversation.
+of the D-Bus authentication conversation. @address must be in the
+[D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
When the operation is finished, @callback will be invoked. You can
then call g_dbus_address_get_stream_finish() to get the result of
<description>
Synchronously connects to an endpoint specified by @address and
sets up the connection so it is in a state to run the client-side
-of the D-Bus authentication conversation.
+of the D-Bus authentication conversation. @address must be in the
+[D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
This is a synchronous failable function. See
g_dbus_address_get_stream() for the asynchronous version.
<description>
Asynchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by @address
-which must be in the D-Bus address format.
+which must be in the
+[D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
This constructor can only be used to initiate client-side
connections - use g_dbus_connection_new() if you need to act as the
<description>
Synchronously connects and sets up a D-Bus client connection for
exchanging D-Bus messages with an endpoint specified by @address
-which must be in the D-Bus address format.
+which must be in the
+[D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
This constructor can only be used to initiate client-side
connections - use g_dbus_connection_new_sync() if you need to act
Converts a #GVariant to a #GValue. If @value is floating, it is consumed.
The rules specified in the g_dbus_gvalue_to_gvariant() function are
-used - this function is essentially its reverse form.
+used - this function is essentially its reverse form. So, a #GVariant
+containing any basic or string array type will be converted to a #GValue
+containing a basic value or string array. Any other #GVariant (handle,
+variant, tuple, dict entry) will be converted to a #GValue containing that
+#GVariant.
The conversion never fails - a valid #GValue is always returned in
@out_gvalue.
For example, an exported D-Bus interface may queue up property
changes and emit the
-`org.freedesktop.DBus.Properties::Propert``
+`org.freedesktop.DBus.Properties::PropertiesChanged`
signal later (e.g. in an idle handler). This technique is useful
for collapsing multiple property changes into one.
<function name="g_dbus_is_address">
<description>
-Checks if @string is a D-Bus address.
+Checks if @string is a
+[D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
This doesn't check if @string is actually supported by #GDBusServer
or #GDBusConnection - use g_dbus_is_supported_address() to do more
<function name="g_dbus_is_supported_address">
<description>
-Like g_dbus_is_address() but also checks if the library suppors the
+Like g_dbus_is_address() but also checks if the library supports the
transports in @string and that key/value pairs for each transport
-are valid.
+are valid. See the specification of the
+[D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
Since: 2.26
</parameter>
<parameter name="bus_name">
<parameter_description> the bus name which exports the menu model
+or %NULL if @connection is not a message bus connection
</parameter_description>
</parameter>
<parameter name="object_path">
<description>
Finishes handling a D-Bus method call by returning an error.
-This method will free @invocation, you cannot use it afterwards.
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since: 2.26
always register errors with g_dbus_error_register_error()
or use g_dbus_method_invocation_return_dbus_error().
-This method will free @invocation, you cannot use it afterwards.
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since 2.48, if the method call requested for a reply not to be sent
then this call will free @invocation but otherwise do nothing (as per
<description>
Like g_dbus_method_invocation_return_error() but without printf()-style formatting.
-This method will free @invocation, you cannot use it afterwards.
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since: 2.26
Like g_dbus_method_invocation_return_error() but intended for
language bindings.
-This method will free @invocation, you cannot use it afterwards.
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since: 2.26
Like g_dbus_method_invocation_return_error() but takes a #GError
instead of the error domain, error code and message.
-This method will free @invocation, you cannot use it afterwards.
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since: 2.26
Finishes handling a D-Bus method call by returning @parameters.
If the @parameters GVariant is floating, it is consumed.
-It is an error if @parameters is not of the right format.
+It is an error if @parameters is not of the right format: it must be a tuple
+containing the out-parameters of the D-Bus method. Even if the method has a
+single out-parameter, it must be contained in a tuple. If the method has no
+out-parameters, @parameters may be %NULL or an empty tuple.
-This method will free @invocation, you cannot use it afterwards.
+|[<!-- language="C" -->
+GDBusMethodInvocation *invocation = some_invocation;
+g_autofree gchar *result_string = NULL;
+g_autoptr (GError) error = NULL;
+
+result_string = calculate_result (&error);
+
+if (error != NULL)
+g_dbus_method_invocation_return_gerror (invocation, error);
+else
+g_dbus_method_invocation_return_value (invocation,
+g_variant_new ("(s)", result_string));
+
+/<!-- -->* Do not free @invocation here; returning a value does that *<!-- -->/
+]|
+
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since 2.48, if the method call requested for a reply not to be sent
then this call will sink @parameters and free @invocation, but
This method is only available on UNIX.
-This method will free @invocation, you cannot use it afterwards.
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since: 2.30
Like g_dbus_method_invocation_return_gerror() but takes ownership
of @error so the caller does not need to free it.
-This method will free @invocation, you cannot use it afterwards.
+This method will take ownership of @invocation. See
+#GDBusInterfaceVTable for more information about the ownership of
+@invocation.
Since: 2.30
<function name="g_dbus_server_get_client_address">
<description>
-Gets a D-Bus address string that can be used by clients to connect
-to @server.
+Gets a
+[D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses)
+string that can be used by clients to connect to @server.
Since: 2.26
<description>
Sets the certificate database that is used to verify peer certificates.
This is set to the default database by default. See
-g_dtls_backend_get_default_database(). If set to %NULL, then
+g_tls_backend_get_default_database(). If set to %NULL, then
peer certificate validation will always set the
%G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
#GDtlsConnection::accept-certificate will always be emitted on
will be copied as symlinks, otherwise the target of the
@source symlink will be copied.
+If the flag #G_FILE_COPY_ALL_METADATA is specified then all the metadata
+that is possible to copy is copied, not just the default subset (which,
+for instance, does not include the owner, see #GFileInfo).
+
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.
</parameter_description>
</parameter>
<parameter name="cancellable">
-<parameter_description> optional #GCancellable object, %NULL to ignore.
+<parameter_description> optional #GCancellable object, %NULL to ignore.
</parameter_description>
</parameter>
<parameter name="error">
</parameter_description>
</parameter>
<parameter name="cancellable">
-<parameter_description> optional #GCancellable object, %NULL to ignore.
+<parameter_description> optional #GCancellable object, %NULL to ignore.
</parameter_description>
</parameter>
<parameter name="callback">
</parameter_description>
</parameter>
<parameter name="io_priority">
-<parameter_description> the [I/O priority][io-priority] of the request
+<parameter_description> the [I/O priority][io-priority] of the request
</parameter_description>
</parameter>
<parameter name="cancellable">
</return>
</function>
-<function name="g_file_load_contents">
+<function name="g_file_load_bytes">
<description>
-Loads the content of the file into memory. The data is always
-zero-terminated, but this is not included in the resultant @length.
-The returned @content should be freed with g_free() when no longer
-needed.
+Loads the contents of @file and returns it as #GBytes.
-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 @file is a resource:// based URI, the resulting bytes will reference the
+embedded resource instead of a copy. Otherwise, this is equivalent to calling
+g_file_load_contents() and g_bytes_new_take().
+
+For resources, @etag_out will be set to %NULL.
+The data contained in the resulting #GBytes is always zero-terminated, but
+this is not included in the #GBytes length. The resulting #GBytes should be
+freed with g_bytes_unref() when no longer in use.
+
+Since: 2.56
</description>
<parameters>
<parameter name="file">
-<parameter_description> input #GFile
+<parameter_description> a #GFile
</parameter_description>
</parameter>
<parameter name="cancellable">
-<parameter_description> optional #GCancellable object, %NULL to ignore
-</parameter_description>
-</parameter>
-<parameter name="contents">
-<parameter_description> a location to place the contents of the file
-</parameter_description>
-</parameter>
-<parameter name="length">
-<parameter_description> a location to place the length of the contents of the file,
-or %NULL if the length is not needed
+<parameter_description> a #GCancellable or %NULL
</parameter_description>
</parameter>
<parameter name="etag_out">
-<parameter_description> a location to place the current entity tag for the file,
-or %NULL if the entity tag is not needed
+<parameter_description> a location to place the current
+entity tag for the file, or %NULL if the entity tag is not needed
</parameter_description>
</parameter>
<parameter name="error">
-<parameter_description> a #GError, or %NULL
+<parameter_description> a location for a #GError or %NULL
</parameter_description>
</parameter>
</parameters>
-<return> %TRUE if the @file's contents were successfully loaded.
-%FALSE if there were errors.
+<return> a #GBytes or %NULL and @error is set
+
</return>
</function>
-<function name="g_file_load_contents_async">
+<function name="g_file_load_bytes_async">
<description>
-Starts an asynchronous load of the @file's contents.
+Asynchronously loads the contents of @file as #GBytes.
-For more details, see g_file_load_contents() which is
-the synchronous version of this call.
+If @file is a resource:// based URI, the resulting bytes will reference the
+embedded resource instead of a copy. Otherwise, this is equivalent to calling
+g_file_load_contents_async() and g_bytes_new_take().
-When the load operation has completed, @callback will be called
-with @user data. To finish the operation, call
-g_file_load_contents_finish() with the #GAsyncResult returned by
-the @callback.
+@callback should call g_file_load_bytes_finish() to get the result of this
+asynchronous operation.
-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.
+See g_file_load_bytes() for more information.
+
+Since: 2.56
</description>
<parameters>
<parameter name="file">
-<parameter_description> input #GFile
+<parameter_description> a #GFile
</parameter_description>
</parameter>
<parameter name="cancellable">
-<parameter_description> optional #GCancellable object, %NULL to ignore
+<parameter_description> a #GCancellable or %NULL
</parameter_description>
</parameter>
<parameter name="callback">
-<parameter_description> a #GAsyncReadyCallback to call when the request is satisfied
+<parameter_description> a #GAsyncReadyCallback to call when the
+request is satisfied
</parameter_description>
</parameter>
<parameter name="user_data">
<return></return>
</function>
-<function name="g_file_load_contents_finish">
+<function name="g_file_load_bytes_finish">
<description>
-Finishes an asynchronous load of the @file's contents.
-The contents are placed in @contents, and @length is set to the
-size of the @contents string. The @content should be freed with
-g_free() when no longer needed. If @etag_out is present, it will be
-set to the new entity tag for the @file.
+Completes an asynchronous request to g_file_load_bytes_async().
+
+For resources, @etag_out will be set to %NULL.
+
+The data contained in the resulting #GBytes is always zero-terminated, but
+this is not included in the #GBytes length. The resulting #GBytes should be
+freed with g_bytes_unref() when no longer in use.
+
+See g_file_load_bytes() for more information.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="file">
+<parameter_description> a #GFile
+</parameter_description>
+</parameter>
+<parameter name="result">
+<parameter_description> a #GAsyncResult provided to the callback
+</parameter_description>
+</parameter>
+<parameter name="etag_out">
+<parameter_description> a location to place the current
+entity tag for the file, or %NULL if the entity tag is not needed
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> a location for a #GError, or %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> a #GBytes or %NULL and @error is set
+
+</return>
+</function>
+
+<function name="g_file_load_contents">
+<description>
+Loads the content of the file into memory. The data is always
+zero-terminated, but this is not included in the resultant @length.
+The returned @content should be freed with g_free() when no longer
+needed.
+
+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.
</description>
<parameter_description> input #GFile
</parameter_description>
</parameter>
-<parameter name="res">
-<parameter_description> a #GAsyncResult
+<parameter name="cancellable">
+<parameter_description> optional #GCancellable object, %NULL to ignore
+</parameter_description>
+</parameter>
+<parameter name="contents">
+<parameter_description> a location to place the contents of the file
+</parameter_description>
+</parameter>
+<parameter name="length">
+<parameter_description> a location to place the length of the contents of the file,
+or %NULL if the length is not needed
+</parameter_description>
+</parameter>
+<parameter name="etag_out">
+<parameter_description> a location to place the current entity tag for the file,
+or %NULL if the entity tag is not needed
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> a #GError, or %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the @file's contents were successfully loaded.
+%FALSE if there were errors.
+</return>
+</function>
+
+<function name="g_file_load_contents_async">
+<description>
+Starts an asynchronous load of the @file's contents.
+
+For more details, see g_file_load_contents() which is
+the synchronous version of this call.
+
+When the load operation has completed, @callback will be called
+with @user data. To finish the operation, call
+g_file_load_contents_finish() with the #GAsyncResult returned by
+the @callback.
+
+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.
+
+</description>
+<parameters>
+<parameter name="file">
+<parameter_description> input #GFile
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> optional #GCancellable object, %NULL to ignore
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> a #GAsyncReadyCallback to call when the request is satisfied
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> the data to pass to callback function
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="g_file_load_contents_finish">
+<description>
+Finishes an asynchronous load of the @file's contents.
+The contents are placed in @contents, and @length is set to the
+size of the @contents string. The @content should be freed with
+g_free() when no longer needed. If @etag_out is present, it will be
+set to the new entity tag for the @file.
+
+
+</description>
+<parameters>
+<parameter name="file">
+<parameter_description> input #GFile
+</parameter_description>
+</parameter>
+<parameter name="res">
+<parameter_description> a #GAsyncResult
</parameter_description>
</parameter>
<parameter name="contents">
</parameter_description>
</parameter>
<parameter name="read_more_callback">
-<parameter_description> a #GFileReadMoreCallback to receive partial data
+<parameter_description> a
+#GFileReadMoreCallback to receive partial data
and to specify whether further data should be read
</parameter_description>
</parameter>
<parameter name="callback">
-<parameter_description> a #GAsyncReadyCallback to call when the request is satisfied
+<parameter_description> a #GAsyncReadyCallback to call
+when the request is satisfied
</parameter_description>
</parameter>
<parameter name="user_data">
</return>
</function>
+<function name="g_file_new_build_filename">
+<description>
+Constructs a #GFile from a series of elements using the correct
+separator for filenames.
+
+Using this function is equivalent to calling g_build_filename(),
+followed by g_file_new_for_path() on the result.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="first_element">
+<parameter_description> the first element in the path
+</parameter_description>
+</parameter>
+<parameter name="Varargs">
+<parameter_description> remaining elements in path, terminated by %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> a new #GFile
+
+</return>
+</function>
+
<function name="g_file_new_for_commandline_arg">
<description>
Creates a #GFile with the given argument from the command line.
<description>
Sets an attribute in the file with attribute name @attribute to @value.
-Some attributes can be unset by setting @attribute to
+Some attributes can be unset by setting @type to
%G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
If @cancellable is not %NULL, then the operation can be cancelled by
<description>
Initializes the object implementing the interface.
+This method is intended for language bindings. If writing in C,
+g_initable_new() should typically be used instead.
+
The object must be initialized before any real use after initial
construction, either with this function or g_async_initable_init_async().
g_object_unref() are considered to be invalid, and have undefined
behaviour. See the [introduction][ginitable] for more details.
-Implementations of this method must be idempotent, i.e. multiple calls
-to this function with the same argument should return the same results.
-Only the first call initializes the object, further calls return the result
-of the first call. This is so that it's safe to implement the singleton
-pattern in the GObject constructor function.
+Callers should not assume that a class which implements #GInitable can be
+initialized multiple times, unless the class explicitly documents itself as
+supporting this. Generally, a class’ implementation of init() can assume
+(and assert) that it will only be called once. Previously, this documentation
+recommended all #GInitable implementations should be idempotent; that
+recommendation was relaxed in GLib 2.54.
+
+If a class explicitly supports being initialized multiple times, it is
+recommended that the method is idempotent: multiple calls with the same
+arguments should return the same results. Only the first call initializes
+the object; further calls return the result of the first call.
+
+One reason why a class might need to support idempotent initialization is if
+it is designed to be used via the singleton pattern, with a
+#GObjectClass.constructor that sometimes returns an existing instance.
+In this pattern, a caller would expect to be able to call g_initable_init()
+on the result of g_object_new(), regardless of whether it is in fact a new
+instance.
Since: 2.22
and returns %NULL, setting an error on failure.
Since: 2.22
+Deprecated: 2.54: Use g_object_new_with_properties() and
+g_initable_init() instead. See #GParameter for more information.
</description>
<parameters>
For behaviour details see g_input_stream_close().
-The asyncronous methods have a default fallback that uses threads to implement
+The asynchronous methods have a default fallback that uses threads to implement
asynchronicity, so they are optional for inheriting classes. However, if you
override one you must override all.
be executed before an outstanding request with lower priority. Default
priority is %G_PRIORITY_DEFAULT.
-The asyncronous methods have a default fallback that uses threads to implement
+The asynchronous methods have a default fallback that uses threads to implement
asynchronicity, so they are optional for inheriting classes. However, if you
override one you must override all.
handled (but note that future GLib releases may return a more
specific value instead).
+As %errno is global and may be modified by intermediate function
+calls, you should save its value as soon as the call which sets it
</description>
<parameters>
<function name="g_mount_can_eject">
<description>
-Checks if @mount can be eject.
+Checks if @mount can be ejected.
</description>
<function name="g_mount_can_unmount">
<description>
-Checks if @mount can be mounted.
+Checks if @mount can be unmounted.
</description>
For behaviour details see g_output_stream_close().
-The asyncronous methods have a default fallback that uses threads
+The asynchronous methods have a default fallback that uses threads
to implement asynchronicity, so they are optional for inheriting
classes. However, if you override one you must override all.
<function name="g_output_stream_has_pending">
<description>
-Checks if an ouput stream has pending actions.
+Checks if an output stream has pending actions.
</description>
</parameter_description>
</parameter>
<parameter name="bytes_written">
-<parameter_description> location to store the number of bytes that was
+<parameter_description> location to store the number of bytes that was
written to the stream
</parameter_description>
</parameter>
value) will be executed before an outstanding request with lower
priority. Default priority is %G_PRIORITY_DEFAULT.
-The asyncronous methods have a default fallback that uses threads
+The asynchronous methods have a default fallback that uses threads
to implement asynchronicity, so they are optional for inheriting
classes. However, if you override one you must override all.
If you want to use this resource in the global resource namespace you need
to register it with g_resources_register().
+Note: @data must be backed by memory that is at least pointer aligned.
+Otherwise this function will internally create a copy of the memory since
+GLib 2.56, or in older versions fail and exit the process.
+
Since: 2.32
</description>
</parameter_description>
</parameter>
<parameter name="flags">
-<parameter_description> a location to place the flags about the file,
-or %NULL if the length is not needed
+<parameter_description> a location to place the #GResourceFlags about the file,
+or %NULL if the flags are not needed
</parameter_description>
</parameter>
<parameter name="error">
<function name="g_seekable_can_truncate">
<description>
-Tests if the stream can be truncated.
+Tests if the length of the stream can be adjusted with
+g_seekable_truncate().
</description>
<function name="g_seekable_truncate">
<description>
-Truncates a stream with a given #offset.
+Sets the length of the stream to @offset. If the stream was previously
+larger than @offset, the extra data is discarded. If the stream was
+previouly shorter than @offset, it is extended with NUL ('\0') bytes.
If @cancellable is not %NULL, then the operation can be cancelled by
triggering the cancellable object from another thread. If the operation
operation was partially finished when the operation was cancelled the
partial result will be returned, without an error.
-Virtual: truncate_fn
</description>
<parameters>
</parameter_description>
</parameter>
<parameter name="offset">
-<parameter_description> a #goffset.
+<parameter_description> new length for @seekable, in bytes.
</parameter_description>
</parameter>
<parameter name="cancellable">
a boolean property by that name). See g_settings_bind_writable()
for more details about writable bindings.
-Note that the lifecycle of the binding is tied to the object,
+Note that the lifecycle of the binding is tied to @object,
and that you can have only one binding per object property.
If you bind the same property twice on the same object, the second
binding overrides the first one.
The binding uses the provided mapping functions to map between
settings and property values.
-Note that the lifecycle of the binding is tied to the object,
+Note that the lifecycle of the binding is tied to @object,
and that you can have only one binding per object property.
If you bind the same property twice on the same object, the second
binding overrides the first one.
value as it passes from the setting to the object, i.e. @property
will be set to %TRUE if the key is not writable.
-Note that the lifecycle of the binding is tied to the object,
+Note that the lifecycle of the binding is tied to @object,
and that you can have only one binding per object property.
If you bind the same property twice on the same object, the second
binding overrides the first one.
<function name="g_settings_sync">
<description>
-Ensures that all pending operations for the given are complete for
-the default backend.
+Ensures that all pending operations are complete for the default backend.
Writes made to a #GSettings are handled asynchronously. For this
reason, it is very unlikely that the changes have it to disk by the
<function name="g_socket_get_remote_address">
<description>
-Try to get the remove address of a connected socket. This is only
+Try to get the remote address of a connected socket. This is only
useful for connection oriented sockets that have been connected.
Since: 2.22
in RFC 4604 is used. Note that on older platforms this may fail
with a %G_IO_ERROR_NOT_SUPPORTED error.
+To bind to a given source-specific multicast address, use
+g_socket_join_multicast_group_ssm() instead.
+
Since: 2.32
</description>
</return>
</function>
+<function name="g_socket_join_multicast_group_ssm">
+<description>
+Registers @socket to receive multicast messages sent to @group.
+@socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have
+been bound to an appropriate interface and port with
+g_socket_bind().
+
+If @iface is %NULL, the system will automatically pick an interface
+to bind to based on @group.
+
+If @source_specific is not %NULL, use source-specific multicast as
+defined in RFC 4604. Note that on older platforms this may fail
+with a %G_IO_ERROR_NOT_SUPPORTED error.
+
+Note that this function can be called multiple times for the same
+@group with different @source_specific in order to receive multicast
+packets from more than one source.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="socket">
+<parameter_description> a #GSocket.
+</parameter_description>
+</parameter>
+<parameter name="group">
+<parameter_description> a #GInetAddress specifying the group address to join.
+</parameter_description>
+</parameter>
+<parameter name="source_specific">
+<parameter_description> a #GInetAddress specifying the
+source-specific multicast address or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="iface">
+<parameter_description> Name of the interface to use, or %NULL
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> #GError for error reporting, or %NULL to ignore.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE on success, %FALSE on error.
+
+</return>
+</function>
+
<function name="g_socket_leave_multicast_group">
<description>
Removes @socket from the multicast group defined by @group, @iface,
@socket remains bound to its address and port, and can still receive
unicast messages after calling this.
+To unbind to a given source-specific multicast address, use
+g_socket_leave_multicast_group_ssm() instead.
+
Since: 2.32
</description>
</return>
</function>
+<function name="g_socket_leave_multicast_group_ssm">
+<description>
+Removes @socket from the multicast group defined by @group, @iface,
+and @source_specific (which must all have the same values they had
+when you joined the group).
+
+@socket remains bound to its address and port, and can still receive
+unicast messages after calling this.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="socket">
+<parameter_description> a #GSocket.
+</parameter_description>
+</parameter>
+<parameter name="group">
+<parameter_description> a #GInetAddress specifying the group address to leave.
+</parameter_description>
+</parameter>
+<parameter name="source_specific">
+<parameter_description> a #GInetAddress specifying the
+source-specific multicast address or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="iface">
+<parameter_description> Name of the interface to use, or %NULL
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> #GError for error reporting, or %NULL to ignore.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE on success, %FALSE on error.
+
+</return>
+</function>
+
<function name="g_socket_listen">
<description>
Marks the socket as a server socket, i.e. a socket that is used
</parameter_description>
</parameter>
<parameter name="messages">
-<parameter_description> a pointer which
-may be filled with an array of #GSocketControlMessages, or %NULL
+<parameter_description> a pointer
+which may be filled with an array of #GSocketControlMessages, or %NULL
</parameter_description>
</parameter>
<parameter name="num_messages">
</parameter_description>
</parameter>
</parameters>
-<return> the value of the environment variable, %NULL if unset
+<return> the value of the environment variable,
+%NULL if unset
</return>
</function>
As an alternative, you can use g_subprocess_launcher_setenv(),
g_subprocess_launcher_unsetenv(), etc.
+Pass an empty array to set an empty environment. Pass %NULL to inherit the
+parent process’ environment. As of GLib 2.54, the parent process’ environment
+will be copied when g_subprocess_launcher_set_environ() is called.
+Previously, it was copied when the subprocess was executed. This means the
+copied environment may now be modified (using g_subprocess_launcher_setenv(),
+etc.) before launching the subprocess.
+
On UNIX, all strings in this array can be arbitrary byte strings.
On Windows, they should be in UTF-8.
</parameter_description>
</parameter>
<parameter name="env">
-<parameter_description> the replacement environment
+<parameter_description>
+the replacement environment
</parameter_description>
</parameter>
</parameters>
</parameter_description>
</parameter>
<parameter name="variable">
-<parameter_description> the environment variable to set, must not contain '='
+<parameter_description> the environment variable to set,
+must not contain '='
</parameter_description>
</parameter>
<parameter name="value">
</parameter_description>
</parameter>
<parameter name="variable">
-<parameter_description> the environment variable to unset, must not contain '='
+<parameter_description> the environment variable to unset,
+must not contain '='
</parameter_description>
</parameter>
</parameters>
</parameter>
</parameters>
<return> the #GType of @backend’s #GDtlsClientConnection
-implementation.
+implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS.
</return>
</function>
</parameter>
</parameters>
<return> the #GType of @backend’s #GDtlsServerConnection
-implementation.
+implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS.
</return>
</function>
<function name="g_tls_database_lookup_certificate_for_handle_finish">
<description>
Finish an asynchronous lookup of a certificate by its handle. See
-g_tls_database_lookup_certificate_handle() for more information.
+g_tls_database_lookup_certificate_by_handle() for more information.
If the handle is no longer valid, or does not point to a certificate in
this database, then %NULL will be returned.
<function name="g_tls_database_verify_chain">
<description>
-Verify's a certificate chain after looking up and adding any missing
-certificates to the chain.
+Determines the validity of a certificate chain after looking up and
+adding any missing certificates to the chain.
@chain is a chain of #GTlsCertificate objects each pointing to the next
-certificate in the chain by its %issuer property. The chain may initially
+certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially
consist of one or more certificates. After the verification process is
complete, @chain may be modified by adding missing certificates, or removing
extra certificates. If a certificate anchor was found, then it is added to
Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be
used.
+If @chain is found to be valid, then the return value will be 0. If
+@chain is found to be invalid, then the return value will indicate
+the problems found. If the function is unable to determine whether
+@chain is valid or not (eg, because @cancellable is triggered
+before it completes) then the return value will be
+%G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set
+accordingly. @error is not set when @chain is successfully analyzed
+but found to be invalid.
+
This function can block, use g_tls_database_verify_chain_async() to perform
the verification operation asynchronously.
<function name="g_tls_database_verify_chain_async">
<description>
-Asynchronously verify's a certificate chain after looking up and adding
-any missing certificates to the chain. See g_tls_database_verify_chain()
-for more information.
+Asynchronously determines the validity of a certificate chain after
+looking up and adding any missing certificates to the chain. See
+g_tls_database_verify_chain() for more information.
Since: 2.30
<function name="g_tls_database_verify_chain_finish">
<description>
Finish an asynchronous verify chain operation. See
-g_tls_database_verify_chain() for more information. *
+g_tls_database_verify_chain() for more information.
+
+If @chain is found to be valid, then the return value will be 0. If
+@chain is found to be invalid, then the return value will indicate
+the problems found. If the function is unable to determine whether
+@chain is valid or not (eg, because @cancellable is triggered
+before it completes) then the return value will be
+%G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set
+accordingly. @error is not set when @chain is successfully analyzed
+but found to be invalid.
+
Since: 2.30
</description>
</return>
</function>
+<function name="g_unix_is_system_device_path">
+<description>
+Determines if @device_path is considered a block device path which is only
+used in implementation of the OS. This is primarily used for hiding
+mounted volumes that are intended as APIs for programs to read, and system
+administrators at a shell; rather than something that should, for example,
+appear in a GUI. For example, the Linux `/proc` filesystem.
+
+The list of device paths considered ‘system’ ones may change over time.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="device_path">
+<parameter_description> a device path, e.g. `/dev/loop0` or `nfsd`
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @device_path is considered an implementation detail of
+the OS.
+</return>
+</function>
+
+<function name="g_unix_is_system_fs_type">
+<description>
+Determines if @fs_type is considered a type of file system which is only
+used in implementation of the OS. This is primarily used for hiding
+mounted volumes that are intended as APIs for programs to read, and system
+administrators at a shell; rather than something that should, for example,
+appear in a GUI. For example, the Linux `/proc` filesystem.
+
+The list of file system types considered ‘system’ ones may change over time.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="fs_type">
+<parameter_description> a file system type, e.g. `procfs` or `tmpfs`
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @fs_type is considered an implementation detail of the OS.
+</return>
+</function>
+
<function name="g_unix_mount_at">
<description>
Gets a #GUnixMountEntry for a given mount path. If @time_read
</return>
</function>
+<function name="g_unix_mount_copy">
+<description>
+Makes a copy of @mount_entry.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="mount_entry">
+<parameter_description> a #GUnixMountEntry.
+</parameter_description>
+</parameter>
+</parameters>
+<return> a new #GUnixMountEntry
+
+</return>
+</function>
+
+<function name="g_unix_mount_for">
+<description>
+Gets a #GUnixMountEntry for a given file path. If @time_read
+is set, it will be filled with a unix timestamp for checking
+if the mounts have changed since with g_unix_mounts_changed_since().
+
+Since: 2.52
+
+</description>
+<parameters>
+<parameter name="file_path">
+<parameter_description> file path on some unix mount.
+</parameter_description>
+</parameter>
+<parameter name="time_read">
+<parameter_description> guint64 to contain a timestamp.
+</parameter_description>
+</parameter>
+</parameters>
+<return> a #GUnixMountEntry.
+
+</return>
+</function>
+
<function name="g_unix_mount_free">
<description>
Frees a unix mount.
<function name="g_unix_mount_is_system_internal">
<description>
-Checks if a unix mount is a system path.
+Checks if a Unix mount is a system mount. This is the Boolean OR of
+g_unix_is_system_fs_type(), g_unix_is_system_device_path() and
+g_unix_is_mount_path_system_internal() on @mount_entry’s properties.
+
+The definition of what a ‘system’ mount entry is may change over time as new
+file system types and device paths are ignored.
</description>
</return>
</function>
+<function name="g_unix_mount_point_copy">
+<description>
+Makes a copy of @mount_point.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="mount_point">
+<parameter_description> a #GUnixMountPoint.
+</parameter_description>
+</parameter>
+</parameters>
+<return> a new #GUnixMountPoint
+
+</return>
+</function>
+
<function name="g_unix_mount_point_free">
<description>
Frees a unix mount point.
then the expression
|[<!-- language="C" -->
(g_file_has_prefix (volume_activation_root, mount_root) ||
- g_file_equal (volume_activation_root, mount_root))
+g_file_equal (volume_activation_root, mount_root))
]|
will always be %TRUE.
</return>
</function>
+<function name="gxdp_documents_call_add_full">
+<description>
+Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddFull">AddFull()</link> D-Bus method on @proxy.
+When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+You can then call gxdp_documents_call_add_full_finish() to get the result of the operation.
+
+See gxdp_documents_call_add_full_sync() for the synchronous, blocking version of this method.
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpDocumentsProxy.
+</parameter_description>
+</parameter>
+<parameter name="arg_o_path_fds">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_flags">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_app_id">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_permissions">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> User data to pass to @callback.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_documents_call_add_full_finish">
+<description>
+Finishes an operation started with gxdp_documents_call_add_full().
+
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpDocumentsProxy.
+</parameter_description>
+</parameter>
+<parameter name="out_doc_ids">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="out_extra_out">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="out_fd_list">
+<parameter_description> Return location for a #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="res">
+<parameter_description> The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_documents_call_add_full().
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the call succeded, %FALSE if @error is set.
+</return>
+</function>
+
+<function name="gxdp_documents_call_add_full_sync">
+<description>
+Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddFull">AddFull()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+
+See gxdp_documents_call_add_full() for the asynchronous version of this method.
+
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpDocumentsProxy.
+</parameter_description>
+</parameter>
+<parameter name="arg_o_path_fds">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_flags">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_app_id">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_permissions">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="out_doc_ids">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="out_extra_out">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="out_fd_list">
+<parameter_description> Return location for a #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the call succeded, %FALSE if @error is set.
+</return>
+</function>
+
<function name="gxdp_documents_call_add_named">
<description>
Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddNamed">AddNamed()</link> D-Bus method on @proxy.
<return></return>
</function>
+<function name="gxdp_documents_complete_add_full">
+<description>
+Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddFull">AddFull()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
+
+This method will free @invocation, you cannot use it afterwards.
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpDocuments.
+</parameter_description>
+</parameter>
+<parameter name="invocation">
+<parameter_description> A #GDBusMethodInvocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="doc_ids">
+<parameter_description> Parameter to return.
+</parameter_description>
+</parameter>
+<parameter name="extra_out">
+<parameter_description> Parameter to return.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="gxdp_documents_complete_add_named">
<description>
Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-Documents.AddNamed">AddNamed()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
<return></return>
</function>
+<function name="gxdp_documents_get_version">
+<description>
+Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-Documents.version">"version"</link> D-Bus property.
+
+Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
+
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpDocuments.
+</parameter_description>
+</parameter>
+</parameters>
+<return> The property value.
+</return>
+</function>
+
<function name="gxdp_documents_interface_info">
<description>
Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-Documents.top_of_page">org.freedesktop.portal.Documents</link> D-Bus interface.
</return>
</function>
+<function name="gxdp_documents_set_version">
+<description>
+Sets the <link linkend="gdbus-property-org-freedesktop-portal-Documents.version">"version"</link> D-Bus property to @value.
+
+Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpDocuments.
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> The value to set.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="gxdp_documents_skeleton_new">
<description>
Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-Documents.top_of_page">org.freedesktop.portal.Documents</link>.
</return>
</function>
+<function name="gxdp_open_uri_call_open_file">
+<description>
+Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenFile">OpenFile()</link> D-Bus method on @proxy.
+When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+You can then call gxdp_open_uri_call_open_file_finish() to get the result of the operation.
+
+See gxdp_open_uri_call_open_file_sync() for the synchronous, blocking version of this method.
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpOpenURIProxy.
+</parameter_description>
+</parameter>
+<parameter name="arg_parent_window">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_fd">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_options">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> User data to pass to @callback.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_open_uri_call_open_file_finish">
+<description>
+Finishes an operation started with gxdp_open_uri_call_open_file().
+
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpOpenURIProxy.
+</parameter_description>
+</parameter>
+<parameter name="out_handle">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="out_fd_list">
+<parameter_description> Return location for a #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="res">
+<parameter_description> The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_call_open_file().
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the call succeded, %FALSE if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_call_open_file_sync">
+<description>
+Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenFile">OpenFile()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+
+See gxdp_open_uri_call_open_file() for the asynchronous version of this method.
+
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpOpenURIProxy.
+</parameter_description>
+</parameter>
+<parameter name="arg_parent_window">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_fd">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_options">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="out_handle">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="out_fd_list">
+<parameter_description> Return location for a #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the call succeded, %FALSE if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_call_open_uri">
+<description>
+Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenURI">OpenURI()</link> D-Bus method on @proxy.
+When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+You can then call gxdp_open_uri_call_open_uri_finish() to get the result of the operation.
+
+See gxdp_open_uri_call_open_uri_sync() for the synchronous, blocking version of this method.
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpOpenURIProxy.
+</parameter_description>
+</parameter>
+<parameter name="arg_parent_window">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_uri">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_options">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> User data to pass to @callback.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_open_uri_call_open_uri_finish">
+<description>
+Finishes an operation started with gxdp_open_uri_call_open_uri().
+
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpOpenURIProxy.
+</parameter_description>
+</parameter>
+<parameter name="out_handle">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="res">
+<parameter_description> The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_call_open_uri().
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the call succeded, %FALSE if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_call_open_uri_sync">
+<description>
+Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenURI">OpenURI()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
+
+See gxdp_open_uri_call_open_uri() for the asynchronous version of this method.
+
+
+</description>
+<parameters>
+<parameter name="proxy">
+<parameter_description> A #GXdpOpenURIProxy.
+</parameter_description>
+</parameter>
+<parameter name="arg_parent_window">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_uri">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="arg_options">
+<parameter_description> Argument to pass with the method invocation.
+</parameter_description>
+</parameter>
+<parameter name="out_handle">
+<parameter_description> Return location for return parameter or %NULL to ignore.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL.
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if the call succeded, %FALSE if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_complete_open_file">
+<description>
+Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenFile">OpenFile()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
+
+This method will free @invocation, you cannot use it afterwards.
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpOpenURI.
+</parameter_description>
+</parameter>
+<parameter name="invocation">
+<parameter_description> A #GDBusMethodInvocation.
+</parameter_description>
+</parameter>
+<parameter name="fd_list">
+<parameter_description> A #GUnixFDList or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="handle">
+<parameter_description> Parameter to return.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_open_uri_complete_open_uri">
+<description>
+Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-portal-OpenURI.OpenURI">OpenURI()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
+
+This method will free @invocation, you cannot use it afterwards.
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpOpenURI.
+</parameter_description>
+</parameter>
+<parameter name="invocation">
+<parameter_description> A #GDBusMethodInvocation.
+</parameter_description>
+</parameter>
+<parameter name="handle">
+<parameter_description> Parameter to return.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_open_uri_get_version">
+<description>
+Gets the value of the <link linkend="gdbus-property-org-freedesktop-portal-OpenURI.version">"version"</link> D-Bus property.
+
+Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
+
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpOpenURI.
+</parameter_description>
+</parameter>
+</parameters>
+<return> The property value.
+</return>
+</function>
+
+<function name="gxdp_open_uri_interface_info">
+<description>
+Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</link> D-Bus interface.
+
+
+</description>
+<parameters>
+</parameters>
+<return> A #GDBusInterfaceInfo. Do not free.
+</return>
+</function>
+
+<function name="gxdp_open_uri_override_properties">
+<description>
+Overrides all #GObject properties in the #GXdpOpenURI interface for a concrete class.
+The properties are overridden in the order they are defined.
+
+
+</description>
+<parameters>
+<parameter name="klass">
+<parameter_description> The class structure for a #GObject<!-- -->-derived class.
+</parameter_description>
+</parameter>
+<parameter name="property_id_begin">
+<parameter_description> The property id to assign to the first overridden property.
+</parameter_description>
+</parameter>
+</parameters>
+<return> The last property id.
+</return>
+</function>
+
+<function name="gxdp_open_uri_proxy_new">
+<description>
+Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</link>. See g_dbus_proxy_new() for more details.
+
+When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+You can then call gxdp_open_uri_proxy_new_finish() to get the result of the operation.
+
+See gxdp_open_uri_proxy_new_sync() for the synchronous, blocking version of this constructor.
+
+</description>
+<parameters>
+<parameter name="connection">
+<parameter_description> A #GDBusConnection.
+</parameter_description>
+</parameter>
+<parameter name="flags">
+<parameter_description> Flags from the #GDBusProxyFlags enumeration.
+</parameter_description>
+</parameter>
+<parameter name="name">
+<parameter_description> A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+</parameter_description>
+</parameter>
+<parameter name="object_path">
+<parameter_description> An object path.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> A #GAsyncReadyCallback to call when the request is satisfied.
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> User data to pass to @callback.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_open_uri_proxy_new_finish">
+<description>
+Finishes an operation started with gxdp_open_uri_proxy_new().
+
+
+</description>
+<parameters>
+<parameter name="res">
+<parameter_description> The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_proxy_new().
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> The constructed proxy object or %NULL if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_proxy_new_for_bus">
+<description>
+Like gxdp_open_uri_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
+
+When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
+You can then call gxdp_open_uri_proxy_new_for_bus_finish() to get the result of the operation.
+
+See gxdp_open_uri_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
+
+</description>
+<parameters>
+<parameter name="bus_type">
+<parameter_description> A #GBusType.
+</parameter_description>
+</parameter>
+<parameter name="flags">
+<parameter_description> Flags from the #GDBusProxyFlags enumeration.
+</parameter_description>
+</parameter>
+<parameter name="name">
+<parameter_description> A bus name (well-known or unique).
+</parameter_description>
+</parameter>
+<parameter name="object_path">
+<parameter_description> An object path.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="callback">
+<parameter_description> A #GAsyncReadyCallback to call when the request is satisfied.
+</parameter_description>
+</parameter>
+<parameter name="user_data">
+<parameter_description> User data to pass to @callback.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_open_uri_proxy_new_for_bus_finish">
+<description>
+Finishes an operation started with gxdp_open_uri_proxy_new_for_bus().
+
+
+</description>
+<parameters>
+<parameter name="res">
+<parameter_description> The #GAsyncResult obtained from the #GAsyncReadyCallback passed to gxdp_open_uri_proxy_new_for_bus().
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> The constructed proxy object or %NULL if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_proxy_new_for_bus_sync">
+<description>
+Like gxdp_open_uri_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
+
+The calling thread is blocked until a reply is received.
+
+See gxdp_open_uri_proxy_new_for_bus() for the asynchronous version of this constructor.
+
+
+</description>
+<parameters>
+<parameter name="bus_type">
+<parameter_description> A #GBusType.
+</parameter_description>
+</parameter>
+<parameter name="flags">
+<parameter_description> Flags from the #GDBusProxyFlags enumeration.
+</parameter_description>
+</parameter>
+<parameter name="name">
+<parameter_description> A bus name (well-known or unique).
+</parameter_description>
+</parameter>
+<parameter name="object_path">
+<parameter_description> An object path.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> The constructed proxy object or %NULL if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_proxy_new_sync">
+<description>
+Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</link>. See g_dbus_proxy_new_sync() for more details.
+
+The calling thread is blocked until a reply is received.
+
+See gxdp_open_uri_proxy_new() for the asynchronous version of this constructor.
+
+
+</description>
+<parameters>
+<parameter name="connection">
+<parameter_description> A #GDBusConnection.
+</parameter_description>
+</parameter>
+<parameter name="flags">
+<parameter_description> Flags from the #GDBusProxyFlags enumeration.
+</parameter_description>
+</parameter>
+<parameter name="name">
+<parameter_description> A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
+</parameter_description>
+</parameter>
+<parameter name="object_path">
+<parameter_description> An object path.
+</parameter_description>
+</parameter>
+<parameter name="cancellable">
+<parameter_description> A #GCancellable or %NULL.
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> Return location for error or %NULL
+</parameter_description>
+</parameter>
+</parameters>
+<return> The constructed proxy object or %NULL if @error is set.
+</return>
+</function>
+
+<function name="gxdp_open_uri_set_version">
+<description>
+Sets the <link linkend="gdbus-property-org-freedesktop-portal-OpenURI.version">"version"</link> D-Bus property to @value.
+
+Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> A #GXdpOpenURI.
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> The value to set.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
+<function name="gxdp_open_uri_skeleton_new">
+<description>
+Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-portal-OpenURI.top_of_page">org.freedesktop.portal.OpenURI</link>.
+
+
+</description>
+<parameters>
+</parameters>
+<return> The skeleton object.
+</return>
+</function>
+
<function name="gxdp_proxy_resolver_call_lookup">
<description>
Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-portal-ProxyResolver.Lookup">Lookup()</link> D-Bus method on @proxy.
<substitute_type_name from="GUnixSocketAddressType" to="Gio::UnixSocketAddress::Type" />
<substitute_enumerator_name from_prefix="G_APPLICATION_" to_prefix="Gio::Application::Flags::" />
+<substitute_enumerator_name from="G_APPLICATION_FLAGS_NONE" to="Gio::Application::Flags::NONE" />
<!-- GConverterFlags and GConverterResult both have prefix G_CONVERTER_. -->
-<substitute_enumerator_name from_prefix="G_CONVERTER_NO_FLAGS" to_prefix="Gio::Converter::Flags::NO_FLAGS" />
-<substitute_enumerator_name from_prefix="G_CONVERTER_INPUT_AT_END" to_prefix="Gio::Converter::Flags::INPUT_AT_END" />
-<substitute_enumerator_name from_prefix="G_CONVERTER_FLUSH" to_prefix="Gio::Converter::Flags::FLUSH" />
+<substitute_enumerator_name from="G_CONVERTER_NO_FLAGS" to="Gio::Converter::Flags::NO_FLAGS" />
+<substitute_enumerator_name from="G_CONVERTER_INPUT_AT_END" to="Gio::Converter::Flags::INPUT_AT_END" />
+<substitute_enumerator_name from="G_CONVERTER_FLUSH" to="Gio::Converter::Flags::FLUSH" />
<substitute_enumerator_name from_prefix="G_CONVERTER_" to_prefix="Gio::Converter::Result::" />
+<substitute_enumerator_name from_prefix="G_DATA_STREAM_BYTE_ORDER_" to_prefix="Gio::DataStreamByteOrder::" />
+<substitute_enumerator_name from_prefix="G_DATA_STREAM_NEWLINE_TYPE_" to_prefix="Gio::DataStreamNewlineType::" />
<substitute_enumerator_name from_prefix="G_IO_ERROR_" to_prefix="Gio::Error::" />
+<substitute_enumerator_name from_prefix="G_DBUS_CAPABILITY_FLAGS_" to_prefix="Gio::DBus::CapabilityFlags::" />
<substitute_enumerator_name from_prefix="G_DBUS_CONNECTION_FLAGS_" to_prefix="Gio::DBus::ConnectionFlags::" />
<substitute_enumerator_name from_prefix="G_DBUS_SEND_MESSAGE_FLAGS_" to_prefix="Gio::DBus::SendMessageFlags::" />
<substitute_enumerator_name from_prefix="G_DBUS_MESSAGE_TYPE_" to_prefix="Gio::DBus::MessageType::" />
<substitute_enumerator_name from_prefix="G_FILE_MONITOR_" to_prefix="Gio::FileMonitorFlags::" />
<substitute_enumerator_name from_prefix="G_FILE_TYPE_" to_prefix="Gio::FileType::" />
<substitute_enumerator_name from_prefix="G_NETWORK_CONNECTIVITY_" to_prefix="Gio::NetworkConnectivity::" />
+<substitute_enumerator_name from_prefix="G_PASSWORD_SAVE_" to_prefix="Gio::PasswordSave::" />
<substitute_enumerator_name from_prefix="G_RESOLVER_RECORD_" to_prefix="Gio::Resolver::RecordType::" />
<substitute_enumerator_name from_prefix="G_RESOURCE_ERROR_" to_prefix="Gio::ResourceError::" />
<substitute_enumerator_name from_prefix="G_SETTINGS_BIND_" to_prefix="Gio::Settings::BindFlags::" />
<substitute_enumerator_name from_prefix="G_SOCKET_FAMILY_" to_prefix="Gio::SocketFamily::" />
<substitute_enumerator_name from_prefix="G_IO_" to_prefix="Glib::IOCondition::" />
<substitute_enumerator_name from_prefix="G_SOCKET_CLIENT_" to_prefix="Gio::SocketClientEvent::" />
+<substitute_enumerator_name from_prefix="G_TLS_AUTHENTICATION_" to_prefix="Gio::GTlsAuthenticationMode::" />
<substitute_enumerator_name from_prefix="G_TLS_CERTIFICATE_" to_prefix="Gio::TlsCertificateFlags::" />
<substitute_enumerator_name from_prefix="G_TLS_REHANDSHAKE_" to_prefix="Gio::TlsRehandshakeMode::" />
<substitute_enumerator_name from_prefix="G_TLS_DATABASE_VERIFY_" to_prefix="Gio::TlsDatabaseVerifyFlags::" />
<substitute_enumerator_name from_prefix="G_TLS_INTERACTION_" to_prefix="Gio::TlsInteractionResult::" />
<substitute_enumerator_name from_prefix="G_TLS_ERROR_" to_prefix="Gio::TlsError::" />
+<substitute_enumerator_name from_prefix="G_TLS_PASSWORD_" to_prefix="Gio::TlsPassword::Flags::" />
<substitute_enumerator_name from_prefix="G_ZLIB_COMPRESSOR_FORMAT_" to_prefix="Gio::ZlibCompressorFormat::" />
<substitute_enumerator_name from_prefix="G_UNIX_SOCKET_ADDRESS_" to_prefix="Gio::UnixSocketAddress::Type::" />
<!-- These are preprocessor defines. Don't substitute. -->
;; {
;; G_BUS_NAME_OWNER_FLAGS_NONE = 0, /*< nick=none >*/
;; G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0), /*< nick=allow-replacement >*/
-;; G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1) /*< nick=replace >*/
+;; G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1), /*< nick=replace >*/
+;; G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE = (1<<2) /*< nick=do-not-queue >*/
;; } GBusNameOwnerFlags;
(define-flags-extended BusNameOwnerFlags
'("none" "G_BUS_NAME_OWNER_FLAGS_NONE" "0x0")
'("allow-replacement" "G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT" "(1<<0)")
'("replace" "G_BUS_NAME_OWNER_FLAGS_REPLACE" "(1<<1)")
+ '("do-not-queue" "G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE" "(1<<2)")
)
)
(gtype-id "G_TYPE_XDP_NETWORK_MONITOR_SKELETON")
)
+(define-object OpenURI
+ (in-module "GXdp")
+ (c-name "GXdpOpenURI")
+ (gtype-id "G_TYPE_XDP_OPEN_URI")
+)
+
+(define-object OpenURIProxy
+ (in-module "GXdp")
+ (parent "GDBusProxy")
+ (c-name "GXdpOpenURIProxy")
+ (gtype-id "G_TYPE_XDP_OPEN_URI_PROXY")
+)
+
+(define-object OpenURISkeleton
+ (in-module "GXdp")
+ (parent "GDBusInterfaceSkeleton")
+ (c-name "GXdpOpenURISkeleton")
+ (gtype-id "G_TYPE_XDP_OPEN_URI_SKELETON")
+)
+
(define-object ProxyResolver
(in-module "GXdp")
(c-name "GXdpProxyResolver")
'("none" "G_BUS_NAME_OWNER_FLAGS_NONE")
'("allow-replacement" "G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT")
'("replace" "G_BUS_NAME_OWNER_FLAGS_REPLACE")
+ '("do-not-queue" "G_BUS_NAME_OWNER_FLAGS_DO_NOT_QUEUE")
)
)
(return-type "gboolean")
(parameters
'("GList*" "files")
- '("GAppLaunchContext*" "launch_context")
+ '("GAppLaunchContext*" "context")
'("GError**" "error")
)
)
(return-type "gboolean")
(parameters
'("GList*" "uris")
- '("GAppLaunchContext*" "launch_context")
+ '("GAppLaunchContext*" "context")
'("GError**" "error")
)
)
(return-type "gboolean")
(parameters
'("const-char*" "uri")
- '("GAppLaunchContext*" "launch_context")
+ '("GAppLaunchContext*" "context")
'("GError**" "error")
)
)
(return-type "none")
(parameters
'("const-char*" "uri")
- '("GAppLaunchContext*" "launch_context")
+ '("GAppLaunchContext*" "context")
'("GCancellable*" "cancellable")
'("GAsyncReadyCallback" "callback")
'("gpointer" "user_data")
)
)
+(define-function g_content_type_is_mime_type
+ (c-name "g_content_type_is_mime_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "type")
+ '("const-gchar*" "mime_type")
+ )
+)
+
(define-function g_content_type_is_unknown
(c-name "g_content_type_is_unknown")
(return-type "gboolean")
)
)
+(define-function g_document_portal_add_documents
+ (c-name "g_document_portal_add_documents")
+ (return-type "GList*")
+ (parameters
+ '("GList*" "uris")
+ '("const-char*" "app_id")
+ '("GError**" "error")
+ )
+)
+
;; From gdrive.h
)
)
+(define-function g_file_new_build_filename
+ (c-name "g_file_new_build_filename")
+ (return-type "GFile*")
+ (parameters
+ '("const-gchar*" "first_element")
+ )
+ (varargs #t)
+)
+
(define-method dup
(of-object "GFile")
(c-name "g_file_dup")
(return-type "gboolean")
)
+(define-method load_bytes
+ (of-object "GFile")
+ (c-name "g_file_load_bytes")
+ (return-type "GBytes*")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("gchar**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
+(define-method load_bytes_async
+ (of-object "GFile")
+ (c-name "g_file_load_bytes_async")
+ (return-type "none")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method load_bytes_finish
+ (of-object "GFile")
+ (c-name "g_file_load_bytes_finish")
+ (return-type "GBytes*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gchar**" "etag_out")
+ '("GError**" "error")
+ )
+)
+
;; From gfileicon.h
-;; From gio_probes.h
-
-
-
;; From gioscheduler.h
(define-function g_io_scheduler_push_job
;; From gio-tool.h
+(define-function print_error
+ (c-name "print_error")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "format")
+ )
+ (varargs #t)
+)
+
(define-function print_file_error
(c-name "print_file_error")
(return-type "none")
(parameters
'("GFile*" "file")
- '("const-char*" "message")
+ '("const-gchar*" "message")
)
)
+;; From gopenuriportal.h
+
+(define-function g_openuri_portal_open_uri
+ (c-name "g_openuri_portal_open_uri")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "uri")
+ '("const-char*" "parent_window")
+ '("GError**" "error")
+ )
+)
+
+(define-function g_openuri_portal_open_uri_async
+ (c-name "g_openuri_portal_open_uri_async")
+ (return-type "none")
+ (parameters
+ '("const-char*" "uri")
+ '("const-char*" "parent_window")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-function g_openuri_portal_open_uri_finish
+ (c-name "g_openuri_portal_open_uri_finish")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gosxappinfo.h
+
+(define-function g_osx_app_info_get_type
+ (c-name "g_osx_app_info_get_type")
+ (return-type "GType")
+)
+
+(define-method get_filename
+ (of-object "GOsxAppInfo")
+ (c-name "g_osx_app_info_get_filename")
+ (return-type "char*")
+)
+
+(define-function g_osx_app_info_get_all_for_scheme
+ (c-name "g_osx_app_info_get_all_for_scheme")
+ (return-type "GList*")
+ (parameters
+ '("const-gchar*" "scheme")
+ )
+)
+
+
+
;; From goutputstream.h
(define-function g_output_stream_get_type
)
)
+(define-method join_multicast_group_ssm
+ (of-object "GSocket")
+ (c-name "g_socket_join_multicast_group_ssm")
+ (return-type "gboolean")
+ (parameters
+ '("GInetAddress*" "group")
+ '("GInetAddress*" "source_specific")
+ '("const-gchar*" "iface")
+ '("GError**" "error")
+ )
+)
+
+(define-method leave_multicast_group_ssm
+ (of-object "GSocket")
+ (c-name "g_socket_leave_multicast_group_ssm")
+ (return-type "gboolean")
+ (parameters
+ '("GInetAddress*" "group")
+ '("GInetAddress*" "source_specific")
+ '("const-gchar*" "iface")
+ '("GError**" "error")
+ )
+)
+
(define-method connect
(of-object "GSocket")
(c-name "g_socket_connect")
;; From gunixmounts.h
+(define-function g_unix_mount_entry_get_type
+ (c-name "g_unix_mount_entry_get_type")
+ (return-type "GType")
+)
+
+(define-function g_unix_mount_point_get_type
+ (c-name "g_unix_mount_point_get_type")
+ (return-type "GType")
+)
+
+(define-function g_unix_mount_copy
+ (c-name "g_unix_mount_copy")
+ (return-type "GUnixMountEntry*")
+ (parameters
+ '("GUnixMountEntry*" "mount_entry")
+ )
+)
+
(define-method free
(of-object "GUnixMountPoint")
(c-name "g_unix_mount_point_free")
(return-type "none")
)
+(define-method copy
+ (of-object "GUnixMountPoint")
+ (c-name "g_unix_mount_point_copy")
+ (return-type "GUnixMountPoint*")
+)
+
(define-function g_unix_mount_compare
(c-name "g_unix_mount_compare")
(return-type "gint")
)
)
-(define-method compare
- (of-object "GUnixMountPoint")
- (c-name "g_unix_mount_point_compare")
- (return-type "gint")
- (parameters
- '("GUnixMountPoint*" "mount2")
- )
-)
-
(define-method get_mount_path
(of-object "GUnixMountPoint")
(c-name "g_unix_mount_point_get_mount_path")
)
)
+(define-function g_unix_mount_for
+ (c-name "g_unix_mount_for")
+ (return-type "GUnixMountEntry*")
+ (parameters
+ '("const-char*" "file_path")
+ '("guint64*" "time_read")
+ )
+)
+
(define-function g_unix_mounts_changed_since
(c-name "g_unix_mounts_changed_since")
(return-type "gboolean")
)
)
+(define-function g_unix_is_system_fs_type
+ (c-name "g_unix_is_system_fs_type")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "fs_type")
+ )
+)
+
+(define-function g_unix_is_system_device_path
+ (c-name "g_unix_is_system_device_path")
+ (return-type "gboolean")
+ (parameters
+ '("const-char*" "device_path")
+ )
+)
+
;; From gunixoutputstream.h
)
)
+(define-method complete_add_full
+ (of-object "GXdpDocuments")
+ (c-name "gxdp_documents_complete_add_full")
+ (return-type "none")
+ (parameters
+ '("GDBusMethodInvocation*" "invocation")
+ '("GUnixFDList*" "fd_list")
+ '("const-gchar*-const*" "doc_ids")
+ '("GVariant*" "extra_out")
+ )
+)
+
(define-method complete_grant_permissions
(of-object "GXdpDocuments")
(c-name "gxdp_documents_complete_grant_permissions")
)
)
+(define-method call_add_full
+ (of-object "GXdpDocuments")
+ (c-name "gxdp_documents_call_add_full")
+ (return-type "none")
+ (parameters
+ '("GVariant*" "arg_o_path_fds")
+ '("guint" "arg_flags")
+ '("const-gchar*" "arg_app_id")
+ '("const-gchar*-const*" "arg_permissions")
+ '("GUnixFDList*" "fd_list")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method call_add_full_finish
+ (of-object "GXdpDocuments")
+ (c-name "gxdp_documents_call_add_full_finish")
+ (return-type "gboolean")
+ (parameters
+ '("gchar***" "out_doc_ids")
+ '("GVariant**" "out_extra_out")
+ '("GUnixFDList**" "out_fd_list")
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method call_add_full_sync
+ (of-object "GXdpDocuments")
+ (c-name "gxdp_documents_call_add_full_sync")
+ (return-type "gboolean")
+ (parameters
+ '("GVariant*" "arg_o_path_fds")
+ '("guint" "arg_flags")
+ '("const-gchar*" "arg_app_id")
+ '("const-gchar*-const*" "arg_permissions")
+ '("GUnixFDList*" "fd_list")
+ '("gchar***" "out_doc_ids")
+ '("GVariant**" "out_extra_out")
+ '("GUnixFDList**" "out_fd_list")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
(define-method call_grant_permissions
(of-object "GXdpDocuments")
(c-name "gxdp_documents_call_grant_permissions")
)
)
+(define-method get_version
+ (of-object "GXdpDocuments")
+ (c-name "gxdp_documents_get_version")
+ (return-type "guint")
+)
+
+(define-method set_version
+ (of-object "GXdpDocuments")
+ (c-name "gxdp_documents_set_version")
+ (return-type "none")
+ (parameters
+ '("guint" "value")
+ )
+)
+
(define-function gxdp_documents_proxy_get_type
(c-name "gxdp_documents_proxy_get_type")
(return-type "GType")
(return-type "GType")
)
+(define-function gxdp_open_uri_get_type
+ (c-name "gxdp_open_uri_get_type")
+ (return-type "GType")
+)
+
+(define-function gxdp_open_uri_interface_info
+ (c-name "gxdp_open_uri_interface_info")
+ (return-type "GDBusInterfaceInfo*")
+)
+
+(define-function gxdp_open_uri_override_properties
+ (c-name "gxdp_open_uri_override_properties")
+ (return-type "guint")
+ (parameters
+ '("GObjectClass*" "klass")
+ '("guint" "property_id_begin")
+ )
+)
+
+(define-method complete_open_uri
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_complete_open_uri")
+ (return-type "none")
+ (parameters
+ '("GDBusMethodInvocation*" "invocation")
+ '("const-gchar*" "handle")
+ )
+)
+
+(define-method complete_open_file
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_complete_open_file")
+ (return-type "none")
+ (parameters
+ '("GDBusMethodInvocation*" "invocation")
+ '("GUnixFDList*" "fd_list")
+ '("const-gchar*" "handle")
+ )
+)
+
+(define-method call_open_uri
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_call_open_uri")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "arg_parent_window")
+ '("const-gchar*" "arg_uri")
+ '("GVariant*" "arg_options")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method call_open_uri_finish
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_call_open_uri_finish")
+ (return-type "gboolean")
+ (parameters
+ '("gchar**" "out_handle")
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method call_open_uri_sync
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_call_open_uri_sync")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "arg_parent_window")
+ '("const-gchar*" "arg_uri")
+ '("GVariant*" "arg_options")
+ '("gchar**" "out_handle")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-method call_open_file
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_call_open_file")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "arg_parent_window")
+ '("GVariant*" "arg_fd")
+ '("GVariant*" "arg_options")
+ '("GUnixFDList*" "fd_list")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method call_open_file_finish
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_call_open_file_finish")
+ (return-type "gboolean")
+ (parameters
+ '("gchar**" "out_handle")
+ '("GUnixFDList**" "out_fd_list")
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-method call_open_file_sync
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_call_open_file_sync")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "arg_parent_window")
+ '("GVariant*" "arg_fd")
+ '("GVariant*" "arg_options")
+ '("GUnixFDList*" "fd_list")
+ '("gchar**" "out_handle")
+ '("GUnixFDList**" "out_fd_list")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-method get_version
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_get_version")
+ (return-type "guint")
+)
+
+(define-method set_version
+ (of-object "GXdpOpenURI")
+ (c-name "gxdp_open_uri_set_version")
+ (return-type "none")
+ (parameters
+ '("guint" "value")
+ )
+)
+
+(define-function gxdp_open_uri_proxy_get_type
+ (c-name "gxdp_open_uri_proxy_get_type")
+ (return-type "GType")
+)
+
+(define-function gxdp_open_uri_proxy_new_finish
+ (c-name "gxdp_open_uri_proxy_new_finish")
+ (return-type "GXdpOpenURI*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-function gxdp_open_uri_proxy_new_sync
+ (c-name "gxdp_open_uri_proxy_new_sync")
+ (return-type "GXdpOpenURI*")
+ (parameters
+ '("GDBusConnection*" "connection")
+ '("GDBusProxyFlags" "flags")
+ '("const-gchar*" "name")
+ '("const-gchar*" "object_path")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-function gxdp_open_uri_proxy_new_for_bus
+ (c-name "gxdp_open_uri_proxy_new_for_bus")
+ (return-type "none")
+ (parameters
+ '("GBusType" "bus_type")
+ '("GDBusProxyFlags" "flags")
+ '("const-gchar*" "name")
+ '("const-gchar*" "object_path")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-function gxdp_open_uri_proxy_new_for_bus_finish
+ (c-name "gxdp_open_uri_proxy_new_for_bus_finish")
+ (return-type "GXdpOpenURI*")
+ (parameters
+ '("GAsyncResult*" "res")
+ '("GError**" "error")
+ )
+)
+
+(define-function gxdp_open_uri_proxy_new_for_bus_sync
+ (c-name "gxdp_open_uri_proxy_new_for_bus_sync")
+ (return-type "GXdpOpenURI*")
+ (parameters
+ '("GBusType" "bus_type")
+ '("GDBusProxyFlags" "flags")
+ '("const-gchar*" "name")
+ '("const-gchar*" "object_path")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-function gxdp_open_uri_skeleton_get_type
+ (c-name "gxdp_open_uri_skeleton_get_type")
+ (return-type "GType")
+)
+
(define-function gxdp_network_monitor_get_type
(c-name "gxdp_network_monitor_get_type")
(return-type "GType")
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property name
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "")
)
(define-property parameter-type
(define-signal action-added
(of-object "GActionGroup")
(return-type "void")
- (when "last")
+ (flags "Run Last")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
)
(define-signal action-removed
(of-object "GActionGroup")
(return-type "void")
- (when "last")
+ (flags "Run Last")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
)
(define-signal action-enabled-changed
(of-object "GActionGroup")
(return-type "void")
- (when "last")
+ (flags "Run Last")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
'("gboolean" "p1")
(define-signal action-state-changed
(of-object "GActionGroup")
(return-type "void")
- (when "last")
+ (flags "Run Last, Must Collect")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
'("GVariant*" "p1")
;; From GApplication
-(define-signal activate
+(define-signal startup
(of-object "GApplication")
(return-type "void")
- (when "last")
+ (flags "Run First")
)
-(define-signal startup
+(define-signal shutdown
(of-object "GApplication")
(return-type "void")
- (when "first")
+ (flags "Run Last")
)
-(define-signal shutdown
+(define-signal activate
(of-object "GApplication")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal open
(of-object "GApplication")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gpointer" "p0")
'("gint" "p1")
(define-signal command-line
(of-object "GApplication")
(return-type "gint")
- (when "last")
+ (flags "Run Last")
(parameters
'("GApplicationCommandLine*" "p0")
)
(define-signal handle-local-options
(of-object "GApplication")
(return-type "gint")
- (when "last")
+ (flags "Run Last")
(parameters
'("GVariantDict*" "p0")
)
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
(define-property flags
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_APPLICATION_FLAGS_NONE")
)
(define-property resource-base-path
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
(define-property is-registered
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-remote
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property inactivity-timeout
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "0")
)
(define-property action-group
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GAppInfoMonitor
(define-signal changed
(of-object "GAppInfoMonitor")
(return-type "void")
- (when "first")
+ (flags "Run First")
)
;; From GCancellable
(define-signal cancelled
(of-object "GCancellable")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
;; From GBufferedInputStream
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "4096")
)
;; From GBufferedOutputStream
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "4096")
)
(define-property auto-grow
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GCharsetConverter
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property to-charset
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property use-fallback
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GConverterInputStream
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")
)
(define-property newline-type
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_DATA_STREAM_NEWLINE_TYPE_LF")
)
;; From GDataOutputStream
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")
)
;; From GDrive
(define-signal changed
(of-object "GDrive")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal disconnected
(of-object "GDrive")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal eject-button
(of-object "GDrive")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal stop-button
(of-object "GDrive")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
;; From GFile
(define-signal changed
(of-object "GFileMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GFile*" "p0")
'("GFile*" "p1")
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "800")
)
(define-property cancelled
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GFilenameCompleter
(define-signal got-completion-data
(of-object "GFilenameCompleter")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
;; From GFileInputStream
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
;; From GFilterOutputStream
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "TRUE")
)
;; From GUnixCredentialsMessage
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "-1")
)
(define-property close-fd
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
;; From GUnixOutputStream
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "-1")
)
(define-property close-fd
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
;; From GUnixSocketAddress
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property path-as-array
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "FALSE")
)
(define-property address-type
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_UNIX_SOCKET_ADDRESS_PATH")
)
;; From GInputStream
(define-signal items-changed
(of-object "GListModel")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("guint" "p0")
'("guint" "p1")
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
(define-property data-size
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "0")
)
(define-property realloc-function
(define-signal items-changed
(of-object "GMenuModel")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gint" "p0")
'("gint" "p1")
(define-signal changed
(of-object "GMount")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal unmounted
(of-object "GMount")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal pre-unmount
(of-object "GMount")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
;; From GMountOperation
(define-signal ask-password
(of-object "GMountOperation")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("const-gchar*" "p0")
'("const-gchar*" "p1")
(define-signal ask-question
(of-object "GMountOperation")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("const-gchar*" "p0")
'("const-gchar**" "p1")
(define-signal reply
(of-object "GMountOperation")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GMountOperationResult" "p0")
)
(define-signal aborted
(of-object "GMountOperation")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal show-processes
(of-object "GMountOperation")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("const-gchar*" "p0")
'("GArray*" "p1")
(define-signal show-unmount-progress
(of-object "GMountOperation")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("const-gchar*" "p0")
'("gint64" "p1")
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
(define-property password
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
(define-property anonymous
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property domain
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
(define-property password-save
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_PASSWORD_SAVE_NEVER")
)
(define-property choice
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "0")
)
;; From GNotification
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property can-acquire
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property can-release
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GPropertyAction
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property parameter-type
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property state-type
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property invert-boolean
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "FALSE")
)
;; From GProxy
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property destination-protocol
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property destination-hostname
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property destination-port
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
(define-property username
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property password
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property uri
(of-object "GProxyAddress")
(prop-type "GParamString")
- (docs "The proxy's URI")
+ (docs "The proxy’s URI")
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
;; From GProxyAddressEnumerator
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property default-port
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
(define-property connectable
(define-signal changed
(of-object "GSettings")
(return-type "void")
- (when "last")
+ (flags "Run Last")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
)
(define-signal change-event
(of-object "GSettings")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("gpointer" "p0")
'("gint" "p1")
(define-signal writable-changed
(of-object "GSettings")
(return-type "void")
- (when "last")
+ (flags "Run Last")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
)
(define-signal writable-change-event
(of-object "GSettings")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GQuark" "p0")
)
(writable #t)
(construct-only #t)
(deprecated #t)
+ (default-value "")
)
(define-property schema-id
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property backend
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property has-unapplied
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property delay-apply
(of-object "GSettings")
(prop-type "GParamBoolean")
- (docs "Whether this settings object is in 'delay-apply' mode")
+ (docs "Whether this settings object is in “delay-apply” mode")
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GSettingsBackend
(define-signal activate
(of-object "GSimpleAction")
(return-type "void")
- (when "last")
+ (flags "Run Last, Must Collect")
(parameters
'("GVariant*" "p0")
)
(define-signal change-state
(of-object "GSimpleAction")
(return-type "void")
- (when "last")
+ (flags "Run Last, Must Collect")
(parameters
'("GVariant*" "p0")
)
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property parameter-type
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property state-type
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "G_SUBPROCESS_FLAGS_NONE")
)
(define-property argv
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "G_SUBPROCESS_FLAGS_NONE")
)
;; From GThemedIcon
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property names
(define-property use-default-fallbacks
(of-object "GThemedIcon")
(prop-type "GParamBoolean")
- (docs "Whether to use default fallbacks found by shortening the name at '-' characters. Ignores names after the first if multiple names are given.")
+ (docs "Whether to use default fallbacks found by shortening the name at “-” characters. Ignores names after the first if multiple names are given.")
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "FALSE")
)
;; From GVolume
(define-signal changed
(of-object "GVolume")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
(define-signal removed
(of-object "GVolume")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
;; From GVolumeMonitor
(define-signal volume-added
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GVolume*" "p0")
)
(define-signal volume-removed
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GVolume*" "p0")
)
(define-signal volume-changed
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GVolume*" "p0")
)
(define-signal mount-added
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GMount*" "p0")
)
(define-signal mount-removed
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GMount*" "p0")
)
(define-signal mount-pre-unmount
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GMount*" "p0")
)
(define-signal mount-changed
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GMount*" "p0")
)
(define-signal drive-connected
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDrive*" "p0")
)
(define-signal drive-disconnected
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDrive*" "p0")
)
(define-signal drive-changed
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDrive*" "p0")
)
(define-signal drive-eject-button
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDrive*" "p0")
)
(define-signal drive-stop-button
(of-object "GVolumeMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDrive*" "p0")
)
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_ZLIB_COMPRESSOR_FORMAT_ZLIB")
)
(define-property level
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "-1")
)
(define-property file-info
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_ZLIB_COMPRESSOR_FORMAT_ZLIB")
)
(define-property file-info
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_SOCKET_FAMILY_INVALID")
)
(define-property bytes
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-loopback
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-link-local
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-site-local
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-multicast
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-mc-global
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-mc-link-local
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-mc-node-local
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-mc-org-local
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property is-mc-site-local
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GInetSocketAddress
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
(define-property flowinfo
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
(define-property scope-id
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
;; From GSocketAddress
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "G_SOCKET_FAMILY_INVALID")
)
;; From GSocketAddressEnumerator
(define-signal reload
(of-object "GResolver")
(return-type "void")
- (when "last")
+ (flags "Run Last")
)
;; From GNetworkAddress
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property port
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "0")
)
(define-property scheme
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
;; From GNetworkMonitor
(define-signal network-changed
(of-object "GNetworkMonitor")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gboolean" "p0")
)
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "G_NETWORK_CONNECTIVITY_FULL")
)
(define-property network-available
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property network-metered
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GNetworkService
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property protocol
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property domain
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property scheme
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
;; From GSettings
(define-signal changed
(of-object "GSettings")
(return-type "void")
- (when "last")
+ (flags "Run Last")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
)
(define-signal change-event
(of-object "GSettings")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("gpointer" "p0")
'("gint" "p1")
(define-signal writable-changed
(of-object "GSettings")
(return-type "void")
- (when "last")
+ (flags "Run Last")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
)
(define-signal writable-change-event
(of-object "GSettings")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GQuark" "p0")
)
(writable #t)
(construct-only #t)
(deprecated #t)
+ (default-value "")
)
(define-property schema-id
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property backend
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property has-unapplied
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property delay-apply
(of-object "GSettings")
(prop-type "GParamBoolean")
- (docs "Whether this settings object is in 'delay-apply' mode")
+ (docs "Whether this settings object is in “delay-apply” mode")
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; GSettingsSchema is neither a GObject nor a GInterface. Not checked for signals and properties.
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_SOCKET_FAMILY_INVALID")
)
(define-property type
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_SOCKET_TYPE_STREAM")
)
(define-property protocol
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_SOCKET_PROTOCOL_UNKNOWN")
)
(define-property fd
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "-1")
)
(define-property blocking
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property listen-backlog
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "10")
)
(define-property keepalive
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property local-address
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "0")
)
(define-property ttl
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "0")
)
(define-property broadcast
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property multicast-loopback
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property multicast-ttl
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "1")
)
;; From GSocketClient
(define-signal event
(of-object "GSocketClient")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GSocketClientEvent" "p0")
'("GSocketConnectable*" "p1")
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_SOCKET_FAMILY_INVALID")
)
(define-property type
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_SOCKET_TYPE_STREAM")
)
(define-property protocol
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_SOCKET_PROTOCOL_DEFAULT")
)
(define-property local-address
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "0")
)
(define-property enable-proxy
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property tls
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property tls-validation-flags
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_TLS_CERTIFICATE_UNKNOWN_CA | G_TLS_CERTIFICATE_BAD_IDENTITY | G_TLS_CERTIFICATE_NOT_ACTIVATED | G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_INSECURE | G_TLS_CERTIFICATE_GENERIC_ERROR")
)
(define-property proxy-resolver
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GTcpWrapperConnection
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property private-key
(of-object "GTlsCertificate")
(prop-type "GParamBoxed")
- (docs "The DER representation of the certificate's private key")
+ (docs "The DER representation of the certificate’s private key")
(readable #f)
(writable #t)
(construct-only #t)
(define-property private-key-pem
(of-object "GTlsCertificate")
(prop-type "GParamString")
- (docs "The PEM representation of the certificate's private key")
+ (docs "The PEM representation of the certificate’s private key")
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property issuer
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property validation-flags
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_TLS_CERTIFICATE_UNKNOWN_CA | G_TLS_CERTIFICATE_BAD_IDENTITY | G_TLS_CERTIFICATE_NOT_ACTIVATED | G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_INSECURE | G_TLS_CERTIFICATE_GENERIC_ERROR")
)
;; From GTlsConnection
(define-signal accept-certificate
(of-object "GTlsConnection")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GTlsCertificate*" "p0")
'("GTlsCertificateFlags" "p1")
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property rehandshake-mode
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_TLS_REHANDSHAKE_SAFELY")
)
(define-property use-system-certdb
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
(define-property database
(define-property certificate
(of-object "GTlsConnection")
(prop-type "GParamObject")
- (docs "The connection's certificate")
+ (docs "The connection’s certificate")
(readable #t)
(writable #t)
(construct-only #f)
(define-property peer-certificate
(of-object "GTlsConnection")
(prop-type "GParamObject")
- (docs "The connection's peer's certificate")
+ (docs "The connection’s peer’s certificate")
(readable #t)
(writable #f)
(construct-only #f)
(define-property peer-certificate-errors
(of-object "GTlsConnection")
(prop-type "GParamFlags")
- (docs "Errors found with the peer's certificate")
+ (docs "Errors found with the peer’s certificate")
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "0")
)
;; From GTlsDatabase
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
;; From GTlsInteraction
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_TLS_PASSWORD_NONE")
)
(define-property description
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
(define-property warning
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "")
)
;; From GTlsServerConnection
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_TLS_AUTHENTICATION_NONE")
)
;; From GUnixConnection
(define-signal event
(of-object "GSocketListener")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GSocketListenerEvent" "p0")
'("GSocket*" "p1")
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "10")
)
;; From GSocketService
(define-signal incoming
(of-object "GSocketService")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GSocketConnection*" "p0")
'("GObject*" "p1")
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "TRUE")
)
;; From GThreadedSocketService
(define-signal run
(of-object "GThreadedSocketService")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GSocketConnection*" "p0")
'("GObject*" "p1")
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "10")
)
;; From GDBusAuthObserver
(define-signal authorize-authenticated-peer
(of-object "GDBusAuthObserver")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GIOStream*" "p0")
'("GCredentials*" "p1")
(define-signal allow-mechanism
(of-object "GDBusAuthObserver")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("const-gchar*" "p0")
)
(define-signal closed
(of-object "GDBusConnection")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("gboolean" "p0")
'("GError*" "p1")
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property flags
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "G_DBUS_CONNECTION_FLAGS_NONE")
)
(define-property guid
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property unique-name
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "")
)
(define-property closed
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property exit-on-close
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property capabilities
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "G_DBUS_CAPABILITY_FLAGS_NONE")
)
(define-property authentication-observer
(define-signal g-authorize-method
(of-object "GDBusInterfaceSkeleton")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDBusMethodInvocation*" "p0")
)
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "G_DBUS_INTERFACE_SKELETON_FLAGS_NONE")
)
;; From GDBusObject
(define-signal interface-added
(of-object "GDBusObject")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDBusInterface*" "p0")
)
(define-signal interface-removed
(of-object "GDBusObject")
(return-type "void")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDBusInterface*" "p0")
)
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
;; From GDBusMethodInvocation
(define-signal g-properties-changed
(of-object "GDBusProxy")
(return-type "void")
- (when "last")
+ (flags "Run Last, Must Collect")
(parameters
'("GVariant*" "p0")
'("const-gchar*const*" "p1")
(define-signal g-signal
(of-object "GDBusProxy")
(return-type "void")
- (when "last")
+ (flags "Run Last, Must Collect")
(parameters
'("const-gchar*" "p0")
'("const-gchar*" "p1")
(readable #f)
(writable #t)
(construct-only #t)
+ (default-value "G_BUS_TYPE_NONE")
)
(define-property g-name
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property g-name-owner
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "")
)
(define-property g-flags
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_DBUS_PROXY_FLAGS_NONE")
)
(define-property g-object-path
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property g-interface-name
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property g-default-timeout
(readable #t)
(writable #t)
(construct-only #f)
+ (default-value "-1")
)
(define-property g-interface-info
(define-signal new-connection
(of-object "GDBusServer")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
'("GDBusConnection*" "p0")
)
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property client-address
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "")
)
(define-property flags
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_DBUS_SERVER_FLAGS_NONE")
)
(define-property guid
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property active
(readable #t)
(writable #f)
(construct-only #f)
+ (default-value "FALSE")
)
(define-property authentication-observer
---- gio_signals.defs 2012-02-28 13:19:25.000000000 -0500
-+++ gio_signals.defs.new 2012-02-28 12:47:50.000000000 -0500
-@@ -83,7 +83,7 @@
- (when "last")
+--- ./../../gio/src/gio_signals.defs.orig 2017-09-11 09:52:55.272837455 +0200
++++ ./../../gio/src/gio_signals.defs 2017-09-11 14:56:39.662521043 +0200
+@@ -87,11 +87,11 @@
+ (return-type "void")
+ (flags "Run Last, Must Collect")
+ (detailed #t)
(parameters
'("const-gchar*" "p0")
- '("GVariant" "p1")
)
)
-@@ -579,7 +579,7 @@
- (when "last")
+ ;; From GApplication
+
+@@ -738,11 +738,11 @@
+ (of-object "GMountOperation")
+ (return-type "void")
+ (flags "Run Last")
(parameters
'("const-gchar*" "p0")
- '("GStrv*" "p1")
)
)
-@@ -849,7 +849,7 @@
- (return-type "void")
- (when "last")
+ (define-signal reply
+ (of-object "GMountOperation")
+@@ -1106,11 +1106,11 @@
+ (define-signal writable-change-event
+ (of-object "GSettings")
+ (return-type "gboolean")
+ (flags "Run Last")
(parameters
-- '("GVariant" "p0")
-+ '("GVariant*" "p0")
+- '("guint" "p0")
++ '("GQuark" "p0")
)
)
-@@ -858,7 +858,7 @@
+ (define-property settings-schema
+ (of-object "GSettings")
+@@ -1190,20 +1190,20 @@
+ (define-signal activate
+ (of-object "GSimpleAction")
(return-type "void")
- (when "last")
+ (flags "Run Last, Must Collect")
(parameters
- '("GVariant" "p0")
+ '("GVariant*" "p0")
)
)
-@@ -1049,6 +1049,6 @@
- (return-type "gboolean")
- (when "last")
+ (define-signal change-state
+ (of-object "GSimpleAction")
+ (return-type "void")
+ (flags "Run Last, Must Collect")
(parameters
-- '("guint" "p0")
-+ '("GQuark" "p0")
+- '("GVariant" "p0")
++ '("GVariant*" "p0")
)
)
-
-@@ -1752,6 +1752,6 @@
+
+ (define-property name
+ (of-object "GSimpleAction")
+@@ -1850,11 +1850,11 @@
+ (define-signal writable-change-event
+ (of-object "GSettings")
(return-type "gboolean")
- (when "last")
+ (flags "Run Last")
(parameters
- '("guint" "p0")
+ '("GQuark" "p0")
)
)
-
-@@ -1824,8 +1824,8 @@
+
+ (define-property settings-schema
+ (of-object "GSettings")
+@@ -2723,23 +2723,23 @@
+ (define-signal g-properties-changed
+ (of-object "GDBusProxy")
(return-type "void")
- (when "last")
+ (flags "Run Last, Must Collect")
(parameters
- '("GVariant" "p0")
- '("GStrv*" "p1")
)
)
-@@ -1836,7 +1836,7 @@
+ (define-signal g-signal
+ (of-object "GDBusProxy")
+ (return-type "void")
+ (flags "Run Last, Must Collect")
(parameters
'("const-gchar*" "p0")
'("const-gchar*" "p1")
)
)
+ (define-property g-connection
+ (of-object "GDBusProxy")
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/socketaddress.h>
_WRAP_METHOD(guint32 get_flowinfo() const, g_inet_socket_address_get_flowinfo)
_WRAP_METHOD(guint32 get_scope_id() const, g_inet_socket_address_get_scope_id)
- _WRAP_PROPERTY("address", Glib::RefPtr<InetAddress>)
- _WRAP_PROPERTY("port", guint16)
- _WRAP_PROPERTY("flowinfo", guint32)
- _WRAP_PROPERTY("scope-id", guint32)
+ _WRAP_PROPERTY("address", Glib::RefPtr<InetAddress>)
+ // Don't use guint16 or guint32 in _WRAP_PROPERTY().
+ // There are no Glib::Value<> specializations for those types.
+ // Glib::Value<unsigned int> exists, and guint is a typedef of unsigned int.
+ _WRAP_PROPERTY("port", guint)
+ _WRAP_PROPERTY("flowinfo", guint)
+ _WRAP_PROPERTY("scope-id", guint)
};
} // namespace Gio
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/outputstream.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/menumodel.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <giomm/drive.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
_WRAP_ENUM(NetworkConnectivity, GNetworkConnectivity, NO_GTYPE)
-/** TODO
+/** Network status monitor.
*
+ * %NetworkMonitor provides an easy-to-use cross-platform API
+ * for monitoring network connectivity. On Linux, the available
+ * implementations are based on the kernel's netlink interface and
+ * on NetworkManager.
+ *
+ * There is also an implementation for use inside Flatpak sandboxes.
+
* @newin{2,44}
*/
class NetworkMonitor : public Glib::Interface
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2009 The glibmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/inetsocketaddress.h>
_WRAP_PROPERTY("protocol", Glib::ustring)
_WRAP_PROPERTY("destination_protocol", Glib::ustring)
_WRAP_PROPERTY("destination_hostname", Glib::ustring)
-
-//TODO: This should really be a guint16:
- _WRAP_PROPERTY("destination_port", Glib::ustring)
-
+ // Don't use guint16 in _WRAP_PROPERTY().
+ // There is no Glib::Value<> specialization for guint16.
+ // Glib::Value<unsigned int> exists, and guint is a typedef of unsigned int.
+ _WRAP_PROPERTY("destination_port", guint)
_WRAP_PROPERTY("username", Glib::ustring)
_WRAP_PROPERTY("password", Glib::ustring)
_WRAP_PROPERTY("uri", Glib::ustring)
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Gio
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
_WRAP_ENUM(Flags, GResourceFlags, newin "2,44")
_WRAP_ENUM(LookupFlags, GResourceLookupFlags, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_data(const Glib::RefPtr<const Glib::Bytes>& data), g_resource_new_from_data, errthrow, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_file(const std::string& filename), g_resource_load, errthrow, newin "2,44")
- _WRAP_METHOD(Glib::RefPtr<InputStream> open_stream(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE) const, g_resource_open_stream, errthrow, newin "2,44")
- _WRAP_METHOD(Glib::RefPtr<const Glib::Bytes> lookup_data(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE) const, g_resource_lookup_data, errthrow, newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_data(const Glib::RefPtr<const Glib::Bytes>& data), g_resource_new_from_data, errthrow "Glib::FileError", newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<Resource> create_from_file(const std::string& filename), g_resource_load, errthrow "Glib::FileError", newin "2,44")
+ _WRAP_METHOD(Glib::RefPtr<InputStream> open_stream(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE) const, g_resource_open_stream, errthrow "Gio::ResourceError", newin "2,44")
+ _WRAP_METHOD(Glib::RefPtr<const Glib::Bytes> lookup_data(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE) const, g_resource_lookup_data, errthrow "Gio::ResourceError", newin "2,44")
#m4 _CONVERSION(`char**',`std::vector<std::string>',`Glib::ArrayHandler<std::string>::array_to_vector($3, Glib::OWNERSHIP_DEEP)')
- _WRAP_METHOD(std::vector<std::string> enumerate_children(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE) const, g_resource_enumerate_children, errthrow, newin "2,44")
+ _WRAP_METHOD(std::vector<std::string> enumerate_children(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE) const, g_resource_enumerate_children, errthrow "Gio::ResourceError", newin "2,44")
/** Looks for a file at the specified @a path in the resource and
* if found returns information about it.
// 'register' is a keyword. Can't be the name of a method.
_WRAP_METHOD(void register_global(), g_resources_register, newin "2,44")
_WRAP_METHOD(void unregister_global(), g_resources_unregister, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<InputStream> open_stream_global(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE), g_resources_open_stream, errthrow, newin "2,44")
- _WRAP_METHOD(static Glib::RefPtr<const Glib::Bytes> lookup_data_global(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE), g_resources_lookup_data, errthrow, newin "2,44")
- _WRAP_METHOD(static std::vector<std::string> enumerate_children_global(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE), g_resources_enumerate_children, errthrow, newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<InputStream> open_stream_global(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE), g_resources_open_stream, errthrow "Gio::ResourceError", newin "2,44")
+ _WRAP_METHOD(static Glib::RefPtr<const Glib::Bytes> lookup_data_global(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE), g_resources_lookup_data, errthrow "Gio::ResourceError", newin "2,44")
+ _WRAP_METHOD(static std::vector<std::string> enumerate_children_global(const std::string& path, LookupFlags lookup_flags = LookupFlags::NONE), g_resources_enumerate_children, errthrow "Gio::ResourceError", newin "2,44")
/** Looks for a file at the specified @a path in the set of
* globally registered resources and if found returns information about it.
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/cancellable.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
_IGNORE(g_settings_get_default_value)
_WRAP_METHOD(int get_int(const Glib::ustring& key) const, g_settings_get_int)
- _WRAP_METHOD(void set_int(const Glib::ustring& key, int value), g_settings_set_int)
+ _WRAP_METHOD(bool set_int(const Glib::ustring& key, int value), g_settings_set_int)
_WRAP_METHOD(gint64 get_int64(const Glib::ustring& key) const, g_settings_get_int64)
- _WRAP_METHOD(void set_int64(const Glib::ustring& key, gint64 value), g_settings_set_int64)
+ _WRAP_METHOD(bool set_int64(const Glib::ustring& key, gint64 value), g_settings_set_int64)
_WRAP_METHOD(guint get_uint(const Glib::ustring& key) const, g_settings_get_uint)
- _WRAP_METHOD(void set_uint(const Glib::ustring& key, guint value), g_settings_set_uint)
+ _WRAP_METHOD(bool set_uint(const Glib::ustring& key, guint value), g_settings_set_uint)
_WRAP_METHOD(guint64 get_uint64(const Glib::ustring& key) const, g_settings_get_uint64)
- _WRAP_METHOD(void set_uint64(const Glib::ustring& key, guint64 value), g_settings_set_uint64)
+ _WRAP_METHOD(bool set_uint64(const Glib::ustring& key, guint64 value), g_settings_set_uint64)
_WRAP_METHOD(bool get_boolean(const Glib::ustring& key) const, g_settings_get_boolean)
- _WRAP_METHOD(void set_boolean(const Glib::ustring& key, bool value), g_settings_set_boolean)
+ _WRAP_METHOD(bool set_boolean(const Glib::ustring& key, bool value), g_settings_set_boolean)
_WRAP_METHOD(Glib::ustring get_string(const Glib::ustring& key) const, g_settings_get_string)
- _WRAP_METHOD(void set_string(const Glib::ustring& key, const Glib::ustring& value), g_settings_set_string)
+ _WRAP_METHOD(bool set_string(const Glib::ustring& key, const Glib::ustring& value), g_settings_set_string)
_WRAP_METHOD(double get_double(const Glib::ustring& key) const, g_settings_get_double)
- _WRAP_METHOD(void set_double(const Glib::ustring& key, double value), g_settings_set_double)
+ _WRAP_METHOD(bool set_double(const Glib::ustring& key, double value), g_settings_set_double)
#m4 _CONVERSION(`gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, Glib::OWNERSHIP_DEEP)')
_WRAP_METHOD(std::vector<Glib::ustring> get_string_array(const Glib::ustring& key) const, g_settings_get_strv)
_WRAP_SIGNAL(void changed(const Glib::ustring& key), "changed", detail_name key)
_WRAP_SIGNAL(bool writable_change_event(GQuark key), "writable-change-event")
- _WRAP_SIGNAL(void writable_changed(const Glib::ustring& key), writable_changed)
+ _WRAP_SIGNAL(void writable_changed(const Glib::ustring& key), writable_changed, detail_name key)
};
} // namespace Gio
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/permission.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/iochannel.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2009 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2007 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2009 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/socketlistener.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/value.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/tcpconnection.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/socketservice.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
class SocketConnectable;
+// It's unusual that a subclass of Glib::Object is a base class of an interface.
+// For a discussion, see https://bugzilla.gnome.org/show_bug.cgi?id=776537
+// especially the last paragraph of comment 6.
+
/** TlsClientConnection - TLS client-side connection.
* TlsClientConnection is the client-side subclass of TlsConnection,
* representing a client-side TLS connection.
_CUSTOM_CTOR_CAST
public:
- //TODO: It's not possible to use _WRAP_CTOR/_WRAP_CREATE to wrap the new
- //function because this is an interface.
+ // It's not possible to use _WRAP_CTOR/_WRAP_CREATE to wrap the new
+ // function because this is an interface.
#m4 _CONVERSION(`GIOStream*',`Glib::RefPtr<TlsClientConnection>',`Glib::wrap(G_TLS_CLIENT_CONNECTION($3))')
_WRAP_METHOD(static Glib::RefPtr<TlsClientConnection> create(const Glib::RefPtr<IOStream>& base_io_stream, const Glib::RefPtr<const SocketConnectable>& server_identity{?}), g_tls_client_connection_new, errthrow)
_WRAP_METHOD(void set_validation_flags(TlsCertificateFlags flags), g_tls_client_connection_set_validation_flags)
_WRAP_METHOD(TlsCertificateFlags get_validation_flags() const, g_tls_client_connection_get_validation_flags)
- _WRAP_METHOD(void set_use_ssl3(bool use_ssl3 = true), g_tls_client_connection_set_use_ssl3)
- _WRAP_METHOD(bool get_use_ssl3() const, g_tls_client_connection_get_use_ssl3)
+ _IGNORE(g_tls_client_connection_set_use_ssl3, g_tls_client_connection_get_use_ssl3) dnl// deprecated
#m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<Glib::ByteArray> >',`Glib::ListHandler< Glib::RefPtr<Glib::ByteArray> >::list_to_vector($3, Glib::OWNERSHIP_DEEP)')
_WRAP_METHOD(std::vector< Glib::RefPtr<Glib::ByteArray> > get_accepted_cas(), g_tls_client_connection_get_accepted_cas)
_WRAP_PROPERTY("accepted-cas", std::vector< Glib::RefPtr<Glib::ByteArray> >)
_WRAP_PROPERTY("server-identity", Glib::RefPtr<SocketConnectable>)
- _WRAP_PROPERTY("use-ssl3", bool)
_WRAP_PROPERTY("validation-flags", TlsCertificateFlags)
+ _IGNORE_PROPERTY(use-ssl3) dnl// deprecated
};
} // namespace Gio
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/tlsdatabase.h>
namespace Gio
{
+// It's unusual that a subclass of Glib::Object is a base class of an interface.
+// For a discussion, see https://bugzilla.gnome.org/show_bug.cgi?id=776537
+// especially the last paragraph of comment 6.
/** TlsFileDatabase - TLS file based database type.
* TlsFileDatabase is implemented by TlsDatabase objects which load their
_CLASS_INTERFACE(TlsFileDatabase, GTlsFileDatabase, G_TLS_FILE_DATABASE, GTlsFileDatabaseInterface)
public:
- //TODO: It is not possible to use _WRAP_CTOR()/WRAP_CREATE() here because this
- //class is an interface.
- // So, should we make it possible to use them? murrayc.
+ // It's not possible to use _WRAP_CTOR/_WRAP_CREATE to wrap the new
+ // function because this is an interface.
#m4 _CONVERSION(`GTlsDatabase*',`Glib::RefPtr<TlsFileDatabase>',`Glib::wrap(G_TLS_FILE_DATABASE($3))')
_WRAP_METHOD(static Glib::RefPtr<TlsFileDatabase> create(const std::string& anchors), g_tls_file_database_new, errthrow)
+
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
namespace Gio
{
+// It's unusual that a subclass of Glib::Object is a base class of an interface.
+// For a discussion, see https://bugzilla.gnome.org/show_bug.cgi?id=776537
+// especially the last paragraph of comment 6.
/** TlsServerConnection - TLS server-side connection.
* TlsServerConnection is the server-side subclass of TlsConnection,
_CUSTOM_CTOR_CAST
public:
- //TODO: It's not possible to use _WRAP_CTOR/_WRAP_CREATE to wrap the new
- //function because this is an interface.
+ // It's not possible to use _WRAP_CTOR/_WRAP_CREATE to wrap the new
+ // function because this is an interface.
#m4 _CONVERSION(`GIOStream*',`Glib::RefPtr<TlsServerConnection>',`Glib::wrap(G_TLS_SERVER_CONNECTION($3))')
_WRAP_METHOD(static Glib::RefPtr<IOStream> create(const Glib::RefPtr<IOStream>& base_io_stream, const Glib::RefPtr<TlsCertificate>& certificate), g_tls_server_connection_new, errthrow)
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2010 Jonathon Jongsma
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gunixcredentialsmessage.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/socketcontrolmessage.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gunixfdlist.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
_WRAP_CREATE(const std::vector<int>& fds, int n_fds)
_WRAP_METHOD(int get_length() const, g_unix_fd_list_get_length)
- _WRAP_METHOD(int get(int index) const, g_unix_fd_list_get, errthrow)
+ _WRAP_METHOD(int get(int index) const, g_unix_fd_list_get, errthrow "Gio::Error")
/** Returns the array of file descriptors that is contained in this object.
*
_WRAP_METHOD_DOCS_ONLY(g_unix_fd_list_append)
///@throw Glib::Error.
- _WRAP_METHOD(int append(int fd), g_unix_fd_list_append, errthrow)
+ _WRAP_METHOD(int append(int fd), g_unix_fd_list_append, errthrow "Gio::Error")
};
} // namespace Gio
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gunixfdmessage.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/socketcontrolmessage.h>
_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)
+ _WRAP_METHOD(bool append_fd(int fd), g_unix_fd_message_append_fd, errthrow "Gio::Error")
/** Returns the array of file descriptors that is contained in this object.
*
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/inputstream.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/outputstream.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gunixsocketaddress.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <giomm/file.h>
-// -*- 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
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_CONFIGINCLUDE(giommconfig.h)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <gio/gio.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GLIBMM_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/base64.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/class.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib-object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
// be next to the objects that they use.
#ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
-/** Partial specialization for pointers to GtkObject instances.
+/** Partial specialization for pointers to GObject instances.
+ * The C++ type is not a Glib::RefPtr<>. It can be a gtkmm widget.
* @ingroup ContHelpers
*/
template <class T>
// This confuse the SUN Forte compiler, so we ifdef it out:
#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
-/** Partial specialization for pointers to const GtkObject instances.
+/** Partial specialization for pointers to const GObject instances.
+ * The C++ type is not a Glib::RefPtr<>. It can be a gtkmm widget.
* @ingroup ContHelpers
*/
template <class T>
-/* $Id$ */
-
/* Copyright 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/debug.h>
-// -*- c++ -*-
#ifndef _GLIBMM_DEBUG_H
#define _GLIBMM_DEBUG_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/dispatcher.h>
// The following code is equivalent to
// context_->signal_io().connect(
- // sigc::mem_fun(*this, &DispatchNotifier::pipe_io_handler), fd, Glib::IOCondition::IN);
+ // sigc::mem_fun(*this, &DispatchNotifier::pipe_io_handler), fd, Glib::IOCondition::IO_IN);
// except for source->set_can_recurse(true).
- const auto source = IOSource::create(fd, Glib::IOCondition::IN);
+ const auto source = IOSource::create(fd, Glib::IOCondition::IO_IN);
// If the signal emission in pipe_io_handler() starts a new main loop,
// the event source shall not be blocked while that loop runs. (E.g. while
#ifdef G_OS_WIN32
return notify_queue_.empty();
#else
- PollFD poll_fd(fd_receiver_, Glib::IOCondition::IN);
+ PollFD poll_fd(fd_receiver_, Glib::IOCondition::IO_IN);
// GPollFD*, number of file descriptors to poll, timeout (ms)
g_poll(poll_fd.gobj(), 1, 0);
- return static_cast<int>(poll_fd.get_revents() & Glib::IOCondition::IN) == 0;
+ return static_cast<int>(poll_fd.get_revents() & Glib::IOCondition::IO_IN) == 0;
#endif
}
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <sigc++/sigc++.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* exception.cc
*
* Copyright 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <glib/gtestutils.h> //For g_assert() in glib >= 2.15.0
-// -*- c++ -*-
#ifndef _GLIBMM_EXCEPTION_H
#define _GLIBMM_EXCEPTION_H
-/* $Id$ */
/* exception.h
*
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/ustring.h>
-// -*- c++ -*-
-
/* exceptionhandler.cc
*
* Copyright 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
#ifndef _GLIBMM_EXCEPTIONHANDLER_H
#define _GLIBMM_EXCEPTIONHANDLER_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
#ifndef _GLIBMM_I18N_LIB_H
#define _GLIBMM_I18N_LIB_H
-/* $Id$ */
-
/* Copyright 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
// Include this file to define internationalization macros such as _().
-// -*- c++ -*-
#ifndef _GLIBMM_I18N_H
#define _GLIBMM_I18N_H
-/* $Id$ */
-
/* Copyright 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
// Include this file to define internationalization macros such as _().
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/init.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Glib
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/interface.h>
-// -*- c++ -*-
#ifndef _GLIBMM_INTERFACE_H
#define _GLIBMM_INTERFACE_H
-/* $Id$ */
-
/* Copyright 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glibmmconfig.h> // May define GLIBMM_DISABLE_DEPRECATED
-
#include <glibmm/main.h>
#include <glibmm/exceptionhandler.h>
#include <glibmm/wrap.h>
namespace
{
-void
-time64_to_time_val(gint64 time64, Glib::TimeVal& time_val)
+// Convert an interval from milliseconds to microseconds,
+// suitable for adding to Source::get_time().
+inline gint64 ms2us(unsigned int ms)
{
- // This function is not guaranteed to convert correctly if time64 is negative.
- const long seconds = static_cast<long>(time64 / G_GINT64_CONSTANT(1000000));
- const long microseconds =
- static_cast<long>(time64 - static_cast<gint64>(seconds) * G_GINT64_CONSTANT(1000000));
- time_val = Glib::TimeVal(seconds, microseconds);
+ return static_cast<gint64>(ms) * 1000;
}
class SourceConnectionNode : public sigc::notifiable
gint64
Source::get_time() const
{
- return g_source_get_time(const_cast<GSource*>(gobject_));
+ if (g_source_get_context(const_cast<GSource*>(gobject_)))
+ return g_source_get_time(const_cast<GSource*>(gobject_));
+ else
+ return g_get_monotonic_time();
}
inline // static
TimeoutSource::TimeoutSource(unsigned int interval) : interval_(interval)
{
- expiration_.assign_current_time();
- expiration_.add_milliseconds(std::min<unsigned long>(G_MAXLONG, interval_));
+ expiration_ = get_time() + ms2us(interval_);
}
TimeoutSource::~TimeoutSource() noexcept
bool
TimeoutSource::prepare(int& timeout)
{
- Glib::TimeVal current_time;
- time64_to_time_val(get_time(), current_time);
-
- Glib::TimeVal remaining = expiration_;
- remaining.subtract(current_time);
+ gint64 remaining = expiration_ - get_time();
- if (remaining.negative())
+ if (remaining <= 0)
{
// Already expired.
timeout = 0;
}
else
{
- const unsigned long milliseconds = static_cast<unsigned long>(remaining.tv_sec) * 1000U +
- static_cast<unsigned long>(remaining.tv_usec) / 1000U;
-
// Set remaining milliseconds.
- timeout = std::min<unsigned long>(G_MAXINT, milliseconds);
+ timeout = std::min<gint64>(G_MAXINT, remaining / 1000);
// Check if the system time has been set backwards. (remaining > interval)
- remaining.add_milliseconds(-std::min<unsigned long>(G_MAXLONG, interval_) - 1);
- if (!remaining.negative())
+ if (remaining > ms2us(interval_))
{
// Oh well. Reset the expiration time to now + interval;
// this at least avoids hanging for long periods of time.
- expiration_ = current_time;
- expiration_.add_milliseconds(interval_);
+ expiration_ = get_time() + ms2us(interval_);
timeout = std::min<unsigned int>(G_MAXINT, interval_);
}
}
bool
TimeoutSource::check()
{
- Glib::TimeVal current_time;
- time64_to_time_val(get_time(), current_time);
-
- return (expiration_ <= current_time);
+ return expiration_ <= get_time();
}
bool
const bool again = (*static_cast<sigc::slot<bool()>*>(slot))();
if (again)
- {
- time64_to_time_val(get_time(), expiration_);
- expiration_.add_milliseconds(std::min<unsigned long>(G_MAXLONG, interval_));
- }
+ expiration_ = get_time() + ms2us(interval_);
return again;
}
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <glibmmconfig.h>
#include <glibmm/refptr.h>
-#include <glibmm/timeval.h>
#include <glibmm/priorities.h>
#include <glibmm/iochannel.h>
#include <sigc++/sigc++.h>
*/
void remove_poll(PollFD& poll_fd);
-#ifndef GLIBMM_DISABLE_DEPRECATED
- /** Gets the "current time" to be used when checking this source. The advantage of calling this
- * function over calling get_current_time() directly is that when checking multiple sources, GLib
- * can cache a single value instead of having to repeatedly get the system time.
- * @param current_time Glib::TimeVal in which to store current time.
- *
- * @deprecated Use get_time() instead.
- */
- void get_current_time(Glib::TimeVal& current_time);
-#endif // GLIBMM_DISABLE_DEPRECATED
-
// TODO: Remove mention of g_get_monotonic time when we wrap it in C++.
/** Gets the time to be used when checking this source. The advantage of
* calling this function over calling g_get_monotonic_time() directly is
bool dispatch(sigc::slot_base* slot) override;
private:
- // TODO: Replace with gint64, because TimeVal is deprecated, when we can break ABI.
- Glib::TimeVal expiration_;
-
- unsigned int interval_;
+ gint64 expiration_; // microseconds
+ unsigned int interval_; // milliseconds
};
class IdleSource : public Glib::Source
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
// X11 defines DestroyNotify and some other non-prefixed stuff, and it's too late to change that
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib-object.h>
(void*)cppObject, (void*)cppObject->gobject_, G_OBJECT_TYPE_NAME(cppObject->gobject_));
#endif
- if (cppObject) // This will be 0 if the C++ destructor has already run.
+ if (cppObject) // This will be nullptr if the C++ destructor has already run.
{
- cppObject->destroy_notify_(); // Virtual - it does different things for GObject and GtkObject.
+ cppObject->destroy_notify_(); // Virtual - it does different things for Glib::ObjectBase and Gtk::Object.
}
}
{
// The C instance is about to be disposed, making it unusable. Now is a
// good time to delete the C++ wrapper of the C instance. There is no way
-// to force the disposal of the GObject (though GtkObject has
-// gtk_object_destroy()), So this is the *only* place where we delete the
-// C++ wrapper.
+// to force the disposal of the GObject (though Gtk::Object::destroy_notify_()
+// can call g_object_run_dispose()), so this is the *only* place where we delete
+// the C++ wrapper.
//
// This will only happen after the last unreference(), which will be done by
// the RefPtr<> destructor. There should be no way to access the wrapper or
-// the undobjecterlying instance after that, so it's OK to delete this.
+// the underlying object instance after that, so it's OK to delete this.
#ifdef GLIBMM_DEBUG_REFCOUNTING
g_warning("Glib::ObjectBase::destroy_notify_: gobject_ = %p", (void*)gobject_);
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* pattern.cc
*
* Copyright (C) 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
-// -*- c++ -*-
#ifndef _GLIBMM_PATTERN_H
#define _GLIBMM_PATTERN_H
-/* $Id$ */
-
/* pattern.h
*
* Copyright (C) 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
extern "C" {
-// -*- c++ -*-
#ifndef _GLIBMM_PRIORITIES_H
#define _GLIBMM_PRIORITIES_H
-/* $Id: priorities.h 420 2007-06-22 15:29:58Z murrayc $ */
-
/* Copyright (C) 2002-2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Glib
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/property.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* propertyproxy.cc
*
* Copyright 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/propertyproxy.h>
-// -*- c++ -*-
#ifndef _GLIBMM_PROPERTYPROXY_H
#define _GLIBMM_PROPERTYPROXY_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/propertyproxy_base.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-/* $Id$ */
-
/* quark.cc
*
* Copyright 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/quark.h>
-// -*- c++ -*-
#ifndef _GLIBMM_QUARK_H
#define _GLIBMM_QUARK_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* random.cc
*
* Copyright (C) 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
-// -*- c++ -*-
#ifndef _GLIBMM_RANDOM_H
#define _GLIBMM_RANDOM_H
-/* $Id$ */
-
/* random.h
*
* Copyright (C) 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib-object.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
extern "C" {
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/signalproxy_connectionnode.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <sigc++/sigc++.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
#ifndef _GLIBMM_STRINGUTILS_H
#define _GLIBMM_STRINGUTILS_H
-/* $Id$ */
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/ustring.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm.h>
-// -*- c++ -*-
#ifndef _GLIBMM_TIMER_H
#define _GLIBMM_TIMER_H
-/* $Id$ */
-
/* timer.h
*
* Copyright (C) 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
extern "C" {
-// -*- c++ -*-
-/* $Id$ */
-
/* timeval.cc
*
* Copyright (C) 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/timeval.h>
-// -*- c++ -*-
#ifndef _GLIBMM_TIMEVAL_H
#define _GLIBMM_TIMEVAL_H
-/* $Id$ */
-
/* timeval.h
*
* Copyright (C) 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
// static
ustring
-ustring::compose_argv(const Glib::ustring& fmt, int argc, const ustring* const* argv)
+ustring::compose_private(const Glib::ustring& fmt, std::initializer_list<const ustring*> const ilist)
{
std::string::size_type result_size = fmt.raw().size();
// Guesstimate the final string size.
- for (int i = 0; i < argc; ++i)
- result_size += argv[i]->raw().size();
+ for (auto const it: ilist)
+ result_size += it->raw().size();
std::string result;
result.reserve(result_size);
else
{
const int index = Ascii::digit_value(stop[1]) - 1;
+ const int size = ilist.size();
- if (index >= 0 && index < argc)
+ if (index >= 0 && index < size)
{
result.append(start, stop - start);
- result += argv[index]->raw();
+ result += (*(ilist.begin() + index))->raw();
start = stop + 2;
}
else
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
#include <glibmm/unicode.h>
#include <glib.h>
+#include <cstddef> // for std::size_t and optionally std::ptrdiff_t
+#include <initializer_list>
#include <iosfwd>
#include <iterator>
#include <sstream>
#include <string>
-#ifndef GLIBMM_HAVE_STD_ITERATOR_TRAITS
-#include <cstddef> /* for std::ptrdiff_t */
-#endif
namespace Glib
{
/* Returns fmt as is, but checks for invalid references in the format string.
* @newin{2,18}
*/
- template <class T1>
static inline ustring compose(const ustring& fmt);
/*! Substitute placeholders in a format string with the referenced arguments.
- * The template string should be in <tt>qt-format</tt>, that is
- * <tt>"%1"</tt>, <tt>"%2"</tt>, ..., <tt>"%9"</tt> are used as placeholders
- * and <tt>"%%"</tt> denotes a literal <tt>"%"</tt>. Substitutions may be
- * reordered.
+ *
+ * The template string uses a similar format to Qt’s QString class, in that
+ * <tt>%1</tt>, <tt>%2</tt>, and so on to <tt>%9</tt> are used as placeholders
+ * to be substituted with the string representation of the @a args 1–9, while
+ * <tt>%%</tt> inserts a literal <tt>%</tt> in the output. Placeholders do not
+ * have to appear in the same order as their corresponding function arguments.
+ *
* @par Example:
* @code
* using Glib::ustring;
* const int percentage = 50;
* const ustring text = ustring::compose("%1%% done", percentage);
* @endcode
- * @param fmt A template string in <tt>qt-format</tt>.
- * @param a1 The argument to substitute for <tt>"%1"</tt>.
+ *
+ * @param fmt The template string, in the format described above.
+ * @param args 1 to 9 arguments to substitute for <tt>%1</tt> to <tt>%9</tt>
+ * respectively.
+ *
* @return The substituted message string.
+ *
* @throw Glib::ConvertError
*
- * @newin{2,16}
- */
- template <class T1>
- static inline ustring compose(const ustring& fmt, const T1& a1);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
- */
- template <class T1, class T2>
- static inline ustring compose(const ustring& fmt, const T1& a1, const T2& a2);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
- */
- template <class T1, class T2, class T3>
- static inline ustring compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4>
- static inline ustring compose(
- const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4, class T5>
- static inline ustring compose(
- const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4, class T5, class T6>
- static inline ustring compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3,
- const T4& a4, const T5& a5, const T6& a6);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
- static inline ustring compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3,
- const T4& a4, const T5& a5, const T6& a6, const T7& a7);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
- static inline ustring compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3,
- const T4& a4, const T5& a5, const T6& a6, const T7& a7, const T8& a8);
-
- /* See the documentation for compose(const ustring& fmt, const T1& a1).
- * @newin{2,16}
+ * @newin{2,56}
*/
- template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8,
- class T9>
- static inline ustring compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3,
- const T4& a4, const T5& a5, const T6& a6, const T7& a7, const T8& a8, const T9& a9);
+ template <class... Ts>
+ static inline ustring compose(const ustring& fmt, const Ts&... args);
- /*! Format the argument to its string representation.
+ /*! Format the argument(s) to a string representation.
+ *
* Applies the arguments in order to an std::wostringstream and returns the
* resulting string. I/O manipulators may also be used as arguments. This
* greatly simplifies the common task of converting a number to a string, as
* demonstrated by the example below. The format() methods can also be used
* in conjunction with compose() to facilitate localization of user-visible
* messages.
+ *
* @code
* using Glib::ustring;
* double value = 22.0 / 7.0;
* ustring text = ustring::format(std::fixed, std::setprecision(2), value);
* @endcode
+ *
* @note The use of a wide character stream in the implementation of format()
* is almost completely transparent. However, one of the instances where the
* use of wide streams becomes visible is when the std::setfill() stream
* manipulator is used. In order for std::setfill() to work the argument
* must be of type <tt>wchar_t</tt>. This can be achieved by using the
* <tt>L</tt> prefix with a character literal, as shown in the example.
+ *
* @code
* using Glib::ustring;
* // Insert leading zeroes to fill in at least six digits
* ustring text = ustring::format(std::setfill(L'0'), std::setw(6), 123);
* @endcode
*
- * @param a1 A streamable value or an I/O manipulator.
- * @return The string representation of the argument stream.
- * @throw Glib::ConvertError
- *
- * @newin{2,16}
- */
- template <class T1>
- static inline ustring format(const T1& a1);
-
- /* See the documentation for format(const T1& a1).
+ * @param args One or more streamable values or I/O manipulators.
*
- * @newin{2,16}
- */
- template <class T1, class T2>
- static inline ustring format(const T1& a1, const T2& a2);
-
- /* See the documentation for format(const T1& a1).
- *
- * @newin{2,16}
- */
- template <class T1, class T2, class T3>
- static inline ustring format(const T1& a1, const T2& a2, const T3& a3);
-
- /* See the documentation for format(const T1& a1).
- *
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4>
- static inline ustring format(const T1& a1, const T2& a2, const T3& a3, const T4& a4);
-
- /* See the documentation for format(const T1& a1).
- *
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4, class T5>
- static inline ustring format(
- const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5);
-
- /* See the documentation for format(const T1& a1).
+ * @return The string representation of the argument stream.
*
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4, class T5, class T6>
- static inline ustring format(
- const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5, const T6& a6);
-
- /* See the documentation for format(const T1& a1).
+ * @throw Glib::ConvertError
*
- * @newin{2,16}
+ * @newin{2,56}
*/
- template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
- static inline ustring format(const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5,
- const T6& a6, const T7& a7);
+ template <class... Ts>
+ static inline ustring format(const Ts&... args);
- /* See the documentation for format(const T1& a1).
- *
- * @newin{2,16}
- */
- template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
- static inline ustring format(const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5,
- const T6& a6, const T7& a7, const T8& a8);
//! @}
private:
template <class T>
class Stringify;
+
+ static ustring compose_private(const ustring& fmt, std::initializer_list<const ustring*> ilist);
+
class FormatStream;
- static ustring compose_argv(const ustring& fmt, int argc, const ustring* const* argv);
+ template<class T>
+ static inline void format_private(FormatStream& buf, const T& arg);
+
+ template<class T1, class... Ts>
+ static inline void format_private(FormatStream& buf, const T1& a1, const Ts&... args);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
return string_;
}
-template <class T1>
-inline // static
- ustring
- ustring::format(const T1& a1)
-{
- ustring::FormatStream buf;
- buf.stream(a1);
- return buf.to_string();
-}
-
-template <class T1, class T2>
-inline // static
- ustring
- ustring::format(const T1& a1, const T2& a2)
-{
- ustring::FormatStream buf;
- buf.stream(a1);
- buf.stream(a2);
- return buf.to_string();
-}
-
-template <class T1, class T2, class T3>
-inline // static
- ustring
- ustring::format(const T1& a1, const T2& a2, const T3& a3)
-{
- ustring::FormatStream buf;
- buf.stream(a1);
- buf.stream(a2);
- buf.stream(a3);
- return buf.to_string();
-}
-
-template <class T1, class T2, class T3, class T4>
-inline // static
- ustring
- ustring::format(const T1& a1, const T2& a2, const T3& a3, const T4& a4)
-{
- ustring::FormatStream buf;
- buf.stream(a1);
- buf.stream(a2);
- buf.stream(a3);
- buf.stream(a4);
- return buf.to_string();
-}
-
-template <class T1, class T2, class T3, class T4, class T5>
-inline // static
- ustring
- ustring::format(const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5)
-{
- ustring::FormatStream buf;
- buf.stream(a1);
- buf.stream(a2);
- buf.stream(a3);
- buf.stream(a4);
- buf.stream(a5);
- return buf.to_string();
-}
-
-template <class T1, class T2, class T3, class T4, class T5, class T6>
+template <class T>
inline // static
- ustring
- ustring::format(
- const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5, const T6& a6)
+ void
+ ustring::format_private(FormatStream& buf, const T& arg)
{
- ustring::FormatStream buf;
- buf.stream(a1);
- buf.stream(a2);
- buf.stream(a3);
- buf.stream(a4);
- buf.stream(a5);
- buf.stream(a6);
- return buf.to_string();
+ buf.stream(arg);
}
-template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+template <class T1, class... Ts>
inline // static
- ustring
- ustring::format(const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5,
- const T6& a6, const T7& a7)
+ void
+ ustring::format_private(FormatStream& buf, const T1& a1, const Ts&... args)
{
- ustring::FormatStream buf;
buf.stream(a1);
- buf.stream(a2);
- buf.stream(a3);
- buf.stream(a4);
- buf.stream(a5);
- buf.stream(a6);
- buf.stream(a7);
- return buf.to_string();
+ return format_private(buf, args...);
}
-template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+template <class... Ts>
inline // static
ustring
- ustring::format(const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5,
- const T6& a6, const T7& a7, const T8& a8)
+ ustring::format(const Ts&... args)
{
ustring::FormatStream buf;
- buf.stream(a1);
- buf.stream(a2);
- buf.stream(a3);
- buf.stream(a4);
- buf.stream(a5);
- buf.stream(a6);
- buf.stream(a7);
- buf.stream(a8);
+ format_private(buf, args...);
return buf.to_string();
}
inline const ustring* ptr() const { return &string_; }
};
-template <class T1>
inline // static
ustring
ustring::compose(const ustring& fmt)
{
- return ustring::compose_argv(fmt, 0, nullptr);
-}
-
-template <class T1>
-inline // static
- ustring
- ustring::compose(const ustring& fmt, const T1& a1)
-{
- const ustring::Stringify<T1> s1(a1);
-
- const ustring* const argv[] = { s1.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
-}
-
-template <class T1, class T2>
-inline // static
- ustring
- ustring::compose(const ustring& fmt, const T1& a1, const T2& a2)
-{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
-
- const ustring* const argv[] = { s1.ptr(), s2.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
-}
-
-template <class T1, class T2, class T3>
-inline // static
- ustring
- ustring::compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3)
-{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
- const ustring::Stringify<T3> s3(a3);
-
- const ustring* const argv[] = { s1.ptr(), s2.ptr(), s3.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
+ return ustring::compose_private(fmt, {});
}
-template <class T1, class T2, class T3, class T4>
+template <class... Ts>
inline // static
ustring
- ustring::compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4)
+ ustring::compose(const ustring& fmt, const Ts&... args)
{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
- const ustring::Stringify<T3> s3(a3);
- const ustring::Stringify<T4> s4(a4);
+ static_assert(sizeof...(Ts) <= 9,
+ "ustring::compose only supports up to 9 placeholders.");
- const ustring* const argv[] = { s1.ptr(), s2.ptr(), s3.ptr(), s4.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
-}
-
-template <class T1, class T2, class T3, class T4, class T5>
-inline // static
- ustring
- ustring::compose(
- const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5)
-{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
- const ustring::Stringify<T3> s3(a3);
- const ustring::Stringify<T4> s4(a4);
- const ustring::Stringify<T5> s5(a5);
-
- const ustring* const argv[] = { s1.ptr(), s2.ptr(), s3.ptr(), s4.ptr(), s5.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
-}
-
-template <class T1, class T2, class T3, class T4, class T5, class T6>
-inline // static
- ustring
- ustring::compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4,
- const T5& a5, const T6& a6)
-{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
- const ustring::Stringify<T3> s3(a3);
- const ustring::Stringify<T4> s4(a4);
- const ustring::Stringify<T5> s5(a5);
- const ustring::Stringify<T6> s6(a6);
-
- const ustring* const argv[] = { s1.ptr(), s2.ptr(), s3.ptr(), s4.ptr(), s5.ptr(), s6.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
-}
-
-template <class T1, class T2, class T3, class T4, class T5, class T6, class T7>
-inline // static
- ustring
- ustring::compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4,
- const T5& a5, const T6& a6, const T7& a7)
-{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
- const ustring::Stringify<T3> s3(a3);
- const ustring::Stringify<T4> s4(a4);
- const ustring::Stringify<T5> s5(a5);
- const ustring::Stringify<T6> s6(a6);
- const ustring::Stringify<T7> s7(a7);
-
- const ustring* const argv[] = { s1.ptr(), s2.ptr(), s3.ptr(), s4.ptr(), s5.ptr(), s6.ptr(),
- s7.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
-}
-
-template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
-inline // static
- ustring
- ustring::compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4,
- const T5& a5, const T6& a6, const T7& a7, const T8& a8)
-{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
- const ustring::Stringify<T3> s3(a3);
- const ustring::Stringify<T4> s4(a4);
- const ustring::Stringify<T5> s5(a5);
- const ustring::Stringify<T6> s6(a6);
- const ustring::Stringify<T7> s7(a7);
- const ustring::Stringify<T8> s8(a8);
-
- const ustring* const argv[] = { s1.ptr(), s2.ptr(), s3.ptr(), s4.ptr(), s5.ptr(), s6.ptr(),
- s7.ptr(), s8.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
-}
-
-template <class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
-inline // static
- ustring
- ustring::compose(const ustring& fmt, const T1& a1, const T2& a2, const T3& a3, const T4& a4,
- const T5& a5, const T6& a6, const T7& a7, const T8& a8, const T9& a9)
-{
- const ustring::Stringify<T1> s1(a1);
- const ustring::Stringify<T2> s2(a2);
- const ustring::Stringify<T3> s3(a3);
- const ustring::Stringify<T4> s4(a4);
- const ustring::Stringify<T5> s5(a5);
- const ustring::Stringify<T6> s6(a6);
- const ustring::Stringify<T7> s7(a7);
- const ustring::Stringify<T8> s8(a8);
- const ustring::Stringify<T9> s9(a9);
-
- const ustring* const argv[] = { s1.ptr(), s2.ptr(), s3.ptr(), s4.ptr(), s5.ptr(), s6.ptr(),
- s7.ptr(), s8.ptr(), s9.ptr() };
- return ustring::compose_argv(fmt, G_N_ELEMENTS(argv), argv);
+ return compose_private(fmt, { Stringify<Ts>(args).ptr()... });
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
-// -*- c++ -*-
-
-/* $Id$ */
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* Copyright 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/value.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* Copyright 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/value.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GLIBMM_VALUE_CUSTOM_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/vectorutils.h>
-// -*- c++ -*-
#ifndef _GLIBMM_VECTORUTILS_H
#define _GLIBMM_VECTORUTILS_H
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <vector>
#include <glibmmconfig.h>
-// -*- c++ -*-
-/* $Id$ */
-
/* wrap.cc
*
* Copyright (C) 1998-2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmmconfig.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib-object.h>
-// -*- c++ -*-
#ifndef _GLIBMM_WRAP_INIT_H
#define _GLIBMM_WRAP_INIT_H
-/* $Id$ */
-
/* wrap_init.h
*
* Copyright 2002 The gtkmm Development Team
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/error.h>
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Glib
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
-// -*- c++ -*-
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <glib/gtestutils.h> //For g_assert() in glib >= 2.15.0
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <glib/gtestutils.h> //For g_assert() in glib >= 2.15.0
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
<parameter_description> Use the SHA-256 hashing algorithm
</parameter_description>
</parameter>
+<parameter name="G_CHECKSUM_SHA384">
+<parameter_description> Use the SHA-384 hashing algorithm (Since: 2.51)
+</parameter_description>
+</parameter>
<parameter name="G_CHECKSUM_SHA512">
<parameter_description> Use the SHA-512 hashing algorithm (Since: 2.36)
</parameter_description>
Network and storage sizes should be reported in the normal SI units.
</parameter_description>
</parameter>
+<parameter name="G_FORMAT_SIZE_BITS">
+<parameter_description> set the size as a quantity in bits, rather than
+bytes, and return units in bits. For example, ‘Mb’ rather than ‘MB’.
+</parameter_description>
+</parameter>
</parameters>
</enum>
</parameters>
</enum>
+<enum name="GNumberParserError">
+<description>
+Error codes returned by functions converting a string to a number.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="G_NUMBER_PARSER_ERROR_INVALID">
+<parameter_description> String was not a valid number.
+</parameter_description>
+</parameter>
+<parameter name="G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS">
+<parameter_description> String was a number, but out of bounds.
+</parameter_description>
+</parameter>
+</parameters>
+</enum>
+
<signal name="GObject::notify">
<description>
The notify signal is emitted on an object when one of its
</parameter_description>
</parameter>
<parameter name="G_REGEX_DOTALL">
-<parameter_description> A dot metacharater (".") in the pattern matches all
+<parameter_description> A dot metacharacter (".") in the pattern matches all
characters, including newlines. Without it, newlines are excluded.
This option can be changed within a pattern by a ("?s") option setting.
</parameter_description>
it is constrained to match only at the first matching point in the
string that is being searched. This effect can also be achieved by
appropriate constructs in the pattern itself such as the "^"
-metacharater.
+metacharacter.
</parameter_description>
</parameter>
<parameter name="G_REGEX_DOLLAR_ENDONLY">
it is constrained to match only at the first matching point in the
string that is being searched. This effect can also be achieved by
appropriate constructs in the pattern itself such as the "^"
-metacharater.
+metacharacter.
</parameter_description>
</parameter>
<parameter name="G_REGEX_MATCH_NOTBOL">
'built' terminology that automake uses and are explicitly used to
distinguish between the 'srcdir' and 'builddir' being separate. All
files in your project should either be dist (in the
-`DIST_EXTRA` or `dist_schema_DATA`
+`EXTRA_DIST` or `dist_schema_DATA`
sense, in which case they will always be in the srcdir) or built (in
the `BUILT_SOURCES` sense, in which case they will
always be in the builddir).
Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(),
which is deprecated. g_test_trap_subprocess() uses
-#GTestTrapSubprocessFlags.
+#GTestSubprocessFlags.
</description>
<parameters>
Since new unicode versions may add new types here, applications should be ready
to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
-See <ulink url="http://www.unicode.org/unicode/reports/tr14/">http://www.unicode.org/unicode/reports/tr14/</ulink>.
+See [Unicode Line Breaking Algorithm](http://www.unicode.org/unicode/reports/tr14/).
</description>
<parameters>
<parameter_description> Regional Indicator (RI). Since: 2.36
</parameter_description>
</parameter>
+<parameter name="G_UNICODE_BREAK_EMOJI_BASE">
+<parameter_description> Emoji Base (EB). Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_BREAK_EMOJI_MODIFIER">
+<parameter_description> Emoji Modifier (EM). Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_BREAK_ZERO_WIDTH_JOINER">
+<parameter_description> Zero Width Joiner (ZWJ). Since: 2.50
+</parameter_description>
+</parameter>
</parameters>
</enum>
Note that new types may be added in the future. Applications
should be ready to handle unknown values.
-See <ulink
-url="http://www.unicode.org/reports/tr24/">Unicode Standard Annex
-#24: Script names</ulink>.
+See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/).
</description>
<parameters>
<parameter_description> Signwriting. Since: 2.48
</parameter_description>
</parameter>
+<parameter name="G_UNICODE_SCRIPT_ADLAM">
+<parameter_description> Adlam. Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_BHAIKSUKI">
+<parameter_description> Bhaiksuki. Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_MARCHEN">
+<parameter_description> Marchen. Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_NEWA">
+<parameter_description> Newa. Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_OSAGE">
+<parameter_description> Osage. Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_TANGUT">
+<parameter_description> Tangut. Since: 2.50
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_MASARAM_GONDI">
+<parameter_description> Masaram Gondi. Since: 2.54
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_NUSHU">
+<parameter_description> Nushu. Since: 2.54
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_SOYOMBO">
+<parameter_description> Soyombo. Since: 2.54
+</parameter_description>
+</parameter>
+<parameter name="G_UNICODE_SCRIPT_ZANABAZAR_SQUARE">
+<parameter_description> Zanabazar Square. Since: 2.54
+</parameter_description>
+</parameter>
</parameters>
</enum>
<description>
These are the possible character classifications from the
Unicode specification.
-See <ulink url="http://www.unicode.org/reports/tr44/#General_Category_Values">Unicode Character Database</unlink>.
+See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values).
</description>
<parameters>
If array elements contain dynamically-allocated memory, they should
be freed separately.
+This function is not thread-safe. If using a #GArray from multiple
+threads, use only the atomic g_array_ref() and g_array_unref()
+functions.
+
</description>
<parameters>
<function name="g_array_ref">
<description>
Atomically increments the reference count of @array by one.
-This function is MT-safe and may be called from any thread.
+This function is thread-safe and may be called from any thread.
Since: 2.22
<description>
Atomically decrements the reference count of @array by one. If the
reference count drops to 0, all memory allocated by the array is
-released. This function is MT-safe and may be called from any
+released. This function is thread-safe and may be called from any
thread.
Since: 2.22
</return>
</function>
+<function name="g_ascii_string_to_signed">
+<description>
+A convenience function for converting a string to a signed number.
+
+This function assumes that @str contains only a number of the given
+@base that is within inclusive bounds limited by @min and @max. If
+this is true, then the converted number is stored in @out_num. An
+empty string is not a valid input. A string with leading or
+trailing whitespace is also an invalid input.
+
+@base can be between 2 and 36 inclusive. Hexadecimal numbers must
+not be prefixed with "0x" or "0X". Such a problem does not exist
+for octal numbers, since they were usually prefixed with a zero
+which does not change the value of the parsed number.
+
+Parsing failures result in an error with the %G_NUMBER_PARSER_ERROR
+domain. If the input is invalid, the error code will be
+%G_NUMBER_PARSER_ERROR_INVALID. If the parsed number is out of
+bounds - %G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS.
+
+See g_ascii_strtoll() if you have more complex needs such as
+parsing a string which starts with a number, but then has other
+characters.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="str">
+<parameter_description> a string
+</parameter_description>
+</parameter>
+<parameter name="base">
+<parameter_description> base of a parsed number
+</parameter_description>
+</parameter>
+<parameter name="min">
+<parameter_description> a lower bound (inclusive)
+</parameter_description>
+</parameter>
+<parameter name="max">
+<parameter_description> an upper bound (inclusive)
+</parameter_description>
+</parameter>
+<parameter name="out_num">
+<parameter_description> a return location for a number
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> a return location for #GError
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @str was a number, otherwise %FALSE.
+
+</return>
+</function>
+
+<function name="g_ascii_string_to_unsigned">
+<description>
+A convenience function for converting a string to an unsigned number.
+
+This function assumes that @str contains only a number of the given
+@base that is within inclusive bounds limited by @min and @max. If
+this is true, then the converted number is stored in @out_num. An
+empty string is not a valid input. A string with leading or
+trailing whitespace is also an invalid input.
+
+@base can be between 2 and 36 inclusive. Hexadecimal numbers must
+not be prefixed with "0x" or "0X". Such a problem does not exist
+for octal numbers, since they were usually prefixed with a zero
+which does not change the value of the parsed number.
+
+Parsing failures result in an error with the %G_NUMBER_PARSER_ERROR
+domain. If the input is invalid, the error code will be
+%G_NUMBER_PARSER_ERROR_INVALID. If the parsed number is out of
+bounds - %G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS.
+
+See g_ascii_strtoull() if you have more complex needs such as
+parsing a string which starts with a number, but then has other
+characters.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="str">
+<parameter_description> a string
+</parameter_description>
+</parameter>
+<parameter name="base">
+<parameter_description> base of a parsed number
+</parameter_description>
+</parameter>
+<parameter name="min">
+<parameter_description> a lower bound (inclusive)
+</parameter_description>
+</parameter>
+<parameter name="max">
+<parameter_description> an upper bound (inclusive)
+</parameter_description>
+</parameter>
+<parameter name="out_num">
+<parameter_description> a return location for a number
+</parameter_description>
+</parameter>
+<parameter name="error">
+<parameter_description> a return location for #GError
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @str was a number, otherwise %FALSE.
+
+</return>
+</function>
+
<function name="g_ascii_strncasecmp">
<description>
Compare @s1 and @s2, ignoring the case of ASCII characters and any
an error message is logged and the application is terminated.
The macro can be turned off in final releases of code by defining
-`G_DISABLE_ASSERT` when compiling the application.
+`G_DISABLE_ASSERT` when compiling the application, so code must
+not depend on any side effects from @expr.
</description>
<parameters>
be written to it. It will need up to 4 bytes, or up to 5 bytes if
line-breaking is enabled.
+The @out array will not be automatically nul-terminated.
+
Since: 2.12
</description>
</return>
</function>
+<function name="g_build_filename_valist">
+<description>
+Behaves exactly like g_build_filename(), but takes the path elements
+as a va_list. This function is mainly meant for language bindings.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="first_element">
+<parameter_description> the first element in the path
+</parameter_description>
+</parameter>
+<parameter name="args">
+<parameter_description> va_list of remaining elements in path
+</parameter_description>
+</parameter>
+</parameters>
+<return> a newly-allocated string that must be freed
+with g_free().
+
+</return>
+</function>
+
<function name="g_build_filenamev">
<description>
Behaves exactly like g_build_filename(), but takes the path elements
<parameters>
<parameter name="data">
<parameter_description>
- the data to be used for the bytes
+the data to be used for the bytes
</parameter_description>
</parameter>
<parameter name="size">
<parameters>
<parameter name="data">
<parameter_description>
- the data to be used for the bytes
+the data to be used for the bytes
</parameter_description>
</parameter>
<parameter name="size">
<parameters>
<parameter name="data">
<parameter_description>
- the data to be used for the bytes
+the data to be used for the bytes
</parameter_description>
</parameter>
<parameter name="size">
<function name="g_bytes_unref">
<description>
Releases a reference on @bytes. This may result in the bytes being
-freed.
+freed. If @bytes is %NULL, it will return immediately.
Since: 2.32
</parameter_description>
</parameter>
</parameters>
-<return> a new #GCClosure
+<return> a floating reference to a new #GCClosure
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> a new #GCClosure
+<return> a floating reference to a new #GCClosure
</return>
</function>
g_spawn_close_pid() in the callback function for the source.
GLib supports only a single callback per process id.
+On POSIX platforms, the same restrictions mentioned for
+g_child_watch_source_new() apply to this function.
This internally creates a main loop source using
g_child_watch_source_new() and attaches it to the main loop context
in the callback function for the source.
GLib supports only a single callback per process id.
+On POSIX platforms, the same restrictions mentioned for
+g_child_watch_source_new() apply to this function.
This internally creates a main loop source using
g_child_watch_source_new() and attaches it to the main loop context
source is still active. Typically, you will want to call
g_spawn_close_pid() in the callback function for the source.
-Note further that using g_child_watch_source_new() is not
-compatible with calling `waitpid` with a nonpositive first
-argument in the application. Calling waitpid() for individual
-pids will still work fine.
+On POSIX platforms, the following restrictions apply to this API
+due to limitations in POSIX process interfaces:
+
+* @pid must be a child of this process
+* @pid must be positive
+* the application must not call `waitpid` with a non-positive
+first argument, for instance in another thread
+* the application must not wait for @pid to exit by any other
+mechanism, including `waitpid(pid, ...)` or a second child-watch
+source for the same @pid
+* the application must not ignore SIGCHILD
+
+If any of those conditions are not met, this and related APIs will
+not work correctly. This can often be diagnosed via a GLib warning
+stating that `ECHILD` was received by `waitpid`.
-Similarly, on POSIX platforms, the @pid passed to this function must
-be greater than 0 (i.e. this function must wait for a specific child,
-and cannot wait for one of many children by using a nonpositive argument).
+Calling `waitpid` for specific processes other than @pid remains a
+valid thing to do.
Since: 2.4
<return></return>
</function>
+<function name="g_clear_handle_id">
+<description>
+Clears a numeric handler, such as a #GSource ID.
+
+@tag_ptr must be a valid pointer to the variable holding the handler.
+
+If the ID is zero then this function does nothing.
+Otherwise, clear_func() is called with the ID as a parameter, and the tag is
+set to zero.
+
+A macro is also included that allows this function to be used without
+pointer casts.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="tag_ptr">
+<parameter_description> a pointer to the handler ID
+</parameter_description>
+</parameter>
+<parameter name="clear_func">
+<parameter_description> the function to call to clear the handler
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="g_clear_object">
<description>
Clears a reference to a #GObject.
</parameter_description>
</parameter>
</parameters>
-<return> a newly allocated #GClosure
+<return> a floating reference to a new #GClosure
</return>
</function>
<parameter_description> UTF-8 string to use in place of character not
present in the target encoding. (The string must be
representable in the target encoding).
- If %NULL, characters not in the target encoding will
- be represented as Unicode escapes \uxxxx or \Uxxxxyyyy.
+If %NULL, characters not in the target encoding will
+be represented as Unicode escapes \uxxxx or \Uxxxxyyyy.
</parameter_description>
</parameter>
<parameter name="bytes_read">
You can also make critical warnings fatal at runtime by
setting the `G_DEBUG` environment variable (see
-[Running GLib Applications](glib-running.html)).
+[Running GLib Applications](glib-running.html)):
+
+|[
+G_DEBUG=fatal-warnings gdb ./my-program
+]|
+
+Any unrelated failures can be skipped over in
+[gdb](https://www.gnu.org/software/gdb/) using the `continue` command.
+
+The message should typically *not* be translated to the
+user's language.
If g_log_default_handler() is used as the log handler function, a new-line
character will automatically be appended to @..., and need not be entered
from any modifications during invocation of this function, it should
not be called.
+@func can make changes to @datalist, but the iteration will not
+reflect changes made during the g_datalist_foreach() call, other
+than skipping over elements that are removed.
+
</description>
<parameters>
<parameter name="datalist">
</parameter_description>
</parameter>
</parameters>
-<return> the data element, or %NULL if it is not found.
+<return> the data element, or %NULL if it
+is not found.
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the data element, or %NULL if it is not found.
+<return> the data element, or %NULL if
+it is not found.
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the data previously stored at @key_id, or %NULL if none.
+<return> the data previously stored at @key_id,
+or %NULL if none.
</return>
</function>
</parameter_description>
</parameter>
<parameter name="f">
-<parameter_description> the function to call when the data element is removed. This
-function will be called with the data element and can be used to
+<parameter_description> the function to call when the data element is removed.
+This function will be called with the data element and can be used to
free any memory allocated for it. If @d is %NULL, then @f must
also be %NULL.
</parameter_description>
<description>
Calls the given function for each data element which is associated
with the given location. Note that this function is NOT thread-safe.
-So unless @datalist can be protected from any modifications during
-invocation of this function, it should not be called.
+So unless @dataset_location can be protected from any modifications
+during invocation of this function, it should not be called.
+
+@func can make changes to the dataset, but the iteration will not
+reflect changes made during the g_dataset_foreach() call, other
+than skipping over elements that are removed.
</description>
<parameters>
</parameter_description>
</parameter>
</parameters>
-<return> the data element corresponding to the string, or %NULL if
-it is not found.
+<return> the data element corresponding to
+the string, or %NULL if it is not found.
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the data element corresponding to the #GQuark, or %NULL if
-it is not found.
+<return> the data element corresponding to
+the #GQuark, or %NULL if it is not found.
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the data previously stored at @key_id, or %NULL if none.
+<return> the data previously stored at @key_id,
+or %NULL if none.
</return>
</function>
</return>
</function>
+<function name="g_date_copy">
+<description>
+Copies a GDate to a newly-allocated GDate. If the input was invalid
+(as determined by g_date_valid()), the invalid state will be copied
+as is into the new object.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="date">
+<parameter_description> a #GDate to copy
+</parameter_description>
+</parameter>
+</parameters>
+<return> a newly-allocated #GDate initialized from @date
+
+</return>
+</function>
+
<function name="g_date_days_between">
<description>
Computes the number of days between two dates.
</parameter>
</parameters>
<return> a newly allocated string formatted to the requested format
-or %NULL in the case that there was an error. The string
+or %NULL in the case that there was an error (such as a format specifier
+not being supported in the current locale). The string
should be freed with g_free().
</return>
</return>
</function>
+<function name="g_date_time_new_from_iso8601">
+<description>
+Creates a #GDateTime corresponding to the given
+[ISO 8601 formatted string](https://en.wikipedia.org/wiki/ISO_8601)
+@text. ISO 8601 strings of the form <date><sep><time><tz> are supported.
+
+<sep> is the separator and can be either 'T', 't' or ' '.
+
+<date> is in the form:
+
+- `YYYY-MM-DD` - Year/month/day, e.g. 2016-08-24.
+- `YYYYMMDD` - Same as above without dividers.
+- `YYYY-DDD` - Ordinal day where DDD is from 001 to 366, e.g. 2016-237.
+- `YYYYDDD` - Same as above without dividers.
+- `YYYY-Www-D` - Week day where ww is from 01 to 52 and D from 1-7,
+e.g. 2016-W34-3.
+- `YYYYWwwD` - Same as above without dividers.
+
+<time> is in the form:
+
+- `hh:mm:ss(.sss)` - Hours, minutes, seconds (subseconds), e.g. 22:10:42.123.
+- `hhmmss(.sss)` - Same as above without dividers.
+
+<tz> is an optional timezone suffix of the form:
+
+- `Z` - UTC.
+- `+hh:mm` or `-hh:mm` - Offset from UTC in hours and minutes, e.g. +12:00.
+- `+hh` or `-hh` - Offset from UTC in hours, e.g. +12.
+
+If the timezone is not provided in @text it must be provided in @default_tz
+(this field is otherwise ignored).
+
+This call can fail (returning %NULL) if @text is not a valid ISO 8601
+formatted string.
+
+You should release the return value by calling g_date_time_unref()
+when you are done with it.
+
+Since: 2.56
+
+</description>
+<parameters>
+<parameter name="text">
+<parameter_description> an ISO 8601 formatted time string.
+</parameter_description>
+</parameter>
+<parameter name="default_tz">
+<parameter_description> a #GTimeZone to use if the text doesn't contain a
+timezone, or %NULL.
+</parameter_description>
+</parameter>
+</parameters>
+<return> a new #GDateTime, or %NULL
+
+</return>
+</function>
+
<function name="g_date_time_new_from_timeval_local">
<description>
Creates a #GDateTime corresponding to the given #GTimeVal @tv in the
<function name="g_debug">
<description>
-A convenience function/macro to log a debug message.
+A convenience function/macro to log a debug message. The message should
+typically *not* be translated to the user's language.
If g_log_default_handler() is used as the log handler function, a new-line
character will automatically be appended to @..., and need not be entered
</return>
</function>
+<function name="g_enum_to_string">
+<description>
+Pretty-prints @value in the form of the enum’s name.
+
+This is intended to be used for debugging purposes. The format of the output
+may change in the future.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="g_enum_type">
+<parameter_description> the type identifier of a #GEnumClass type
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> the value
+</parameter_description>
+</parameter>
+</parameters>
+<return> a newly-allocated text string
+
+</return>
+</function>
+
<function name="g_environ_getenv">
<description>
Returns the value of the environment variable @variable in the
</description>
<parameters>
<parameter name="envp">
-<parameter_description> an environment
-list (eg, as returned from g_get_environ()), or %NULL
+<parameter_description>
+an environment list (eg, as returned from g_get_environ()), or %NULL
for an empty environment list
</parameter_description>
</parameter>
</description>
<parameters>
<parameter name="envp">
-<parameter_description> an
-environment list that can be freed using g_strfreev() (e.g., as
+<parameter_description>
+an environment list that can be freed using g_strfreev() (e.g., as
returned from g_get_environ()), or %NULL for an empty
environment list
</parameter_description>
</parameter>
<parameter name="variable">
-<parameter_description> the environment variable to set, must not contain '='
+<parameter_description> the environment variable to set, must not
+contain '='
</parameter_description>
</parameter>
<parameter name="value">
</parameter_description>
</parameter>
</parameters>
-<return> the
-updated environment list. Free it using g_strfreev().
+<return>
+the updated environment list. Free it using g_strfreev().
</return>
</function>
</description>
<parameters>
<parameter name="envp">
-<parameter_description> an environment
-list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()),
-or %NULL for an empty environment list
+<parameter_description>
+an environment list that can be freed using g_strfreev() (e.g., as
+returned from g_get_environ()), or %NULL for an empty environment list
</parameter_description>
</parameter>
<parameter name="variable">
-<parameter_description> the environment variable to remove, must not contain '='
+<parameter_description> the environment variable to remove, must not
+contain '='
</parameter_description>
</parameter>
</parameters>
-<return> the
-updated environment list. Free it using g_strfreev().
+<return>
+the updated environment list. Free it using g_strfreev().
</return>
</function>
<function name="g_error">
<description>
-A convenience function/macro to log an error message.
+A convenience function/macro to log an error message. The message should
+typically *not* be translated to the user's language.
This is not intended for end user error reporting. Use of #GError is
preferred for that instead, as it allows calling functions to perform actions
</parameter_description>
</parameter>
<parameter name="hostname">
-<parameter_description> Location to store hostname for the
-URI.
+<parameter_description> Location to store hostname for the URI.
If there is no hostname in the URI, %NULL will be
stored in this location.
</parameter_description>
</return>
</function>
+<function name="g_flags_to_string">
+<description>
+Pretty-prints @value in the form of the flag names separated by ` | ` and
+sorted. Any extra bits will be shown at the end as a hexadecimal number.
+
+This is intended to be used for debugging purposes. The format of the output
+may change in the future.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="flags_type">
+<parameter_description> the type identifier of a #GFlagsClass type
+</parameter_description>
+</parameter>
+<parameter name="value">
+<parameter_description> the value
+</parameter_description>
+</parameter>
+</parameters>
+<return> a newly-allocated text string
+
+</return>
+</function>
+
<function name="g_fopen">
<description>
A wrapper for the stdio fopen() function. The fopen() function
An implementation of the standard fprintf() function which supports
positional parameters, as specified in the Single Unix Specification.
+`glib/gprintf.h` must be explicitly included in order to use this function.
+
Since: 2.2
</description>
</description>
<parameters>
</parameters>
-<return> the list of
-environment variables
+<return>
+the list of environment variables
</return>
</function>
name can be determined, a default fixed string "localhost" is
returned.
+The encoding of the returned string is UTF-8.
+
Since: 2.8
</description>
Gets the name of the program. This name should not be localized,
in contrast to g_get_application_name().
-If you are using GDK or GTK+ the program name is set in gdk_init(),
-which is called by gtk_init(). The program name is found by taking
-the last component of @argv[0].
+If you are using #GApplication the program name is set in
+g_application_run(). In case of GDK or GTK+ it is set in
+gdk_init(), which is called by gtk_init() and the
+#GtkApplication::startup handler. The program name is found by
+taking the last component of @argv[0].
</description>
[XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec).
In this case the list of directories retrieved will be `XDG_CONFIG_DIRS`.
-On Windows is the directory that contains application data for all users.
-A typical path is C:\Documents and Settings\All Users\Application Data.
-This folder is used for application data that is not user specific.
-For example, an application can store a spell-check dictionary, a database
-of clip art, or a log file in the CSIDL_COMMON_APPDATA folder.
-This information will not roam and is available to anyone using the computer.
+On Windows it follows XDG Base Directory Specification if `XDG_CONFIG_DIRS` is defined.
+If `XDG_CONFIG_DIRS` is undefined, the directory that contains application
+data for all users is used instead. A typical path is
+`C:\Documents and Settings\All Users\Application Data`.
+This folder is used for application data
+that is not user specific. For example, an application can store
+a spell-check dictionary, a database of clip art, or a log file in the
+CSIDL_COMMON_APPDATA folder. This information will not roam and is available
+to anyone using the computer.
Since: 2.6
On UNIX platforms this is determined using the mechanisms described
in the
[XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec)
-In this case the list of directories retrieved will be XDG_DATA_DIRS.
+In this case the list of directories retrieved will be `XDG_DATA_DIRS`.
-On Windows the first elements in the list are the Application Data
+On Windows it follows XDG Base Directory Specification if `XDG_DATA_DIRS` is defined.
+If `XDG_DATA_DIRS` is undefined,
+the first elements in the list are the Application Data
and Documents folders for All Users. (These can be determined only
on Windows 2000 or later and are not present in the list on other
Windows versions.) See documentation for CSIDL_COMMON_APPDATA and
On UNIX platforms this is determined using the mechanisms described
in the
[XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec).
-In this case the directory retrieved will be XDG_CACHE_HOME.
+In this case the directory retrieved will be `XDG_CACHE_HOME`.
-On Windows is the directory that serves as a common repository for
-temporary Internet files. A typical path is
-C:\Documents and Settings\username\Local Settings\Temporary Internet Files.
-See documentation for CSIDL_INTERNET_CACHE.
+On Windows it follows XDG Base Directory Specification if `XDG_CACHE_HOME` is defined.
+If `XDG_CACHE_HOME` is undefined, the directory that serves as a common
+repository for temporary Internet files is used instead. A typical path is
+`C:\Documents and Settings\username\Local Settings\Temporary Internet Files`.
+See the [documentation for `CSIDL_INTERNET_CACHE`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_internet_cache).
Since: 2.6
[XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec).
In this case the directory retrieved will be `XDG_CONFIG_HOME`.
-On Windows this is the folder to use for local (as opposed to
-roaming) application data. See documentation for
-CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as
-what g_get_user_data_dir() returns.
+On Windows it follows XDG Base Directory Specification if `XDG_CONFIG_HOME` is defined.
+If `XDG_CONFIG_HOME` is undefined, the folder to use for local (as opposed
+to roaming) application data is used instead. See the
+[documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata).
+Note that in this case on Windows it will be the same
+as what g_get_user_data_dir() returns.
Since: 2.6
[XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec).
In this case the directory retrieved will be `XDG_DATA_HOME`.
-On Windows this is the folder to use for local (as opposed to
-roaming) application data. See documentation for
-CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as
-what g_get_user_config_dir() returns.
+On Windows it follows XDG Base Directory Specification if `XDG_DATA_HOME`
+is defined. If `XDG_DATA_HOME` is undefined, the folder to use for local (as
+opposed to roaming) application data is used instead. See the
+[documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata).
+Note that in this case on Windows it will be the same
+as what g_get_user_config_dir() returns.
Since: 2.6
Returns a directory that is unique to the current user on the local
system.
-On UNIX platforms this is determined using the mechanisms described
+This is determined using the mechanisms described
in the
[XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec).
This is the directory
In the case that this variable is not set, we return the value of
g_get_user_cache_dir(), after verifying that it exists.
-On Windows this is the folder to use for local (as opposed to
-roaming) application data. See documentation for
-CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as
-what g_get_user_config_dir() returns.
-
Since: 2.28
</description>
and g_str_equal() functions are provided for the most common types
of keys. If @key_equal_func is %NULL, keys are compared directly in
a similar fashion to g_direct_equal(), but without the overhead of
-a function call.
+a function call. @key_equal_func is called with the key from the hash table
+as its first parameter, and the user-provided key to check against as
+its second.
</description>
recursively remove further items from the hash table. This is only
permissible if the application still holds a reference to the hash table.
This means that you may need to ensure that the hash table is empty by
-calling g_hash_table_remove_all before releasing the last reference using
+calling g_hash_table_remove_all() before releasing the last reference using
g_hash_table_unref().
on it anymore.
Support for digests of type %G_CHECKSUM_SHA512 has been added in GLib 2.42.
+Support for %G_CHECKSUM_SHA384 was added in GLib 2.52.
Since: 2.30
</parameter_description>
</parameter>
</parameters>
-<return> Whether the channel will be closed on the final unref of
-the GIOChannel data structure.
+<return> %TRUE if the channel will be closed, %FALSE otherwise.
</return>
</function>
<function name="g_io_channel_set_close_on_unref">
<description>
+Whether to close the channel on the final unref of the #GIOChannel
+data structure. The default value of this is %TRUE for channels
+created by g_io_channel_new_file (), and %FALSE for all other channels.
+
Setting this flag to %TRUE for a channel you have already closed
-can cause problems.
+can cause problems when the final reference to the #GIOChannel is dropped.
</description>
<parameters>
</parameter>
<parameter name="do_close">
<parameter_description> Whether to close the channel on the final unref of
-the GIOChannel data structure. The default value of
-this is %TRUE for channels created by g_io_channel_new_file (),
-and %FALSE for all other channels.
+the GIOChannel data structure.
</parameter_description>
</parameter>
</parameters>
is reading output from a command using via pipe, you may need to set
the encoding to the encoding of the current locale (see
g_get_charset()) with the g_io_channel_set_encoding() function.
+By default, the fd passed will not be closed when the final reference
+to the #GIOChannel data structure is dropped.
If you want to read raw binary data without interpretation, then
call the g_io_channel_set_encoding() function with %NULL for the
same C runtime as GLib uses, which is msvcrt.dll. Note that in
current Microsoft compilers it is near impossible to convince it to
build code that would use msvcrt.dll. The last Microsoft compiler
-version that supported using msvcrt.dll as the C runtime was version
-6. The GNU compiler and toolchain for Windows, also known as Mingw,
+version that supported using msvcrt.dll as the C runtime was version 6.
+The GNU compiler and toolchain for Windows, also known as Mingw,
fully supports msvcrt.dll.
If you have created a #GIOChannel for a file descriptor and started
If @key cannot be found then 0 is returned and @error is set to
#G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated
-with @key cannot be interpreted as an integer then 0 is returned
+with @key cannot be interpreted as an integer, or is out of range
+for a #gint, then 0 is returned
and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
Since: 2.6
If @key cannot be found then %NULL is returned and @error is set to
#G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated
-with @key cannot be interpreted as integers then %NULL is returned
+with @key cannot be interpreted as integers, or are out of range for
+#gint, then %NULL is returned
and @error is set to #G_KEY_FILE_ERROR_INVALID_VALUE.
Since: 2.6
<description>
This function looks for a key file named @file in the paths
specified in @search_dirs, loads the file into @key_file and
-returns the file's full path in @full_path. If the file could not
-be loaded then an %error is set to either a #GFileError or
-#GKeyFileError.
+returns the file's full path in @full_path.
+
+If the file could not be found in any of the @search_dirs,
+%G_KEY_FILE_ERROR_NOT_FOUND is returned. If
+the file is found but the OS returns an error when opening or reading the
+file, a %G_FILE_ERROR is returned. If there is a problem parsing the file, a
+%G_KEY_FILE_ERROR is returned.
Since: 2.14
<function name="g_key_file_load_from_file">
<description>
Loads a key file into an empty #GKeyFile structure.
-If the file could not be loaded then @error is set to
-either a #GFileError or #GKeyFileError.
+
+If the OS returns an error when opening or reading the file, a
+%G_FILE_ERROR is returned. If there is a problem parsing the file, a
+%G_KEY_FILE_ERROR is returned.
+
+This function will never return a %G_KEY_FILE_ERROR_NOT_FOUND error. If the
+@file is not found, %G_FILE_ERROR_NOENT is returned.
Since: 2.6
<description>
Calls a function for each element of a #GList.
+It is safe for @func to remove the element from @list, but it must
+not modify any part of the list after that element.
+
</description>
<parameters>
<parameter name="list">
Convenience method, which frees all the memory used by a #GList,
and calls @free_func on every element's data.
+@free_func must not modify the list (eg, by removing the freed
+element from it).
+
Since: 2.28
</description>
<description>
A convenience macro to get the previous element in a #GList.
Note that it is considered perfectly acceptable to access
-@list->previous directly.
+@list->prev directly.
</description>
</description>
<parameters>
</parameters>
-<return> a %NULL-terminated
-list of strings which must be freed with g_strfreev().
+<return>
+a %NULL-terminated list of strings which must be freed with
+g_strfreev().
</return>
</function>
<function name="g_log_set_handler_full">
<description>
-Like g_log_sets_handler(), but takes a destroy notify for the @user_data.
+Like g_log_set_handler(), but takes a destroy notify for the @user_data.
This has no effect if structured logging is enabled; see
[Using Structured Logging][using-structured-logging].
Log a message with structured data. The message will be passed through to
the log writer set by the application using g_log_set_writer_func(). If the
message is fatal (i.e. its log level is %G_LOG_LEVEL_ERROR), the program will
-be aborted at the end of this function.
+be aborted at the end of this function. If the log writer returns
+%G_LOG_WRITER_UNHANDLED (failure), no other fallback writers will be tried.
+See the documentation for #GLogWriterFunc for information on chaining
+writers.
The structured data is provided as key–value pairs, where keys are UTF-8
strings, and values are arbitrary pointers — typically pointing to UTF-8
]|
Note also that, even if no other structured fields are specified, there
-must always be a "MESSAGE" key before the format string. The "MESSAGE"-format
-pair has to be the last of the key-value pairs, and "MESSAGE" is the only
+must always be a `MESSAGE` key before the format string. The `MESSAGE`-format
+pair has to be the last of the key-value pairs, and `MESSAGE` is the only
field for which printf()-style formatting is supported.
The default writer function for `stdout` and `stderr` will automatically
systemd journal, or something else (like a log file or `stdout` or
`stderr`).
+Invalid file descriptors are accepted and return %FALSE, which allows for
+the following construct without needing any additional error handling:
+|[<!-- language="C" -->
+is_journald = g_log_writer_is_journald (fileno (stderr));
+]|
+
Since: 2.50
</description>
invocation of @function.
This function is the same as g_main_context_invoke() except that it
-lets you specify the priority incase @function ends up being
+lets you specify the priority in case @function ends up being
scheduled as an idle and also lets you give a #GDestroyNotify for @data.
@notify should not assume that it is called from any particular
in GLib and GIO, because those use the GLib allocators before main is
reached. Therefore this function is now deprecated and is just a stub.
-Deprecated: 2.46: Use other memory profiling tools instead
+Deprecated: 2.46: This function now does nothing. Use other memory
+profiling tools instead
</description>
<parameters>
The parameter is a string that should follow the rules for
mkdtemp() templates, i.e. contain the string "XXXXXX".
g_mkdtemp() is slightly more flexible than mkdtemp() in that the
-sequence does not have to occur at the very end of the template
-and you can pass a @mode and additional @flags. The X string will
-be modified to form the name of a directory that didn't exist.
+sequence does not have to occur at the very end of the template.
+The X string will be modified to form the name of a directory that
+didn't exist.
The string should be in the GLib file name encoding. Most importantly,
on Windows it should be in UTF-8.
+If you are going to be creating a temporary directory inside the
+directory returned by g_get_tmp_dir(), you might want to use
+g_dir_make_tmp() instead.
+
Since: 2.30
</description>
The parameter is a string that should follow the rules for
mkdtemp() templates, i.e. contain the string "XXXXXX".
-g_mkdtemp() is slightly more flexible than mkdtemp() in that the
+g_mkdtemp_full() is slightly more flexible than mkdtemp() in that the
sequence does not have to occur at the very end of the template
and you can pass a @mode. The X string will be modified to form
the name of a directory that didn't exist. The string should be
in the GLib file name encoding. Most importantly, on Windows it
should be in UTF-8.
+If you are going to be creating a temporary directory inside the
+directory returned by g_get_tmp_dir(), you might want to use
+g_dir_make_tmp() instead.
+
Since: 2.30
</description>
<function name="g_node_children_foreach">
<description>
-Calls a function for each of the children of a #GNode.
-Note that it doesn't descend beneath the child nodes.
+Calls a function for each of the children of a #GNode. Note that it
+doesn't descend beneath the child nodes. @func must not do anything
+that would modify the structure of the tree.
</description>
<parameters>
Traverses a tree starting at the given root #GNode.
It calls the given function for each node visited.
The traversal can be halted at any point by returning %TRUE from @func.
+@func must not do anything that would modify the structure of the tree.
</description>
<parameters>
</parameter_description>
</parameter>
</parameters>
-<return> the data if found, or %NULL if no such data exists.
+<return> the data if found,
+or %NULL if no such data exists.
</return>
</function>
<return></return>
</function>
+<function name="g_object_getv">
+<description>
+Gets @n_properties properties for an @object.
+Obtained properties will be set to @values. All properties must be valid.
+Warnings will be emitted and undefined behaviour may result if invalid
+properties are passed in.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> a #GObject
+</parameter_description>
+</parameter>
+<parameter name="n_properties">
+<parameter_description> the number of properties
+</parameter_description>
+</parameter>
+<parameter name="names">
+<parameter_description> the names of each property to get
+</parameter_description>
+</parameter>
+<parameter name="values">
+<parameter_description> the values of each property to get
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="g_object_interface_find_property">
<description>
Find the #GParamSpec with the given name for an
</return>
</function>
+<function name="g_object_new_with_properties">
+<description>
+Creates a new instance of a #GObject subtype and sets its properties using
+the provided arrays. Both arrays must have exactly @n_properties elements,
+and the names and values correspond by index.
+
+Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY)
+which are not explicitly specified are set to their default values.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="object_type">
+<parameter_description> the object type to instantiate
+</parameter_description>
+</parameter>
+<parameter name="n_properties">
+<parameter_description> the number of properties
+</parameter_description>
+</parameter>
+<parameter name="names">
+<parameter_description> the names of each property to be set
+</parameter_description>
+</parameter>
+<parameter name="values">
+<parameter_description> the values of each property to be set
+</parameter_description>
+</parameter>
+</parameters>
+<return> a new instance of
+@object_type
+
+</return>
+</function>
+
<function name="g_object_newv">
<description>
Creates a new instance of a #GObject subtype and sets its properties.
Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
which are not explicitly specified are set to their default values.
+Deprecated: 2.54: Use g_object_new_with_properties() instead.
+deprecated. See #GParameter for more information.
</description>
<parameters>
</parameters>
<return> a new instance of
@object_type
+
</return>
</function>
<description>
Increases the reference count of @object.
+Since GLib 2.56, if `GLIB_VERSION_MAX_ALLOWED` is 2.56 or greater, the type
+of @object will be propagated to the return type (using the GCC typeof()
+extension), so any casting the caller needs to do on the return type must be
+explicit.
+
</description>
<parameters>
count unchanged. If the object is not floating, then this call
adds a new normal reference increasing the reference count by one.
+Since GLib 2.56, the type of @object will be propagated to the return type
+under the same conditions as for g_object_ref().
+
Since: 2.10
<return></return>
</function>
+<function name="g_object_setv">
+<description>
+Sets @n_properties properties for an @object.
+Properties to be set will be taken from @values. All properties must be
+valid. Warnings will be emitted and undefined behaviour may result if invalid
+properties are passed in.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="object">
+<parameter_description> a #GObject
+</parameter_description>
+</parameter>
+<parameter name="n_properties">
+<parameter_description> the number of properties
+</parameter_description>
+</parameter>
+<parameter name="names">
+<parameter_description> the names of each property to be set
+</parameter_description>
+</parameter>
+<parameter name="values">
+<parameter_description> the values of each property to be set
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
+</function>
+
<function name="g_object_steal_data">
<description>
Remove a specified datum from the object's data associations,
</parameter_description>
</parameter>
</parameters>
-<return> the data if found, or %NULL if no such data exists.
+<return> the data if found, or %NULL
+if no such data exists.
</return>
</function>
</description>
<parameters>
<parameter name="context">
-<parameter_description> a #GoptionContext
+<parameter_description> a #GOptionContext
</parameter_description>
</parameter>
</parameters>
</description>
<parameters>
<parameter name="context">
-<parameter_description> a #GoptionContext
+<parameter_description> a #GOptionContext
</parameter_description>
</parameter>
<parameter name="strict_posix">
<description>
Gets the default value of @pspec as a pointer to a #GValue.
-The #GValue will remain value for the life of @pspec.
+The #GValue will remain valid for the life of @pspec.
Since: 2.38
an absolute file name one that either begins with a directory
separator such as "\Users\tml" or begins with the root on a drive,
for example "C:\Windows". The first case also includes UNC paths
-such as "\\myserver\docs\foo". In all cases, either slashes or
+such as "\\\\myserver\docs\foo". In all cases, either slashes or
backslashes are accepted.
Note that a file name relative to the current drive root does not
don't want to run the full main loop.
Each element of @fds is a #GPollFD describing a single file
-descriptor to poll. The %fd field indicates the file descriptor,
-and the %events field indicates the events to poll for. On return,
-the %revents fields will be filled with the events that actually
+descriptor to poll. The @fd field indicates the file descriptor,
+and the @events field indicates the events to poll for. On return,
+the @revents fields will be filled with the events that actually
occurred.
On POSIX systems, the file descriptors in @fds can be any sort of
</parameter_description>
</parameter>
</parameters>
-<return> the number of entries in @fds whose %revents fields
+<return> the number of entries in @fds whose @revents fields
were filled in, or 0 if the operation timed out, or -1 on error or
if the call was interrupted.
new-line character to the message, so typically @format should end with its
own new-line character.
+`glib/gprintf.h` must be explicitly included in order to use this function.
+
Since: 2.2
</description>
<return></return>
</function>
+<function name="g_ptr_array_find">
+<description>
+Checks whether @needle exists in @haystack. If the element is found, %TRUE is
+returned and the element’s index is returned in @index_ (if non-%NULL).
+Otherwise, %FALSE is returned and @index_ is undefined. If @needle exists
+multiple times in @haystack, the index of the first instance is returned.
+
+This does pointer comparisons only. If you want to use more complex equality
+checks, such as string comparisons, use g_ptr_array_find_with_equal_func().
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="haystack">
+<parameter_description> pointer array to be searched
+</parameter_description>
+</parameter>
+<parameter name="needle">
+<parameter_description> pointer to look for
+</parameter_description>
+</parameter>
+<parameter name="index_">
+<parameter_description> return location for the index of
+the element, if found
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @needle is one of the elements of @haystack
+</return>
+</function>
+
+<function name="g_ptr_array_find_with_equal_func">
+<description>
+Checks whether @needle exists in @haystack, using the given @equal_func.
+If the element is found, %TRUE is returned and the element’s index is
+returned in @index_ (if non-%NULL). Otherwise, %FALSE is returned and @index_
+is undefined. If @needle exists multiple times in @haystack, the index of
+the first instance is returned.
+
+@equal_func is called with the element from the array as its first parameter,
+and @needle as its second parameter. If @equal_func is %NULL, pointer
+equality is used.
+
+Since: 2.54
+
+</description>
+<parameters>
+<parameter name="haystack">
+<parameter_description> pointer array to be searched
+</parameter_description>
+</parameter>
+<parameter name="needle">
+<parameter_description> pointer to look for
+</parameter_description>
+</parameter>
+<parameter name="equal_func">
+<parameter_description> the function to call for each element, which should
+return %TRUE when the desired element is found; or %NULL to use pointer
+equality
+</parameter_description>
+</parameter>
+<parameter name="index_">
+<parameter_description> return location for the index of
+the element, if found
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @needle is one of the elements of @haystack
+</return>
+</function>
+
<function name="g_ptr_array_foreach">
<description>
-Calls a function for each element of a #GPtrArray.
+Calls a function for each element of a #GPtrArray. @func must not
+add elements to or remove elements from the array.
Since: 2.4
be freed separately if @free_seg is %TRUE and no #GDestroyNotify
function has been set for @array.
+This function is not thread-safe. If using a #GPtrArray from multiple
+threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref()
+functions.
+
</description>
<parameters>
Atomically decrements the reference count of @array by one. If the
reference count drops to 0, the effect is the same as calling
g_ptr_array_free() with @free_segment set to %TRUE. This function
-is MT-safe and may be called from any thread.
+is thread-safe and may be called from any thread.
Since: 2.22
Calls @func for each element in the queue passing @user_data to the
function.
+It is safe for @func to remove the element from @queue, but it must
+not modify any part of the queue after that element.
+
Since: 2.4
</description>
Convenience method, which frees all the memory used by a #GQueue,
and calls the specified destroy function on every element's data.
+@free_func should not modify the queue (eg, by removing the freed
+element from it).
+
Since: 2.32
</description>
to the captured subexpression with the given name. '\0' refers
to the complete match, but '\0' followed by a number is the octal
representation of a character. To include a literal '\' in the
-replacement, write '\\'.
+replacement, write '\\\\'.
There are also escapes that changes the case of the following text:
the result is usually that a critical message is logged and the current
function returns.
-If G_DISABLE_CHECKS is defined then the check is not performed. You
+If `G_DISABLE_CHECKS` is defined then the check is not performed. You
should therefore not depend on any side effects of @expr.
+To debug failure of a g_return_if_fail() check, run the code under a debugger
+with `G_DEBUG=fatal-criticals` or `G_DEBUG=fatal-warnings` defined in the
+environment (see [Running GLib Applications](glib-running.html)):
+
+|[
+G_DEBUG=fatal-warnings gdb ./my-program
+]|
+
+Any unrelated failures can be skipped over in
+[gdb](https://www.gnu.org/software/gdb/) using the `continue` command.
+
</description>
<parameters>
<parameter name="expr">
Logs a critical message and returns from the current function.
This can only be used in functions which do not return a value.
+See g_return_if_fail() for guidance on how to debug failure of this check.
+
</description>
<parameters>
</parameters>
the result is usually that a critical message is logged and @val is
returned from the current function.
-If G_DISABLE_CHECKS is defined then the check is not performed. You
+If `G_DISABLE_CHECKS` is defined then the check is not performed. You
should therefore not depend on any side effects of @expr.
+See g_return_if_fail() for guidance on how to debug failure of this check.
+
</description>
<parameters>
<parameter name="expr">
<description>
Logs a critical message and returns @val.
+See g_return_if_fail() for guidance on how to debug failure of this check.
+
</description>
<parameters>
<parameter name="val">
thread will block. Read locks can be taken recursively.
It is implementation-defined how many threads are allowed to
-hold read locks on the same lock simultaneously.
+hold read locks on the same lock simultaneously. If the limit is hit,
+or if a deadlock is detected, a critical warning will be emitted.
Since: 2.32
<function name="g_sequence_foreach">
<description>
Calls @func for each item in the sequence passing @user_data
-to the function.
+to the function. @func must not modify the sequence itself.
Since: 2.14
<function name="g_sequence_foreach_range">
<description>
Calls @func for each item in the range (@begin, @end) passing
-@user_data to the function.
+@user_data to the function. @func must not modify the sequence
+itself.
Since: 2.14
Sets the name of the program. This name should not be localized,
in contrast to g_set_application_name().
+If you are using #GApplication the program name is set in
+g_application_run(). In case of GDK or GTK+ it is set in
+gdk_init(), which is called by gtk_init() and the
+#GtkApplication::startup handler. The program name is found by
+taking the last component of @argv[0].
+
Note that for thread-safety reasons this function can only be called once.
</description>
</description>
<parameters>
<parameter name="variable">
-<parameter_description> the environment variable to set, must not contain '='.
+<parameter_description> the environment variable to set, must not
+contain '='.
</parameter_description>
</parameter>
<parameter name="value">
</parameter_description>
</parameter>
<parameter name="argvp">
-<parameter_description> return
-location for array of args
+<parameter_description>
+return location for array of args
</parameter_description>
</parameter>
<parameter name="error">
</parameter_description>
</parameter>
</parameters>
-<return> the handler id (always greater than 0 for successful connections)
+<return> the handler ID, of type #gulong (always greater than 0 for successful connections)
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the handler id (always greater than 0 for successful connections)
+<return> the handler ID, of type #gulong (always greater than 0 for successful connections)
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the handler id (always greater than 0 for successful connections)
+<return> the handler ID (always greater than 0 for successful connections)
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the handler id (always greater than 0 for successful connections)
+<return> the handler ID (always greater than 0 for successful connections)
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the handler id (always greater than 0 for successful connections)
+<return> the handler ID (always greater than 0 for successful connections)
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> the handler ID (always greater than 0 for successful connections)
+<return> the handler ID, of type #gulong (always greater than 0 for successful connections)
</return>
</function>
<function name="g_signal_handler_is_connected">
<description>
-Returns whether @handler_id is the id of a handler connected to @instance.
+Returns whether @handler_id is the ID of a handler connected to @instance.
</description>
</parameter_description>
</parameter>
<parameter name="handler_id">
-<parameter_description> the handler id.
+<parameter_description> the handler ID.
</parameter_description>
</parameter>
</parameters>
</parameter_description>
</parameter>
</parameters>
-<return> a new #GCClosure
+<return> a floating reference to a new #GCClosure
</return>
</function>
<function name="g_slice_alloc">
<description>
Allocates a block of memory from the slice allocator.
-The block adress handed out can be expected to be aligned
+The block address handed out can be expected to be aligned
to at least 1 * sizeof (void*),
though in general slices are 2 * sizeof (void*) bytes aligned,
if a malloc() fallback implementation is used instead,
<description>
Calls a function for each element of a #GSList.
+It is safe for @func to remove the element from @list, but it must
+not modify any part of the list after that element.
+
</description>
<parameters>
<parameter name="list">
Convenience method, which frees all the memory used by a #GSList, and
calls the specified destroy function on every element's data.
+@free_func must not modify the list (eg, by removing the freed
+element from it).
+
Since: 2.28
</description>
<function name="g_slist_next">
<description>
A convenience macro to get the next element in a #GSList.
+Note that it is considered perfectly acceptable to access
+@slist->next directly.
</description>
<function name="g_slist_sort">
<description>
-Sorts a #GSList using the given comparison function.
+Sorts a #GSList using the given comparison function. The algorithm
+used is a stable sort.
</description>
}
]|
+Calls to this function from a thread other than the one acquired by the
+#GMainContext the #GSource is attached to are typically redundant, as the
+source could be destroyed immediately after this function returns. However,
+once a source is destroyed it cannot be un-destroyed, so this function can be
+used for opportunistic checks from any thread.
+
Since: 2.12
</description>
<function name="g_source_remove">
<description>
-Removes the source with the given id from the default main context.
+Removes the source with the given ID from the default main context. You must
+use g_source_destroy() for sources added to a non-default main context.
-The id of a #GSource is given by g_source_get_id(), or will be
+The ID of a #GSource is given by g_source_get_id(), or will be
returned by the functions g_source_attach(), g_idle_add(),
g_idle_add_full(), g_timeout_add(), g_timeout_add_full(),
g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and
g_io_add_watch_full().
-See also g_source_destroy(). You must use g_source_destroy() for sources
-added to a non-default main context.
-
It is a programmer error to attempt to remove a non-existent source.
More specifically: source IDs can be reissued after a source has been
Note that if you have a pair of sources where the ready time of one
suggests that it will be delivered first but the priority for the
other suggests that it would be delivered first, and the ready time
-for both sources is reached during the same main context iteration
+for both sources is reached during the same main context iteration,
then the order of dispatch is undefined.
+It is a no-op to call this function on a #GSource which has already been
+destroyed with g_source_destroy().
+
This API is only intended to be used by implementations of #GSource.
Do not call this API on a #GSource that you did not create.
You should call g_spawn_close_pid() on the returned child process
reference when you don't need it any more.
-If you are writing a GTK+ application, and the program you are
-spawning is a graphical application, too, then you may want to
-use gdk_spawn_on_screen() instead to ensure that the spawned program
-opens its windows on the right screen.
+If you are writing a GTK+ application, and the program you are spawning is a
+graphical application too, then to ensure that the spawned program opens its
+windows on the right screen, you may want to use #GdkAppLaunchContext,
+#GAppLaunchContext, or set the %DISPLAY environment variable.
Note that the returned @child_pid on Windows is a handle to the child
process and not its identifier. Process handles and process identifiers
</description>
<parameters>
<parameter name="working_directory">
-<parameter_description> child's current working directory, or %NULL to inherit parent's
+<parameter_description> child's current working
+directory, or %NULL to inherit parent's
</parameter_description>
</parameter>
<parameter name="argv">
-<parameter_description> child's argument vector
+<parameter_description>
+child's argument vector
</parameter_description>
</parameter>
<parameter name="envp">
-<parameter_description> child's environment, or %NULL to inherit parent's
+<parameter_description>
+child's environment, or %NULL to inherit parent's
</parameter_description>
</parameter>
<parameter name="flags">
@flags should be the bitwise OR of any flags you want to affect the
function's behaviour. The %G_SPAWN_DO_NOT_REAP_CHILD means that the
-child will not automatically be reaped; you must use a child watch to
-be notified about the death of the child process. Eventually you must
-call g_spawn_close_pid() on the @child_pid, in order to free
-resources which may be associated with the child process. (On Unix,
+child will not automatically be reaped; you must use a child watch
+(g_child_watch_add()) to be notified about the death of the child process,
+otherwise it will stay around as a zombie process until this process exits.
+Eventually you must call g_spawn_close_pid() on the @child_pid, in order to
+free resources which may be associated with the child process. (On Unix,
using a child watch is equivalent to calling waitpid() or handling
the %SIGCHLD signal manually. On Windows, calling g_spawn_close_pid()
is equivalent to calling CloseHandle() on the process handle returned
If @child_pid is not %NULL and an error does not occur then the returned
process reference must be closed using g_spawn_close_pid().
-If you are writing a GTK+ application, and the program you
-are spawning is a graphical application, too, then you may
-want to use gdk_spawn_on_screen_with_pipes() instead to ensure that
-the spawned program opens its windows on the right screen.
+If you are writing a GTK+ application, and the program you are spawning is a
+graphical application too, then to ensure that the spawned program opens its
+windows on the right screen, you may want to use #GdkAppLaunchContext,
+#GAppLaunchContext, or set the %DISPLAY environment variable.
</description>
<parameters>
<parameter name="working_directory">
-<parameter_description> child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
+<parameter_description> child's current working
+directory, or %NULL to inherit parent's, in the GLib file name encoding
</parameter_description>
</parameter>
<parameter name="argv">
-<parameter_description> child's argument vector, in the GLib file name encoding
+<parameter_description> child's argument
+vector, in the GLib file name encoding
</parameter_description>
</parameter>
<parameter name="envp">
-<parameter_description> child's environment, or %NULL to inherit parent's, in the GLib file name encoding
+<parameter_description>
+child's environment, or %NULL to inherit parent's, in the GLib file
+name encoding
</parameter_description>
</parameter>
<parameter name="flags">
</description>
<parameters>
<parameter name="command_line">
-<parameter_description> a command line
+<parameter_description> a command line
</parameter_description>
</parameter>
<parameter name="standard_output">
the child is stored there; see the documentation of
g_spawn_check_exit_status() for how to use and interpret this.
Note that it is invalid to pass %G_SPAWN_DO_NOT_REAP_CHILD in
-@flags.
+@flags, and on POSIX platforms, the same restrictions as for
+g_child_watch_source_new() apply.
If an error occurs, no data is returned in @standard_output,
@standard_error, or @exit_status.
</description>
<parameters>
<parameter name="working_directory">
-<parameter_description> child's current working directory, or %NULL to inherit parent's
+<parameter_description> child's current working
+directory, or %NULL to inherit parent's
</parameter_description>
</parameter>
<parameter name="argv">
-<parameter_description> child's argument vector
+<parameter_description>
+child's argument vector
</parameter_description>
</parameter>
<parameter name="envp">
-<parameter_description> child's environment, or %NULL to inherit parent's
+<parameter_description>
+child's environment, or %NULL to inherit parent's
</parameter_description>
</parameter>
<parameter name="flags">
Note that it is usually better to use g_snprintf(), to avoid the
risk of buffer overflow.
+`glib/gprintf.h` must be explicitly included in order to use this function.
+
See also g_strdup_printf().
Since: 2.2
call g_str_tokenize_and_fold() on the search term and
perform lookups into that index.
-As some examples, searching for "fred" would match the potential hit
-"Smith, Fred" and also "Frédéric". Searching for "Fréd" would match
-"Frédéric" but not "Frederic" (due to the one-directional nature of
-accent matching). Searching "fo" would match "Foo" and "Bar Foo
-Baz", but not "SFO" (because no word as "fo" as a prefix).
+As some examples, searching for ‘fred’ would match the potential hit
+‘Smith, Fred’ and also ‘Frédéric’. Searching for ‘Fréd’ would match
+‘Frédéric’ but not ‘Frederic’ (due to the one-directional nature of
+accent matching). Searching ‘fo’ would match ‘Foo’ and ‘Bar Foo
+Baz’, but not ‘SFO’ (because no word has ‘fo’ as a prefix).
Since: 2.40
Note that the string may be translated according to the current locale.
-The value of %errno will not be changed by this function.
+The value of %errno will not be changed by this function. However, it may
+be changed by intermediate function calls, so you should save its value
+as soon as the call returns:
+|[
+int saved_errno;
+
+ret = read (blah);
+saved_errno = errno;
+
+g_strerror (saved_errno);
+]|
</description>
- `--verbose`: Run tests verbosely.
- `-q`, `--quiet`: Run tests quietly.
- `-p PATH`: Execute all tests matching the given path.
+- `-s PATH`: Skip all tests matching the given path.
This can also be used to force a test to run that would otherwise
be skipped (ie, a test whose name contains "/subprocess").
- `-m {perf|slow|thorough|quick|undefined|no-undefined}`: Execute tests according to these test modes:
<description>
This function enqueus a callback @destroy_func to be executed
during the next test case teardown phase. This is most useful
-to auto destruct allocted test resources at the end of a test run.
+to auto destruct allocated test resources at the end of a test run.
Resources are released in reverse queue order, that means enqueueing
callback A before callback B will cause B() to be called before
A() during teardown.
Runs all tests under the toplevel suite which can be retrieved
with g_test_get_root(). Similar to g_test_run_suite(), the test
cases to be run are filtered according to test path arguments
-(`-p testpath`) as parsed by g_test_init(). g_test_run_suite()
-or g_test_run() may only be called once in a program.
+(`-p testpath` and `-s testpath`) as parsed by g_test_init().
+g_test_run_suite() or g_test_run() may only be called once in a
+program.
In general, the tests and sub-suites within each suite are run in
the order in which they are defined. However, note that prior to
<description>
Execute the tests within @suite and all nested #GTestSuites.
The test suites to be executed are filtered according to
-test path arguments (`-p testpath`) as parsed by g_test_init().
-See the g_test_run() documentation for more information on the
-order that tests are run in.
+test path arguments (`-p testpath` and `-s testpath`) as parsed by
+g_test_init(). See the g_test_run() documentation for more
+information on the order that tests are run in.
g_test_run_suite() or g_test_run() may only be called once
in a program.
Use g_date_time_format() or g_strdup_printf() if a different
variation of ISO 8601 format is required.
+If @time_ represents a date which is too large to fit into a `struct tm`,
+%NULL will be returned. This is platform dependent, but it is safe to assume
+years up to 3000 are supported. The return value of g_time_val_to_iso8601()
+has been nullable since GLib 2.54; before then, GLib would crash under the
+same conditions.
+
Since: 2.12
</description>
</parameter_description>
</parameter>
</parameters>
-<return> a newly allocated string containing an ISO 8601 date
+<return> a newly allocated string containing an ISO 8601 date,
+or %NULL if @time_ was too large
</return>
</function>
</parameter_description>
</parameter>
<parameter name="function">
-<parameter_description> a #GPollFDFunc
+<parameter_description> a #GUnixFDSourceFunc
</parameter_description>
</parameter>
<parameter name="user_data">
Create a #GSource that will be dispatched upon delivery of the UNIX
signal @signum. In GLib versions before 2.36, only `SIGHUP`, `SIGINT`,
`SIGTERM` can be monitored. In GLib 2.36, `SIGUSR1` and `SIGUSR2`
-were added.
+were added. In GLib 2.54, `SIGWINCH` was added.
Note that unlike the UNIX default, all sources which have created a
watch will be dispatched, regardless of which underlying thread
</description>
<parameters>
<parameter name="variable">
-<parameter_description> the environment variable to remove, must not contain '='
+<parameter_description> the environment variable to remove, must
+not contain '='
</parameter_description>
</parameter>
</parameters>
is made to see if the character found is actually valid other than
it starts with an appropriate byte.
+If @end is %NULL, the return value will never be %NULL: if the end of the
+string is reached, a pointer to the terminating nul byte is returned. If
+@end is non-%NULL, the return value will be %NULL if the end of the string
+is reached.
+
</description>
<parameters>
</parameter_description>
</parameter>
</parameters>
-<return> a pointer to the found character or %NULL
+<return> a pointer to the found character or %NULL if @end is
+set and is reached
</return>
</function>
such as characters that are out of the range of Unicode, and for
overlong encodings of valid characters.
+Note that g_utf8_get_char_validated() returns (gunichar)-2 if
+@max_len is positive and any of the bytes in the first UTF-8 character
+sequence are nul.
+
</description>
<parameters>
</parameter_description>
</parameter>
<parameter name="max_len">
-<parameter_description> the maximum number of bytes to read, or -1, for no maximum or
-if @p is nul-terminated
+<parameter_description> the maximum number of bytes to read, or -1 if @p is nul-terminated
</parameter_description>
</parameter>
</parameters>
</return>
</function>
+<function name="g_utf8_make_valid">
+<description>
+If the provided string is valid UTF-8, return a copy of it. If not,
+return a copy in which bytes that could not be interpreted as valid Unicode
+are replaced with the Unicode replacement character (U+FFFD).
+
+For example, this is an appropriate function to use if you have received
+a string that was incorrectly declared to be UTF-8, and you need a valid
+UTF-8 version of it that can be logged or displayed to the user, with the
+assumption that it is close enough to ASCII or UTF-8 to be mostly
+readable as-is.
+
+Since: 2.52
+
+</description>
+<parameters>
+<parameter name="str">
+<parameter_description> string to coerce into UTF-8
+</parameter_description>
+</parameter>
+<parameter name="len">
+<parameter_description> the maximum length of @str to use, in bytes. If @len < 0,
+then the string is nul-terminated.
+</parameter_description>
+</parameter>
+</parameters>
+<return> a valid UTF-8 string whose content resembles @str
+
+</return>
+</function>
+
<function name="g_utf8_next_char">
<description>
Skips to the next character in a UTF-8 string. The string must be
</return>
</function>
+<function name="g_uuid_string_is_valid">
+<description>
+Parses the string @str and verify if it is a UUID.
+
+The function accepts the following syntax:
+
+- simple forms (e.g. `f81d4fae-7dec-11d0-a765-00a0c91e6bf6`)
+
+Note that hyphens are required within the UUID string itself,
+as per the aforementioned RFC.
+
+Since: 2.52
+
+</description>
+<parameters>
+<parameter name="str">
+<parameter_description> a string representing a UUID
+</parameter_description>
+</parameter>
+</parameters>
+<return> %TRUE if @str is a valid UUID, %FALSE otherwise.
+</return>
+</function>
+
+<function name="g_uuid_string_random">
+<description>
+Generates a random UUID (RFC 4122 version 4) as a string.
+
+Since: 2.52
+
+</description>
+<parameters>
+</parameters>
+<return> A string that should be freed with g_free().
+</return>
+</function>
+
<function name="g_value_array_append">
<description>
Insert a copy of @value as last element of @value_array. If @value is
<function name="g_value_dup_variant">
<description>
-Get the contents of a variant #GValue, increasing its refcount.
+Get the contents of a variant #GValue, increasing its refcount. The returned
+#GVariant is never floating.
Since: 2.26
</parameter_description>
</parameter>
</parameters>
-<return> variant contents of @value, should be unrefed using
-g_variant_unref() when no longer needed
+<return> variant contents of @value (may be %NULL);
+should be unreffed using g_variant_unref() when no longer needed
</return>
</function>
</parameter_description>
</parameter>
</parameters>
-<return> variant contents of @value
+<return> variant contents of @value (may be %NULL)
</return>
</function>
#GVariantBuilder if you want to abort building the value part-way
through. This function need not be called if you call
g_variant_builder_end() and it also doesn't need to be called on
-builders allocated with g_variant_builder_new (see
+builders allocated with g_variant_builder_new() (see
g_variant_builder_unref() for that).
This function leaves the #GVariantBuilder structure set to all-zeros.
<function name="g_variant_builder_open">
<description>
Opens a subcontainer inside the given @builder. When done adding
-items to the subcontainer, g_variant_builder_close() must be called.
+items to the subcontainer, g_variant_builder_close() must be called. @type
+is the type of the container: so to build a tuple of several values, @type
+must include the tuple itself.
It is an error to call this function in any way that would cause an
inconsistent value to be constructed (ie: adding too many values or
a value of an incorrect type).
+Example of building a nested variant:
+|[<!-- language="C" -->
+GVariantBuilder builder;
+guint32 some_number = get_number ();
+g_autoptr (GHashTable) some_dict = get_dict ();
+GHashTableIter iter;
+const gchar *key;
+const GVariant *value;
+g_autoptr (GVariant) output = NULL;
+
+g_variant_builder_init (&builder, G_VARIANT_TYPE ("(ua{sv})"));
+g_variant_builder_add (&builder, "u", some_number);
+g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
+
+g_hash_table_iter_init (&iter, some_dict);
+while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &value))
+{
+g_variant_builder_open (&builder, G_VARIANT_TYPE ("{sv}"));
+g_variant_builder_add (&builder, "s", key);
+g_variant_builder_add (&builder, "v", value);
+g_variant_builder_close (&builder);
+}
+
+g_variant_builder_close (&builder);
+
+output = g_variant_builder_end (&builder);
+]|
+
Since: 2.24
</description>
</parameter_description>
</parameter>
<parameter name="type">
-<parameter_description> a #GVariantType
+<parameter_description> the #GVariantType of the container
</parameter_description>
</parameter>
</parameters>
- %G_VARIANT_TYPE_DOUBLE: #gdouble
For example, if calling this function for an array of 32-bit integers,
-you might say sizeof(gint32). This value isn't used except for the purpose
+you might say `sizeof(gint32)`. This value isn't used except for the purpose
of a double-check that the form of the serialised data matches the caller's
expectation.
-@n_elements, which must be non-%NULL is set equal to the number of
+@n_elements, which must be non-%NULL, is set equal to the number of
items in the array.
Since: 2.24
data from untrusted sources and you want to ensure your serialised
output is definitely in normal form.
+If @value is already in normal form, a new reference will be returned
+(which will be floating if @value is floating). If it is not in normal form,
+the newly created #GVariant will be returned with a single non-floating
+reference. Typically, g_variant_take_ref() should be called on the return
+value from this function to guarantee ownership of a single non-floating
+reference to it.
+
Since: 2.24
</description>
<function name="g_variant_new_fixed_array">
<description>
-Provides access to the serialised data for an array of fixed-sized
-items.
+Constructs a new array #GVariant instance, where the elements are
+of @element_type type.
-@value must be an array with fixed-sized elements. Numeric types are
+@elements must be an array with fixed-sized elements. Numeric types are
fixed-size as are tuples containing only other fixed-sized types.
@element_size must be the size of a single element in the array.
of a double-check that the form of the serialised data matches the caller's
expectation.
-@n_elements, which must be non-%NULL is set equal to the number of
-items in the array.
+@n_elements must be the length of the @elements array.
Since: 2.32
Note that the arguments in @app must be of the correct width for their
types specified in @format_string when collected into the #va_list.
-See the [GVariant varargs documentation][gvariant-varargs.
+See the [GVariant varargs documentation][gvariant-varargs].
These two generalisations allow mixing of multiple calls to
g_variant_new_va() and g_variant_get_va() within a single actual
string to hold the output, instead of putting the output in a buffer
you allocate in advance.
+`glib/gprintf.h` must be explicitly included in order to use this function.
+
Since: 2.4
</description>
An implementation of the standard fprintf() function which supports
positional parameters, as specified in the Single Unix Specification.
+`glib/gprintf.h` must be explicitly included in order to use this function.
+
Since: 2.2
</description>
An implementation of the standard vprintf() function which supports
positional parameters, as specified in the Single Unix Specification.
+`glib/gprintf.h` must be explicitly included in order to use this function.
+
Since: 2.2
</description>
An implementation of the standard vsprintf() function which supports
positional parameters, as specified in the Single Unix Specification.
+`glib/gprintf.h` must be explicitly included in order to use this function.
+
Since: 2.2
</description>
<function name="g_warning">
<description>
-A convenience function/macro to log a warning message.
+A convenience function/macro to log a warning message. The message should
+typically *not* be translated to the user's language.
This is not intended for end user error reporting. Use of #GError is
preferred for that instead, as it allows calling functions to perform actions
You can make warnings fatal at runtime by setting the `G_DEBUG`
environment variable (see
-[Running GLib Applications](glib-running.html)).
+[Running GLib Applications](glib-running.html)):
+
+|[
+G_DEBUG=fatal-warnings gdb ./my-program
+]|
+
+Any unrelated failures can be skipped over in
+[gdb](https://www.gnu.org/software/gdb/) using the `continue` command.
If g_log_default_handler() is used as the log handler function,
a newline character will automatically be appended to @..., and
<substitute_type_name from="GRegexCompileFlags" to="Glib::Regex::CompileFlags" />
<substitute_type_name from="GRegexMatchFlags" to="Glib::Regex::MatchFlags" />
+ <substitute_enumerator_name from_prefix="G_BINDING_" to_prefix="Glib::Binding::Flags::" />
<substitute_enumerator_name from_prefix="G_DATE_" to_prefix="Glib::Date::" />
<substitute_enumerator_name from_prefix="G_PARAM_" to_prefix="Glib::ParamFlags::" />
<substitute_enumerator_name from_prefix="G_REGEX_MATCH_" to_prefix="Glib::Regex::MatchFlags::" />
<substitute_enumerator_name from_prefix="G_TIME_TYPE_" to_prefix="Glib::TimeType::" />
<substitute_enumerator_name from_prefix="G_UNICODE_BREAK_" to_prefix="Glib::UnicodeBreakType::" />
<substitute_enumerator_name from_prefix="G_NORMALIZE_" to_prefix="Glib::NormalizeMode::" />
+ <substitute_enumerator_name from="G_FILE_ERROR" to="Glib::FileError" />
+ <substitute_enumerator_name from="G_KEY_FILE_ERROR" to="Glib::KeyFileError" />
+ <substitute_enumerator_name from_prefix="G_KEY_FILE_ERROR_" to_prefix="Glib::KeyFileError::" />
<!-- enum GOptionArg is not wrapped. Don't substitute. -->
<substitute_enumerator_name from_prefix="G_OPTION_ARG_" to_prefix="G_OPTION_ARG_" />
<!-- These are preprocessor defines. Don't substitute. -->
;; G_CHECKSUM_MD5,
;; G_CHECKSUM_SHA1,
;; G_CHECKSUM_SHA256,
-;; G_CHECKSUM_SHA512
+;; G_CHECKSUM_SHA512,
+;; G_CHECKSUM_SHA384
;; } GChecksumType;
(define-enum-extended ChecksumType
'("sha1" "G_CHECKSUM_SHA1" "1")
'("sha256" "G_CHECKSUM_SHA256" "2")
'("sha512" "G_CHECKSUM_SHA512" "3")
+ '("sha384" "G_CHECKSUM_SHA384" "4")
)
)
'("newline-cr" "G_REGEX_NEWLINE_CR" "1 << 20")
'("newline-lf" "G_REGEX_NEWLINE_LF" "1 << 21")
'("newline-crlf" "G_REGEX_NEWLINE_CRLF" "0x300000")
- '("newline-anycrlf" "G_REGEX_NEWLINE_ANYCRLF" "1048576 | 1 << 22")
+ '("newline-anycrlf" "G_REGEX_NEWLINE_ANYCRLF" "0x500000")
'("bsr-anycrlf" "G_REGEX_BSR_ANYCRLF" "1 << 23")
'("javascript-compat" "G_REGEX_JAVASCRIPT_COMPAT" "1 << 25")
)
)
)
+;; Original typedef:
+;; typedef enum
+;; {
+;; G_NUMBER_PARSER_ERROR_INVALID,
+;; G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS,
+;; } GNumberParserError;
+
+(define-enum-extended NumberParserError
+ (in-module "G")
+ (c-name "GNumberParserError")
+ (values
+ '("invalid" "G_NUMBER_PARSER_ERROR_INVALID" "0")
+ '("out-of-bounds" "G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS" "1")
+ )
+)
+
;; From gtestutils.h
;; Original typedef:
;; Original typedef:
;; typedef enum {
+;; G_TEST_RUN_SUCCESS,
+;; G_TEST_RUN_SKIPPED,
+;; G_TEST_RUN_FAILURE,
+;; G_TEST_RUN_INCOMPLETE
+;; } GTestResult;
+
+(define-enum-extended TestResult
+ (in-module "G")
+ (c-name "GTestResult")
+ (values
+ '("success" "G_TEST_RUN_SUCCESS" "0")
+ '("skipped" "G_TEST_RUN_SKIPPED" "1")
+ '("failure" "G_TEST_RUN_FAILURE" "2")
+ '("incomplete" "G_TEST_RUN_INCOMPLETE" "3")
+ )
+)
+
+;; Original typedef:
+;; typedef enum {
;; G_TEST_LOG_NONE,
;; G_TEST_LOG_ERROR, /* s:msg */
;; G_TEST_LOG_START_BINARY, /* s:binaryname s:seed */
;; G_UNICODE_BREAK_CLOSE_PARANTHESIS,
;; G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER,
;; G_UNICODE_BREAK_HEBREW_LETTER,
-;; G_UNICODE_BREAK_REGIONAL_INDICATOR
+;; G_UNICODE_BREAK_REGIONAL_INDICATOR,
+;; G_UNICODE_BREAK_EMOJI_BASE,
+;; G_UNICODE_BREAK_EMOJI_MODIFIER,
+;; G_UNICODE_BREAK_ZERO_WIDTH_JOINER
;; } GUnicodeBreakType;
(define-enum-extended UnicodeBreakType
'("conditional-japanese-starter" "G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER" "37")
'("hebrew-letter" "G_UNICODE_BREAK_HEBREW_LETTER" "38")
'("regional-indicator" "G_UNICODE_BREAK_REGIONAL_INDICATOR" "39")
+ '("emoji-base" "G_UNICODE_BREAK_EMOJI_BASE" "40")
+ '("emoji-modifier" "G_UNICODE_BREAK_EMOJI_MODIFIER" "41")
+ '("zero-width-joiner" "G_UNICODE_BREAK_ZERO_WIDTH_JOINER" "42")
)
)
;; G_UNICODE_SCRIPT_HATRAN, /* Hatr */
;; G_UNICODE_SCRIPT_MULTANI, /* Mult */
;; G_UNICODE_SCRIPT_OLD_HUNGARIAN, /* Hung */
-;; G_UNICODE_SCRIPT_SIGNWRITING /* Sgnw */
+;; G_UNICODE_SCRIPT_SIGNWRITING, /* Sgnw */
+;;
+;; /* Unicode 9.0 additions */
+;; G_UNICODE_SCRIPT_ADLAM, /* Adlm */
+;; G_UNICODE_SCRIPT_BHAIKSUKI, /* Bhks */
+;; G_UNICODE_SCRIPT_MARCHEN, /* Marc */
+;; G_UNICODE_SCRIPT_NEWA, /* Newa */
+;; G_UNICODE_SCRIPT_OSAGE, /* Osge */
+;; G_UNICODE_SCRIPT_TANGUT, /* Tang */
+;;
+;; /* Unicode 10.0 additions */
+;; G_UNICODE_SCRIPT_MASARAM_GONDI, /* Gonm */
+;; G_UNICODE_SCRIPT_NUSHU, /* Nshu */
+;; G_UNICODE_SCRIPT_SOYOMBO, /* Soyo */
+;; G_UNICODE_SCRIPT_ZANABAZAR_SQUARE /* Zanb */
;; } GUnicodeScript;
(define-enum-extended UnicodeScript
'("multani" "G_UNICODE_SCRIPT_MULTANI" "129")
'("old-hungarian" "G_UNICODE_SCRIPT_OLD_HUNGARIAN" "130")
'("signwriting" "G_UNICODE_SCRIPT_SIGNWRITING" "131")
+ '("adlam" "G_UNICODE_SCRIPT_ADLAM" "132")
+ '("bhaiksuki" "G_UNICODE_SCRIPT_BHAIKSUKI" "133")
+ '("marchen" "G_UNICODE_SCRIPT_MARCHEN" "134")
+ '("newa" "G_UNICODE_SCRIPT_NEWA" "135")
+ '("osage" "G_UNICODE_SCRIPT_OSAGE" "136")
+ '("tangut" "G_UNICODE_SCRIPT_TANGUT" "137")
+ '("masaram-gondi" "G_UNICODE_SCRIPT_MASARAM_GONDI" "138")
+ '("nushu" "G_UNICODE_SCRIPT_NUSHU" "139")
+ '("soyombo" "G_UNICODE_SCRIPT_SOYOMBO" "140")
+ '("zanabazar-square" "G_UNICODE_SCRIPT_ZANABAZAR_SQUARE" "141")
)
)
;; {
;; G_FORMAT_SIZE_DEFAULT = 0,
;; G_FORMAT_SIZE_LONG_FORMAT = 1 << 0,
-;; G_FORMAT_SIZE_IEC_UNITS = 1 << 1
+;; G_FORMAT_SIZE_IEC_UNITS = 1 << 1,
+;; G_FORMAT_SIZE_BITS = 1 << 2
;; } GFormatSizeFlags;
(define-flags-extended FormatSizeFlags
'("default" "G_FORMAT_SIZE_DEFAULT" "0x0")
'("long-format" "G_FORMAT_SIZE_LONG_FORMAT" "1 << 0")
'("iec-units" "G_FORMAT_SIZE_IEC_UNITS" "1 << 1")
+ '("bits" "G_FORMAT_SIZE_BITS" "1 << 2")
)
)
(in-module "G")
(c-name "GVariantClass")
(values
- '("boolean" "G_VARIANT_CLASS_BOOLEAN" "0")
+ '("boolean" "G_VARIANT_CLASS_BOOLEAN" "'b'")
'("byte" "G_VARIANT_CLASS_BYTE" "'y'")
'("int16" "G_VARIANT_CLASS_INT16" "'n'")
'("uint16" "G_VARIANT_CLASS_UINT16" "'q'")
'("int64" "G_VARIANT_CLASS_INT64" "'x'")
'("uint64" "G_VARIANT_CLASS_UINT64" "'t'")
'("handle" "G_VARIANT_CLASS_HANDLE" "'h'")
- '("double" "G_VARIANT_CLASS_DOUBLE" "0")
+ '("double" "G_VARIANT_CLASS_DOUBLE" "'d'")
'("string" "G_VARIANT_CLASS_STRING" "'s'")
'("object-path" "G_VARIANT_CLASS_OBJECT_PATH" "'o'")
'("signature" "G_VARIANT_CLASS_SIGNATURE" "'g'")
'("variant" "G_VARIANT_CLASS_VARIANT" "'v'")
'("maybe" "G_VARIANT_CLASS_MAYBE" "'m'")
- '("array" "G_VARIANT_CLASS_ARRAY" "0")
+ '("array" "G_VARIANT_CLASS_ARRAY" "'a'")
'("tuple" "G_VARIANT_CLASS_TUPLE" "'('")
'("dict-entry" "G_VARIANT_CLASS_DICT_ENTRY" "'{'")
)
'("sha1" "G_CHECKSUM_SHA1")
'("sha256" "G_CHECKSUM_SHA256")
'("sha512" "G_CHECKSUM_SHA512")
+ '("sha384" "G_CHECKSUM_SHA384")
)
)
)
)
+(define-enum ParserError
+ (in-module "GNumber")
+ (c-name "GNumberParserError")
+ (gtype-id "G_TYPE_NUMBER_PARSER_ERROR")
+ (values
+ '("invalid" "G_NUMBER_PARSER_ERROR_INVALID")
+ '("out-of-bounds" "G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS")
+ )
+)
+
(define-flags TrapFlags
(in-module "GTest")
(c-name "GTestTrapFlags")
)
)
+(define-enum Result
+ (in-module "GTest")
+ (c-name "GTestResult")
+ (gtype-id "G_TYPE_TEST_RESULT")
+ (values
+ '("success" "G_TEST_RUN_SUCCESS")
+ '("skipped" "G_TEST_RUN_SKIPPED")
+ '("failure" "G_TEST_RUN_FAILURE")
+ '("incomplete" "G_TEST_RUN_INCOMPLETE")
+ )
+)
+
(define-enum LogType
(in-module "GTest")
(c-name "GTestLogType")
'("conditional-japanese-starter" "G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER")
'("hebrew-letter" "G_UNICODE_BREAK_HEBREW_LETTER")
'("regional-indicator" "G_UNICODE_BREAK_REGIONAL_INDICATOR")
+ '("emoji-base" "G_UNICODE_BREAK_EMOJI_BASE")
+ '("emoji-modifier" "G_UNICODE_BREAK_EMOJI_MODIFIER")
+ '("zero-width-joiner" "G_UNICODE_BREAK_ZERO_WIDTH_JOINER")
)
)
'("multani" "G_UNICODE_SCRIPT_MULTANI")
'("old-hungarian" "G_UNICODE_SCRIPT_OLD_HUNGARIAN")
'("signwriting" "G_UNICODE_SCRIPT_SIGNWRITING")
+ '("adlam" "G_UNICODE_SCRIPT_ADLAM")
+ '("bhaiksuki" "G_UNICODE_SCRIPT_BHAIKSUKI")
+ '("marchen" "G_UNICODE_SCRIPT_MARCHEN")
+ '("newa" "G_UNICODE_SCRIPT_NEWA")
+ '("osage" "G_UNICODE_SCRIPT_OSAGE")
+ '("tangut" "G_UNICODE_SCRIPT_TANGUT")
+ '("masaram-gondi" "G_UNICODE_SCRIPT_MASARAM_GONDI")
+ '("nushu" "G_UNICODE_SCRIPT_NUSHU")
+ '("soyombo" "G_UNICODE_SCRIPT_SOYOMBO")
+ '("zanabazar-square" "G_UNICODE_SCRIPT_ZANABAZAR_SQUARE")
)
)
'("default" "G_FORMAT_SIZE_DEFAULT")
'("long-format" "G_FORMAT_SIZE_LONG_FORMAT")
'("iec-units" "G_FORMAT_SIZE_IEC_UNITS")
+ '("bits" "G_FORMAT_SIZE_BITS")
)
)
)
)
+(define-method find
+ (of-object "GPtrArray")
+ (c-name "g_ptr_array_find")
+ (return-type "gboolean")
+ (parameters
+ '("gconstpointer" "needle")
+ '("guint*" "index_")
+ )
+)
+
+(define-method find_with_equal_func
+ (of-object "GPtrArray")
+ (c-name "g_ptr_array_find_with_equal_func")
+ (return-type "gboolean")
+ (parameters
+ '("gconstpointer" "needle")
+ '("GEqualFunc" "equal_func")
+ '("guint*" "index_")
+ )
+)
+
(define-function g_byte_array_new
(c-name "g_byte_array_new")
(is-constructor-of "GByteArray")
)
)
-(define-function g_filename_to_utf8_utf8
- (c-name "g_filename_to_utf8_utf8")
- (return-type "gchar*")
- (parameters
- '("const-gchar*" "opsysstring")
- '("gssize" "len")
- '("gsize*" "bytes_read")
- '("gsize*" "bytes_written")
- '("GError**" "error")
- )
-)
-
-(define-function g_filename_from_utf8_utf8
- (c-name "g_filename_from_utf8_utf8")
- (return-type "gchar*")
- (parameters
- '("const-gchar*" "utf8string")
- '("gssize" "len")
- '("gsize*" "bytes_read")
- '("gsize*" "bytes_written")
- '("GError**" "error")
- )
-)
-
-(define-function g_filename_from_uri_utf8
- (c-name "g_filename_from_uri_utf8")
- (return-type "gchar*")
- (parameters
- '("const-gchar*" "uri")
- '("gchar**" "hostname")
- '("GError**" "error")
- )
-)
-
-(define-function g_filename_to_uri_utf8
- (c-name "g_filename_to_uri_utf8")
- (return-type "gchar*")
- (parameters
- '("const-gchar*" "filename")
- '("const-gchar*" "hostname")
- '("GError**" "error")
- )
-)
-
;; From gdataset.h
(return-type "none")
)
+(define-method copy
+ (of-object "GDate")
+ (c-name "g_date_copy")
+ (return-type "GDate*")
+)
+
(define-method valid
(of-object "GDate")
(c-name "g_date_valid")
)
)
+(define-function g_date_time_new_from_iso8601
+ (c-name "g_date_time_new_from_iso8601")
+ (return-type "GDateTime*")
+ (parameters
+ '("const-gchar*" "text")
+ '("GTimeZone*" "default_tz")
+ )
+)
+
(define-function g_date_time_new
(c-name "g_date_time_new")
(is-constructor-of "GDateTime")
(return-type "none")
)
-(define-function g_dir_open_utf8
- (c-name "g_dir_open_utf8")
- (return-type "GDir*")
- (parameters
- '("const-gchar*" "path")
- '("guint" "flags")
- '("GError**" "error")
- )
-)
-
-(define-method read_name_utf8
- (of-object "GDir")
- (c-name "g_dir_read_name_utf8")
- (return-type "const-gchar*")
-)
-
;; From genviron.h
)
)
-(define-function g_getenv_utf8
- (c-name "g_getenv_utf8")
- (return-type "const-gchar*")
- (parameters
- '("const-gchar*" "variable")
- )
-)
-
-(define-function g_setenv_utf8
- (c-name "g_setenv_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "variable")
- '("const-gchar*" "value")
- '("gboolean" "overwrite")
- )
-)
-
-(define-function g_unsetenv_utf8
- (c-name "g_unsetenv_utf8")
- (return-type "none")
- (parameters
- '("const-gchar*" "variable")
- )
-)
-
;; From gerror.h
)
)
+(define-function g_build_filename_valist
+ (c-name "g_build_filename_valist")
+ (return-type "gchar*")
+ (parameters
+ '("const-gchar*" "first_element")
+ '("va_list*" "args")
+ )
+)
+
(define-function g_mkdir_with_parents
(c-name "g_mkdir_with_parents")
(return-type "gint")
)
)
-(define-function g_file_test_utf8
- (c-name "g_file_test_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "filename")
- '("GFileTest" "test")
- )
-)
-
-(define-function g_file_get_contents_utf8
- (c-name "g_file_get_contents_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "filename")
- '("gchar**" "contents")
- '("gsize*" "length")
- '("GError**" "error")
- )
-)
-
-(define-function g_mkstemp_utf8
- (c-name "g_mkstemp_utf8")
- (return-type "gint")
- (parameters
- '("gchar*" "tmpl")
- )
-)
-
-(define-function g_file_open_tmp_utf8
- (c-name "g_file_open_tmp_utf8")
- (return-type "gint")
- (parameters
- '("const-gchar*" "tmpl")
- '("gchar**" "name_used")
- '("GError**" "error")
- )
-)
-
-(define-function g_get_current_dir_utf8
- (c-name "g_get_current_dir_utf8")
- (return-type "gchar*")
-)
-
;; From ggettext.h
)
)
-(define-function g_io_channel_new_file_utf8
- (c-name "g_io_channel_new_file_utf8")
- (return-type "GIOChannel*")
- (parameters
- '("const-gchar*" "filename")
- '("const-gchar*" "mode")
- '("GError**" "error")
- )
-)
-
;; From gkeyfile.h
-;; From glib_probes.h
-
-
-
;; From glib_trace.h
(define-method check
(of-object "GMainContext")
(c-name "g_main_context_check")
- (return-type "gint")
+ (return-type "gboolean")
(parameters
'("gint" "max_priority")
'("GPollFD*" "fds")
)
)
+(define-function g_clear_handle_id
+ (c-name "g_clear_handle_id")
+ (return-type "none")
+ (parameters
+ '("guint*" "tag_ptr")
+ '("GClearHandleFunc" "clear_func")
+ )
+)
+
(define-function g_timeout_add_full
(c-name "g_timeout_add_full")
(return-type "guint")
)
)
-(define-function g_spawn_async_utf8
- (c-name "g_spawn_async_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "working_directory")
- '("gchar**" "argv")
- '("gchar**" "envp")
- '("GSpawnFlags" "flags")
- '("GSpawnChildSetupFunc" "child_setup")
- '("gpointer" "user_data")
- '("GPid*" "child_pid")
- '("GError**" "error")
- )
-)
-
-(define-function g_spawn_async_with_pipes_utf8
- (c-name "g_spawn_async_with_pipes_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "working_directory")
- '("gchar**" "argv")
- '("gchar**" "envp")
- '("GSpawnFlags" "flags")
- '("GSpawnChildSetupFunc" "child_setup")
- '("gpointer" "user_data")
- '("GPid*" "child_pid")
- '("gint*" "standard_input")
- '("gint*" "standard_output")
- '("gint*" "standard_error")
- '("GError**" "error")
- )
-)
-
-(define-function g_spawn_sync_utf8
- (c-name "g_spawn_sync_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "working_directory")
- '("gchar**" "argv")
- '("gchar**" "envp")
- '("GSpawnFlags" "flags")
- '("GSpawnChildSetupFunc" "child_setup")
- '("gpointer" "user_data")
- '("gchar**" "standard_output")
- '("gchar**" "standard_error")
- '("gint*" "exit_status")
- '("GError**" "error")
- )
-)
-
-(define-function g_spawn_command_line_sync_utf8
- (c-name "g_spawn_command_line_sync_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "command_line")
- '("gchar**" "standard_output")
- '("gchar**" "standard_error")
- '("gint*" "exit_status")
- '("GError**" "error")
- )
-)
-
-(define-function g_spawn_command_line_async_utf8
- (c-name "g_spawn_command_line_async_utf8")
- (return-type "gboolean")
- (parameters
- '("const-gchar*" "command_line")
- '("GError**" "error")
- )
-)
-
;; From gstdio.h
)
)
+(define-function g_number_parser_error_quark
+ (c-name "g_number_parser_error_quark")
+ (return-type "GQuark")
+)
+
+(define-function g_ascii_string_to_signed
+ (c-name "g_ascii_string_to_signed")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "str")
+ '("guint" "base")
+ '("gint64" "min")
+ '("gint64" "max")
+ '("gint64*" "out_num")
+ '("GError**" "error")
+ )
+)
+
+(define-function g_ascii_string_to_unsigned
+ (c-name "g_ascii_string_to_unsigned")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "str")
+ '("guint" "base")
+ '("guint64" "min")
+ '("guint64" "max")
+ '("guint64*" "out_num")
+ '("GError**" "error")
+ )
+)
+
;; From gstringchunk.h
)
)
+(define-function g_utf8_make_valid
+ (c-name "g_utf8_make_valid")
+ (return-type "gchar*")
+ (parameters
+ '("const-gchar*" "str")
+ '("gssize" "len")
+ )
+)
+
;; From gunicomp.h
+;; From guuid.h
+
+(define-function g_uuid_string_is_valid
+ (c-name "g_uuid_string_is_valid")
+ (return-type "gboolean")
+ (parameters
+ '("const-gchar*" "str")
+ )
+)
+
+(define-function g_uuid_string_random
+ (c-name "g_uuid_string_random")
+ (return-type "gchar*")
+)
+
+
+
;; From gvariant-core.h
(define-function g_variant_new_from_children
(return-type "gchar**")
)
-(define-function g_win32_get_package_installation_directory_utf8
- (c-name "g_win32_get_package_installation_directory_utf8")
- (return-type "gchar*")
- (parameters
- '("const-gchar*" "package")
- '("const-gchar*" "dll_name")
- )
-)
-
-(define-function g_win32_get_package_installation_subdirectory_utf8
- (c-name "g_win32_get_package_installation_subdirectory_utf8")
- (return-type "gchar*")
- (parameters
- '("const-gchar*" "package")
- '("const-gchar*" "dll_name")
- '("const-gchar*" "subdir")
- )
-)
-
(define-function g_win32_check_windows_version
(c-name "g_win32_check_windows_version")
(return-type "gboolean")
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property target-property
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "")
)
(define-property flags
(readable #t)
(writable #t)
(construct-only #t)
+ (default-value "G_BINDING_DEFAULT")
)
;; GBytes is neither a GObject nor a GInterface. Not checked for signals and properties.
)
)
-(define-function g_module_open_utf8
- (c-name "g_module_open_utf8")
- (return-type "GModule*")
- (parameters
- '("const-gchar*" "file_name")
- '("GModuleFlags" "flags")
- )
-)
-
-(define-method name_utf8
- (of-object "GModule")
- (c-name "g_module_name_utf8")
- (return-type "const-gchar*")
-)
-
;; G_PARAM_STATIC_BLURB = 1 << 7,
;; /* User defined flags go here */
;; G_PARAM_EXPLICIT_NOTIFY = 1 << 30,
-;; G_PARAM_DEPRECATED = 1 << 31
+;; /* Avoid warning with -Wpedantic for gcc6 */
+;; G_PARAM_DEPRECATED = (gint)(1u << 31)
;; } GParamFlags;
(define-flags-extended ParamFlags
'("static-nick" "G_PARAM_STATIC_NICK" "1 << 6")
'("static-blurb" "G_PARAM_STATIC_BLURB" "1 << 7")
'("explicit-notify" "G_PARAM_EXPLICIT_NOTIFY" "1 << 30")
- '("deprecated" "G_PARAM_DEPRECATED" "1 << 31")
+ '("deprecated" "G_PARAM_DEPRECATED" "(gint)(1u << 31)")
)
)
)
)
+(define-function g_enum_to_string
+ (c-name "g_enum_to_string")
+ (return-type "gchar*")
+ (parameters
+ '("GType" "g_enum_type")
+ '("gint" "value")
+ )
+)
+
+(define-function g_flags_to_string
+ (c-name "g_flags_to_string")
+ (return-type "gchar*")
+ (parameters
+ '("GType" "flags_type")
+ '("guint" "value")
+ )
+)
+
(define-method set_enum
(of-object "GValue")
(c-name "g_value_set_enum")
(varargs #t)
)
+(define-function g_object_new_with_properties
+ (c-name "g_object_new_with_properties")
+ (return-type "GObject*")
+ (parameters
+ '("GType" "object_type")
+ '("guint" "n_properties")
+ '("const-char*[]" "names")
+ '("const-GValue[]" "values")
+ )
+)
+
(define-function g_object_newv
(c-name "g_object_newv")
(return-type "gpointer")
(varargs #t)
)
+(define-method setv
+ (of-object "GObject")
+ (c-name "g_object_setv")
+ (return-type "none")
+ (parameters
+ '("guint" "n_properties")
+ '("const-gchar*[]" "names")
+ '("const-GValue[]" "values")
+ )
+)
+
(define-method set_valist
(of-object "GObject")
(c-name "g_object_set_valist")
)
)
+(define-method getv
+ (of-object "GObject")
+ (c-name "g_object_getv")
+ (return-type "none")
+ (parameters
+ '("guint" "n_properties")
+ '("const-gchar*[]" "names")
+ '("GValue[]" "values")
+ )
+)
+
(define-method get_valist
(of-object "GObject")
(c-name "g_object_get_valist")
-;; From gobject_probes.h
-
-
-
;; From gobject_trace.h
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/exceptionhandler.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
_WRAP_ENUM(IOFlags, GIOFlags, NO_GTYPE)
+// Glib::IOCondition::IN and Glib::IOCondition::OUT would be problematic.
+// IN and OUT can be preprocessor macros.
+// See https://bugzilla.gnome.org/show_bug.cgi?id=786717
/** @enum IOCondition
* A bitwise combination representing an I/O condition to watch for on an
* event source.
* on UNIX (see <tt>man 2 poll</tt>). To test for individual flags, do
* something like this:
* @code
- * if ((condition & Glib::IOCondition::OUT) == Glib::IOCondition::OUT)
+ * if ((condition & Glib::IOCondition::IO_OUT) == Glib::IOCondition::IO_OUT)
* do_some_output();
* @endcode
*/
-_WRAP_ENUM(IOCondition, GIOCondition, NO_GTYPE)
+_WRAP_ENUM(IOCondition, GIOCondition, NO_GTYPE,
+ s#^IN$#IO_IN#,
+ s#^OUT$#IO_OUT#,
+ s#^PRI$#IO_PRI#,
+ s#^ERR$#IO_ERR#,
+ s#^HUP$#IO_HUP#,
+ s#^NVAL$#IO_NVAL#)
/** Exception class for IOChannel errors.
*/
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Glib
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
_IGNORE(g_key_file_load_from_dirs)
- _WRAP_METHOD_DOCS_ONLY(g_key_file_load_from_dirs)
+ _WRAP_METHOD_DOCS_ONLY(g_key_file_load_from_dirs, errthrow "Glib::KeyFileError, Glib::FileError")
bool load_from_dirs(const std::string& file, const std::vector<std::string>& search_dirs, std::string& full_path, Flags flags = Flags::NONE);
/** Looks for a KeyFile named @a file in the paths returned from
* into the keyfile object, placing the full path to the file in
* @a full_path.
* @param file The file to search for
- * @param full_path Return location for a string containing the full path of the file
+ * @param[out] full_path Return location for a string containing the full path of the file
* @param flags Bitwise combination of the flags to use for the KeyFile
* @return true if the KeyFile was successfully loaded, false otherwise
* @throw Glib::KeyFileError
Glib::ustring to_data();
_IGNORE(g_key_file_to_data)
- _WRAP_METHOD(bool save_to_file(const std::string& filename), g_key_file_save_to_file, errthrow)
+ _WRAP_METHOD(bool save_to_file(const std::string& filename), g_key_file_save_to_file, errthrow "Glib::FileError")
_WRAP_METHOD(Glib::ustring get_start_group() const, g_key_file_get_start_group)
*/
gint64 get_int64(const Glib::ustring& key) const;
- _WRAP_METHOD(gint64 get_int64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_int64, errthrow)
+ _WRAP_METHOD(gint64 get_int64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_int64, errthrow "Glib::KeyFileError")
/** Gets the value in the first group, under @a key, interpreting it as
* an unsigned 64-bit integer. This is similar to get_integer() but can
*/
guint64 get_uint64(const Glib::ustring& key) const;
- _WRAP_METHOD(guint64 get_uint64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_uint64, errthrow)
+ _WRAP_METHOD(guint64 get_uint64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_uint64, errthrow "Glib::KeyFileError")
/** Gets the value in the first group, under @a key, interpreting it as
* a double.
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/markup.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstddef>
std::vector<std::string>
listenv()
{
- char** value = g_listenv();
- char** end = value;
- while (*end)
- {
- ++end;
- }
- return Glib::ArrayHandler<std::string>::array_to_vector(value, end - value, Glib::OWNERSHIP_DEEP);
+ return Glib::ArrayHandler<std::string>::array_to_vector(g_listenv(), Glib::OWNERSHIP_DEEP);
}
std::string
std::vector<std::string>
get_system_data_dirs()
{
- // TODO: Use a utility function:
- std::vector<std::string> result;
- const char* const* cresult = g_get_system_data_dirs();
- if (!cresult)
- return result;
-
- for (const gchar* const* iter = cresult; *iter != nullptr; ++iter)
- {
- result.emplace_back(convert_const_gchar_ptr_to_stdstring(*iter));
- }
-
- return result;
+ return Glib::ArrayHandler<std::string>::array_to_vector(g_get_system_data_dirs(), Glib::OWNERSHIP_NONE);
}
std::vector<std::string>
get_system_config_dirs()
{
- // TODO: Use a utility function:
- std::vector<std::string> result;
- const char* const* cresult = g_get_system_config_dirs();
- if (!cresult)
- return result;
-
- for (const gchar* const* iter = cresult; *iter != nullptr; ++iter)
- {
- result.emplace_back(convert_const_gchar_ptr_to_stdstring(*iter));
- }
-
- return result;
+ return Glib::ArrayHandler<std::string>::array_to_vector(g_get_system_config_dirs(), Glib::OWNERSHIP_NONE);
}
std::string
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
class Module
{
_CLASS_GENERIC(Module, GModule)
- _IGNORE(g_module_open, g_module_open_utf8, g_module_close)
+ _IGNORE(g_module_open, g_module_close)
public:
* @returns The name of the module
*/
_WRAP_METHOD(std::string get_name() const, g_module_name)
- _IGNORE(g_module_name_utf8)
/** A portable way to build the filename of a module. The
* platform-specific prefix and suffix are added to the filename, if
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
//so it should be used carefully. For instance you could not access data in a derived class via this second instance.
explicit OptionContext(GOptionContext* castitem, bool take_ownership = false);
- //TODO?:
- //OptionContext(const OptionContext& other) = delete;
- //OptionContext& operator=(const OptionContext& other) = delete;
+ OptionContext(const OptionContext& other) = delete;
+ OptionContext& operator=(const OptionContext& other) = delete;
OptionContext(OptionContext&& other) noexcept;
OptionContext& operator=(OptionContext&& other) noexcept;
_WRAP_METHOD(bool get_strict_posix() const, g_option_context_get_strict_posix)
#m4 _CONVERSION(`char**&',`gchar***',`&($3)')
- _WRAP_METHOD(bool parse(int& argc, char**& argv), g_option_context_parse, errthrow)
+ _WRAP_METHOD(bool parse(int& argc, char**& argv), g_option_context_parse, errthrow "Glib::OptionError, Glib::ConvertError")
/** Parses the command line arguments.
*
* @return <tt>true</tt> if the parsing was successful,
* <tt>false</tt> if an error occurred.
* @throw Glib::OptionError
+ * @throw Glib::ConvertError
*/
_WRAP_METHOD(bool parse(char**& argv), g_option_context_parse_strv, errthrow)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/optionentry.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
_WRAP_ENUM(CompileFlags, GRegexCompileFlags, NO_GTYPE)
_WRAP_ENUM(MatchFlags, GRegexMatchFlags, NO_GTYPE)
+ /// @throws Glib::RegexError
static Glib::RefPtr<Glib::Regex> create(const Glib::ustring& pattern, CompileFlags compile_options = static_cast<CompileFlags>(0), MatchFlags match_options = static_cast<MatchFlags>(0));
_WRAP_METHOD(Glib::ustring get_pattern() const, g_regex_get_pattern)
/// A match() method not requiring a Glib::MatchInfo.
bool match(const Glib::ustring& string, MatchFlags match_options = static_cast<MatchFlags>(0));
- /// A match() method with a start position and a Glib::MatchInfo.
+ /** A match() method with a start position and a Glib::MatchInfo.
+ * @throws Glib::RegexError
+ */
bool match(
const Glib::ustring& string,
int start_position,
MatchFlags match_options = static_cast<MatchFlags>(0)
);
- _WRAP_METHOD_DOCS_ONLY(g_regex_match_full)
+ _WRAP_METHOD_DOCS_ONLY(g_regex_match_full, errthrow "Glib::RegexError")
bool match(
const Glib::ustring& string,
gssize string_len,
MatchFlags match_options = static_cast<MatchFlags>(0)
);
- /// A match() method with a start position not requiring a Glib::MatchInfo.
+ /** A match() method with a start position not requiring a Glib::MatchInfo.
+ * @throws Glib::RegexError
+ */
bool match(const Glib::ustring& string, int start_position, MatchFlags match_options);
/** A match() method with a string length and start position not requiring a
/// A match_all() method not requiring a Glib::MatchInfo.
bool match_all(const Glib::ustring& string, MatchFlags match_options = static_cast<MatchFlags>(0));
- /// A match_all() method with a start positon and a Glib::MatchInfo.
+ /** A match_all() method with a start positon and a Glib::MatchInfo.
+ * @throws Glib::RegexError
+ */
bool match_all(
const Glib::ustring& string,
int start_position,
MatchFlags match_options = static_cast<MatchFlags>(0)
);
- _WRAP_METHOD_DOCS_ONLY(g_regex_match_all_full, errthrow)
- /// @throw Glib::Error.
+ _WRAP_METHOD_DOCS_ONLY(g_regex_match_all_full, errthrow "Glib::RegexError")
bool match_all(
const Glib::ustring& string,
gssize string_len,
MatchFlags match_options = static_cast<MatchFlags>(0)
);
- /** A match_all() method with a start position not requiring a
- * Glib::MatchInfo.
+ /** A match_all() method with a start position not requiring a Glib::MatchInfo.
+ * @throws Glib::RegexError
*/
bool match_all(const Glib::ustring& string, int start_position, MatchFlags match_options);
/** A match_all() method with a start position and a string length not
* requiring a Glib::MatchInfo.
+ * @throws Glib::RegexError
*/
bool match_all(const Glib::ustring& string, gssize string_len, int start_position, MatchFlags match_options);
_WRAP_METHOD(static std::vector<Glib::ustring> split_simple(const Glib::ustring& pattern, const Glib::ustring& string, CompileFlags compile_options = static_cast<CompileFlags>(0), MatchFlags match_options = static_cast<MatchFlags>(0)), g_regex_split_simple)
_WRAP_METHOD(std::vector<Glib::ustring> split(const Glib::ustring& string, MatchFlags match_options = static_cast<MatchFlags>(0)), g_regex_split)
- _WRAP_METHOD(std::vector<Glib::ustring> split(const gchar* string, gssize string_len, int start_position, MatchFlags match_options = static_cast<MatchFlags>(0), int max_tokens = 0) const, g_regex_split_full, errthrow)
+ _WRAP_METHOD(std::vector<Glib::ustring> split(const gchar* string, gssize string_len, int start_position, MatchFlags match_options = static_cast<MatchFlags>(0), int max_tokens = 0) const, g_regex_split_full, errthrow "Glib::RegexError")
+ /// @throws Glib::RegexError
std::vector<Glib::ustring> split(const Glib::ustring& string, int start_position, MatchFlags match_options, int max_tokens) const;
- _WRAP_METHOD(Glib::ustring replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, MatchFlags match_options = static_cast<MatchFlags>(0)), g_regex_replace, errthrow)
+ _WRAP_METHOD(Glib::ustring replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, MatchFlags match_options = static_cast<MatchFlags>(0)), g_regex_replace, errthrow "Glib::RegexError")
+ /// @throws Glib::RegexError
Glib::ustring replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, MatchFlags match_options);
- _WRAP_METHOD(Glib::ustring replace_literal(const gchar *string, gssize string_len, int start_position, const Glib::ustring& replacement, MatchFlags match_options = static_cast<MatchFlags>(0)), g_regex_replace_literal, errthrow)
+ _WRAP_METHOD(Glib::ustring replace_literal(const gchar *string, gssize string_len, int start_position, const Glib::ustring& replacement, MatchFlags match_options = static_cast<MatchFlags>(0)), g_regex_replace_literal, errthrow "Glib::RegexError")
+ /// @throws Glib::RegexError
Glib::ustring replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, MatchFlags match_options);
- _WRAP_METHOD(Glib::ustring replace_eval(const Glib::ustring& string, gssize string_len, int start_position, MatchFlags match_options, GRegexEvalCallback eval, gpointer user_data), g_regex_replace_eval, errthrow)
- _WRAP_METHOD(static bool check_replacement(const Glib::ustring& replacement, gboolean* has_references), g_regex_check_replacement, errthrow)
+ _WRAP_METHOD(Glib::ustring replace_eval(const Glib::ustring& string, gssize string_len, int start_position, MatchFlags match_options, GRegexEvalCallback eval, gpointer user_data), g_regex_replace_eval, errthrow "Glib::RegexError")
+ _WRAP_METHOD(static bool check_replacement(const Glib::ustring& replacement, gboolean* has_references), g_regex_check_replacement, errthrow "Glib::RegexError")
};
//TODO: Add C++ iterator like functionality for this class.
_WRAP_METHOD(Glib::ustring get_string() const, g_match_info_get_string)
_WRAP_METHOD(bool matches() const, g_match_info_matches)
- _WRAP_METHOD(bool next(), g_match_info_next, errthrow)
+ _WRAP_METHOD(bool next(), g_match_info_next, errthrow "Glib::RegexError")
_WRAP_METHOD(int get_match_count() const, g_match_info_get_match_count)
_WRAP_METHOD(bool is_partial_match() const, g_match_info_is_partial_match)
- _WRAP_METHOD(Glib::ustring expand_references(const Glib::ustring& string_to_expand), g_match_info_expand_references, errthrow)
+ _WRAP_METHOD(Glib::ustring expand_references(const Glib::ustring& string_to_expand), g_match_info_expand_references, errthrow "Glib::RegexError")
_WRAP_METHOD(Glib::ustring fetch(int match_num), g_match_info_fetch)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free
-dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+dnl License along with this library. If not, see <http://www.gnu.org/licenses/>.
dnl
dnl-----------------------------------------------------------------------
dnl Recursion prevention. (Don't attempt to understand why this works!)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/utility.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/unicode.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free
-dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+dnl License along with this library. If not, see <http://www.gnu.org/licenses/>.
include(template.macros.m4)
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free
-dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+dnl License along with this library. If not, see <http://www.gnu.org/licenses/>.
include(template.macros.m4)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/variant.h>
namespace Glib
{
+/****************** VariantBase ***********************************/
+
VariantBase::VariantBase(GVariant* castitem, bool make_a_copy /* = false */)
{
if (castitem)
gobject_ = castitem;
}
+VariantBase::operator bool() const
+{
+ return gobj();
+}
+
+void
+VariantBase::init(const GVariant* cobject, bool take_a_reference)
+{
+ if (gobject_)
+ g_variant_unref(gobject_);
+
+ gobject_ = const_cast<GVariant*>(cobject);
+ if (take_a_reference)
+ g_variant_ref(gobject_);
+}
+
+bool VariantBase::operator==(const VariantBase& other) const
+{
+ return equal(other);
+}
+
+bool VariantBase::operator!=(const VariantBase& other) const
+{
+ return !equal(other);
+}
+
void
VariantBase::get_normal_form(VariantBase& result) const
{
return true;
}
+/****************** VariantStringBase ***********************************/
+
VariantStringBase::VariantStringBase() : VariantBase()
{
}
output.init(result);
}
+/****************** VariantContainerBase ***********************************/
+
VariantContainerBase::VariantContainerBase() : VariantBase()
{
}
// VariantContainerBase has no method variant_type()
template <>
VariantContainerBase
-VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v) noexcept(false)
+VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v)
{
if (!v.gobj())
return VariantContainerBase();
/****************** Specializations ***********************************/
-VariantBase::operator bool() const
-{
- return gobj();
-}
-
-void
-VariantBase::init(const GVariant* cobject, bool take_a_reference)
-{
- if (gobject_)
- g_variant_unref(gobject_);
-
- gobject_ = const_cast<GVariant*>(cobject);
- if (take_a_reference)
- g_variant_ref(gobject_);
-}
-
/*--------------------Variant<VariantBase>---------------------*/
Variant<VariantBase>::Variant() : VariantContainerBase()
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
*/
_WRAP_METHOD(bool equal(const VariantBase& other) const, g_variant_equal)
+ /** Checks if @a *this and @a other have the same type and value.
+ *
+ * @newin{2,56}
+ *
+ * @param other The Variant to compare with.
+ * @return <tt>true</tt> if @a *this and @a other are equal.
+ */
+ bool operator==(const VariantBase& other) const;
+
+ /** Checks if @a *this and @a other have the same type and value.
+ *
+ * @newin{2,56}
+ *
+ * @param other The Variant to compare with.
+ * @return <tt>true</tt> if @a *this and @a other are not equal.
+ */
+ bool operator!=(const VariantBase& other) const;
+
+ /** Ordering relational operators.
+ * These are explicitly deleted to prevent the compiler from generating
+ * error messages containing long lists of operators that can't be used.
+ */
+ bool operator<(const VariantBase& other) const = delete;
+
+ /// See operator<().
+ bool operator<=(const VariantBase& other) const = delete;
+
+ /// See operator<().
+ bool operator>(const VariantBase& other) const = delete;
+
+ /// See operator<().
+ bool operator>=(const VariantBase& other) const = delete;
+
/** Gets a VariantBase instance that has the same value as this variant and
* is trusted to be in normal form.
*
* @throws std::bad_cast if the Variant was not of the expected type.
*/
template<class V_CastTo>
- static V_CastTo cast_dynamic(const VariantBase& v) noexcept(false);
+ static V_CastTo cast_dynamic(const VariantBase& v);
_IGNORE(g_variant_dict_new)
*/
bool is_castable_to(const VariantType& supertype) const;
#endif //DOXYGEN_SHOULD_SKIP_THIS
-
-private:
- /** Relational operators are deleted to prevent invalid conversion
- * to const void*.
- */
- bool operator<(const VariantBase& src) const;
-
- /// See operator<().
- bool operator<=(const VariantBase& src) const;
-
- /// See operator<().
- bool operator>(const VariantBase& src) const;
-
- /// See operator<().
- bool operator>=(const VariantBase& src) const;
-
- /// See operator<().
- bool operator==(const VariantBase& src) const;
-
- /// See operator<().
- bool operator!=(const VariantBase& src) const;
};
template<class V_CastTo>
V_CastTo VariantBase::cast_dynamic(const VariantBase& v)
-noexcept(false)
{
if(!(v.gobj()))
{
*/
/** If this is a maybe-typed instance, try to extract its value. If there is
- * no value (the value is <tt>nothing</tt>), return <tt>false</tt. Otherwise,
+ * no value (the value is <tt>nothing</tt>), return <tt>false</tt>. Otherwise,
* the value is copied to the supplied Variant and <tt>true</tt> is returned.
*
* @param maybe A place in which to return the value, if it isn’t
};
template<>
-VariantContainerBase VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v)
-noexcept(false);
+VariantContainerBase VariantBase::cast_dynamic<VariantContainerBase>(const VariantBase& v);
/** Template class used for the specialization of the Variant<> classes.
* @newin{2,28}
/** Specialization of Variant containing a VariantBase.
* Perhaps the main use of this is as a maybe-typed (i.e. nullable) Variant, as
- * it inherits methods create_maybe() and get_maybe() from VariantContainerBase.
+ * it inherits the methods create_maybe() and get_maybe() from
+ * VariantContainerBase, plus get_n_children() to allow checking whether there
+ * is a contained value, i.e. the inner Variant is not <tt>nothing</tt>.
*
* @newin{2,28}
* @ingroup Variant
};
/** Specialization of Variant containing a Variant<T>.
+ * Perhaps the main use of this is as a maybe-typed (i.e. nullable) Variant, as
+ * it inherits the methods create_maybe() and get_maybe() from
+ * VariantContainerBase, plus get_n_children() to allow checking whether there
+ * is a contained value, i.e. the inner Variant is not <tt>nothing</tt>.
+ *
* @newin{2,36}
* @ingroup Variant
*/
return type;
}
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace detail
{
template <class Tuple, std::size_t... Is>
(void)swallow {(expander(Variant<typename std::tuple_element<Is, Tuple>::type>::create(std::get<Is>(t))))...};
}
} // namespace detail
+#endif // DOXYGEN_SHOULD_SKIP_THIS
template <class... Types>
Variant<std::tuple<Types...>>
return entry;
}
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace detail
{
// swallows any argument
(void)swallow {(any_arg(std::get<Is>(t) = VariantBase::cast_dynamic<Variant<typename std::tuple_element<Is, Tuple>::type > >(variants[i++]).get()))...};
}
} // namespace detail
+#endif // DOXYGEN_SHOULD_SKIP_THIS
template <class... Types>
std::tuple<Types...> Variant<std::tuple<Types...>>::get() const
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free
-dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+dnl License along with this library. If not, see <http://www.gnu.org/licenses/>.
include(template.macros.m4)
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library; if not, write to the Free
-dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+dnl License along with this library. If not, see <http://www.gnu.org/licenses/>.
include(template.macros.m4)
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
/*
* Copyright (C) 2014 The glibmm Development Team
*
- * This library is free software, ) you can redistribute it and/or
+ * 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.
+ * 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
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/variant.h>
/* Copyright(C) 2010 The glibmm Development Team
*
- * This library is free software, ) you can redistribute it and/or
+ * 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.
+ * 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
+ * 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/variant.h>
/* Copyright(C) 2010 The glibmm Development Team
*
- * This library is free software, ) you can redistribute it and/or
+ * 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.
+ * 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
+ * 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/varianttype.h>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
_DEFS(glibmm,glib)
_WRAP_METHOD(static VariantType create_dict_entry(const VariantType& key, const VariantType& value), g_variant_type_new_dict_entry)
- //TODO: Use something instead of gsize?
- _WRAP_METHOD(gsize _get_string_length() const, g_variant_type_get_string_length)
- dnl wrapped by hand, because g_variant_type_peek_string does not return a C string.
+ _WRAP_METHOD(gsize get_string_length() const, g_variant_type_get_string_length)
+ dnl// wrapped by hand, because g_variant_type_peek_string does not return a nul-terminated C string.
_WRAP_METHOD_DOCS_ONLY(g_variant_type_peek_string)
std::string get_string() const;
_IGNORE(g_variant_type_dup_string)
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstdlib>
#include <ctime>
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glibmm/vectorutils.h>
return result_ok;
}
+bool test_comparison()
+{
+ bool result_ok = true;
+
+ std::vector<int> int_vector1 = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ std::vector<int> int_vector2 = { 1, 2, 3, 4, 5, 6, 7 };
+
+ auto int_variant1 = Glib::Variant<std::vector<int>>::create(int_vector1);
+ auto int_variant2 = Glib::Variant<std::vector<int>>::create(int_vector2);
+ auto int_variant3 = Glib::Variant<std::vector<int>>::create(int_vector1);
+
+ // Equality and inequality operators
+ ostr << "int_variant1 == int_variant2 (0): " << (int_variant1 == int_variant2) << std::endl;
+ result_ok &= !(int_variant1 == int_variant2);
+ ostr << "int_variant1 != int_variant2 (1): " << (int_variant1 != int_variant2) << std::endl;
+ result_ok &= (int_variant1 != int_variant2);
+
+ ostr << "int_variant1 == int_variant3 (1): " << (int_variant1 == int_variant3) << std::endl;
+ result_ok &= (int_variant1 == int_variant3);
+ ostr << "int_variant1 != int_variant3 (0): " << (int_variant1 != int_variant3) << std::endl;
+ result_ok &= !(int_variant1 != int_variant3);
+
+#if 0
+ // Less than (activate if operator<() exists)
+ ostr << "int_variant2 < int_variant1 (1): " << (int_variant2 < int_variant1) << std::endl;
+ result_ok &= (int_variant2 < int_variant1);
+ ostr << "int_variant1 < int_variant3 (0): " << (int_variant1 < int_variant3) << std::endl;
+ result_ok &= !(int_variant1 < int_variant3);
+#endif
+ return result_ok;
+}
+
} // anonymous namespace
int
bool result_ok = test_tuple();
result_ok &= test_object_path();
+ result_ok &= test_comparison();
return result_ok ? EXIT_SUCCESS : EXIT_FAILURE;
}
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
// ugly code ahead.
# 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.
+# License along with this library. If not, see <http://www.gnu.org/licenses/>.
#
#
#
return line
-def parse_dir(dir, doc_dict):
+def parse_dir(dir, exclude_files, doc_dict):
for file in os.listdir(dir):
if file in ('.', '..'): continue
path = os.path.join(dir, file)
+ if path in exclude_files: continue
if os.path.isdir(path):
if not no_recursion:
- parse_dir(path, doc_dict)
+ parse_dir(path, exclude_files, doc_dict)
elif len(file) > 2 and file[-2:] in ('.c', '.h'):
sys.stderr.write("Processing " + path + '\n')
parse_file(open(path, 'r'), doc_dict)
-def extract(dirs, doc_dict=None):
+def extract(dirs, exclude_files, doc_dict=None):
if not doc_dict: doc_dict = {}
for dir in dirs:
- parse_dir(dir, doc_dict)
+ parse_dir(dir, exclude_files, doc_dict)
return doc_dict
tmpl_section_pattern = re.compile(r'^<!-- ##### (\w+) (\w+) ##### -->$')
line = fp.readline()
-def extract_tmpl(dirs, doc_dict=None):
+def extract_tmpl(dirs, exclude_files, doc_dict=None):
if not doc_dict: doc_dict = {}
for dir in dirs:
for file in os.listdir(dir):
if file in ('.', '..'): continue
path = os.path.join(dir, file)
+ if path in exclude_files: continue
if os.path.isdir(path):
continue
if len(file) > 5 and file[-5:] == '.sgml':
def usage():
sys.stderr.write('usage: docextract_to_xml.py ' +
- '[-s /src/dir | --source-dir=/src/dir] [-a | --with-annotations] ' +
- '[-p | --with-properties] [-c | --with-sections] [-r | --no-recursion] ' +
+ '[-s /src/dir | --source-dir=/src/dir] ' +
+ '[-x /src/dir/file-to-exclude | --exclude-file=/src/dir/file-to-exclude] ' +
+ '[-a | --with-annotations] [-p | --with-properties] ' +
+ '[-c | --with-sections] [-r | --no-recursion] ' +
'[-n | --no-since] [-i | --no-signals ] [-e | --no-enums ]\n')
sys.exit(1)
if __name__ == '__main__':
try:
- opts, args = getopt.getopt(sys.argv[1:], "d:s:o:apcrnie",
- ["source-dir=", "with-annotations",
- "with-properties", "with-sections",
- "no-recursion", "no-since",
+ opts, args = getopt.getopt(sys.argv[1:], "s:x:apcrnie",
+ ["source-dir=", "exclude-file=",
+ "with-annotations", "with-properties",
+ "with-sections", "no-recursion", "no-since",
"no-signals", "no-enums"])
except getopt.error as e:
sys.stderr.write('docextract_to_xml.py: %s\n' % e)
usage()
source_dirs = []
+ exclude_files = []
with_annotations = False
with_signals = True
with_properties = False
for opt, arg in opts:
if opt in ('-s', '--source-dir'):
source_dirs.append(arg)
- if opt in ('-a', '--with-annotations'):
+ elif opt in ('-x', '--exclude-file'):
+ exclude_files.append(arg)
+ elif opt in ('-a', '--with-annotations'):
with_annotations = True
- if opt in ('-p', '--with-properties'):
+ elif opt in ('-p', '--with-properties'):
with_properties = True
- if opt in ('-c', '--with-sections'):
+ elif opt in ('-c', '--with-sections'):
with_sections = True
- if opt in ('-r', '--no-recursion'):
+ elif opt in ('-r', '--no-recursion'):
docextract.no_recursion = True
- if opt in ('-n', '--no-since'):
+ elif opt in ('-n', '--no-since'):
docextract.no_since = True
- if opt in ('-i', '--no-signals'):
+ elif opt in ('-i', '--no-signals'):
with_signals = False
- if opt in ('-e', '--no-enums'):
+ elif opt in ('-e', '--no-enums'):
with_enums = False
if len(args) != 0:
usage()
- docs = docextract.extract(source_dirs);
- docextract.extract_tmpl(source_dirs, docs); #Try the tmpl sgml files too.
+ docs = docextract.extract(source_dirs, exclude_files);
+ docextract.extract_tmpl(source_dirs, exclude_files, docs); #Try the tmpl sgml files too.
# print d.docs
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "generate_extra_defs.h"
// g_type_init() is deprecated as of 2.36.
// g_type_init();
+ // Until the glib bug https://bugzilla.gnome.org/show_bug.cgi?id=465631
+ // is fixed, get_defs() must be called for a GObject before it's
+ // called for a GInterface.
+ (void)get_defs(G_TYPE_APPLICATION);
+
std::cout << get_defs(G_TYPE_ASYNC_RESULT) << get_defs(G_TYPE_ACTION)
<< get_defs(G_TYPE_ACTION_GROUP) << get_defs(G_TYPE_APPLICATION)
<< get_defs(G_TYPE_APP_INFO_MONITOR) << get_defs(G_TYPE_CANCELLABLE)
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "generate_extra_defs.h"
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "generate_extra_defs.h"
#include <algorithm>
+#include <regex>
+#include <sstream>
+
+namespace
+{
+void add_signal_flag_if(std::string& strFlags, const char* strFlag,
+ const GSignalQuery& signalQuery, GSignalFlags flag)
+{
+ if (signalQuery.signal_flags & flag)
+ {
+ if (!strFlags.empty())
+ strFlags += ", ";
+ strFlags += strFlag;
+ }
+}
+
+} // anonymous namespace
std::string
get_property_with_node_name(
if (bDeprecated)
strResult += " (deprecated #t)\n"; // Default: not deprecated
+ // Default value:
+ const GValue* defValue = g_param_spec_get_default_value(pParamSpec);
+ std::string defString;
+ bool defValueExists = false;
+ if (G_VALUE_HOLDS_STRING(defValue))
+ {
+ defValueExists = true;
+ const char* defCString = g_value_get_string(defValue);
+ if (defCString)
+ {
+ // Replace newlines with \n.
+ // A string default value can contain newline characters.
+ // gmmproc removes all newlines when it reads .defs files.
+ defString = std::regex_replace(defCString, std::regex("\n"), "\\n");
+ }
+ else
+ defString = ""; // A NULL string pointer becomes an empty string.
+ }
+ else if (G_VALUE_HOLDS_FLOAT(defValue) || G_VALUE_HOLDS_DOUBLE(defValue))
+ {
+ // g_value_transform() can transform a floating point value to a terrible
+ // string, especially if the value is huge.
+ defValueExists = true;
+ const double defDouble = G_VALUE_HOLDS_FLOAT(defValue) ?
+ g_value_get_float(defValue) : g_value_get_double(defValue);
+ std::ostringstream defStringStream;
+ defStringStream << defDouble;
+ defString = defStringStream.str();
+ }
+ else
+ {
+ GValue defStringValue = G_VALUE_INIT;
+ g_value_init(&defStringValue, G_TYPE_STRING);
+
+ if (g_value_transform(defValue, &defStringValue))
+ {
+ const char* defCString = g_value_get_string(&defStringValue);
+ if (defCString)
+ {
+ defValueExists = true;
+ defString = defCString;
+ }
+ }
+ g_value_unset(&defStringValue);
+ }
+
+ if (defValueExists)
+ strResult += " (default-value \"" + defString + "\")\n";
+
strResult += ")\n\n"; // close (strNodeName
return strResult;
// G_SIGNAL_TYPE_STATIC_SCOPE;
strResult += " (return-type \"" + strReturnTypeName + "\")\n";
- // When:
- {
- bool bWhenFirst = (signalQuery.signal_flags & G_SIGNAL_RUN_FIRST) == G_SIGNAL_RUN_FIRST;
- bool bWhenLast = (signalQuery.signal_flags & G_SIGNAL_RUN_LAST) == G_SIGNAL_RUN_LAST;
-
- std::string strWhen = "unknown";
-
- if (bWhenFirst && bWhenLast)
- strWhen = "both";
- else if (bWhenFirst)
- strWhen = "first";
- else if (bWhenLast)
- strWhen = "last";
-
- strResult += " (when \"" + strWhen + "\")\n";
- }
- bool bDeprecated = (signalQuery.signal_flags & G_SIGNAL_DEPRECATED) == G_SIGNAL_DEPRECATED;
- if (bDeprecated)
+ // Flags:
+ std::string strFlags;
+ add_signal_flag_if(strFlags, "Run First", signalQuery, G_SIGNAL_RUN_FIRST);
+ add_signal_flag_if(strFlags, "Run Last", signalQuery, G_SIGNAL_RUN_LAST);
+ add_signal_flag_if(strFlags, "Run Cleanup", signalQuery, G_SIGNAL_RUN_CLEANUP);
+ add_signal_flag_if(strFlags, "No Recurse", signalQuery, G_SIGNAL_NO_RECURSE);
+ add_signal_flag_if(strFlags, "Action", signalQuery, G_SIGNAL_ACTION);
+ add_signal_flag_if(strFlags, "No Hooks", signalQuery, G_SIGNAL_NO_HOOKS);
+ add_signal_flag_if(strFlags, "Must Collect", signalQuery, G_SIGNAL_MUST_COLLECT);
+ strResult += " (flags \"" + strFlags + "\")\n";
+
+ if (signalQuery.signal_flags & G_SIGNAL_DETAILED)
+ strResult += " (detailed #t)\n"; // Default: not detailed
+
+ if (signalQuery.signal_flags & G_SIGNAL_DEPRECATED)
strResult += " (deprecated #t)\n"; // Default: not deprecated
// Loop through the list of parameters:
-/* $Id$ */
-
/* generate_extra_defs.h
*
* Copyright (C) 2001 The Free Software Foundation
* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <glib-object.h>
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# 'classes':
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Based on XML::Parser tutorial found at http://www.devshed.com/Server_Side/Perl/PerlXML/PerlXML1/page1.html
# Replace @newin in the enum description, but don't in the element descriptions.
my $description = "\@enum $cpp_enum_name\n";
$description .= $$objFunction{description};
- DocsParser::convert_docs_to_cpp($objFunction, \$description);
+ DocsParser::convert_docs_to_cpp($c_enum_name, \$description);
DocsParser::replace_or_add_newin(\$description, $newin);
# Add note about deprecation if we have specified that in our _WRAP_ENUM(),
}
# Append the enum description docs.
- DocsParser::convert_docs_to_cpp($objFunction, \$docs);
+ DocsParser::convert_docs_to_cpp($c_enum_name, \$docs);
$docs .= "\n\n$description";
DocsParser::add_m4_quotes(\$docs);
return $docs;
}
-# $strCommentBlock lookup_documentation($strFunctionName, $deprecation_docs, $newin, $objCppfunc)
-# The final objCppfunc parameter is optional. If passed, it is used to
-# decide if the final C parameter should be omitted if the C++ method
-# has a slot parameter. It is also used for converting C parameter names to
-# C++ parameter names in the documentation, if they differ.
-sub lookup_documentation($$$;$)
+# $strCommentBlock lookup_documentation($strFunctionName, $deprecation_docs,
+# $newin, $objCppfunc, $errthrow, $voidreturn)
+# The parameters from objCppfunc are optional. If objCppfunc is passed, it is used for
+# - deciding if the final C parameter shall be omitted if the C++ method
+# has a slot parameter,
+# - converting C parameter names to C++ parameter names in the documentation,
+# if they differ,
+# - deciding if the @return section shall be omitted.
+sub lookup_documentation($$$;$$$)
{
- my ($functionName, $deprecation_docs, $newin, $objCppfunc) = @_;
+ my ($functionName, $deprecation_docs, $newin, $objCppfunc, $errthrow, $voidreturn) = @_;
my $objFunction = $DocsParser::hasharrayFunctions{$functionName};
if(!$objFunction)
print "DocsParser.pm: Warning: No C docs for: \"$functionName\"\n";
}
- DocsParser::convert_docs_to_cpp($objFunction, \$text);
+ DocsParser::convert_docs_to_cpp($functionName, \$text);
DocsParser::replace_or_add_newin(\$text, $newin);
# A blank line, marking the end of a paragraph, is needed after @newin.
# Most @newins are at the end of a function description.
}
my %param_name_mappings = DocsParser::append_parameter_docs($objFunction, \$text, $objCppfunc);
- DocsParser::append_return_docs($objFunction, \$text);
+ unless ((defined($objCppfunc) && $$objCppfunc{rettype} eq "void") || $voidreturn)
+ {
+ DocsParser::append_return_docs($objFunction, \$text);
+ }
+ DocsParser::add_throws(\$text, $errthrow);
# Convert C parameter names to C++ parameter names where they differ.
foreach my $key (keys %param_name_mappings)
return $text;
}
+# void convert_value_to_cpp(\$text)
+# Converts e.g. a property's default value.
+sub convert_value_to_cpp($)
+{
+ my ($text) = @_;
+
+ $$text =~ s"\bFALSE\b"<tt>false</tt>"g;
+ $$text =~ s"\bTRUE\b"<tt>true</tt>"g;
+ $$text =~ s"\bNULL\b"<tt>nullptr</tt>"g;
+
+ # Enumerator names
+ $$text =~ s/\b([A-Z]+)_([A-Z\d_]+)\b/&DocsParser::substitute_enumerator_name($1, $2)/eg;
+}
+
# void remove_example_code($obj_name, \$text)
# Removes example code from the text of docs (passed by reference).
sub remove_example_code($$)
# due to imperfections in the C docs, and it's difficult to get the C docs
# corrected, correct docs can be added to the docs_override.xml file.
+ if (scalar @docs_param_names != scalar @c_param_names)
+ {
+ print STDERR "DocsParser.pm: Warning, $$obj_function{name}\n" .
+ " Incompatible parameter lists in the docs.xml file and the methods.defs file.\n";
+ }
+
# Skip first param if this is a signal.
if ($$obj_function{name} =~ /\w+::/)
{
# Skip the last param if it's an error output param.
if (scalar @docs_param_names && $docs_param_names[-1] eq "error")
{
- pop(@docs_param_names);
- pop(@c_param_names);
+ # If the number of parameters in @docs_param_names is not greater than
+ # the number of parameters in the _WRAP macro, the parameter called "error"
+ # is probably not an error output parameter.
+ if (!defined($objCppfunc) || scalar @docs_param_names > scalar @{$$objCppfunc{param_names}})
+ {
+ pop(@docs_param_names);
+ pop(@c_param_names);
+ }
}
my $cpp_param_names;
{
$out_param_index = $$param_mappings{OUT};
}
+ if (scalar @docs_param_names != scalar @$cpp_param_names)
+ {
+ print STDERR "DocsParser.pm: Warning, $$obj_function{name}\n" .
+ " Incompatible parameter lists in the docs.xml file and the _WRAP macro.\n";
+ }
}
my %param_name_mappings; # C name -> C++ name
$param_name_mappings{$param} = "slot";
}
- DocsParser::convert_docs_to_cpp($obj_function, \$desc);
+ DocsParser::convert_docs_to_cpp($$obj_function{name}, \$desc);
if(length($desc) > 0)
{
$desc .= '.' unless($desc =~ /(?:^|\.)$/);
my ($obj_function, $text) = @_;
my $desc = $$obj_function{return_description};
- DocsParser::convert_docs_to_cpp($obj_function, \$desc);
+ DocsParser::convert_docs_to_cpp($$obj_function{name}, \$desc);
$desc =~ s/\.$//;
$$text .= "\n\@return \u${desc}." unless($desc eq "");
sub convert_docs_to_cpp($$)
{
- my ($obj_function, $text) = @_;
+ my ($doc_func, $text) = @_;
# Chop off leading and trailing whitespace.
$$text =~ s/^\s+//;
# Convert C documentation to C++.
DocsParser::remove_c_memory_handling_info($text);
DocsParser::convert_tags_to_doxygen($text);
- DocsParser::substitute_identifiers($$obj_function{name}, $text);
+ DocsParser::substitute_identifiers($doc_func, $text);
$$text =~ s/\bX\s+Window\b/X \%Window/g;
$$text =~ s/\bWindow\s+manager/\%Window manager/g;
}
}
+# void add_throws(\$text, $errthrow)
+# If $errthrow is defined and not empty, and $$text does not contain a @throw,
+# @throws or @exception Doxygen command, add one or more @throws commands.
+sub add_throws($$)
+{
+ my ($text, $errthrow) = @_;
+
+ return if (!defined($errthrow) or $errthrow eq "");
+
+ if (!($$text =~ /[\@\\](throws?|exception)\b/))
+ {
+ # Each comma, not preceded by backslash, creates a new @throws command.
+ $errthrow =~ s/([^\\]),\s*/$1\n\@throws /g;
+ $errthrow =~ s/\\,/,/g; # Delete backslash before comma
+ $$text .= "\n\n\@throws $errthrow";
+ }
+}
+
# Convert <simplelist> tags to a list of newline-separated elements.
sub convert_simplelist($)
{
return $self;
}
-# $string get_refdoc_comment($existing_signal_docs)
+# $string get_refdoc_comment($existing_signal_docs, $signal_flags)
# Generate a readable prototype for signals and merge the prototype into the
# existing Doxygen comment block.
-sub get_refdoc_comment($$)
+sub get_refdoc_comment($$$)
{
- my ($self, $documentation) = @_;
+ my ($self, $documentation, $signal_flags) = @_;
my $str = " /**\n";
$str .= ")</tt>\n";
$str .= " *\n";
+ if ($signal_flags)
+ {
+ $str .= " * Flags: $signal_flags\n *\n";
+ }
+
if($documentation ne "")
{
# Remove the initial '/** ' from the existing docs and merge it.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
package GtkDefs;
use strict;
#
# string rettype;
#
-# string when. e.g. first, last, or both.
+# string flags. e.g. Run Last, No Hooks
# string entity_type. e.g. vfunc or signal
+# bool detailed; # optional
# bool deprecated; # optional
# }
$$self{rettype} = "none";
$$self{param_types} = [];
$$self{param_names} = [];
- $$self{when} = "";
+ $$self{flags} = "";
$$self{class} = "";
# snarf down lisp fields
$$self{rettype} =~ s/-/ /g; #e.g. replace const-gchar* with const gchar*. Otherwise it will be used in code.
}
- if($def =~ s/\(when "(\S+)"\)//)
+ if ($def =~ s/\(flags "(.*?)"\)//)
{
- $$self{when} = $1;
+ $$self{flags} = $1;
+ }
+ elsif ($def =~ s/\(when "(\S+)"\)//)
+ {
+ # "when" is a deprecated alternative to "flags".
+ # when eq "none", "first", "last", or "both".
+ if ($1 eq "first")
+ {
+ $$self{flags} = "Run First";
+ }
+ elsif ($1 eq "last")
+ {
+ $$self{flags} = "Run Last";
+ }
+ elsif ($1 eq "both")
+ {
+ $$self{flags} = "Run First, Run Last";
+ }
}
if($$self{rettype} eq "none")
$$self{rettype} = "void"
}
+ $$self{detailed} = ($1 eq "#t") if ($def =~ s/\(detailed (\S+)\)//);
$$self{deprecated} = ($1 eq "#t") if ($def =~ s/\(deprecated (\S+)\)//);
# signals always have a parameter
return $self;
}
+# bool get_detailed()
+sub get_detailed($)
+{
+ my ($self) = @_;
+ return $$self{detailed}; # undef, 0 or 1
+}
+
# bool get_deprecated()
sub get_deprecated($)
{
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
package Output;
use strict;
print STDERR "Warning, $main::source: The $entity_name $entity_type" .
" is deprecated in the .defs file, but not in _WRAP_$wrapper.\n";
}
- # Uncomment the following lines some time in the future, when most
- # signal.defs files have been updated with deprecation information.
- # generate_extra_defs.cc was updated to generate this info soon after
- # glibmm 2.47.6.
- #elsif (!$defs_deprecated && $wrap_deprecated)
- #{
- # print STDERR "Warning, $main::source: The $entity_name $entity_type" .
- # " is deprecated in _WRAP_$wrapper, but not in the .defs file.\n";
- #}
+ elsif (!$defs_deprecated && $wrap_deprecated)
+ {
+ print STDERR "Warning, $main::source: The $entity_name $entity_type" .
+ " is deprecated in _WRAP_$wrapper, but not in the .defs file.\n";
+ }
}
sub ifdef($$)
# Create a merged Doxygen comment block for the signal from the looked up
# docs (the block will also contain a prototype of the slot as an example).
- my $doxycomment = $objCppfunc->get_refdoc_comment($documentation);
+ my $doxycomment = $objCppfunc->get_refdoc_comment($documentation, $$objCSignal{flags});
# If there was already a previous doxygen comment, we want to merge this
# one with the previous so it is one big comment. If
my $proxy_suffix = "";
# Read/Write:
- if($objProperty->get_construct_only() eq 1)
+ if ($objProperty->get_construct_only())
{
# construct-only functions can be read, but not written.
$proxy_suffix = "_ReadOnly";
- if($objProperty->get_readable() ne 1)
+ if (!$objProperty->get_readable())
{
$self->output_wrap_failed($name, "attempt to wrap write-only and construct-only property.");
return;
}
}
- elsif($objProperty->get_readable() ne 1)
+ elsif (!$objProperty->get_readable())
{
$proxy_suffix = "_WriteOnly";
}
- elsif($objProperty->get_writable() ne 1)
+ elsif (!$objProperty->get_writable())
{
$proxy_suffix = "_ReadOnly";
}
my $objdoc = $objProperty->get_docs("", "");
if ($objdoc ne "")
{
- add_m4_quotes(\$objdoc);
$documentation = "$objdoc\n *\n * $documentation";
}
}
{
# Try to get the (usually short) documentation from the Property object.
$documentation = $objProperty->get_docs($deprecation_docs, $newin);
+ }
+
+ # Default value, if available:
+ my $default_value = $objProperty->get_default_value();
+ if (defined($default_value))
+ {
+ DocsParser::convert_value_to_cpp(\$default_value);
+
+ # Add double quotes around a string value.
+ if ($objProperty->get_type() eq "GParamString")
+ {
+ $default_value = "\"" . $default_value . "\"";
+ }
+ $default_value = "Default value: $default_value";
+ add_m4_quotes(\$default_value);
if ($documentation ne "")
{
- add_m4_quotes(\$documentation);
+ $documentation .= "\n *\n * ";
}
+ $documentation .= $default_value;
}
#Declaration:
use strict;
use warnings;
+use DocsParser;
BEGIN {
use Exporter ();
# bool writable;
# bool construct_only;
# bool deprecated; # optional
+# string default_value; # optional
# string docs;
# }
$$self{writable} = ($1 eq "#t") if ($def =~ s/\(writable (\S+)\)//);
$$self{construct_only} = ($1 eq "#t") if ($def =~ s/\(construct-only (\S+)\)//);
$$self{deprecated} = ($1 eq "#t") if ($def =~ s/\(deprecated (\S+)\)//);
+ $$self{default_value} = $1 if ($def =~ s/\(default-value "(.*?)"\)//);
$$self{entity_type} = 'property';
# Property documentation:
- my $propertydocs = $1 if ($def =~ s/\(docs "([^"]*)"\)//);
+ my $propertydocs = $1 if ($def =~ s/\(docs "([^"]*)"\)//);
# Add a full-stop if there is not one already:
if(defined($propertydocs))
{
return $$self{deprecated}; # undef, 0 or 1
}
+sub get_default_value($)
+{
+ my ($self) = @_;
+ return $$self{default_value}; # undef or a string (possibly empty)
+}
+
sub get_docs($$)
{
my ($self, $deprecation_docs, $newin) = @_;
my $text = $$self{docs};
+ DocsParser::convert_docs_to_cpp("$$self{class}:$$self{name}", \$text);
+
#Add note about deprecation if we have specified that in our _WRAP_PROPERTY()
#or_WRAP_CHILD_PROPERTY() call:
if($deprecation_docs ne "")
$text .= "\n *\n * \@newin{$newin}";
}
+ if ($text ne "")
+ {
+ DocsParser::add_m4_quotes(\$text);
+ }
+
return $text;
}
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# This file holds basic functions used throughout gtkmmproc modules.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
package WrapParser;
use strict;
$$objCfunc{throw_any_errors} = 0;
$$objCfunc{constversion} = 0;
$$objCfunc{deprecated} = "";
+ my $errthrow_docs = "";
my $deprecation_docs = "";
my $newin = "";
my $ifdef;
{
$$objCfunc{rettype_needs_ref} = 1;
}
- elsif($argRef eq "errthrow")
+ elsif($argRef =~ /^errthrow(.*)/) #If errthrow is at the start.
{
$$objCfunc{throw_any_errors} = 1;
+ $errthrow_docs = ($1 ne "") ? string_unquote(string_trim($1)) : "Glib::Error";
}
elsif($argRef eq "constversion")
{
else
{
$commentblock = DocsParser::lookup_documentation($argCFunctionName,
- $deprecation_docs, $newin, $objCppfunc);
+ $deprecation_docs, $newin, $objCppfunc, $errthrow_docs);
}
$objOutputter->output_wrap_meth($filename, $line_num, $objCppfunc, $objCfunc, $argCppMethodDecl, $commentblock, $ifdef);
}
$$objCfunc{throw_any_errors} = 0;
+ my $errthrow_docs = "";
my $newin = "";
+ my $voidreturn = 0;
while($#args >= 1) # If the optional ref/err arguments are there.
{
my $argRef = string_trim(pop @args);
- if($argRef eq "errthrow")
+ if($argRef =~ /^errthrow(.*)/) #If errthrow is at the start.
{
$$objCfunc{throw_any_errors} = 1;
+ $errthrow_docs = ($1 ne "") ? string_unquote(string_trim($1)) : "Glib::Error";
}
elsif($argRef =~ /^newin(.*)/) #If newin is at the start.
{
$newin = string_unquote(string_trim($1));
}
+ elsif($argRef eq "voidreturn")
+ {
+ $voidreturn = 1;
+ }
}
my $commentblock = "";
- $commentblock = DocsParser::lookup_documentation($argCFunctionName, "", $newin);
+ $commentblock = DocsParser::lookup_documentation($argCFunctionName, "", $newin,
+ undef, $errthrow_docs, $voidreturn);
$objOutputter->output_wrap_meth_docs_only($filename, $line_num, $commentblock);
}
$objCSignal = GtkDefs::lookup_signal($$self{c_class}, $signal_name);
# Check for failed lookup.
- if($objCSignal eq 0)
+ if (!$objCSignal)
{
print STDERR "$signal_name\n";
$objOutputter->output_wrap_failed($signal_name,
}
}
+ # Check detailed.
+ my $defs_detailed = $objCSignal->get_detailed();
+ if ($defs_detailed && !$detail_name)
+ {
+ print STDERR "Warning, $main::source: The $signal_name signal" .
+ " is marked 'detailed' in the .defs file, but not in _WRAP_SIGNAL.\n";
+ }
+ elsif (!$defs_detailed && $detail_name)
+ {
+ print STDERR "Warning, $main::source: The $signal_name signal" .
+ " is marked 'detailed' in _WRAP_SIGNAL, but not in the .defs file.\n";
+ }
+
Output::check_deprecation($$self{deprecated}, $objCSignal->get_deprecated(),
$deprecated, $signal_name, "signal", "SIGNAL");
$deprecated, $deprecation_docs, $newin, $exceptionHandler,
$detail_name, $bTwoSignalMethods);
- if($bNoDefaultHandler eq 0)
+ if (!$bNoDefaultHandler)
{
$objOutputter->output_wrap_default_signal_handler_h($filename, $line_num,
$objCppSignal, $objCSignal, $ifdef, $deprecated, $exceptionHandler);