Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
8bdeffa4
Commit
8bdeffa4
authored
Jun 09, 2006
by
Jeff Latimer
Committed by
Alexandre Julliard
Jun 09, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: ScriptTextOut updated to reflect that it must have a hdc passed to it.
parent
d5d441d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
23 deletions
+20
-23
usp10.c
dlls/usp10/tests/usp10.c
+10
-8
usp10.c
dlls/usp10/usp10.c
+10
-15
No files found.
dlls/usp10/tests/usp10.c
View file @
8bdeffa4
...
...
@@ -363,13 +363,13 @@ void test_ScriptTextOut(void)
int
cMaxItems
;
SCRIPT_ITEM
pItem
[
255
];
int
pcItems
;
WCHAR
TestItem1
[
6
]
=
{
'T'
,
'e'
,
's'
,
't'
,
0x0166
,
0
};
WCHAR
TestItem1
[
6
]
=
{
'T'
,
'e'
,
's'
,
't'
,
'a'
,
0
};
SCRIPT_CACHE
psc
;
int
cChars
;
int
cMaxGlyphs
;
unsigned
short
pwOutGlyphs1
[
256
];
unsigned
short
pwLogClust
[
256
];
WORD
pwLogClust
[
256
];
SCRIPT_VISATTR
psva
[
256
];
int
pcGlyphs
;
int
piAdvance
[
256
];
...
...
@@ -422,7 +422,8 @@ void test_ScriptTextOut(void)
ok
(
psc
!=
NULL
,
"psc should not be null and have SCRIPT_CACHE buffer address
\n
"
);
ok
(
pcGlyphs
==
cChars
,
"Chars in (%d) should equal Glyphs out (%d)
\n
"
,
cChars
,
pcGlyphs
);
if
(
hr
==
0
)
{
hr
=
ScriptPlace
(
NULL
,
&
psc
,
pwOutGlyphs1
,
pcGlyphs
,
psva
,
&
pItem
[
0
].
a
,
piAdvance
,
/* Note hdc is needed as glyph info is not yet in psc */
hr
=
ScriptPlace
(
hdc
,
&
psc
,
pwOutGlyphs1
,
pcGlyphs
,
psva
,
&
pItem
[
0
].
a
,
piAdvance
,
pGoffset
,
pABC
);
ok
(
hr
==
0
,
"Should return 0 not (%08x)
\n
"
,
(
unsigned
int
)
hr
);
ScriptFreeCache
(
&
psc
);
/* Get rid of psc for next test set */
...
...
@@ -444,25 +445,26 @@ void test_ScriptTextOut(void)
"got %08x
\n
"
,
(
unsigned
int
)
hr
);
ok
(
psc
==
NULL
,
"Expected psc to be NULL, got %p
\n
"
,
psc
);
/* Set psc to NULL, to be able to check if a pointer is returned in psc */
/* Set psc to NULL, to be able to check if a pointer is returned in psc
* hdc is required for this one rather than the usual optional */
psc
=
NULL
;
hr
=
ScriptTextOut
(
NULL
,
&
psc
,
0
,
0
,
0
,
NULL
,
&
pItem
[
0
].
a
,
NULL
,
0
,
pwOutGlyphs1
,
pcGlyphs
,
piAdvance
,
NULL
,
pGoffset
);
ok
(
hr
==
E_
PENDING
,
"(NULL,&psc,), expected E_PENDIN
G, got %08x
\n
"
,
(
unsigned
int
)
hr
);
ok
(
hr
==
E_
INVALIDARG
,
"(NULL,&psc,), expected E_INVALIDAR
G, got %08x
\n
"
,
(
unsigned
int
)
hr
);
ok
(
psc
==
NULL
,
"Expected psc to be NULL, got %p
\n
"
,
psc
);
/* Se that is gets a psc and that returns 0 status */
/* Se
t
that is gets a psc and that returns 0 status */
hr
=
ScriptTextOut
(
hdc
,
&
psc
,
0
,
0
,
0
,
NULL
,
&
pItem
[
0
].
a
,
NULL
,
0
,
pwOutGlyphs1
,
pcGlyphs
,
piAdvance
,
NULL
,
pGoffset
);
ok
(
hr
==
0
,
"ScriptTextOut should return 0 not (%08x)
\n
"
,
(
unsigned
int
)
hr
);
ok
(
psc
!=
NULL
,
"psc should not be null and have SCRIPT_CACHE buffer address
\n
"
);
/* Test Rect Rgn is acceptable
and that it works without hdc
*/
/* Test Rect Rgn is acceptable */
rect
.
top
=
10
;
rect
.
bottom
=
20
;
rect
.
left
=
10
;
rect
.
right
=
40
;
hr
=
ScriptTextOut
(
NULL
,
&
psc
,
0
,
0
,
0
,
&
rect
,
&
pItem
[
0
].
a
,
NULL
,
0
,
pwOutGlyphs1
,
pcGlyphs
,
hr
=
ScriptTextOut
(
hdc
,
&
psc
,
0
,
0
,
0
,
&
rect
,
&
pItem
[
0
].
a
,
NULL
,
0
,
pwOutGlyphs1
,
pcGlyphs
,
piAdvance
,
NULL
,
pGoffset
);
ok
(
hr
==
0
,
"ScriptTextOut should return 0 not (%08x)
\n
"
,
(
unsigned
int
)
hr
);
ok
(
psc
!=
NULL
,
"psc should not be null and have SCRIPT_CACHE buffer address
\n
"
);
...
...
dlls/usp10/usp10.c
View file @
8bdeffa4
...
...
@@ -604,23 +604,18 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
hdc
,
psc
,
x
,
y
,
fuOptions
,
lprc
,
psa
,
pwcReserved
,
iReserved
,
pwGlyphs
,
cGlyphs
,
piAdvance
,
piJustify
,
pGoffset
);
if
(
!
psc
||
!
piAdvance
||
!
psa
||
!
pwGlyphs
)
if
(
!
hdc
||
!
psc
||
!
piAdvance
||
!
psa
||
!
pwGlyphs
)
/* hdc is mandatory */
return
E_INVALIDARG
;
if
(
!
hdc
&&
!*
psc
)
{
TRACE
(
"No Script_Cache (psc) and no hdc. Ask for one. Hdc=%p, psc=%p
\n
"
,
hdc
,
*
psc
);
return
E_PENDING
;
}
else
if
(
hdc
&&
!*
psc
)
{
pScriptcache
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
Scriptcache
)
);
pScriptcache
->
hdc
=
hdc
;
phdc
=
hdc
;
*
psc
=
pScriptcache
;
}
else
if
(
*
psc
)
{
pScriptcache
=
*
psc
;
phdc
=
pScriptcache
->
hdc
;
}
if
(
!*
psc
)
{
pScriptcache
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
Scriptcache
)
);
pScriptcache
->
hdc
=
hdc
;
phdc
=
hdc
;
*
psc
=
pScriptcache
;
}
else
{
pScriptcache
=
*
psc
;
phdc
=
pScriptcache
->
hdc
;
}
fuOptions
&=
ETO_CLIPPED
+
ETO_OPAQUE
;
if
(
!
psa
->
fNoGlyphIndex
)
/* Have Glyphs? */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment