2 * Copyright 2006 Mike McCormack
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
22 * widl doesn't like the declaration of PFNFILLTEXTBUFFER, so work around it...
23 * Not sure that function pointers are even legal in idl.
25 cpp_quote
("struct tagTEXT_SOURCE;")
26 cpp_quote
("typedef HRESULT (WINAPI *PFNFILLTEXTBUFFER)(struct tagTEXT_SOURCE *pTextSource);")
28 typedef void* PFNFILLTEXTBUFFER
;
31 typedef struct tagTEXT_SOURCE
33 PFNFILLTEXTBUFFER pfnFillTextBuffer
;
34 const WCHAR
*awcBuffer
;
39 typedef enum tagWORDREP_BREAK_TYPE
41 WORDREP_BREAK_EOW
= 0,
42 WORDREP_BREAK_EOS
= 1,
43 WORDREP_BREAK_EOP
= 2,
48 /*****************************************************************************
53 uuid(cc907054
-c058
-101a
-b554
-08002b33b0e6
),
57 interface IWordSink
: IUnknown
61 [size_is(cwcSrcLen
)][in] const WCHAR
*pwcInBuf
,
63 [in] ULONG cwcSrcPos
);
66 [size_is(cwcSrcLen
)][in] const WCHAR
*pwcInBuf
,
68 [in] ULONG cwcSrcPos
);
69 HRESULT StartAltPhrase
(void);
70 HRESULT EndAltPhrase
(void);
72 [in] WORDREP_BREAK_TYPE breakType
);
75 /*****************************************************************************
76 * IPhraseSink interface
80 uuid(cc906ff0
-c058
-101a
-b554
-08002b33b0e6
),
84 interface IPhraseSink
: IUnknown
86 HRESULT PutSmallPhrase
(
87 [size_is(cwcNoun
)][in] const WCHAR
*pwcNoun
,
89 [size_is(cwcModifier
)][in] const WCHAR
*pwcModifier
,
90 [in] ULONG cwcModifier
,
91 [in] ULONG ulAttachmentType
);
93 [size_is(cwcPhrase
)][in] const WCHAR
*pwcPhrase
,
94 [in] ULONG cwcPhrase
);
97 /*****************************************************************************
98 * IWordBreaker interface
102 uuid(d53552c8
-77e3
-101a
-b552
-08002b33b0e6
),
106 interface IWordBreaker
: IUnknown
110 [in] ULONG ulMaxTokenSize
,
111 [out] BOOL
*pfLicense
);
113 [in] TEXT_SOURCE
*pTextSource
,
114 [in] IWordSink
*pWordSink
,
115 [in] IPhraseSink
*pPhraseSink
);
116 HRESULT ComposePhrase
(
117 [size_is(cwcNoun
)][in] const WCHAR
*pwcNoun
,
119 [size_is(cwcModifier
)][in] const WCHAR
*pwcModifier
,
120 [in] ULONG cwcModifier
,
121 [in] ULONG ulAttachmentType
,
122 [size_is(*pcwcPhrase
)][out] WCHAR
*pwcPhrase
,
123 [out][in] ULONG
*pcwcPhrase
);
124 HRESULT GetLicenseToUse
(
125 [string][out] const WCHAR
**ppwcsLicense
);