[1143] | 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 | * |
---|
[1461] | 8 | * This program is free software. It comes without any warranty, to |
---|
[1451] | 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 |
---|
[1143] | 12 | * http://sam.zoy.org/wtfpl/COPYING for more details. |
---|
| 13 | */ |
---|
| 14 | |
---|
| 15 | /* |
---|
| 16 | * This header defines global variables. |
---|
| 17 | */ |
---|
| 18 | |
---|
[1193] | 19 | struct toilet_context |
---|
| 20 | { |
---|
| 21 | char const *export; |
---|
| 22 | char const *font; |
---|
| 23 | char const *dir; |
---|
[1143] | 24 | |
---|
[1193] | 25 | unsigned int term_width; |
---|
| 26 | |
---|
[2988] | 27 | caca_canvas_t *cv; |
---|
| 28 | caca_canvas_t *torender; |
---|
[1242] | 29 | unsigned int w, h, ew, eh, x, y, lines; |
---|
[1193] | 30 | |
---|
[1228] | 31 | /* Render methods */ |
---|
[1385] | 32 | int (*feed)(struct toilet_context *, uint32_t, uint32_t); |
---|
[1241] | 33 | int (*flush)(struct toilet_context *); |
---|
[1193] | 34 | int (*end)(struct toilet_context *); |
---|
[1194] | 35 | |
---|
[1196] | 36 | /* Used by the FIGlet driver */ |
---|
[1404] | 37 | enum { H_DEFAULT, H_KERN, H_SMUSH, H_NONE, H_OVERLAP } hmode; |
---|
| 38 | unsigned int hsmushrule; |
---|
[1196] | 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; |
---|
[2988] | 44 | caca_canvas_t *fontcv, *charcv; |
---|
[1400] | 45 | int *left, *right; /* Unused yet */ |
---|
[1196] | 46 | unsigned int *lookup; |
---|
[1228] | 47 | |
---|
| 48 | /* Render filters */ |
---|
[1243] | 49 | void (**filters)(struct toilet_context *); |
---|
[1228] | 50 | unsigned int nfilters; |
---|
[1193] | 51 | }; |
---|
| 52 | |
---|
| 53 | typedef struct toilet_context context_t; |
---|
| 54 | |
---|