backend.h (828B)
1 #ifndef SWC_BACKEND_H 2 #define SWC_BACKEND_H 3 4 #include <stdbool.h> 5 #include <stdint.h> 6 7 struct screen; 8 struct wl_list; 9 struct wld_buffer; 10 struct wld_context; 11 struct wld_renderer; 12 struct wld_surface; 13 14 /* rendering state shared by every backend */ 15 struct swc_backend { 16 struct wld_context *context; 17 struct wld_renderer *renderer; 18 uint32_t cursor_width; 19 uint32_t cursor_height; 20 21 /* backend feeds the seat, no input devices */ 22 bool virtual_input; 23 /* and fingers with it */ 24 bool virtual_touch; 25 26 /* optional, unset means the built-in video backend */ 27 bool (*create_screens)(struct wl_list *screens); 28 struct wld_surface *(*create_target)(struct screen *screen); 29 void (*set_cursor)(struct wld_buffer *buffer, int32_t hotspot_x, 30 int32_t hotspot_y); 31 void (*start)(void); 32 void (*finalize)(void); 33 }; 34 35 #endif