An Xt (X toolkit) application normally waits for events from the X server. User actions, such as keyboard presses and mouse clicks, arrive at the Xt application via the X server. If, for some reason, a user is sitting quietly and not typing or clicking, then the application just waits. This means that an Xt application can spend a considerable amount of time waiting. For this reason, Xt allows you to register procedures to be called when there are no other events to process. You may also register procedures which respond to certain events not originating from the X server. Here are the "extra" procedure types which may be added:

  1. Xt Work Procedure.
  2. Input Procedure.
  3. Timeout Procedure.
As with widget callback procedures added inside X-Designer any Xt procedures that you have added are generated as stubs into the stubs file. You may then edit them from within X-Designer in the same way as widget callbacks may be edited. The code for adding your procedures is generated by X-Designer into the main module.

Language Procedures

An application operates within the context of a particular locale. The locale determines how to accept keyboard input, how to display characters and the format of date and time strings. This allows developers to customize their applications for use in different countries.

Event Handlers

Event handlers provide an efficient means of performing low level input handling which bypasses the translation tables of the widget. They are particularly suited to high-volume events. A translation and associated action, however, can do almost anything that an event handler can do but may be easier to maintain. Event handlers, unlike the other Xt procedures, are defined for individual widgets rather than for the whole application.

See also: