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
67a9edbd
Commit
67a9edbd
authored
Feb 05, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Get rid of a few more uses of DC_GetDCPtr.
parent
b962fca7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
brush.c
dlls/gdi32/brush.c
+2
-2
dib.c
dlls/gdi32/dib.c
+8
-8
font.c
dlls/gdi32/font.c
+8
-8
No files found.
dlls/gdi32/brush.c
View file @
67a9edbd
...
@@ -336,7 +336,7 @@ HBRUSH WINAPI CreateSolidBrush( COLORREF color )
...
@@ -336,7 +336,7 @@ HBRUSH WINAPI CreateSolidBrush( COLORREF color )
*/
*/
BOOL
WINAPI
SetBrushOrgEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPPOINT
oldorg
)
BOOL
WINAPI
SetBrushOrgEx
(
HDC
hdc
,
INT
x
,
INT
y
,
LPPOINT
oldorg
)
{
{
DC
*
dc
=
DC_GetDCP
tr
(
hdc
);
DC
*
dc
=
get_dc_p
tr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
!
dc
)
return
FALSE
;
if
(
oldorg
)
if
(
oldorg
)
...
@@ -346,7 +346,7 @@ BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
...
@@ -346,7 +346,7 @@ BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
}
}
dc
->
brushOrgX
=
x
;
dc
->
brushOrgX
=
x
;
dc
->
brushOrgY
=
y
;
dc
->
brushOrgY
=
y
;
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/gdi32/dib.c
View file @
67a9edbd
...
@@ -376,7 +376,7 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
...
@@ -376,7 +376,7 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
UINT
result
=
0
;
UINT
result
=
0
;
BITMAPOBJ
*
bitmap
;
BITMAPOBJ
*
bitmap
;
if
(
!
(
dc
=
DC_GetDCP
tr
(
hdc
)))
return
0
;
if
(
!
(
dc
=
get_dc_p
tr
(
hdc
)))
return
0
;
if
((
bitmap
=
GDI_GetObjPtr
(
dc
->
hBitmap
,
BITMAP_MAGIC
)))
if
((
bitmap
=
GDI_GetObjPtr
(
dc
->
hBitmap
,
BITMAP_MAGIC
)))
{
{
...
@@ -396,7 +396,7 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
...
@@ -396,7 +396,7 @@ UINT WINAPI SetDIBColorTable( HDC hdc, UINT startpos, UINT entries, CONST RGBQUA
if
(
dc
->
funcs
->
pSetDIBColorTable
)
if
(
dc
->
funcs
->
pSetDIBColorTable
)
dc
->
funcs
->
pSetDIBColorTable
(
dc
->
physDev
,
startpos
,
entries
,
colors
);
dc
->
funcs
->
pSetDIBColorTable
(
dc
->
physDev
,
startpos
,
entries
,
colors
);
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
return
result
;
return
result
;
}
}
...
@@ -409,7 +409,7 @@ UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
...
@@ -409,7 +409,7 @@ UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
DC
*
dc
;
DC
*
dc
;
UINT
result
=
0
;
UINT
result
=
0
;
if
(
!
(
dc
=
DC_GetDCP
tr
(
hdc
)))
return
0
;
if
(
!
(
dc
=
get_dc_p
tr
(
hdc
)))
return
0
;
if
(
dc
->
funcs
->
pGetDIBColorTable
)
if
(
dc
->
funcs
->
pGetDIBColorTable
)
result
=
dc
->
funcs
->
pGetDIBColorTable
(
dc
->
physDev
,
startpos
,
entries
,
colors
);
result
=
dc
->
funcs
->
pGetDIBColorTable
(
dc
->
physDev
,
startpos
,
entries
,
colors
);
...
@@ -431,7 +431,7 @@ UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
...
@@ -431,7 +431,7 @@ UINT WINAPI GetDIBColorTable( HDC hdc, UINT startpos, UINT entries, RGBQUAD *col
GDI_ReleaseObj
(
dc
->
hBitmap
);
GDI_ReleaseObj
(
dc
->
hBitmap
);
}
}
}
}
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
return
result
;
return
result
;
}
}
...
@@ -1075,14 +1075,14 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
...
@@ -1075,14 +1075,14 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
{
{
if
(
init
==
CBM_INIT
)
SetDIBits
(
hdc
,
handle
,
0
,
height
,
bits
,
data
,
coloruse
);
if
(
init
==
CBM_INIT
)
SetDIBits
(
hdc
,
handle
,
0
,
height
,
bits
,
data
,
coloruse
);
else
if
(
hdc
&&
((
dc
=
DC_GetDCP
tr
(
hdc
))
!=
NULL
)
)
else
if
(
hdc
&&
((
dc
=
get_dc_p
tr
(
hdc
))
!=
NULL
)
)
{
{
if
(
!
BITMAP_SetOwnerDC
(
handle
,
dc
))
if
(
!
BITMAP_SetOwnerDC
(
handle
,
dc
))
{
{
DeleteObject
(
handle
);
DeleteObject
(
handle
);
handle
=
0
;
handle
=
0
;
}
}
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
}
}
}
}
...
@@ -1323,7 +1323,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
...
@@ -1323,7 +1323,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
bDesktopDC
=
TRUE
;
bDesktopDC
=
TRUE
;
}
}
if
(
!
(
dc
=
DC_GetDCP
tr
(
hdc
)))
goto
error
;
if
(
!
(
dc
=
get_dc_p
tr
(
hdc
)))
goto
error
;
/* create Device Dependent Bitmap and add DIB pointer */
/* create Device Dependent Bitmap and add DIB pointer */
ret
=
CreateBitmap
(
dib
->
dsBm
.
bmWidth
,
dib
->
dsBm
.
bmHeight
,
1
,
ret
=
CreateBitmap
(
dib
->
dsBm
.
bmWidth
,
dib
->
dsBm
.
bmHeight
,
1
,
...
@@ -1347,7 +1347,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
...
@@ -1347,7 +1347,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
}
}
}
}
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
if
(
bDesktopDC
)
DeleteDC
(
hdc
);
if
(
bDesktopDC
)
DeleteDC
(
hdc
);
if
(
ret
&&
bits
)
*
bits
=
dib
->
dsBm
.
bmBits
;
if
(
ret
&&
bits
)
*
bits
=
dib
->
dsBm
.
bmBits
;
return
ret
;
return
ret
;
...
...
dlls/gdi32/font.c
View file @
67a9edbd
...
@@ -1006,10 +1006,10 @@ INT WINAPI EnumFontsW( HDC hDC, LPCWSTR lpName, FONTENUMPROCW efproc,
...
@@ -1006,10 +1006,10 @@ INT WINAPI EnumFontsW( HDC hDC, LPCWSTR lpName, FONTENUMPROCW efproc,
INT
WINAPI
GetTextCharacterExtra
(
HDC
hdc
)
INT
WINAPI
GetTextCharacterExtra
(
HDC
hdc
)
{
{
INT
ret
;
INT
ret
;
DC
*
dc
=
DC_GetDCP
tr
(
hdc
);
DC
*
dc
=
get_dc_p
tr
(
hdc
);
if
(
!
dc
)
return
0x80000000
;
if
(
!
dc
)
return
0x80000000
;
ret
=
dc
->
charExtra
;
ret
=
dc
->
charExtra
;
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
return
ret
;
return
ret
;
}
}
...
@@ -1020,7 +1020,7 @@ INT WINAPI GetTextCharacterExtra( HDC hdc )
...
@@ -1020,7 +1020,7 @@ INT WINAPI GetTextCharacterExtra( HDC hdc )
INT
WINAPI
SetTextCharacterExtra
(
HDC
hdc
,
INT
extra
)
INT
WINAPI
SetTextCharacterExtra
(
HDC
hdc
,
INT
extra
)
{
{
INT
prev
;
INT
prev
;
DC
*
dc
=
DC_GetDCP
tr
(
hdc
);
DC
*
dc
=
get_dc_p
tr
(
hdc
);
if
(
!
dc
)
return
0x80000000
;
if
(
!
dc
)
return
0x80000000
;
if
(
dc
->
funcs
->
pSetTextCharacterExtra
)
if
(
dc
->
funcs
->
pSetTextCharacterExtra
)
prev
=
dc
->
funcs
->
pSetTextCharacterExtra
(
dc
->
physDev
,
extra
);
prev
=
dc
->
funcs
->
pSetTextCharacterExtra
(
dc
->
physDev
,
extra
);
...
@@ -1029,7 +1029,7 @@ INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
...
@@ -1029,7 +1029,7 @@ INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
prev
=
dc
->
charExtra
;
prev
=
dc
->
charExtra
;
dc
->
charExtra
=
extra
;
dc
->
charExtra
=
extra
;
}
}
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
return
prev
;
return
prev
;
}
}
...
@@ -1040,7 +1040,7 @@ INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
...
@@ -1040,7 +1040,7 @@ INT WINAPI SetTextCharacterExtra( HDC hdc, INT extra )
BOOL
WINAPI
SetTextJustification
(
HDC
hdc
,
INT
extra
,
INT
breaks
)
BOOL
WINAPI
SetTextJustification
(
HDC
hdc
,
INT
extra
,
INT
breaks
)
{
{
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
DC
*
dc
=
DC_GetDCP
tr
(
hdc
);
DC
*
dc
=
get_dc_p
tr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
funcs
->
pSetTextJustification
)
if
(
dc
->
funcs
->
pSetTextJustification
)
ret
=
dc
->
funcs
->
pSetTextJustification
(
dc
->
physDev
,
extra
,
breaks
);
ret
=
dc
->
funcs
->
pSetTextJustification
(
dc
->
physDev
,
extra
,
breaks
);
...
@@ -1059,7 +1059,7 @@ BOOL WINAPI SetTextJustification( HDC hdc, INT extra, INT breaks )
...
@@ -1059,7 +1059,7 @@ BOOL WINAPI SetTextJustification( HDC hdc, INT extra, INT breaks )
dc
->
breakRem
=
0
;
dc
->
breakRem
=
0
;
}
}
}
}
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
return
ret
;
return
ret
;
}
}
...
@@ -2425,7 +2425,7 @@ BOOL WINAPI PolyTextOutW( HDC hdc, const POLYTEXTW *pptxt, INT cStrings )
...
@@ -2425,7 +2425,7 @@ BOOL WINAPI PolyTextOutW( HDC hdc, const POLYTEXTW *pptxt, INT cStrings )
*/
*/
DWORD
WINAPI
SetMapperFlags
(
HDC
hDC
,
DWORD
dwFlag
)
DWORD
WINAPI
SetMapperFlags
(
HDC
hDC
,
DWORD
dwFlag
)
{
{
DC
*
dc
=
DC_GetDCP
tr
(
hDC
);
DC
*
dc
=
get_dc_p
tr
(
hDC
);
DWORD
ret
=
0
;
DWORD
ret
=
0
;
if
(
!
dc
)
return
0
;
if
(
!
dc
)
return
0
;
if
(
dc
->
funcs
->
pSetMapperFlags
)
if
(
dc
->
funcs
->
pSetMapperFlags
)
...
@@ -2435,7 +2435,7 @@ DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
...
@@ -2435,7 +2435,7 @@ DWORD WINAPI SetMapperFlags( HDC hDC, DWORD dwFlag )
}
}
else
else
FIXME
(
"(%p, 0x%08x): stub - harmless
\n
"
,
hDC
,
dwFlag
);
FIXME
(
"(%p, 0x%08x): stub - harmless
\n
"
,
hDC
,
dwFlag
);
DC_ReleaseDCP
tr
(
dc
);
release_dc_p
tr
(
dc
);
return
ret
;
return
ret
;
}
}
...
...
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