aboutsummaryrefslogtreecommitdiff
path: root/ui/console.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-01-24 17:38:20 +0100
committerGerd Hoffmann <kraxel@redhat.com>2014-03-05 09:52:04 +0100
commit6f90f3d786ec1ddae31535bb4be4a1120fd5dfe0 (patch)
tree4fc7e04c2095da1e671cbda0a889cd8452836b6d /ui/console.c
parent5643706a095044d75df1c0588aac553a595b972b (diff)
console: add QemuUIInfo
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/console.c')
-rw-r--r--ui/console.c17
1 files changed, 17 insertions, 0 deletions
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) {