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
a306af0c
Commit
a306af0c
authored
Feb 18, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Reimplemented GetObject16 and moved it to gdi16.c.
parent
1fdae2b2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
24 deletions
+108
-24
gdi16.c
dlls/gdi32/gdi16.c
+108
-0
gdiobj.c
dlls/gdi32/gdiobj.c
+0
-24
No files found.
dlls/gdi32/gdi16.c
View file @
a306af0c
...
@@ -119,6 +119,25 @@ static void logfont_16_to_W( const LOGFONT16 *font16, LPLOGFONTW font32 )
...
@@ -119,6 +119,25 @@ static void logfont_16_to_W( const LOGFONT16 *font16, LPLOGFONTW font32 )
font32
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
font32
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
}
}
/* convert a LOGFONTW to a LOGFONT16 */
static
void
logfont_W_to_16
(
const
LOGFONTW
*
font32
,
LPLOGFONT16
font16
)
{
font16
->
lfHeight
=
font32
->
lfHeight
;
font16
->
lfWidth
=
font32
->
lfWidth
;
font16
->
lfEscapement
=
font32
->
lfEscapement
;
font16
->
lfOrientation
=
font32
->
lfOrientation
;
font16
->
lfWeight
=
font32
->
lfWeight
;
font16
->
lfItalic
=
font32
->
lfItalic
;
font16
->
lfUnderline
=
font32
->
lfUnderline
;
font16
->
lfStrikeOut
=
font32
->
lfStrikeOut
;
font16
->
lfCharSet
=
font32
->
lfCharSet
;
font16
->
lfOutPrecision
=
font32
->
lfOutPrecision
;
font16
->
lfClipPrecision
=
font32
->
lfClipPrecision
;
font16
->
lfQuality
=
font32
->
lfQuality
;
font16
->
lfPitchAndFamily
=
font32
->
lfPitchAndFamily
;
WideCharToMultiByte
(
CP_ACP
,
0
,
font32
->
lfFaceName
,
-
1
,
font16
->
lfFaceName
,
LF_FACESIZE
,
NULL
,
NULL
);
font16
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
}
/***********************************************************************
/***********************************************************************
* SetBkColor (GDI.1)
* SetBkColor (GDI.1)
...
@@ -1145,6 +1164,95 @@ INT16 WINAPI GetMapMode16( HDC16 hdc )
...
@@ -1145,6 +1164,95 @@ INT16 WINAPI GetMapMode16( HDC16 hdc )
/***********************************************************************
/***********************************************************************
* GetObject (GDI.82)
*/
INT16
WINAPI
GetObject16
(
HGDIOBJ16
handle16
,
INT16
count
,
LPVOID
buffer
)
{
HGDIOBJ
handle
=
HGDIOBJ_32
(
handle16
);
switch
(
GetObjectType
(
handle
))
{
case
OBJ_PEN
:
if
(
buffer
)
{
LOGPEN16
*
pen16
=
buffer
;
LOGPEN
pen
;
if
(
count
<
sizeof
(
LOGPEN16
))
return
0
;
if
(
!
GetObjectW
(
handle
,
sizeof
(
pen
),
&
pen
))
return
0
;
pen16
->
lopnStyle
=
pen
.
lopnStyle
;
pen16
->
lopnColor
=
pen
.
lopnColor
;
pen16
->
lopnWidth
.
x
=
pen
.
lopnWidth
.
x
;
pen16
->
lopnWidth
.
y
=
pen
.
lopnWidth
.
y
;
}
return
sizeof
(
LOGPEN16
);
case
OBJ_BRUSH
:
if
(
buffer
)
{
LOGBRUSH
brush
;
LOGBRUSH16
brush16
;
if
(
!
GetObjectW
(
handle
,
sizeof
(
brush
),
&
brush
))
return
0
;
brush16
.
lbStyle
=
brush
.
lbStyle
;
brush16
.
lbColor
=
brush
.
lbColor
;
brush16
.
lbHatch
=
brush
.
lbHatch
;
if
(
count
>
sizeof
(
brush16
))
count
=
sizeof
(
brush16
);
memcpy
(
buffer
,
&
brush16
,
count
);
return
count
;
}
return
sizeof
(
LOGBRUSH16
);
case
OBJ_PAL
:
return
GetObjectW
(
handle
,
count
,
buffer
);
case
OBJ_FONT
:
if
(
buffer
)
{
LOGFONTW
font
;
LOGFONT16
font16
;
if
(
!
GetObjectW
(
handle
,
sizeof
(
font
),
&
font
))
return
0
;
logfont_W_to_16
(
&
font
,
&
font16
);
if
(
count
>
sizeof
(
font16
))
count
=
sizeof
(
font16
);
memcpy
(
buffer
,
&
font16
,
count
);
return
count
;
}
return
sizeof
(
LOGFONT16
);
case
OBJ_BITMAP
:
{
DIBSECTION
dib
;
INT
size
;
BITMAP16
*
bmp16
=
buffer
;
if
(
!
(
size
=
GetObjectW
(
handle
,
sizeof
(
dib
),
&
dib
)))
return
0
;
if
(
size
==
sizeof
(
DIBSECTION
)
&&
count
>
sizeof
(
BITMAP16
))
{
FIXME
(
"not implemented for DIBs: count %d
\n
"
,
count
);
return
0
;
}
else
{
if
(
count
<
sizeof
(
BITMAP16
))
return
0
;
bmp16
->
bmType
=
dib
.
dsBm
.
bmType
;
bmp16
->
bmWidth
=
dib
.
dsBm
.
bmWidth
;
bmp16
->
bmHeight
=
dib
.
dsBm
.
bmHeight
;
bmp16
->
bmWidthBytes
=
dib
.
dsBm
.
bmWidthBytes
;
bmp16
->
bmPlanes
=
dib
.
dsBm
.
bmPlanes
;
bmp16
->
bmBitsPixel
=
dib
.
dsBm
.
bmBitsPixel
;
bmp16
->
bmBits
=
0
;
return
sizeof
(
BITMAP16
);
}
}
default:
return
0
;
}
}
/***********************************************************************
* GetPixel (GDI.83)
* GetPixel (GDI.83)
*/
*/
COLORREF
WINAPI
GetPixel16
(
HDC16
hdc
,
INT16
x
,
INT16
y
)
COLORREF
WINAPI
GetPixel16
(
HDC16
hdc
,
INT16
x
,
INT16
y
)
...
...
dlls/gdi32/gdiobj.c
View file @
a306af0c
...
@@ -944,30 +944,6 @@ HGDIOBJ WINAPI GetStockObject( INT obj )
...
@@ -944,30 +944,6 @@ HGDIOBJ WINAPI GetStockObject( INT obj )
/***********************************************************************
/***********************************************************************
* GetObject (GDI.82)
*/
INT16
WINAPI
GetObject16
(
HGDIOBJ16
handle16
,
INT16
count
,
LPVOID
buffer
)
{
GDIOBJHDR
*
ptr
;
HGDIOBJ
handle
=
HGDIOBJ_32
(
handle16
);
INT16
result
=
0
;
TRACE
(
"%p %d %p
\n
"
,
handle
,
count
,
buffer
);
if
(
!
count
)
return
0
;
if
(
!
(
ptr
=
GDI_GetObjPtr
(
handle
,
MAGIC_DONTCARE
)))
return
0
;
if
(
ptr
->
funcs
&&
ptr
->
funcs
->
pGetObject16
)
result
=
ptr
->
funcs
->
pGetObject16
(
handle
,
ptr
,
count
,
buffer
);
else
SetLastError
(
ERROR_INVALID_HANDLE
);
GDI_ReleaseObj
(
handle
);
return
result
;
}
/***********************************************************************
* GetObjectA (GDI32.@)
* GetObjectA (GDI32.@)
*/
*/
INT
WINAPI
GetObjectA
(
HGDIOBJ
handle
,
INT
count
,
LPVOID
buffer
)
INT
WINAPI
GetObjectA
(
HGDIOBJ
handle
,
INT
count
,
LPVOID
buffer
)
...
...
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