wined3d: Add separate alpha blend support.
[wine] / include / ndrtypes.h
1 /*
2  * NDR Types
3  *
4  * Copyright 2006 Robert Shearman (for CodeWeavers)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #ifndef __NDRTYPES_H__
22 #define __NDRTYPES_H__
23
24 #include <limits.h>
25
26 typedef struct
27 {
28     unsigned short MustSize : 1; /* 0x0001 - client interpreter MUST size this
29      *  parameter, other parameters may be skipped, using the value in
30      *  NDR_PROC_PARTIAL_OIF_HEADER::constant_client_buffer_size instead. */
31     unsigned short MustFree : 1; /* 0x0002 - server interpreter MUST size this
32      *  parameter, other parameters may be skipped, using the value in
33      *  NDR_PROC_PARTIAL_OIF_HEADER::constant_server_buffer_size instead. */
34     unsigned short IsPipe : 1; /* 0x0004 - The parameter is a pipe handle. See
35      *  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/pipes.asp
36      *  for more information on pipes. */
37     unsigned short IsIn : 1; /* 0x0008 - The parameter is an input */
38     unsigned short IsOut : 1; /* 0x0010 - The parameter is an output */
39     unsigned short IsReturn : 1; /* 0x0020 - The parameter is to be returned */
40     unsigned short IsBasetype : 1; /* 0x0040 - The parameter is simple and has the
41      *  format defined by NDR_PARAM_OIF_BASETYPE rather than by
42      *  NDR_PARAM_OIF_OTHER. */
43     unsigned short IsByValue : 1; /* 0x0080 - Set for compound types being sent by
44      *  value. Can be of type: structure, union, transmit_as, represent_as,
45      *  wire_marshal and SAFEARRAY. */
46     unsigned short IsSimpleRef : 1; /* 0x0100 - parameter that is a reference
47      *  pointer to anything other than another pointer, and which has no
48      *  allocate attributes. */
49     unsigned short IsDontCallFreeInst : 1; /*  0x0200 - Used for some represent_as types
50      *  for when the free instance routine should not be called. */
51     unsigned short SaveForAsyncFinish : 1; /* 0x0400 - Unknown */
52     unsigned short Unused : 2;
53     unsigned short ServerAllocSize : 3; /* 0xe000 - If non-zero
54      *  specifies the size of the object in numbers of 8byte blocks needed.
55      *  It will be stored on the server's stack rather than using an allocate
56      *  call. */
57 } PARAM_ATTRIBUTES;
58
59 typedef struct
60 {
61     unsigned char ServerMustSize : 1; /* 0x01 - the server must perform a
62      *  sizing pass. */
63     unsigned char ClientMustSize : 1; /* 0x02 - the client must perform a
64      *  sizing pass. */
65     unsigned char HasReturn : 1; /* 0x04 - procedure has a return value. */
66     unsigned char HasPipes : 1; /* 0x08 - the pipe package should be used. */
67     unsigned char Unused : 1; /* 0x10 - not used */
68     unsigned char HasAsyncUuid : 1; /* 0x20 - indicates an asynchronous DCOM
69      *  procedure. */
70     unsigned char HasExtensions : 1; /* 0x40 - indicates that Win2000
71      *  extensions are in use. */
72     unsigned char HasAsyncHandle : 1; /* 0x80 - indicates an asynchronous RPC
73      *  procedure. */
74 } INTERPRETER_OPT_FLAGS, *PINTERPRETER_OPT_FLAGS;
75
76 typedef struct
77 {
78     unsigned char HasNewCorrDesc : 1; /* 0x01 - indicates new correlation
79      *  descriptors in use. */
80     unsigned char ClientCorrCheck : 1; /* 0x02 - client needs correlation
81      *  check. */
82     unsigned char ServerCorrCheck : 1; /* 0x04 - server needs correlation
83      *  check. */
84     unsigned char HasNotify : 1; /* 0x08 - should call MIDL [notify]
85      *  routine @ NotifyIndex. */
86     unsigned char HasNotify2 : 1; /* 0x10 - should call MIDL [notify_flag] routine @ 
87      *  NotifyIndex. */
88     unsigned char Unused : 3;
89 } INTERPRETER_OPT_FLAGS2, *PINTERPRETER_OPT_FLAGS2;
90
91 /* Win2000 extensions */
92 typedef struct
93 {
94     /* size in bytes of all following extensions */
95     unsigned char Size;
96
97     INTERPRETER_OPT_FLAGS2 Flags2;
98
99     /* client cache size hint */
100     unsigned short ClientCorrHint;
101
102     /* server cache size hint */
103     unsigned short ServerCorrHint;
104
105     /* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
106      * HasNotify or HasNotify2 flag set */
107     unsigned short NotifyIndex;
108 } NDR_PROC_HEADER_EXTS;
109
110 typedef struct
111 {
112     /* size in bytes of all following extensions */
113     unsigned char Size;
114
115     INTERPRETER_OPT_FLAGS2 Flags2;
116
117     /* client cache size hint */
118     unsigned short ClientCorrHint;
119
120     /* server cache size hint */
121     unsigned short ServerCorrHint;
122
123     /* index of routine in MIDL_STUB_DESC::NotifyRoutineTable to call if
124      * HasNotify or HasNotify2 flag set */
125     unsigned short NotifyIndex;
126
127     /* needed only on IA64 to cope with float/register loading */
128     unsigned short FloatArgMask;
129 } NDR_PROC_HEADER_EXTS64;
130
131 typedef enum
132 {
133     FC_BYTE = 0x01, /* 0x01 */
134     FC_CHAR, /* 0x02 */
135     FC_SMALL, /* 0x03 */
136     FC_USMALL, /* 0x04 */
137     FC_WCHAR, /* 0x05 */
138     FC_SHORT, /* 0x06 */
139     FC_USHORT, /* 0x07 */
140     FC_LONG, /* 0x08 */
141     FC_ULONG, /* 0x09 */
142     FC_FLOAT, /* 0x0a */
143     FC_HYPER, /* 0x0b */
144     FC_DOUBLE, /* 0x0c */
145     FC_ENUM16, /* 0x0d */
146     FC_ENUM32, /* 0x0e */
147     FC_IGNORE, /* 0x0f */
148     FC_ERROR_STATUS_T, /* 0x10 */
149
150     FC_RP, /* 0x11 */ /* reference pointer */
151     FC_UP, /* 0x12 */ /* unique pointer */
152     FC_OP, /* 0x13 */ /* object pointer */
153     FC_FP, /* 0x14 */ /* full pointer */
154
155     FC_STRUCT, /* 0x15 */ /* simple structure */
156     FC_PSTRUCT, /* 0x16 */ /* simple structure w/ pointers */
157     FC_CSTRUCT, /* 0x17 */ /* conformant structure */
158     FC_CPSTRUCT, /* 0x18 */ /* conformant structure w/ pointers */
159     FC_CVSTRUCT, /* 0x19 */ /* conformant varying struct */
160     FC_BOGUS_STRUCT, /* 0x1a */ /* complex structure */
161
162     FC_CARRAY, /* 0x1b */ /* conformant array */
163     FC_CVARRAY, /* 0x1c */ /* conformant varying array */
164     FC_SMFARRAY, /* 0x1d */ /* small (<64K) fixed array */
165     FC_LGFARRAY, /* 0x1e */ /* large (>= 64k) fixed array */
166     FC_SMVARRAY, /* 0x1f */ /* small (<64k) varying array */
167     FC_LGVARRAY, /* 0x20 */ /* large (>= 64k) varying array */
168     FC_BOGUS_ARRAY, /* 0x21 */ /* complex array */
169 } FORMAT_CHARACTER;
170
171 /* flags for all handle types */
172 #define HANDLE_PARAM_IS_VIA_PTR 0x80
173 #define HANDLE_PARAM_IS_IN      0x40
174 #define HANDLE_PARAM_IS_OUT     0x20
175 #define HANDLE_PARAM_IS_RETURN  0x10
176
177 /* flags for context handles */
178 #define NDR_STRICT_CONTEXT_HANDLE           0x08
179 #define NDR_CONTEXT_HANDLE_NOSERIALIZE      0x04
180 #define NDR_CONTEXT_HANDLE_SERIALIZE        0x02
181 #define NDR_CONTEXT_HANDLE_CANNOT_BE_NULL   0x01
182
183 #endif