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 | |
---|
12 | /** \file cucul_internals.h |
---|
13 | * \version \$Id: cucul_internals.h 585 2006-03-10 14:41:24Z jylam $ |
---|
14 | * \author Sam Hocevar <sam@zoy.org> |
---|
15 | * \brief The \e libcucul private header. |
---|
16 | * |
---|
17 | * This header contains the private types and functions used by \e libcucul. |
---|
18 | */ |
---|
19 | |
---|
20 | #ifndef __CUCUL_INTERNALS_H__ |
---|
21 | #define __CUCUL_INTERNALS_H__ |
---|
22 | |
---|
23 | #if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__) |
---|
24 | # include <inttypes.h> |
---|
25 | #elif !defined(CUSTOM_INTTYPES) && !defined(_DOXYGEN_SKIP_ME) |
---|
26 | # define CUSTOM_INTTYPES |
---|
27 | typedef unsigned char uint8_t; |
---|
28 | typedef unsigned short uint16_t; |
---|
29 | typedef unsigned long int uint32_t; |
---|
30 | typedef long int intptr_t; |
---|
31 | typedef long unsigned int uintptr_t; |
---|
32 | #endif |
---|
33 | |
---|
34 | struct cucul_context |
---|
35 | { |
---|
36 | /* Context size */ |
---|
37 | unsigned int width, height; |
---|
38 | |
---|
39 | uint32_t *chars; |
---|
40 | uint8_t *attr; |
---|
41 | char *empty_line, *scratch_line; |
---|
42 | |
---|
43 | enum cucul_color fgcolor; |
---|
44 | enum cucul_color bgcolor; |
---|
45 | |
---|
46 | /* Internal libcucul features */ |
---|
47 | enum cucul_feature background, antialiasing, dithering; |
---|
48 | |
---|
49 | unsigned int refcount; |
---|
50 | |
---|
51 | /* Exporters facilities */ |
---|
52 | char *ansi_buffer; |
---|
53 | char *irc_buffer; |
---|
54 | char *html3_buffer; |
---|
55 | char *html_buffer; |
---|
56 | |
---|
57 | |
---|
58 | |
---|
59 | }; |
---|
60 | |
---|
61 | /* Initialisation functions */ |
---|
62 | extern int _cucul_init_bitmap(void); |
---|
63 | extern int _cucul_end_bitmap(void); |
---|
64 | void _cucul_set_size(cucul_t *qq, unsigned int width, unsigned int height); |
---|
65 | |
---|
66 | |
---|
67 | #endif /* __CUCUL_INTERNALS_H__ */ |
---|