]> git.sesse.net Git - ccbs/blob - bigscreen/tinyptc/tinyptc.h
Fixed a misleading comment.
[ccbs] / bigscreen / tinyptc / tinyptc.h
1 /*
2  * TinyPTC x11 v0.7.3 Main header file
3  * Copyright (C) 2000-2002 Alessandro Gatti <a.gatti@tiscali.it>
4  * Copyright (C) 2002      Fred Howell <foohoo@shaw.ca>
5  * Copyright (C) 2000-2001 Glenn Fiedler <gaffer@gaffer.org>
6  *
7  * http://www.sourceforge.net/projects/tinyptc/
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  * 
23  */
24
25 #ifndef __TINYPTC_X11
26 #define __TINYPTC_X11
27
28 #define PTC_FAILURE 0
29 #define PTC_SUCCESS 1
30
31 #define __PTC_FUNCTION_KEY__ 0xFF
32 #define __PTC_ESCAPE_KEY__ 0x1B
33
34 typedef unsigned int int32;
35 typedef unsigned short int16;
36 typedef unsigned short short16;
37 typedef unsigned char char8;
38
39 /* This directive enables pixelformat conversions - ignored for the
40  * XVideo+Mit-Shm target */
41
42 #define __PTC_ENABLE_CONVERSIONS__
43
44 /* This directive enables mmx-optimized pixelformat conversions */
45
46 /* #define __PTC_MMX__ */
47
48 /* This directive enables little-endian pixelformat converters - ignored for
49  * the XVideo+Mit-Shm target */
50
51 /* #define __PTC_LITTLE_ENDIAN__ */
52
53 /* This directive enables a best-fit video-mode choice logic for DGA 1.x and
54  * DGA 2.x targets */
55
56 #define __PTC_BEST_VIDEOMODE__
57
58 /* This directive enables the use of an user-supplied callback that will be
59  * triggered upon exit */
60
61 /* #define __PTC_CLEANUP_CALLBACK__ */
62
63 /* If you uncomment this directive, you'll choose raw xlib video rendering */
64
65 #define __PTC_XLIB__
66
67 /* If you uncomment this directive, you'll choose X Shared memory extension
68  * video rendering */
69
70 /* #define __PTC_XSHM__ */
71
72 /* If you uncomment this directive, you'll choose X Double buffer extension
73  * video rendering */
74
75 /* #define __PTC_XDBE__ */
76
77 /* If you uncomment this directive, you'll choose X Direct Graphics Access
78  * extension (version 1.x) video rendering */
79
80 /* #define __PTC_XDGA1__ */
81
82 /* If you uncomment this directive, you'll choose X Direct Graphics Access
83  * extension (version 2.x) video rendering */
84
85 /* #define __PTC_XDGA2__ */
86
87 /* If you uncomment this directive, you'll choose XVideo YV12 Accelerated
88  * extension video rendering (using shared memory) */
89
90 /* #define __PTC_XVSHM__ */
91
92 #ifdef __PTC_WINDOWED__
93 #error __PTC_WINDOWED__ is not valid anymore, use __PTC_XLIB__ instead.
94 #endif /* __PTC_WINDOWED__ */
95
96 #ifdef __PTC_XLIB__
97 #include "xlib.h"
98 #endif /* __PTC_XLIB__ */
99
100 #ifdef __PTC_XSHM__
101 #include "xshm.h"
102 #endif /* __PTC_XSHM__ */
103
104 #ifdef __PTC_XDBE__
105 #include "xdbe.h"
106 #endif /* __PTC_XDBE__ */
107
108 #ifdef __PTC_XDGA1__
109 #include "xdga1.h"
110 #endif /* __PTC_XDGA1__ */
111
112 #ifdef __PTC_XDGA2__
113 #include "xdga2.h"
114 #endif /* __PTC_XDGA2__ */
115
116 #ifdef __PTC_XVSHM__
117 #include "xvshm.h"
118 #endif /* __PTC_XVSHM__ */
119
120 #ifndef __TINYPTC_INCLUDED
121 #error You should select at least one target. If you did not select \
122         anything in order to use the DGA target, use __PTC_XDGA1__ or \
123         __PTC_XDGA2__ instead. Please check tinyptc.h settings.
124 #endif /* __TINYPTC_INCLUDED */
125
126 #if defined(__PTC_MMX__) && (! defined(__PTC_ENABLE_CONVERSIONS__))
127     #if ! defined(__PTC_XVSHM__)
128       #undef __PTC_MMX__
129     #endif /* !(__PTC_XVSHM__) */
130 #endif /* __PTC_MMX__ && (!(__PTC_ENABLE_CONVERSIONS__)) */
131         
132 #ifdef __PTC_ENABLE_CONVERSIONS__
133 #include "convert.h"
134 #endif /* __PTC_ENABLE_CONVERSIONS__ */
135
136 #ifdef SWIG
137 %module TinyPTC
138 %{
139 %}
140 %include "carrays.i"
141 %array_class(int, pixel_array);
142 #endif /* SWIG */
143
144 #ifdef __cplusplus
145         extern "C" {
146 #endif /* __cplusplus */
147         
148 extern int ptc_open (char *title, int width, int height);
149 extern int ptc_update (void *buffer);
150 extern void ptc_close (void);
151 int ptc_process_events (void);
152
153 #ifdef __PTC_CLEANUP_CALLBACK__
154 extern void ptc_cleanup_callback (void);
155 #endif /* __PTC_CLEANUP_CALLBACK__ */
156
157 #ifdef __cplusplus
158         }
159 #endif /* __cplusplus */
160
161 #endif /* __TINYPTC_X11 */