Skip to content

Add support for glk_style_measure - #48

Open
dfabulich wants to merge 1 commit into
curiousdannii:masterfrom
dfabulich:glk-style-measure
Open

Add support for glk_style_measure#48
dfabulich wants to merge 1 commit into
curiousdannii:masterfrom
dfabulich:glk-style-measure

Conversation

@dfabulich

Copy link
Copy Markdown
Contributor

Previously, we couldn't support glk_style_measure synchronously, because it would require an asynchronous GlkOte request.

Now, AsyncGlk/GlkOte can convey a theme, including a foreground and background color for normal text, and info on whether stylehints are enabled or not (which could be a user preference).

With that information, updated during arrange events, RemGlk can keep its own matrix of stylehints and synchronously resolve glk_style_measure events.

See also: curiousdannii/remglk-rs#16

Previously, we couldn't support `glk_style_measure` synchronously, because it would require an asynchronous GlkOte request.

Now, AsyncGlk/GlkOte can convey a `theme`, including a foreground and background color for normal text, and info on whether stylehints are enabled or not (which could be a user preference).

With that information, updated during `arrange` events, RemGlk can keep its own matrix of stylehints and synchronously resolve `glk_style_measure` events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant