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

Last change on this file since 1405 was 1404, checked in by Sam Hocevar, 16 years ago
  • Completed support for -s, -S, -k, -W, -o.
  • Property svn:keywords set to Id
File size: 1.4 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 1404 2006-11-16 00:04:39Z sam $
7 *
8 *  This program is free software; you can redistribute it and/or
9 *  modify it under the terms of the Do What The Fuck You Want To
10 *  Public License, Version 2, as published by Sam Hocevar. See
11 *  http://sam.zoy.org/wtfpl/COPYING for more details.
12 */
13
14/*
15 * This header defines global variables.
16 */
17
18struct toilet_context
19{
20    char const *export;
21    char const *font;
22    char const *dir;
23
24    unsigned int term_width;
25
26    cucul_canvas_t *cv;
27    cucul_canvas_t *torender;
28    unsigned int w, h, ew, eh, x, y, lines;
29
30    /* Render methods */
31    int (*feed)(struct toilet_context *, uint32_t, uint32_t);
32    int (*flush)(struct toilet_context *);
33    int (*end)(struct toilet_context *);
34
35    /* Used by the FIGlet driver */
36    enum { H_DEFAULT, H_KERN, H_SMUSH, H_NONE, H_OVERLAP } hmode;
37    unsigned int hsmushrule;
38    unsigned long int hardblank;
39    unsigned int height, baseline, max_length;
40    int old_layout;
41    unsigned int print_direction, full_layout, codetag_count;
42    unsigned int glyphs;
43    cucul_canvas_t *fontcv, *charcv;
44    int *left, *right; /* Unused yet */
45    unsigned int *lookup;
46
47    /* Render filters */
48    void (**filters)(struct toilet_context *);
49    unsigned int nfilters;
50};
51
52typedef struct toilet_context context_t;
53
Note: See TracBrowser for help on using the repository browser.