wined3d: Verify each state table entry has either a handler or a representative.
[wine.git] / include / propkeydef.h
blobb3a25592d70fd084926df53a99f9fdfc22d32202
1 /*
2 * Copyright (C) 2009 Maarten Lankhorst
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.
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.
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
19 #ifndef PID_FIRST_USABLE
20 #define PID_FIRST_USABLE 2
21 #endif
23 #ifndef REFPROPERTYKEY
24 #ifdef __cplusplus
25 #define REFPROPERTYKEY const PROPERTYKEY &
26 #else /*!__cplusplus*/
27 #define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST
28 #endif
29 #endif
31 #undef DEFINE_PROPERTYKEY
33 #ifdef INITGUID
34 #ifdef __cplusplus
35 #define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
36 EXTERN_C const PROPERTYKEY name DECLSPEC_HIDDEN DECLSPEC_SELECTANY; \
37 EXTERN_C const PROPERTYKEY name = \
38 { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
39 #else
40 #define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
41 const PROPERTYKEY name DECLSPEC_HIDDEN DECLSPEC_SELECTANY; \
42 const PROPERTYKEY name = \
43 { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
44 #endif
45 #else
46 #define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
47 EXTERN_C const PROPERTYKEY name DECLSPEC_HIDDEN DECLSPEC_SELECTANY
48 #endif
50 #ifndef IsEqualPropertyKey
51 #ifdef __cplusplus
52 #define IsEqualPropertyKey(a,b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid,(b).fmtid))
53 #else
54 #define IsEqualPropertyKey(a,b) (((a).pid == (b).pid) && IsEqualIID(&(a).fmtid,&(b).fmtid))
55 #endif
56 #endif
58 #ifndef _PROPERTYKEY_EQUALITY_OPERATORS_
59 #define _PROPERTYKEY_EQUALITY_OPERATORS_
60 #ifdef __cplusplus
61 inline bool operator==(REFPROPERTYKEY guidOne, REFPROPERTYKEY guidOther)
63 return IsEqualPropertyKey(guidOne, guidTwo);
65 inline bool operator!=(REFPROPERTYKEY guidOne, REFPROPERTYKEY guidOther)
67 return !(guidOne == guidOther);
69 #endif
70 #endif