diff options
author | kotontrion <[email protected]> | 2024-07-17 16:57:19 +0200 |
---|---|---|
committer | kotontrion <[email protected]> | 2024-07-17 16:57:19 +0200 |
commit | fea47f78b9fcad82544a43ddb81f63d8e477ecc0 (patch) | |
tree | f913dd6fc6a68cec23b755324709b7f840389f4c /include | |
parent | 8ed44bdd982b3d9bb33ea144ba7766052a6cad16 (diff) |
improve docs
Diffstat (limited to 'include')
-rw-r--r-- | include/astal-river.h | 101 | ||||
-rw-r--r-- | include/river-private.h | 4 |
2 files changed, 7 insertions, 98 deletions
diff --git a/include/astal-river.h b/include/astal-river.h index e8576a3..6bedd94 100644 --- a/include/astal-river.h +++ b/include/astal-river.h @@ -9,139 +9,48 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(AstalRiverOutput, astal_river_output, ASTAL_RIVER, OUTPUT, GObject) -/** - * astal_river_output_get_nid - * @self: the AstalRiverOutput object - * - * Returns: the id of the output - */ guint astal_river_output_get_id(AstalRiverOutput *self); -/** - * astal_river_output_get_name - * @self: the AstalRiverOutput object - * - * Returns: (transfer none) (nullable): the name of the output - */ gchar *astal_river_output_get_name(AstalRiverOutput *self); -/** - * astal_river_output_get_layout_name - * @self: the AstalRiverOutput object - * - * Returns: (transfer none) (nullable): the currently used layout name of the output - */ gchar *astal_river_output_get_layout_name(AstalRiverOutput *self); -/** - * astal_river_output_get_focused_view - * @self: the AstalRiverOutput object - * - * Returns: (transfer none) (nullable): the focused view on the output - */ gchar *astal_river_output_get_focused_view(AstalRiverOutput *self); -/** - * astal_river_output_get_focused_tags - * @self: the AstalRiverOutput object - * - * Returns: the focused tags of the output - */ guint astal_river_output_get_focused_tags(AstalRiverOutput *self); -/** - * astal_river_output_get_urgent_tags - * @self: the AstalRiverOutput object - * - * Returns: the urgent tags of the output - */ guint astal_river_output_get_urgent_tags(AstalRiverOutput *self); -/** - * astal_river_output_get_occupied_tags - * @self: the AstalRiverOutput object - * - * Returns: the occupied tags of the output - */ guint astal_river_output_get_occupied_tags(AstalRiverOutput *self); #define ASTAL_RIVER_TYPE_RIVER (astal_river_river_get_type()) G_DECLARE_FINAL_TYPE(AstalRiverRiver, astal_river_river, ASTAL_RIVER, RIVER, GObject) -/** - * astal_river_river_new - * - * Returns: (nullable): a newly created connection to river - */ AstalRiverRiver *astal_river_river_new(); -/** - * astal_river_river_get_default - * - * Returns: (nullable) (transfer none): gets the default River object. - */ AstalRiverRiver *astal_river_river_get_default(); -/** - * astal_river_river_get_outputs - * @self: the AstalRiverRiver object - * - * Returns: (transfer none) (element-type AstalRiver.Output): a list of all outputs - * - */ +AstalRiverRiver *astal_river_get_default(); + GList *astal_river_river_get_outputs(AstalRiverRiver *self); -/** - * astal_river_river_get_output - * @self: the AstalRiverRiver object - * @name: the name of the output - * - * Returns: (transfer none) (nullable): the output with the given name or null - */ AstalRiverOutput *astal_river_river_get_output(AstalRiverRiver *self, gchar *name); -/** - * astal_river_river_get_focused_view - * @self: the AstalRiverOutput object - * - * Returns: (transfer none) (nullable): the currently focused view - */ gchar *astal_river_river_get_focused_view(AstalRiverRiver *self); -/** - * astal_river_river_get_focused_output - * @self: the AstalRiverOutput object - * - * Returns: (transfer none) (nullable): the name of the currently focused output - */ gchar *astal_river_river_get_focused_output(AstalRiverRiver *self); -/** - * astal_river_river_get_mode - * @self: the AstalRiverOutput object - * - * Returns: (transfer none) (nullable): the currently active mode - */ gchar *astal_river_river_get_mode(AstalRiverRiver *self); /** * AstalRiverCommandCallback: - * @success: a #gboolean. - * @msg: a string. + * @success: a #gboolean indicating whether the command was executed successfully + * @msg: a string containing the result of the command * - * A callback function that gets a #GObject, a #gboolean, and a string. + * A callback function that is called after a river command is run. */ 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); diff --git a/include/river-private.h b/include/river-private.h index dae36be..14cd1c5 100644 --- a/include/river-private.h +++ b/include/river-private.h @@ -3,8 +3,8 @@ #include <wayland-client.h> -#include "river-status-unstable-v1-client.h" #include "astal-river.h" +#include "river-status-unstable-v1-client.h" G_BEGIN_DECLS @@ -13,7 +13,7 @@ AstalRiverOutput *astal_river_output_new(guint id, struct wl_output *wl_output, struct wl_display *wl_display); struct wl_output *astal_river_output_get_wl_output(AstalRiverOutput *self); -void astal_river_output_set_focused_view(AstalRiverOutput *self, gchar *focused_view); +void astal_river_output_set_focused_view(AstalRiverOutput *self, const gchar *focused_view); G_END_DECLS |