ui/vc: change the argument for QemuTextConsole
Those functions are specifc to text/vc console, make that explicit from the argument type. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-45-marcandre.lureau@redhat.com>
This commit is contained in:
+6
-8
@@ -1135,16 +1135,12 @@ static void kbd_send_chars(QemuTextConsole *s)
|
||||
}
|
||||
|
||||
/* called when an ascii key is pressed */
|
||||
void kbd_put_keysym_console(QemuConsole *con, int keysym)
|
||||
void kbd_put_keysym_console(QemuTextConsole *s, int keysym)
|
||||
{
|
||||
QemuTextConsole *s = (QemuTextConsole *)object_dynamic_cast(OBJECT(con), TYPE_QEMU_TEXT_CONSOLE);
|
||||
uint8_t buf[16], *q;
|
||||
int c;
|
||||
uint32_t num_free;
|
||||
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
switch(keysym) {
|
||||
case QEMU_KEY_CTRL_UP:
|
||||
console_scroll(s, -1);
|
||||
@@ -1214,7 +1210,7 @@ static const int ctrl_qcode_to_keysym[Q_KEY_CODE__MAX] = {
|
||||
[Q_KEY_CODE_PGDN] = QEMU_KEY_CTRL_PAGEDOWN,
|
||||
};
|
||||
|
||||
bool kbd_put_qcode_console(QemuConsole *s, int qcode, bool ctrl)
|
||||
bool kbd_put_qcode_console(QemuTextConsole *s, int qcode, bool ctrl)
|
||||
{
|
||||
int keysym;
|
||||
|
||||
@@ -1226,7 +1222,7 @@ bool kbd_put_qcode_console(QemuConsole *s, int qcode, bool ctrl)
|
||||
return true;
|
||||
}
|
||||
|
||||
void kbd_put_string_console(QemuConsole *s, const char *str, int len)
|
||||
void kbd_put_string_console(QemuTextConsole *s, const char *str, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1237,7 +1233,9 @@ void kbd_put_string_console(QemuConsole *s, const char *str, int len)
|
||||
|
||||
void kbd_put_keysym(int keysym)
|
||||
{
|
||||
kbd_put_keysym_console(active_console, keysym);
|
||||
if (QEMU_IS_TEXT_CONSOLE(active_console)) {
|
||||
kbd_put_keysym_console(QEMU_TEXT_CONSOLE(active_console), keysym);
|
||||
}
|
||||
}
|
||||
|
||||
static void text_console_invalidate(void *opaque)
|
||||
|
||||
Reference in New Issue
Block a user