From 380cd056ec0e7fc8bbd553cdcb061d3ca612bb82 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 13 Mar 2013 14:04:18 +0100 Subject: console: add GraphicHwOps Pass a single GraphicHwOps struct pointer to graphic_console_init, instead of a bunch of function pointers. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/ui/console.h') diff --git a/include/ui/console.h b/include/ui/console.h index 50cd7b0560..f3e779193c 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -267,13 +267,13 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch) *dest = ch; } -typedef void (*graphic_hw_update_ptr)(void *); -typedef void (*graphic_hw_invalidate_ptr)(void *); -typedef void (*graphic_hw_text_update_ptr)(void *, console_ch_t *); +typedef struct GraphicHwOps { + void (*invalidate)(void *opaque); + void (*gfx_update)(void *opaque); + void (*text_update)(void *opaque, console_ch_t *text); +} GraphicHwOps; -QemuConsole *graphic_console_init(graphic_hw_update_ptr update, - graphic_hw_invalidate_ptr invalidate, - graphic_hw_text_update_ptr text_update, +QemuConsole *graphic_console_init(const GraphicHwOps *ops, void *opaque); void graphic_hw_update(QemuConsole *con); -- cgit v1.2.3