Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

streamio(7)

GIN(7)  —  

NAME

gin − graphics input multiplexor

DESCRIPTION

gin is a STREAMS multiplexor.  It provides a graphics input interface between the raw input devices and the user level programs. 

The input devices are keyboard, mouse, tablet, and dial box.  The gin multiplexor translates data from hardware specific format to the common format, defined in <machine/gin.h>:

struct gin {
unsigned longgin_msec;
unsigned longgin_mux_id;
unsigned shortgin_id;
chargin_dev;
chargin_dim;
longgin_buttons;
shortgin_data[NDIM_GIN];
};

gin_mux_id is filled in by the multiplexor to identify each lower input stream.  The value is the one obtained from the I_LINK ioctl(2) when the lower device is linked under the multiplexor.  All other values in the gin structure are filled in by the individual lower driver.  gin_msec is the time stamp.  gin_id identifies the type of the lower device.  gin_dev provides more information (such as sub-device).  Both gin_id and gin_dev are defined in <machine/gin.h>.  gin_dim indicates the number of dimensions.  gin_buttons specifies the button (for mouse) positions.  gin_data contains up to 8 16-bit data. 

The user programs can only read(2), but not write(2), the gin device.  The gin device only recognizes the generic STREAMS I_LINK and I_UNLINK ioctl.  All other ioctls use the generic I_STR ioctl, with a common data format:

struct ginioctl {
intg_cmd;
intg_id;
intg_arg1;
};

The ioctls are passed to the designated (indexed by g_id) lower stream for processing.  To support multiple graphics displays, a gin device is provided for each graphics display. 

FILES

/dev/gin − gin clone device
/dev/gin0 − gin clone device for display 0
/dev/gin1 − gin clone device for display 1

SEE ALSO

streamio(7)

September 29, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026