Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
target_updatehandler(3) 	  Arcan Lua API 	 target_updatehandler(3)

NAME
     target_updatehandler  - Change the active callback for a VID connected to a
     frameserver.

SYNOPSIS
     nil
     target_updatehandler( vid, callback_function )

DESCRIPTION
     Every frameserver can have one active Lua	function  as  a  callback.  This
     callback  receives  events  related  to the associated frameserver. In some
     cases, one might want to update or replace the function associated  with  a
     specific frameserver connected VID , e.g. when adopting as part of a system
     collapse or fallback script.

NOTES
     1	    if	WORLDID  is a frameserver (valid_vid( WORLDID , TYPE_FRAMESERVER
	    ) this function can be used to attach a handler  to  that  as  well.
	    This  can be the case when there is an outer windowing system to in-
	    tegrate with.

     2	    if callback_function  is set to nil, frameserver related events will
	    be silently dropped, except for special cases that are  handled  in-
	    ternally (see event_queuetransfer in engine/arcan_event.c).

EXAMPLE
     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
     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
     function target_updatehandler0()
	   a = launch_avfeed("", "avfeed", function() end);
	   target_updatehandler(a, target_updatehandler);
     end

SEE ALSO:
targetcontrol			   August 2026		 target_updatehandler(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=target_updatehandler&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help