source: libcaca/trunk/src/caca_internals.h @ 487

Last change on this file since 487 was 487, checked in by Jean-Yves Lamoureux, 17 years ago
  • Added Null driver and html3 exporter.
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1/*
2 *  libcaca       ASCII-Art library
3 *  Copyright (c) 2002, 2003 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 GNU Lesser General Public
8 *  License as published by the Free Software Foundation; either
9 *  version 2 of the License, or (at your option) any later version.
10 *
11 *  This library is distributed in the hope that it will be useful,
12 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 *  Lesser General Public License for more details.
15 *
16 *  You should have received a copy of the GNU Lesser General Public
17 *  License along with this library; if not, write to the Free Software
18 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 *  02111-1307  USA
20 */
21
22/** \file caca_internals.h
23 *  \version \$Id: caca_internals.h 487 2005-06-22 22:06:42Z jylam $
24 *  \author Sam Hocevar <sam@zoy.org>
25 *  \brief The \e libcaca private header.
26 *
27 *  This header contains the private types and functions used by \e libcaca.
28 */
29
30#ifndef __CACA_INTERNALS_H__
31#define __CACA_INTERNALS_H__
32
33/* Graphics driver */
34enum caca_driver
35{
36#if defined(USE_CONIO)
37    CACA_DRIVER_CONIO = 1,
38#endif
39#if defined(USE_NCURSES)
40    CACA_DRIVER_NCURSES = 2,
41#endif
42#if defined(USE_SLANG)
43    CACA_DRIVER_SLANG = 3,
44#endif
45#if defined(USE_X11)
46    CACA_DRIVER_X11 = 4,
47#endif
48#if defined(USE_WIN32)
49    CACA_DRIVER_WIN32 = 5,
50#endif
51#if defined(USE_GL)
52    CACA_DRIVER_GL = 6,
53#endif
54#if defined(USE_NULL)
55    CACA_DRIVER_NULL = 7,
56#endif
57    CACA_DRIVER_NONE = 0
58};
59
60/* Timer structure */
61#define CACA_TIMER_INITIALIZER { 0, 0 }
62struct caca_timer
63{
64    int last_sec, last_usec;
65};
66
67extern enum caca_driver _caca_driver;
68
69/* Initialisation functions */
70extern int _caca_init_graphics(void);
71extern int _caca_end_graphics(void);
72extern int _caca_init_bitmap(void);
73extern int _caca_end_bitmap(void);
74
75/* Timer functions */
76extern void _caca_sleep(unsigned int);
77extern unsigned int _caca_getticks(struct caca_timer *);
78
79/* Cached screen size */
80extern unsigned int _caca_width;
81extern unsigned int _caca_height;
82extern int _caca_resize;
83extern int _caca_resize_event;
84
85/* Internal libcaca features */
86extern enum caca_feature _caca_background;
87extern enum caca_feature _caca_dithering;
88extern enum caca_feature _caca_antialiasing;
89
90#if defined(USE_X11)
91#include <X11/Xlib.h>
92extern Display *x11_dpy;
93extern Window x11_window;
94extern Pixmap x11_pixmap;
95extern GC x11_gc;
96extern long int x11_event_mask;
97extern int x11_font_width, x11_font_height;
98extern unsigned int x11_new_width, x11_new_height;
99#endif
100
101#if defined(USE_WIN32)
102#include <windows.h>
103extern HANDLE win32_hin, win32_hout;
104#endif
105
106#if defined(USE_GL)
107#include <GL/glut.h>
108extern unsigned int gl_width, gl_height;
109#endif
110
111
112#endif /* __CACA_INTERNALS_H__ */
Note: See TracBrowser for help on using the repository browser.