annotate src/video/Xext/XME/xme.c @ 1384:6fd39b50dd91

build fixes for IRIX 6.5 - dynamic X11 loading works! :)
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Feb 2006 08:49:00 +0000
parents 19418e4422cb
children 3ba88cb7eb1b
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
1384
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1361
diff changeset
17 #include "../../x11/SDL_x11dyn.h"
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1361
diff changeset
18
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1361
diff changeset
19 /*#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
20 #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
21 #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
22 #include <X11/Xproto.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
23 #include <X11/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
24 #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
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
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 #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
30 #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
31 #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
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 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
34
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_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
36 #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
37 #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
38 #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
39 #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
40
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_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
42 #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
43 #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
44 #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
45 #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
46
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_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
48 #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
49 #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
50 #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
51
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 /*******************************************************************/
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
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 typedef struct {
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 CARD8 reqType; /* always 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
56 CARD8 xigmiscReqType; /* always X_XiGMiscQueryVersion */
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
57 CARD16 length;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
58 CARD16 major;
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 CARD16 minor;
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 } 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
61
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
62 typedef struct {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
63 CARD8 reqType; /* always 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
64 CARD8 xigmiscReqType; /* always X_XiGMiscQueryViews */
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 CARD16 length;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
66 CARD8 screen;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
67 CARD8 pad0;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
68 CARD16 pad1;
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
71 typedef struct {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
72 CARD8 reqType; /* always 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
73 CARD8 xigmiscReqType; /* always X_XiGMiscQueryResolutions */
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 CARD16 length;
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 CARD8 screen;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
76 CARD8 view;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
77 CARD16 pad0;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
78 } 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
79
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 typedef struct {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
81 CARD8 reqType; /* always 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
82 CARD8 xigmiscReqType; /* always X_XiGMiscChangeResolution */
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
83 CARD16 length;
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 CARD8 screen;
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 CARD8 view;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
86 CARD16 pad0;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
87 CARD16 width;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
88 CARD16 height;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
89 INT32 refresh;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
90 } 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
91
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 typedef struct {
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 CARD8 reqType; /* always 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
94 CARD8 xigmiscReqType; /* always X_XiGMiscFullScreen */
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
95 CARD16 length;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
96 CARD8 screen;
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 CARD8 pad0;
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 CARD16 pad1;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
99 CARD32 window;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
100 CARD32 cmap;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
101 } 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
102
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
103 /*******************************************************************/
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
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 typedef struct {
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 BYTE type; /* X_Reply */
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 CARD8 pad0;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
108 CARD16 sequenceNumber;
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 CARD32 length;
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 CARD16 major;
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 CARD16 minor;
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 CARD32 pad1;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
113 CARD32 pad2;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
114 CARD32 pad3;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
115 CARD32 pad4;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
116 CARD32 pad5;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
117 } 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
118
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
119 typedef struct {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
120 BYTE type; /* X_Reply */
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 CARD8 pad0;
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 CARD16 sequenceNumber;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
123 CARD32 length;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
124 CARD32 nviews;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
125 CARD32 pad1;
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 CARD32 pad2;
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 CARD32 pad3;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
128 CARD32 pad4;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
129 CARD32 pad5;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
130 } 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
131
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
132 typedef struct {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
133 BYTE type; /* X_Reply */
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
134 CARD8 pad0;
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 CARD16 sequenceNumber;
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 CARD32 length;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
137 CARD16 active;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
138 CARD16 nresolutions;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
139 CARD32 pad1;
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 CARD32 pad2;
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 CARD32 pad3;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
142 CARD32 pad4;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
143 CARD32 pad5;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
144 } 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
145
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
146 typedef struct {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
147 BYTE type; /* X_Reply */
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
148 BOOL success;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
149 CARD16 sequenceNumber;
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 CARD32 length;
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 CARD32 pad1;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
152 CARD32 pad2;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
153 CARD32 pad3;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
154 CARD32 pad4;
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 CARD32 pad5;
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 CARD32 pad6;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
157 } 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
158
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
159 /*******************************************************************/
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
160
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
161 typedef struct {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
162 INT16 x;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
163 INT16 y;
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 CARD16 w;
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 CARD16 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
166 } 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
167
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
168 typedef struct {
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 CARD16 width;
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 CARD16 height;
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 INT32 refresh;
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 } 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
173
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 /*****************************************************************************/
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
176 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
177 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
178
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 #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
180 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
181 #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
182 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
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 #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
185 #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
186 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
187 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
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 #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
190 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
191 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
192 #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
193 #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
194 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
195 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
196 #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
197 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
198 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
199 #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
200
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
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 /*
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 * 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
205 */
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 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
207
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 static XExtensionHooks xigmisc_extension_hooks = {
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 NULL, /* create_gc */
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 NULL, /* copy_gc */
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 NULL, /* flush_gc */
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 NULL, /* free_gc */
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 NULL, /* create_font */
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 NULL, /* free_font */
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 XiGMiscCloseDisplay, /* close_display */
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 NULL, /* wire_to_event */
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 NULL, /* event_to_wire */
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 NULL, /* error */
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 NULL, /* error_string */
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 };
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
223 static XEXT_GENERATE_CLOSE_DISPLAY (XiGMiscCloseDisplay, xigmisc_info)
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
224
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
225 static XEXT_GENERATE_FIND_DISPLAY (XiGMiscFindDisplay, xigmisc_info,
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
226 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
227 &xigmisc_extension_hooks, XiGMiscNumberEvents, 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
228
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
232 Bool XiGMiscQueryVersion(Display *dpy, int *major, int *minor)
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
233 {
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 int opcode, event, error;
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 xXiGMiscQueryVersionReq *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
236 xXiGMiscQueryVersionReply rep;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
237 XExtDisplayInfo *info = XiGMiscFindDisplay(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
238
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
239 if (!pXQueryExtension(dpy, XIGMISC_PROTOCOL_NAME, &opcode, &event, &error))
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
240 return xFalse;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
241
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
242 XiGMiscCheckExtension(dpy, info, xFalse);
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
244 LockDisplay (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
245 XiGMiscGetReq (XiGMiscQueryVersion, req, info);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
246
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
247 req->major = XIGMISC_MAJOR_VERSION;
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 req->minor = XIGMISC_MINOR_VERSION;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
249
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 if (!p_XReply (dpy, (xReply *)&rep, 0, xTrue)) {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
251 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
252 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
253 return xFalse;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
254 }
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
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 *major = rep.major;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
257 *minor = rep.minor;
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 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
259 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
260
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 return xTrue;
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 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
263
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
264 int XiGMiscQueryViews(Display *dpy, int screen, XiGMiscViewInfo **pviews)
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
265 {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
266 int n, size;
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 XiGMiscViewInfo *views;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
268 xXiGMiscQueryViewsReq *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
269 xXiGMiscQueryViewsReply rep;
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 XExtDisplayInfo *info = XiGMiscFindDisplay(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 XiGMiscCheckExtension(dpy, info, 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
272
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 LockDisplay (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
274 XiGMiscGetReq (XiGMiscQueryViews, req, info);
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 req->screen = screen;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
276
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
277 if (!p_XReply (dpy, (xReply *)&rep, 0, xFalse)) {
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 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
279 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
280 return 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
281 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
282
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
283 n = rep.nviews;
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
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 if (n > 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
286 size = sizeof(XiGMiscViewInfo) * n;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
287 views = (XiGMiscViewInfo*)Xmalloc(size);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
288 if (!views) {
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 p_XEatData(dpy, (unsigned long)size);
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 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
291 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
292 return 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
293 }
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 p_XReadPad(dpy, (void*)views, size);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
296
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 *pviews = views;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
298 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
299
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
300 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
301 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
302
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
303 return n;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
304 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
305
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
306 int XiGMiscQueryResolutions(Display *dpy, int screen, int view, int *pactive, XiGMiscResolutionInfo **presolutions)
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 {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
308 int n, size;
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 XiGMiscResolutionInfo *resolutions;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
310 xXiGMiscQueryResolutionsReq *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
311 xXiGMiscQueryResolutionsReply rep;
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 XExtDisplayInfo *info = XiGMiscFindDisplay(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
313 XiGMiscCheckExtension(dpy, info, 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
314
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 LockDisplay (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
316 XiGMiscGetReq (XiGMiscQueryResolutions, req, info);
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 req->screen = screen;
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 req->view = view;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
319
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
320 if (!p_XReply (dpy, (xReply *)&rep, 0, xFalse)) {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
321 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
322 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
323 return 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
324 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
325
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
326 n = rep.nresolutions;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
327
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
328 if (n > 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
329 size = sizeof(XiGMiscResolutionInfo) * n;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
330 resolutions = (XiGMiscResolutionInfo*)Xmalloc(size);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
331 if (!resolutions) {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
332 p_XEatData(dpy, (unsigned long)size);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
333 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
334 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
335 return 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
336 }
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
338 p_XReadPad(dpy, (void*)resolutions, size);
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 *presolutions = resolutions;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
341 *pactive = rep.active;
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 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
343
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
344 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
345 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
346
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 return n;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
348 }
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
350 void XiGMiscChangeResolution(Display *dpy, int screen, int view, int width, int height, int refresh)
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
351 {
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 xXiGMiscChangeResolutionReq *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
353 XExtDisplayInfo *info = XiGMiscFindDisplay(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
354
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
355 XiGMiscSimpleCheckExtension(dpy, info);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
356
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
357 LockDisplay (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
358 XiGMiscGetReq (XiGMiscChangeResolution, req, info);
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 req->screen = screen;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
360 req->view = view;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
361 req->width = width;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
362 req->height = height;
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 req->refresh = refresh;
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
365 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
366 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
367 }
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
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
369
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
370 Bool XiGMiscFullScreen(Display *dpy, int screen, XID window, XID cmap)
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 {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
372 xXiGMiscFullScreenReq *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
373 xXiGMiscFullScreenReply rep;
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
374 XExtDisplayInfo *info = XiGMiscFindDisplay(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
375
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 XiGMiscCheckExtension(dpy, info, xFalse);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
377
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
378 LockDisplay (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
379 XiGMiscGetReq (XiGMiscFullScreen, req, info);
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 req->screen = screen;
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 req->pad0 = 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
382 req->pad1 = 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
383 req->window = window;
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 req->cmap = cmap;
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 if (!p_XReply (dpy, (xReply *)&rep, 0, xTrue)) {
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
387 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
388 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
389 return xFalse;
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 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
391
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
392 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
393 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
394
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 return (rep.success ? xTrue : xFalse);
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
396 }
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
397