1 #ifndef WL_EOM_SERVER_PROTOCOL_H
2 #define WL_EOM_SERVER_PROTOCOL_H
10 #include "wayland-server.h"
17 extern const struct wl_interface wl_eom_interface;
19 #ifndef WL_EOM_ERROR_ENUM
20 #define WL_EOM_ERROR_ENUM
22 WL_EOM_ERROR_NONE = 0,
23 WL_EOM_ERROR_NO_OUTPUT = 1,
24 WL_EOM_ERROR_NO_ATTRIBUTE = 2,
25 WL_EOM_ERROR_OUTPUT_OCCUPIED = 3,
27 #endif /* WL_EOM_ERROR_ENUM */
29 #ifndef WL_EOM_TYPE_ENUM
30 #define WL_EOM_TYPE_ENUM
32 * wl_eom_type - connector type of the external output
33 * @WL_EOM_TYPE_NONE: none
34 * @WL_EOM_TYPE_VGA: VGA output connector type
35 * @WL_EOM_TYPE_DIVI: VGA output connector type
36 * @WL_EOM_TYPE_DIVD: VGA output connector type
37 * @WL_EOM_TYPE_DIVA: VGA output connector type
38 * @WL_EOM_TYPE_COMPOSITE: VGA output connector type
39 * @WL_EOM_TYPE_SVIDEO: VGA output connector type
40 * @WL_EOM_TYPE_LVDS: VGA output connector type
41 * @WL_EOM_TYPE_COMPONENT: VGA output connector type
42 * @WL_EOM_TYPE_9PINDIN: VGA output connector type
43 * @WL_EOM_TYPE_DISPLAYPORT: VGA output connector type
44 * @WL_EOM_TYPE_HDMIA: VGA output connector type
45 * @WL_EOM_TYPE_HDMIB: VGA output connector type
46 * @WL_EOM_TYPE_TV: VGA output connector type
47 * @WL_EOM_TYPE_EDP: VGA output connector type
48 * @WL_EOM_TYPE_VIRTUAL: VGA output connector type
49 * @WL_EOM_TYPE_DSI: VGA output connector type
59 WL_EOM_TYPE_COMPOSITE = 5,
60 WL_EOM_TYPE_SVIDEO = 6,
62 WL_EOM_TYPE_COMPONENT = 8,
63 WL_EOM_TYPE_9PINDIN = 9,
64 WL_EOM_TYPE_DISPLAYPORT = 10,
65 WL_EOM_TYPE_HDMIA = 11,
66 WL_EOM_TYPE_HDMIB = 12,
69 WL_EOM_TYPE_VIRTUAL = 15,
72 #endif /* WL_EOM_TYPE_ENUM */
74 #ifndef WL_EOM_STATUS_ENUM
75 #define WL_EOM_STATUS_ENUM
77 * wl_eom_status - connection status of the external output
78 * @WL_EOM_STATUS_NONE: none
79 * @WL_EOM_STATUS_CONNECTION: output connected
80 * @WL_EOM_STATUS_DISCONNECTION: output disconnected
85 WL_EOM_STATUS_NONE = 0,
86 WL_EOM_STATUS_CONNECTION = 1,
87 WL_EOM_STATUS_DISCONNECTION = 2,
89 #endif /* WL_EOM_STATUS_ENUM */
91 #ifndef WL_EOM_MODE_ENUM
92 #define WL_EOM_MODE_ENUM
94 * wl_eom_mode - mode of the external output
95 * @WL_EOM_MODE_NONE: none
96 * @WL_EOM_MODE_MIRROR: mirror mode
97 * @WL_EOM_MODE_PRESENTATION: presentation mode
102 WL_EOM_MODE_NONE = 0,
103 WL_EOM_MODE_MIRROR = 1,
104 WL_EOM_MODE_PRESENTATION = 2,
106 #endif /* WL_EOM_MODE_ENUM */
108 #ifndef WL_EOM_ATTRIBUTE_ENUM
109 #define WL_EOM_ATTRIBUTE_ENUM
111 * wl_eom_attribute - attribute of the external output
112 * @WL_EOM_ATTRIBUTE_NONE: none
113 * @WL_EOM_ATTRIBUTE_NORMAL: nomal attribute
114 * @WL_EOM_ATTRIBUTE_EXCLUSIVE_SHARED: exclusive shared attribute
115 * @WL_EOM_ATTRIBUTE_EXCLUSIVE: exclusive attribute
119 enum wl_eom_attribute {
120 WL_EOM_ATTRIBUTE_NONE = 0,
121 WL_EOM_ATTRIBUTE_NORMAL = 1,
122 WL_EOM_ATTRIBUTE_EXCLUSIVE_SHARED = 2,
123 WL_EOM_ATTRIBUTE_EXCLUSIVE = 3,
125 #endif /* WL_EOM_ATTRIBUTE_ENUM */
127 #ifndef WL_EOM_ATTRIBUTE_STATE_ENUM
128 #define WL_EOM_ATTRIBUTE_STATE_ENUM
130 * wl_eom_attribute_state - state of the external output attribute
131 * @WL_EOM_ATTRIBUTE_STATE_NONE: none
132 * @WL_EOM_ATTRIBUTE_STATE_ACTIVE: attribute is active on the output
133 * @WL_EOM_ATTRIBUTE_STATE_INACTIVE: attribute is inactive on the output
134 * @WL_EOM_ATTRIBUTE_STATE_LOST: the connection of output is lost
138 enum wl_eom_attribute_state {
139 WL_EOM_ATTRIBUTE_STATE_NONE = 0,
140 WL_EOM_ATTRIBUTE_STATE_ACTIVE = 1,
141 WL_EOM_ATTRIBUTE_STATE_INACTIVE = 2,
142 WL_EOM_ATTRIBUTE_STATE_LOST = 3,
144 #endif /* WL_EOM_ATTRIBUTE_STATE_ENUM */
147 * wl_eom - an interface to get the information of the external outputs
148 * @set_attribute: (none)
152 struct wl_eom_interface {
154 * set_attribute - (none)
158 void (*set_attribute)(struct wl_client *client,
159 struct wl_resource *resource,
163 * get_output_info - (none)
166 void (*get_output_info)(struct wl_client *client,
167 struct wl_resource *resource,
171 #define WL_EOM_OUTPUT_COUNT 0
172 #define WL_EOM_OUTPUT_INFO 1
173 #define WL_EOM_OUTPUT_TYPE 2
174 #define WL_EOM_OUTPUT_MODE 3
175 #define WL_EOM_OUTPUT_ATTRIBUTE 4
177 #define WL_EOM_OUTPUT_TYPE_SINCE_VERSION 1
178 #define WL_EOM_OUTPUT_MODE_SINCE_VERSION 1
179 #define WL_EOM_OUTPUT_ATTRIBUTE_SINCE_VERSION 1
182 wl_eom_send_output_count(struct wl_resource *resource_, uint32_t output_id, uint32_t count)
184 wl_resource_post_event(resource_, WL_EOM_OUTPUT_COUNT, output_id, count);
188 wl_eom_send_output_info(struct wl_resource *resource_, uint32_t output_id, uint32_t type, uint32_t mode,
189 uint32_t w, uint32_t h, uint32_t w_mm, uint32_t h_mm, uint32_t connection)
191 wl_resource_post_event(resource_, WL_EOM_OUTPUT_INFO, output_id, type, mode, w, h, w_mm, h_mm, connection);
195 wl_eom_send_output_type(struct wl_resource *resource_, uint32_t output_id, uint32_t type, uint32_t status)
197 wl_resource_post_event(resource_, WL_EOM_OUTPUT_TYPE, output_id, type, status);
201 wl_eom_send_output_mode(struct wl_resource *resource_, uint32_t output_id, uint32_t mode)
203 wl_resource_post_event(resource_, WL_EOM_OUTPUT_MODE, output_id, mode);
207 wl_eom_send_output_attribute(struct wl_resource *resource_, uint32_t output_id, uint32_t attribute, uint32_t attribute_state, uint32_t error)
209 wl_resource_post_event(resource_, WL_EOM_OUTPUT_ATTRIBUTE, output_id, attribute, attribute_state, error);