1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | #ifndef __MITSHM_HPP_
|
---|
10 | #define __MITSHM_HPP_
|
---|
11 |
|
---|
12 | // this module can be compiled seperately from x11_display_class
|
---|
13 | // if a system does not support IPX do not compile this module
|
---|
14 | // otherwise it will link itself with the x11_display_class on init()
|
---|
15 |
|
---|
16 | #include "arch.hh"
|
---|
17 | #include "image/image.hh"
|
---|
18 | #include "init/init.hh"
|
---|
19 | #include <X11/Xlib.h>
|
---|
20 | #include <X11/Xutil.h>
|
---|
21 | #include <X11/keysym.h>
|
---|
22 |
|
---|
23 | class x11_shm_extension_class;
|
---|
24 |
|
---|
25 | class x11_shm_image_class
|
---|
26 | {
|
---|
27 | public :
|
---|
28 | w8 *data;
|
---|
29 | virtual i4_bool copy_part_to_vram(x11_shm_extension_class *use,
|
---|
30 | i4_coord x, i4_coord y,
|
---|
31 | i4_coord x1, i4_coord y1,
|
---|
32 | i4_coord x2, i4_coord y2) = 0;
|
---|
33 | } ;
|
---|
34 |
|
---|
35 | class x11_shm_extension_class : public i4_init_class
|
---|
36 | {
|
---|
37 | public :
|
---|
38 | i4_bool need_sync_event;
|
---|
39 | int shm_base,shm_error_base,shm_finish_event;
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 | virtual void note_event(XEvent &ev) = 0;
|
---|
44 | x11_shm_extension_class();
|
---|
45 | virtual i4_bool available(Display *display, char *display_name) = 0;
|
---|
46 | virtual x11_shm_image_class *create_shm_image(Display *display,
|
---|
47 | Window window,
|
---|
48 | GC gc,
|
---|
49 | Visual *X_visual,
|
---|
50 | int visual_depth,
|
---|
51 | w16 &width, w16 &height) = 0;
|
---|
52 |
|
---|
53 | virtual void destroy_shm_image(Display *display, x11_shm_image_class *im) = 0;
|
---|
54 | virtual void shutdown(Display *display) = 0;
|
---|
55 | } ;
|
---|
56 |
|
---|
57 | #endif
|
---|