2022-03-09 17:45:29 +00:00
|
|
|
/* WinRT Windows.Media.Speech private header
|
|
|
|
*
|
|
|
|
* Copyright 2022 Bernhard Kölbl
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __WINE_WINDOWS_MEDIA_SPEECH_PRIVATE_H
|
|
|
|
#define __WINE_WINDOWS_MEDIA_SPEECH_PRIVATE_H
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#define COBJMACROS
|
2023-01-03 13:16:06 +00:00
|
|
|
#include "corerror.h"
|
2022-03-09 17:45:29 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winstring.h"
|
|
|
|
#include "objbase.h"
|
|
|
|
|
|
|
|
#include "activation.h"
|
|
|
|
|
|
|
|
#define WIDL_using_Windows_Foundation
|
|
|
|
#define WIDL_using_Windows_Foundation_Collections
|
|
|
|
#include "windows.foundation.h"
|
|
|
|
#define WIDL_using_Windows_Globalization
|
|
|
|
#include "windows.globalization.h"
|
|
|
|
#define WIDL_using_Windows_Media_SpeechSynthesis
|
|
|
|
#include "windows.media.speechsynthesis.h"
|
2022-03-10 17:35:24 +00:00
|
|
|
#define WIDL_using_Windows_Media_SpeechRecognition
|
|
|
|
#include "windows.media.speechrecognition.h"
|
|
|
|
|
2022-03-16 16:31:03 +00:00
|
|
|
#include "wine/list.h"
|
|
|
|
|
2022-03-10 17:35:24 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Windows.Media.SpeechRecognition
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-03-14 10:06:36 +00:00
|
|
|
extern IActivationFactory *listconstraint_factory;
|
2022-03-10 17:35:24 +00:00
|
|
|
extern IActivationFactory *recognizer_factory;
|
2022-03-09 17:45:29 +00:00
|
|
|
|
2022-03-09 17:45:31 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Windows.Media.SpeechSynthesis
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern IActivationFactory *synthesizer_factory;
|
|
|
|
|
2022-03-10 17:35:23 +00:00
|
|
|
|
|
|
|
|
2022-03-30 19:00:34 +00:00
|
|
|
struct vector_iids
|
|
|
|
{
|
2022-03-30 19:00:36 +00:00
|
|
|
const GUID *iterable;
|
2022-03-30 19:00:37 +00:00
|
|
|
const GUID *iterator;
|
2022-03-30 19:00:34 +00:00
|
|
|
const GUID *vector;
|
2022-03-30 19:00:35 +00:00
|
|
|
const GUID *view;
|
2022-03-30 19:00:34 +00:00
|
|
|
};
|
|
|
|
|
2023-01-03 14:08:28 +00:00
|
|
|
typedef HRESULT (*async_action_callback)( IInspectable *invoker );
|
|
|
|
typedef HRESULT (*async_operation_inspectable_callback)( IInspectable *invoker, IInspectable **result );
|
2022-04-22 12:48:06 +00:00
|
|
|
|
2022-05-03 14:34:55 +00:00
|
|
|
HRESULT async_action_create( IInspectable *invoker, async_action_callback callback, IAsyncAction **out );
|
2022-05-03 11:15:08 +00:00
|
|
|
HRESULT async_operation_inspectable_create( const GUID *iid, IInspectable *invoker, async_operation_inspectable_callback callback,
|
|
|
|
IAsyncOperation_IInspectable **out );
|
2022-04-06 16:28:42 +00:00
|
|
|
|
2022-03-16 16:31:03 +00:00
|
|
|
HRESULT typed_event_handlers_append( struct list *list, ITypedEventHandler_IInspectable_IInspectable *handler, EventRegistrationToken *token );
|
|
|
|
HRESULT typed_event_handlers_remove( struct list *list, EventRegistrationToken *token );
|
|
|
|
HRESULT typed_event_handlers_notify( struct list *list, IInspectable *sender, IInspectable *args );
|
|
|
|
HRESULT typed_event_handlers_clear( struct list* list );
|
|
|
|
|
2022-03-29 17:30:44 +00:00
|
|
|
HRESULT vector_hstring_create( IVector_HSTRING **out );
|
2022-03-29 17:30:48 +00:00
|
|
|
HRESULT vector_hstring_create_copy( IIterable_HSTRING *iterable, IVector_HSTRING **out );
|
2022-03-30 19:00:34 +00:00
|
|
|
HRESULT vector_inspectable_create( const struct vector_iids *iids, IVector_IInspectable **out );
|
2022-03-29 17:30:44 +00:00
|
|
|
|
2022-03-10 17:35:23 +00:00
|
|
|
#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \
|
|
|
|
static inline impl_type *impl_from( iface_type *iface ) \
|
|
|
|
{ \
|
|
|
|
return CONTAINING_RECORD( iface, impl_type, iface_mem ); \
|
|
|
|
} \
|
|
|
|
static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \
|
|
|
|
{ \
|
|
|
|
impl_type *impl = impl_from( iface ); \
|
|
|
|
return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \
|
|
|
|
} \
|
|
|
|
static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \
|
|
|
|
{ \
|
|
|
|
impl_type *impl = impl_from( iface ); \
|
|
|
|
return IInspectable_AddRef( (IInspectable *)(expr) ); \
|
|
|
|
} \
|
|
|
|
static ULONG WINAPI pfx##_Release( iface_type *iface ) \
|
|
|
|
{ \
|
|
|
|
impl_type *impl = impl_from( iface ); \
|
|
|
|
return IInspectable_Release( (IInspectable *)(expr) ); \
|
|
|
|
} \
|
|
|
|
static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \
|
|
|
|
{ \
|
|
|
|
impl_type *impl = impl_from( iface ); \
|
|
|
|
return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \
|
|
|
|
} \
|
|
|
|
static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \
|
|
|
|
{ \
|
|
|
|
impl_type *impl = impl_from( iface ); \
|
|
|
|
return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \
|
|
|
|
} \
|
|
|
|
static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \
|
|
|
|
{ \
|
|
|
|
impl_type *impl = impl_from( iface ); \
|
|
|
|
return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \
|
|
|
|
}
|
|
|
|
#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \
|
|
|
|
DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface )
|
|
|
|
#define DEFINE_IINSPECTABLE_OUTER( pfx, iface_type, impl_type, outer_iface ) \
|
|
|
|
DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, impl->outer_iface )
|
|
|
|
|
2022-03-09 17:45:29 +00:00
|
|
|
#endif
|