]> git.sesse.net Git - ccbs/blob - bigscreen/tinyptc/xlib.h
Import TinyPTC 0.7.3 sources, switch from OpenGL to TinyPTC for now.
[ccbs] / bigscreen / tinyptc / xlib.h
1 /*
2  * TinyPTC x11 v0.7.3 Raw XLib target
3  * Copyright (C) 2000-2002 Alessandro Gatti <a.gatti@tiscali.it>
4  * 
5  * http://www.sourceforge.net/projects/tinyptc/
6  * 
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.
11  *
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.
16  *
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
20  *
21  */
22
23 #ifndef __PTC_XLIB_H
24 #define __PTC_XLIB_H
25
26 #include <X11/Xlib.h>
27 #include <X11/Xutil.h>
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <limits.h>
31 #include "tinyptc.h"
32
33 #ifdef __PTC_XLIB__
34
35 #ifdef __TINYPTC_INCLUDED
36 #error You chose more than one target. Please make your mind and try again.
37 #endif /* __TINYPTC_INCLUDED */
38
39 #define __TINYPTC_INCLUDED
40 #pragma target xlib
41
42 #ifdef __cplusplus
43         extern "C" {
44 #endif /* __cplusplus */
45
46 int ptc_open (char *title, int width, int height);
47 int ptc_update (void *buffer);
48 void ptc_close (void);
49 int ptc_process_events (void);
50
51 #ifdef __cplusplus
52         }
53 #endif /* __cplusplus */
54
55 #endif /* __PTC_XLIB__ */
56
57 #endif /* __PTC_XLIB_H */
58
59 #ifdef __PTC_FROM_SOURCE
60
61 static Display *ptc_display;
62 static int ptc_screen;
63 static int ptc_screen_width;
64 static int ptc_screen_height;
65 static int ptc_viewport_width;
66 static int ptc_viewport_height;
67 static int ptc_depth;
68 static Window ptc_root_window;
69 static Visual *ptc_visual;
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 XPixmapFormatValues *ptc_pixmap_formats;
75
76 static Window ptc_window;
77 static int ptc_x_position;
78 static int ptc_y_position;
79 static XSetWindowAttributes ptc_window_attributes;
80 static XSizeHints ptc_window_sizehints;
81 static GC ptc_window_gc;
82 static XImage *ptc_ximage;
83
84 #ifdef __PTC_ENABLE_CONVERSIONS__
85 static PTC_CONVERTER ptc_convert;
86 static int ptc_output_pitch;
87 static int ptc_blitcounter;
88 static int ptc_source_index;
89 static int ptc_destination_index;
90 #endif /* __PTC_ENABLE_CONVERSIONS__ */
91
92 #endif /* __PTC_FROM_SOURCE */