BridgeHandler
final class BridgeHandler
Package: dev.joid.lib.bridge · Module: core · Source: BridgeHandler.java
The static registries through which the core of JOID reaches its bridges, one registry per kind of bridge.
Description
Section titled “Description”Each constant is a BridgeRegistry of one kind of bridge.
Before any backend, JOID registers a SystemClockBridge in CLOCK, a DirectThreadBridge in THREAD and an identity bridge in SIGNAL_REPLAY; Backend.register fills the others.
Your code reaches a registry when it needs a bridge directly, to read one or to add one, as Add a UI bridge of your own does.
Learn more
Section titled “Learn more”Constants and fields
Section titled “Constants and fields”| Type | Name | Value | Summary |
|---|---|---|---|
UIBridgeRegistry | UI | new UIBridgeRegistry() | The UI bridges, which hold the open UIs, receive the input and draw every frame. |
BridgeRegistry<IAudioBridge> | AUDIO | new BridgeRegistry<>("AUDIO") | The audio bridge that plays the sound of videos. |
BridgeRegistry<IClockBridge> | CLOCK | new BridgeRegistry<>("CLOCK") | The clock that animations, tweens, media and drags read. |
BridgeRegistry<IWindowBridge> | WINDOW | new BridgeRegistry<>("WINDOW") | The window bridge: size of the drawable surface, mouse position, held keys, clipboard and cursor. |
BridgeRegistry<IRenderBridge> | RENDER | new BridgeRegistry<>("RENDER") | The render bridge, which draws every pixel and creates the textures, framebuffers and shaders. |
BridgeRegistry<IThreadBridge> | THREAD | new BridgeRegistry<>("THREAD") | The thread bridge, which names the render thread and runs the tasks of other threads on it. |
BridgeRegistry<ISignalReplayBridge> | SIGNAL_REPLAY | new BridgeRegistry<>("SIGNAL_REPLAY") | The bridge that maps the names compiled in a reactive expression to the names that exist at run time. |
Constant and field details
Section titled “Constant and field details”UIBridgeRegistry UI
The UI bridges, which hold the open UIs, receive the input and draw every frame. Unlike the other registries, JOID uses all of its bridges at once, by priority.
BridgeRegistry<IAudioBridge> AUDIO
The audio bridge that plays the sound of videos.
It stays empty when the backend is built with audio(false).
BridgeRegistry<IClockBridge> CLOCK
The clock that animations, tweens, media and drags read.
It holds a SystemClockBridge until another bridge is registered above it, with a higher priority or later at the same one, such as a ManualClockBridge in a test.
WINDOW
Section titled “WINDOW”BridgeRegistry<IWindowBridge> WINDOW
The window bridge: size of the drawable surface, mouse position, held keys, clipboard and cursor.
RENDER
Section titled “RENDER”BridgeRegistry<IRenderBridge> RENDER
The render bridge, which draws every pixel and creates the textures, framebuffers and shaders.
THREAD
Section titled “THREAD”BridgeRegistry<IThreadBridge> THREAD
The thread bridge, which names the render thread and runs the tasks of other threads on it.
It holds a DirectThreadBridge until the backend registers its own.
SIGNAL_REPLAY
Section titled “SIGNAL_REPLAY”BridgeRegistry<ISignalReplayBridge> SIGNAL_REPLAY
The bridge that maps the names compiled in a reactive expression to the names that exist at run time. It holds an identity bridge until a host that renames classes registers its own.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
