diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7da809b8bf42..31b06d9db983 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2007-12-05 Thomas Fitzsimmons + + * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.h: Regenerate. + * gnu/java/awt/peer/gtk/GtkWindowPeer.h: Likewise. + * java/awt/Component.h: Likewise. + * java/awt/Container.h: Likewise. + 2007-11-05 H.J. Lu * configure.ac: Don't run config-ml.in directly. diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index c24ad7b80841..4086a236ceac 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,47 @@ +2007-12-05 Thomas Fitzsimmons + + * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java, + native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c + (isWindowUnderMouse): New method. + * include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h: + Regenerate. + * gnu/java/awt/peer/gtk/GtkComponentPeer.java + (getLocationOnScreen): Move WindowPeer section to... + * gnu/java/awt/peer/gtk/GtkWindowPeer.java (getLocationOnScreen): + New method. + * gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java + (isWindowUnderMouse): Implement. + * java/awt/Component.java (getMousePosition): New method. + (getMousePositionHelper): Likewise. + (mouseOverComponent): Likewise. + * java/awt/Container.java (getMousePosition): New method. + (mouseOverComponent): Likewise. + * classpath/lib/java/awt/Component.class, + classpath/lib/java/awt/Component$BltBufferStrategy.class, + classpath/lib/java/awt/Container$GfxPaintAllVisitor.class, + classpath/lib/java/awt/Component$AccessibleAWTComponent + $AccessibleAWTFocusHandler.class, + classpath/lib/java/awt/Component$FlipBufferStrategy.class, + classpath/lib/java/awt/Container$GfxVisitor.class, + classpath/lib/java/awt/Component$AccessibleAWTComponent + $AccessibleAWTComponentHandler.class, + classpath/lib/java/awt/Container$AccessibleAWTContainer + $AccessibleContainerHandler.class, + classpath/lib/java/awt/Container.class, + classpath/lib/java/awt/Container$AccessibleAWTContainer.class, + classpath/lib/java/awt/Container$GfxPrintAllVisitor.class, + classpath/lib/java/awt/Component$AccessibleAWTComponent.class, + classpath/lib/java/awt/Container$GfxPaintVisitor.class, + classpath/lib/java/awt/Container$GfxPrintVisitor.class, + classpath/lib/java/awt/Component$HeavyweightInLightweightListener.class, + classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer.class, + classpath/lib/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.class, + classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class, + classpath/lib/gnu/java/awt/peer/gtk/GtkWindowPeer.class, + classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer + $RepaintTimerTask.class: + Regenerate. + 2007-10-01 Alexandre Oliva * scripts/check_jni_methods.sh: Don't depend on diff -b ignoring diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java b/libjava/classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java index 67040b82a0f5..d06af84433f3 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java @@ -155,6 +155,7 @@ public class GdkGraphicsEnvironment extends ClasspathGraphicsEnvironment * Used by GtkMouseInfoPeer. */ native int[] getMouseCoordinates(); + native boolean isWindowUnderMouse(GtkWindowPeer windowPeer); public WritableRaster createRaster(ColorModel cm, SampleModel sm) { diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java b/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java index 16c20ee253f9..f658c17afbb7 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java @@ -76,7 +76,6 @@ import java.awt.image.VolatileImage; import java.awt.peer.ComponentPeer; import java.awt.peer.ContainerPeer; import java.awt.peer.LightweightPeer; -import java.awt.peer.WindowPeer; import java.util.Timer; import java.util.TimerTask; @@ -251,10 +250,7 @@ public class GtkComponentPeer extends GtkGenericPeer public Point getLocationOnScreen () { int point[] = new int[2]; - if( this instanceof WindowPeer ) - gtkWindowGetLocationOnScreen (point); - else - gtkWidgetGetLocationOnScreen (point); + gtkWidgetGetLocationOnScreen (point); return new Point (point[0], point[1]); } diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java b/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java index 7aea50991dfa..7407744af9e8 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java @@ -60,17 +60,7 @@ public class GtkMouseInfoPeer implements MouseInfoPeer public boolean isWindowUnderMouse(Window w) { - int[] coords = gde.getMouseCoordinates(); - GraphicsDevice[] gds = gde.getScreenDevices(); - - // Check if the screen of the Window and the cursor match - if( gds[ coords[0] ] != w.getGraphicsConfiguration().getDevice() ) - return false; - - // Return the bounds-check. - Point p = w.getLocationOnScreen(); - return (coords[1] >= p.x && coords[1] < p.x + w.getWidth() && - coords[2] >= p.y && coords[2] < p.y + w.getHeight() ); - } + return gde.isWindowUnderMouse((GtkWindowPeer) w.getPeer()); + } } diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GtkWindowPeer.java b/libjava/classpath/gnu/java/awt/peer/gtk/GtkWindowPeer.java index d8054150dea5..5dc4b2e5b377 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/GtkWindowPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/GtkWindowPeer.java @@ -45,6 +45,7 @@ import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; import java.awt.KeyboardFocusManager; +import java.awt.Point; import java.awt.Rectangle; import java.awt.Window; import java.awt.event.ComponentEvent; @@ -392,6 +393,13 @@ public class GtkWindowPeer extends GtkContainerPeer clickCount, popupTrigger); } + public Point getLocationOnScreen() + { + int point[] = new int[2]; + gtkWindowGetLocationOnScreen(point); + return new Point(point[0], point[1]); + } + // We override this to keep it in sync with our internal // representation. public Rectangle getBounds() diff --git a/libjava/classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h b/libjava/classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h index aa0bd0156899..de83f57a5979 100644 --- a/libjava/classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h +++ b/libjava/classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h @@ -1,10 +1,10 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ +#include + #ifndef __gnu_java_awt_peer_gtk_GdkGraphicsEnvironment__ #define __gnu_java_awt_peer_gtk_GdkGraphicsEnvironment__ -#include - #ifdef __cplusplus extern "C" { @@ -17,6 +17,7 @@ JNIEXPORT jobject JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nati JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetNumFontFamilies (JNIEnv *env, jobject); JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetFontFamilies (JNIEnv *env, jobject, jobjectArray); JNIEXPORT jintArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_getMouseCoordinates (JNIEnv *env, jobject); +JNIEXPORT jboolean JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_isWindowUnderMouse (JNIEnv *env, jobject, jobject); #ifdef __cplusplus } diff --git a/libjava/classpath/java/awt/Component.java b/libjava/classpath/java/awt/Component.java index f8bed17618ea..fe4fb9b8b0da 100644 --- a/libjava/classpath/java/awt/Component.java +++ b/libjava/classpath/java/awt/Component.java @@ -5833,6 +5833,62 @@ p *
  • the set of backward traversal keys return visible; } + /** + * Returns the mouse pointer position relative to this Component's + * top-left corner. + * + * @return relative mouse pointer position + * + * @throws HeadlessException if in a headless environment + */ + public Point getMousePosition() throws HeadlessException + { + return getMousePositionHelper(true); + } + + Point getMousePositionHelper(boolean allowChildren) throws HeadlessException + { + if (GraphicsEnvironment.isHeadless()) + throw new HeadlessException("can't get mouse position" + + " in headless environment"); + if (!isShowing()) + return null; + + Component parent = this; + int windowRelativeXOffset = 0; + int windowRelativeYOffset = 0; + while (parent != null && !(parent instanceof Window)) + { + windowRelativeXOffset += parent.getX(); + windowRelativeYOffset += parent.getY(); + parent = parent.getParent(); + } + if (parent == null) + return null; + + Window window = (Window) parent; + if (!Toolkit.getDefaultToolkit() + .getMouseInfoPeer().isWindowUnderMouse(window)) + return null; + + PointerInfo info = MouseInfo.getPointerInfo(); + Point mouseLocation = info.getLocation(); + Point windowLocation = window.getLocationOnScreen(); + + int x = mouseLocation.x - windowLocation.x; + int y = mouseLocation.y - windowLocation.y; + + if (!mouseOverComponent(window.getComponentAt(x, y), allowChildren)) + return null; + + return new Point(x - windowRelativeXOffset, y - windowRelativeYOffset); + } + + boolean mouseOverComponent(Component component, boolean allowChildren) + { + return component == this; + } + /** * This method is used to implement transferFocus(). CHILD is the child * making the request. This is overridden by Container; when called for an diff --git a/libjava/classpath/java/awt/Container.java b/libjava/classpath/java/awt/Container.java index 83d9f7b78c5b..e7622f2e8396 100644 --- a/libjava/classpath/java/awt/Container.java +++ b/libjava/classpath/java/awt/Container.java @@ -1097,6 +1097,33 @@ public class Container extends Component return locate (x, y); } + /** + * Returns the mouse pointer position relative to this Container's + * top-left corner. If allowChildren is false, the mouse pointer + * must be directly over this container. If allowChildren is true, + * the mouse pointer may be over this container or any of its + * descendents. + * + * @param allowChildren true to allow descendents, false if pointer + * must be directly over Container. + * + * @return relative mouse pointer position + * + * @throws HeadlessException if in a headless environment + */ + public Point getMousePosition(boolean allowChildren) throws HeadlessException + { + return super.getMousePositionHelper(allowChildren); + } + + boolean mouseOverComponent(Component component, boolean allowChildren) + { + if (allowChildren) + return isAncestorOf(component); + else + return component == this; + } + /** * Returns the component located at the specified point. This is done * by checking whether or not a child component claims to contain this diff --git a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.class b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.class index dfb28e4bf3ec..6e3a11a3cf1c 100644 Binary files a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.class and b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.class differ diff --git a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer$RepaintTimerTask.class b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer$RepaintTimerTask.class index 097713c014af..abf76c0d9ee1 100644 Binary files a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer$RepaintTimerTask.class and b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer$RepaintTimerTask.class differ diff --git a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer.class b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer.class index 9627e77665a9..45f9c47f8c6e 100644 Binary files a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer.class and b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkComponentPeer.class differ diff --git a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class index 35c5677f5b86..fc028c27fbbb 100644 Binary files a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class and b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class differ diff --git a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkWindowPeer.class b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkWindowPeer.class index 53b831decaf8..a348cf02d4ab 100644 Binary files a/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkWindowPeer.class and b/libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkWindowPeer.class differ diff --git a/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTComponentHandler.class b/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTComponentHandler.class index f48c922ff792..6c5bdeb7565a 100644 Binary files a/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTComponentHandler.class and b/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTComponentHandler.class differ diff --git a/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTFocusHandler.class b/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTFocusHandler.class index 029692cc4f01..e2e3e879254f 100644 Binary files a/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTFocusHandler.class and b/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent$AccessibleAWTFocusHandler.class differ diff --git a/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent.class b/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent.class index 010706e95d8c..22532323a23c 100644 Binary files a/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent.class and b/libjava/classpath/lib/java/awt/Component$AccessibleAWTComponent.class differ diff --git a/libjava/classpath/lib/java/awt/Component$BltBufferStrategy.class b/libjava/classpath/lib/java/awt/Component$BltBufferStrategy.class index 74be60b2956d..e796a03a7f4b 100644 Binary files a/libjava/classpath/lib/java/awt/Component$BltBufferStrategy.class and b/libjava/classpath/lib/java/awt/Component$BltBufferStrategy.class differ diff --git a/libjava/classpath/lib/java/awt/Component$FlipBufferStrategy.class b/libjava/classpath/lib/java/awt/Component$FlipBufferStrategy.class index 16b024509d29..f0857dc8ea3d 100644 Binary files a/libjava/classpath/lib/java/awt/Component$FlipBufferStrategy.class and b/libjava/classpath/lib/java/awt/Component$FlipBufferStrategy.class differ diff --git a/libjava/classpath/lib/java/awt/Component$HeavyweightInLightweightListener.class b/libjava/classpath/lib/java/awt/Component$HeavyweightInLightweightListener.class index 5ab9670bde14..60503e61e1d2 100644 Binary files a/libjava/classpath/lib/java/awt/Component$HeavyweightInLightweightListener.class and b/libjava/classpath/lib/java/awt/Component$HeavyweightInLightweightListener.class differ diff --git a/libjava/classpath/lib/java/awt/Component.class b/libjava/classpath/lib/java/awt/Component.class index 6adbf61ac0ab..90b546ccd3a8 100644 Binary files a/libjava/classpath/lib/java/awt/Component.class and b/libjava/classpath/lib/java/awt/Component.class differ diff --git a/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer$AccessibleContainerHandler.class b/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer$AccessibleContainerHandler.class index a07e427861d9..5f045ab2123f 100644 Binary files a/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer$AccessibleContainerHandler.class and b/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer$AccessibleContainerHandler.class differ diff --git a/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer.class b/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer.class index 18f79012eb30..167660a70ba3 100644 Binary files a/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer.class and b/libjava/classpath/lib/java/awt/Container$AccessibleAWTContainer.class differ diff --git a/libjava/classpath/lib/java/awt/Container$GfxPaintAllVisitor.class b/libjava/classpath/lib/java/awt/Container$GfxPaintAllVisitor.class index fea586bd9fdd..cd7fd4c64930 100644 Binary files a/libjava/classpath/lib/java/awt/Container$GfxPaintAllVisitor.class and b/libjava/classpath/lib/java/awt/Container$GfxPaintAllVisitor.class differ diff --git a/libjava/classpath/lib/java/awt/Container$GfxPaintVisitor.class b/libjava/classpath/lib/java/awt/Container$GfxPaintVisitor.class index e5a54f8ffdcd..791d8579f0ff 100644 Binary files a/libjava/classpath/lib/java/awt/Container$GfxPaintVisitor.class and b/libjava/classpath/lib/java/awt/Container$GfxPaintVisitor.class differ diff --git a/libjava/classpath/lib/java/awt/Container$GfxPrintAllVisitor.class b/libjava/classpath/lib/java/awt/Container$GfxPrintAllVisitor.class index 3c741e984263..087631893fb1 100644 Binary files a/libjava/classpath/lib/java/awt/Container$GfxPrintAllVisitor.class and b/libjava/classpath/lib/java/awt/Container$GfxPrintAllVisitor.class differ diff --git a/libjava/classpath/lib/java/awt/Container$GfxPrintVisitor.class b/libjava/classpath/lib/java/awt/Container$GfxPrintVisitor.class index fe7b3267f6e8..c8557e99c455 100644 Binary files a/libjava/classpath/lib/java/awt/Container$GfxPrintVisitor.class and b/libjava/classpath/lib/java/awt/Container$GfxPrintVisitor.class differ diff --git a/libjava/classpath/lib/java/awt/Container$GfxVisitor.class b/libjava/classpath/lib/java/awt/Container$GfxVisitor.class index f9f85ae52157..9fd2811aad91 100644 Binary files a/libjava/classpath/lib/java/awt/Container$GfxVisitor.class and b/libjava/classpath/lib/java/awt/Container$GfxVisitor.class differ diff --git a/libjava/classpath/lib/java/awt/Container.class b/libjava/classpath/lib/java/awt/Container.class index 1154af9697a1..f6b029ec2587 100644 Binary files a/libjava/classpath/lib/java/awt/Container.class and b/libjava/classpath/lib/java/awt/Container.class differ diff --git a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c index 1c88d1b510e4..6066a6bb2712 100644 --- a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c +++ b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c @@ -263,3 +263,37 @@ Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_getMouseCoordinates return retArray; } + +JNIEXPORT jboolean JNICALL +Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_isWindowUnderMouse +(JNIEnv *env, jobject obj, jobject windowPeer) +{ + GdkDisplay *display = NULL; + gint x = 0; + gint y = 0; + GtkWidget *windowToTest = NULL; + GdkWindow *windowAtPointer = NULL; + jboolean retVal = JNI_FALSE; + + display = (GdkDisplay *) gtkpeer_get_display (env, obj); + g_assert (display != NULL); + + windowToTest = (GtkWidget *) gtkpeer_get_widget (env, windowPeer); + + gdk_threads_enter (); + + windowAtPointer = gdk_display_get_window_at_pointer (display, &x, &y); + + while (windowAtPointer + && windowAtPointer != windowToTest->window) + windowAtPointer = gdk_window_get_parent (windowAtPointer); + + gdk_threads_leave (); + + if (windowAtPointer) + retVal = JNI_TRUE; + else + retVal = JNI_FALSE; + + return retVal; +} diff --git a/libjava/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.h b/libjava/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.h index 78d947c6ef4c..978c2ec506b4 100644 --- a/libjava/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.h +++ b/libjava/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.h @@ -27,6 +27,7 @@ extern "Java" { class GdkGraphicsEnvironment; class GdkScreenGraphicsDevice; + class GtkWindowPeer; } } } @@ -77,6 +78,7 @@ public: virtual JArray< ::java::lang::String * > * getAvailableFontFamilyNames(::java::util::Locale *); public: // actually package-private virtual JArray< jint > * getMouseCoordinates(); + virtual jboolean isWindowUnderMouse(::gnu::java::awt::peer::gtk::GtkWindowPeer *); public: virtual ::java::awt::image::WritableRaster * createRaster(::java::awt::image::ColorModel *, ::java::awt::image::SampleModel *); private: diff --git a/libjava/gnu/java/awt/peer/gtk/GtkWindowPeer.h b/libjava/gnu/java/awt/peer/gtk/GtkWindowPeer.h index 3eb4c142aaf7..a40f4168d2bc 100644 --- a/libjava/gnu/java/awt/peer/gtk/GtkWindowPeer.h +++ b/libjava/gnu/java/awt/peer/gtk/GtkWindowPeer.h @@ -32,6 +32,7 @@ extern "Java" class Component; class Dialog; class Graphics; + class Point; class Rectangle; class Window; } @@ -101,6 +102,7 @@ public: public: // actually protected virtual void postMouseEvent(jint, jlong, jint, jint, jint, jint, jboolean); public: + virtual ::java::awt::Point * getLocationOnScreen(); virtual ::java::awt::Rectangle * getBounds(); virtual void updateIconImages(); virtual void updateMinimumSize(); diff --git a/libjava/java/awt/Component.h b/libjava/java/awt/Component.h index f5889d2bc0d3..23edfa77e98b 100644 --- a/libjava/java/awt/Component.h +++ b/libjava/java/awt/Component.h @@ -354,6 +354,11 @@ public: // actually package-private virtual void dispatchEventImpl(::java::awt::AWTEvent *); virtual jboolean eventTypeEnabled(jint); virtual jboolean isHierarchyVisible(); +public: + virtual ::java::awt::Point * getMousePosition(); +public: // actually package-private + virtual ::java::awt::Point * getMousePositionHelper(jboolean); + virtual jboolean mouseOverComponent(::java::awt::Component *, jboolean); virtual ::java::awt::Component * findNextFocusComponent(::java::awt::Component *); private: void readObject(::java::io::ObjectInputStream *); diff --git a/libjava/java/awt/Container.h b/libjava/java/awt/Container.h index 4a44759532af..3ea162aaede6 100644 --- a/libjava/java/awt/Container.h +++ b/libjava/java/awt/Container.h @@ -97,6 +97,10 @@ public: // actually protected public: virtual void deliverEvent(::java::awt::Event *); virtual ::java::awt::Component * getComponentAt(jint, jint); + virtual ::java::awt::Point * getMousePosition(jboolean); +public: // actually package-private + virtual jboolean mouseOverComponent(::java::awt::Component *, jboolean); +public: virtual ::java::awt::Component * locate(jint, jint); virtual ::java::awt::Component * getComponentAt(::java::awt::Point *); virtual ::java::awt::Component * findComponentAt(jint, jint);