summaryrefslogtreecommitdiffstats
path: root/libjava/gnu/awt/xlib/XEventLoop.java
diff options
context:
space:
mode:
authorsgilbertson <sgilbertson@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-07 16:49:37 +0000
committersgilbertson <sgilbertson@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-07 16:49:37 +0000
commit2dfcb59597a2fc564033f2c0c988a08e13b16624 (patch)
tree441eea7f802c2d97678acc092a8a87d337d789ca /libjava/gnu/awt/xlib/XEventLoop.java
parent00c61749d8c40660ddb439580c05ec5cba8f6a3c (diff)
downloadppe42-gcc-2dfcb59597a2fc564033f2c0c988a08e13b16624.tar.gz
ppe42-gcc-2dfcb59597a2fc564033f2c0c988a08e13b16624.zip
2005-04-07 Scott Gilbertson <scottg@mantatest.com>
* gnu/gcj/xlib/natXAnyEvent.cc (loadNext): Added timeout. * gnu/awt/xlib/XCanvasPeer.java (setBackground): Removed throw UnsupportedOperationException, fixed comments. (setFont, setForeground): Fixed comments. * gnu/awt/xlib/XEventLoop.java (postNextEvent): Changed return type to boolean. (getNextEvent): Fixed javadocs. * gnu/awt/xlib/XToolkit.java (interrupted): Removed field. (nativeQueueEmpty): Removed unused code. (iterateNativeQueue): Removed outer loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96029 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu/awt/xlib/XEventLoop.java')
-rw-r--r--libjava/gnu/awt/xlib/XEventLoop.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/libjava/gnu/awt/xlib/XEventLoop.java b/libjava/gnu/awt/xlib/XEventLoop.java
index 8f7828770e8..149ee736d7c 100644
--- a/libjava/gnu/awt/xlib/XEventLoop.java
+++ b/libjava/gnu/awt/xlib/XEventLoop.java
@@ -42,15 +42,20 @@ public class XEventLoop
anyEvent.interrupt();
}
- void postNextEvent(boolean block)
+ /** If there's an event available, post it.
+ * @return true if an event was posted
+ */
+ boolean postNextEvent(boolean block)
{
AWTEvent evt = getNextEvent(block);
if (evt != null)
queue.postEvent(evt);
+ return evt != null;
}
- /** get next event. Will block until events become available. */
-
+ /** Get the next event.
+ * @param block If true, block until an event becomes available
+ */
public AWTEvent getNextEvent(boolean block)
{
// ASSERT:
@@ -62,7 +67,7 @@ public class XEventLoop
{
event = createEvent();
event = lightweightRedirector.redirect(event);
- }
+ }
return event;
}
@@ -169,7 +174,7 @@ public class XEventLoop
return null;
default:
- String msg = "Do no know how to handle event (" + anyEvent + ")";
+ String msg = "Do not know how to handle event (" + anyEvent + ")";
throw new RuntimeException (msg);
}
}
OpenPOWER on IntegriCloud