FBIO(4S) — DEVICES AND NETWORK INTERFACES
NAME
fbio − general properties of frame buffers
DESCRIPTION
All of the Sun frame buffers support the same general interface. Each responds to a FBIOGTYPE ioctl which returns information in a structure defined in <sun/fbio.h>:
structfbtype {
intfb_type; /∗ as defined below ∗/
intfb_height;/∗ in pixels ∗/
intfb_width;/∗ in pixels ∗/
intfb_depth;/∗ bits per pixel ∗/
intfb_cmsize;/∗ size of color map (entries) ∗/
intfb_size; /∗ total size in bytes ∗/
};
#define FBTYPE_SUN1BW 0
#define FBTYPE_SUN1COLOR1
#define FBTYPE_SUN2BW 2
#define FBTYPE_SUN2COLOR3
#define FBTYPE_SUN2GP4
#define FBTYPE_SUN3COLOR6
#define FBTYPE_SUN4COLOR8
Each device has an FBTYPE which is used by higher-level software to determine how to perform raster-op and other functions. Each device is used by opening it, doing an FBIOGTYPE ioctl to see which frame buffer type is present, and thereby selecting the appropriate device-management routines.
Full-fledged frame buffers (that is, those that run SunView) implement an FBIOGPIXRECT ioctl, which returns a pixrect. This call is made only from inside the kernel. The returned pixrect is used by win(4S) for cursor tracking and colormap loading.
FBIOSVIDEO and FBIOGVIDEO are general-purpose ioctls for controlling possible video features of frame buffers. They are defined in <sun/fbio.h>. These ioctls either set or return the value of a flags integer. At this point, only the FBVIDEO_ON option is available, controlled by FBIOSVIDEO. FBIOGVIDEO returns the current video state.
The FBIOSATTR and FBIOGATTR ioctls allow access to special features of newer frame buffers. They use the following structures as defined in <sun/fbio.h>:
#defineFB_ATTR_NDEVSPECIFIC8/∗ no. of device specific values ∗/
#defineFB_ATTR_NEMUTYPES4/∗ no. of emulation types ∗/
struct fbsattr {
intflags;/∗ misc flags ∗/
#defineFB_ATTR_AUTOINIT1/∗ emulation auto init flag ∗/
#defineFB_ATTR_DEVSPECIFIC2/∗ dev. specific stuff valid flag ∗/
intemu_type;/∗ emulation type (-1 if unused) ∗/
intdev_specific[FB_ATTR_NDEVSPECIFIC];/∗ catchall ∗/
};
struct fbgattr {
intreal_type;/∗ real device type ∗/
intowner;/∗ PID of owner, 0 if myself ∗/
struct fbtype fbtype;/∗ fbtype info for real device ∗/
struct fbsattr sattr;/∗ see above ∗/
intemu_types[FB_ATTR_NEMUTYPES];/∗ possible emulations ∗/
/∗ (-1 if unused) ∗/
};
SEE ALSO
mmap(2), bwone(4S), bwtwo(4S), cgfour(4S), cgone(4S), cgtwo(4S), fb(4S), gpone(4S), win(4S)
BUGS
FBIOSATTR and FBIOGATTR are only supported by the cgfour(4S) frame buffer.
The FBVIDEO_ON flag my be incorrect for Sun-1 system black and white frame buffers; see bwone(4S).
Sun Release 4.0 — Last change: 18 February 1988