 |
Index for Section 9 |
|
 |
Alphabetical listing for V |
|
 |
Bottom of page |
|
VIDEO_ON_OFF(9r)
NAME
VIDEO_ON_OFF - Graphics: Turns the video on or off on a specific screen
SYNOPSIS
#include sys/ioctl.h
#include sys/workstation.h
int ioctl(
int gfx_fd,
unsigned long VIDEO_ON_OFF,
void *ws_driver_structure_pointer );
ARGUMENTS
gfx_fd
Specifies the file descriptor of the graphics device-special file (by
convention /dev/ws0) that the open system call returns when the server
is initialized. The server uses this file descriptor in subsequent
ioctl calls to the Workstation Subsystem.
VIDEO_ON_OFF
Specifies the ioctl command used to access the ws_video_control
structure.
ws_driver_structure_pointer
Specifies a pointer to the ws_video_control structure.
DESCRIPTION
The VIDEO_ON_OFF ioctl command turns the video on or off. The screen is
described by the ws_video_control structure defined in
/usr/sys/include/sys/workstation.h and pointed to by
ws_driver_structure_pointer. Primarily, a screen saver uses this ioctl
command, which is called from the WS layer of the Compaq device-dependent X
(DDX) implementation. However, if you want to use some other method of
blanking the screen (for example, to implement Green Mode or Deep Green
Mode), then you would call this ioctl command from your board-specific DDX.
RESTRICTIONS
The graphics subsystem supports only one workstation per machine.
RETURN VALUES
If successful, the VIDEO_ON_OFF ioctl command returns 0 (zero). If
unsuccessful, it returns -1.
EXAMPLE
The following example shows how the generic WS layer of the DDX uses the
VIDEO_ON_OFF ioctl command:
Bool
wsSaveScreen(pScreen, on)
ScreenPtr pScreen;
int on;
{
ws_video_control vc;
vc.screen = WS_SCREEN(pScreen);
if (on == SCREEN_SAVER_FORCER) {
lastEventTime = queue->time;
} else if (on == SCREEN_SAVER_ON) {
vc.control = 0;
if (ioctl(wsFd, VIDEO_ON_OFF, &vc) < 0)
ErrorF("VIDEO_ON_OFF: failed to turn screen off.\n");
} else {
vc.control = 1;
if (ioctl(wsFd, VIDEO_ON_OFF, &vc) < 0)
ErrorF("VIDEO_ON_OFF: failed to turn screen on.\n");
}
return TRUE;
}
FILES
/usr/sys/include/sys/ioctl.h
/usr/sys/include/sys/workstation.h
SEE ALSO
ioctl Commands: CURSOR_ON_OFF(9r), GET_DEPTH_INFO(9r),
MAP_SCREEN_AT_DEPTH(9r), SET_CURSOR_POSITION(9r)
 |
Index for Section 9 |
|
 |
Alphabetical listing for V |
|
 |
Top of page |
|