[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 1400 2006-11-14 23:42:11Z 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 | |
---|
[1193] | 18 | struct toilet_context |
---|
| 19 | { |
---|
| 20 | char const *export; |
---|
| 21 | char const *font; |
---|
| 22 | char const *dir; |
---|
[1143] | 23 | |
---|
[1193] | 24 | unsigned int term_width; |
---|
| 25 | |
---|
| 26 | cucul_canvas_t *cv; |
---|
[1241] | 27 | cucul_canvas_t *torender; |
---|
[1242] | 28 | unsigned int w, h, ew, eh, x, y, lines; |
---|
[1193] | 29 | |
---|
[1228] | 30 | /* Render methods */ |
---|
[1385] | 31 | int (*feed)(struct toilet_context *, uint32_t, uint32_t); |
---|
[1241] | 32 | int (*flush)(struct toilet_context *); |
---|
[1193] | 33 | int (*end)(struct toilet_context *); |
---|
[1194] | 34 | |
---|
[1196] | 35 | /* Used by the FIGlet driver */ |
---|
| 36 | unsigned long int hardblank; |
---|
| 37 | unsigned int height, baseline, max_length; |
---|
| 38 | int old_layout; |
---|
| 39 | unsigned int print_direction, full_layout, codetag_count; |
---|
| 40 | unsigned int glyphs; |
---|
| 41 | cucul_canvas_t *image; |
---|
[1400] | 42 | int *left, *right; /* Unused yet */ |
---|
[1196] | 43 | unsigned int *lookup; |
---|
[1228] | 44 | |
---|
| 45 | /* Render filters */ |
---|
[1243] | 46 | void (**filters)(struct toilet_context *); |
---|
[1228] | 47 | unsigned int nfilters; |
---|
[1193] | 48 | }; |
---|
| 49 | |
---|
| 50 | typedef struct toilet_context context_t; |
---|
| 51 | |
---|