• Aucun résultat trouvé

Using Custom Screen Configurations

Dans le document the X Window System (Page 41-48)

Note Domain/OS does not use the screen configuration files XOscreens or X*screens.

The default screen configuration is specified in the XOscreens file in your system directory. It assumes:

• There is one display-display O.

• There is one screen-screen O.

• The screen uses only one set of pixel planes (the image planes).

• The-screen is at the address node specified by /dev/crt.

If you use some configuration other than the default, you must edit the default screen file or add additional screen configuration files.

There should be a separate X*screens file for each display, where * is a number that matches the display number used when starting the X server.

Creating a Custom 'X·screens' File

There are two ways to create a custom screen configuration for a display:

• You can modify XOscreens so that it contains device information for all the screen configurations you may want to use. This is generally the preferred way. Only one configuration is used at a time; the others are commented out.

To switch from one screen configuration to another, you uncomment some lines and comment others. For multiple displays, you would have a separate file for each display-for example, Xlscreens for display 1.

• You can have a separate X*screens file for each screen configuration on a particular display. Switching between them involves modifying the command that starts the X server.

Screen Modes

The syntax of the lines in X*screens depends on the screen mode you choose.

Depending on your system's hardware, you may choose from four screen modes:

image mode

overlay mode

stacked mode

combined mode

The default screen mode using multiple image planes for a single screen. The number of planes determines the variety of colors available to the screen.

An alternate screen mode using overlay planes for a single screen. Overlay planes provide an alternate (auxiliary) set of planes to the standard image planes. You can see what is in the image planes only if you open a "transparent" window in the overlay plane and move the window over what you want to see. Typically, overlay planes are used in conjunction with image planes in either stacked mode or combined mode.

A combination of image and overlay planes in which a single display has two "logical" screens: image planes and overlay planes. You move between the image and overlay planes by moving the pointer to the edge of the display.

A combination of image and overlay planes in which a single display has a single screen that is a combination of the image and overlay planes. Typically, Starbase and other d.isplay-intensive applications run in image-plane windows that can be moved and resized like any other window, but the window frames are maintained in the overlay planes.

3

Table 3·6. Display Hardware and Screen Modes With this You can use these modes ...

display hardware ...

hnage Overlay Stacked Combined

3 HP A1096

.;

HP A1416

.; .; .;

HP A1439

.;

HP A1659

.;

HP A1924

.;

HP 9000S300

.;

model 425e

HP 9000S700

.;

model 710

HP 98542A

.;

HP 98543A

.;

HP 98544B

.;

HP 98545A

.;

HP 98547A

.;

HP 98548A

.;

HP 98549A

.;

HP 98550A

.; .; .;

HP 98704A

.; .; .;

HP 98720A

.; .; .;

HP 98730A

.; .; .; .;

HP 98735A

.; .; .;

HP 98765

.; .; .;

Syntax of 'X·screens'

Each line in X*screens lists a separate screen device (except in combined mode). A screen device can be a physical device, the CRT screen, or the image planes or overlay planes of a physical device.

The syntax for each line of an X*screens file is:

[{

{ 8 } }]

depth [doublebuffer]

I dev I device 24 [ # comment]

depth 16 doublebuffer

/ dev / device

Specifies the name of the device file that the X server should read for this display.

Specifies the number of image and overlay planes available to the server (one pixel per plane).

Specifies double buffer. Double buffering divides video memory into halves and displays one half while drawing the other.

Double buffering is used with graphics programs that double buffer their screen output. This avoids "flashing" during screen redraw.

Specifies the division of the image planes into two 8-bit, double buffered halves.

Specifies the size of the monitor in inches (when number~100)

or millimeters (when number>IOO).

This example shows how to specify a particular screen configuration consisting of a high-resolution screen on which you want to run XII and Starbase applications. The image plane of this screen is accessed by the device file I dev I image_device The overlay plane is accessed by the device file Idev/overlay_device. You want to switch between four different screen configurations:

3

3

• One screen with XII running in the image planes (image mode).

• Two screens with Starbase running in the image planes and XII running in the overlay planes (overlay mode). You may have only one Starbase application running in this mode, and you can see it only if you open a

"transparent" window to look through the overlay planes.

• Two screens running on the same display (stacked mode). One screen runs in the image planes, and the other runs in the overlay planes. You move between the two screens by moving the pointer to the edge of the display.

The order in which the screens appear is specified by the order in which their designations appear in the X*screens file. Starbase is not normally run in this mode.

• One screen with two visuals, one with depth 24, and the other with depth 8 (combined mode). Starbase applications are run in windows that can be moved or resized like any other window. You can have several Starbase applications running at once, each in its own window. The order in which the screens are described is unimportant.

Here is the XOscreens file that creates these four configurations. To use a particular configuration, un comment the line (two lines for Stacked Screens Mode) that create it, and make sure all other lines are commented.

It I Default Configuration III I dey I image_device

It I Overlay Screens Mode III I I dey I overlay_device

It I Stacked Screens Mode III I I dey I image_device

I I dey I overlay_device

It I Combined Screens Mode III

I I dey I image_device I dey I overlay_device depth 24 depth 8

More examples can be found in the system XOscreens file. Note that the first configuration is the default screen configuration provided with XI1.

Multiple Screen Configurations

On systems that support multiple display devices, it is possible to configure X to use these multiple devices in two ways:

• A single X server can treat multiple devices as individual screens within a single display.

Configure the X*screens file so that each device is listed on a separate line.

The order of the lines in the file determines the number given to each screen, beginning with zero.

/dev/crtO /dev/crt1

#display 0, screen 0

#display 0, screen 1

To address a specific device, use the screen parameter of the DISPLAY variable. For instance, DISPLAY=local: 0.1 addresses the second device .

• Multiple X servers can treat each device as a separate display.

To address a specific device, use the display parameter of the DISPLAY variable. In this case, DISPLAY=local: 1.0 addresses the second device.

Mouse Tracking with Multiple Screen Devices

The mouse pointer tracks from left to right. For multiple-screen configuration files, the order of entry determines the tracking order of the mouse pointer.

The first line in the file is the device on which the pointer appears when you start XII.

Other lines correspond to the screens that appear when the mouse is moved to the right or left side of the current screen. Moving off the right side goes to the next higher display, the left side the to next lower. If you are on the highest display and move right, you move to the lowest display. If you are on the lowest display and move left, you move to the highest display.

3

3

Making a Device Driver File

Devices specified in screen configuration files must correspond to device files. If you don't have the appropriate device file, you must create it using the mknod command. For information on mknod see the system administration manual for your operating system.

Dans le document the X Window System (Page 41-48)