comparison dox/define_backend.h @ 443:1f900a67bd38

Doc How to Define a Backend
author Thinker K.F. Li <thinker@branda.to>
date Fri, 31 Jul 2009 13:30:43 +0800
parents
children 5dedeedf0408
comparison
equal deleted inserted replaced
442:76b61d447225 443:1f900a67bd38
1 /*! \page backend How to Define a Backend
2 *
3 * A backend is factory to initialize environment to make
4 * MadBufferfly available. A backend should provide resources
5 * needed by MadButterfly, for example, to provide a surface
6 * that will show everything drawing on it. It also translate and
7 * relay input events, mouse or keyboard, to MadButterfly.
8 * The tasks that a backend should do are listed following,
9 * - to prepare a backend surface,
10 * - to prepare a front surface,
11 * - to translate and relay input events to MadButterfly,
12 * - to handle a timer, and relay timeout events to MadButterfly.
13 *
14 * The output device surface for X Window is a surface return by
15 * cairo_xlib_surface_create(). MadButterfly will copy everything
16 * from front surface to backend surface to show graphy to user.
17 * The copying is to avoid user find slowly redrawing. The latency
18 * between X client and server can be large. For this situation,
19 * we need a font surface as a buffer drawing, and copy image from
20 * front surface to backend surface after completion of a series
21 * of drawing. A front surface can be an image surface for this
22 * situation.
23 *
24 * The input events of X Window should be translated to raw events of
25 * MadButterfly and sent them to rdman through notify_coord_or_shape()
26 * function.
27 *
28 * \see X_supp.c
29 */