例 D-6 は、Xt 入力処理関数の例です。
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 );