1 #ifndef WL_EOM_SERVER_PROTOCOL_H
2 #define WL_EOM_SERVER_PROTOCOL_H
10 #include "wayland-server.h"
16 struct wl_shell_surface;
19 extern const struct wl_interface wl_eom_interface;
21 #ifndef WL_EOM_ERROR_ENUM
22 #define WL_EOM_ERROR_ENUM
24 WL_EOM_ERROR_NONE = 0,
25 WL_EOM_ERROR_NO_OUTPUT = 1,
26 WL_EOM_ERROR_NO_ATTRIBUTE = 2,
27 WL_EOM_ERROR_OUTPUT_OCCUPIED = 3,
29 #endif /* WL_EOM_ERROR_ENUM */
31 #ifndef WL_EOM_TYPE_ENUM
32 #define WL_EOM_TYPE_ENUM
34 * wl_eom_type - connector type of the external output
35 * @WL_EOM_TYPE_NONE: none
36 * @WL_EOM_TYPE_VGA: VGA output connector type
37 * @WL_EOM_TYPE_DIVI: VGA output connector type
38 * @WL_EOM_TYPE_DIVD: VGA output connector type
39 * @WL_EOM_TYPE_DIVA: VGA output connector type
40 * @WL_EOM_TYPE_COMPOSITE: VGA output connector type
41 * @WL_EOM_TYPE_SVIDEO: VGA output connector type
42 * @WL_EOM_TYPE_LVDS: VGA output connector type
43 * @WL_EOM_TYPE_COMPONENT: VGA output connector type
44 * @WL_EOM_TYPE_9PINDIN: VGA output connector type
45 * @WL_EOM_TYPE_DISPLAYPORT: VGA output connector type
46 * @WL_EOM_TYPE_HDMIA: VGA output connector type
47 * @WL_EOM_TYPE_HDMIB: VGA output connector type
48 * @WL_EOM_TYPE_TV: VGA output connector type
49 * @WL_EOM_TYPE_EDP: VGA output connector type
50 * @WL_EOM_TYPE_VIRTUAL: VGA output connector type
51 * @WL_EOM_TYPE_DSI: VGA output connector type
61 WL_EOM_TYPE_COMPOSITE = 5,
62 WL_EOM_TYPE_SVIDEO = 6,
64 WL_EOM_TYPE_COMPONENT = 8,
65 WL_EOM_TYPE_9PINDIN = 9,
66 WL_EOM_TYPE_DISPLAYPORT = 10,
67 WL_EOM_TYPE_HDMIA = 11,
68 WL_EOM_TYPE_HDMIB = 12,
71 WL_EOM_TYPE_VIRTUAL = 15,
74 #endif /* WL_EOM_TYPE_ENUM */
76 #ifndef WL_EOM_STATUS_ENUM
77 #define WL_EOM_STATUS_ENUM
79 * wl_eom_status - connection status of the external output
80 * @WL_EOM_STATUS_NONE: none
81 * @WL_EOM_STATUS_CONNECTION: output connected
82 * @WL_EOM_STATUS_DISCONNECTION: output disconnected
87 WL_EOM_STATUS_NONE = 0,
88 WL_EOM_STATUS_CONNECTION = 1,
89 WL_EOM_STATUS_DISCONNECTION = 2,
91 #endif /* WL_EOM_STATUS_ENUM */
93 #ifndef WL_EOM_MODE_ENUM
94 #define WL_EOM_MODE_ENUM
96 * wl_eom_mode - mode of the external output
97 * @WL_EOM_MODE_NONE: none
98 * @WL_EOM_MODE_MIRROR: mirror mode
99 * @WL_EOM_MODE_PRESENTATION: presentation mode
104 WL_EOM_MODE_NONE = 0,
105 WL_EOM_MODE_MIRROR = 1,
106 WL_EOM_MODE_PRESENTATION = 2,
108 #endif /* WL_EOM_MODE_ENUM */
110 #ifndef WL_EOM_ATTRIBUTE_ENUM
111 #define WL_EOM_ATTRIBUTE_ENUM
113 * wl_eom_attribute - attribute of the external output
114 * @WL_EOM_ATTRIBUTE_NONE: none
115 * @WL_EOM_ATTRIBUTE_NORMAL: nomal attribute
116 * @WL_EOM_ATTRIBUTE_EXCLUSIVE_SHARED: exclusive shared attribute
117 * @WL_EOM_ATTRIBUTE_EXCLUSIVE: exclusive attribute
121 enum wl_eom_attribute {
122 WL_EOM_ATTRIBUTE_NONE = 0,
123 WL_EOM_ATTRIBUTE_NORMAL = 1,
124 WL_EOM_ATTRIBUTE_EXCLUSIVE_SHARED = 2,
125 WL_EOM_ATTRIBUTE_EXCLUSIVE = 3,
127 #endif /* WL_EOM_ATTRIBUTE_ENUM */
129 #ifndef WL_EOM_ATTRIBUTE_STATE_ENUM
130 #define WL_EOM_ATTRIBUTE_STATE_ENUM
132 * wl_eom_attribute_state - state of the external output attribute
133 * @WL_EOM_ATTRIBUTE_STATE_NONE: none
134 * @WL_EOM_ATTRIBUTE_STATE_ACTIVE: attribute is active on the output
135 * @WL_EOM_ATTRIBUTE_STATE_INACTIVE: attribute is inactive on the output
136 * @WL_EOM_ATTRIBUTE_STATE_LOST: the connection of output is lost
140 enum wl_eom_attribute_state {
141 WL_EOM_ATTRIBUTE_STATE_NONE = 0,
142 WL_EOM_ATTRIBUTE_STATE_ACTIVE = 1,
143 WL_EOM_ATTRIBUTE_STATE_INACTIVE = 2,
144 WL_EOM_ATTRIBUTE_STATE_LOST = 3,
146 #endif /* WL_EOM_ATTRIBUTE_STATE_ENUM */
149 * wl_eom - an interface to get the information of the external outputs
150 * @set_attribute: (none)
151 * @set_xdg_window: (none)
152 * @set_shell_window: (none)
153 * @get_output_info: (none)
157 struct wl_eom_interface {
159 * set_attribute - (none)
163 void (*set_attribute)(struct wl_client *client,
164 struct wl_resource *resource,
168 * set_xdg_window - (none)
172 void (*set_xdg_window)(struct wl_client *client,
173 struct wl_resource *resource,
175 struct wl_resource *surface);
177 * set_shell_window - (none)
181 void (*set_shell_window)(struct wl_client *client,
182 struct wl_resource *resource,
184 struct wl_resource *surface);
186 * get_output_info - (none)
189 void (*get_output_info)(struct wl_client *client,
190 struct wl_resource *resource,
194 #define WL_EOM_OUTPUT_COUNT 0
195 #define WL_EOM_OUTPUT_INFO 1
196 #define WL_EOM_OUTPUT_TYPE 2
197 #define WL_EOM_OUTPUT_MODE 3
198 #define WL_EOM_OUTPUT_ATTRIBUTE 4
199 #define WL_EOM_OUTPUT_SET_WINDOW 5
201 #define WL_EOM_OUTPUT_COUNT_SINCE_VERSION 1
202 #define WL_EOM_OUTPUT_INFO_SINCE_VERSION 1
203 #define WL_EOM_OUTPUT_TYPE_SINCE_VERSION 1
204 #define WL_EOM_OUTPUT_MODE_SINCE_VERSION 1
205 #define WL_EOM_OUTPUT_ATTRIBUTE_SINCE_VERSION 1
206 #define WL_EOM_OUTPUT_SET_WINDOW_SINCE_VERSION 1
209 wl_eom_send_output_count(struct wl_resource *resource_, uint32_t count)
211 wl_resource_post_event(resource_, WL_EOM_OUTPUT_COUNT, count);
215 wl_eom_send_output_info(struct wl_resource *resource_, uint32_t output_id, uint32_t type, uint32_t mode, uint32_t w, uint32_t h, uint32_t w_mm, uint32_t h_mm, uint32_t connection)
217 wl_resource_post_event(resource_, WL_EOM_OUTPUT_INFO, output_id, type, mode, w, h, w_mm, h_mm, connection);
221 wl_eom_send_output_type(struct wl_resource *resource_, uint32_t output_id, uint32_t type, uint32_t status)
223 wl_resource_post_event(resource_, WL_EOM_OUTPUT_TYPE, output_id, type, status);
227 wl_eom_send_output_mode(struct wl_resource *resource_, uint32_t output_id, uint32_t mode)
229 wl_resource_post_event(resource_, WL_EOM_OUTPUT_MODE, output_id, mode);
233 wl_eom_send_output_attribute(struct wl_resource *resource_, uint32_t output_id, uint32_t attribute, uint32_t attribute_state, uint32_t error)
235 wl_resource_post_event(resource_, WL_EOM_OUTPUT_ATTRIBUTE, output_id, attribute, attribute_state, error);
239 wl_eom_send_output_set_window(struct wl_resource *resource_, uint32_t output_id, uint32_t error)
241 wl_resource_post_event(resource_, WL_EOM_OUTPUT_SET_WINDOW, output_id, error);