source: libcaca/trunk/cucul/cucul_internals.h @ 2111

Last change on this file since 2111 was 2111, checked in by Sam Hocevar, 12 years ago

=?utf-8?q?=20=20*=20Implement=20cucul=5Fput=5Ffigchar()=20to=20paste=20FIGlet/TOIlet=20characters=20in

=20=20=20=20=20=20=20=20=20=20=E2=96=8C=20=E2=96=8C=20=20=20=E2=96=9C=E2=96=9C=20=20=20=20=C2=A0=E2=96=8C=20=E2=96=8C=20=20=20=20=20=20=E2=96=9C=20=20=20=E2=96=8C=E2=96=90
=20=20=20=20=20=20=20=20=20=20=E2=96=99=E2=96=84=E2=96=8C=E2=96=9E=E2=96=80=E2=96=96=E2=96=90=E2=96=90=20=E2=96=9E=E2=96=80=E2=96=96=C2=A0=E2=96=8C=E2=96=96=E2=96=8C=E2=96=9E=E2=96=80=E2=96=96=E2=96=99=E2=96=80=E2=96=96=E2=96=90=20=E2=96=9E=E2=96=80=E2=96=8C=E2=96=90
=20=20=20=20=20=20=20=20=20=20=E2=96=8C=20=E2=96=8C=E2=96=9B=E2=96=80=20=E2=96=90=E2=96=90=20=E2=96=8C=20=E2=96=8C=C2=A0=E2=96=99=E2=96=9A=E2=96=8C=E2=96=8C=20=E2=96=8C=E2=96=8C=20=C2=A0=E2=96=90=20=E2=96=8C=20=E2=96=8C=E2=96=9D
=20=20=20=20=20=20=20=20=20=20=E2=96=98=20=E2=96=98=E2=96=9D=E2=96=80=E2=96=98=20=E2=96=98=E2=96=98=E2=96=9D=E2=96=80=20=C2=A0=E2=96=98=20=E2=96=98=E2=96=9D=E2=96=80=20=E2=96=98=20=20=20=E2=96=98=E2=96=9D=E2=96=80=E2=96=98=E2=96=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
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: cucul_internals.h 2111 2007-12-01 17:58:52Z sam $
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
15#ifndef __CUCUL_INTERNALS_H__
16#define __CUCUL_INTERNALS_H__
17
18#if defined(HAVE_INTTYPES_H) && !defined(__KERNEL__)
19#   include <inttypes.h>
20#endif
21
22typedef struct cucul_figfont cucul_figfont_t;
23
24struct cucul_frame
25{
26    /* Frame size */
27    unsigned int width, height;
28
29    /* Cell information */
30    uint32_t *chars;
31    uint32_t *attrs;
32
33    /* Painting context */
34    int x, y;
35    int handlex, handley;
36    uint32_t curattr;
37
38    /* Frame name */
39    char *name;
40};
41
42struct cucul_canvas
43{
44    /* XXX: look at cucul_set_canvas_boundaries() before adding anything
45     * to this structure. The function is quite hacky. */
46
47    /* Frame information */
48    unsigned int frame, framecount;
49    struct cucul_frame *frames;
50
51    /* Canvas management */
52    unsigned int refcount;
53    unsigned int autoinc;
54    int (*resize_callback)(void *);
55    void *resize_data;
56
57    /* Shortcut to the active frame information */
58    unsigned int width, height;
59    uint32_t *chars;
60    uint32_t *attrs;
61    uint32_t curattr;
62
63    /* FIGfont management */
64    cucul_figfont_t *ff;
65};
66
67struct cucul_buffer
68{
69    unsigned long int size;
70    char *data;
71    int user_data;
72};
73
74/* Colour functions */
75extern uint32_t _cucul_attr_to_rgb24fg(uint32_t);
76extern uint32_t _cucul_attr_to_rgb24bg(uint32_t);
77
78/* Frames functions */
79extern void _cucul_save_frame_info(cucul_canvas_t *);
80extern void _cucul_load_frame_info(cucul_canvas_t *);
81
82/* File functions */
83extern cucul_file_t *_cucul_file_open(const char *, const char *);
84extern int _cucul_file_close(cucul_file_t *);
85extern int _cucul_file_eof(cucul_file_t *);
86extern char *_cucul_file_gets(char *, int, cucul_file_t *);
87
88#endif /* __CUCUL_INTERNALS_H__ */
Note: See TracBrowser for help on using the repository browser.