Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a935716f
Commit
a935716f
authored
May 16, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/tests: Get rid of global script analysis variable.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cc610a09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
layout.c
dlls/dwrite/tests/layout.c
+18
-5
No files found.
dlls/dwrite/tests/layout.c
View file @
a935716f
...
...
@@ -32,7 +32,16 @@
static
const
WCHAR
tahomaW
[]
=
{
'T'
,
'a'
,
'h'
,
'o'
,
'm'
,
'a'
,
0
};
static
const
WCHAR
enusW
[]
=
{
'e'
,
'n'
,
'-'
,
'u'
,
's'
,
0
};
static
DWRITE_SCRIPT_ANALYSIS
g_sa
;
struct
testanalysissink
{
IDWriteTextAnalysisSink
IDWriteTextAnalysisSink_iface
;
DWRITE_SCRIPT_ANALYSIS
sa
;
/* last analysis, with SetScriptAnalysis() */
};
static
inline
struct
testanalysissink
*
impl_from_IDWriteTextAnalysisSink
(
IDWriteTextAnalysisSink
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
testanalysissink
,
IDWriteTextAnalysisSink_iface
);
}
/* test IDWriteTextAnalysisSink */
static
HRESULT
WINAPI
analysissink_QueryInterface
(
IDWriteTextAnalysisSink
*
iface
,
REFIID
riid
,
void
**
obj
)
...
...
@@ -60,7 +69,8 @@ static ULONG WINAPI analysissink_Release(IDWriteTextAnalysisSink *iface)
static
HRESULT
WINAPI
analysissink_SetScriptAnalysis
(
IDWriteTextAnalysisSink
*
iface
,
UINT32
position
,
UINT32
length
,
DWRITE_SCRIPT_ANALYSIS
const
*
sa
)
{
g_sa
=
*
sa
;
struct
testanalysissink
*
sink
=
impl_from_IDWriteTextAnalysisSink
(
iface
);
sink
->
sa
=
*
sa
;
return
S_OK
;
}
...
...
@@ -95,7 +105,10 @@ static IDWriteTextAnalysisSinkVtbl analysissinkvtbl = {
analysissink_SetNumberSubstitution
};
static
IDWriteTextAnalysisSink
analysissink
=
{
&
analysissinkvtbl
};
static
struct
testanalysissink
analysissink
=
{
{
&
analysissinkvtbl
},
{
0
}
};
/* test IDWriteTextAnalysisSource */
static
HRESULT
WINAPI
analysissource_QueryInterface
(
IDWriteTextAnalysisSource
*
iface
,
...
...
@@ -202,10 +215,10 @@ static void get_script_analysis(const WCHAR *str, UINT32 len, DWRITE_SCRIPT_ANAL
hr
=
IDWriteFactory_CreateTextAnalyzer
(
factory
,
&
analyzer
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextAnalyzer_AnalyzeScript
(
analyzer
,
&
analysissource
,
0
,
len
,
&
analysissink
);
hr
=
IDWriteTextAnalyzer_AnalyzeScript
(
analyzer
,
&
analysissource
,
0
,
len
,
&
analysissink
.
IDWriteTextAnalysisSink_iface
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
*
sa
=
g_
sa
;
*
sa
=
analysissink
.
sa
;
IDWriteFactory_Release
(
factory
);
}
...
...
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