GFX(4) — UNIX Programmer’s Manual
NAME
gfx, cgfx − graphics devices
DESCRIPTION
Gfx and cgfx are special devices that allow access to the various graphics frame buffers. Gfx refers to the black and white frame buffer, cgfx refers to the color frame buffer. The only operation supported by the graphics devices is ioctl. The following definitions are from <sys/ioctl.h>:
struct giodata {
longg_addr;
longg_flags;
};
#define GFLPRESENT 1 /* device is present */
#define GFLLAND 2 /* landscape mode */
#define GFLCOLOR 4 /* color frame buffer */
#define GIOCGADDR ((’g’<<8)|0)
struct giodata gd;
ioctl(fd, GIOCGADDR, &gd);
The address returned by GIOCGADDR is the virtual address which the user can use to address the graphics device. The black and white frame buffer occupies 128K bytes starting at the specified address and will be aligned on a 128K byte boundary. The color frame buffer occupies 8K bytes starting at the specified address and will be aligned on an 8K byte boundary. The flags tell where the device is present, if it is in landscape or portrait mode, and whether it is a black and white or color frame buffer.
FILES
/dev/gfx, /dev/cgfx
BUGS
The graphics devices should be exclusive-use devices, but they aren’t.
7th Edition — 7/23/82