cmd: DIR command outputs free space for the path.
[wine.git] / include / xamlom.idl
blob60492fb4393273402af6d951d6d50fdfaf2361a3
1 /*
2 * Copyright (C) 2023 Biswapriyo Nath
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 import "oaidl.idl";
20 import "ocidl.idl";
21 import "inspectable.idl";
22 import "dxgi1_2.idl";
24 cpp_quote("#ifndef E_NOTFOUND")
25 cpp_quote("#define E_NOTFOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)")
26 cpp_quote("#endif")
27 cpp_quote("#define E_UNKNOWNTYPE _HRESULT_TYPEDEF_(0x802b0028)")
28 cpp_quote("HRESULT WINAPI InitializeXamlDiagnostic(PCWSTR, DWORD, PCWSTR, PCWSTR, CLSID);")
29 cpp_quote("HRESULT WINAPI InitializeXamlDiagnosticsEx(PCWSTR, DWORD, PCWSTR, PCWSTR, CLSID, PCWSTR);")
31 typedef unsigned hyper InstanceHandle;
33 typedef enum VisualMutationType
35 Add,
36 Remove
37 } VisualMutationType;
39 typedef enum BaseValueSource
41 BaseValueSourceUnknown,
42 BaseValueSourceDefault,
43 BaseValueSourceBuiltInStyle,
44 BaseValueSourceStyle,
45 BaseValueSourceLocal,
46 Inherited,
47 DefaultStyleTrigger,
48 TemplateTrigger,
49 StyleTrigger,
50 ImplicitStyleReference,
51 ParentTemplate,
52 ParentTemplateTrigger,
53 Animation,
54 Coercion,
55 BaseValueSourceVisualState
56 } BaseValueSource;
58 typedef struct SourceInfo
60 BSTR FileName;
61 unsigned int LineNumber;
62 unsigned int ColumnNumber;
63 unsigned int CharPosition;
64 BSTR Hash;
65 } SourceInfo;
67 typedef struct ParentChildRelation
69 InstanceHandle Parent;
70 InstanceHandle Child;
71 unsigned int ChildIndex;
72 } ParentChildRelation;
74 typedef struct VisualElement
76 InstanceHandle Handle;
77 SourceInfo SrcInfo;
78 BSTR Type;
79 BSTR Name;
80 unsigned int NumChildren;
81 } VisualElement;
83 typedef struct PropertyChainSource
85 InstanceHandle Handle;
86 BSTR TargetType;
87 BSTR Name;
88 BaseValueSource Source;
89 SourceInfo SrcInfo;
90 } PropertyChainSource;
92 typedef enum MetadataBit
94 None = 0x0,
95 IsValueHandle = 0x1,
96 IsPropertyReadOnly = 0x2,
97 IsValueCollection = 0x4,
98 IsValueCollectionReadOnly = 0x8,
99 IsValueBindingExpression = 0x10,
100 IsValueNull = 0x20,
101 IsValueHandleAndEvaluatedValue = 0x40,
102 } MetadataBit;
104 typedef struct PropertyChainValue
106 unsigned int Index;
107 BSTR Type;
108 BSTR DeclaringType;
109 BSTR ValueType;
110 BSTR ItemType;
111 BSTR Value;
112 BOOL Overridden;
113 hyper MetadataBits;
114 BSTR PropertyName;
115 unsigned int PropertyChainIndex;
116 } PropertyChainValue;
118 typedef struct EnumType
120 BSTR Name;
121 SAFEARRAY(int) ValueInts;
122 SAFEARRAY(BSTR) ValueStrings;
123 } EnumType;
125 typedef struct CollectionElementValue
127 unsigned int Index;
128 BSTR ValueType;
129 BSTR Value;
130 hyper MetadataBits;
131 } CollectionElementValue;
133 typedef enum RenderTargetBitmapOptions
135 RenderTarget,
136 RenderTargetAndChildren
137 } RenderTargetBitmapOptions;
139 typedef struct BitmapDescription
141 unsigned int Width;
142 unsigned int Height;
143 DXGI_FORMAT Format;
144 DXGI_ALPHA_MODE AlphaMode;
145 } BitmapDescription;
147 typedef enum ResourceType
149 ResourceTypeStatic,
150 ResourceTypeTheme
151 } ResourceType;
153 typedef enum VisualElementState
155 ErrorResolved,
156 ErrorResourceNotFound,
157 ErrorInvalidResource,
158 } VisualElementState;
161 object,
162 uuid(aa7a8931-80e4-4fec-8f3b-553f87b4966e)
164 interface IVisualTreeServiceCallback : IUnknown
166 HRESULT OnVisualTreeChange(
167 [in] ParentChildRelation relation,
168 [in] VisualElement element,
169 [in] VisualMutationType mutation_type);
173 object,
174 uuid(bad9eb88-ae77-4397-b948-5fa2db0a19ea)
176 interface IVisualTreeServiceCallback2 : IVisualTreeServiceCallback
178 HRESULT OnElementStateChanged(
179 [in] InstanceHandle element,
180 [in] VisualElementState element_state,
181 [in] LPCWSTR context);
185 object,
186 uuid(a593b11a-d17f-48bb-8f66-83910731c8a5)
188 interface IVisualTreeService : IUnknown
190 HRESULT AdviseVisualTreeChange([in] IVisualTreeServiceCallback *callback);
192 HRESULT UnadviseVisualTreeChange([in] IVisualTreeServiceCallback *callback);
194 HRESULT GetEnums(
195 [out] unsigned int *count,
196 [out, size_is(, *count)] EnumType **enums);
198 HRESULT CreateInstance(
199 [in] BSTR type_name,
200 [in] BSTR value,
201 [out, retval] InstanceHandle *instance_handle);
203 HRESULT GetPropertyValuesChain(
204 [in] InstanceHandle instance_handle,
205 [out] unsigned int *source_count,
206 [out, size_is(, *source_count)] PropertyChainSource **property_sources,
207 [out] unsigned int *property_count,
208 [out, size_is(, *property_count)] PropertyChainValue **property_values);
210 HRESULT SetProperty(
211 [in] InstanceHandle instance_handle,
212 [in] InstanceHandle value,
213 [in] unsigned int property_index);
215 HRESULT ClearProperty(
216 [in] InstanceHandle instance_handle,
217 [in] unsigned int property_index);
219 HRESULT GetCollectionCount(
220 [in] InstanceHandle instance_handle,
221 [out] unsigned int *collection_size);
223 HRESULT GetCollectionElements(
224 [in] InstanceHandle instance_handle,
225 [in] unsigned int start_index,
226 [in, out] unsigned int *element_count,
227 [out, size_is(, *element_count)] CollectionElementValue **element_values);
229 HRESULT AddChild(
230 [in] InstanceHandle parent,
231 [in] InstanceHandle child,
232 [in] unsigned int index);
234 HRESULT RemoveChild(
235 [in] InstanceHandle parent,
236 [in] unsigned int index);
238 HRESULT ClearChildren([in] InstanceHandle parent);
242 object,
243 uuid(18c9e2b6-3f43-4116-9f2b-ff935d7770d2)
245 interface IXamlDiagnostics : IUnknown
247 HRESULT GetDispatcher([out, retval] IInspectable **dispatcher);
249 HRESULT GetUiLayer([out, retval] IInspectable **layer);
251 HRESULT GetApplication([out, retval] IInspectable **application);
253 HRESULT GetIInspectableFromHandle(
254 [in] InstanceHandle instance_handle,
255 [out, retval] IInspectable **instance);
257 HRESULT GetHandleFromIInspectable(
258 [in] IInspectable *instance,
259 [out, retval] InstanceHandle *handle);
261 HRESULT HitTest(
262 [in] RECT rect,
263 [out] unsigned int *count,
264 [out, size_is(, *count)] InstanceHandle **instance_handles);
266 HRESULT RegisterInstance(
267 [in] IInspectable *instance,
268 [out, retval] InstanceHandle *instance_handle);
270 HRESULT GetInitializationData([out, retval] BSTR *initialization_data);
274 object,
275 uuid(d1a34ef2-cad8-4635-a3d2-fcda8d3f3caf)
277 interface IBitmapData : IUnknown
279 HRESULT CopyBytesTo(
280 [in] unsigned int source_offset_in_bytes,
281 [in] unsigned int max_bytes_to_copy,
282 [out, size_is(max_bytes_to_copy)] byte *bytes,
283 [out] unsigned int *number_of_bytes_copied);
285 HRESULT GetStride([out] unsigned int *stride);
287 HRESULT GetBitmapDescription([out] BitmapDescription *bitmap_description);
289 HRESULT GetSourceBitmapDescription([out] BitmapDescription *bitmap_description);
293 object,
294 uuid(130f5136-ec43-4f61-89c7-9801a36d2e95)
296 interface IVisualTreeService2 : IVisualTreeService
298 HRESULT GetPropertyIndex(
299 [in] InstanceHandle object,
300 [in] LPCWSTR property_name,
301 [out] unsigned int *property_index);
303 HRESULT GetProperty(
304 [in] InstanceHandle object,
305 [in] unsigned int property_index,
306 [out] InstanceHandle *value);
308 HRESULT ReplaceResource(
309 [in] InstanceHandle resource_dictionary,
310 [in] InstanceHandle key,
311 [in] InstanceHandle new_value);
313 HRESULT RenderTargetBitmap(
314 [in] InstanceHandle handle,
315 [in] RenderTargetBitmapOptions options,
316 [in] unsigned int max_pixel_width,
317 [in] unsigned int max_pixel_height,
318 [out] IBitmapData **bitmap_data);
322 object,
323 uuid(0e79c6e0-85a0-4be8-b41a-655cf1fd19bd)
325 interface IVisualTreeService3 : IVisualTreeService2
327 HRESULT ResolveResource(
328 [in] InstanceHandle resource_context,
329 [in] LPCWSTR resource_name,
330 [in] ResourceType resource_type,
331 [in] unsigned int property_index);
333 HRESULT GetDictionaryItem(
334 [in] InstanceHandle dictionary_handle,
335 [in] LPCWSTR resource_name,
336 [in] BOOL resource_is_implicit_style,
337 [out] InstanceHandle *resource_handle);
339 HRESULT AddDictionaryItem(
340 [in] InstanceHandle dictionary_handle,
341 [in] InstanceHandle resource_key,
342 [in] InstanceHandle resource_handle);
344 HRESULT RemoveDictionaryItem(
345 [in] InstanceHandle dictionary_handle,
346 [in] InstanceHandle resource_key);