You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
1.4 KiB

  1. /*
  2. * TOIlet The Other Implementation’s letters
  3. * Copyright (c) 2006 Sam Hocevar <sam@zoy.org>
  4. * All Rights Reserved
  5. *
  6. * $Id$
  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. * This header defines global variables.
  15. */
  16. struct toilet_context
  17. {
  18. char const *export;
  19. char const *font;
  20. char const *dir;
  21. unsigned int term_width;
  22. cucul_canvas_t *cv;
  23. cucul_canvas_t *torender;
  24. unsigned int w, h, ew, eh, x, y, lines;
  25. /* Render methods */
  26. int (*feed)(struct toilet_context *, uint32_t, uint32_t);
  27. int (*flush)(struct toilet_context *);
  28. int (*end)(struct toilet_context *);
  29. /* Used by the big driver */
  30. cucul_font_t *f;
  31. cucul_canvas_t *onechar;
  32. unsigned char *buf;
  33. /* Used by the FIGlet driver */
  34. unsigned long int hardblank;
  35. unsigned int height, baseline, max_length;
  36. int old_layout;
  37. unsigned int print_direction, full_layout, codetag_count;
  38. unsigned int glyphs;
  39. cucul_canvas_t *image;
  40. unsigned int *lookup;
  41. /* Render filters */
  42. void (**filters)(struct toilet_context *);
  43. unsigned int nfilters;
  44. };
  45. typedef struct toilet_context context_t;