Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XSelectAsyncEvent(3X)  —  Subroutines

Digital

NAME

XSelectAsyncEvent − Specifies an action routine and argument to be called when an event occurs. 

SYNOPSIS

XSelectAsyncEvent (display, window_id, event_type,
         ast_routine, ast_userarg)
   Display    ∗display;
   Window     window_id;
   unsigned long event_type;
   int      (∗ast_routine)();
   unsigned long ast_userarg;

DESCRIPTION

Before calling XSelectInput to specify interest in a particular set of events for a window, clients can call XSelectAsyncEvent to specify an action routine and argument to be called when the specified event occurs. 

Xlib uses the client’s ast_routine and ast_userarg information to deliver an asynchronous event whenever it places the specified event on the event queue.  The asynchronous acts only as an event notification mechanism; the application uses the standard Xlib event routines to actually retrieve and process the event from the event queue. 

When a client calls the ast_routine, the routine passes the ast_userarg argument to the client by value. 

Clients can call XSelectAsyncEvent multiple times to specify different routine and argument pairs for different events for a window. The last call always takes precedence.  If a client calls XSelectAsyncEvent with the ast_routine argument equal to zero, asynchronous notification is disabled, but the current selection for the specified event is unaffected. 

 Notification events are queued in the same order as events are placed in the event queue by Xlib. Therefore, clients can assume that they receive notification events in the same order that they find events in the queue. 

XSelectAsyncEvent is similar to XSelectAsyncInput except that XSelectAsyncEvent specifies one event type and XSelectAsyncInput specifies an event mask. 

Arguments

displayThe display information originally returned by XOpenDisplay. 

window_idThe identifier of the window for which you want to select asynchronous events. 

event_typeThe type of event for which you want to select asynchronous events. 

ast_routine
The particular action routine to use when notifying the client that the specified event has occurred.

ast_userarg
The user-specified argument to use when notifying the client that the specified event has occurred.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026