2017-08-09 15:58:10 +02:00
|
|
|
#ifndef _WLR_TYPES_WLR_SURFACE_H
|
|
|
|
#define _WLR_TYPES_WLR_SURFACE_H
|
2017-08-09 15:33:30 +02:00
|
|
|
#include <wayland-server.h>
|
2017-08-10 05:34:50 +02:00
|
|
|
#include <pixman.h>
|
|
|
|
#include <stdint.h>
|
2017-08-09 15:33:30 +02:00
|
|
|
|
2017-08-09 21:58:41 +02:00
|
|
|
struct wlr_frame_callback {
|
|
|
|
struct wl_resource *resource;
|
|
|
|
struct wl_list link;
|
|
|
|
};
|
|
|
|
|
2017-08-10 05:34:50 +02:00
|
|
|
#define WLR_SURFACE_INVALID_BUFFER 1
|
|
|
|
#define WLR_SURFACE_INVALID_SURFACE_DAMAGE 2
|
|
|
|
#define WLR_SURFACE_INVALID_BUFFER_DAMAGE 4
|
|
|
|
#define WLR_SURFACE_INVALID_OPAQUE_REGION 8
|
|
|
|
#define WLR_SURFACE_INVALID_INPUT_REGION 16
|
|
|
|
#define WLR_SURFACE_INVALID_TRANSFORM 16
|
|
|
|
#define WLR_SURFACE_INVALID_SCALE 16
|
|
|
|
|
|
|
|
struct wlr_surface_state {
|
|
|
|
uint32_t invalid;
|
|
|
|
struct wl_resource *buffer;
|
|
|
|
int32_t sx, sy;
|
|
|
|
pixman_region32_t surface_damage, buffer_damage;
|
|
|
|
pixman_region32_t opaque, input;
|
|
|
|
uint32_t transform;
|
|
|
|
int32_t scale;
|
|
|
|
};
|
2017-08-09 15:33:30 +02:00
|
|
|
|
2017-08-10 05:34:50 +02:00
|
|
|
struct wlr_surface {
|
|
|
|
struct wl_resource *resource;
|
2017-08-11 04:15:37 +02:00
|
|
|
struct wlr_renderer *renderer;
|
2017-08-09 15:33:30 +02:00
|
|
|
struct wlr_texture *texture;
|
2017-08-10 05:34:50 +02:00
|
|
|
struct wlr_surface_state current, pending;
|
2017-08-09 15:33:30 +02:00
|
|
|
const char *role; // the lifetime-bound role or null
|
2017-08-10 05:34:50 +02:00
|
|
|
|
|
|
|
float buffer_to_surface_matrix[16];
|
|
|
|
float surface_to_buffer_matrix[16];
|
2017-08-09 15:33:30 +02:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal commit;
|
|
|
|
} signals;
|
2017-08-09 21:58:41 +02:00
|
|
|
|
|
|
|
struct wl_list frame_callback_list; // wl_surface.frame
|
2017-08-10 12:42:35 +02:00
|
|
|
|
|
|
|
struct wl_listener compositor_listener; // destroy listener used by compositor
|
|
|
|
void *compositor_data;
|
2017-08-09 15:33:30 +02:00
|
|
|
};
|
|
|
|
|
2017-08-09 15:58:10 +02:00
|
|
|
struct wlr_renderer;
|
2017-08-09 15:33:30 +02:00
|
|
|
struct wlr_surface *wlr_surface_create(struct wl_resource *res,
|
|
|
|
struct wlr_renderer *renderer);
|
2017-08-10 14:26:16 +02:00
|
|
|
void wlr_surface_flush_damage(struct wlr_surface *surface);
|
2017-08-09 15:33:30 +02:00
|
|
|
|
|
|
|
#endif
|