Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

73 lignes
2.2 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. unsigned int refcount;
  40. };
  41. /* Bitmap functions */
  42. extern int _cucul_init_bitmap(void);
  43. extern int _cucul_end_bitmap(void);
  44. /* Canvas functions */
  45. extern void _cucul_set_size(cucul_t *, unsigned int, unsigned int);
  46. extern void _cucul_putchar32(cucul_t *qq, int x, int y, uint32_t c);
  47. /* Charset functions */
  48. extern unsigned int _cucul_strlen_utf8(char const *);
  49. extern char const *_cucul_skip_utf8(char const *, unsigned int);
  50. extern uint32_t _cucul_utf8_to_utf32(char const *);
  51. extern uint8_t _cucul_utf32_to_cp437(uint32_t);
  52. extern uint32_t _cucul_cp437_to_utf32(uint8_t);
  53. /* Export functions */
  54. extern void _cucul_get_ansi(cucul_t *, struct cucul_export *);
  55. extern void _cucul_get_html(cucul_t *, struct cucul_export *);
  56. extern void _cucul_get_html3(cucul_t *, struct cucul_export *);
  57. extern void _cucul_get_irc(cucul_t *, struct cucul_export *);
  58. extern void _cucul_get_ps(cucul_t *, struct cucul_export *);
  59. extern void _cucul_get_svg(cucul_t *, struct cucul_export *);
  60. #endif /* __CUCUL_INTERNALS_H__ */