Document revision date: 10 November 2000 | |
Order Number: AA--PGZ7B--TE
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
VMS Version 5.5--2
Software Version:
DECwindows Motif Version 1.2 for OpenVMS AXP
DECwindows Motif Version 1.2 for OpenVMS VAX
Digital Equipment Corporation
Maynard, Massachusetts
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.
The 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.
Contents | Index |
This 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.
This document is organized as follows:
The following documents contain related information:
The following conventions are used in this manual:
mouse | The term mouse is used to refer to any pointing device, such as a mouse, a puck, or a stylus. |
MB1 (Select)
MB2 (Drag) MB3 (Menu) |
MB1 indicates the left mouse button, MB2 indicates the middle mouse button, and MB3 indicates the right mouse button. (The buttons can be redefined by the user.) |
Ctrl/ x | A sequence such as Ctrl/ x indicates that you must hold down the key labeled Ctrl while you press another key or a pointing device button. |
boldface text | Boldface text represents the introduction of a new term or the name of an argument, a field, a resource, or a reason. |
italic text | Italic text emphasizes important information and indicates complete titles of manuals and variables. Variables include information that varies in system messages (Internal error number), in command lines (/PRODUCER= name), and in command parameters in text (where device-name contains up to five alphanumeric characters). |
numbers | Unless otherwise noted, all numbers in the text are assumed to be decimal. Nondecimal radixes---binary, octal, or hexadecimal---are explicitly indicated. |
The routines described in this document use the following formatting conventions:
Element | Syntax Rule |
---|---|
Routine entry point name | The name of the routine is shown in initial capital letters. The prefix X is used for Xlib routines and the prefix Xm or DXm is used for Toolkit routines. The routine entry point name is required. |
Parentheses | Open and close parentheses (()) surround the argument list in a routine call. They are required. |
Argument names | Argument names, including return arguments, are always shown in lowercase characters. All arguments are required, unless they are enclosed by brackets ([]). Arguments must be listed in the same order in your program as they appear in the format. |
Spaces | One or more spaces are used between the entry point name and the first argument, and between each argument. They are not required. |
Brackets ([]) | Brackets surround optional arguments. The brackets are not required. |
Commas | Commas are required between arguments. Commas that appear inside brackets are optional and appear only when the optional argument appears. |
Letter Code | Type of Access |
---|---|
C | The resource can be set when the widget is first created. |
S | The resource can be set at any time. |
G | The value for the resource can be retrieved at any time. |
This chapter describes the Xlib routines Digital provides on OpenVMS systems to supplement those included in X Window System, Version 11, Release 5. (Note that these routines are not available on Digital UNIX systems or Windows NT systems.)
Specifies an action routine and argument to be called when an event occurs.
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 |
privacy and legal statement | ||
5635PRO.HTML |