Mike McCormack : include: Add indexsvr.idl (IWordBreaker).

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 7 11:09:46 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: aa44a063fd82801ce4fd3c9869f99437504555c3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=aa44a063fd82801ce4fd3c9869f99437504555c3

Author: Mike McCormack <mike at codeweavers.com>
Date:   Fri Jul  7 14:18:19 2006 +0900

include: Add indexsvr.idl (IWordBreaker).

---

 include/.gitignore   |    1 
 include/Makefile.in  |    1 
 include/indexsvr.idl |  126 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 128 insertions(+), 0 deletions(-)
 create mode 100644 include/indexsvr.idl

diff --git a/include/.gitignore b/include/.gitignore
index 762edb8..7996266 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -13,6 +13,7 @@ downloadmgr.h
 exdisp.h
 hlink.h
 iads.h
+indexsvr.h
 mediaobj.h
 mimeinfo.h
 mlang.h
diff --git a/include/Makefile.in b/include/Makefile.in
index 02a009b..0b7039b 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -18,6 +18,7 @@ WINDOWS_IDL_SRCS = \
 	exdisp.idl \
 	hlink.idl \
 	iads.idl \
+	indexsvr.idl \
 	mediaobj.idl \
 	mimeinfo.idl \
 	mlang.idl \
diff --git a/include/indexsvr.idl b/include/indexsvr.idl
new file mode 100644
index 0000000..056bb52
--- /dev/null
+++ b/include/indexsvr.idl
@@ -0,0 +1,126 @@
+/*
+ * 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
+ */
+
+import "unknwn.idl";
+
+/*
+ * widl doesn't like the declaration of PFNFILLTEXTBUFFER, so work around it...
+ * Not sure that function pointers are even legal in idl.
+ */
+cpp_quote("struct tagTEXT_SOURCE;");
+cpp_quote("typedef HRESULT (WINAPI *PFNFILLTEXTBUFFER)(struct tagTEXT_SOURCE *pTextSource);");
+cpp_quote("#if 0");
+typedef void* PFNFILLTEXTBUFFER;
+cpp_quote("#endif");
+
+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
+ */
+[
+    unique,
+    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
+ */
+[
+    unique,
+    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
+ */
+[
+    unique,
+    uuid(d53552c8-77e3-101a-b552-08002b33b0e6),
+    object,
+    local
+]
+interface IWordBreaker: IUnknown
+{
+    HRESULT Init(
+              [in] BOOL fQuery,
+              [in] ULONG ulMaxTokenSize,
+              [out] BOOL *pfLicense);
+    HRESULT BreakText(
+              [in] TEXT_SOURCE pTextSource,
+              [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,
+              [in] ULONG ulAttachmentType, 
+              [size_is(*pcwcPhrase)][out] WCHAR *pwcPhrase, 
+              [out][in] ULONG *pcwcPhrase);
+    HRESULT GetLicenseToUse(
+              [string][out] const WCHAR **ppwcsLicense);
+}




More information about the wine-cvs mailing list