2017-04-25 19:06:58 +00:00
|
|
|
#ifndef _WLR_WAYLAND_H
|
|
|
|
#define _WLR_WAYLAND_H
|
|
|
|
|
|
|
|
#include <wayland-server.h>
|
|
|
|
#include <wlr/common/list.h>
|
2017-05-07 16:26:48 +00:00
|
|
|
#include <stdbool.h>
|
2017-04-25 19:06:58 +00:00
|
|
|
|
2017-05-07 16:26:48 +00:00
|
|
|
struct wlr_output_mode_state;
|
2017-04-26 01:26:29 +00:00
|
|
|
|
2017-05-07 16:26:48 +00:00
|
|
|
struct wlr_output_mode {
|
|
|
|
struct wlr_output_mode_state *state;
|
2017-04-25 23:19:21 +00:00
|
|
|
uint32_t flags; // enum wl_output_mode
|
|
|
|
int32_t width, height;
|
|
|
|
int32_t refresh; // mHz
|
|
|
|
};
|
|
|
|
|
2017-05-07 16:26:48 +00:00
|
|
|
struct wlr_output_impl;
|
|
|
|
struct wlr_output_state;
|
|
|
|
|
|
|
|
struct wlr_output {
|
|
|
|
const struct wlr_output_impl *impl;
|
|
|
|
struct wlr_output_state *state;
|
|
|
|
|
2017-04-25 19:06:58 +00:00
|
|
|
uint32_t flags;
|
2017-06-07 12:39:40 +00:00
|
|
|
char name[16];
|
|
|
|
char make[48];
|
|
|
|
char model[16];
|
2017-04-25 19:06:58 +00:00
|
|
|
uint32_t scale;
|
2017-06-05 10:48:51 +00:00
|
|
|
int32_t width, height;
|
2017-04-25 23:19:21 +00:00
|
|
|
int32_t phys_width, phys_height; // mm
|
|
|
|
int32_t subpixel; // enum wl_output_subpixel
|
|
|
|
int32_t transform; // enum wl_output_transform
|
2017-04-25 19:06:58 +00:00
|
|
|
|
2017-06-07 04:43:57 +00:00
|
|
|
float transform_matrix[16];
|
|
|
|
|
2017-05-07 16:26:48 +00:00
|
|
|
list_t *modes;
|
|
|
|
struct wlr_output_mode *current_mode;
|
2017-04-26 01:26:29 +00:00
|
|
|
|
2017-05-07 16:26:48 +00:00
|
|
|
struct {
|
|
|
|
struct wl_signal frame;
|
|
|
|
} events;
|
2017-04-25 19:06:58 +00:00
|
|
|
};
|
|
|
|
|
2017-05-31 19:38:26 +00:00
|
|
|
void wlr_output_enable(struct wlr_output *output, bool enable);
|
2017-06-06 15:48:30 +00:00
|
|
|
bool wlr_output_set_mode(struct wlr_output *output,
|
|
|
|
struct wlr_output_mode *mode);
|
|
|
|
void wlr_output_transform(struct wlr_output *output,
|
|
|
|
enum wl_output_transform transform);
|
2017-05-31 20:17:04 +00:00
|
|
|
void wlr_output_destroy(struct wlr_output *output);
|
2017-06-08 01:35:07 +00:00
|
|
|
void wlr_output_effective_resolution(struct wlr_output *output,
|
|
|
|
int *width, int *height);
|
2017-04-25 19:06:58 +00:00
|
|
|
|
|
|
|
#endif
|