HP OpenVMS Systems Documentation

Content starts here

VMS DECwindows Device Driver Manual


Previous Contents Index


Sense Keyboard LED

The Sense Keyboard LED $QIO function gets the current status of the keyboard LEDs. The target device is the keyboard. Table 2-4 provides the argument information required for the Sense Keyboard LED $QIO call.

Table 2-4 Argument Data for Sense Keyboard LED$QIO Call
$QIO Argument Required Data
func IO$_SENSEMODE function code
p1 IO$K_DECW_KB_LED function modifier
p3 Address of the longword keyboard status mask (DWI$L_KB_LIGHTS). Mask bits correspond to the keyboard LEDs as follows:
DECW$M_LIGHT1 Wait
DECW$M_LIGHT2 Compose
DECW$M_LIGHT3 Lock
DECW$M_LIGHT4 Hold Screen
A mask bit is 1 when the LED is on, or 0 when the LED is off
p2, p4, p5, p6 Set to 0

Sense Motion Compression

The Sense Motion Compression $QIO function gets the status of a pointing device's motion compression mode. The $QIO returns the motion compression flag bit status in p2. The target is the pointing device. Table 2-5 provides the argument information required for the Sense Motion Compression $QIO call.

Table 2-5 Argument Data for Sense Motion Compression$QIO Call
$QIO Argument Required Data
func IO$_SENSEMODE function code
p1 IO$K_DECW_MOTION_COMP function modifier
p2 Address of the motion compression state longword (FLAG$V_MOTION_COMP of DWI$L_PTR_CTRL). The longword contains 1 when motion compression is on, or 0 when motion compression is off
p3, p4, p5, p6 Set to 0

Sense Operator Window Key

The Sense Operator Window Key $QIO function finds the key code that invokes the operator window. The $QIO returns the selection key and selection key modifier codes in use from the keyboard input UCB extension (DWI$B_KB_OPWIN_KEY and DWI$B_KB_OPWIN_MOD). The target device is the keyboard. Table 2-6 provides the argument information required for the Sense Operator Window Key $QIO call.

Table 2-6 Argument Data for Sense Operator Window Key$QIO Call
$QIO Argument Required Data
func IO$_SENSEMODE function code
p1 IO$K_DECW_OPWIN_KEY function modifier
p2 Address of the byte (DWI$B_KB_OPWIN_KEY) containing the LK201 key code that selects the operator window
p3 Address of the byte (DWI$B_KB_OPWIN_MOD) that specifies whether a control or shift key is used as a modifier in the selection of the operator window mode
p4, p5, p6 Set to 0

Sense Pointer Acceleration

The Sense Pointer Acceleration $QIO function gets the state of the pointer acceleration table and threshold used by the acceleration routine. The $QIO returns the addresses of the pointer acceleration values from the pointer input UCB extension (DWI$W_PTR_ACCEL_NUM, DWI$W_PTR_ACCEL_DEN, and DWI$W_PTR_ACCEL_THR, in p2, p3, and p4, respectively). The target is the pointing device. Table 2-7 provides the argument information required for the Sense Pointer Acceleration $QIO call.

Table 2-7 Argument Data for Sense Pointer Acceleration$QIO Call
$QIO Argument Required Data
func IO$_SENSEMODE function code
p1 IO$K_DECW_PTR_ACCEL function modifier
p2 Address of the word that stores the pointer acceleration numerator (DWI$W_PTR_ACCEL_NUM)
p3 Address of the word that stores the pointer acceleration denominator (DWI$W_PTR_ACCEL_DEN)
p4 Address of the word that stores the pointer acceleration threshold (DWI$W_PTR_ACCEL_THR)
p5, p6 Set to 0

Sense Pseudomouse Key

The Sense Pseudomouse Key $QIO function gets the key code information that invokes the pseudomouse mode. The $QIO returns the selection key and selection key modifier codes in use from the keyboard input UCB extension (DWI$B_KB_PMOUSE_KEY and DWI$B_KB_PMOUSE_MOD). The target device is the keyboard. Table 2-8 provides the argument information required for the Sense Pseudomouse Key $QIO call.

Table 2-8 Argument Data for Sense Pseudomouse Key$QIO Call
$QIO Argument Required Data
func IO$_SENSEMODE function code
p1 IO$K_DECW_PMOUSE_KEY function modifier
p2 Address of the byte (DWI$B_KB_PMOUSE_KEY) containing the LK201 key code that selects the pseudomouse mode
p3 Address of the longword (DWI$B_KB_PMOUSE_MOD) that contains the pseudomouse selection modifier key code
p4, p5, p6 Set to 0

Sense Screen Saver Timeout

The Sense Screen Saver Timeout $QIO function gets the current screen saver timeout value in seconds. The target device is the output monitor. Table 2-9 provides the required argument information for the Set Screen Saver Timeout $QIO call.

Table 2-9 Argument Data for Sense Screen Saver Timeout$QIO Call
$QIO Argument Required Data
func IO$_SENSEMODE function code
p1 IO$K_DECW_SCRSAV function modifier
p2 Address of the longword (UCB$L_DECW_SCRSAV_TIMEOUT) specifying the current timeout in seconds. A value of 0 indicates that the screen saver function is disabled
p3, p4, p5, p6 Set to 0

2.5 Set-Mode Calls

The FDT set-mode routines within the common driver service the $QIO function calls from a server that set various device characteristics. The following set-mode calls are supported by the DECwindows common driver:
  • Enable Input
  • Initialize Motion Buffer
  • Ring Keyboard Bell
  • Set Attach Screen
  • Set Cursor Bounds
  • Set Cursor Pattern
  • Set Cursor Position
  • Set Keyboard Information
  • Set Keyboard LED
  • Set Motion Compression
  • Set Operator Window Key
  • Set Pointer Acceleration
  • Set Pseudomouse Key
  • Set Screen Saver Timeout
  • Write X Event

This section defines the specific argument data required for each $QIO call within the set-mode functions serviced by the common driver. With the exception of Write X Event, each of these calls requires the IO$_SETMODE function code.


Enable Input

The Enable Input $QIO set-mode function creates a nonpaged shared memory buffer for communication between the driver and the caller. This $QIO function returns the page frame numbers (PFNs) of the buffer. The caller then calls the $CRMPSC system service to map the PFNs (PFNMAP) into its process address space. The target device is the keyboard. However, all input devices share the input queue within the buffer (INB). If this is not the first request to build the buffer, the $QIO function just returns the data for the buffer previously allocated.

The size parameter (p2) is an input/output parameter. The caller requests a buffer size and the common driver returns the size in pages (INB$L_PFN_COUNT). The input queue and the free queue are initialized on the first invocation. Table 2-10 provides the required argument information for the Enable Input $QIO call.

Table 2-10 Argument Data for Enable Input$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_ENABLE_INPUT function modifier
p2 The size (number of pages) of the input buffer (INB$L_PFN_COUNT)
p3 Address of the array of PFN longwords (INB$L_PFN_LIST)
p4, p5, p6 Set to 0

Initialize Motion Buffer

The Initialize Motion Buffer $QIO function creates the motion history buffer (MHB) data structure, initializes its fields, and returns the buffer size in pages. Pointing device motion events are stored in 8-byte packets (MHPs); thus, the buffer event capacity is determined as follows:


N events = (N buffer_pages * 512 - 16 byte MHB header)/ 8

The number of pages for the buffer is specified in the p2 parameter of the $QIO call. The address of the number of pages allocated is returned in p2. By default, the motion history buffer is disabled when DECwindows starts up. Table 2-11 provides the argument information required for the Initialize Motion Buffer $QIO call.

Table 2-11 Argument Data for Initialize Motion Buffer$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_MOTION_BUFFER_INIT function modifier
p2 Size of the motion history buffer in pages (INB$L_HISTORY_SIZE)
p3, p4, p5, p6 Set to 0

Ring Keyboard Bell

The Ring Keyboard Bell $QIO function rings the keyboard bell at a specified volume. The target device is the keyboard. Table 2-12 provides the argument information required for the Ring Keyboard Bell $QIO call.

Table 2-12 Argument Data for Ring Keyboard Bell$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_RING_BELL function modifier
p2 Specifies the ring volume in percent. A value of 100 specifies the loudest ring while a 0 turns the bell off. A value of --1 provides a default volume of 70 percent or rings the bell at the current volume if previously set
p3, p4, p5, p6 Set to 0

Set Attach Screen

The Set Attach Screen $QIO function attaches the target screen to an input device or to another screen. The specific attach-screen function is selected with parameter p2 (see Table 2-13). All attached screens work with the same input pointing device. The $QIO system service also tests the output device being called to ensure that it is a DECwindows workstation type. Table 2-13 provides the required argument information for the Set Attach Screen $QIO call. The attach-screen function has the following characteristics and features:
  • If more than one screen is attached to the single pointing device, one pointer is shared among the screens. Positioning the pointer on one screen removes it from all the others.
  • If two screens are not attached to the same input pointing device, the screens cannot be attached to one another.
  • As a screen is attached to an input pointing device, it is detached from all other screens.

Table 2-13 Argument Data for Set Attach Screen$QIO Call
$QIO Arg Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_ATTACH_SCREEN function modifier
p2 The specific function requested of the following submodifier options:
IO$K_DECW_AS_TO_INPUT Attaches screen to pointing device
IO$K_DECW_AS_TO_RIGHT Attaches screen to the right of the active screen
IO$K_DECW_AS_TO_LEFT Attaches screen to the left of the active screen
IO$K_DECW_AS_TO_TOP Attaches screen to the top of the active screen
IO$K_DECW_AS_TO_BOTTOM Attaches screen to the bottom of the active screen
p3 A string descriptor naming the device being connected to
p4 A number passed back to the server in the INP$L_ROOT_WIN field of the input packet
p5, p6 Set to 0

Set Cursor Bounds

The Set Cursor Bounds $QIO function sets the cursor (pointer) x and y boundaries on the screen. In a multiscreen environment, the call is made from the that the cursor is to be confined to.

If the confine-cursor flag (FLAG$V_CURSOR_BOUNDED) is set to 1, the cursor is then confined to parameters p3 to p6 in the call. In the multiscreen environment, the confinement region cannot extend beyond the home screen. If the confine-cursor flag is set to 0, the cursor is free to travel anywhere, including other screens in multiscreen environments.

Much of the cursor information is stored in the UCB common output extension (DECW).

Table 2-14 provides the required argument information for the Set Cursor Bounds $QIO call.

Table 2-14 Argument Data for Set Cursor Bounds$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_CURSOR_BOUNDS function modifier
p2 A word that defines the state of the confine cursor flag (FLAG$V_CURSOR_BOUNDED of UCB$L_DECW_CTRL)
p3 A word that defines the x-axis left boundary
p4 A word that defines the y-axis top boundary
p5 A word that defines the x-axis right boundary
p6 A word that defines the y-axis bottom boundary

Set Cursor Pattern

The Set Cursor Pattern $QIO function sets the cursor (pointer) pattern.

Much of the cursor information is stored in the UCB common output extension (DECW). The bitmap image length differs in single-plane and multiplane cursor systems. The caller must check the system type and pass the correct image length. To obtain the address of the DVI block where the number of cursor planes is stored, use the Get Device Information $QIO call.

The style (p5) is a longword that specifies how the cursor is presented against the background screen. Possible values are as follows:

0 dynamic NAND
1 dynamic OR
2 NAND
3 OR

The p5 parameter is not used for multiplane cursor systems. Table 2-15 provides the required argument information for the Set Cursor Pattern $QIO call.

Table 2-15 Argument Data for Set Cursor Pattern$QIO Call
$QIO Argument Required Data
func IO$_SETMODE function code
p1 IO$K_DECW_CURSOR_PATTERN function modifier
p2 Address of the bitmap image
p3 Length (number of words) of the bitmap
p4 Longword that defines the hotspot x-, y-coordinates.
p5 Value that defines the cursor display style (at sniff cycle)
p6 Set to 0

Setting Cursor Patterns of Variable Size

The $QIO call also supports variable size cursor patterns. The variable size format allows the caller to load cursor patterns without concern to the hardware format. For example, the different size cursors encountered in a multiscreen (multihead) environment can be handled.

Except for p3 and p6, the $QIO parameters used for variable size cursors are the same shown in Table 2-15. (When p6 is nonzero, the cursor pattern function services variable size cursor patterns.)

Parameter p3 contains flag bits, and parameter p6 passes the pattern width and height data to load as follows:

p3 Flag bits (multiscreen only):
Bit 0 IO$M_DECW_UPDATE_ONE_DISPLAY updates only this display. If set to 0, all attached displays change to this pattern.
Bit 1 IO$M_DECW_MOVE_POINTER puts the cursor on this diplay. If set to 0, the cursor position remains unchanged.
p6 Defines the width and height of the cursor pattern. The width is in bits (to the nearest byte) and the height is the amount of rows. For example, to define a cursor pattern that is 12 bits by 10 rows, enter 000A000C hex for p6.

Defining Cursor Pattern

The rules for defining the pattern pointed to by p2 follow:

  • Each row of bits must be padded to the nearest byte.
  • The least significant bits correspond to the left top corner of the pattern and must go from left to right, and then from top to bottom.
  • There must be two pieces to the cursor pattern, a mask and a color bit pattern. The color bit pattern must follow the mask pattern.

A left bracket ([) cursor pattern specified as 12 bits by 10 rows would appear in memory as shown in Example 2-1.

Example 2-1 A Cursor Bit Pattern

    00000000 0000|0000  p2         (where p6 = 000A000C)
    01111111 1100|0000  p2 + 2
    00000000 1100|0000  p2 + 4
    00000000 1100|0000  p2 + 6
    00000000 1100|0000  p2 + 8
    00000000 1100|0000  p2 + 10
    00000000 1100|0000  p2 + 12
    00000000 1100|0000  p2 + 14
    01111111 1100|0000  p2 + 16
    00000000 0000|0000  p2 + 18

    00000000 0000|0000  p2 + 20
    01111111 1100|0000  p2 + 22
    00000000 1100|0000  p2 + 24
    00000000 1100|0000  p2 + 26
    00000000 1100|0000  p2 + 28
    00000000 1100|0000  p2 + 30
    00000000 1100|0000  p2 + 32
    00000000 1100|0000  p2 + 34
    01111111 1100|0000  p2 + 36
    00000000 0000|0000  p2 + 38

There are no restrictions as to the size of the cursor pattern that can be passed to the driver. If the cursor pattern is too small, it will be padded with zeros on any screens that support a larger size cursor. If the cursor pattern is too big, it will be truncated, resulting in just the upper left-hand corner of the pattern showing on the screen (size too small). The hotspot must be within the size of the cursor pattern specified.


Previous Next Contents Index