[Gtk-sharp-list] left mousebutton double-click
WCrucius at sandc.com
Tue Apr 18 13:25:21 EDT 2006
Well, that's good to know. Thanks.
So can I safely asume that events DON'T actually get queued up the way I was describing/guessing, and the "array" is just a way of implementing a variable argument list in this case? (Meaning they get queued, but each event removed from the event queue results in a seperate call to the event handler...)
(By the way, the example code I provided DOES WORK, but I can see why that might be just be luck!)
From: Mike Kestner [mailto:mkestner at novell.com]
Sent: Tue 4/18/2006 10:51 AM
To: Crucius, Wesley
Cc: gtk-sharp-list at lists.ximian.com; Thomas Zühlke
Subject: RE: [Gtk-sharp-list] left mousebutton double-click
On Tue, 2006-04-18 at 09:05 -0500, Crucius, Wesley wrote:
> You'll need to look at the arg(s) "passed" to your button_press event handler.
> What you want to check for is the 'Gdk.EventType.TwoButtonPress' value.
> Also, note that a double click actually generates multiple events...
> This talks about the events sequencing:
> You'll have to look at the "array" of GLib.SignalArgs.Args, which I
> think is intended to deal with event queueing, although I don't think
> I've ever seen more that one event in the list, but I guess that
> depends on how fast you are processing them.
SignalArgs.Args is just a list of the parameters passed in a signal
emission. You don't want to be messing around with it, typically. The
SignalArgs subclasses "wrap" the members of the Args array into typed
In the case of a ButtonPressEvent, SignalArgs.Args is going to contain 1
element, the Gdk.ButtonEvent passed to the internal signal callback we
use to raise Widget.ButtonPressEvent events.
Mike Kestner <mkestner at novell.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list