annotate src/video/Xext/XME/xme.c @ 1668:4da1ee79c9af SDL-1.3

more tweaking indent options
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 04:04:35 +0000
parents 782fd950bd46
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
1599
ecba4bbaf9c2 More dynamic X11 mangling...should fix NetBSD builds. And hopefully doesn't
Ryan C. Gordon <icculus@icculus.org>
parents: 1575
diff changeset
17 #include <X11/Xlibint.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
18 #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
19 #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
20 #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
21 #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
22 #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
23
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 /*****************************************************************************/
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
26
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
27 #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
28 #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
29 #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
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 #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
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
33 #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
34 #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
35 #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
36 #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
37 #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
38
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 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
40 #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
41 #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
42 #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
43 #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
44
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_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
46 #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
47 #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
48 #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
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 /*******************************************************************/
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
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
52 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
53 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
54 CARD8 reqType; /* always codes->major_opcode */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
55 CARD8 xigmiscReqType; /* always X_XiGMiscQueryVersion */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
56 CARD16 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
57 CARD16 major;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
58 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
59 } 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
60
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
61 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
62 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
63 CARD8 reqType; /* always codes->major_opcode */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
64 CARD8 xigmiscReqType; /* always X_XiGMiscQueryViews */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
65 CARD16 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
66 CARD8 screen;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
67 CARD8 pad0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
68 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
69 } 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
70
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
71 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
72 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
73 CARD8 reqType; /* always codes->major_opcode */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
74 CARD8 xigmiscReqType; /* always X_XiGMiscQueryResolutions */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
75 CARD16 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
76 CARD8 screen;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
77 CARD8 view;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
78 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
79 } 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
80
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
81 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
82 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
83 CARD8 reqType; /* always codes->major_opcode */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
84 CARD8 xigmiscReqType; /* always X_XiGMiscChangeResolution */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
85 CARD16 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
86 CARD8 screen;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
87 CARD8 view;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
88 CARD16 pad0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
89 CARD16 width;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
90 CARD16 height;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
91 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
92 } 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
93
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
94 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
95 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
96 CARD8 reqType; /* always codes->major_opcode */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
97 CARD8 xigmiscReqType; /* always X_XiGMiscFullScreen */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
98 CARD16 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
99 CARD8 screen;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
100 CARD8 pad0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
101 CARD16 pad1;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
102 CARD32 window;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
103 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
104 } 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
105
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
106 /*******************************************************************/
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
107
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
108 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
109 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
110 BYTE type; /* X_Reply */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
111 CARD8 pad0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
112 CARD16 sequenceNumber;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
113 CARD32 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
114 CARD16 major;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
115 CARD16 minor;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
116 CARD32 pad1;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
117 CARD32 pad2;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
118 CARD32 pad3;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
119 CARD32 pad4;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
120 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
121 } 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
122
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
123 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
124 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
125 BYTE type; /* X_Reply */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
126 CARD8 pad0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
127 CARD16 sequenceNumber;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
128 CARD32 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
129 CARD32 nviews;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
130 CARD32 pad1;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
131 CARD32 pad2;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
132 CARD32 pad3;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
133 CARD32 pad4;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
134 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
135 } 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
136
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
137 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
138 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
139 BYTE type; /* X_Reply */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
140 CARD8 pad0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
141 CARD16 sequenceNumber;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
142 CARD32 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
143 CARD16 active;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
144 CARD16 nresolutions;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
145 CARD32 pad1;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
146 CARD32 pad2;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
147 CARD32 pad3;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
148 CARD32 pad4;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
149 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
150 } 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
151
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
152 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
153 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
154 BYTE type; /* X_Reply */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
155 BOOL success;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
156 CARD16 sequenceNumber;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
157 CARD32 length;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
158 CARD32 pad1;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
159 CARD32 pad2;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
160 CARD32 pad3;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
161 CARD32 pad4;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
162 CARD32 pad5;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
163 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
164 } 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
165
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
166 /*******************************************************************/
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
167
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
168 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
169 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
170 INT16 x;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
171 INT16 y;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
172 CARD16 w;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
173 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
174 } 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
175
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
176 typedef struct
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
177 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
178 CARD16 width;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
179 CARD16 height;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
180 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
181 } 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
182
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
183 /*****************************************************************************/
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
184
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
185 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
186 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
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 #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
189 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
190 #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
191 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
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 #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
194 #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
195 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
196 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
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 #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
199 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
200 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
201 #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
202 #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
203 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
204 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
205 #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
206 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
207 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
208 #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
209
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
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
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 /*
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 * 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
214 */
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
215 static int XiGMiscCloseDisplay();
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
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 static XExtensionHooks xigmisc_extension_hooks = {
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
218 NULL, /* create_gc */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
219 NULL, /* copy_gc */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
220 NULL, /* flush_gc */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
221 NULL, /* free_gc */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
222 NULL, /* create_font */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
223 NULL, /* free_font */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
224 XiGMiscCloseDisplay, /* close_display */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
225 NULL, /* wire_to_event */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
226 NULL, /* event_to_wire */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
227 NULL, /* error */
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
228 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
229 };
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
230
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
231
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
232 static
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
233 XEXT_GENERATE_CLOSE_DISPLAY(XiGMiscCloseDisplay, xigmisc_info)
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
234 static XEXT_GENERATE_FIND_DISPLAY(XiGMiscFindDisplay, xigmisc_info,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
235 xigmisc_extension_name,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
236 &xigmisc_extension_hooks,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
237 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
238 /*****************************************************************************/
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
239 Bool XiGMiscQueryVersion(Display * dpy, int *major, int *minor)
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
240 {
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
241 int opcode, event, error;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
242 xXiGMiscQueryVersionReq *req;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
243 xXiGMiscQueryVersionReply rep;
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
244 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
245
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
246 if (!XQueryExtension(dpy, XIGMISC_PROTOCOL_NAME, &opcode, &event, &error))
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
247 return 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
248
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
249 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
250
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
251 LockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
252 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
253
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
254 req->major = XIGMISC_MAJOR_VERSION;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
255 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
256
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
257 if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
258 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
259 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
260 return xFalse;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
261 }
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
262
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
263 *major = rep.major;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
264 *minor = rep.minor;
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
265 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
266 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
267
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
268 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
269 }
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
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
271 int
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
272 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
273 {
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
274 int n, size;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
275 XiGMiscViewInfo *views;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
276 xXiGMiscQueryViewsReq *req;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
277 xXiGMiscQueryViewsReply rep;
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
278 XExtDisplayInfo *info = XiGMiscFindDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
279 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
280
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
281 LockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
282 XiGMiscGetReq(XiGMiscQueryViews, req, info);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
283 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
284
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
285 if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
286 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
287 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
288 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
289 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
290
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
291 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
292
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
293 if (n > 0) {
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
294 size = sizeof(XiGMiscViewInfo) * n;
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
295 views = (XiGMiscViewInfo *) Xmalloc(size);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
296 if (!views) {
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
297 _XEatData(dpy, (unsigned long) size);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
298 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
299 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
300 return 0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
301 }
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
302
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
303 _XReadPad(dpy, (void *) views, size);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
304
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
305 *pviews = views;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
306 }
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
307
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
308 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
309 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
310
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
311 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
312 }
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
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
314 int
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
315 XiGMiscQueryResolutions(Display * dpy, int screen, int view, int *pactive,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
316 XiGMiscResolutionInfo ** presolutions)
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
317 {
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
318 int n, size;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
319 XiGMiscResolutionInfo *resolutions;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
320 xXiGMiscQueryResolutionsReq *req;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
321 xXiGMiscQueryResolutionsReply rep;
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
322 XExtDisplayInfo *info = XiGMiscFindDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
323 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
324
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
325 LockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
326 XiGMiscGetReq(XiGMiscQueryResolutions, req, info);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
327 req->screen = screen;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
328 req->view = view;
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
329
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
330 if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
331 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
332 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
333 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
334 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
335
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
336 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
337
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
338 if (n > 0) {
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
339 size = sizeof(XiGMiscResolutionInfo) * n;
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
340 resolutions = (XiGMiscResolutionInfo *) Xmalloc(size);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
341 if (!resolutions) {
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
342 _XEatData(dpy, (unsigned long) size);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
343 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
344 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
345 return 0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
346 }
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
347
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
348 _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
349
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
350 *presolutions = resolutions;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
351 *pactive = rep.active;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
352 }
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
353
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
354 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
355 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
356
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
357 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
358 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
359
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
360 void
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
361 XiGMiscChangeResolution(Display * dpy, int screen, int view, int width,
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
362 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
363 {
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
364 xXiGMiscChangeResolutionReq *req;
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
365 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
366
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
367 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
368
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
369 LockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
370 XiGMiscGetReq(XiGMiscChangeResolution, req, info);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
371 req->screen = screen;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
372 req->view = view;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
373 req->width = width;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
374 req->height = height;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
375 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
376
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
377 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
378 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
379 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
380
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
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
382 Bool
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
383 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
384 {
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
385 xXiGMiscFullScreenReq *req;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
386 xXiGMiscFullScreenReply rep;
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
387 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
388
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
389 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
390
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
391 LockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
392 XiGMiscGetReq(XiGMiscFullScreen, req, info);
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
393 req->screen = screen;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
394 req->pad0 = 0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
395 req->pad1 = 0;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
396 req->window = window;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
397 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
398
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
399 if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
400 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
401 SyncHandle();
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
402 return xFalse;
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
403 }
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
404
1668
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
405 UnlockDisplay(dpy);
4da1ee79c9af more tweaking indent options
Sam Lantinga <slouken@libsdl.org>
parents: 1662
diff changeset
406 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
407
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
408 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
409 }
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
1662
782fd950bd46 Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
Sam Lantinga <slouken@libsdl.org>
parents: 1599
diff changeset
411 /* vi: set ts=4 sw=4 expandtab: */