primaryDisplay
- Specified by:
primaryDisplayin interfaceBackend- Returns:
- the primary
Display, ornullwhen headless. Default: the display that reportsDisplay.isPrimary(), else the first ofBackend.displays(). UI thread only.
AutoCloseable, BackendBackend.
Must be constructed on the process main thread (on macOS the JVM needs
-XstartOnFirstThread); that thread becomes the Limn UI thread.
The event loop is event-driven: it sleeps in glfwWaitEvents() (or
glfwWaitEventsTimeout() when a delayed task is scheduled) and is
woken by native events or by glfwPostEmptyEvent() whenever another
thread posts through Ui.
Waking is not painting: the loop runs the tasks and then renders only the windows something asked a frame of, so an application whose posted task mutates a widget without invalidating it will not see the change.
Backend.SceneModalHandlestatic final Stringtrue to make every window report that it cannot be positioned, which
puts menus and dropdowns into the owner scene on a platform that would otherwise place
them in windows.static final Stringvoidclose()createWindow(WindowConfig config) displays()voidpopModal(NativeWindow modal) modal from the modal stack, releasing what it locked.voidpushModal(NativeWindow modal,
NativeWindow parent) modal as an active modal window and pushes it on the
modal stack.pushSceneModal(NativeWindow owner,
boolean toolkitScope) owner.voidvoidvoidstop()Values: x11, wayland, any. Unset means the default below.
true to make every window report that it cannot be positioned, which
puts menus and dropdowns into the owner scene on a platform that would otherwise place
them in windows.
It exists so the fallback can be looked at. Wayland is the only platform that
really needs it, and a presentation that can only be seen on one desktop is one that gets
broken on the other three and noticed a release later. With this the demo renders it
anywhere, including into a --screenshot. It changes no behaviour the application
chooses and none that a user can reach.
fileDialogs in interface BackendFileDialogs.NONE (every dialog resolves
empty, as if cancelled). UI thread only.BackendcreateWindow in interface BackendgraphicsInfo in interface BackendBackend.createWindow(limn.backend.WindowConfig) has succeeded at least once; before that,
and on a machine where it never does, the result carries the
windowing platform and a GraphicsInfo.failure() instead.
Default: GraphicsInfo.NONE. UI thread only.BackendBackend.stop() is invoked.runEventLoop in interface BackendBackendmodal as an active modal window and pushes it on the
modal stack. Only the topmost modal receives input; every window it
locks ignores input until it closes.
Modality scope: a non-null parent makes it window-modal,
so it locks only parent (and parent's owned popups),
leaving unrelated windows interactive. A null parent makes it
toolkit-modal, so it locks every other window. Modals stack: with
several open, only the top one is usable and the non-modal windows are
released only after the whole modal stack closes. UI thread only.
Backendmodal from the modal stack, releasing what it locked. UI thread only.Backendowner.
Unlike Backend.pushModal(limn.backend.NativeWindow, limn.backend.NativeWindow), there is no separate modal window: the overlay
blocks owner's own content, so owner stays interactive,
while this call blocks the same sibling windows a native modal
would. toolkitScope true locks every other window;
false locks only owner's owned popups. Release the
returned handle when the overlay closes. UI thread only.pushSceneModal in interface BackendBackendsignalModalBlocked in interface BackendrenderStats in interface BackendRenderStats.EMPTY.
UI thread only.render3DStats in interface BackendRender3DStats.EMPTY.
UI thread only.primaryDisplay in interface BackendDisplay, or null when headless.
Default: the display that reports Display.isPrimary(), else
the first of Backend.displays(). UI thread only.BackendBackendclose in interface AutoCloseableclose in interface Backend