2006-07-07 07:18:19 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2006 Mike McCormack
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2011-12-21 14:27:48 +01:00
|
|
|
import "oaidl.idl";
|
2007-09-20 21:36:29 +02:00
|
|
|
/* FIXME: import "filter.idl"; */
|
2006-07-07 07:18:19 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* widl doesn't like the declaration of PFNFILLTEXTBUFFER, so work around it...
|
|
|
|
* Not sure that function pointers are even legal in idl.
|
|
|
|
*/
|
2006-07-20 08:25:47 +02:00
|
|
|
cpp_quote("struct tagTEXT_SOURCE;")
|
|
|
|
cpp_quote("typedef HRESULT (WINAPI *PFNFILLTEXTBUFFER)(struct tagTEXT_SOURCE *pTextSource);")
|
|
|
|
cpp_quote("#if 0")
|
2006-07-07 07:18:19 +02:00
|
|
|
typedef void* PFNFILLTEXTBUFFER;
|
2006-07-20 08:25:47 +02:00
|
|
|
cpp_quote("#endif")
|
2006-07-07 07:18:19 +02:00
|
|
|
|
|
|
|
typedef struct tagTEXT_SOURCE
|
|
|
|
{
|
|
|
|
PFNFILLTEXTBUFFER pfnFillTextBuffer;
|
|
|
|
const WCHAR *awcBuffer;
|
|
|
|
ULONG iEnd;
|
|
|
|
ULONG iCur;
|
|
|
|
} TEXT_SOURCE;
|
|
|
|
|
|
|
|
typedef enum tagWORDREP_BREAK_TYPE
|
|
|
|
{
|
|
|
|
WORDREP_BREAK_EOW = 0,
|
|
|
|
WORDREP_BREAK_EOS = 1,
|
|
|
|
WORDREP_BREAK_EOP = 2,
|
|
|
|
WORDREP_BREAK_EOC = 3
|
|
|
|
} WORDREP_BREAK_TYPE;
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IWordSink interface
|
|
|
|
*/
|
|
|
|
[
|
|
|
|
uuid(cc907054-c058-101a-b554-08002b33b0e6),
|
|
|
|
object,
|
|
|
|
local
|
|
|
|
]
|
|
|
|
interface IWordSink : IUnknown
|
|
|
|
{
|
|
|
|
HRESULT PutWord(
|
|
|
|
[in] ULONG cwc,
|
|
|
|
[size_is(cwcSrcLen)][in] const WCHAR *pwcInBuf,
|
|
|
|
[in] ULONG cwcSrcLen,
|
|
|
|
[in] ULONG cwcSrcPos);
|
|
|
|
HRESULT PutAltWord(
|
|
|
|
[in] ULONG cwc,
|
|
|
|
[size_is(cwcSrcLen)][in] const WCHAR *pwcInBuf,
|
|
|
|
[in] ULONG cwcSrcLen,
|
|
|
|
[in] ULONG cwcSrcPos);
|
|
|
|
HRESULT StartAltPhrase(void);
|
|
|
|
HRESULT EndAltPhrase(void);
|
|
|
|
HRESULT PutBreak(
|
|
|
|
[in] WORDREP_BREAK_TYPE breakType);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IPhraseSink interface
|
|
|
|
*/
|
|
|
|
[
|
|
|
|
uuid(cc906ff0-c058-101a-b554-08002b33b0e6),
|
|
|
|
object,
|
|
|
|
local
|
|
|
|
]
|
|
|
|
interface IPhraseSink: IUnknown
|
|
|
|
{
|
|
|
|
HRESULT PutSmallPhrase(
|
|
|
|
[size_is(cwcNoun)][in] const WCHAR *pwcNoun,
|
|
|
|
[in] ULONG cwcNoun,
|
|
|
|
[size_is(cwcModifier)][in] const WCHAR *pwcModifier,
|
|
|
|
[in] ULONG cwcModifier,
|
|
|
|
[in] ULONG ulAttachmentType);
|
|
|
|
HRESULT PutPhrase(
|
|
|
|
[size_is(cwcPhrase)][in] const WCHAR *pwcPhrase,
|
|
|
|
[in] ULONG cwcPhrase);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************************
|
|
|
|
* IWordBreaker interface
|
|
|
|
*/
|
|
|
|
[
|
|
|
|
uuid(d53552c8-77e3-101a-b552-08002b33b0e6),
|
|
|
|
object,
|
|
|
|
local
|
|
|
|
]
|
|
|
|
interface IWordBreaker: IUnknown
|
|
|
|
{
|
|
|
|
HRESULT Init(
|
|
|
|
[in] BOOL fQuery,
|
|
|
|
[in] ULONG ulMaxTokenSize,
|
|
|
|
[out] BOOL *pfLicense);
|
|
|
|
HRESULT BreakText(
|
2006-07-11 04:12:06 +02:00
|
|
|
[in] TEXT_SOURCE *pTextSource,
|
2006-07-07 07:18:19 +02:00
|
|
|
[in] IWordSink *pWordSink,
|
|
|
|
[in] IPhraseSink *pPhraseSink);
|
|
|
|
HRESULT ComposePhrase(
|
|
|
|
[size_is(cwcNoun)][in] const WCHAR *pwcNoun,
|
|
|
|
[in] ULONG cwcNoun,
|
|
|
|
[size_is(cwcModifier)][in] const WCHAR *pwcModifier,
|
|
|
|
[in] ULONG cwcModifier,
|
2006-08-11 13:21:46 +02:00
|
|
|
[in] ULONG ulAttachmentType,
|
|
|
|
[size_is(*pcwcPhrase)][out] WCHAR *pwcPhrase,
|
2006-07-07 07:18:19 +02:00
|
|
|
[out][in] ULONG *pcwcPhrase);
|
|
|
|
HRESULT GetLicenseToUse(
|
|
|
|
[string][out] const WCHAR **ppwcsLicense);
|
|
|
|
}
|