From 6f90f3d786ec1ddae31535bb4be4a1120fd5dfe0 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 24 Jan 2014 17:38:20 +0100 Subject: console: add QemuUIInfo Signed-off-by: Gerd Hoffmann --- ui/console.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'ui') diff --git a/ui/console.c b/ui/console.c index 0a4f9128a5..4df251d579 100644 --- a/ui/console.c +++ b/ui/console.c @@ -125,6 +125,7 @@ struct QemuConsole { /* Graphic console state. */ Object *device; uint32_t head; + QemuUIInfo ui_info; const GraphicHwOps *hw_ops; void *hw; @@ -1347,6 +1348,16 @@ void unregister_displaychangelistener(DisplayChangeListener *dcl) gui_setup_refresh(ds); } +int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info) +{ + assert(con != NULL); + con->ui_info = *info; + if (con->hw_ops->ui_info) { + return con->hw_ops->ui_info(con->hw, con->head, info); + } + return -1; +} + void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h) { DisplayState *s = con->ds; @@ -1669,6 +1680,12 @@ uint32_t qemu_console_get_head(QemuConsole *con) return con ? con->head : -1; } +QemuUIInfo *qemu_console_get_ui_info(QemuConsole *con) +{ + assert(con != NULL); + return &con->ui_info; +} + int qemu_console_get_width(QemuConsole *con, int fallback) { if (con == NULL) { -- cgit v1.2.1