Hans Leidekker : usp10: Implement ScriptString_pLogAttr.
Alexandre Julliard
julliard at wine.codeweavers.com
Sun Dec 24 09:37:58 CST 2006
Module: wine
Branch: master
Commit: cd6fe7dfa79f2d91bbf07a5000ea509419ceb2b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cd6fe7dfa79f2d91bbf07a5000ea509419ceb2b5
Author: Hans Leidekker <hans at it.vu.nl>
Date: Sat Dec 23 17:19:31 2006 +0100
usp10: Implement ScriptString_pLogAttr.
---
dlls/usp10/usp10.c | 27 +++++++++++++++++++++++++++
dlls/usp10/usp10.spec | 2 +-
2 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 4791677..99b057e 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -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 h
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_S
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(S
}
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;
+}
diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec
index 73ea447..83e97ba 100644
--- a/dlls/usp10/usp10.spec
+++ b/dlls/usp10/usp10.spec
@@ -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)
More information about the wine-cvs
mailing list