target_updatehandler(3)
π
target_updatehandler π
okay bestie, welcome to the Arcan Lua API page for target_updatehandler. Itβs giving βchange the active callback for a VID connected to a frameserver,β and honestly? iconic. β¨
π NAME π
target_updatehandlerβ change the active callback for aVIDconnected to a frameserver. slay. π
β¨ SYNOPSIS β¨
nil
target_updatehandler( vid, callback_function )
π¦ DESCRIPTION π¦
Every frameserver can have one active Lua function as a callback. That callback receives events related to the frameserver itβs attached to. π«Ά
Sometimes youβll want to update or replace the function associated with a specific frameserver-connected VID β for example when youβre adopting one as part of a system collapse or fallback script. Very main character energy. π
πΈ NOTES πΈ
- If
WORLDIDis a frameserver (as invalid_vid( WORLDID , TYPE_FRAMESERVER )), this function can be used to attach a handler to that as well. This can be the case when thereβs an outer windowing system to integrate with. πͺβ¨ - If
callback_functionis set tonil, frameserver related events will be silently dropped β except for special cases that are handled internally (seeevent_queuetransferinengine/arcan_event.c). Silently dropped, bestie. ππ
π EXAMPLE π
First example is giving βswap the handler from inside the handler.β π
function target_updatehandler0()
a = launch_avfeed("", "avfeed", function(source, status)
print("in first handler");
target_updatehandler(source, function()
print("in second handler");
end);
end);
end
π EXAMPLE π
Second one does a little vibe check on WORLDID first, then attaches a wm event printer. π¨οΈπ
function target_updatehandler1()
if valid_vid(WORLDID, TYPE_FRAMESERVER) then
target_updatehandler(WORLDID, function(source, status)
print("wm event", status.kind)
end)
end
end
π MISUSE π
π this is the MISUSE example for a reason, bestie β do not copy this one. π
function target_updatehandler0()
a = launch_avfeed("", "avfeed", function() end);
target_updatehandler(a, target_updatehandler);
end
π SEE ALSO π
targetcontrolβ go check it out, itβs right there in the reference list. π
okay thatβs the whole page, bestie β brought to you by targetcontrol, dated October 2026, and filed under target_updatehandler(3). 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