Re: GdkEventButton, GdkEventMotion



Sven Neumann wrote:
> 
> Ignacio Nodal <inodal teleline es> writes:
> 
> > if the program reachs this callback,that's because a motion_event has
> > happened,then.. why asking again for the GDK_BUTTON1_MASK??
> > I mean.. isn't it redundant?
> 
> The motion event could have been generated using another mouse button ?!
> In most cases you want to react differently depending on the button used.
> 
> Salut, Sven
> 

Ok,ok.. now i see the difference.. GdkEventMotion doesn't have the
button field included in GdkEventButton structure. I didn't notice
this..

Then... in GdkEventButton, if the state field already has information
about the button pressed, why does it also include a button field? For
an easier use?
I mean "if (event->button = 1)" is the same as "if (event->state &
GDK_BUTTON1_MASK)", right?

Thanks again,

Ignacio Nodal




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]