output.h (949B)
1 #ifndef SWC_OUTPUT_H 2 #define SWC_OUTPUT_H 3 4 #include <pixman.h> 5 #include <stdint.h> 6 #include <wayland-util.h> 7 #ifdef ENABLE_DRM 8 #include <xf86drmMode.h> 9 #endif 10 11 struct wl_display; 12 13 struct output { 14 struct wl_resource *resource; 15 struct screen *screen; 16 17 char name[24]; 18 /* The physical dimensions (in mm) of this output */ 19 uint32_t physical_width, physical_height; 20 21 struct wl_array modes; 22 struct mode *preferred_mode; 23 24 pixman_region32_t current_damage, previous_damage; 25 26 #ifdef ENABLE_DRM 27 /* The DRM connector corresponding to this output */ 28 uint32_t connector; 29 #endif 30 31 struct wl_global *global; 32 struct wl_list resources; 33 struct wl_list link; 34 }; 35 36 #ifdef ENABLE_DRM 37 struct output * 38 output_new(drmModeConnector *connector); 39 #endif 40 struct output * 41 output_new_fb(uint32_t width, uint32_t height, const char *name); 42 void 43 output_set_size(struct output *output, uint32_t width, uint32_t height); 44 void 45 output_destroy(struct output *output); 46 47 #endif