2 * TinyPTC x11 v0.7.3 X Double Buffer Extension target
3 * Copyright (C) 2001-2002 Alessandro Gatti <a.gatti@tiscali.it>
5 * http://www.sourceforge.net/projects/tinyptc/
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include <X11/Xutil.h>
28 #include <X11/extensions/Xdbe.h>
36 #ifdef __TINYPTC_INCLUDED
37 #error You chose more than one target. Please make your mind and try again.
38 #endif /* __TINYPTC_INCLUDED */
40 #define __TINYPTC_INCLUDED
45 #endif /* __cplusplus */
47 int ptc_open (char *title, int width, int height);
48 int ptc_update (void *buffer);
49 void ptc_close (void);
50 int ptc_process_events (void);
54 #endif /* __cplusplus */
56 #endif /* __PTC_XDBE__ */
58 #endif /* __PTC_XDBE_H */
60 #ifdef __PTC_FROM_SOURCE
62 static Display *ptc_display;
63 static int ptc_screen;
64 static int ptc_screen_width;
65 static int ptc_screen_height;
66 static int ptc_viewport_width;
67 static int ptc_viewport_height;
69 static Window ptc_root_window;
70 static char *ptc_buffer;
71 static int ptc_pixmap_format_count;
72 static int ptc_pixmap_counter;
73 static int ptc_converter_depth;
74 static Visual *ptc_visual;
75 static XPixmapFormatValues *ptc_pixmap_formats;
77 static Window ptc_window;
78 static int ptc_x_position;
79 static int ptc_y_position;
80 static XSetWindowAttributes ptc_window_attributes;
81 static XSizeHints ptc_window_sizehints;
82 static GC ptc_window_gc;
83 static XImage *ptc_ximage;
85 static int ptc_dbe_major_version;
86 static int ptc_dbe_minor_version;
87 static int ptc_dbe_drawables;
88 static int ptc_dbe_counter;
89 static int ptc_dbe_best_performance;
90 static XdbeScreenVisualInfo *ptc_dbe_visual_infoptr;
91 static XdbeVisualInfo *ptc_dbe_visualptr;
92 static VisualID ptc_dbe_best_visual;
93 static XdbeSwapInfo ptc_dbe_swapinfo;
94 static XdbeBackBuffer ptc_dbe_backbuffer;
96 #ifdef __PTC_ENABLE_CONVERSIONS__
97 static PTC_CONVERTER ptc_convert;
98 static int ptc_output_pitch;
99 static int ptc_blitcounter;
100 static int ptc_source_index;
101 static int ptc_destination_index;
102 #endif /* __PTC_ENABLE_CONVERSIONS__ */
104 #endif /* __PTC_FROM_SOURCE */