2 * TinyPTC x11 v0.7.3 X Shared Memory Extension target
3 * Copyright (C) 2000-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/XShm.h>
39 #ifdef __TINYPTC_INCLUDED
40 #error You chose more than one target. Please make your mind and try again.
41 #endif /* __TINYPTC_INCLUDED */
43 #define __TINYPTC_INCLUDED
50 int ptc_open (char *title, int width, int height);
51 int ptc_update (void *buffer);
52 void ptc_close (void);
53 int ptc_process_events (void);
57 #endif /* __cplusplus */
59 #endif /* __PTC_XSHM__ */
61 #endif /* __PTC_XSHM_H */
63 #ifdef __PTC_FROM_SOURCE
65 static Display *ptc_display;
66 static int ptc_screen;
67 static int ptc_screen_width;
68 static int ptc_screen_height;
69 static int ptc_viewport_width;
70 static int ptc_viewport_height;
72 static Window ptc_root_window;
73 static Visual *ptc_visual;
74 static char *ptc_buffer;
75 static int ptc_pixmap_format_count;
76 static int ptc_pixmap_counter;
77 static int ptc_converter_depth;
78 static XPixmapFormatValues *ptc_pixmap_formats;
80 static Window ptc_window;
81 static int ptc_x_position;
82 static int ptc_y_position;
83 static XSetWindowAttributes ptc_window_attributes;
84 static XSizeHints ptc_window_sizehints;
85 static GC ptc_window_gc;
86 static XImage *ptc_ximage;
88 static XShmSegmentInfo ptc_shm_segment;
90 #ifdef __PTC_ENABLE_CONVERSIONS__
91 static PTC_CONVERTER ptc_convert;
92 static int ptc_output_pitch;
93 static int ptc_blitcounter;
94 static int ptc_source_index;
95 static int ptc_destination_index;
96 #endif /* __PTC_ENABLE_CONVERSIONS__ */
98 #endif /* __PTC_FROM_SOURCE */