diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-06-26 17:34:15 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-06-26 17:34:15 +1200 |
commit | 0cd94f0cf0dd104cee9837dc2961536a078d089e (patch) | |
tree | 798abd248cf605f2a82ef732c0bed0a1812704c7 /include | |
parent | f252c5a79214a3d3cd7ab3f239050b234e4ae9e2 (diff) |
Added software cursor fallback
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 2 | ||||
-rw-r--r-- | include/wlr/render.h | 2 | ||||
-rw-r--r-- | include/wlr/render/interface.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 10 |
4 files changed, 14 insertions, 2 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 0949bca3..5f9bfdd2 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -13,6 +13,8 @@ struct wlr_output_impl { const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height); bool (*move_cursor)(struct wlr_output_state *state, int x, int y); void (*destroy)(struct wlr_output_state *state); + void (*make_current)(struct wlr_output_state *state); + void (*swap_buffers)(struct wlr_output_state *state); }; struct wlr_output *wlr_output_create(struct wlr_output_impl *impl, diff --git a/include/wlr/render.h b/include/wlr/render.h index 90967dd9..53df01d2 100644 --- a/include/wlr/render.h +++ b/include/wlr/render.h @@ -59,7 +59,7 @@ struct wlr_surface { * calling this function. */ bool wlr_surface_attach_pixels(struct wlr_surface *surf, uint32_t format, - int width, int height, const unsigned char *pixels); + int stride, int width, int height, const unsigned char *pixels); /** * Attaches pixels from a wl_shm_buffer to this surface. The shm buffer may be * invalidated after calling this function. diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h index 222b0c4d..a9c86f2c 100644 --- a/include/wlr/render/interface.h +++ b/include/wlr/render/interface.h @@ -31,7 +31,7 @@ struct wlr_renderer *wlr_renderer_init(struct wlr_renderer_state *state, struct wlr_surface_impl { bool (*attach_pixels)(struct wlr_surface_state *state, uint32_t format, - int width, int height, const unsigned char *pixels); + int stride, int width, int height, const unsigned char *pixels); bool (*attach_shm)(struct wlr_surface_state *state, uint32_t format, struct wl_shm_buffer *shm); // TODO: egl diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 71e1d0fe..da5a7b07 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -42,6 +42,14 @@ struct wlr_output { struct wl_signal frame; struct wl_signal resolution; } events; + + struct { + bool is_sw; + int32_t x, y; + uint32_t width, height; + struct wlr_renderer *renderer; + struct wlr_surface *texture; + } cursor; }; void wlr_output_enable(struct wlr_output *output, bool enable); @@ -55,5 +63,7 @@ bool wlr_output_move_cursor(struct wlr_output *output, int x, int y); void wlr_output_destroy(struct wlr_output *output); void wlr_output_effective_resolution(struct wlr_output *output, int *width, int *height); +void wlr_output_make_current(struct wlr_output *output); +void wlr_output_swap_buffers(struct wlr_output *output); #endif |