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
f49d360f
Commit
f49d360f
authored
Sep 28, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Added IDWriteTextLayout stub.
parent
810ceb86
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
5 deletions
+102
-5
Makefile.in
dlls/dwrite/Makefile.in
+1
-0
dwrite_private.h
dlls/dwrite/dwrite_private.h
+2
-1
layout.c
dlls/dwrite/layout.c
+0
-0
main.c
dlls/dwrite/main.c
+7
-3
Makefile.in
dlls/dwrite/tests/Makefile.in
+2
-1
layout.c
dlls/dwrite/tests/layout.c
+90
-0
No files found.
dlls/dwrite/Makefile.in
View file @
f49d360f
...
...
@@ -5,6 +5,7 @@ IMPORTS = gdi32
C_SRCS
=
\
font.c
\
gdiinterop.c
\
layout.c
\
main.c
@MAKE_DLL_RULES@
dlls/dwrite/dwrite_private.h
View file @
f49d360f
...
...
@@ -26,5 +26,6 @@ static inline BOOL heap_free(void *mem)
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
extern
HRESULT
create_gdiinterop
(
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_font_from_logfont
(
const
LOGFONTW
*
,
IDWriteFont
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_textlayout
(
IDWriteTextLayout
**
)
DECLSPEC_HIDDEN
;
extern
HRESULT
create_gdiinterop
(
IDWriteGdiInterop
**
)
DECLSPEC_HIDDEN
;
dlls/dwrite/layout.c
0 → 100644
View file @
f49d360f
This diff is collapsed.
Click to expand it.
dlls/dwrite/main.c
View file @
f49d360f
...
...
@@ -177,16 +177,20 @@ static HRESULT WINAPI dwritefactory_CreateTextLayout(IDWriteFactory *iface, WCHA
UINT32
len
,
IDWriteTextFormat
*
format
,
FLOAT
max_width
,
FLOAT
max_height
,
IDWriteTextLayout
**
layout
)
{
FIXME
(
"(%s %u %p %f %f %p): stub
\n
"
,
debugstr_w
(
string
),
len
,
format
,
max_width
,
max_height
,
layout
);
return
E_NOTIMPL
;
if
(
!
format
)
return
E_INVALIDARG
;
return
create_textlayout
(
layout
);
}
static
HRESULT
WINAPI
dwritefactory_CreateGdiCompatibleTextLayout
(
IDWriteFactory
*
iface
,
WCHAR
const
*
string
,
UINT32
len
,
IDWriteTextFormat
*
format
,
FLOAT
layout_width
,
FLOAT
layout_height
,
FLOAT
pixels_per_dip
,
DWRITE_MATRIX
const
*
transform
,
BOOL
use_gdi_natural
,
IDWriteTextLayout
**
layout
)
{
FIXME
(
"(%s:%u %p %f %f %f %p %d %p): stub
\n
"
,
debugstr_wn
(
string
,
len
),
len
,
format
,
layout_width
,
layout_height
,
FIXME
(
"(%s:%u %p %f %f %f %p %d %p): s
emi-s
tub
\n
"
,
debugstr_wn
(
string
,
len
),
len
,
format
,
layout_width
,
layout_height
,
pixels_per_dip
,
transform
,
use_gdi_natural
,
layout
);
return
E_NOTIMPL
;
if
(
!
format
)
return
E_INVALIDARG
;
return
create_textlayout
(
layout
);
}
static
HRESULT
WINAPI
dwritefactory_CreateEllipsisTrimmingSign
(
IDWriteFactory
*
iface
,
IDWriteTextFormat
*
format
,
...
...
dlls/dwrite/tests/Makefile.in
View file @
f49d360f
...
...
@@ -2,6 +2,7 @@ TESTDLL = dwrite.dll
IMPORTS
=
dwrite gdi32
C_SRCS
=
\
font.c
font.c
\
layout.c
@MAKE_TEST_RULES@
dlls/dwrite/tests/layout.c
0 → 100644
View file @
f49d360f
/*
* Text layout/format tests
*
* Copyright 2012 Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "windows.h"
#include "dwrite.h"
#include "wine/test.h"
static
IDWriteFactory
*
factory
;
static
void
test_CreateTextLayout
(
void
)
{
static
const
WCHAR
strW
[]
=
{
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
IDWriteTextLayout
*
layout
;
HRESULT
hr
;
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
NULL
,
0
,
NULL
,
0
.
0
,
0
.
0
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
6
,
NULL
,
0
.
0
,
0
.
0
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
6
,
NULL
,
1
.
0
,
0
.
0
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
6
,
NULL
,
0
.
0
,
1
.
0
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateTextLayout
(
factory
,
strW
,
6
,
NULL
,
1000
.
0
,
1000
.
0
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
}
static
void
test_CreateGdiCompatibleTextLayout
(
void
)
{
static
const
WCHAR
strW
[]
=
{
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
IDWriteTextLayout
*
layout
;
HRESULT
hr
;
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
NULL
,
0
,
NULL
,
0
.
0
,
0
.
0
,
0
.
0
,
NULL
,
FALSE
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
NULL
,
0
.
0
,
0
.
0
,
0
.
0
,
NULL
,
FALSE
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
NULL
,
1
.
0
,
0
.
0
,
0
.
0
,
NULL
,
FALSE
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
NULL
,
1
.
0
,
0
.
0
,
1
.
0
,
NULL
,
FALSE
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
NULL
,
1000
.
0
,
1000
.
0
,
1
.
0
,
NULL
,
FALSE
,
&
layout
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
}
START_TEST
(
layout
)
{
HRESULT
hr
;
hr
=
DWriteCreateFactory
(
DWRITE_FACTORY_TYPE_ISOLATED
,
&
IID_IDWriteFactory
,
(
IUnknown
**
)
&
factory
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
win_skip
(
"failed to create factory
\n
"
);
return
;
}
test_CreateTextLayout
();
test_CreateGdiCompatibleTextLayout
();
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