[glibmm/sigc3v2: 5/7] sigc3: .hg/.ccg files: Use sigc::slot<R(Args...)> syntax.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/sigc3v2: 5/7] sigc3: .hg/.ccg files: Use sigc::slot<R(Args...)> syntax.
- Date: Thu, 31 Mar 2016 12:21:54 +0000 (UTC)
commit f5c49ff91bda9d436aa5933d0fd8ec37e8afc198
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Mar 31 12:52:18 2016 +0200
sigc3: .hg/.ccg files: Use sigc::slot<R(Args...)> syntax.
gio/src/actionmap.hg | 8 ++++----
gio/src/application.ccg | 4 ++--
gio/src/asyncresult.hg | 2 +-
gio/src/cancellable.hg | 2 +-
gio/src/dbusconnection.hg | 8 ++++----
gio/src/dbusinterfacevtable.hg | 12 ++++++------
gio/src/dbusownname.hg | 6 +++---
gio/src/dbussubtreevtable.hg | 12 ++++++------
gio/src/dbuswatchname.hg | 4 ++--
gio/src/file.hg | 6 +++---
gio/src/memoryinputstream.hg | 2 +-
glib/src/balancedtree.hg | 10 +++++-----
glib/src/binding.hg | 28 ++++++++++++++--------------
glib/src/bytearray.hg | 2 +-
glib/src/nodetree.hg | 16 ++++++++--------
glib/src/optioncontext.hg | 2 +-
glib/src/optiongroup.hg | 6 +++---
glib/src/spawn.hg | 2 +-
glib/src/thread.ccg | 10 +++++-----
glib/src/thread.hg | 8 ++++----
glib/src/threads.ccg | 8 ++++----
glib/src/threads.hg | 6 +++---
glib/src/valuearray.hg | 2 +-
23 files changed, 83 insertions(+), 83 deletions(-)
---
diff --git a/gio/src/actionmap.hg b/gio/src/actionmap.hg
index 6bbc46d..a2247aa 100644
--- a/gio/src/actionmap.hg
+++ b/gio/src/actionmap.hg
@@ -59,7 +59,7 @@ public:
* For instance,
* void on_slot_activated(const Glib::VariantBase& parameter);
*/
- using ActivateWithParameterSlot = sigc::slot<void, const Glib::VariantBase&>;
+ using ActivateWithParameterSlot = sigc::slot<void(const Glib::VariantBase&)>;
//This is an equivalent for g_action_map_add_action_entries().
/** A convenience method for creating a SimpleAction instance
@@ -88,7 +88,7 @@ public:
* For instance,
* void on_slot_activated();
*/
- using ActivateSlot = sigc::slot<void>;
+ using ActivateSlot = sigc::slot<void()>;
/** A convenience method for creating a SimpleAction instance
* and adding it to the ActionMap.
@@ -136,7 +136,7 @@ public:
* For instance,
* void on_slot_activated(const Glib::VariantBase& parameter);
*/
- using ActivateWithStringParameterSlot = sigc::slot<void, const Glib::ustring&>;
+ using ActivateWithStringParameterSlot = sigc::slot<void(const Glib::ustring&)>;
//TODO: Docs: Add hints about how to specify the various possible states in the GtkBuilder XML.
/** A convenience method for creating a string-based radio SimpleAction instance
@@ -165,7 +165,7 @@ public:
* For instance,
* void on_slot_activated(const Glib::VariantBase& parameter);
*/
- using ActivateWithIntParameterSlot = sigc::slot<void, int>;
+ using ActivateWithIntParameterSlot = sigc::slot<void(int)>;
//TODO: Docs: Add hints about how to specify the various possible states in the GtkBuilder XML.
/** A convenience method for creating an integer-based radio SimpleAction instance
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index 7b53edf..75e876d 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -57,7 +57,7 @@ static void
Application_signal_open_callback(
GApplication* self, GFile** files, gint n_files, const gchar* hint, void* data)
{
- using SlotType = sigc::slot<void, const Gio::Application::type_vec_files&, const Glib::ustring&>;
+ using SlotType = sigc::slot<void(const Gio::Application::type_vec_files&, const Glib::ustring&)>;
Gio::Application::type_vec_files vec_files(n_files);
for (int i = 0; i < n_files; ++i)
@@ -92,7 +92,7 @@ Application_signal_open_notify_callback(
GApplication* self, GFile** files, gint n_files, const gchar* hint, void* data)
{
using namespace Gio;
- using SlotType = sigc::slot<void, const Application::type_vec_files&, const Glib::ustring&>;
+ using SlotType = sigc::slot<void(const Application::type_vec_files&, const Glib::ustring&)>;
Application::type_vec_files vec_files(n_files);
for (int i = 0; i < n_files; i++)
diff --git a/gio/src/asyncresult.hg b/gio/src/asyncresult.hg
index 7d9567c..681b380 100644
--- a/gio/src/asyncresult.hg
+++ b/gio/src/asyncresult.hg
@@ -42,7 +42,7 @@ class AsyncResult;
*
* @newin{2,16}
*/
-using SlotAsyncReady = sigc::slot<void, Glib::RefPtr<AsyncResult>&>;
+using SlotAsyncReady = sigc::slot<void(Glib::RefPtr<AsyncResult>&)>;
/** Provides a base class for implementing asynchronous function results.
* Asynchronous operations are broken up into two separate operations which are chained together by a
SlotAsyncReady.
diff --git a/gio/src/cancellable.hg b/gio/src/cancellable.hg
index 47196c0..c176982 100644
--- a/gio/src/cancellable.hg
+++ b/gio/src/cancellable.hg
@@ -37,7 +37,7 @@ protected:
_CTOR_DEFAULT
public:
- using SlotCancelledCallback = sigc::slot<void>;
+ using SlotCancelledCallback = sigc::slot<void()>;
_WRAP_CREATE()
diff --git a/gio/src/dbusconnection.hg b/gio/src/dbusconnection.hg
index 6b0e558..96b65c8 100644
--- a/gio/src/dbusconnection.hg
+++ b/gio/src/dbusconnection.hg
@@ -173,9 +173,9 @@ public:
* Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters);.
* @endcode
*/
- using SlotSignal = sigc::slot<void, const Glib::RefPtr<Connection>&,
+ using SlotSignal = sigc::slot<void(const Glib::RefPtr<Connection>&,
const Glib::ustring&, const Glib::ustring&, const Glib::ustring&,
- const Glib::ustring&, const Glib::VariantContainerBase&>;
+ const Glib::ustring&, const Glib::VariantContainerBase&)>;
/** Signature for slot used in add_filter().
* For example,
@@ -191,9 +191,9 @@ public:
* drop a message can simply return <tt>0</tt>. And filter function may
* modify a message by copying it and return the copy.
*/
- using SlotMessageFilter = sigc::slot<Glib::RefPtr<Message>,
+ using SlotMessageFilter = sigc::slot<Glib::RefPtr<Message>(
const Glib::RefPtr<Connection>&,
- const Glib::RefPtr<Message>&, bool>;
+ const Glib::RefPtr<Message>&, bool)>;
/** Asynchronously connects to the message bus specified by @a bus_type.
*
diff --git a/gio/src/dbusinterfacevtable.hg b/gio/src/dbusinterfacevtable.hg
index caf181a..c4081e7 100644
--- a/gio/src/dbusinterfacevtable.hg
+++ b/gio/src/dbusinterfacevtable.hg
@@ -63,14 +63,14 @@ public:
* @endcode
*/
using SlotInterfaceMethodCall = sigc::slot<
- void,
+ void(
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::VariantContainerBase&,
- const Glib::RefPtr<MethodInvocation>&
+ const Glib::RefPtr<MethodInvocation>&)
>;
/** The type for a slot which handles getting a property for a D-Bus
@@ -85,13 +85,13 @@ public:
* @throw Glib::Error.
*/
using SlotInterfaceGetProperty = sigc::slot<
- void,
+ void(
Glib::VariantBase&,
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&,
- const Glib::ustring&
+ const Glib::ustring&)
>;
/** The type for a slot which handles setting a property for a D-Bus
@@ -106,13 +106,13 @@ public:
* @throw Glib::Error.
*/
using SlotInterfaceSetProperty = sigc::slot<
- bool,
+ bool(
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&,
- const Glib::VariantBase&
+ const Glib::VariantBase&)
>;
/** Constructs a new InterfaceVTable using the specified slots.
diff --git a/gio/src/dbusownname.hg b/gio/src/dbusownname.hg
index 8690d10..5944f43 100644
--- a/gio/src/dbusownname.hg
+++ b/gio/src/dbusownname.hg
@@ -35,21 +35,21 @@ _WRAP_ENUM(BusNameOwnerFlags, GBusNameOwnerFlags, s#^DBUS_##)
* @newin{2,28}
* @ingroup DBus
*/
-using SlotBusAcquired = sigc::slot<void, const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring>;
+using SlotBusAcquired = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring)>;
/** For example,
* void on_name_acquired(const Glib::RefPtr<Gio::DBus::Connection>& connection,
* const Glib::ustring& name);
* @ingroup DBus
*/
-using SlotNameAcquired = sigc::slot<void, const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring>;
+using SlotNameAcquired = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring)>;
/** For example,
* void on_name_lost(const Glib::RefPtr<Gio::DBus::Connection>& connection,
* const Glib::ustring& name);
* @ingroup DBus
*/
-using SlotNameLost = sigc::slot<void, const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring>;
+using SlotNameLost = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring)>;
//TODO: See https://bugzilla.gnome.org/show_bug.cgi?id=646427 about the apparent uselessness of
SlotNameAcquired.
//TODO: Add example from C API in class docs.
diff --git a/gio/src/dbussubtreevtable.hg b/gio/src/dbussubtreevtable.hg
index ead80ee..3c2d6d8 100644
--- a/gio/src/dbussubtreevtable.hg
+++ b/gio/src/dbussubtreevtable.hg
@@ -67,10 +67,10 @@ public:
* @endcode
*/
using SlotSubtreeEnumerate = sigc::slot<
- std::vector<Glib::ustring>,
+ std::vector<Glib::ustring>(
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
- const Glib::ustring&
+ const Glib::ustring&)
>;
/** The type for a slot which handles introspecting a child node.
@@ -94,11 +94,11 @@ public:
* @endcode
*/
using SlotSubtreeIntrospect = sigc::slot<
- std::vector< Glib::RefPtr<Gio::DBus::InterfaceInfo> >,
+ std::vector< Glib::RefPtr<Gio::DBus::InterfaceInfo> >(
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&,
- const Glib::ustring&
+ const Glib::ustring&)
>;
/** The type for a slot which handles dispatching a remote call on a child
@@ -116,12 +116,12 @@ public:
* @endcode
*/
using SlotSubtreeDispatch = sigc::slot<
- const InterfaceVTable*,
+ const InterfaceVTable*(
const Glib::RefPtr<Connection>&,
const Glib::ustring&,
const Glib::ustring&,
const Glib::ustring&,
- const Glib::ustring&
+ const Glib::ustring&)
>;
/** Constructs a new SubtreeVTable using specified slots.
diff --git a/gio/src/dbuswatchname.hg b/gio/src/dbuswatchname.hg
index dd697ce..63cdab4 100644
--- a/gio/src/dbuswatchname.hg
+++ b/gio/src/dbuswatchname.hg
@@ -34,14 +34,14 @@ _WRAP_ENUM(BusNameWatcherFlags, GBusNameWatcherFlags, s#^DBUS_##, NO_GTYPE)
* const Glib::ustring& name, const Glib::ustring& name_owner);
* @ingroup DBus
*/
-using SlotNameAppeared = sigc::slot<void, const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring, const
Glib::ustring&>;
+using SlotNameAppeared = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring, const
Glib::ustring&)>;
/** For example,
* void on_name_vanished(const Glib::RefPtr<Gio::DBus::Connection>& connection,
* const Glib::ustring& name);
* @ingroup DBus
*/
-using SlotNameVanished = sigc::slot<void, const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring>;
+using SlotNameVanished = sigc::slot<void(const Glib::RefPtr<Gio::DBus::Connection>&, Glib::ustring)>;
//TODO: Add example from C API in class docs?
/** Starts watching @a name on the bus specified by @a bus_type and calls
diff --git a/gio/src/file.hg b/gio/src/file.hg
index 71e1ca9..2356c40 100644
--- a/gio/src/file.hg
+++ b/gio/src/file.hg
@@ -1118,7 +1118,7 @@ public:
/** A signal handler would be, for instance:
* void on_file_progress(goffset current_num_bytes, goffset total_num_bytes);
*/
- using SlotFileProgress = sigc::slot<void, goffset, goffset>;
+ using SlotFileProgress = sigc::slot<void(goffset, goffset)>;
/** Copies the file source to the location specified by destination. Can not handle recursive copies of
directories.
* If the flag FILE_COPY_OVERWRITE is specified an already existing destination file is overwritten.
@@ -1803,7 +1803,7 @@ public:
*
* @newin{2,38}
*/
- using SlotFileMeasureProgress = sigc::slot<void, bool, guint64, guint64, guint64>;
+ using SlotFileMeasureProgress = sigc::slot<void(bool, guint64, guint64, guint64)>;
//We do not use the {callback} syntax with _WRAP_METHOD here, because it expects to use user_data rather
than progress_data.
//We ignore the gboolean result, because we throw an exception if it is false.
@@ -2097,7 +2097,7 @@ public:
/** A signal handler would be, for instance:
* bool on_read_more(const char* file_contents, goffset file_size);
*/
- using SlotReadMore = sigc::slot<bool, const char*, goffset>;
+ using SlotReadMore = sigc::slot<bool(const char*, goffset)>;
//Note that slot_read_more can be nullptr but that would not be a useful method overload, because the
documentation says that it would
//then be equivalent to load_contents_async.
diff --git a/gio/src/memoryinputstream.hg b/gio/src/memoryinputstream.hg
index 0fc03f4..80bac20 100644
--- a/gio/src/memoryinputstream.hg
+++ b/gio/src/memoryinputstream.hg
@@ -76,7 +76,7 @@ _DEPRECATE_IFDEF_END
*
* @newin{2,40}
*/
- using SlotDestroyData = sigc::slot<void, void*>;
+ using SlotDestroyData = sigc::slot<void(void*)>;
/** Appends to data that can be read from the input stream.
*
diff --git a/glib/src/balancedtree.hg b/glib/src/balancedtree.hg
index 4707320..5444046 100644
--- a/glib/src/balancedtree.hg
+++ b/glib/src/balancedtree.hg
@@ -57,8 +57,8 @@ class BalancedTree
{
_CLASS_GENERIC(BalancedTree, GTree)
public:
- using TraverseFunc = sigc::slot<bool, const K&, const V&>;
- using CompareFunc = sigc::slot<int, const K&, const K&>;
+ using TraverseFunc = sigc::slot<bool(const K&, const V&)>;
+ using CompareFunc = sigc::slot<int(const K&, const K&)>;
protected:
BalancedTree() :
@@ -235,8 +235,8 @@ public:
*/
V* search(const CompareFunc &search_func, const K& key)
{
- sigc::slot<int, const K&, const CompareFunc&, const K&> real_slot = sigc::ptr_fun(on_compare_key);
- sigc::slot<int, const K&> bound_slot = sigc::bind(real_slot, search_func, key);
+ sigc::slot<int(const K&, const CompareFunc&, const K&)> real_slot = sigc::ptr_fun(on_compare_key);
+ sigc::slot<int(const K&)> bound_slot = sigc::bind(real_slot, search_func, key);
gpointer value = g_tree_search(gobj(), c_callback_search, reinterpret_cast<gconstpointer>(&bound_slot));
return reinterpret_cast<V*>(value);
@@ -278,7 +278,7 @@ private:
/// Wrapper for invoking GCompareFunc.
static gint c_callback_search(gconstpointer a, gconstpointer b)
{
- const sigc::slot<int, const K&>* slot = reinterpret_cast<const sigc::slot<int, const K&> *>(b);
+ const auto slot = reinterpret_cast<const sigc::slot<int(const K&)> *>(b);
return (*slot)(*reinterpret_cast<const K*>(a));
}
diff --git a/glib/src/binding.hg b/glib/src/binding.hg
index b30cba1..cb53709 100644
--- a/glib/src/binding.hg
+++ b/glib/src/binding.hg
@@ -106,7 +106,7 @@ public:
*
* @return <tt>true</tt> if the transformation was successful, and <tt>false</tt> otherwise.
*/
- using SlotTransform = sigc::slot<bool, const GValue*, GValue*>;
+ using SlotTransform = sigc::slot<bool(const GValue*, GValue*)>;
/** Creates a binding between @a source_property and @a target_property,
* allowing you to set the transformation functions to be used by the binding.
@@ -183,7 +183,7 @@ public:
* stored in a Glib::Value<T_target> object.
* @tparam T_functor_to Type of functor that translates from the source to the target.
* Must be convertible to<br>
- * sigc::slot<bool, const T_source&, T_target&>.
+ * sigc::slot<bool(const T_source&, T_target&)>.
*
* @see bind_property_value()
*
@@ -196,7 +196,7 @@ public:
BindingFlags flags,
const T_functor_to& transform_to)
{
- sigc::slot<bool, const T_source&, T_target&> slot_transform_to = transform_to;
+ sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
return bind_property_value(source_property, target_property, flags,
slot_transform_to.empty() ? SlotTransform() : TransformProp<T_source, T_target>(slot_transform_to));
@@ -219,7 +219,7 @@ public:
* stored in a Glib::Value<T_target> object.
* @tparam T_functor_to Type of functor that translates from the source to the target.
* Must be convertible to<br>
- * sigc::slot<bool, const T_source&, T_target&>.
+ * sigc::slot<bool(const T_source&, T_target&)>.
*
* @see bind_property_value()
*
@@ -232,7 +232,7 @@ public:
BindingFlags flags,
const T_functor_to& transform_to)
{
- sigc::slot<bool, const T_source&, T_target&> slot_transform_to = transform_to;
+ sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
return bind_property_value(source_property, target_property, flags,
slot_transform_to.empty() ? SlotTransform() : TransformProp<T_source, T_target>(slot_transform_to));
@@ -255,7 +255,7 @@ public:
* stored in a Glib::Value<T_target> object.
* @tparam T_functor_to Type of functor that translates from the source to the target.
* Must be convertible to<br>
- * sigc::slot<bool, const T_source&, T_target&>.
+ * sigc::slot<bool(const T_source&, T_target&)>.
*
* @see bind_property_value()
*
@@ -268,7 +268,7 @@ public:
BindingFlags flags,
const T_functor_to& transform_to)
{
- sigc::slot<bool, const T_source&, T_target&> slot_transform_to = transform_to;
+ sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
return bind_property_value(source_property, target_property, flags,
slot_transform_to.empty() ? SlotTransform() : TransformProp<T_source, T_target>(slot_transform_to));
@@ -291,7 +291,7 @@ public:
* stored in a Glib::Value<T_target> object.
* @tparam T_functor_to Type of functor that translates from the source to the target.
* Must be convertible to<br>
- * sigc::slot<bool, const T_source&, T_target&>.
+ * sigc::slot<bool(const T_source&, T_target&)>.
*
* @see bind_property_value()
*
@@ -304,7 +304,7 @@ public:
BindingFlags flags,
const T_functor_to& transform_to)
{
- sigc::slot<bool, const T_source&, T_target&> slot_transform_to = transform_to;
+ sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
return bind_property_value(source_property, target_property, flags,
slot_transform_to.empty() ? SlotTransform() : TransformProp<T_source, T_target>(slot_transform_to));
@@ -329,10 +329,10 @@ public:
* stored in a Glib::Value<T_target> object.
* @tparam T_functor_to Type of functor that translates from the source to the target.
* Must be convertible to<br>
- * sigc::slot<bool, const T_source&, T_target&>.
+ * sigc::slot<bool(const T_source&, T_target&)>.
* @tparam T_functor_from Type of functor that translates from the target to the source.
* Must be convertible to<br>
- * sigc::slot<bool, const T_target&, T_source&>.
+ * sigc::slot<bool(const T_target&, T_source&)>.
*
* @see bind_property_value()
*
@@ -346,8 +346,8 @@ public:
const T_functor_to& transform_to,
const T_functor_from& transform_from)
{
- sigc::slot<bool, const T_source&, T_target&> slot_transform_to = transform_to;
- sigc::slot<bool, const T_target&, T_source&> slot_transform_from = transform_from;
+ sigc::slot<bool(const T_source&, T_target&)> slot_transform_to = transform_to;
+ sigc::slot<bool(const T_target&, T_source&)> slot_transform_from = transform_from;
return bind_property_value(source_property, target_property, flags,
slot_transform_to.empty() ? SlotTransform() : TransformProp<T_source, T_target>(slot_transform_to),
@@ -395,7 +395,7 @@ private:
{
public:
using result_type = bool;
- using SlotTypedTransform = sigc::slot<bool, const T_from&, T_to&>;
+ using SlotTypedTransform = sigc::slot<bool(const T_from&, T_to&)>;
TransformProp(const SlotTypedTransform& slot) : typed_transform(slot) {}
diff --git a/glib/src/bytearray.hg b/glib/src/bytearray.hg
index a921a65..4233263 100644
--- a/glib/src/bytearray.hg
+++ b/glib/src/bytearray.hg
@@ -58,7 +58,7 @@ public:
* int compare(const guint8* first, const guint8* second);
* </code>
*/
- using SlotCompare = sigc::slot<int, const guint8*, const guint8*>;
+ using SlotCompare = sigc::slot<int(const guint8*, const guint8*)>;
_WRAP_METHOD(static Glib::RefPtr<ByteArray> create(), g_byte_array_new)
diff --git a/glib/src/nodetree.hg b/glib/src/nodetree.hg
index 75b63c0..bcec2dd 100644
--- a/glib/src/nodetree.hg
+++ b/glib/src/nodetree.hg
@@ -69,8 +69,8 @@ class NodeTree
{
_CLASS_GENERIC(NodeTree, GNode)
public:
- using TraverseFunc = sigc::slot<bool, NodeTree<T>&>;
- using ForeachFunc = sigc::slot<void, NodeTree<T>&>;
+ using TraverseFunc = sigc::slot<bool(NodeTree<T>&)>;
+ using ForeachFunc = sigc::slot<void(NodeTree<T>&)>;
private:
static NodeTree<T>* wrap(GNode* node)
@@ -337,10 +337,10 @@ public:
*/
NodeTree<T>* find_child(const T& the_data, TraverseFlags flags = TRAVERSE_ALL)
{
- sigc::slot<void, GNode*, const T&, GNode**> real_slot = sigc::ptr_fun(on_compare_child);
+ sigc::slot<void(GNode*, const T&, GNode**)> real_slot = sigc::ptr_fun(on_compare_child);
GNode* child = nullptr;
- using type_foreach_gnode_slot = sigc::slot<void, GNode*>;
+ using type_foreach_gnode_slot = sigc::slot<void(GNode*)>;
type_foreach_gnode_slot bound_slot = sigc::bind(real_slot, the_data, &child);
g_node_children_foreach(gobj(), (GTraverseFlags)flags, c_callback_foreach_compare_child,
reinterpret_cast<gpointer>(&bound_slot));
@@ -371,10 +371,10 @@ public:
NodeTree<T>* find(const T& the_data, TraverseType order = TRAVERSE_IN_ORDER, TraverseFlags flags =
TRAVERSE_ALL)
{
//We use a sigc::slot for the C callback, so we can bind some extra data.
- sigc::slot<gboolean, GNode*, const T&, GNode**> real_slot = sigc::ptr_fun(on_compare_node);
+ sigc::slot<gboolean(GNode*, const T&, GNode**)> real_slot = sigc::ptr_fun(on_compare_node);
GNode* child = nullptr;
- using type_traverse_gnode_slot = sigc::slot<gboolean, GNode*>;
+ using type_traverse_gnode_slot = sigc::slot<gboolean(GNode*)>;
type_traverse_gnode_slot bound_slot = sigc::bind(real_slot, the_data, &child);
g_node_traverse(const_cast<GNode*>(gobj()), (GTraverseType)order, (GTraverseFlags)flags, -1,
c_callback_traverse_compare_node, reinterpret_cast<gpointer>(&bound_slot));
@@ -732,7 +732,7 @@ private:
}
}
- /// Wrapper for invoking a sigc::slot<void,GNode*> (Internal use).
+ /// Wrapper for invoking a sigc::slot<void(GNode*)> (Internal use).
static void c_callback_foreach_compare_child(GNode* node, gpointer data)
{
const ForeachFunc* slot = reinterpret_cast<const ForeachFunc*>(data);
@@ -750,7 +750,7 @@ private:
return FALSE;
}
- /// Wrapper for invoking a sigc::slot<gboolean,GNode*> (Internal use).
+ /// Wrapper for invoking a sigc::slot<gboolean(GNode*)> (Internal use).
static gboolean c_callback_traverse_compare_node(GNode* node, gpointer data)
{
const TraverseFunc* slot = reinterpret_cast<const TraverseFunc*>(data);
diff --git a/glib/src/optioncontext.hg b/glib/src/optioncontext.hg
index 9d0eb6c..58429e7 100644
--- a/glib/src/optioncontext.hg
+++ b/glib/src/optioncontext.hg
@@ -178,7 +178,7 @@ public:
* This function is used to translate user-visible strings, for --help output.
* The function takes an untranslated string and returns a translated string
*/
- using SlotTranslate = sigc::slot<Glib::ustring, const Glib::ustring&>;
+ using SlotTranslate = sigc::slot<Glib::ustring(const Glib::ustring&)>;
/**
* Sets the function which is used to translate user-visible
diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg
index 9995d5f..f1082e0 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -49,17 +49,17 @@ class OptionGroup
public:
/** For example Glib::ustring on_translate(const Glib::ustring& original);.
*/
- using SlotTranslate = sigc::slot<Glib::ustring, const Glib::ustring&>;
+ using SlotTranslate = sigc::slot<Glib::ustring(const Glib::ustring&)>;
/** For example bool on_option_arg_string(const Glib::ustring& option_name,
* const Glib::ustring& value, bool has_value);.
*/
- using SlotOptionArgString = sigc::slot<bool, const Glib::ustring&, const Glib::ustring&, bool>;
+ using SlotOptionArgString = sigc::slot<bool(const Glib::ustring&, const Glib::ustring&, bool)>;
/** For example bool on_option_arg_filename(const Glib::ustring& option_name,
* const std::string& value, bool has_value);.
*/
- using SlotOptionArgFilename = sigc::slot<bool, const Glib::ustring&, const std::string&, bool>;
+ using SlotOptionArgFilename = sigc::slot<bool(const Glib::ustring&, const std::string&, bool)>;
OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring&
help_description = Glib::ustring());
diff --git a/glib/src/spawn.hg b/glib/src/spawn.hg
index 0949048..bd34ad5 100644
--- a/glib/src/spawn.hg
+++ b/glib/src/spawn.hg
@@ -42,7 +42,7 @@ _WRAP_GERROR(SpawnError, GSpawnError, G_SPAWN_ERROR, NO_GTYPE, s#^2BIG$#TOOBIG#)
/** For instance,<br>
* void on_child_setup();
*/
-using SlotSpawnChildSetup = sigc::slot<void>;
+using SlotSpawnChildSetup = sigc::slot<void()>;
/** Executes a child program asynchronously (your program will not
* block waiting for the child to exit). The child program is
diff --git a/glib/src/thread.ccg b/glib/src/thread.ccg
index 3d6d795..7965ab9 100644
--- a/glib/src/thread.ccg
+++ b/glib/src/thread.ccg
@@ -31,7 +31,7 @@ call_thread_entry_slot(void* data)
try
{
// Recreate the specific slot, and drop the reference obtained by create().
- (*static_cast<sigc::slot<void>*>(slot))();
+ (*static_cast<sigc::slot<void()>*>(slot))();
}
catch (Glib::Thread::Exit&)
{
@@ -69,10 +69,10 @@ thread_init_impl()
// static
Thread*
-Thread::create(const sigc::slot<void>& slot, bool /* joinable */)
+Thread::create(const sigc::slot<void()>& slot, bool /* joinable */)
{
// Make a copy of slot on the heap
- const auto slot_copy = new sigc::slot<void>(slot);
+ const auto slot_copy = new sigc::slot<void()>(slot);
GError* error = nullptr;
@@ -94,11 +94,11 @@ Thread::create(const sigc::slot<void>& slot, bool /* joinable */)
// static
Thread*
-Thread::create(const sigc::slot<void>& slot, unsigned long stack_size, bool joinable, bool bound,
+Thread::create(const sigc::slot<void()>& slot, unsigned long stack_size, bool joinable, bool bound,
ThreadPriority priority)
{
// Make a copy of slot on the heap
- const auto slot_copy = new sigc::slot<void>(slot);
+ const auto slot_copy = new sigc::slot<void()>(slot);
GError* error = nullptr;
diff --git a/glib/src/thread.hg b/glib/src/thread.hg
index 57b940f..045ce2b 100644
--- a/glib/src/thread.hg
+++ b/glib/src/thread.hg
@@ -184,7 +184,7 @@ public:
* @return The new Thread* on success.
* @throw Glib::ThreadError
*/
- static Thread* create(const sigc::slot<void>& slot, bool joinable = true);
+ static Thread* create(const sigc::slot<void()>& slot, bool joinable = true);
/** Returns the Thread* corresponding to the calling thread.
* @return The current thread.
@@ -228,9 +228,9 @@ public:
* here as a default.
*
* @note Only use the extended
- * create(const sigc::slot<void>&, unsigned long, bool, bool, ThreadPriority)
+ * create(const sigc::slot<void()>&, unsigned long, bool, bool, ThreadPriority)
* function, when you really can't use the simple
- * create(const sigc::slot<void>&, bool)
+ * create(const sigc::slot<void()>&, bool)
* instead. The latter overload does not take @a stack_size, @a bound and
* @a priority as arguments, as they should only be used for cases, where
* it is inevitable.
@@ -246,7 +246,7 @@ public:
* @deprecated Use the simpler create() method instead, because all Threads
* are now joinable, and bounds and priority parameters now have no effect.
*/
- static Thread* create(const sigc::slot<void>& slot, unsigned long stack_size,
+ static Thread* create(const sigc::slot<void()>& slot, unsigned long stack_size,
bool joinable, bool bound, ThreadPriority priority);
/** Returns whether the thread is joinable.
diff --git a/glib/src/threads.ccg b/glib/src/threads.ccg
index 274b5a1..8b66493 100644
--- a/glib/src/threads.ccg
+++ b/glib/src/threads.ccg
@@ -45,7 +45,7 @@ call_thread_entry_slot(void* data)
try
{
// Recreate the specific slot.
- (*static_cast<sigc::slot<void>*>(slot))();
+ (*static_cast<sigc::slot<void()>*>(slot))();
}
catch (Glib::Threads::Thread::Exit&)
{
@@ -75,10 +75,10 @@ namespace Threads
// static
Thread*
-Thread::create(const sigc::slot<void>& slot, const std::string& name)
+Thread::create(const sigc::slot<void()>& slot, const std::string& name)
{
// Make a copy of slot on the heap.
- const auto slot_copy = new sigc::slot<void>(slot);
+ const auto slot_copy = new sigc::slot<void()>(slot);
GError* error = nullptr;
auto thread = g_thread_try_new(
@@ -98,7 +98,7 @@ Thread::create(const sigc::slot<void>& slot, const std::string& name)
// static
Thread*
-Thread::create(const sigc::slot<void>& slot)
+Thread::create(const sigc::slot<void()>& slot)
{
return create(slot, std::string());
}
diff --git a/glib/src/threads.hg b/glib/src/threads.hg
index 6340f45..afd8877 100644
--- a/glib/src/threads.hg
+++ b/glib/src/threads.hg
@@ -98,7 +98,7 @@ public:
class Exit;
//See http://bugzilla.gnome.org/show_bug.cgi?id=512348 about the sigc::trackable issue.
- // TODO: At the next ABI break, consider changing const sigc::slot<void>& slot
+ // TODO: At the next ABI break, consider changing const sigc::slot<void()>& slot
// to const std::function<void()>& func, if it can be assumed that all supported
// compilers understand the C++11 template class std::function<>.
/** Creates a new thread.
@@ -117,7 +117,7 @@ public:
* @return The new Thread* on success.
* @throw Glib::Threads::ThreadError
*/
- static Thread* create(const sigc::slot<void>& slot);
+ static Thread* create(const sigc::slot<void()>& slot);
// TODO: At next ABI break, remove the single parameter create
// method and default name to std::string()
@@ -145,7 +145,7 @@ public:
*
* @newin{2,36}
*/
- static Thread* create(const sigc::slot<void>& slot, const std::string& name);
+ static Thread* create(const sigc::slot<void()>& slot, const std::string& name);
/** Returns the Thread* corresponding to the calling thread.
* @return The current thread.
diff --git a/glib/src/valuearray.hg b/glib/src/valuearray.hg
index c1b5638..06d4e70 100644
--- a/glib/src/valuearray.hg
+++ b/glib/src/valuearray.hg
@@ -55,7 +55,7 @@ public:
* The compare function should return -1 if v1 < v2, 0 if v1 == v2, and 1 if
* v1 > v2.
*/
- using SlotCompare = sigc::slot<int, const Glib::ValueBase&, const Glib::ValueBase&>;
+ using SlotCompare = sigc::slot<int(const Glib::ValueBase&, const Glib::ValueBase&)>;
/** Default constructor. Constructs a new array with no pre-allocation.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]