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>
7 * http://www.sourceforge.net/projects/tinyptc/
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.
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.
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
31 #define __PTC_FUNCTION_KEY__ 0xFF
32 #define __PTC_ESCAPE_KEY__ 0x1B
34 typedef unsigned int int32;
35 typedef unsigned short int16;
36 typedef unsigned short short16;
37 typedef unsigned char char8;
39 /* This directive enables pixelformat conversions - ignored for the
40 * XVideo+Mit-Shm target */
42 #define __PTC_ENABLE_CONVERSIONS__
44 /* This directive enables mmx-optimized pixelformat conversions */
48 /* This directive enables little-endian pixelformat converters - ignored for
49 * the XVideo+Mit-Shm target */
51 /* #define __PTC_LITTLE_ENDIAN__ */
53 /* This directive enables a best-fit video-mode choice logic for DGA 1.x and
56 #define __PTC_BEST_VIDEOMODE__
58 /* This directive enables the use of an user-supplied callback that will be
59 * triggered upon exit */
61 /* #define __PTC_CLEANUP_CALLBACK__ */
63 /* If you uncomment this directive, you'll choose raw xlib video rendering */
65 /* #define __PTC_XLIB__ */
67 /* If you uncomment this directive, you'll choose X Shared memory extension
72 /* If you uncomment this directive, you'll choose X Double buffer extension
75 /* #define __PTC_XDBE__ */
77 /* If you uncomment this directive, you'll choose X Direct Graphics Access
78 * extension (version 1.x) video rendering */
80 /* #define __PTC_XDGA1__ */
82 /* If you uncomment this directive, you'll choose X Direct Graphics Access
83 * extension (version 2.x) video rendering */
85 /* #define __PTC_XDGA2__ */
87 /* If you uncomment this directive, you'll choose XVideo YV12 Accelerated
88 * extension video rendering (using shared memory) */
90 /* #define __PTC_XVSHM__ */
92 #ifdef __PTC_WINDOWED__
93 #error __PTC_WINDOWED__ is not valid anymore, use __PTC_XLIB__ instead.
94 #endif /* __PTC_WINDOWED__ */
98 #endif /* __PTC_XLIB__ */
102 #endif /* __PTC_XSHM__ */
106 #endif /* __PTC_XDBE__ */
110 #endif /* __PTC_XDGA1__ */
114 #endif /* __PTC_XDGA2__ */
118 #endif /* __PTC_XVSHM__ */
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 */
126 #if defined(__PTC_MMX__) && (! defined(__PTC_ENABLE_CONVERSIONS__))
127 #if ! defined(__PTC_XVSHM__)
129 #endif /* !(__PTC_XVSHM__) */
130 #endif /* __PTC_MMX__ && (!(__PTC_ENABLE_CONVERSIONS__)) */
132 #ifdef __PTC_ENABLE_CONVERSIONS__
134 #endif /* __PTC_ENABLE_CONVERSIONS__ */
141 %array_class(int, pixel_array);
146 #endif /* __cplusplus */
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);
153 #ifdef __PTC_CLEANUP_CALLBACK__
154 extern void ptc_cleanup_callback (void);
155 #endif /* __PTC_CLEANUP_CALLBACK__ */
159 #endif /* __cplusplus */
161 #endif /* __TINYPTC_X11 */