HP OpenVMS Systems Documentation |
DECwindows Extensions to Motif
January 1994
This manual describes the programming extensions Digital provides to supplement the X Window System, Version 11, Release 5 and OSF/Motif Toolkit components included in the OpenVMS DECwindows Motif Version 1.2 software. Revision/Update Information: This is a revised manual.
Operating System:
OpenVMS AXP Version 1.5
Software Version:
DECwindows Motif Version 1.2 for OpenVMS AXP
Digital Equipment Corporation
January 1994 The information in this document is subject to change without notice and should not be construed as a commitment by Compaq Computer Corporation. Compaq Computer Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by Compaq Computer Corporation or its affiliated companies. Restricted Rights: Use, duplication, or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013. Copyright ©1994The following are trademarks of Compaq Computer Corporation: Alpha AXP, AXP, Bookreader, DEC, DECterm, DECwindows, Digital, DTIF, eXcursion, LinkWorks, OpenVMS, ULTRIX, VAX, VAX DOCUMENT, VMS, and the DIGITAL logo. Adobe, Display PostScript, and PostScript are registered trademarks of Adobe Systems Incorporated. Motif, OSF, OSF/1, and OSF/Motif are registered trademarks and Open Software Foundation is a trademark of the Open Software Foundation, Inc. UNIX is a registered trademark licensed exclusively by X/Open Company Limited. Microsoft, Windows NT and NT are registered trademarks and Windows is a trademark of Microsoft Corporation. X Window System is a registered trademark of the Massachusetts Institute of Technology. All other trademarks and registered trademarks are the property of their respective holders. ZK5635 This document is available on CD-ROM. This document was prepared using DECdocument, Version V3.3-1e.
PrefaceIntended AudienceThis document, which supplements the OSF/Motif Programmer's Reference and the X Window System manuals, contains reference information for programmers who want to write applications that use the DECwindows Motif Version 1.2 interfaces. Document StructureThis document is organized as follows:
Associated DocumentsThe following documents contain related information:
ConventionsThe following conventions are used in this manual:
Documentation Format of RoutinesThe routines described in this document use the following formatting conventions:
Chapter 1
|
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; |
display
The display information originally returned by XOpenDisplay.window_id
The identifier of the window for which you want to select asynchronous events.event_type
The type of event for which you want to select asynchronous events.ast_routine
The particular asynchronous system trap (AST) 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.
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 AST whenever it places the specified event on the event queue. The AST 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 ASTs are queued in the same order as events are placed in the event queue by Xlib. Therefore, clients can assume that they receive notification ASTs 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.
Specifies an action routine and arguments to be called when some subset of events occurs.
XSelectAsyncInput(display, window_id, event_mask, ast_routine, ast_userarg) Display *display; Window window_id; unsigned long event_mask; int (*ast_routine)(); unsigned long ast_userarg; |
display
The display information originally returned by XOpenDisplay.window_id
The identifier of the window for which you want to select asynchronous input.event_mask
A bitmask that specifies the event types for which you want to remove an event. The mask is an inclusive OR of one or more of the event mask elements described in Table 1-1.ast_routine
The particular asynchronous system trap (AST) action routine to use when notifying the client that one of the specified events has occurred.ast_userarg
The user-specified parameter to use when notifying the client that one of the specified events has occurred.
Bit | C Value | Description |
---|---|---|
1 | KeyPressMask | Keyboard down events wanted (by the application) |
2 | KeyReleaseMask | Keyboard up events wanted (by the application) |
3 | ButtonPressMask | Pointer button down events wanted (by the application) |
4 | ButtonReleaseMask | Pointer button up events wanted (by the application) |
5 | EnterWindowMask | Pointerwindow entry events wanted (by the application) |
6 | LeaveWindowMask | Pointerwindow leave events wanted (by the application) |
7 | PointerMotionMask | Pointer motion events wanted (by the application) |
8 | PointerMotionHintMask | Pointer motion hints wanted (by the application) |
9 | Button1MotionMask | Pointer motion while button 1 down |
10 | Button2MotionMask | Pointer motion while button 2 down |
11 | Button3MotionMask | Pointer motion while button 3 down |
12 | Button4MotionMask | Pointer motion while button 4 down |
13 | Button5MotionMask | Pointer motion while button 5 down |
14 | ButtonMotionMask | Pointer motion while any button down |
15 | KeymapStateMask | Keyboard state wanted (by the application) at window entry and focus in |
16 | ExposureMask | Any exposure wanted (by the application) |
17 | VisibilityChangeMask | Any change in visibility wanted (by the application) |
18 | StructureNotifyMask | Any change in window structure wanted (by the application) |
19 | ResizeRedirectMask | Redirect resize of this window |
20 | SubstructureNotifyMask | Substructure notification wanted (by the application) |
21 | SubstructureRedirectMask | Redirect substructure of window |
22 | FocusChangeMask | Any change in input focus wanted (by the application) |
23 | PropertyChangeMask | Any change in property wanted (by the application) |
24 | ColormapChangeMask | Any change in colormap wanted by the application |
25 | OwnerGrabButtonMask | Automatic grabs should activate with owner_events set to true |
Before calling XSelectInput to specify interest in a particular set of events for a window, clients can call XSelectAsyncInput to specify action routines and arguments to be called when some subset of those events occurs.Xlib uses the client's ast_routine and ast_userarg information to deliver an AST whenever it places one of the specified events on its event queue. The ast_routine and ast_userarg arguments allow the client to specify the particular action routine and parameter pair to use when notifying the client that one of the specified events has occurred. The AST 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.
Clients can call XSelectAsyncInput multiple times to specify different routine and parameter pairs for different sets of events for a window. The last call always takes precedence. If called with ast_routine equal to zero, asynchronous notification is disabled, but the current selection for the specified events is unaffected.
Notification ASTs are queued in the same order as events are placed in the event queue by Xlib. Therefore, clients can assume that they receive notification ASTs in the same order that they find events in the queue.
XSelectAsyncInput is similar to XSelectAsyncEvent except that XSelectAsyncEvent specifies one event type and XSelectAsyncInput specifies an event mask.
Next | Contents | Index |