Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. * $Id$
  7. *
  8. * This library is free software. It comes without any warranty, to
  9. * the extent permitted by applicable law. You can redistribute it
  10. * and/or modify it under the terms of the Do What The Fuck You Want
  11. * To Public License, Version 2, as published by Sam Hocevar. See
  12. * http://sam.zoy.org/wtfpl/COPYING for more details.
  13. */
  14. #ifndef __CUCUL_INTERNALS_H__
  15. #define __CUCUL_INTERNALS_H__
  16. #if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__)
  17. # include <inttypes.h>
  18. #endif
  19. struct cucul_frame
  20. {
  21. /* Frame size */
  22. unsigned int width, height;
  23. /* Cell information */
  24. uint32_t *chars;
  25. uint32_t *attrs;
  26. /* Painting context */
  27. int x, y;
  28. int handlex, handley;
  29. uint32_t curattr;
  30. /* Frame name */
  31. char *name;
  32. };
  33. struct cucul_canvas
  34. {
  35. /* Frame information */
  36. unsigned int frame, framecount;
  37. struct cucul_frame *frames;
  38. /* Canvas management */
  39. unsigned int refcount;
  40. unsigned int autoinc;
  41. int (*resize_callback)(void *);
  42. void *resize_data;
  43. /* Shortcut to the active frame information */
  44. unsigned int width, height;
  45. uint32_t *chars;
  46. uint32_t *attrs;
  47. uint32_t curattr;
  48. };
  49. struct cucul_buffer
  50. {
  51. unsigned long int size;
  52. char *data;
  53. int user_data;
  54. };
  55. /* Colour functions */
  56. extern uint32_t _cucul_attr_to_rgb24fg(uint32_t);
  57. extern uint32_t _cucul_attr_to_rgb24bg(uint32_t);
  58. /* Frames functions */
  59. extern void _cucul_save_frame_info(cucul_canvas_t *);
  60. extern void _cucul_load_frame_info(cucul_canvas_t *);
  61. #endif /* __CUCUL_INTERNALS_H__ */