cmd: DIR command outputs free space for the path.
[wine.git] / dlls / windows.media.speech / private.h
blobe80d73ec1fb80674d15223b5f1241f4cb594afc8
1 /* WinRT Windows.Media.Speech private header
3 * Copyright 2022 Bernhard Kölbl
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_WINDOWS_MEDIA_SPEECH_PRIVATE_H
21 #define __WINE_WINDOWS_MEDIA_SPEECH_PRIVATE_H
23 #include <stdarg.h>
25 #define COBJMACROS
26 #include "corerror.h"
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winstring.h"
30 #include "objbase.h"
32 #include "activation.h"
34 #define WIDL_using_Windows_Foundation
35 #define WIDL_using_Windows_Foundation_Collections
36 #include "windows.foundation.h"
37 #define WIDL_using_Windows_Globalization
38 #include "windows.globalization.h"
39 #define WIDL_using_Windows_Media_SpeechSynthesis
40 #include "windows.media.speechsynthesis.h"
41 #define WIDL_using_Windows_Media_SpeechRecognition
42 #include "windows.media.speechrecognition.h"
44 #include "wine/list.h"
48 * Windows.Media.SpeechRecognition
52 extern IActivationFactory *listconstraint_factory;
53 extern IActivationFactory *recognizer_factory;
57 * Windows.Media.SpeechSynthesis
61 extern IActivationFactory *synthesizer_factory;
65 struct vector_iids
67 const GUID *iterable;
68 const GUID *iterator;
69 const GUID *vector;
70 const GUID *view;
73 typedef HRESULT (*async_action_callback)( IInspectable *invoker );
74 typedef HRESULT (*async_operation_inspectable_callback)( IInspectable *invoker, IInspectable **result );
76 HRESULT async_action_create( IInspectable *invoker, async_action_callback callback, IAsyncAction **out );
77 HRESULT async_operation_inspectable_create( const GUID *iid, IInspectable *invoker, async_operation_inspectable_callback callback,
78 IAsyncOperation_IInspectable **out );
80 HRESULT typed_event_handlers_append( struct list *list, ITypedEventHandler_IInspectable_IInspectable *handler, EventRegistrationToken *token );
81 HRESULT typed_event_handlers_remove( struct list *list, EventRegistrationToken *token );
82 HRESULT typed_event_handlers_notify( struct list *list, IInspectable *sender, IInspectable *args );
83 HRESULT typed_event_handlers_clear( struct list* list );
85 HRESULT vector_hstring_create( IVector_HSTRING **out );
86 HRESULT vector_hstring_create_copy( IIterable_HSTRING *iterable, IVector_HSTRING **out );
87 HRESULT vector_inspectable_create( const struct vector_iids *iids, IVector_IInspectable **out );
89 #define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
90 static inline impl_type *impl_from( iface_type *iface ) \
91 { \
92 return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
93 } \
94 static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
95 { \
96 impl_type *impl = impl_from( iface ); \
97 return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
98 } \
99 static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
101 impl_type *impl = impl_from( iface ); \
102 return IInspectable_AddRef( (IInspectable *)(expr) ); \
104 static ULONG WINAPI pfx##_Release( iface_type *iface ) \
106 impl_type *impl = impl_from( iface ); \
107 return IInspectable_Release( (IInspectable *)(expr) ); \
109 static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
111 impl_type *impl = impl_from( iface ); \
112 return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
114 static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
116 impl_type *impl = impl_from( iface ); \
117 return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
119 static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
121 impl_type *impl = impl_from( iface ); \
122 return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
124 #define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
125 DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
126 #define DEFINE_IINSPECTABLE_OUTER( pfx, iface_type, impl_type, outer_iface ) \
127 DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, impl->outer_iface )
129 #endif