aboutsummaryrefslogtreecommitdiff
path: root/include/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-03-05 15:24:14 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-03-18 10:21:59 +0100
commitc78f71378a345ea240c288993ca1378ded5504b9 (patch)
tree0d5dc0c86064556faed610883db4422ac13c6d66 /include/ui
parentbc2ed9704fff2c721e4056ab5281f0291718bfa6 (diff)
console: stop using DisplayState in gfx hardware emulation
Use QemuConsole instead. Updates interfaces in console.[ch] and adapts gfx hardware emulation code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/console.h34
-rw-r--r--include/ui/spice-display.h3
2 files changed, 20 insertions, 17 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index c32c834871..92c31a9cfe 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -223,18 +223,18 @@ void register_displaychangelistener(DisplayState *ds,
DisplayChangeListener *dcl);
void unregister_displaychangelistener(DisplayChangeListener *dcl);
-void dpy_gfx_update(DisplayState *s, int x, int y, int w, int h);
-void dpy_gfx_replace_surface(DisplayState *s,
+void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h);
+void dpy_gfx_replace_surface(QemuConsole *con,
DisplaySurface *surface);
void dpy_refresh(DisplayState *s);
-void dpy_gfx_copy(struct DisplayState *s, int src_x, int src_y,
+void dpy_gfx_copy(QemuConsole *con, int src_x, int src_y,
int dst_x, int dst_y, int w, int h);
-void dpy_text_cursor(struct DisplayState *s, int x, int y);
-void dpy_text_update(DisplayState *s, int x, int y, int w, int h);
-void dpy_text_resize(DisplayState *s, int w, int h);
-void dpy_mouse_set(struct DisplayState *s, int x, int y, int on);
-void dpy_cursor_define(struct DisplayState *s, QEMUCursor *cursor);
-bool dpy_cursor_define_supported(struct DisplayState *s);
+void dpy_text_cursor(QemuConsole *con, int x, int y);
+void dpy_text_update(QemuConsole *con, int x, int y, int w, int h);
+void dpy_text_resize(QemuConsole *con, int w, int h);
+void dpy_mouse_set(QemuConsole *con, int x, int y, int on);
+void dpy_cursor_define(QemuConsole *con, QEMUCursor *cursor);
+bool dpy_cursor_define_supported(QemuConsole *con);
static inline int surface_stride(DisplaySurface *s)
{
@@ -347,11 +347,11 @@ typedef void (*vga_hw_screen_dump_ptr)(void *, const char *, bool cswitch,
Error **errp);
typedef void (*vga_hw_text_update_ptr)(void *, console_ch_t *);
-DisplayState *graphic_console_init(vga_hw_update_ptr update,
- vga_hw_invalidate_ptr invalidate,
- vga_hw_screen_dump_ptr screen_dump,
- vga_hw_text_update_ptr text_update,
- void *opaque);
+QemuConsole *graphic_console_init(vga_hw_update_ptr update,
+ vga_hw_invalidate_ptr invalidate,
+ vga_hw_screen_dump_ptr screen_dump,
+ vga_hw_text_update_ptr text_update,
+ void *opaque);
void vga_hw_update(void);
void vga_hw_invalidate(void);
@@ -362,9 +362,11 @@ int is_fixedsize_console(void);
void text_consoles_set_display(DisplayState *ds);
void console_select(unsigned int index);
void console_color_init(DisplayState *ds);
-void qemu_console_resize(DisplayState *ds, int width, int height);
-void qemu_console_copy(DisplayState *ds, int src_x, int src_y,
+void qemu_console_resize(QemuConsole *con, int width, int height);
+void qemu_console_copy(QemuConsole *con, int src_x, int src_y,
int dst_x, int dst_y, int w, int h);
+DisplaySurface *qemu_console_surface(QemuConsole *con);
+DisplayState *qemu_console_displaystate(QemuConsole *console);
typedef CharDriverState *(VcHandler)(ChardevVC *vc);
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
index a9e1e09b42..7a20fc43ff 100644
--- a/include/ui/spice-display.h
+++ b/include/ui/spice-display.h
@@ -71,6 +71,7 @@ typedef struct SimpleSpiceDisplay SimpleSpiceDisplay;
typedef struct SimpleSpiceUpdate SimpleSpiceUpdate;
struct SimpleSpiceDisplay {
+ QemuConsole *con;
DisplaySurface *ds;
DisplayChangeListener dcl;
void *buf;
@@ -113,7 +114,7 @@ void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd);
void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd);
void qemu_spice_vm_change_state_handler(void *opaque, int running,
RunState state);
-void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd, DisplayState *ds);
+void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd);
void qemu_spice_display_update(SimpleSpiceDisplay *ssd,
int x, int y, int w, int h);