/[classpath]/classpath/gnu/java/awt/peer/qt/QtComponentPeer.java
ViewVC logotype

Diff of /classpath/gnu/java/awt/peer/qt/QtComponentPeer.java

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

revision 1.7 by mark, Tue Aug 23 10:37:08 2005 UTC revision 1.8 by mark, Sun Sep 4 15:31:07 2005 UTC
# Line 116  public class QtComponentPeer extends Nat Line 116  public class QtComponentPeer extends Nat
116    {    {
117      this.owner = owner;      this.owner = owner;
118      this.toolkit = kit;      this.toolkit = kit;
119      qtApp = toolkit.guiThread.QApplicationPointer;      qtApp = QtToolkit.guiThread.QApplicationPointer;
120      nativeObject = 0;      nativeObject = 0;
121      synchronized(this)      synchronized(this)
122        {        {
# Line 230  public class QtComponentPeer extends Nat Line 230  public class QtComponentPeer extends Nat
230        {        {
231          WindowEvent e = new WindowEvent((Window)owner,          WindowEvent e = new WindowEvent((Window)owner,
232                                          WindowEvent.WINDOW_CLOSING);                                          WindowEvent.WINDOW_CLOSING);
233          toolkit.eventQueue.postEvent(e);          QtToolkit.eventQueue.postEvent(e);
234        }        }
235    }    }
236    
# Line 240  public class QtComponentPeer extends Nat Line 240  public class QtComponentPeer extends Nat
240                                    MouseEvent.MOUSE_ENTERED,                                    MouseEvent.MOUSE_ENTERED,
241                                    System.currentTimeMillis(),                                    System.currentTimeMillis(),
242                                    (modifiers & 0x2FF), x, y, 0, false);                                    (modifiers & 0x2FF), x, y, 0, false);
243      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
244    }    }
245    
246    protected void focusInEvent()    protected void focusInEvent()
247    {    {
248      FocusEvent e = new FocusEvent(owner, FocusEvent.FOCUS_GAINED);      FocusEvent e = new FocusEvent(owner, FocusEvent.FOCUS_GAINED);
249      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
250     }     }
251    
252    protected void focusOutEvent()    protected void focusOutEvent()
253    {    {
254      FocusEvent e = new FocusEvent(owner, FocusEvent.FOCUS_LOST);      FocusEvent e = new FocusEvent(owner, FocusEvent.FOCUS_LOST);
255      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
256    }    }
257    
258    protected void keyPressEvent(int modifiers, int code, int unicode, int dummy)    protected void keyPressEvent(int modifiers, int code, int unicode, int dummy)
# Line 264  public class QtComponentPeer extends Nat Line 264  public class QtComponentPeer extends Nat
264                                modifiers, code, (char)(unicode & 0xFFFF),                                modifiers, code, (char)(unicode & 0xFFFF),
265                                KeyEvent.KEY_LOCATION_UNKNOWN);                                KeyEvent.KEY_LOCATION_UNKNOWN);
266      if (!manager.dispatchEvent (e))      if (!manager.dispatchEvent (e))
267        toolkit.eventQueue.postEvent(e);        QtToolkit.eventQueue.postEvent(e);
268    }    }
269    
270    protected void keyReleaseEvent(int modifiers, int code, int unicode, int dummy)    protected void keyReleaseEvent(int modifiers, int code, int unicode, int dummy)
# Line 274  public class QtComponentPeer extends Nat Line 274  public class QtComponentPeer extends Nat
274                                System.currentTimeMillis(),                                System.currentTimeMillis(),
275                                modifiers, code, (char)(unicode & 0xFFFF),                                modifiers, code, (char)(unicode & 0xFFFF),
276                                KeyEvent.KEY_LOCATION_UNKNOWN);                                KeyEvent.KEY_LOCATION_UNKNOWN);
277      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
278    }    }
279    
280    protected void leaveEvent(int modifiers, int x, int y, int dummy)    protected void leaveEvent(int modifiers, int x, int y, int dummy)
# Line 283  public class QtComponentPeer extends Nat Line 283  public class QtComponentPeer extends Nat
283                                    MouseEvent.MOUSE_EXITED,                                    MouseEvent.MOUSE_EXITED,
284                                    System.currentTimeMillis(),                                    System.currentTimeMillis(),
285                                    (modifiers & 0x2FF), x, y, 0, false);                                    (modifiers & 0x2FF), x, y, 0, false);
286      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
287    }    }
288    
289    // FIXME: Coalesce press-release events into clicks.    // FIXME: Coalesce press-release events into clicks.
# Line 303  public class QtComponentPeer extends Nat Line 303  public class QtComponentPeer extends Nat
303                                    System.currentTimeMillis(),                                    System.currentTimeMillis(),
304                                    (modifiers & 0x2FF), x, y, clickCount,                                    (modifiers & 0x2FF), x, y, clickCount,
305                                    false, button);                                    false, button);
306      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
307    }    }
308    
309    protected void mouseMoveEvent( int modifiers, int x, int y, int clickCount)    protected void mouseMoveEvent( int modifiers, int x, int y, int clickCount)
# Line 327  public class QtComponentPeer extends Nat Line 327  public class QtComponentPeer extends Nat
327                                    System.currentTimeMillis(),                                    System.currentTimeMillis(),
328                                    (modifiers & 0x2FF), x, y, clickCount,                                    (modifiers & 0x2FF), x, y, clickCount,
329                                    false, button);                                    false, button);
330      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
331    }    }
332    
333    protected void mousePressEvent( int modifiers, int x, int y, int clickCount)    protected void mousePressEvent( int modifiers, int x, int y, int clickCount)
# Line 347  public class QtComponentPeer extends Nat Line 347  public class QtComponentPeer extends Nat
347                                    (modifiers & 0x2FF), x, y, clickCount,                                    (modifiers & 0x2FF), x, y, clickCount,
348                                    ( button == POPUP_TRIGGER ),                                    ( button == POPUP_TRIGGER ),
349                                     button);                                     button);
350      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
351    }    }
352    
353    protected void mouseReleaseEvent( int modifiers, int x, int y, int clickCount)    protected void mouseReleaseEvent( int modifiers, int x, int y, int clickCount)
# Line 367  public class QtComponentPeer extends Nat Line 367  public class QtComponentPeer extends Nat
367                                    System.currentTimeMillis(),                                    System.currentTimeMillis(),
368                                    (modifiers & 0x2FF), x, y, clickCount,                                    (modifiers & 0x2FF), x, y, clickCount,
369                                    false, button);                                    false, button);
370      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
371    }    }
372    
373    protected void moveEvent(int x, int y, int oldx, int oldy)    protected void moveEvent(int x, int y, int oldx, int oldy)
# Line 393  public class QtComponentPeer extends Nat Line 393  public class QtComponentPeer extends Nat
393      ignoreResize = false;      ignoreResize = false;
394      ComponentEvent e = new ComponentEvent(owner,      ComponentEvent e = new ComponentEvent(owner,
395                                            ComponentEvent.COMPONENT_RESIZED);                                            ComponentEvent.COMPONENT_RESIZED);
396      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
397      QtToolkit.repaintThread.queueComponent(this);      QtToolkit.repaintThread.queueComponent(this);
398    }    }
399    
# Line 403  public class QtComponentPeer extends Nat Line 403  public class QtComponentPeer extends Nat
403        {        {
404          WindowEvent e = new WindowEvent((Window)owner,          WindowEvent e = new WindowEvent((Window)owner,
405                                          WindowEvent.WINDOW_OPENED);                                          WindowEvent.WINDOW_OPENED);
406          toolkit.eventQueue.postEvent(e);          QtToolkit.eventQueue.postEvent(e);
407        }        }
408      else      else
409        {        {
410          ComponentEvent e = new ComponentEvent(owner,          ComponentEvent e = new ComponentEvent(owner,
411                                                ComponentEvent.COMPONENT_SHOWN);                                                ComponentEvent.COMPONENT_SHOWN);
412          toolkit.eventQueue.postEvent(e);          QtToolkit.eventQueue.postEvent(e);
413        }        }
414    }    }
415    
# Line 417  public class QtComponentPeer extends Nat Line 417  public class QtComponentPeer extends Nat
417    {    {
418      ComponentEvent e = new ComponentEvent(owner,      ComponentEvent e = new ComponentEvent(owner,
419                                            ComponentEvent.COMPONENT_HIDDEN);                                            ComponentEvent.COMPONENT_HIDDEN);
420      toolkit.eventQueue.postEvent(e);      QtToolkit.eventQueue.postEvent(e);
421    }    }
422    
423    // ************ Public methods *********************    // ************ Public methods *********************
# Line 527  public class QtComponentPeer extends Nat Line 527  public class QtComponentPeer extends Nat
527    public GraphicsConfiguration getGraphicsConfiguration()    public GraphicsConfiguration getGraphicsConfiguration()
528    {    {
529      int id = whichScreen(); // get the ID of the screen the widget is on.      int id = whichScreen(); // get the ID of the screen the widget is on.
530      GraphicsDevice[] devs = toolkit.graphicsEnv.getScreenDevices();      GraphicsDevice[] devs = QtToolkit.graphicsEnv.getScreenDevices();
531      return devs[id].getDefaultConfiguration();      return devs[id].getDefaultConfiguration();
532    }    }
533    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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