From 637875607f230ab7bd45d05db685323f568900f9 Mon Sep 17 00:00:00 2001 From: kotontrion Date: Sat, 15 Jun 2024 13:17:54 +0200 Subject: add river-control-unstable-v1 support --- include/river.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/river.h') diff --git a/include/river.h b/include/river.h index 881ca75..7e2bd59 100644 --- a/include/river.h +++ b/include/river.h @@ -132,6 +132,25 @@ gchar* astal_river_river_get_focused_output(AstalRiverRiver *self); gchar* astal_river_river_get_mode(AstalRiverRiver *self); +/** + * AstalRiverCommandCallback: + * @success: a #gboolean. + * @msg: a string. + * + * A callback function that gets a #GObject, a #gboolean, and a string. + */ +typedef void (*AstalRiverCommandCallback)(gboolean success, const gchar *msg); + +/** + * astal_river_river_run_command_async: + * @self: the AstalRiverRiver object + * @length: the length of the cmd array + * @cmd: (array length=length): the command to execute + * @callback: (scope async) (nullable): the callback to invoke. + * + * Calls the given callback with the provided parameters. + */ +void astal_river_river_run_command_async(AstalRiverRiver *self, gint length, const gchar **cmd, AstalRiverCommandCallback callback); -- cgit v1.2.3