1. /*
  2. * @(#)MouseInfoPeer.java 1.2 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.awt.peer;
  8. import java.awt.Window;
  9. import java.awt.Point;
  10. /**
  11. * The peer interfaces are intended only for use in porting
  12. * the AWT. They are not intended for use by application
  13. * developers, and developers should not implement peers
  14. * nor invoke any of the peer methods directly on the peer
  15. * instances.
  16. */
  17. public interface MouseInfoPeer {
  18. /**
  19. * This method does two things: it fills the point fields with
  20. * the current coordinates of the mouse cursor and returns the
  21. * number of the screen device where the pointer is located.
  22. * The number of the screen device is only returned for independent
  23. * devices (which are not parts of a virtual screen device).
  24. * For virtual screen devices, 0 is returned.
  25. * Mouse coordinates are also calculated depending on whether
  26. * or not the screen device is virtual. For virtual screen
  27. * devices, pointer coordinates are calculated in the virtual
  28. * coordinate system. Otherwise, coordinates are calculated in
  29. * the coordinate system of the screen device where the pointer
  30. * is located.
  31. * See java.awt.GraphicsConfiguration documentation for more
  32. * details about virtual screen devices.
  33. */
  34. int fillPointWithCoords(Point point);
  35. /**
  36. * Returns whether or not the window is located under the mouse
  37. * pointer. The window is considered to be under the mouse pointer
  38. * if it is showing on the screen, and the mouse pointer is above
  39. * the part of the window that is not obscured by any other windows.
  40. */
  41. boolean isWindowUnderMouse(Window w);
  42. }