source: toilet/trunk/src/toilet.h @ 2988

Last change on this file since 2988 was 2988, checked in by sam, 6 years ago

Port toilet to the unified libcaca 0.99.beta15 API.

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1/*
2 *  TOIlet        The Other Implementation’s letters
3 *  Copyright (c) 2006 Sam Hocevar <sam@zoy.org>
4 *                All Rights Reserved
5 *
6 *  $Id: toilet.h 2988 2008-10-18 21:36:17Z sam $
7 *
8 *  This program is free software. It comes without any warranty, to
9 *  the extent permitted by applicable law. You can redistribute it
10 *  and/or modify it under the terms of the Do What The Fuck You Want
11 *  To Public License, Version 2, as published by Sam Hocevar. See
12 *  http://sam.zoy.org/wtfpl/COPYING for more details.
13 */
14
15/*
16 * This header defines global variables.
17 */
18
19struct toilet_context
20{
21    char const *export;
22    char const *font;
23    char const *dir;
24
25    unsigned int term_width;
26
27    caca_canvas_t *cv;
28    caca_canvas_t *torender;
29    unsigned int w, h, ew, eh, x, y, lines;
30
31    /* Render methods */
32    int (*feed)(struct toilet_context *, uint32_t, uint32_t);
33    int (*flush)(struct toilet_context *);
34    int (*end)(struct toilet_context *);
35
36    /* Used by the FIGlet driver */
37    enum { H_DEFAULT, H_KERN, H_SMUSH, H_NONE, H_OVERLAP } hmode;
38    unsigned int hsmushrule;
39    unsigned long int hardblank;
40    unsigned int height, baseline, max_length;
41    int old_layout;
42    unsigned int print_direction, full_layout, codetag_count;
43    unsigned int glyphs;
44    caca_canvas_t *fontcv, *charcv;
45    int *left, *right; /* Unused yet */
46    unsigned int *lookup;
47
48    /* Render filters */
49    void (**filters)(struct toilet_context *);
50    unsigned int nfilters;
51};
52
53typedef struct toilet_context context_t;
54
Note: See TracBrowser for help on using the repository browser.