compare GdkModifierType
- From: Robert Schulze <magot666 web de>
- To: gtk-app-devel-list gnome org
- Subject: compare GdkModifierType
- Date: Thu, 27 Nov 2003 20:18:05 +0100
Aloa
I read the state from the device with gdk_device_get_state and safe it at state
And now, I won't compare the state.
I read at the Gdk Reference:
        GDK_Button1_MASK = 1 << 8;
        GDK_Button2_MASK = 1 << 9;
        ...
If I print the state as a int the Button1 is 1040. Why not 8?
If I won't compare it with state == GDK_BUTTON1_MASK  it doesn't work. Why?
 ==== CODE === 
 GdkModifierType        state;
 insigned int           count = 0;
 ...
 gdk_device_get_state(dev, win, NULL, &state);
 if(state == GDK_BUTTON1_MASK) ++count;
 === CODE END ===
 //Robert
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]