Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Request to get new SWT-API

Hi folks,

I don't know if you are following my work on getting a new SWT-port
which works on top of JavaFX bootstrapped.

JavaFX does not expose the event loop so that one can implement

while(<condition>) {
  if( d.readAndDispatch() ) {
    d.sleep();
  }
}

efficiently.

The main use case for the above is to stop the control flow without
blocking the event processing (probably the most common use case is
opening a Shell and waiting until it is closed).

My proposal would be to provide the following API:

* Display
Display#block(Condition)

* Shell
Display#openBlocking()

The Shell API is not strictly needed but more a kind of convenience API
for the most common use case.

I've not yet filed a bug report but get in touch with the team to see if
something like this is you would consider to add.

Tom


Back to the top