docs/driver.rst
changeset 55 1ab0edd5d784
equal deleted inserted replaced
54:86b84535726e 55:1ab0edd5d784
       
     1 Driver
       
     2 ======
       
     3 
       
     4 Tuikit driver is the lowest part of the kit - it actually draws characters on screen,
       
     5 receives user events and forwards them to widgets.
       
     6 
       
     7 Any dirty details of actual graphical toolkit should be hidden by this driver.
       
     8 Though it's not hardware driver, nowhere near that. Tuikit driver is expected to use
       
     9 pretty high-level libraries, it's low-level only in Tuikit perpective.
       
    10 
       
    11 Currently there are three drivers: Dummy, Curses, SDL
       
    12 
       
    13 
       
    14 Dummy driver
       
    15 ------------
       
    16 
       
    17 This driver shows and documents complete interface required from any driver.
       
    18 
       
    19 It does not draw anything and immediately emits keypress event for 'q' char and 'escape' key,
       
    20 which should exit application.
       
    21 
       
    22 All methods of dummy driver just report they where being called - into log file.
       
    23 
       
    24 
       
    25 Curses driver
       
    26 -------------
       
    27 
       
    28 Default driver for Text User Interface in any terminal supporting required features.
       
    29 Uses curses module from Python.
       
    30 
       
    31 
       
    32 SDL driver
       
    33 ----------
       
    34 
       
    35 Creates graphical window and draws characters here. This has less limits than curses,
       
    36 we can use any colors, fonts and possibly even draw images.
       
    37 
       
    38 Though by default, it just emulates terminal with curses.
       
    39 
       
    40 SDL application is more portable than curses one, which means that Tuikit application
       
    41 using SDL driver may work in non-unix OS like Windows (does not currently,
       
    42 due to unconditional use of fontconfig).
       
    43 
       
    44 SDL driver requires sdlterm module for Python, which must be compiled from C++.
       
    45 See sdlterm directory in Tuikit distribution.
       
    46