kolibrios/contrib/network/netsurf/libnsfb/usage
Yogev Ezra bb2bbc6b91 Move NetSurf to /contrib folder
git-svn-id: svn://kolibrios.org@4364 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-12-15 14:01:21 +00:00

41 lines
1.8 KiB
Plaintext

Framebuffer abstraction library
-------------------------------
This library provides a generic abstraction to a linear section of
memory which coresponds to a visible array of pixel elements on a
display device. The memory starts at a base location and is logically
split into rows, the length of each row in memory is refered to as the
stride length.
The display device may use differing numbers of bits to represent each
pixel, this represented by the bpp value and may be one of 1, 4, 8,
16, 24 or 32. The library assumes packed pixels and does not support
colour depths which do not correspond to the bpp. The 1bpp mode is a
fixed black and white pallette, the 4 and 8 bpp modes use a 16 and 256
entry pallette respectively and the 16, and 24 bpp modes are direct
indexed RGB modes in 565 and 888 format. The 32bpp mode is RGB in 888
format with the top byte unused.
The library may be coupled to several display devices. The available
devices are controlled by compile time configuration.
Usage
-----
The library is initialised by calling nsfb_init() with the frontend
type as a parameter. The nsfb_t pointer returned is used in all calls
to the library. The geometry and physical settings may be altered
using the nsfb_set_geometry() and nsfb_set_physical() functions. The
frontend *must* then be initialised. The nsfb_set_geometry() and
nsfb_set_physical() functions may be called at any time, however they
are likely to fail once the frontend has been initialised.
The nsfb_finalise() function should be called to shut the library down
when finished.
When directly acessing the framebuffer memory the nsfb_claim() and
nsfb_release() calls should be used. These allow the frontends to
syncronise access and only update the altered regions of the drawing
area. Note the area claimed and released may not neccisarily be the
same.