@samitouri / QOSamiQemu / commits / f0adf773e6

ui/input: remove old LED handler broadcast queue

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Marc-André Lureau committed Jun 9, 2026 at 01:30 UTC f0adf773e6a21a91f7fcea5e32aa59c2674f233a
2 files changed -49
include/ui/console.h
-9
@@ -54,15 +54,6 @@ enum qemu_color_names {
54 #define ATTR2CHTYPE(c, fg, bg, bold) \
55 ((bold) << 21 | (bg) << 11 | (fg) << 8 | (c))
56
57 -typedef void QEMUPutLEDEvent(void *opaque, int ledstate);
58 -
59 -typedef struct QEMUPutLEDEntry QEMUPutLEDEntry;
60 -
61 -QEMUPutLEDEntry *qemu_add_led_event_handler(QEMUPutLEDEvent *func, void *opaque);
62 -void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry);
63 -
64 -void kbd_put_ledstate(int ledstate);
65 -
57 bool qemu_mouse_set(int index, Error **errp);
58
59 /* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
ui/input.c
-40
@@ -689,46 +689,6 @@ void qemu_input_touch_event(QemuConsole *con,
689 }
690 }
691
692 -struct QEMUPutLEDEntry {
693 - QEMUPutLEDEvent *put_led;
694 - void *opaque;
695 - QTAILQ_ENTRY(QEMUPutLEDEntry) next;
696 -};
697 -
698 -static QTAILQ_HEAD(, QEMUPutLEDEntry) led_handlers =
699 - QTAILQ_HEAD_INITIALIZER(led_handlers);
700 -
701 -QEMUPutLEDEntry *qemu_add_led_event_handler(QEMUPutLEDEvent *func,
702 - void *opaque)
703 -{
704 - QEMUPutLEDEntry *s;
705 -
706 - s = g_new0(QEMUPutLEDEntry, 1);
707 -
708 - s->put_led = func;
709 - s->opaque = opaque;
710 - QTAILQ_INSERT_TAIL(&led_handlers, s, next);
711 - return s;
712 -}
713 -
714 -void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry)
715 -{
716 - if (entry == NULL) {
717 - return;
718 - }
719 - QTAILQ_REMOVE(&led_handlers, entry, next);
720 - g_free(entry);
721 -}
722 -
723 -void kbd_put_ledstate(int ledstate)
724 -{
725 - QEMUPutLEDEntry *cursor;
726 -
727 - QTAILQ_FOREACH(cursor, &led_handlers, next) {
728 - cursor->put_led(cursor->opaque, ledstate);
729 - }
730 -}
731 -
692 void qmp_send_key(KeyValueList *keys, bool has_hold_time, int64_t hold_time,
693 Error **errp)
694 {