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
826e937a
Commit
826e937a
authored
Mar 26, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GdiGetCodePage.
parent
908cc50e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
15 deletions
+27
-15
font.c
dlls/gdi32/font.c
+24
-13
gdi32.spec
dlls/gdi32/gdi32.spec
+2
-2
wingdi.h
include/wingdi.h
+1
-0
No files found.
dlls/gdi32/font.c
View file @
826e937a
...
...
@@ -347,22 +347,11 @@ static void FONT_NewTextMetricExWToA(const NEWTEXTMETRICEXW *ptmW, NEWTEXTMETRIC
/***********************************************************************
* FONT_mbtowc
*
* Returns a Unicode translation of str using the charset of the
* currently selected font in hdc. If count is -1 then str is assumed
* to be '\0' terminated, otherwise it contains the number of bytes to
* convert. If plenW is non-NULL, on return it will point to the
* number of WCHARs that have been written. If pCP is non-NULL, on
* return it will point to the codepage used in the conversion. The
* caller should free the returned LPWSTR from the process heap
* itself.
* GdiGetCodePage (GDI32.@)
*/
static
LPWSTR
FONT_mbtowc
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
INT
*
plenW
,
UINT
*
pCP
)
DWORD
WINAPI
GdiGetCodePage
(
HDC
hdc
)
{
UINT
cp
=
CP_ACP
;
INT
lenW
;
LPWSTR
strW
;
CHARSETINFO
csi
;
int
charset
=
GetTextCharset
(
hdc
);
...
...
@@ -402,6 +391,28 @@ static LPWSTR FONT_mbtowc(HDC hdc, LPCSTR str, INT count, INT *plenW, UINT *pCP)
}
TRACE
(
"charset %d => cp %d
\n
"
,
charset
,
cp
);
return
cp
;
}
/***********************************************************************
* FONT_mbtowc
*
* Returns a Unicode translation of str using the charset of the
* currently selected font in hdc. If count is -1 then str is assumed
* to be '\0' terminated, otherwise it contains the number of bytes to
* convert. If plenW is non-NULL, on return it will point to the
* number of WCHARs that have been written. If pCP is non-NULL, on
* return it will point to the codepage used in the conversion. The
* caller should free the returned LPWSTR from the process heap
* itself.
*/
static
LPWSTR
FONT_mbtowc
(
HDC
hdc
,
LPCSTR
str
,
INT
count
,
INT
*
plenW
,
UINT
*
pCP
)
{
UINT
cp
;
INT
lenW
;
LPWSTR
strW
;
cp
=
GdiGetCodePage
(
hdc
);
if
(
count
==
-
1
)
count
=
strlen
(
str
);
lenW
=
MultiByteToWideChar
(
cp
,
0
,
str
,
count
,
NULL
,
0
);
...
...
dlls/gdi32/gdi32.spec
View file @
826e937a
...
...
@@ -178,8 +178,8 @@
@ stdcall GdiFlush()
# @ stub GdiFullscreenControl
@ stdcall GdiGetBatchLimit()
@ stdcall GdiGetCharDimensions(
ptr
ptr ptr)
# @ stub GdiGetCodePage
@ stdcall GdiGetCharDimensions(
long
ptr ptr)
@ stdcall GdiGetCodePage(long)
# @ stub GdiGetDC
# @ stub GdiGetDevmodeForPage
@ stub GdiGetLocalBitmap
...
...
include/wingdi.h
View file @
826e937a
...
...
@@ -3396,6 +3396,7 @@ BOOL WINAPI GdiComment(HDC,UINT,const BYTE *);
DEVMODEW
*
WINAPI
GdiConvertToDevmodeW
(
const
DEVMODEA
*
);
BOOL
WINAPI
GdiFlush
(
void
);
LONG
WINAPI
GdiGetCharDimensions
(
HDC
,
LPTEXTMETRICW
,
LONG
*
);
DWORD
WINAPI
GdiGetCodePage
(
HDC
);
BOOL
WINAPI
GdiGradientFill
(
HDC
,
PTRIVERTEX
,
ULONG
,
PVOID
,
ULONG
,
ULONG
);
BOOL
WINAPI
GdiIsMetaFileDC
(
HDC
);
BOOL
WINAPI
GdiIsMetaPrintDC
(
HDC
);
...
...
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