diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-03-31 18:15:23 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-03-31 18:15:23 +0200 |
commit | 7ff8b74a47059edbba7a9f9424fa0022943bc6ec (patch) | |
tree | c1c2ef469fbf0a6caf6b23b9a78b86d8d149255e /gio/giomm/slot_async.h | |
parent | 98f3b67b5c1bd71d0e7b41193fb4683fc957e321 (diff) | |
download | glibmm-7ff8b74a47059edbba7a9f9424fa0022943bc6ec.tar.gz |
Add Gio::giomm_SignalProxy_async_callback() with C linkage
and use it instead of SignalProxy_async_callback().
Part of issue #1
Diffstat (limited to 'gio/giomm/slot_async.h')
-rw-r--r-- | gio/giomm/slot_async.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/gio/giomm/slot_async.h b/gio/giomm/slot_async.h index ed76b5b4..cc38cf84 100644 --- a/gio/giomm/slot_async.h +++ b/gio/giomm/slot_async.h @@ -24,14 +24,34 @@ namespace Gio { +extern "C" +{ +/** Callback function, used in combination with Gio::SlotAsyncReady. + * + * Example: + * @code + * _WRAP_METHOD(void acquire_async(const Gio::SlotAsyncReady& slot{callback}, + * const Glib::RefPtr<Gio::Cancellable>& cancellable{.?}), g_permission_acquire_async, + * slot_name slot, slot_callback Gio::giomm_SignalProxy_async_callback) + * @endcode + * + * @newin{2,78} + */ +GIOMM_API +void giomm_SignalProxy_async_callback(GObject*, GAsyncResult* res, void* data); +} // extern "C" + +//TODO: Remove SignalProxy_async_callback when we can break ABI and API. /** Callback function, used in combination with Gio::SlotAsyncReady. * + * Prefer giomm_SignalProxy_async_callback() as a callback from a C function. + * * Example: * @code - * _WRAP_METHOD(void acquire_async(const SlotAsyncReady& slot{callback}, - * const Glib::RefPtr<Cancellable>& cancellable{.?}), g_permission_acquire_async, - * slot_name slot, slot_callback SignalProxy_async_callback) + * _WRAP_METHOD(void acquire_async(const Gio::SlotAsyncReady& slot{callback}, + * const Glib::RefPtr<Gio::Cancellable>& cancellable{.?}), g_permission_acquire_async, + * slot_name slot, slot_callback Gio::SignalProxy_async_callback) * @endcode */ GIOMM_API |