target_displayhint(3)
π NAME π
target_displayhint β the little messenger that slides into your target frameserver's DMs to say "hey bestie, here's a visibility / drawing hint π«Ά"
So like, real talk β this page lives in the Arcan Lua API, and it's basically the group chat between you and a frameserver. Let's get into it β¨
πΈ SYNOPSIS πΈ
int:cellw, int:cellh
target_displayhint( vid:dst, int:width, int:height )
target_displayhint( vid:dst, int:width, int:height, int:flags )
target_displayhint( vid:dst, int:width, int:height, int:flags, vid:proxy
)
target_displayhint( vid:dst, int:width, int:height, int:flags,
int:WORLDID )
target_displayhint( vid:dst, int:width, int:height, int:flags,
tbl:disptbl )
π¦ DESCRIPTION π¦
Okay so target_displayhint sends a hint to the target you specify β and the vibe of that hint is "you should lowkey try resizing your shared memory connection to these desired dimensions." Slay.
You'd use this to notify about the current drawing dimensions for the associated video object, or for those special-case moments where you genuinely want an explicitly over- or under-sized input buffer. Main character energy, honestly π
π the flags field π
The possible values for the optional flags field are β and yes, combine them with bit.bor, bestie:
TD_HINT_IGNOREβ no change to the flag state from last time. literally leaving it as-is, periodt.TD_HINT_CONTINUEDβ resize events are likely to be followed with more.TD_HINT_UNFOCUSEDβ no input focus. Input events can still arrive, but no visible indication (e.g. cursor) needs to be shown.TD_HINT_INVISIBLEβ not currently visible/used, so no need to update/draw. it's giving ghost mode π»TD_HINT_MAXIMIZEDβ window is in a 'maximized' state. some UI toolkits will change their visible behavior if they know that they are in this state.TD_HINT_FULLSCREENβ window is in a 'fullscreen' state. similar to the maximized state, some UI toolkits may want this.TD_HINT_DETACHEDβ (with provided embeddedproxy) the associated window has been detached from the embedding and should not be considered in local layouting.
π the disptbl situation π
If the optional disptbl is set and is a table, the fields 'ppcm' and 'subpixel_layout' are expected to be present. No skipping those, fr fr.
π the WORLDID form π
If the WORLDID form is used, the current default output display properties will be sent. easy.
β the return value β
The function returns the current estimated cell dimensions for clients that use the tpack- format for server-side text. Heads up: this is affected by the last fonthint as well as the provided density, and it's just an estimate β don't come for me if it's a couple pixels off π
π NOTES π
width/heightthat exceeds the static compile-time limitations ofMAX_TARGETWorMAX_TARGETHwill be clamped to those values. Invalid hint-dimensions (0 <= n) is a terminal state transition. like, terminal-terminal. don't play with that π- changing the pixel density (
width/height+disptblwithphy_width,phy_height) may incur font rendering changes in thedstreferenced target. so yeah, expect the fonts to maybe get a whole new look π - The correlated event gets special treatment. When the dequeue function in the shared memory interface discover a displayhint event, the remainder of the queue will be scanned for additional ones. Relevant fields will be merged, and properties that are in conflict will favor the most recent. This prevents bubbles from a possible resize-reaction for common scenarios such as drag-resizing a window. iconic behavior honestly β no resize spam, we love to see it π₯
π§ EXAMPLE π§
function target_displayhint0()
local a = target_alloc("example", function() end);
show_image(a);
resize_image(a, VRESW, VRESH);
target_displayhint(a, VRESW, VRESH);
end
π SEE ALSO π
targetcontrol β go say hi, it's right there π«Ά
ok that's the whole page bestie, go forth and hint responsibly πβ¨ no cap, every flag and every caveat made it in here, we ate and left no crumbs π
and that's a wrap, cuties β brought to you by Arcan Lua API, dated October 2026 π¦πΈ (ily, mwah π)
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms