Liqbase library overview
liqbase :: the core library
The formatting here is rubbish and I dunno how to fix it. This is preliminary outline documentation for my library and toolkit. it will be expanded upon over the coming days
Note, this describes a library which is not currently available, however its precursor liqbase is available.
liqbase is a simplified interface to the computer.
It has been designed to make it as easy as possible to produce high performance touch sensitive applications. The applications are resolution independent and capable of operating at high speed in with low cpu overheads.
It contains a small set of classes which are usable for creating rich touchable GUI components. It has been written in C for both speed and expandability.
The core library has been written with expansion and translation in mind and will be happy sitting in almost any operating system.
At present it is very specifically targeted at the Linux platform and requires
- X11 window manager for the events.
- XVideo, an x11 graphics accelerator usually used for rendering video frames.
- Gstreamer, for the camera
- Esound for the audio output
- xsp for the pressure sensitive mouse input
- ttflib ttf font handling
- libpng
- libjpeg
graphics are rendered using the XV library using the YUV video format.
This is a lower bandwidth video mode which has full resolution Luma, but half resolution Chroma.
It is being constructed around a set of interrelated classes
- liqapp core system functions global
- liqcanvas provides actual display backbuffer and event sink global
- liqimage native image class, allows alpha, files of type png and jpeg supported inst
- liqfont a renderable font library, extensive caching, inst
- liqsketch a dynamic sketch built up from various strokes and points inst
- liqcliprect a physical rectangle within an image with direct drawing routines inst
Beyond the core there is a whole other set of classes dealing with layout and grouping.
- liqcell a single unit capable of holding or representing physical or meta data inst
- liqgraph a special resolution independent graphics interface which a cell uses inst
The cell class is capable of raising and listening for events as well as being inheritable.
class structure
Most classes created in liqbase follow the same object pattern and contain the following default standard methods:
int class_new() { // Create a brand new instance of the class }
int class_hold() { // Add a reference to an existing instance }
int class_release() { // release a reference to an instance // if there are no more instances, call _free on the instance }
int class_free() { // release all memory for this instance // call _release on all members of this class }
The reference counting is held as a private member inside the instance itself.
There is no concept of inheritance at this level, however once you have instances of cell classes (described in detail below) they follow generic inheritance rules and can expand.
Example Cell construction
A usual cycle goes like this
void hello_world() { liqcell * myform = liqcell_newwidget(“myform”,”form”, 340, 60); liqcell *l1 = liqcell_newwidget(“hello”,”label”, 60, 60); liqcell *l2 = liqcell_newwidget(“world”,” label”, 60, 60);
// do stuff with these instances and maybe create a tree of objects
liqcell_child_insert(myform , l1 ); liqcell_child_insert(myform , l2 ); liqcell_child_arrange_automatic(myform);
liqcell_show(myform);
// now we are finished release the root of the tree. // all items inserted will be recursively released.
liqcell_release(myform); }