From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUwd0-0003XD-QC for qemu-devel@nongnu.org; Wed, 24 Apr 2013 06:08:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUwcz-00044o-1w for qemu-devel@nongnu.org; Wed, 24 Apr 2013 06:08:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUwcy-00044Y-OH for qemu-devel@nongnu.org; Wed, 24 Apr 2013 06:08:40 -0400 From: Gerd Hoffmann Date: Wed, 24 Apr 2013 12:08:37 +0200 Message-Id: <1366798118-3248-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1366798118-3248-1-git-send-email-kraxel@redhat.com> References: <1366798118-3248-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] input: make QEMUPutLEDEntry + QEMUPutMouseEntry private List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Gerd Hoffmann There is no need for anybody outside ui/input.c to access the struct elements. Move the definitions, leaving only the typedefs in the header files. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 19 ++----------------- ui/input.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index e591d74..5cc5d0c 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -28,23 +28,8 @@ typedef void QEMUPutKBDEvent(void *opaque, int keycode); typedef void QEMUPutLEDEvent(void *opaque, int ledstate); typedef void QEMUPutMouseEvent(void *opaque, int dx, int dy, int dz, int buttons_state); -typedef struct QEMUPutMouseEntry { - QEMUPutMouseEvent *qemu_put_mouse_event; - void *qemu_put_mouse_event_opaque; - int qemu_put_mouse_event_absolute; - char *qemu_put_mouse_event_name; - - int index; - - /* used internally by qemu for handling mice */ - QTAILQ_ENTRY(QEMUPutMouseEntry) node; -} QEMUPutMouseEntry; - -typedef struct QEMUPutLEDEntry { - QEMUPutLEDEvent *put_led; - void *opaque; - QTAILQ_ENTRY(QEMUPutLEDEntry) next; -} QEMUPutLEDEntry; +typedef struct QEMUPutMouseEntry QEMUPutMouseEntry; +typedef struct QEMUPutLEDEntry QEMUPutLEDEntry; void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque); void qemu_remove_kbd_event_handler(void); diff --git a/ui/input.c b/ui/input.c index ecfeb43..d8793e7 100644 --- a/ui/input.c +++ b/ui/input.c @@ -29,6 +29,24 @@ #include "qmp-commands.h" #include "qapi-types.h" +struct QEMUPutMouseEntry { + QEMUPutMouseEvent *qemu_put_mouse_event; + void *qemu_put_mouse_event_opaque; + int qemu_put_mouse_event_absolute; + char *qemu_put_mouse_event_name; + + int index; + + /* used internally by qemu for handling mice */ + QTAILQ_ENTRY(QEMUPutMouseEntry) node; +}; + +struct QEMUPutLEDEntry { + QEMUPutLEDEvent *put_led; + void *opaque; + QTAILQ_ENTRY(QEMUPutLEDEntry) next; +}; + static QEMUPutKBDEvent *qemu_put_kbd_event; static void *qemu_put_kbd_event_opaque; static QTAILQ_HEAD(, QEMUPutLEDEntry) led_handlers = QTAILQ_HEAD_INITIALIZER(led_handlers); -- 1.7.9.7