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

FreeBSD Manual Pages

  
 
  

home | help
message_target(3)	   Library Functions Manual	     message_target(3)

NAME
       message_target -	send a utf-8 coded text	message	to a frameserver

SYNOPSIS
       int:bytes_left
       message_target( vid:tgtvid, string:msg )

DESCRIPTION
       In  some	 rare  occasions  (custom applications and clipboard not using
       bchunk- method of transfer) it makes sense to send  short  custom  text
       messages	to a target frameserver. This function takes a string, valides
       it  as  utf-8 and breaks	it down	to event- sized	chunks and adds	to the
       target frameserver incoming eventqueue. The function returns 0  if  the
       entire message was sent,	a negative value if the	string failed to vali-
       date or a positive number indicating the	number of bytes	left. The lat-
       ter case	only occurs if the target event	queue is full.

NOTES
       1      In  cases	 where	an arcan appl was spawned by another arcan in-
	      stance,

	      WORLDID  is a valid vid for message_target to the	 parent.  This
	      can be tested

EXAMPLE
       -- via ref:valid_vid(WORLDID, TYPE_FRAMESERVER).
       -- @group: targetcontrol
       -- @cfunction: targetmessage
       -- @related: target_input
       function	message_target0()
	     target_alloc("test", function(source, status)
		   if (status.kind == "connected") then
			 message_target(source,	"welcome");
			 return	shutdown();
		   end
	     end);
       end

Arcan Lua API			  April	2025		     message_target(3)

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

home | help