summaryrefslogtreecommitdiff
path: root/lib/river/include
diff options
context:
space:
mode:
Diffstat (limited to 'lib/river/include')
-rw-r--r--lib/river/include/astal-river.h59
-rw-r--r--lib/river/include/meson.build6
-rw-r--r--lib/river/include/river-private.h20
-rw-r--r--lib/river/include/wayland-source.h16
4 files changed, 101 insertions, 0 deletions
diff --git a/lib/river/include/astal-river.h b/lib/river/include/astal-river.h
new file mode 100644
index 0000000..6bedd94
--- /dev/null
+++ b/lib/river/include/astal-river.h
@@ -0,0 +1,59 @@
+#ifndef ASTAL_RIVER_H
+#define ASTAL_RIVER_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define ASTAL_RIVER_TYPE_OUTPUT (astal_river_output_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalRiverOutput, astal_river_output, ASTAL_RIVER, OUTPUT, GObject)
+
+guint astal_river_output_get_id(AstalRiverOutput *self);
+
+gchar *astal_river_output_get_name(AstalRiverOutput *self);
+
+gchar *astal_river_output_get_layout_name(AstalRiverOutput *self);
+
+gchar *astal_river_output_get_focused_view(AstalRiverOutput *self);
+
+guint astal_river_output_get_focused_tags(AstalRiverOutput *self);
+
+guint astal_river_output_get_urgent_tags(AstalRiverOutput *self);
+
+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)
+
+AstalRiverRiver *astal_river_river_new();
+
+AstalRiverRiver *astal_river_river_get_default();
+AstalRiverRiver *astal_river_get_default();
+
+GList *astal_river_river_get_outputs(AstalRiverRiver *self);
+
+AstalRiverOutput *astal_river_river_get_output(AstalRiverRiver *self, gchar *name);
+
+gchar *astal_river_river_get_focused_view(AstalRiverRiver *self);
+
+gchar *astal_river_river_get_focused_output(AstalRiverRiver *self);
+
+gchar *astal_river_river_get_mode(AstalRiverRiver *self);
+
+/**
+ * AstalRiverCommandCallback:
+ * @success: a #gboolean indicating whether the command was executed successfully
+ * @msg: a string containing the result of the command
+ *
+ * A callback function that is called after a river command is run.
+ */
+typedef void (*AstalRiverCommandCallback)(gboolean success, const gchar *msg);
+
+void astal_river_river_run_command_async(AstalRiverRiver *self, gint length, const gchar **cmd,
+ AstalRiverCommandCallback callback);
+
+G_END_DECLS
+
+#endif // !ASTAL_RIVER_H
diff --git a/lib/river/include/meson.build b/lib/river/include/meson.build
new file mode 100644
index 0000000..4b08a89
--- /dev/null
+++ b/lib/river/include/meson.build
@@ -0,0 +1,6 @@
+astal_river_inc = include_directories('.')
+astal_river_headers = files(
+ 'astal-river.h',
+)
+
+install_headers('astal-river.h')
diff --git a/lib/river/include/river-private.h b/lib/river/include/river-private.h
new file mode 100644
index 0000000..14cd1c5
--- /dev/null
+++ b/lib/river/include/river-private.h
@@ -0,0 +1,20 @@
+#ifndef ASTAL_RIVER_OUTPUT_PRIVATE_H
+#define ASTAL_RIVER_OUTPUT_PRIVATE_H
+
+#include <wayland-client.h>
+
+#include "astal-river.h"
+#include "river-status-unstable-v1-client.h"
+
+G_BEGIN_DECLS
+
+AstalRiverOutput *astal_river_output_new(guint id, struct wl_output *wl_output,
+ struct zriver_status_manager_v1 *status_manager,
+ 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, const gchar *focused_view);
+
+G_END_DECLS
+
+#endif // !ASTAL_RIVER_OUTPUT_PRIVATE_H
diff --git a/lib/river/include/wayland-source.h b/lib/river/include/wayland-source.h
new file mode 100644
index 0000000..b219589
--- /dev/null
+++ b/lib/river/include/wayland-source.h
@@ -0,0 +1,16 @@
+#ifndef __WAYLAND_SOURCE_H__
+#define __WAYLAND_SOURCE_H__
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct _WLSource WLSource;
+
+WLSource* wl_source_new();
+void wl_source_free(WLSource* self);
+struct wl_display* wl_source_get_display(WLSource* source);
+
+G_END_DECLS
+
+#endif /* __WAYLAND_SOURCE_H__ */