[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 AIXwindows Programming Guide

AIXwindows XTest Extension

Overview

This extension is a minimal set of client and server extensions required to completely test the X11 server without user intervention.

This extension is not intended to support general journaling and playback of user actions. This is a difficult area because it attempts to synchronize synthetic user interactions with their effects; it is at the higher level of dialogue recording and playback rather than at the strictly lexical level. This extension addresses the latter, simpler, case.

This extension provides a minimum set of facilities that solve immediate testing and validation problems.

This extension adheres to the following objectives:

For additional information, refer to the following topics:

Description

The functions provided by this extension fall into two groups, client operations and server requests.

Client Operations

The XTest Extension includes the following client operations:

These routines manipulate otherwise hidden client-side behavior. The actual implementation will depend on the details of the actual language binding and what degree of request buffering, GContext caching etc., is provided. In the C binding, defined in C Language Xlib Binding, routines are provided to access the internals of two opaque data structures--GCs and visuals--and to discard any requests pending within the output buffer of a connection. The exact details can be expected to differ for other language bindings.

These are abstract definitions of functionality. They refer to client-side objects like "GC" and "VISUAL" which are quoted to denote their abstract nature. Concrete versions of these functions are only defined for particular language bindings. In some circumstances a particular language binding may not implement the relevant abstract type or may provide it as a transparent, rather than opaque type, with the result that the corresponding function does not make sense or is not required, respectively.

Server Requests

The XTest Extension includes the following server requests:

The first of these requests is similar to that provided in most extensions: it allows a client to specify a major and minor version number to the server and for the server to respond with major and minor versions of its own. The remaining two requests

  1. Allow access to an otherwise "write-only" server resource: the cursor associated with a given window; and
  2. Perhaps most importantly, allow limited synthesis of input device events, almost as if a cooperative user had moved the pointing device or pressed a key or button.

Types

The following types are used in the request and event definitions.

FAKE_EVENT_TYPE: {KeyPress, KeyRelease, MotionNotify, ButtonPress, ButtonRelease}
FAKE_XINPUT_EVENT_TYPE: { XI_DeviceKeyPress,  XI_DeviceKeyRelease,  XI_DeviceMotionNotify, XI_DeviceButtonPress,  XI_DeviceButtonRelease, ProximityIn, ProximityOut }
FAKE_EVENT: [type: 
FAKE_EVENT_TYPE; detail: BYTE; time: TIME; root: WINDOW; rootX: INT16; rootY: 
INT16;]
FAKE_XINPUT_EVENT: [ type 
: FAKE_XINPUT_EVENT_TYPE; detail : BYTE; time : TIME; root : WINDOW; rootX : 
INT16; rootY : INT16; state : KeyButMask; same_screen : BOOL; deviceid : BYTE ] 
FAKE_VALUATOR_EVENT:  [ type : 
XI_DeviceValuator; deviceid : BYTE; device_state : KeyButMask; num_valuators : 
BYTE; first_valuator : BYTE; valuator(0-5) : LISTofINT32 ]
CurrentCursor--1

The XTest Extension includes the following new types:

FAKE_EVENT_TYPE
       2         KeyPress
       3         KeyRelease
       4         ButtonPress
       5         ButtonRelease
       6         MotionNotify
FAKE_XINPUT_EVENT_TYPE
Note: The preceding values are defined to be the same as those for the corresponding core protocol event types. The values for FAKE_XINPUT_EVENT_TYPE are defined to be the same as those for the XInput Extension.

C Language Xlib Binding

The C Language routines either provide direct access to the protocol and add no additional semantics to those defined in Server Requests or they correspond directly to the abstract descriptions of client operations in Client Operations.

All XTest Extension functions and procedures, and all manifest constants and macros, start with the string "XTest". All operations are classified as server/client (Server) or client-only (Client). All routines that have return type Status will return non-zero for success and zero for failure. Even if the XTest Extension is supported the server may withdraw such facilities arbitrarily; in which case they will subsequently return zero.

The XTest Extension includes the following C Language routines:


[ Previous | Next | Contents | Glossary | Home | Search ]