From patchwork Thu Feb 28 07:41:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 223783 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D33282C008C for ; Thu, 28 Feb 2013 18:42:21 +1100 (EST) Received: from localhost ([::1]:40518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAy8B-0003HX-N0 for incoming@patchwork.ozlabs.org; Thu, 28 Feb 2013 02:42:19 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAy7s-0003HI-Qd for qemu-devel@nongnu.org; Thu, 28 Feb 2013 02:42:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAy7r-0004jr-PY for qemu-devel@nongnu.org; Thu, 28 Feb 2013 02:42:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:22468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAy7r-0004jb-H6 for qemu-devel@nongnu.org; Thu, 28 Feb 2013 02:41:59 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1S7fvDb015228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Feb 2013 02:41:57 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1S7fumj014133; Thu, 28 Feb 2013 02:41:57 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id F3AF4452AE; Thu, 28 Feb 2013 08:41:55 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 28 Feb 2013 08:41:54 +0100 Message-Id: <1362037315-26896-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1362037315-26896-1-git-send-email-kraxel@redhat.com> References: <1362037315-26896-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Gerd Hoffmann Subject: [Qemu-devel] [PATCH 1/2] input: make QEMUPutLEDEntry + QEMUPutMouseEntry private X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Markus Armbruster --- 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 c42bca6..ce5a550 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -27,23 +27,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 9abef0c..87a23df 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);