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
11struct wl_display;
12
13struct 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
37struct output *
38output_new(drmModeConnector *connector);
39#endif
40struct output *
41output_new_fb(uint32_t width, uint32_t height, const char *name);
42void
43output_destroy(struct output *output);
44
45#endif