HP OpenVMS Systems Documentation

Content starts here

DECwindows Extensions to Motif

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
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


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 ©1994

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


Preface

Intended Audience

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.

Document Structure

This document is organized as follows:

  • Chapter 1 describes Xlib routines Digital has added to OpenVMS systems to supplement those provided by X Window System, Version 11, Release 5. These routines are not available for Digital UNIX systems or Windows NT systems.
  • Chapter 2 describes Toolkit widget creation and manipulation routines, message routines, font routines, and convenience routines Digital has added to supplement those provided by the OSF/Motif Toolkit.
  • Chapter 3 describes how to use extensions that Digital has added to the Motif User Interface Language (UIL), including how to use nested compound strings, new command line qualifiers in the UIL compiler, and the Widget Meta Language (WML) binary databases.
  • Appendix A contains UIL built-in tables you can use to make sure that your UIL specification is consistent with the DECwindows Motif Toolkit.
  • Appendix B describes the OpenVMS DECwTermPort routine that Digital provides to allow users to create a DECterm window on a local or remote node.
  • Appendix C contains information on Structured Visual Navigation (SVN) and compound string text widget translations.

Associated Documents

The following documents contain related information:

  • Overview of DECwindows Motif for OpenVMS Documentation provides an overview of all the documents associated with the DECwindows Motif Version 1.2 release.
  • OSF/Motif Programmer's Reference provides reference information on the Motif Toolkit.
  • OSF/Motif Programmer's Guide describes how to program with the Motif Window Manager, Motif Toolkit, and the Motif User Interface Language (UIL).
  • DECwindows Motif Guide to Application Programming describes how to program with the Digital extensions to the Motif Toolkit. It supplements the OSF/Motif Programmer's Guide.
  • OSF/Motif Style Guide describes style guidelines for applications based on the Motif Toolkit.
  • DECwindows Companion to the OSF/Motif Style Guide provides style guidelines for Digital extensions to Motif and describes topics not addressed in the OSF/Motif Style Guide.
  • X Window System provides reference information on Xlib.
  • X Window System Toolkit provides reference information on the Intrinsics.
  • VMS DECwindows Guide to Xlib (Release 4) Programming: MIT C Binding describes how to program with Xlib using C bindings.
  • X and Motif Quick Reference Guide provides quick reference information on Xlib, Intrinsics, and the Motif Toolkit.
  • DECwindows Motif for OpenVMS Applications Guide describes how to use the applications bundled with DECwindows Motif.
  • Porting XUI Applications to Motif describes how to port an existing DECwindows application to Motif.

Conventions

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.

Documentation Format of Routines

The routines described in this document use the following formatting conventions:

  • Routine Name
    The exact (case-specific) C name of the routine.
  • Overview
    A brief statement describing what the routine does.
  • Widget Class Hierarchy
    For widget creation routines, a graphic representation of the order in which widgets inherit resources from their superclass widgets. (Exceptions are listed in the Resource Exceptions section.)
  • Format
    The C routine declaration. Note the following syntax 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.
  • Resource Information
    For widget creation routines, a list of the resources and their corresponding types.
  • Return Value
    A description of the possible values that can be returned by the routine.
  • Arguments
    Descriptions of the values that are valid for each argument and what those values indicate.
  • Resources
    For widget creation routines, detailed descriptions of the widget-specific resources including the default value and access for each. Access is indicated by the following letter codes:
    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.


  • Resource Exceptions
    Exceptions regarding the use or characteristics of resources that widgets inherit from their superclass widgets. Exceptions include resources that are either not supported or are supported differently by a particular widget.
  • Callback Structure
    For widget creation routines, the C format of the callback data structure.
  • Callback Field Descriptions
    For widget creation routines, a description of the fields in the callback data structure.
  • Callback Reasons
    For widget creation routines, a description of the callback reasons for the widget.
  • Description
    A description of how to use the routine, including pointers to additional information.
  • Geometry management
    For widget creation routines, a description of how the widget manages the sizing of its children.
  • Resizing
    For widget creation routines, a description of how the widget resizes itself.


Chapter 1
DECwindows Xlib Extensions for OpenVMS Systems

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.)


XSelectAsyncEvent

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

Format


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;

Arguments

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.

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 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.


XSelectAsyncInput

Specifies an action routine and arguments to be called when some subset of events occurs.

Format


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;

Arguments

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.

Table 1-1 Event Mask Elements
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

Description

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