TTTK_XT_INPUT_HANDLER(3)
π NAME π
Okay bestie, this page lives in the library call manual and it's all about tttk_Xt_input_handler β the function whose whole job is to Process ToolTalk events for Xt clients. β¨
π¦ SYNOPSIS π¦
#include &<Tt/tttk.h>
void tttk_Xt_input_handler(
XtPointer procid,
int *source,
XtInputId *id);
πΈ DESCRIPTION πΈ
So here's the tea: if procid is not NULL, tttk_Xt_input_handler passes it straight to tt_default_procid_set(3). Then it calls tt_message_receive(3), which retrieves the next message available, if any, for the default procid. π
If tt_message_receive(3) returns TT_ERR_NOMP, then tttk_Xt_input_handler closes the default procid with ttdt_close(3), and removes the input source *id with XtRemoveInput(3) if id is not zero. π§Ή
If a message is available and tt_message_receive(3) returns it β indicating it was not consumed by any message or pattern callback β then the ToolTalk service passes the message to tttk_message_abandon(3). π
Ngl, source is sitting right there in the signature, but this page doesn't give it its own description. The way that parameter just exists. π
π RETURN VALUE π
tttk_Xt_input_handler returns no value. That's it. A whole void situation, no little return gift. π«Ά
π₯ APPLICATION USAGE π₯
The application should use tttk_Xt_input_handler as its Xt input handler unless some messages are expected not to be consumed by callbacks. π
Parenthetical tea: the only messages that absolutely cannot be intercepted and consumed by callbacks are those that match observe signatures in a ptype or otype. No cap.
π EXAMPLES π
Here's the example, with the code kept exactly as it is:
int myTtFd;
char *myProcID;
myProcID = ttdt_open(&&myTtFd, "WhizzyCalc", "Acme", "1.0", 1);
/* ... */
/* Process the message that started us, if any */
tttk_Xt_input_handler(myProcID, 0, 0);
/* ... */
XtAppAddInput(myContext, myTtFd, (XtPointer)XtInputReadMask,
tttk_Xt_input_handler, myProcID);
β SEE ALSO β
Tt/tttk.h-Tttttk(5)β exactly how it's written here, bestie.ttdt_close(3)tttk_message_abandon(3)tt_default_procid_set(3)tt_message_receive(3)XtAppAddInput(3)XtRemoveInput(3)
Cute sign-off time: the footer on this page is tttk_Xt_input_handler(library call) β that's the source/version/date situation here, and there's no extra date or version line. Bye bestie! π
π
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms