/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.52 by fitzsim, Thu Aug 25 02:26:50 2005 UTC revision 1.53 by fitzsim, Mon Sep 12 03:46:42 2005 UTC
# Line 56  exception statement from your version. * Line 56  exception statement from your version. *
56  #define AWT_HAND_CURSOR 12  #define AWT_HAND_CURSOR 12
57  #define AWT_MOVE_CURSOR 13  #define AWT_MOVE_CURSOR 13
58    
 #define AWT_BUTTON1_DOWN_MASK (1 << 10)  
 #define AWT_BUTTON2_DOWN_MASK (1 << 11)  
 #define AWT_BUTTON3_DOWN_MASK (1 << 12)  
   
59  /* FIXME: use gtk-double-click-time, gtk-double-click-distance */  /* FIXME: use gtk-double-click-time, gtk-double-click-distance */
60  #define MULTI_CLICK_TIME   250  #define MULTI_CLICK_TIME   250
61  /* as opposed to a MULTI_PASS_TIME :) */  /* as opposed to a MULTI_PASS_TIME :) */
# Line 135  button_to_awt_mods (int button) Line 131  button_to_awt_mods (int button)
131    switch (button)    switch (button)
132      {      {
133      case 1:      case 1:
134        return AWT_BUTTON1_MASK;        return AWT_BUTTON1_DOWN_MASK | AWT_BUTTON1_MASK;
135      case 2:      case 2:
136        return AWT_BUTTON2_MASK;        return AWT_BUTTON2_DOWN_MASK | AWT_BUTTON2_MASK;
137      case 3:      case 3:
138        return AWT_BUTTON3_MASK;        return AWT_BUTTON3_DOWN_MASK | AWT_BUTTON3_MASK;
139      }      }
140    
141    return 0;    return 0;
# Line 151  cp_gtk_state_to_awt_mods (guint state) Line 147  cp_gtk_state_to_awt_mods (guint state)
147    jint result = 0;    jint result = 0;
148    
149    if (state & GDK_SHIFT_MASK)    if (state & GDK_SHIFT_MASK)
150      result |= AWT_SHIFT_DOWN_MASK;      result |= (AWT_SHIFT_DOWN_MASK | AWT_SHIFT_MASK);
151    if (state & GDK_CONTROL_MASK)    if (state & GDK_CONTROL_MASK)
152      result |= AWT_CTRL_DOWN_MASK;      result |= (AWT_CTRL_DOWN_MASK | AWT_CTRL_MASK);
153    if (state & GDK_MOD1_MASK)    if (state & GDK_MOD1_MASK)
154      result |= AWT_ALT_DOWN_MASK;      result |= (AWT_ALT_DOWN_MASK | AWT_ALT_MASK);
155    
156    return result;    return result;
157  }  }
# Line 166  state_to_awt_mods_with_button_states (gu Line 162  state_to_awt_mods_with_button_states (gu
162    jint result = 0;    jint result = 0;
163    
164    if (state & GDK_SHIFT_MASK)    if (state & GDK_SHIFT_MASK)
165      result |= AWT_SHIFT_DOWN_MASK;      result |= AWT_SHIFT_DOWN_MASK | AWT_SHIFT_MASK;
166    if (state & GDK_CONTROL_MASK)    if (state & GDK_CONTROL_MASK)
167      result |= AWT_CTRL_DOWN_MASK;      result |= AWT_CTRL_DOWN_MASK | AWT_CTRL_MASK;
168    if (state & GDK_MOD1_MASK)    if (state & GDK_MOD1_MASK)
169      result |= AWT_ALT_DOWN_MASK;      result |= AWT_ALT_DOWN_MASK | AWT_ALT_MASK;
170    if (state & GDK_BUTTON1_MASK)    if (state & GDK_BUTTON1_MASK)
171      result |= AWT_BUTTON1_DOWN_MASK;      result |= AWT_BUTTON1_DOWN_MASK | AWT_BUTTON1_MASK;
172    if (state & GDK_BUTTON2_MASK)    if (state & GDK_BUTTON2_MASK)
173      result |= AWT_BUTTON2_DOWN_MASK;      result |= AWT_BUTTON2_DOWN_MASK;
174    if (state & GDK_BUTTON3_MASK)    if (state & GDK_BUTTON3_MASK)

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26