VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/guiddef.h

最後變更 在這個檔案是 53206,由 vboxsync 提交於 10 年 前

Devices/vmsvga: header fixes

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 5.2 KB
 
1/*
2 * Copyright (C) 2000 Alexandre Julliard
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19/*
20 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef GUID_DEFINED
29#define GUID_DEFINED
30
31#ifdef __WIDL__
32typedef struct
33{
34 unsigned long Data1;
35 unsigned short Data2;
36 unsigned short Data3;
37 byte Data4[ 8 ];
38} GUID;
39#else
40typedef struct _GUID
41{
42#ifdef _MSC_VER
43 unsigned long Data1;
44#else
45 unsigned int Data1;
46#endif
47 unsigned short Data2;
48 unsigned short Data3;
49 unsigned char Data4[ 8 ];
50} GUID;
51#endif
52
53/* Macros for __uuidof emulation */
54#if defined(__cplusplus) && !defined(_MSC_VER)
55
56extern "C++" {
57 template<typename T> const GUID &__wine_uuidof();
58}
59
60#define __CRT_UUID_DECL(type,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
61 extern "C++" { \
62 template<> inline const GUID &__wine_uuidof<type>() { \
63 static const IID __uuid_inst = {l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8}}; \
64 return __uuid_inst; \
65 } \
66 template<> inline const GUID &__wine_uuidof<type*>() { \
67 return __wine_uuidof<type>(); \
68 } \
69 }
70
71#define __uuidof(type) __wine_uuidof<typeof(type)>()
72
73#else
74
75#define __CRT_UUID_DECL(type,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
76
77#endif
78
79#endif
80
81#undef DEFINE_GUID
82
83#ifdef INITGUID
84#ifdef __cplusplus
85#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
86 EXTERN_C const GUID name DECLSPEC_HIDDEN; \
87 EXTERN_C const GUID name = \
88 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
89#else
90#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
91 const GUID name DECLSPEC_HIDDEN; \
92 const GUID name = \
93 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
94#endif
95#else
96#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
97 EXTERN_C const GUID name DECLSPEC_HIDDEN
98#endif
99
100#define DEFINE_OLEGUID(name, l, w1, w2) \
101 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
102
103#ifndef _GUIDDEF_H_
104#define _GUIDDEF_H_
105
106#ifndef __LPGUID_DEFINED__
107#define __LPGUID_DEFINED__
108typedef GUID *LPGUID;
109#endif
110
111#ifndef __LPCGUID_DEFINED__
112#define __LPCGUID_DEFINED__
113typedef const GUID *LPCGUID;
114#endif
115
116#ifndef __IID_DEFINED__
117#define __IID_DEFINED__
118
119typedef GUID IID,*LPIID;
120typedef GUID CLSID,*LPCLSID;
121typedef GUID FMTID,*LPFMTID;
122#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
123#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
124#define IsEqualFMTID(rfmtid1, rfmtid2) IsEqualGUID(rfmtid1, rfmtid2)
125#define IID_NULL GUID_NULL
126#define CLSID_NULL GUID_NULL
127#define FMTID_NULL GUID_NULL
128
129#ifdef __midl_proxy
130#define __MIDL_CONST
131#else
132#define __MIDL_CONST const
133#endif
134
135#endif /* ndef __IID_DEFINED__ */
136
137#ifdef __cplusplus
138#define REFGUID const GUID &
139#define REFCLSID const CLSID &
140#define REFIID const IID &
141#define REFFMTID const FMTID &
142#else /* !defined(__cplusplus) && !defined(CINTERFACE) */
143#define REFGUID const GUID* __MIDL_CONST
144#define REFCLSID const CLSID* __MIDL_CONST
145#define REFIID const IID* __MIDL_CONST
146#define REFFMTID const FMTID* __MIDL_CONST
147#endif /* !defined(__cplusplus) && !defined(CINTERFACE) */
148
149#if defined(__cplusplus) && !defined(CINTERFACE)
150#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
151#else /* defined(__cplusplus) && !defined(CINTERFACE) */
152#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
153#endif /* defined(__cplusplus) && !defined(CINTERFACE) */
154
155#if defined(__cplusplus) && !defined(CINTERFACE)
156#include <string.h>
157inline bool operator==(const GUID& guidOne, const GUID& guidOther)
158{
159 return !memcmp(&guidOne,&guidOther,sizeof(GUID));
160}
161inline bool operator!=(const GUID& guidOne, const GUID& guidOther)
162{
163 return !(guidOne == guidOther);
164}
165#endif
166
167extern const IID GUID_NULL;
168
169#endif /* _GUIDDEF_H_ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette