docs/driver.rst
author Radek Brich <radek.brich@devl.cz>
Wed, 20 Aug 2014 15:01:11 +0200
changeset 101 079ced01f875
parent 55 1ab0edd5d784
permissions -rw-r--r--
Add old uncomitted docs.

Driver
======

Tuikit driver is the lowest part of the kit - it actually draws characters on screen,
receives user events and forwards them to widgets.

Any dirty details of actual graphical toolkit should be hidden by this driver.
Though it's not hardware driver, nowhere near that. Tuikit driver is expected to use
pretty high-level libraries, it's low-level only in Tuikit perpective.

Currently there are three drivers: Dummy, Curses, SDL


Dummy driver
------------

This driver shows and documents complete interface required from any driver.

It does not draw anything and immediately emits keypress event for 'q' char and 'escape' key,
which should exit application.

All methods of dummy driver just report they where being called - into log file.


Curses driver
-------------

Default driver for Text User Interface in any terminal supporting required features.
Uses curses module from Python.


SDL driver
----------

Creates graphical window and draws characters here. This has less limits than curses,
we can use any colors, fonts and possibly even draw images.

Though by default, it just emulates terminal with curses.

SDL application is more portable than curses one, which means that Tuikit application
using SDL driver may work in non-unix OS like Windows (does not currently,
due to unconditional use of fontconfig).

SDL driver requires sdlterm module for Python, which must be compiled from C++.
See sdlterm directory in Tuikit distribution.