Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

76 строки
2.3 KiB

  1. /*
  2. * libcucul Canvas for ultrafast compositing of Unicode letters
  3. * Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
  4. * All Rights Reserved
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the Do What The Fuck You Want To
  8. * Public License, Version 2, as published by Sam Hocevar. See
  9. * http://sam.zoy.org/wtfpl/COPYING for more details.
  10. */
  11. /** \file cucul_internals.h
  12. * \version \$Id$
  13. * \author Sam Hocevar <sam@zoy.org>
  14. * \brief The \e libcucul private header.
  15. *
  16. * This header contains the private types and functions used by \e libcucul.
  17. */
  18. #ifndef __CUCUL_INTERNALS_H__
  19. #define __CUCUL_INTERNALS_H__
  20. #if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__)
  21. # include <inttypes.h>
  22. #elif !defined(CUSTOM_INTTYPES) && !defined(_DOXYGEN_SKIP_ME)
  23. # define CUSTOM_INTTYPES
  24. typedef unsigned char uint8_t;
  25. typedef unsigned short uint16_t;
  26. typedef unsigned long int uint32_t;
  27. typedef long int intptr_t;
  28. typedef long unsigned int uintptr_t;
  29. #endif
  30. struct cucul_context
  31. {
  32. /* Context size */
  33. unsigned int width, height;
  34. uint32_t *chars;
  35. uint8_t *attr;
  36. char *empty_line, *scratch_line;
  37. enum cucul_color fgcolor;
  38. enum cucul_color bgcolor;
  39. /* Internal libcucul features */
  40. enum cucul_feature background, antialiasing, dithering;
  41. unsigned int refcount;
  42. };
  43. /* Bitmap functions */
  44. extern int _cucul_init_bitmap(void);
  45. extern int _cucul_end_bitmap(void);
  46. /* Canvas functions */
  47. extern void _cucul_set_size(cucul_t *, unsigned int, unsigned int);
  48. extern void _cucul_putchar32(cucul_t *qq, int x, int y, uint32_t c);
  49. /* Charset functions */
  50. extern unsigned int _cucul_strlen_utf8(char const *);
  51. extern char const *_cucul_skip_utf8(char const *, unsigned int);
  52. extern uint32_t _cucul_utf8_to_utf32(char const *);
  53. extern uint8_t _cucul_utf32_to_cp437(uint32_t);
  54. extern uint32_t _cucul_cp437_to_utf32(uint8_t);
  55. /* Export functions */
  56. extern void _cucul_get_ansi(cucul_t *, struct cucul_export *);
  57. extern void _cucul_get_html(cucul_t *, struct cucul_export *);
  58. extern void _cucul_get_html3(cucul_t *, struct cucul_export *);
  59. extern void _cucul_get_irc(cucul_t *, struct cucul_export *);
  60. extern void _cucul_get_ps(cucul_t *, struct cucul_export *);
  61. extern void _cucul_get_svg(cucul_t *, struct cucul_export *);
  62. #endif /* __CUCUL_INTERNALS_H__ */