diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/meson.build | 6 | ||||
-rw-r--r-- | include/river-private.h | 20 | ||||
-rw-r--r-- | include/river.h | 63 | ||||
-rw-r--r-- | include/wayland-source.h | 14 |
4 files changed, 103 insertions, 0 deletions
diff --git a/include/meson.build b/include/meson.build new file mode 100644 index 0000000..a835e6b --- /dev/null +++ b/include/meson.build @@ -0,0 +1,6 @@ +astal_river_inc = include_directories('.') +astal_river_headers = files( + 'river.h', +) + +install_headers('river.h', subdir : 'astal') diff --git a/include/river-private.h b/include/river-private.h new file mode 100644 index 0000000..1b94495 --- /dev/null +++ b/include/river-private.h @@ -0,0 +1,20 @@ +#ifndef ASTAL_RIVER_OUTPUT_PRIVATE_H +#define ASTAL_RIVER_OUTPUT_PRIVATE_H + +#include "river.h" +#include "river-status-unstable-v1-client.h" +#include <wayland-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, gchar* focused_view); + +G_END_DECLS + +#endif // !ASTAL_RIVER_OUTPUT_PRIVATE_H diff --git a/include/river.h b/include/river.h new file mode 100644 index 0000000..d4d33c2 --- /dev/null +++ b/include/river.h @@ -0,0 +1,63 @@ +#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); +/** + * 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); +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(); + +/** + * astal_river_river_get_outputs + * @self: the AstalRiverRiver object + * + * Returns: (transfer none) (element-type AstalRiver.Output): a list of all outputs + * + */ +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); + + +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); + + + + + +G_END_DECLS + +#endif // !ASTAL_RIVER_H diff --git a/include/wayland-source.h b/include/wayland-source.h new file mode 100644 index 0000000..ad6ed8c --- /dev/null +++ b/include/wayland-source.h @@ -0,0 +1,14 @@ +#ifndef __WAYLAND_SOURCE_H__ +#define __WAYLAND_SOURCE_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__ */ |