2019-02-18 11:37:23 +00:00
|
|
|
/* Copyright (c), Charlotte Meyer <dev@buffet.sh>
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KIWMI_DESKTOP_OUTPUT_H
|
|
|
|
#define KIWMI_DESKTOP_OUTPUT_H
|
|
|
|
|
|
|
|
#include <wayland-server.h>
|
2021-12-20 19:07:56 +00:00
|
|
|
#include <wlr/util/box.h>
|
2019-03-21 16:29:26 +00:00
|
|
|
|
2021-12-22 20:46:15 +00:00
|
|
|
#include "desktop/stratum.h"
|
|
|
|
|
2019-03-21 16:29:26 +00:00
|
|
|
struct kiwmi_output {
|
|
|
|
struct wl_list link;
|
|
|
|
struct kiwmi_desktop *desktop;
|
|
|
|
struct wlr_output *wlr_output;
|
2021-12-22 20:46:15 +00:00
|
|
|
|
2019-03-21 16:29:26 +00:00
|
|
|
struct wl_listener frame;
|
2021-06-19 10:19:57 +00:00
|
|
|
struct wl_listener commit;
|
2019-03-21 16:29:26 +00:00
|
|
|
struct wl_listener destroy;
|
2020-01-08 21:38:32 +00:00
|
|
|
struct wl_listener mode;
|
2020-01-06 18:25:46 +00:00
|
|
|
|
2021-12-22 20:46:15 +00:00
|
|
|
struct wl_list layers[4]; // struct kiwmi_layer::link
|
|
|
|
struct wlr_scene_tree *strata[KIWMI_STRATA_COUNT];
|
|
|
|
|
2021-08-11 18:31:25 +00:00
|
|
|
struct wlr_box usable_area;
|
2020-01-15 20:30:37 +00:00
|
|
|
|
2020-01-06 18:25:46 +00:00
|
|
|
struct {
|
|
|
|
struct wl_signal destroy;
|
2020-01-08 21:38:32 +00:00
|
|
|
struct wl_signal resize;
|
2021-08-11 18:31:25 +00:00
|
|
|
struct wl_signal usable_area_change;
|
2020-01-06 18:25:46 +00:00
|
|
|
} events;
|
2019-03-21 16:29:26 +00:00
|
|
|
};
|
2019-02-18 11:37:23 +00:00
|
|
|
|
2020-01-22 23:16:09 +00:00
|
|
|
struct kiwmi_render_data {
|
|
|
|
struct wlr_output *output;
|
|
|
|
double output_lx;
|
|
|
|
double output_ly;
|
|
|
|
struct wlr_renderer *renderer;
|
|
|
|
struct timespec *when;
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
2019-02-18 11:37:23 +00:00
|
|
|
void new_output_notify(struct wl_listener *listener, void *data);
|
2021-12-22 20:46:15 +00:00
|
|
|
void output_layout_change_notify(struct wl_listener *listener, void *data);
|
2019-02-18 11:37:23 +00:00
|
|
|
|
|
|
|
#endif /* KIWMI_DESKTOP_OUTPUT_H */
|