API — ICoreEssentials/UI/Backends/Web/System
The public contract of 6 header(s) under ICoreEssentials/UI/Backends/Web/System — 1 class/struct definition(s), 4 declaration(s). Each section shows the header's banner and its public (and protected-virtual) surface exactly as the file writes it.
| Header | Defines | Declarations | Bases |
|---|---|---|---|
ICoreWebAppAccess.h | — | 0 | — |
ICoreWebClipboardAccess.h | — | 0 | — |
ICoreWebLoop.h | — | 0 | — |
ICoreWebPageScheme.h | — | 0 | — |
ICoreWebResourceBytes.h | — | 0 | — |
ICoreWebWeakRef.h | ICoreWebWeakRef | 4 | — |
ICoreWebAppAccess.h#
ICoreEssentials/UI/Backends/Web/System/ICoreWebAppAccess.h
In-zone access to the web application seat (web backend, WB1.1) -- the peer of ../../Gtk4/System/ICoreGtk4AppAccess.h, for the other web seats.
Declares no class of its own — see the file.
ICoreWebClipboardAccess.h#
ICoreEssentials/UI/Backends/Web/System/ICoreWebClipboardAccess.h
In-zone access to the web clipboard seat (web backend, WB1.7). A DOM
pasteevent is the only moment a page can read the system clipboard synchronously; the seat that receives one (WB2.3's text-entry overlay) hands its text/plain here BEFORE dispatching the paste, so ICoreClipboard::text() answers it.
Declares no class of its own — see the file.
ICoreWebLoop.h#
ICoreEssentials/UI/Backends/Web/System/ICoreWebLoop.h
The web backend's event loop, as data (WB1.1 / WB1.7). The peer of the GMainContext the GTK4 seats share through ../../Gtk4/System/ICoreGtk4AppAccess.h: one queue of posted callables, one set of timers, and a bounded drain that runs whatever is due.
⚠⚠ THE BROWSER OWNS THE
while, SO THIS LOOP HAS NO WAIT IN IT. A page cannot block its main thread (§6.1): the browser calls one frame and the frame drains what is due. So where GLib's iteration can sleep until a source fires,icoreWebLoopDrain()never sleeps -- it runs what is ready and returns. Waiting is done BETWEEN frames, by the browser, and the application seat decides how long (ICoreApplication.cpp: pause the frame loop while nothing is pending, wake it for a post or a timer).
File-scope declarations#
// Before the application exists, post() runs inline; while it lives, post()
// queues; after it is gone, post() DROPS (ICoreMainThread.h explains why the
// last two must not share an answer). The application seat moves the state.
enum class ICoreWebLoopState { NotStarted, Live, Finished };
ICoreWebPageScheme.h#
ICoreEssentials/UI/Backends/Web/System/ICoreWebPageScheme.h
The OUTPUT half of the web theme loop (web backend, WB6.2): the page's own CSS
color-schemefollows the application's ACTIVE theme, not the OS preference.Everything this backend paints on a canvas takes its colours from the theme tokens and needs nothing from here. What does not is the part the BROWSER draws: the DOM text-entry overlay (WB2.3), a native <select> or date picker, form-control scrollbars, and the page background shown before the first frame and around the canvas. Those follow the root element's
color-scheme, so without this a user who picked Dark inside the app gets white text fields over a dark canvas whenever their OS is set to Light.The input half is ICoreSystemAppearance (the OS preference). The two differ on purpose: the app's Light/Dark state is the user's choice, of which the OS
Declares no class of its own — see the file.
ICoreWebResourceBytes.h#
ICoreEssentials/UI/Backends/Web/System/ICoreWebResourceBytes.h
The web backend's copy of UI/Backends/Gtk4/System/ICoreGtk4ResourceBytes.h.
⚠ THIS FILE NAMES NO TOOLKIT, AND IT IS THE GTK4 SEAT'S CODE WITH THE BACKEND NAME CHANGED. The reasoning behind every line -- the measurements, the traps, the value semantics -- is in the comments of that file, and is not repeated here (one fact, one place). A change to the shared behaviour belongs in BOTH copies; the web and GTK4 value tiers are expected to agree to the bit.
Declares no class of its own — see the file.
ICoreWebWeakRef.h#
ICoreEssentials/UI/Backends/Web/System/ICoreWebWeakRef.h
A weak reference to any object this backend registers as live -- the web's GWeakRef (UI/Backends/Gtk4/System/ICoreGtk4WeakRef.h), which the weak-widget and weak-object seats hold.
⚠ AN ADDRESS ALONE IS NOT A WEAK REFERENCE: freed memory is reused, and an object allocated where a dead one was would answer "alive" to an address check. So every registration stamps a SERIAL that is never reused, and the reference is alive only while the address is registered under the same serial it was bound to.
⚠ NOTHING ABOVE THE BACKEND ZONE MAY INCLUDE THIS.
ICoreWebWeakRef#
ICoreWebWeakRef.h:27 · struct · 4 declaration(s)
A plain value: the two fields ARE the reference, so they are public, and copying one copies the reference (a GWeakRef has to be re-registered on copy; this does not).
struct ICoreWebWeakRef {
public:
const void* address = nullptr;
std::uint32_t serial = 0;
void bind(const void* object);
[[nodiscard]] void* get() const;
[[nodiscard]] bool isNull() const;
void clear();
};
};