mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
ui/console: declare console types in console.h
We are going to split the console.c unit next, and implement separately. But we need to check the underlying type in various places. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-36-marcandre.lureau@redhat.com>
This commit is contained in:
parent
742a6896ea
commit
8c6381d846
2 changed files with 21 additions and 19 deletions
|
@ -12,6 +12,27 @@
|
|||
# include "ui/shader.h"
|
||||
#endif
|
||||
|
||||
#define TYPE_QEMU_CONSOLE "qemu-console"
|
||||
OBJECT_DECLARE_TYPE(QemuConsole, QemuConsoleClass, QEMU_CONSOLE)
|
||||
|
||||
#define TYPE_QEMU_GRAPHIC_CONSOLE "qemu-graphic-console"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QemuGraphicConsole, QEMU_GRAPHIC_CONSOLE)
|
||||
|
||||
#define TYPE_QEMU_TEXT_CONSOLE "qemu-text-console"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QemuTextConsole, QEMU_TEXT_CONSOLE)
|
||||
|
||||
#define TYPE_QEMU_FIXED_TEXT_CONSOLE "qemu-fixed-text-console"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(QemuFixedTextConsole, QEMU_FIXED_TEXT_CONSOLE)
|
||||
|
||||
#define QEMU_IS_GRAPHIC_CONSOLE(c) \
|
||||
object_dynamic_cast(OBJECT(c), TYPE_QEMU_GRAPHIC_CONSOLE)
|
||||
|
||||
#define QEMU_IS_TEXT_CONSOLE(c) \
|
||||
object_dynamic_cast(OBJECT(c), TYPE_QEMU_TEXT_CONSOLE)
|
||||
|
||||
#define QEMU_IS_FIXED_TEXT_CONSOLE(c) \
|
||||
object_dynamic_cast(OBJECT(c), TYPE_QEMU_FIXED_TEXT_CONSOLE)
|
||||
|
||||
/* keyboard/mouse support */
|
||||
|
||||
#define MOUSE_EVENT_LBUTTON 0x01
|
||||
|
@ -112,10 +133,6 @@ void console_handle_touch_event(QemuConsole *con,
|
|||
Error **errp);
|
||||
/* consoles */
|
||||
|
||||
#define TYPE_QEMU_CONSOLE "qemu-console"
|
||||
OBJECT_DECLARE_TYPE(QemuConsole, QemuConsoleClass, QEMU_CONSOLE)
|
||||
|
||||
|
||||
struct QemuConsoleClass {
|
||||
ObjectClass parent_class;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue