af062818b47340eef15700d2f0211576ba3506eevboxsync/*
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright 2006 Mike McCormack
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * This library is free software; you can redistribute it and/or
af062818b47340eef15700d2f0211576ba3506eevboxsync * modify it under the terms of the GNU Lesser General Public
af062818b47340eef15700d2f0211576ba3506eevboxsync * License as published by the Free Software Foundation; either
af062818b47340eef15700d2f0211576ba3506eevboxsync * version 2.1 of the License, or (at your option) any later version.
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * This library is distributed in the hope that it will be useful,
af062818b47340eef15700d2f0211576ba3506eevboxsync * but WITHOUT ANY WARRANTY; without even the implied warranty of
af062818b47340eef15700d2f0211576ba3506eevboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * Lesser General Public License for more details.
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * You should have received a copy of the GNU Lesser General Public
af062818b47340eef15700d2f0211576ba3506eevboxsync * License along with this library; if not, write to the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync/*
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync * a choice of LGPL license versions is made available with the language indicating
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync * that LGPLv2 or any later version may be used, or where a choice of which version
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync * of the LGPL is applied is otherwise unspecified.
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync */
589fd26cedb2b4ebbed14f2964cad03cc8ebbca2vboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncimport "objidl.idl";
af062818b47340eef15700d2f0211576ba3506eevboxsync/* FIXME: import "filter.idl"; */
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync/*
af062818b47340eef15700d2f0211576ba3506eevboxsync * widl doesn't like the declaration of PFNFILLTEXTBUFFER, so work around it...
af062818b47340eef15700d2f0211576ba3506eevboxsync * Not sure that function pointers are even legal in idl.
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsynccpp_quote("struct tagTEXT_SOURCE;")
af062818b47340eef15700d2f0211576ba3506eevboxsynccpp_quote("typedef HRESULT (WINAPI *PFNFILLTEXTBUFFER)(struct tagTEXT_SOURCE *pTextSource);")
af062818b47340eef15700d2f0211576ba3506eevboxsynccpp_quote("#if 0")
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef void* PFNFILLTEXTBUFFER;
af062818b47340eef15700d2f0211576ba3506eevboxsynccpp_quote("#endif")
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct tagTEXT_SOURCE
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync PFNFILLTEXTBUFFER pfnFillTextBuffer;
af062818b47340eef15700d2f0211576ba3506eevboxsync const WCHAR *awcBuffer;
af062818b47340eef15700d2f0211576ba3506eevboxsync ULONG iEnd;
af062818b47340eef15700d2f0211576ba3506eevboxsync ULONG iCur;
af062818b47340eef15700d2f0211576ba3506eevboxsync} TEXT_SOURCE;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef enum tagWORDREP_BREAK_TYPE
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync WORDREP_BREAK_EOW = 0,
af062818b47340eef15700d2f0211576ba3506eevboxsync WORDREP_BREAK_EOS = 1,
af062818b47340eef15700d2f0211576ba3506eevboxsync WORDREP_BREAK_EOP = 2,
af062818b47340eef15700d2f0211576ba3506eevboxsync WORDREP_BREAK_EOC = 3
af062818b47340eef15700d2f0211576ba3506eevboxsync} WORDREP_BREAK_TYPE;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync/*****************************************************************************
af062818b47340eef15700d2f0211576ba3506eevboxsync * IWordSink interface
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync[
af062818b47340eef15700d2f0211576ba3506eevboxsync uuid(cc907054-c058-101a-b554-08002b33b0e6),
af062818b47340eef15700d2f0211576ba3506eevboxsync object,
af062818b47340eef15700d2f0211576ba3506eevboxsync local
af062818b47340eef15700d2f0211576ba3506eevboxsync]
af062818b47340eef15700d2f0211576ba3506eevboxsyncinterface IWordSink : IUnknown
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT PutWord(
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwc,
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(cwcSrcLen)][in] const WCHAR *pwcInBuf,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcSrcLen,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcSrcPos);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT PutAltWord(
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwc,
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(cwcSrcLen)][in] const WCHAR *pwcInBuf,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcSrcLen,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcSrcPos);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT StartAltPhrase(void);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT EndAltPhrase(void);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT PutBreak(
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] WORDREP_BREAK_TYPE breakType);
af062818b47340eef15700d2f0211576ba3506eevboxsync}
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync/*****************************************************************************
af062818b47340eef15700d2f0211576ba3506eevboxsync * IPhraseSink interface
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync[
af062818b47340eef15700d2f0211576ba3506eevboxsync uuid(cc906ff0-c058-101a-b554-08002b33b0e6),
af062818b47340eef15700d2f0211576ba3506eevboxsync object,
af062818b47340eef15700d2f0211576ba3506eevboxsync local
af062818b47340eef15700d2f0211576ba3506eevboxsync]
af062818b47340eef15700d2f0211576ba3506eevboxsyncinterface IPhraseSink: IUnknown
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT PutSmallPhrase(
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(cwcNoun)][in] const WCHAR *pwcNoun,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcNoun,
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(cwcModifier)][in] const WCHAR *pwcModifier,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcModifier,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG ulAttachmentType);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT PutPhrase(
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(cwcPhrase)][in] const WCHAR *pwcPhrase,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcPhrase);
af062818b47340eef15700d2f0211576ba3506eevboxsync}
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync/*****************************************************************************
af062818b47340eef15700d2f0211576ba3506eevboxsync * IWordBreaker interface
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync[
af062818b47340eef15700d2f0211576ba3506eevboxsync uuid(d53552c8-77e3-101a-b552-08002b33b0e6),
af062818b47340eef15700d2f0211576ba3506eevboxsync object,
af062818b47340eef15700d2f0211576ba3506eevboxsync local
af062818b47340eef15700d2f0211576ba3506eevboxsync]
af062818b47340eef15700d2f0211576ba3506eevboxsyncinterface IWordBreaker: IUnknown
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT Init(
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] BOOL fQuery,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG ulMaxTokenSize,
af062818b47340eef15700d2f0211576ba3506eevboxsync [out] BOOL *pfLicense);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT BreakText(
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] TEXT_SOURCE *pTextSource,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] IWordSink *pWordSink,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] IPhraseSink *pPhraseSink);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT ComposePhrase(
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(cwcNoun)][in] const WCHAR *pwcNoun,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcNoun,
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(cwcModifier)][in] const WCHAR *pwcModifier,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG cwcModifier,
af062818b47340eef15700d2f0211576ba3506eevboxsync [in] ULONG ulAttachmentType,
af062818b47340eef15700d2f0211576ba3506eevboxsync [size_is(*pcwcPhrase)][out] WCHAR *pwcPhrase,
af062818b47340eef15700d2f0211576ba3506eevboxsync [out][in] ULONG *pcwcPhrase);
af062818b47340eef15700d2f0211576ba3506eevboxsync HRESULT GetLicenseToUse(
af062818b47340eef15700d2f0211576ba3506eevboxsync [string][out] const WCHAR **ppwcsLicense);
af062818b47340eef15700d2f0211576ba3506eevboxsync}