Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

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