Mercurial > sdl-ios-xcode
annotate src/video/Xext/XME/xme.c @ 5221:16d5e8e90e01
Updated testoverlay2 to use the SDL 2D rendering API
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 07 Feb 2011 00:46:43 -0800 |
parents | 81dde1b00bf1 |
children |
rev | line source |
---|---|
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
1 /* |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
2 * Copyright 1993-2001 by Xi Graphics, Inc. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
3 * All Rights Reserved. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
4 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
5 * Please see the LICENSE file accompanying this distribution for licensing |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
6 * information. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
7 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
8 * Please send any bug fixes and modifications to src@xig.com. |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
9 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
10 * $XiGId: xme.c,v 1.2 2001/11/30 21:56:59 jon Exp $ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
11 * |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
12 */ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
13 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
14 #define NEED_EVENTS |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
15 #define NEED_REPLIES |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
16 |
3633
81dde1b00bf1
Merged r3576:3577 from branches/SDL-1.2: X11 Xlibint.h include fixes.
Ryan C. Gordon <icculus@icculus.org>
parents:
2063
diff
changeset
|
17 /* Apparently some X11 systems can't include this multiple times... */ |
81dde1b00bf1
Merged r3576:3577 from branches/SDL-1.2: X11 Xlibint.h include fixes.
Ryan C. Gordon <icculus@icculus.org>
parents:
2063
diff
changeset
|
18 #ifndef SDL_INCLUDED_XLIBINT_H |
81dde1b00bf1
Merged r3576:3577 from branches/SDL-1.2: X11 Xlibint.h include fixes.
Ryan C. Gordon <icculus@icculus.org>
parents:
2063
diff
changeset
|
19 #define SDL_INCLUDED_XLIBINT_H 1 |
1599
ecba4bbaf9c2
More dynamic X11 mangling...should fix NetBSD builds. And hopefully doesn't
Ryan C. Gordon <icculus@icculus.org>
parents:
1575
diff
changeset
|
20 #include <X11/Xlibint.h> |
3633
81dde1b00bf1
Merged r3576:3577 from branches/SDL-1.2: X11 Xlibint.h include fixes.
Ryan C. Gordon <icculus@icculus.org>
parents:
2063
diff
changeset
|
21 #endif |
81dde1b00bf1
Merged r3576:3577 from branches/SDL-1.2: X11 Xlibint.h include fixes.
Ryan C. Gordon <icculus@icculus.org>
parents:
2063
diff
changeset
|
22 |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
23 #include <X11/Xthreads.h> |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
24 #include <X11/Xmd.h> |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
25 #include <X11/Xproto.h> |
1599
ecba4bbaf9c2
More dynamic X11 mangling...should fix NetBSD builds. And hopefully doesn't
Ryan C. Gordon <icculus@icculus.org>
parents:
1575
diff
changeset
|
26 #include "../extensions/Xext.h" |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1242
diff
changeset
|
27 #include "../extensions/extutil.h" |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
28 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
29 /*****************************************************************************/ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
30 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
31 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
32 #define XIGMISC_PROTOCOL_NAME "XiG-SUNDRY-NONSTANDARD" |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
33 #define XIGMISC_MAJOR_VERSION 2 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
34 #define XIGMISC_MINOR_VERSION 0 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
35 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
36 #define XiGMiscNumberEvents 0 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
37 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
38 #define X_XiGMiscQueryVersion 0 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
39 #define X_XiGMiscQueryViews 1 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
40 #define X_XiGMiscQueryResolutions 2 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
41 #define X_XiGMiscChangeResolution 3 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
42 #define X_XiGMiscFullScreen 4 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
43 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
44 #define sz_xXiGMiscQueryVersionReq 8 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
45 #define sz_xXiGMiscQueryViewsReq 8 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
46 #define sz_xXiGMiscQueryResolutionsReq 8 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
47 #define sz_xXiGMiscChangeResolutionReq 16 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
48 #define sz_xXiGMiscFullScreenReq 16 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
49 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
50 #define sz_xXiGMiscQueryVersionReply 32 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
51 #define sz_xXiGMiscQueryViewsReply 32 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
52 #define sz_xXiGMiscQueryResolutionsReply 32 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
53 #define sz_xXiGMiscQueryFullScreenReply 32 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
54 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
55 /*******************************************************************/ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
56 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
57 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
58 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
59 CARD8 reqType; /* always codes->major_opcode */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
60 CARD8 xigmiscReqType; /* always X_XiGMiscQueryVersion */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
61 CARD16 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
62 CARD16 major; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
63 CARD16 minor; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
64 } xXiGMiscQueryVersionReq; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
65 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
66 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
67 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
68 CARD8 reqType; /* always codes->major_opcode */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
69 CARD8 xigmiscReqType; /* always X_XiGMiscQueryViews */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
70 CARD16 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
71 CARD8 screen; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
72 CARD8 pad0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
73 CARD16 pad1; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
74 } xXiGMiscQueryViewsReq; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
75 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
76 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
77 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
78 CARD8 reqType; /* always codes->major_opcode */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
79 CARD8 xigmiscReqType; /* always X_XiGMiscQueryResolutions */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
80 CARD16 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
81 CARD8 screen; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
82 CARD8 view; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
83 CARD16 pad0; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
84 } xXiGMiscQueryResolutionsReq; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
85 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
86 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
87 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
88 CARD8 reqType; /* always codes->major_opcode */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
89 CARD8 xigmiscReqType; /* always X_XiGMiscChangeResolution */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
90 CARD16 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
91 CARD8 screen; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
92 CARD8 view; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
93 CARD16 pad0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
94 CARD16 width; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
95 CARD16 height; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
96 INT32 refresh; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
97 } xXiGMiscChangeResolutionReq; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
98 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
99 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
100 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
101 CARD8 reqType; /* always codes->major_opcode */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
102 CARD8 xigmiscReqType; /* always X_XiGMiscFullScreen */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
103 CARD16 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
104 CARD8 screen; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
105 CARD8 pad0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
106 CARD16 pad1; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
107 CARD32 window; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
108 CARD32 cmap; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
109 } xXiGMiscFullScreenReq; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
110 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
111 /*******************************************************************/ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
112 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
113 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
114 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
115 BYTE type; /* X_Reply */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
116 CARD8 pad0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
117 CARD16 sequenceNumber; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
118 CARD32 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
119 CARD16 major; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
120 CARD16 minor; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
121 CARD32 pad1; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
122 CARD32 pad2; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
123 CARD32 pad3; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
124 CARD32 pad4; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
125 CARD32 pad5; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
126 } xXiGMiscQueryVersionReply; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
127 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
128 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
129 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
130 BYTE type; /* X_Reply */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
131 CARD8 pad0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
132 CARD16 sequenceNumber; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
133 CARD32 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
134 CARD32 nviews; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
135 CARD32 pad1; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
136 CARD32 pad2; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
137 CARD32 pad3; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
138 CARD32 pad4; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
139 CARD32 pad5; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
140 } xXiGMiscQueryViewsReply; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
141 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
142 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
143 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
144 BYTE type; /* X_Reply */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
145 CARD8 pad0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
146 CARD16 sequenceNumber; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
147 CARD32 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
148 CARD16 active; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
149 CARD16 nresolutions; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
150 CARD32 pad1; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
151 CARD32 pad2; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
152 CARD32 pad3; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
153 CARD32 pad4; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
154 CARD32 pad5; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
155 } xXiGMiscQueryResolutionsReply; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
156 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
157 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
158 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
159 BYTE type; /* X_Reply */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
160 BOOL success; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
161 CARD16 sequenceNumber; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
162 CARD32 length; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
163 CARD32 pad1; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
164 CARD32 pad2; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
165 CARD32 pad3; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
166 CARD32 pad4; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
167 CARD32 pad5; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
168 CARD32 pad6; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
169 } xXiGMiscFullScreenReply; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
170 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
171 /*******************************************************************/ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
172 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
173 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
174 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
175 INT16 x; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
176 INT16 y; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
177 CARD16 w; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
178 CARD16 h; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
179 } XiGMiscViewInfo; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
180 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
181 typedef struct |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
182 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
183 CARD16 width; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
184 CARD16 height; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
185 INT32 refresh; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
186 } XiGMiscResolutionInfo; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
187 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
188 /*****************************************************************************/ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
189 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
190 static XExtensionInfo *xigmisc_info = NULL; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
191 static char *xigmisc_extension_name = XIGMISC_PROTOCOL_NAME; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
192 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
193 #define XiGMiscCheckExtension(dpy,i,val) \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
194 XextCheckExtension (dpy, i, xigmisc_extension_name, val) |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
195 #define XiGMiscSimpleCheckExtension(dpy,i) \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
196 XextSimpleCheckExtension (dpy, i, xigmisc_extension_name) |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
197 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
198 #if defined(__STDC__) && !defined(UNIXCPP) |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
199 #define XiGMiscGetReq(name,req,info) GetReq (name, req); \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
200 req->reqType = info->codes->major_opcode; \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
201 req->xigmiscReqType = X_##name; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
202 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
203 #define XiGMiscGetReqExtra(name,n,req,info) GetReqExtra (name, n, req); \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
204 req->reqType = info->codes->major_opcode; \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
205 req->xigmicReqType = X_##name; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
206 #else |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
207 #define XiGMiscGetReq(name,req,info) GetReq (name, req); \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
208 req->reqType = info->codes->major_opcode; \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
209 req->xigmiscReqType = X_/**/name; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
210 #define XiGMiscGetReqExtra(name,n,req,info) GetReqExtra (name, n, req); \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
211 req->reqType = info->codes->major_opcode; \ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
212 req->xigmiscReqType = X_/**/name; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
213 #endif |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
214 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
215 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
216 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
217 /* |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
218 * find_display - locate the display info block |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
219 */ |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
220 static int XiGMiscCloseDisplay(); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
221 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
222 static XExtensionHooks xigmisc_extension_hooks = { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
223 NULL, /* create_gc */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
224 NULL, /* copy_gc */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
225 NULL, /* flush_gc */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
226 NULL, /* free_gc */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
227 NULL, /* create_font */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
228 NULL, /* free_font */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
229 XiGMiscCloseDisplay, /* close_display */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
230 NULL, /* wire_to_event */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
231 NULL, /* event_to_wire */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
232 NULL, /* error */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
233 NULL, /* error_string */ |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
234 }; |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
235 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
236 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
237 static |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
238 XEXT_GENERATE_CLOSE_DISPLAY(XiGMiscCloseDisplay, xigmisc_info) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
239 static XEXT_GENERATE_FIND_DISPLAY(XiGMiscFindDisplay, xigmisc_info, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
240 xigmisc_extension_name, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
241 &xigmisc_extension_hooks, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
242 XiGMiscNumberEvents, NULL) |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
243 /*****************************************************************************/ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
244 Bool XiGMiscQueryVersion(Display * dpy, int *major, int *minor) |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
245 { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
246 int opcode, event, error; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
247 xXiGMiscQueryVersionReq *req; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
248 xXiGMiscQueryVersionReply rep; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
249 XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
250 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
251 if (!XQueryExtension(dpy, XIGMISC_PROTOCOL_NAME, &opcode, &event, &error)) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
252 return xFalse; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
253 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
254 XiGMiscCheckExtension(dpy, info, xFalse); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
255 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
256 LockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
257 XiGMiscGetReq(XiGMiscQueryVersion, req, info); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
258 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
259 req->major = XIGMISC_MAJOR_VERSION; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
260 req->minor = XIGMISC_MINOR_VERSION; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
261 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
262 if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
263 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
264 SyncHandle(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
265 return xFalse; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
266 } |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
267 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
268 *major = rep.major; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
269 *minor = rep.minor; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
270 UnlockDisplay(dpy); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
271 SyncHandle(); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
272 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
273 return xTrue; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
274 } |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
275 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
276 int |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
277 XiGMiscQueryViews(Display * dpy, int screen, XiGMiscViewInfo ** pviews) |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
278 { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
279 int n, size; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
280 XiGMiscViewInfo *views; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
281 xXiGMiscQueryViewsReq *req; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
282 xXiGMiscQueryViewsReply rep; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
283 XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
284 XiGMiscCheckExtension(dpy, info, 0); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
285 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
286 LockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
287 XiGMiscGetReq(XiGMiscQueryViews, req, info); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
288 req->screen = screen; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
289 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
290 if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
291 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
292 SyncHandle(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
293 return 0; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
294 } |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
295 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
296 n = rep.nviews; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
297 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
298 if (n > 0) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
299 size = sizeof(XiGMiscViewInfo) * n; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
300 views = (XiGMiscViewInfo *) Xmalloc(size); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
301 if (!views) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
302 _XEatData(dpy, (unsigned long) size); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
303 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
304 SyncHandle(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
305 return 0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
306 } |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
307 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
308 _XReadPad(dpy, (void *) views, size); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
309 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
310 *pviews = views; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
311 } |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
312 |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
313 UnlockDisplay(dpy); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
314 SyncHandle(); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
315 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
316 return n; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
317 } |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
318 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
319 int |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
320 XiGMiscQueryResolutions(Display * dpy, int screen, int view, int *pactive, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
321 XiGMiscResolutionInfo ** presolutions) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
322 { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
323 int n, size; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
324 XiGMiscResolutionInfo *resolutions; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
325 xXiGMiscQueryResolutionsReq *req; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
326 xXiGMiscQueryResolutionsReply rep; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
327 XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
328 XiGMiscCheckExtension(dpy, info, 0); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
329 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
330 LockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
331 XiGMiscGetReq(XiGMiscQueryResolutions, req, info); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
332 req->screen = screen; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
333 req->view = view; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
334 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
335 if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
336 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
337 SyncHandle(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
338 return 0; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
339 } |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
340 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
341 n = rep.nresolutions; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
342 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
343 if (n > 0) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
344 size = sizeof(XiGMiscResolutionInfo) * n; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
345 resolutions = (XiGMiscResolutionInfo *) Xmalloc(size); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
346 if (!resolutions) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
347 _XEatData(dpy, (unsigned long) size); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
348 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
349 SyncHandle(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
350 return 0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
351 } |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
352 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
353 _XReadPad(dpy, (void *) resolutions, size); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
354 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
355 *presolutions = resolutions; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
356 *pactive = rep.active; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
357 } |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
358 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
359 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
360 SyncHandle(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
361 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
362 return n; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
363 } |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
364 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
365 void |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
366 XiGMiscChangeResolution(Display * dpy, int screen, int view, int width, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
367 int height, int refresh) |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
368 { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
369 xXiGMiscChangeResolutionReq *req; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
370 XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
371 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
372 XiGMiscSimpleCheckExtension(dpy, info); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
373 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
374 LockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
375 XiGMiscGetReq(XiGMiscChangeResolution, req, info); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
376 req->screen = screen; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
377 req->view = view; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
378 req->width = width; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
379 req->height = height; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
380 req->refresh = refresh; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
381 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
382 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
383 SyncHandle(); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
384 } |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
385 |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
386 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
387 Bool |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
388 XiGMiscFullScreen(Display * dpy, int screen, XID window, XID cmap) |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
389 { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
390 xXiGMiscFullScreenReq *req; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
391 xXiGMiscFullScreenReply rep; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
392 XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
393 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
394 XiGMiscCheckExtension(dpy, info, xFalse); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
395 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
396 LockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
397 XiGMiscGetReq(XiGMiscFullScreen, req, info); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
398 req->screen = screen; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
399 req->pad0 = 0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
400 req->pad1 = 0; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
401 req->window = window; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
402 req->cmap = cmap; |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
403 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
404 if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
405 UnlockDisplay(dpy); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
406 SyncHandle(); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
407 return xFalse; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
408 } |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
409 |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
410 UnlockDisplay(dpy); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
411 SyncHandle(); |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
412 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
413 return (rep.success ? xTrue : xFalse); |
1242
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
414 } |
caf0328c8058
Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff
changeset
|
415 |
2063
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
416 /* SDL addition from Ryan: free memory used by xme. */ |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
417 void |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
418 XiGMiscDestroy(void) |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
419 { |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
420 if (xigmisc_info) { |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
421 XextDestroyExtension(xigmisc_info); |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
422 xigmisc_info = NULL; |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
423 } |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
424 } |
dea73e1d07b0
Merged Ryan's fix, in case we need it later.
Sam Lantinga <slouken@libsdl.org>
parents:
1895
diff
changeset
|
425 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1599
diff
changeset
|
426 /* vi: set ts=4 sw=4 expandtab: */ |