您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

cucul_internals.h 1.5 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * libcucul Unicode canvas library
  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. /* Initialisation functions */
  44. extern int _cucul_init_bitmap(void);
  45. extern int _cucul_end_bitmap(void);
  46. void _cucul_set_size(cucul_t *qq, unsigned int width, unsigned int height);
  47. #endif /* __CUCUL_INTERNALS_H__ */