 |
Index for Section 9 |
|
 |
Alphabetical listing for G |
|
 |
Bottom of page |
|
GET_DEPTH_INFO(9r)
NAME
GET_DEPTH_INFO - Graphics: Obtains information about the supported depth of
a graphics device
SYNOPSIS
#include sys/ioctl.h
#include sys/workstation.h
int ioctl(
int gfx_fd,
unsigned long GET_DEPTH_INFO,
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.
GET_DEPTH_INFO
Specifies the ioctl command used to access the ws_depth_descriptor
structure in /usr/sys/include/sys/workstation.h.
ws_driver_structure_pointer
Specifies a pointer to the ws_depth_descriptor structure in
/usr/sys/include/sys/workstation.h.
DESCRIPTION
The GET_DEPTH_INFO ioctl command obtains information about the depth of a
graphics device from the ws_depth_descriptor structure. The
ws_depth_descriptor structure is defined in
/usr/sys/include/sys/workstation.h and pointed to by the
*ws_driver_structure_pointer argument.
The device-dependent X (DDX) component should issue the GET_DEPTH_INFO
command after the MAP_SCREEN_AT_DEPTH command, when it returns both the
virtual addresses in the pixmap member for the graphics device's memory and
the addresses in the plane_mask member where the device's registers have
been mapped. In this way, the server can access the graphics device
directly without having to go through the graphics driver.
RESTRICTIONS
The graphics subsystem supports only one workstation per machine.
Although most VGA devices support more than one depth of display with 16-
bit pixels and 24-bit pixels (also known as true color), the Compaq VGA
controllers currently support only a single depth (8-bit pixels for all but
the generic VGA driver, which supports 4-bit pixels).
RETURN VALUES
If successful, the GET_DEPTH_INFO ioctl command returns 0 (zero). If
unsuccessful, it returns -1.
EXAMPLE
The following example shows how the generic VGA DDX issues a GET_DEPTH_INFO
ioctl command from its genInitVGA routine:
ws_depth_descriptor *dpth;
void genInitVGA(int index)
{
.
.
.
if (dpth == NULL)
dpth = (ws_depth_descriptor *)
Xcalloc(sizeof(ws_depth_descriptor));
dpth->screen = index;
if ((err=ioctl(wsFd,GET_DEPTH_INFO, dpth))) {
perror("Failed to get depth information");
exit (1);
}
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), VIDEO_ON_OFF(9r)
 |
Index for Section 9 |
|
 |
Alphabetical listing for G |
|
 |
Top of page |
|