Common Desktop Environment: ToolTalk Messaging Overview

ttdt_sender_imprint_on

Tt_status    ttdt_sender_imprint_on(	const char *   handler,
  										Tt_message     contract,
   									char **        display,
  										int *          width,
  										int *          height,
  										int *          xoffset,
   									int *          yoffset,
   									XtAppContext			  app2run,
  										int            ms_timeout
);

The ttdt_sender_imprint_on() function causes the calling tool ("ToolB") to adopt the behavior and certain characteristics of another tool ("ToolA"). ToolB adopts ToolA's X11 display, locale, and current working directory; it also learns ToolA's X11 geometry so that it can position itself appropriately.

If the display parameter is null, the environment variable $DISPLAY is set to ToolA's display; otherwise, ToolA's display is returned in this parameter. The returned value is a string that can be freed with the ToolTalk tt_free() function.

This function sends a Get_Geometry request to ToolA. If ToolA does not return a value for any or all of the geometry parameters:

If the width, height, xoffset, and yoffset parameters in the ttdt_sender_imprint_on() function are all set to null, a Get_Geometry request is not sent to ToolA.

The app2run and ms_timeout parameters are passed to the tttk_block_while() function to block on the replies to the Get_Geometry request sent by this function.

Table A-15 lists the possible errors that can be returned by this function.

Table A-15 Possible Errors Returned by the ttdt_sender_imprint_on

Error Returned 

Description 

TT_DESKTOP_ETIMEDOUT

One or more of the sent requests did not complete before the allotted timeout. 

TT_ERR_NOMP

The ttsession process is not available. The ToolTalk service tries to restart ttsession if it is not running. This error indicates that the ToolTalk service is either not installed or not installed correctly. 

TT_ERR_PROCID

The process identifier specified is out of date or invalid. 

TT_ERR_NOMEM

There is not enough memory available to perform the operation. 

TT_ERR_OVERFLOW

The ToolTalk service has received the maximum amount of active messages (2000) it can properly handle.