usp10: Implement ScriptString_pLogAttr.

This commit is contained in:
Hans Leidekker 2006-12-23 17:19:31 +01:00 committed by Alexandre Julliard
parent 960372f2fe
commit cd6fe7dfa7
2 changed files with 28 additions and 1 deletions

View File

@ -165,6 +165,7 @@ typedef struct {
SCRIPT_ITEM* pItem;
int numItems;
StringGlyphs* glyphs;
SCRIPT_LOGATTR* logattrs;
SIZE* sz;
} StringAnalysis;
@ -589,6 +590,9 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc,
psState, analysis->pItem, &analysis->numItems);
}
if ((analysis->logattrs = HeapAlloc(GetProcessHeap(), 0, sizeof(SCRIPT_LOGATTR) * cString)))
ScriptBreak(pString, cString, (SCRIPT_STRING_ANALYSIS)analysis, analysis->logattrs);
analysis->glyphs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(StringGlyphs)*analysis->numItems);
sc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SCRIPT_CACHE));
@ -786,6 +790,7 @@ HRESULT WINAPI ScriptStringFree(SCRIPT_STRING_ANALYSIS *pssa)
HeapFree(GetProcessHeap(), 0, analysis->glyphs);
HeapFree(GetProcessHeap(), 0, analysis->pItem);
HeapFree(GetProcessHeap(), 0, analysis->logattrs);
HeapFree(GetProcessHeap(), 0, analysis->sz);
HeapFree(GetProcessHeap(), 0, analysis);
@ -1538,3 +1543,25 @@ const SIZE * WINAPI ScriptString_pSize(SCRIPT_STRING_ANALYSIS ssa)
}
return analysis->sz;
}
/***********************************************************************
* ScriptString_pLogAttr (USP10.@)
*
* Retrieve logical attributes of an analysed string.
*
* PARAMS
* ssa [I] string analysis.
*
* RETURNS
* Success: Pointer to an array of SCRIPT_LOGATTR structures.
* Failure: NULL
*/
const SCRIPT_LOGATTR * WINAPI ScriptString_pLogAttr(SCRIPT_STRING_ANALYSIS ssa)
{
StringAnalysis *analysis = ssa;
TRACE("(%p)\n", ssa);
if (!analysis) return NULL;
return analysis->logattrs;
}

View File

@ -25,7 +25,7 @@
@ stdcall ScriptStringOut(ptr long long long ptr long long long)
@ stdcall ScriptStringValidate(ptr)
@ stdcall ScriptStringXtoCP(ptr long ptr ptr)
@ stub ScriptString_pLogAttr
@ stdcall ScriptString_pLogAttr(ptr)
@ stdcall ScriptString_pSize(ptr)
@ stub ScriptString_pcOutChars
@ stdcall ScriptTextOut(ptr ptr long long long ptr ptr ptr long ptr long ptr ptr ptr)