When a message arrives to your application, the following occurs:
The file descriptor becomes active.
The Xt main loop breaks out of its select and calls the function registered by the XtAppAddInput call.
The registered function calls tt_message_receive.
The message is read in and any callbacks associated with the message are run.
The message callback returns.
If the message callback returns TT_CALLBACK_PROCESSED, tt_message_receive
returns a value of null to the input callback.
The input callback continues with any other processing.
For example, the following input callback:
input_callback(...)
{
Tt_message m;
printf ("input callback entered\n");
m = tt_message_receive();
printf ("input callback exiting, message handle is %d\n",
(int)m);
}
|
and the following message callback:
message_callback(...)
{
printf("message callback entered\n");
return TT_CALLBACK_PROCESSED;
}
|
results in the following output:
input callback entered message callback entered input callback exiting, message handle is 0 |