qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/4] kbd leds: infrastructure
Date: Thu, 25 Feb 2010 15:36:44 +0100	[thread overview]
Message-ID: <4B868AFC.3060904@redhat.com> (raw)
In-Reply-To: <4B8685EC.20000@codemonkey.ws>

On 02/25/10 15:15, Anthony Liguori wrote:
> But I wonder if it really makes sense to treat all of these things
> differently since we end up duplicating a lot of code. Would it make
> more sense to just introduce:

> typedef struct QEMUInputHandler {
> void (*put_kbd_event)(QEMUInputHandler *obj, int keycode);
> void (*put_led_event)(QEMUInputHandler *obj, int ledstate);
> void (*put_mouse_event)(QEMUInputHandler *obj, int dx, int dy, int dz,
> int buttons_state);
> QLIST_ENTRY(QEMUInputHandler) node;
> } QEMUInputHandler;

> void qemu_add_input_handler(QEMUInputHandler *handler);
> void qemu_remove_input_handler(QEMUInputHandler *handler);

I don't think so.  Devil is in the details.  Note that kbd_event and 
mouse_event go to the kbd/mouse drivers, whereas led_event comes from 
the kbd driver, so they are different albeit related beasts.  Also the 
mouse register/unregister does some extra care to update the pointer to 
the current mouse device, so we can't easily unify the list management.

Juan's suggestion to use QLISTs makes alot of sense though, will do that.

cheers,
   Gerd

  reply	other threads:[~2010-02-25 14:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25  8:39 [Qemu-devel] [PATCH 0/4] keyboard led status tracking Gerd Hoffmann
2010-02-25  8:39 ` [Qemu-devel] [PATCH 1/4] kbd leds: infrastructure Gerd Hoffmann
2010-02-25 10:57   ` [Qemu-devel] " Juan Quintela
2010-02-25 14:15   ` [Qemu-devel] " Anthony Liguori
2010-02-25 14:36     ` Gerd Hoffmann [this message]
2010-02-25 15:07       ` Anthony Liguori
2010-02-25 16:51         ` Gerd Hoffmann
2010-02-25 17:05           ` Anthony Liguori
2010-02-25  8:39 ` [Qemu-devel] [PATCH 2/4] kbd leds: ps/2 kbd Gerd Hoffmann
2010-02-25 10:59   ` [Qemu-devel] " Juan Quintela
2010-02-25  8:39 ` [Qemu-devel] [PATCH 3/4] kbd leds: usb kbd Gerd Hoffmann
2010-02-25  8:39 ` [Qemu-devel] [PATCH 4/4] kbd keds: vnc Gerd Hoffmann
2010-02-25 11:03   ` [Qemu-devel] " Juan Quintela
2010-02-25 11:11     ` Paolo Bonzini
2010-02-26 16:05     ` Gerd Hoffmann
2010-02-28  1:38   ` [Qemu-devel] " Paul Brook
2010-03-01  8:12     ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B868AFC.3060904@redhat.com \
    --to=kraxel@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).