Git init
[framework/uifw/xorg/lib/libsm.git] / include / X11 / SM / SMproto.h
1 /*
2
3 Copyright 1993, 1998  The Open Group
4
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
10
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
24
25 */
26
27 /*
28  * Author: Ralph Mor, X Consortium
29  */
30
31 #ifndef _SMPROTO_H_
32 #define _SMPROTO_H_
33
34 #include <X11/Xmd.h>
35
36 typedef struct {
37     CARD8       majorOpcode;
38     CARD8       minorOpcode;
39     CARD8       unused[2];
40     CARD32      length B32;
41     /* n        ARRAY8          previousId */
42 } smRegisterClientMsg;
43
44 typedef struct {
45     CARD8       majorOpcode;
46     CARD8       minorOpcode;
47     CARD8       unused[2];
48     CARD32      length B32;
49     /* n        ARRAY8          clientId */
50 } smRegisterClientReplyMsg;
51
52 typedef struct {
53     CARD8       majorOpcode;
54     CARD8       minorOpcode;
55     CARD8       unused1[2];
56     CARD32      length B32;
57     CARD8       saveType;
58     CARD8       shutdown;
59     CARD8       interactStyle;
60     CARD8       fast;
61     CARD8       unused2[4];
62 } smSaveYourselfMsg;
63
64 typedef struct {
65     CARD8       majorOpcode;
66     CARD8       minorOpcode;
67     CARD8       unused1[2];
68     CARD32      length B32;
69     CARD8       saveType;
70     CARD8       shutdown;
71     CARD8       interactStyle;
72     CARD8       fast;
73     CARD8       global;
74     CARD8       unused2[3];
75 } smSaveYourselfRequestMsg;
76
77 typedef struct {
78     CARD8       majorOpcode;
79     CARD8       minorOpcode;
80     CARD8       dialogType;
81     CARD8       unused;
82     CARD32      length B32;
83 } smInteractRequestMsg;
84
85 typedef struct {
86     CARD8       majorOpcode;
87     CARD8       minorOpcode;
88     CARD8       unused[2];
89     CARD32      length B32;
90 } smInteractMsg;
91
92 typedef struct {
93     CARD8       majorOpcode;
94     CARD8       minorOpcode;
95     CARD8       cancelShutdown;
96     CARD8       unused;
97     CARD32      length B32;
98 } smInteractDoneMsg;
99
100 typedef struct {
101     CARD8       majorOpcode;
102     CARD8       minorOpcode;
103     CARD8       success;
104     CARD8       unused;
105     CARD32      length B32;
106 } smSaveYourselfDoneMsg;
107
108 typedef struct {
109     CARD8       majorOpcode;
110     CARD8       minorOpcode;
111     CARD8       unused[2];
112     CARD32      length B32;
113 } smDieMsg;
114
115 typedef struct {
116     CARD8       majorOpcode;
117     CARD8       minorOpcode;
118     CARD8       unused[2];
119     CARD32      length B32;
120 } smShutdownCancelledMsg;
121
122 typedef struct {
123     CARD8       majorOpcode;
124     CARD8       minorOpcode;
125     CARD8       unused[2];
126     CARD32      length B32;
127     /* b        LISTofARRAY8    reasons */
128 } smCloseConnectionMsg;
129
130 typedef struct {
131     CARD8       majorOpcode;
132     CARD8       minorOpcode;
133     CARD8       unused[2];
134     CARD32      length B32;
135     /* a        LISTofPROPERTY  properties */
136 } smSetPropertiesMsg;
137
138 typedef struct {
139     CARD8       majorOpcode;
140     CARD8       minorOpcode;
141     CARD8       unused[2];
142     CARD32      length B32;
143     /* a        LISTofARRAY8    property names */
144 } smDeletePropertiesMsg;
145
146 typedef struct {
147     CARD8       majorOpcode;
148     CARD8       minorOpcode;
149     CARD8       unused[2];
150     CARD32      length B32;
151 } smGetPropertiesMsg;
152
153 typedef struct {
154     CARD8       majorOpcode;
155     CARD8       minorOpcode;
156     CARD8       unused[2];
157     CARD32      length B32;
158     /* a        LISTofPROPERTY  properties */
159 } smPropertiesReplyMsg;
160
161 typedef struct {
162     CARD8       majorOpcode;
163     CARD8       minorOpcode;
164     CARD8       unused[2];
165     CARD32      length B32;
166 } smSaveYourselfPhase2RequestMsg;
167
168 typedef struct {
169     CARD8       majorOpcode;
170     CARD8       minorOpcode;
171     CARD8       unused[2];
172     CARD32      length B32;
173 } smSaveYourselfPhase2Msg;
174
175 typedef struct {
176     CARD8       majorOpcode;
177     CARD8       minorOpcode;
178     CARD8       unused[2];
179     CARD32      length B32;
180 } smSaveCompleteMsg;
181
182
183 /*
184  * SIZEOF values.  These better be multiples of 8.
185  */
186
187 #define sz_smRegisterClientMsg                  8
188 #define sz_smRegisterClientReplyMsg             8
189 #define sz_smSaveYourselfMsg                    16
190 #define sz_smSaveYourselfRequestMsg             16
191 #define sz_smInteractRequestMsg                 8
192 #define sz_smInteractMsg                        8
193 #define sz_smInteractDoneMsg                    8
194 #define sz_smSaveYourselfDoneMsg                8
195 #define sz_smDieMsg                             8
196 #define sz_smShutdownCancelledMsg               8
197 #define sz_smCloseConnectionMsg                 8
198 #define sz_smSetPropertiesMsg                   8
199 #define sz_smDeletePropertiesMsg                8
200 #define sz_smGetPropertiesMsg                   8
201 #define sz_smPropertiesReplyMsg                 8
202 #define sz_smSaveYourselfPhase2RequestMsg       8
203 #define sz_smSaveYourselfPhase2Msg              8
204 #define sz_smSaveCompleteMsg                    8
205
206 #endif /* _SMPROTO_H_ */