VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/shaderlib/wine/include/propvarutil.h@ 96080

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

Devices/vmsvga: header fixes

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.5 KB
 
1/*
2 * Copyright 2008 James Hawkins for CodeWeavers
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 __WINE_PROPVARUTIL_H
29#define __WINE_PROPVARUTIL_H
30
31#include <shtypes.h>
32#include <shlwapi.h>
33
34enum tagPROPVAR_CHANGE_FLAGS
35{
36 PVCHF_DEFAULT = 0x00000000,
37 PVCHF_NOVALUEPROP = 0x00000001,
38 PVCHF_ALPHABOOL = 0x00000002,
39 PVCHF_NOUSEROVERRIDE = 0x00000004,
40 PVCHF_LOCALBOOL = 0x00000008,
41 PVCHF_NOHEXSTRING = 0x00000010,
42};
43
44typedef int PROPVAR_CHANGE_FLAGS;
45
46enum tagPROPVAR_COMPARE_UNIT
47{
48 PVCU_DEFAULT = 0x00000000,
49 PVCU_SECOND = 0x00000001,
50 PVCU_MINUTE = 0x00000002,
51 PVCU_HOUR = 0x00000003,
52 PVCU_DAY = 0x00000004,
53 PVCU_MONTH = 0x00000005,
54 PVCU_YEAR = 0x00000006,
55};
56
57typedef int PROPVAR_COMPARE_UNIT;
58
59enum tagPROPVAR_COMPARE_FLAGS
60{
61 PVCF_DEFAULT = 0x00000000,
62 PVCF_TREATEMPTYASGREATERTHAN = 0x00000001,
63 PVCF_USESTRCMP = 0x00000002,
64 PVCF_USESTRCMPC = 0x00000004,
65 PVCF_USESTRCMPI = 0x00000008,
66 PVCF_USESTRCMPIC = 0x00000010,
67};
68
69typedef int PROPVAR_COMPARE_FLAGS;
70
71HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc,
72 PROPVAR_CHANGE_FLAGS flags, VARTYPE vt);
73HRESULT WINAPI InitPropVariantFromGUIDAsString(REFGUID guid, PROPVARIANT *ppropvar);
74HRESULT WINAPI InitVariantFromGUIDAsString(REFGUID guid, VARIANT *pvar);
75HRESULT WINAPI InitPropVariantFromBuffer(const VOID *pv, UINT cb, PROPVARIANT *ppropvar);
76HRESULT WINAPI InitVariantFromBuffer(const VOID *pv, UINT cb, VARIANT *pvar);
77HRESULT WINAPI PropVariantToGUID(const PROPVARIANT *ppropvar, GUID *guid);
78HRESULT WINAPI VariantToGUID(const VARIANT *pvar, GUID *guid);
79INT WINAPI PropVariantCompareEx(REFPROPVARIANT propvar1, REFPROPVARIANT propvar2,
80 PROPVAR_COMPARE_UNIT uint, PROPVAR_COMPARE_FLAGS flags);
81
82HRESULT WINAPI PropVariantToInt16(REFPROPVARIANT propvarIn, SHORT *ret);
83HRESULT WINAPI PropVariantToInt32(REFPROPVARIANT propvarIn, LONG *ret);
84HRESULT WINAPI PropVariantToInt64(REFPROPVARIANT propvarIn, LONGLONG *ret);
85HRESULT WINAPI PropVariantToUInt16(REFPROPVARIANT propvarIn, USHORT *ret);
86HRESULT WINAPI PropVariantToUInt32(REFPROPVARIANT propvarIn, ULONG *ret);
87HRESULT WINAPI PropVariantToUInt64(REFPROPVARIANT propvarIn, ULONGLONG *ret);
88
89#ifdef __cplusplus
90
91HRESULT InitPropVariantFromBoolean(BOOL fVal, PROPVARIANT *ppropvar);
92HRESULT InitPropVariantFromString(PCWSTR psz, PROPVARIANT *ppropvar);
93HRESULT InitPropVariantFromInt64(LONGLONG llVal, PROPVARIANT *ppropvar);
94
95#ifndef NO_PROPVAR_INLINES
96
97inline HRESULT InitPropVariantFromBoolean(BOOL fVal, PROPVARIANT *ppropvar)
98{
99 ppropvar->vt = VT_BOOL;
100 ppropvar->boolVal = fVal ? VARIANT_TRUE : VARIANT_FALSE;
101 return S_OK;
102}
103
104inline HRESULT InitPropVariantFromString(PCWSTR psz, PROPVARIANT *ppropvar)
105{
106 HRESULT hres;
107
108 hres = SHStrDupW(psz, &ppropvar->pwszVal);
109 if(SUCCEEDED(hres))
110 ppropvar->vt = VT_LPWSTR;
111 else
112 PropVariantInit(ppropvar);
113
114 return hres;
115}
116
117inline HRESULT InitPropVariantFromInt64(LONGLONG llVal, PROPVARIANT *ppropvar)
118{
119 ppropvar->vt = VT_I8;
120 ppropvar->hVal.QuadPart = llVal;
121 return S_OK;
122}
123
124#endif
125#endif
126
127#endif /* __WINE_PROPVARUTIL_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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