compositor: Add a switch_mode hook and a wrapper into the output.
This allow each output backend to switch the display mode. It is
useful to some applications like fullscreen game, xbmc.
diff --git a/src/compositor.h b/src/compositor.h
index 93284c5..f21f769 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -99,6 +99,7 @@
void (*destroy)(struct weston_output *output);
void (*assign_planes)(struct weston_output *output);
void (*read_pixels)(struct weston_output *output, void *data);
+ int (*switch_mode)(struct weston_output *output, struct weston_mode *mode);
/* backlight values are on 0-255 range, where higher is brighter */
uint32_t backlight_current;
@@ -563,4 +564,7 @@
struct weston_compositor *
backend_init(struct wl_display *display, int argc, char *argv[]);
+int
+weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode);
+
#endif