2 * TinyPTC x11 v0.7.3 X Direct Graphics Access Extension v1 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/xf86dga.h>
29 #include <X11/extensions/xf86vmode.h>
35 #include <sys/types.h>
40 #ifdef __TINYPTC_INCLUDED
41 #error You chose more than one target. Please make your mind and try again.
42 #endif /* __TINYPTC_INCLUDED */
44 #define __TINYPTC_INCLUDED
49 #endif /* __cplusplus */
51 int ptc_open (char *title, int width, int height);
52 int ptc_update (void *buffer);
53 void ptc_close (void);
54 int ptc_process_events (void);
58 #endif /* __cplusplus */
60 #endif /* __PTC_XDGA1__ */
62 #endif /* __PTC_XDGA1_H */
64 #ifdef __PTC_FROM_SOURCE
66 static Display *ptc_display;
67 static int ptc_screen;
68 static int ptc_screen_width;
69 static int ptc_screen_height;
70 static int ptc_viewport_width;
71 static int ptc_viewport_height;
73 static Window ptc_root_window;
74 static Visual *ptc_visual;
75 static char *ptc_buffer;
76 static int ptc_pixmap_format_count;
77 static int ptc_pixmap_counter;
78 static int ptc_converter_depth;
79 XPixmapFormatValues *ptc_pixmap_formats;
81 static char *ptc_framebuffer_address;
82 static int ptc_framebuffer_width;
83 static int ptc_framebuffer_banksize;
84 static int ptc_framebuffer_memory;
85 static int ptc_framebuffer_start;
86 static int ptc_framebuffer_pitch;
87 static int ptc_framebuffer_index;
88 static int ptc_totalmodes;
89 static int ptc_dotclock;
90 static int ptc_modecounter;
91 static int ptc_previousmode_number;
92 static int ptc_event_base;
93 static int ptc_error_base;
94 static int ptc_blitcounter;
95 static int ptc_output_pitch;
96 static Bool ptc_emulate_fullscreen;
97 static XF86VidModeModeInfo **ptc_modeinfodata;
98 static XF86VidModeModeLine ptc_currentmodeline;
100 #ifdef __PTC_BEST_VIDEOMODE__
101 static int ptc_best_x_delta;
102 static int ptc_best_y_delta;
103 static int ptc_best_videomode;
104 static int ptc_best_delta;
105 #endif /* __PTC_BEST_VIDEOMODE__ */
107 #ifdef __PTC_ENABLE_CONVERSIONS__
108 PTC_CONVERTER ptc_convert;
109 static int ptc_source_index;
110 static int ptc_destination_index;
111 #endif /* __PTC_ENABLE_CONVERSIONS__ */
113 #endif /* __PTC_FROM_SOURCE */