annotate src/video/Xext/XME/xme.c @ 1856:21f13c787b46

Date: Mon, 22 May 2006 01:16:47 -0400 From: Mike Frysinger Subject: [SDL] [patch] fix sed expression in sdl-config just noticed that sdl-config uses '[a-z]' with sed in sdl-config without forcing the locale to C ... this could cause problems with locales where the letter 'z' is not the last letter in the alphabet
author Sam Lantinga <slouken@libsdl.org>
date Tue, 23 May 2006 15:07:56 +0000
parents ecba4bbaf9c2
children 782fd950bd46 c121d94672cb a10bddfdc40f
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
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 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
53 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
54 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
55 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
56 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
57 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
58 } 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
59
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 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
61 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
62 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
63 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
64 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
65 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
66 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
67 } 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
68
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 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
70 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
71 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
72 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
73 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
74 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
75 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
76 } 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
77
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 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
79 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
80 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
81 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
82 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
83 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
84 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
85 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
86 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
87 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
88 } 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
89
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 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
91 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
92 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
93 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
94 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
95 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
96 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
97 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
98 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
99 } 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
100
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 /*******************************************************************/
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 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
104 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
105 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
106 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
107 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
108 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
109 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
110 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
111 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
112 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
113 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
114 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
115 } 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
116
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 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
118 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
119 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
120 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
121 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
122 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
123 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
124 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
125 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
126 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
127 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
128 } 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
129
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 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
131 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
132 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
133 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
134 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
135 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
136 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
137 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
138 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
139 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
140 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
141 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
142 } 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
143
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 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
145 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
146 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
147 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
148 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
149 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
150 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
151 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
152 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
153 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
154 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
155 } 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
156
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 /*******************************************************************/
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 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
160 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
161 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
162 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
163 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
164 } 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
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 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
167 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
168 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
169 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
170 } 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
171
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
172 /*****************************************************************************/
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 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
175 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
176
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 #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
178 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
179 #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
180 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
181
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 #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
183 #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
184 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
185 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
186
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 #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
188 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
189 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
190 #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
191 #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
192 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
193 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
194 #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
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 #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
198
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
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 * 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
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 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
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 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
207 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
208 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
209 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
210 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
211 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
212 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
213 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
214 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
215 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
216 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
217 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
218 };
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
219
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
220
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 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
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_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
224 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
225 &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
226
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
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 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
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 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
233 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
234 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
235 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
236
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
237 if (!XQueryExtension(dpy, XIGMISC_PROTOCOL_NAME, &opcode, &event, &error))
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 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
239
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 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
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 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
243 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
244
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 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
246 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
247
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
248 if (!_XReply (dpy, (xReply *)&rep, 0, 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
249 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
250 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
251 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
252 }
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
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 *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
255 *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
256 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
257 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
258
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 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
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
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 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
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 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
265 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
266 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
267 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
268 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
269 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
270
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 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
272 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
273 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
274
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
275 if (!_XReply (dpy, (xReply *)&rep, 0, 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
276 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
277 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
278 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
279 }
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
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 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
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 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
284 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
285 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
286 if (!views) {
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
287 _XEatData(dpy, (unsigned long)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
288 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
289 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
290 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
291 }
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
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
293 _XReadPad(dpy, (void*)views, size);
1242
caf0328c8058 Add XME hooks to X11 driver instead of relying on libxme...libxme hasn't
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
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 *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
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
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 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
299 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
300
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 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
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
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 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
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 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
307 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
308 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
309 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
310 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
311 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
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 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
314 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
315 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
316 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
317
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
318 if (!_XReply (dpy, (xReply *)&rep, 0, 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
319 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
320 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
321 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
322 }
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
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 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
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 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
327 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
328 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
329 if (!resolutions) {
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
330 _XEatData(dpy, (unsigned long)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
331 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
332 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
333 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
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
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
336 _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
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 *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
339 *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
340 }
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
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 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
343 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
344
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 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
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
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 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
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 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
351 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
352
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 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
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 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
356 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
357 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
358 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
359 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
360 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
361 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
362
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 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
364 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
365 }
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
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 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
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 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
371 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
372 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
373
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 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
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 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
377 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
378 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
379 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
380 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
381 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
382 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
383
1575
3ba88cb7eb1b Updated dynamic X11 code. See details in Bugzilla #170.
Ryan C. Gordon <icculus@icculus.org>
parents: 1384
diff changeset
384 if (!_XReply (dpy, (xReply *)&rep, 0, 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
385 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
386 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
387 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
388 }
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
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 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
391 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
392
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 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
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