Editing Liqbase library overview
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | + | =liqbase :: the core library= | |
- | + | ||
- | + | ||
'''Note, this document describes a library which is not currently available, however its precursor [[liqbase]] is available for download:''' | '''Note, this document describes a library which is not currently available, however its precursor [[liqbase]] is available for download:''' | ||
Line 10: | Line 8: | ||
it will be expanded upon over the coming days. | it will be expanded upon over the coming days. | ||
- | == | + | ==Rational== |
liqbase was born of frustration. | liqbase was born of frustration. | ||
- | It started out as a collection of | + | It started out as a collection of small applications which show off the nokia internet tablet as a fast versatile handheld computer which very rapidly grew into a large monolithic application. |
- | + | ||
- | + | ||
+ | It was the first application I have written in C in many years was and was used by myself to learn about the device and the various libraries and interactions on the nokia internet tablets. | ||
A proof of concept so to speak. | A proof of concept so to speak. | ||
- | The library is aimed to correct the mistakes I made and to provide a framework to continue building my | + | The library is aimed to correct the mistakes I made with the monolithic application and to provide a framework to continue building my applications. |
+ | |||
+ | 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 with low cpu overheads. | ||
It contains a small set of classes which are usable for creating rich touchable GUI components. | 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. | It has been written in C for both speed and expandability. | ||
- | At present it is very specifically focused upon the Nokia internet tablet computers | + | At present it is very specifically focused upon the Nokia internet tablet computers running linux. |
- | + | ==Why not GTK or QT?== | |
- | I looked carefully at GTK | + | I looked carefully at GTK when I first got my tablet and would have been happy it if it had the required performance, it has (semi) sane construction methods and an expansive library of controls and utility functions. |
- | However on the tablet graphical performance was so poor that anything I attempted felt slow and applications crawled along. | + | However on the tablet graphical performance was so poor that anything I attempted felt slow and applications crawled along. |
+ | QT had its own problems and still is not a viable option on the devices. | ||
I wanted to do things which I took for granted on my old PDA and have done for years in Visual Basic and found the existing toolkits lacking. | I wanted to do things which I took for granted on my old PDA and have done for years in Visual Basic and found the existing toolkits lacking. | ||
- | + | ==Dependencies== | |
- | + | ||
liqbase makes use of the following libraries: | liqbase makes use of the following libraries: | ||
Line 45: | Line 45: | ||
*xsp for the pressure sensitive mouse input | *xsp for the pressure sensitive mouse input | ||
*ttflib ttf font handling | *ttflib ttf font handling | ||
- | *libpng | + | *libpng |
*libjpeg | *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. | + | 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. | ||
- | == | + | |
+ | ==core classes== | ||
It is being constructed around a core set of interrelated classes | It is being constructed around a core set of interrelated classes | ||
Line 61: | Line 62: | ||
*liqsketch a dynamic sketch built up from various strokes and points | *liqsketch a dynamic sketch built up from various strokes and points | ||
*liqcliprect a physical rectangle within an image with direct drawing routines | *liqcliprect a physical rectangle within an image with direct drawing routines | ||
+ | |||
Beyond the core there is a second layer of classes dealing with structured layout and rendering | Beyond the core there is a second layer of classes dealing with structured layout and rendering | ||
Line 67: | Line 69: | ||
*liqgraph a special resolution independent graphics interface which a cell uses | *liqgraph a special resolution independent graphics interface which a cell uses | ||
- | With these classes I will be able to construct the applications started inside liqbase | + | With these classes I will be able to construct the applications started inside liqbase |
- | |||
- | == | + | ==class structure== |
- | + | ||
- | < | + | Most classes created in liqbase follow the same object pattern and contain the following default standard methods: |
+ | <PRE> | ||
class *class_new() | class *class_new() | ||
{ | { | ||
Line 96: | Line 98: | ||
// call _release on all members of this class | // call _release on all members of this class | ||
} | } | ||
- | </ | + | </PRE> |
+ | 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. | 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 lifespan== | ||
+ | |||
+ | A usual cycle goes like this | ||
+ | |||
+ | <PRE> | ||
+ | |||
void hello_world() | void hello_world() | ||
{ | { | ||
Line 127: | Line 131: | ||
liqcell_release(myform); | liqcell_release(myform); | ||
} | } | ||
- | </ | + | </PRE> |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + |
Learn more about Contributing to the wiki.