mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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 <kraxel@redhat.com>
This commit is contained in:
parent
27be55872d
commit
380cd056ec
26 changed files with 155 additions and 104 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue