target_displayhint(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’– 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 embedded proxy) 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 πŸ’€

  1. width/height that exceeds the static compile-time limitations of MAX_TARGETW or MAX_TARGETH will be clamped to those values. Invalid hint-dimensions (0 <= n) is a terminal state transition. like, terminal-terminal. don't play with that πŸ™ˆ
  2. changing the pixel density (width/height + disptbl with phy_width, phy_height) may incur font rendering changes in the dst referenced target. so yeah, expect the fonts to maybe get a whole new look πŸ‘‘
  3. 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