oleaut32: Turkish translation.
[wine/gsoc_dplay.git] / dlls / usp10 / usp10.c
blob38e1fc6a27c3272b70bb5a1e10b14969c81713a4
1 /*
2 * Implementation of Uniscribe Script Processor (usp10.dll)
4 * Copyright 2005 Steven Edwards for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * Notes:
21 * Uniscribe allows for processing of complex scripts such as joining
22 * and filtering characters and bi-directional text with custom line breaks.
25 #include <stdarg.h>
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wingdi.h"
30 #include "winuser.h"
31 #include "usp10.h"
33 #include "wine/debug.h"
35 /**
36 * some documentation here:
37 * http://www.microsoft.com/typography/developers/uniscribe/uniscribe.htm
40 WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
42 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
44 switch(fdwReason) {
45 case DLL_PROCESS_ATTACH:
46 DisableThreadLibraryCalls(hInstDLL);
47 break;
48 case DLL_PROCESS_DETACH:
49 break;
51 return TRUE;
54 /***********************************************************************
55 * ScriptFreeCache (USP10.@)
58 HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
60 FIXME("%p\n", psc);
62 if (psc) *psc = NULL;
63 return 0;
66 /***********************************************************************
67 * ScriptGetProperties (USP10.@)
70 HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts)
72 FIXME("%p,%p\n",ppSp,piNumScripts);
74 if (piNumScripts) *piNumScripts = 0;
75 return 0;
78 /***********************************************************************
79 * ScriptGetFontProperties (USP10.@)
82 HRESULT WINAPI ScriptGetFontProperties(HDC hdc, SCRIPT_CACHE *psc, SCRIPT_FONTPROPERTIES *sfp)
84 FIXME("%p,%p,%p\n", hdc, psc, sfp);
85 /* return something sensible? */
86 if (NULL != sfp) {
87 sfp->cBytes = sizeof(SCRIPT_FONTPROPERTIES);
88 sfp->wgBlank = 0;
89 sfp->wgDefault = 0;
90 sfp->wgInvalid = 0;
91 sfp->wgKashida = 1;
92 sfp->iKashidaWidth = 0;
94 return 0;
97 /***********************************************************************
98 * ScriptRecordDigitSubstitution (USP10.@)
101 HRESULT WINAPI ScriptRecordDigitSubstitution(LCID Locale,SCRIPT_DIGITSUBSTITUTE *psds)
103 FIXME("%ld,%p\n",Locale,psds);
104 return E_NOTIMPL;
107 /***********************************************************************
108 * ScriptApplyDigitSubstitution (USP10.@)
111 HRESULT WINAPI ScriptApplyDigitSubstitution(const SCRIPT_DIGITSUBSTITUTE* psds,
112 SCRIPT_CONTROL* psc, SCRIPT_STATE* pss)
114 FIXME("%p,%p,%p\n",psds,psc,pss);
115 return E_NOTIMPL;
118 /***********************************************************************
119 * ScriptItemize (USP10.@)
122 HRESULT WINAPI ScriptItemize(const WCHAR *pwcInChars, int cInChars, int cMaxItems,
123 const SCRIPT_CONTROL *psControl, const SCRIPT_STATE *psState,
124 SCRIPT_ITEM *pItems, int *pcItems)
126 FIXME("%s,%d,%d,%p,%p,%p,%p\n", debugstr_w(pwcInChars), cInChars, cMaxItems,
127 psControl, psState, pItems, pcItems);
129 if (!pwcInChars || !cInChars || !pItems || cMaxItems < 2)
130 return E_INVALIDARG;
132 *pcItems = 0;
133 return 0;
136 /***********************************************************************
137 * ScriptStringAnalyse (USP10.@)
140 HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
141 const void *pString,
142 int cString,
143 int cGlyphs,
144 int iCharset,
145 DWORD dwFlags,
146 int iReqWidth,
147 SCRIPT_CONTROL *psControl,
148 SCRIPT_STATE *psState,
149 const int *piDx,
150 SCRIPT_TABDEF *pTabdef,
151 const BYTE *pbInClass,
152 SCRIPT_STRING_ANALYSIS *pssa)
154 FIXME("(%p,%p,%d,%d,%d,0x%lx,%d,%p,%p,%p,%p,%p,%p): stub\n",
155 hdc, pString, cString, cGlyphs, iCharset, dwFlags,
156 iReqWidth, psControl, psState, piDx, pTabdef, pbInClass, pssa);
157 if (1 > cString || NULL == pString) {
158 return E_INVALIDARG;
160 if ((dwFlags & SSA_GLYPHS) && NULL == hdc) {
161 return E_INVALIDARG;
164 return E_NOTIMPL;
167 /***********************************************************************
168 * ScriptStringFree (USP10.@)
171 HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa) {
172 FIXME("(%p): stub\n",pssa);
173 return S_OK;
176 /***********************************************************************
177 * ScriptIsComplex (USP10.@)
180 HRESULT WINAPI ScriptIsComplex(const WCHAR* pwcInChars, int cInChars, DWORD dwFlags) {
181 FIXME("(%s,%d,0x%lx): stub\n", debugstr_w(pwcInChars), cInChars, dwFlags);
182 return E_NOTIMPL;