KGI connects APIs of different kind. One of them (which is part of the KgiAPI) is known as KgiDevice API.

A KGI device is not what we are used to think of e.g a peripheral or anything related to HW. Instead, a KGI device is a piece of code and data using / sharing KgiResources with other KGI devices. Everything that uses the HW resources of a KgiDisplay (mode setting, framebuffer, HW pointers, palettes...) must register itself as a KGI device.

Maybe this layer of KGI was wrongly called devices because /dev/graphic and /dev/event which are the general KGI and KII user entrypoints are from Unix point of view called devices...

Different KGI devices are known currently:

The visible effect of mapping a KgiDevice to a KgiDisplay is the change of mode on that display. Before mapping a device, a mode must have been negociated with its display. When the device is mapped, the display is requested by KGI to set the mode previously negociated. When the device is unmapped, the display is asked to unset the mode before another device is mapped and so on.

Device mapping / unmapping is performed typically when:

The device methods (hooks) enable the device for example to redraw the screen when mapped or to block anything being performed on the display when unmapped.

See KgiDeviceAPI for details of programming a KgiDevice.

KgiDevice (last edited 2008-06-17 21:38:20 by localhost)