diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-08-30 13:38:20 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-12 10:37:02 +0400 |
commit | cc6ba2c6f53d9f6003a52845298807dac7709e0f (patch) | |
tree | 5a7ffdd4e65ecde068bc1b9343cc8b681ffc1512 /ui | |
parent | f5360a0d287923dcf8f1f25acdd8b772970175cb (diff) |
ui/vc: rename kbd_put to qemu_text_console functions
They are QemuTextConsole functions, let's make it clear.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/cocoa.m | 2 | ||||
-rw-r--r-- | ui/console.c | 10 | ||||
-rw-r--r-- | ui/curses.c | 2 | ||||
-rw-r--r-- | ui/gtk.c | 6 | ||||
-rw-r--r-- | ui/sdl2-input.c | 4 | ||||
-rw-r--r-- | ui/sdl2.c | 2 | ||||
-rw-r--r-- | ui/vnc.c | 54 |
7 files changed, 40 insertions, 40 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m index 90a89c5c8e..df6d13be38 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -784,7 +784,7 @@ static CGEventRef handleTapEvent(CGEventTapProxy proxy, CGEventType type, CGEven } if (keysym) { - kbd_put_keysym_console(NULL, keysym); + qemu_text_console_put_keysym(NULL, keysym); } } diff --git a/ui/console.c b/ui/console.c index 4c07791ac7..7c60fc7d18 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1135,7 +1135,7 @@ static void kbd_send_chars(QemuTextConsole *s) } /* called when an ascii key is pressed */ -void kbd_put_keysym_console(QemuTextConsole *s, int keysym) +void qemu_text_console_put_keysym(QemuTextConsole *s, int keysym) { uint8_t buf[16], *q; int c; @@ -1217,7 +1217,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(QemuTextConsole *s, int qcode, bool ctrl) +bool qemu_text_console_put_qcode(QemuTextConsole *s, int qcode, bool ctrl) { int keysym; @@ -1225,16 +1225,16 @@ bool kbd_put_qcode_console(QemuTextConsole *s, int qcode, bool ctrl) if (keysym == 0) { return false; } - kbd_put_keysym_console(s, keysym); + qemu_text_console_put_keysym(s, keysym); return true; } -void kbd_put_string_console(QemuTextConsole *s, const char *str, int len) +void qemu_text_console_put_string(QemuTextConsole *s, const char *str, int len) { int i; for (i = 0; i < len && str[i]; i++) { - kbd_put_keysym_console(s, str[i]); + qemu_text_console_put_keysym(s, str[i]); } } diff --git a/ui/curses.c b/ui/curses.c index 4ddbbae7cd..8bde8c5cf7 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -400,7 +400,7 @@ static void curses_refresh(DisplayChangeListener *dcl) if (keysym == -1) keysym = chr; - kbd_put_keysym_console(NULL, keysym); + qemu_text_console_put_keysym(NULL, keysym); } } } @@ -1190,12 +1190,12 @@ static gboolean gd_text_key_down(GtkWidget *widget, QemuTextConsole *con = QEMU_TEXT_CONSOLE(vc->gfx.dcl.con); if (key->keyval == GDK_KEY_Delete) { - kbd_put_qcode_console(con, Q_KEY_CODE_DELETE, false); + qemu_text_console_put_qcode(con, Q_KEY_CODE_DELETE, false); } else if (key->length) { - kbd_put_string_console(con, key->string, key->length); + qemu_text_console_put_string(con, key->string, key->length); } else { int qcode = gd_map_keycode(gd_get_keycode(key)); - kbd_put_qcode_console(con, qcode, false); + qemu_text_console_put_qcode(con, qcode, false); } return TRUE; } diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index a318cc5867..b02a89ee7c 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -49,10 +49,10 @@ void sdl2_process_key(struct sdl2_console *scon, if (ev->type == SDL_KEYDOWN) { switch (qcode) { case Q_KEY_CODE_RET: - kbd_put_keysym_console(s, '\n'); + qemu_text_console_put_keysym(s, '\n'); break; default: - kbd_put_qcode_console(s, qcode, ctrl); + qemu_text_console_put_qcode(s, qcode, ctrl); break; } } @@ -484,7 +484,7 @@ static void handle_textinput(SDL_Event *ev) } if (QEMU_IS_TEXT_CONSOLE(con)) { - kbd_put_string_console(QEMU_TEXT_CONSOLE(con), ev->text.text, strlen(ev->text.text)); + qemu_text_console_put_string(QEMU_TEXT_CONSOLE(con), ev->text.text, strlen(ev->text.text)); } } @@ -1945,88 +1945,88 @@ static void do_key_event(VncState *vs, int down, int keycode, int sym) case 0xb8: /* Right ALT */ break; case 0xc8: - kbd_put_keysym_console(NULL, QEMU_KEY_UP); + qemu_text_console_put_keysym(NULL, QEMU_KEY_UP); break; case 0xd0: - kbd_put_keysym_console(NULL, QEMU_KEY_DOWN); + qemu_text_console_put_keysym(NULL, QEMU_KEY_DOWN); break; case 0xcb: - kbd_put_keysym_console(NULL, QEMU_KEY_LEFT); + qemu_text_console_put_keysym(NULL, QEMU_KEY_LEFT); break; case 0xcd: - kbd_put_keysym_console(NULL, QEMU_KEY_RIGHT); + qemu_text_console_put_keysym(NULL, QEMU_KEY_RIGHT); break; case 0xd3: - kbd_put_keysym_console(NULL, QEMU_KEY_DELETE); + qemu_text_console_put_keysym(NULL, QEMU_KEY_DELETE); break; case 0xc7: - kbd_put_keysym_console(NULL, QEMU_KEY_HOME); + qemu_text_console_put_keysym(NULL, QEMU_KEY_HOME); break; case 0xcf: - kbd_put_keysym_console(NULL, QEMU_KEY_END); + qemu_text_console_put_keysym(NULL, QEMU_KEY_END); break; case 0xc9: - kbd_put_keysym_console(NULL, QEMU_KEY_PAGEUP); + qemu_text_console_put_keysym(NULL, QEMU_KEY_PAGEUP); break; case 0xd1: - kbd_put_keysym_console(NULL, QEMU_KEY_PAGEDOWN); + qemu_text_console_put_keysym(NULL, QEMU_KEY_PAGEDOWN); break; case 0x47: - kbd_put_keysym_console(NULL, numlock ? '7' : QEMU_KEY_HOME); + qemu_text_console_put_keysym(NULL, numlock ? '7' : QEMU_KEY_HOME); break; case 0x48: - kbd_put_keysym_console(NULL, numlock ? '8' : QEMU_KEY_UP); + qemu_text_console_put_keysym(NULL, numlock ? '8' : QEMU_KEY_UP); break; case 0x49: - kbd_put_keysym_console(NULL, numlock ? '9' : QEMU_KEY_PAGEUP); + qemu_text_console_put_keysym(NULL, numlock ? '9' : QEMU_KEY_PAGEUP); break; case 0x4b: - kbd_put_keysym_console(NULL, numlock ? '4' : QEMU_KEY_LEFT); + qemu_text_console_put_keysym(NULL, numlock ? '4' : QEMU_KEY_LEFT); break; case 0x4c: - kbd_put_keysym_console(NULL, '5'); + qemu_text_console_put_keysym(NULL, '5'); break; case 0x4d: - kbd_put_keysym_console(NULL, numlock ? '6' : QEMU_KEY_RIGHT); + qemu_text_console_put_keysym(NULL, numlock ? '6' : QEMU_KEY_RIGHT); break; case 0x4f: - kbd_put_keysym_console(NULL, numlock ? '1' : QEMU_KEY_END); + qemu_text_console_put_keysym(NULL, numlock ? '1' : QEMU_KEY_END); break; case 0x50: - kbd_put_keysym_console(NULL, numlock ? '2' : QEMU_KEY_DOWN); + qemu_text_console_put_keysym(NULL, numlock ? '2' : QEMU_KEY_DOWN); break; case 0x51: - kbd_put_keysym_console(NULL, numlock ? '3' : QEMU_KEY_PAGEDOWN); + qemu_text_console_put_keysym(NULL, numlock ? '3' : QEMU_KEY_PAGEDOWN); break; case 0x52: - kbd_put_keysym_console(NULL, '0'); + qemu_text_console_put_keysym(NULL, '0'); break; case 0x53: - kbd_put_keysym_console(NULL, numlock ? '.' : QEMU_KEY_DELETE); + qemu_text_console_put_keysym(NULL, numlock ? '.' : QEMU_KEY_DELETE); break; case 0xb5: - kbd_put_keysym_console(NULL, '/'); + qemu_text_console_put_keysym(NULL, '/'); break; case 0x37: - kbd_put_keysym_console(NULL, '*'); + qemu_text_console_put_keysym(NULL, '*'); break; case 0x4a: - kbd_put_keysym_console(NULL, '-'); + qemu_text_console_put_keysym(NULL, '-'); break; case 0x4e: - kbd_put_keysym_console(NULL, '+'); + qemu_text_console_put_keysym(NULL, '+'); break; case 0x9c: - kbd_put_keysym_console(NULL, '\n'); + qemu_text_console_put_keysym(NULL, '\n'); break; default: if (control) { - kbd_put_keysym_console(NULL, sym & 0x1f); + qemu_text_console_put_keysym(NULL, sym & 0x1f); } else { - kbd_put_keysym_console(NULL, sym); + qemu_text_console_put_keysym(NULL, sym); } break; } |