visual_io(7)
NAME
visual_io − Solaris VISUAL I/O control operations
SYNOPSIS
#include <sys/visual_io.h>
DESCRIPTION
The Solaris VISUAL environment defines a small set of ioctls for controlling graphics and imaging devices.
One ioctl, VIS_GETIDENTIFIER, is mandatory, and must be implemented in device drivers for graphics devices using the Solaris VISUAL environment. The VIS_GETIDENTIFIER, ioctl is defined to return a device identifier from the device driver. This identifier must be a uniquely-defined string.
Another set of ioctls supports mouse tracking via hardware cursor operations. These are optional, but if a graphics device has hardware cursor support and implements these ioctls the mouse tracking performance will be improved.
IOCTLS
VIS_GETIDENTIFIER
This ioctl returns an identifier string to uniquely identify a device used in the Solaris VISUAL environment. This is a mandatory ioctl and must return a unique string. VIS_GETIDENTIFIER takes a vis_identifier structure as its parameter. This structure has the form:
#define VIS_MAXNAMELEN 128
struct vis_identifier {
char name[VIS_MAXNAMELEN];
};
We suggest the name be formed as <companysymbol><devicetype>. For example, the cgsix driver returns SUNWcg6 .
VIS_GETCURSOR
VIS_SETCURSOR
These ioctls fetch and set various cursor attributes, using the vis_cursor structure.
struct vis_cursorpos {
shortx;/∗ cursor x coordinate ∗/
shorty;/∗ cursor y coordinate ∗/
};
struct vis_cursorcmap {
intversion;/∗ version ∗/
intreserved;
unsigned char∗red;/∗ red color map elements ∗/
unsigned char∗green;/∗ green color map elements ∗/
unsigned char∗blue;/∗ blue color map elements ∗/
};
#define VIS_CURSOR_SETCURSOR0x01 /∗ set cursor ∗/
#define VIS_CURSOR_SETPOSITION0x02 /∗ set cursor position ∗/
#define VIS_CURSOR_SETHOTSPOT0x04 /∗ set cursor hot spot ∗/
#define VIS_CURSOR_SETCOLORMAP0x08 /∗ set cursor colormap ∗/
#define VIS_CURSOR_SETSHAPE0x10/∗ set cursor shape ∗/
#define VIS_CURSOR_SETALL(VIS_CURSOR_SETCURSOR | \
VIS_CURSOR_SETPOSITION | \
VIS_CURSOR_SETHOTSPOT | \
VIS_CURSOR_SETCOLORMAP | \
VIS_CURSOR_SETSHAPE)
struct vis_cursor {
shortset;/∗ what to set ∗/
shortenable;/∗ cursor on/off ∗/
struct vis_cursorpospos;/∗ cursor position ∗/
struct vis_cursorposhot;/∗ cursor hot spot ∗/
struct vis_cursorcmapcmap; /∗ color map info ∗/
struct vis_cursorpossize;/∗ cursor bit map size ∗/
char∗image;/∗ cursor image bits ∗/
char∗mask;/∗ cursor mask bits ∗/
};
The vis_cursorcmap structure should contain pointers to two elements, specifying the red, green, and blue values for foreground and background.
VIS_MOVECURSOR
VIS_SETCURSORPOS
These ioctls fetch and move the current cursor position, using the vis_cursorpos structure.
SunOS 5.4 — Last change: 17 Aug 1993