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
adc63287
Commit
adc63287
authored
Mar 09, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add null driver entry points for the object selection functions.
parent
6d9ebd05
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
20 deletions
+60
-20
bitmap.c
dlls/gdi32/bitmap.c
+3
-1
brush.c
dlls/gdi32/brush.c
+3
-1
dc.c
dlls/gdi32/dc.c
+4
-2
driver.c
dlls/gdi32/driver.c
+36
-6
font.c
dlls/gdi32/font.c
+3
-1
gdiobj.c
dlls/gdi32/gdiobj.c
+2
-4
palette.c
dlls/gdi32/palette.c
+6
-4
pen.c
dlls/gdi32/pen.c
+3
-1
No files found.
dlls/gdi32/bitmap.c
View file @
adc63287
...
...
@@ -600,6 +600,7 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
HGDIOBJ
ret
;
BITMAPOBJ
*
bitmap
;
DC
*
dc
;
PHYSDEV
physdev
;
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
return
0
;
...
...
@@ -632,7 +633,8 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
goto
done
;
}
if
(
dc
->
funcs
->
pSelectBitmap
&&
!
dc
->
funcs
->
pSelectBitmap
(
dc
->
physDev
,
handle
))
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBitmap
);
if
(
!
physdev
->
funcs
->
pSelectBitmap
(
physdev
,
handle
))
{
GDI_ReleaseObj
(
handle
);
ret
=
0
;
...
...
dlls/gdi32/brush.c
View file @
adc63287
...
...
@@ -387,13 +387,15 @@ static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc )
if
((
brush
=
GDI_GetObjPtr
(
handle
,
OBJ_BRUSH
)))
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBrush
);
if
(
brush
->
logbrush
.
lbStyle
==
BS_PATTERN
)
BITMAP_SetOwnerDC
(
(
HBITMAP
)
brush
->
logbrush
.
lbHatch
,
dc
);
GDI_inc_ref_count
(
handle
);
GDI_ReleaseObj
(
handle
);
if
(
dc
->
funcs
->
pSelectBrush
&&
!
dc
->
funcs
->
pSelectBrush
(
dc
->
physD
ev
,
handle
))
if
(
!
physdev
->
funcs
->
pSelectBrush
(
physd
ev
,
handle
))
{
GDI_dec_ref_count
(
handle
);
}
...
...
dlls/gdi32/dc.c
View file @
adc63287
...
...
@@ -2057,7 +2057,8 @@ COLORREF WINAPI SetDCBrushColor(HDC hdc, COLORREF crColor)
{
/* If DC_BRUSH is selected, update driver pen color */
HBRUSH
hBrush
=
CreateSolidBrush
(
crColor
);
dc
->
funcs
->
pSelectBrush
(
dc
->
physDev
,
hBrush
);
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectBrush
);
physdev
->
funcs
->
pSelectBrush
(
physdev
,
hBrush
);
DeleteObject
(
hBrush
);
}
...
...
@@ -2122,7 +2123,8 @@ COLORREF WINAPI SetDCPenColor(HDC hdc, COLORREF crColor)
/* If DC_PEN is selected, update the driver pen color */
LOGPEN
logpen
=
{
PS_SOLID
,
{
0
,
0
},
crColor
};
HPEN
hPen
=
CreatePenIndirect
(
&
logpen
);
dc
->
funcs
->
pSelectPen
(
dc
->
physDev
,
hPen
);
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectPen
);
physdev
->
funcs
->
pSelectPen
(
physdev
,
hPen
);
DeleteObject
(
hPen
);
}
...
...
dlls/gdi32/driver.c
View file @
adc63287
...
...
@@ -329,6 +329,11 @@ static BOOL CDECL nulldrv_Chord( PHYSDEV dev, INT left, INT top, INT right, INT
return
TRUE
;
}
static
BOOL
CDECL
nulldrv_DeleteObject
(
PHYSDEV
dev
,
HGDIOBJ
obj
)
{
return
TRUE
;
}
static
BOOL
CDECL
nulldrv_Ellipse
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
{
return
TRUE
;
...
...
@@ -408,6 +413,31 @@ static BOOL CDECL nulldrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right,
return
TRUE
;
}
static
HBITMAP
CDECL
nulldrv_SelectBitmap
(
PHYSDEV
dev
,
HBITMAP
bitmap
)
{
return
bitmap
;
}
static
HBRUSH
CDECL
nulldrv_SelectBrush
(
PHYSDEV
dev
,
HBRUSH
brush
)
{
return
brush
;
}
static
HFONT
CDECL
nulldrv_SelectFont
(
PHYSDEV
dev
,
HFONT
font
,
HANDLE
gdi_font
)
{
return
0
;
}
static
HPALETTE
CDECL
nulldrv_SelectPalette
(
PHYSDEV
dev
,
HPALETTE
palette
,
BOOL
bkgnd
)
{
return
palette
;
}
static
HPEN
CDECL
nulldrv_SelectPen
(
PHYSDEV
dev
,
HPEN
pen
)
{
return
pen
;
}
static
void
CDECL
nulldrv_SetDeviceClipping
(
PHYSDEV
dev
,
HRGN
vis_rgn
,
HRGN
clip_rgn
)
{
}
...
...
@@ -506,7 +536,7 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pCreateDIBSection */
NULL
,
/* pDeleteBitmap */
NULL
,
/* pDeleteDC */
NULL
,
/* pDeleteObject */
nulldrv_DeleteObject
,
/* pDeleteObject */
NULL
,
/* pDescribePixelFormat */
NULL
,
/* pDeviceCapabilities */
nulldrv_Ellipse
,
/* pEllipse */
...
...
@@ -566,12 +596,12 @@ const DC_FUNCTIONS null_driver =
NULL
,
/* pSaveDC */
nulldrv_ScaleViewportExtEx
,
/* pScaleViewportExt */
nulldrv_ScaleWindowExtEx
,
/* pScaleWindowExt */
NULL
,
/* pSelectBitmap */
NULL
,
/* pSelectBrush */
nulldrv_SelectBitmap
,
/* pSelectBitmap */
nulldrv_SelectBrush
,
/* pSelectBrush */
NULL
,
/* pSelectClipPath */
NULL
,
/* pSelectFont */
NULL
,
/* pSelectPalette */
NULL
,
/* pSelectPen */
nulldrv_SelectFont
,
/* pSelectFont */
nulldrv_SelectPalette
,
/* pSelectPalette */
nulldrv_SelectPen
,
/* pSelectPen */
NULL
,
/* pSetArcDirection */
NULL
,
/* pSetBitmapBits */
NULL
,
/* pSetBkColor */
...
...
dlls/gdi32/font.c
View file @
adc63287
...
...
@@ -529,6 +529,7 @@ static HGDIOBJ FONT_SelectObject( HGDIOBJ handle, HDC hdc )
{
HGDIOBJ
ret
=
0
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
PHYSDEV
physdev
;
if
(
!
dc
)
return
0
;
...
...
@@ -541,7 +542,8 @@ static HGDIOBJ FONT_SelectObject( HGDIOBJ handle, HDC hdc )
if
(
GetDeviceCaps
(
dc
->
hSelf
,
TEXTCAPS
)
&
TC_VA_ABLE
)
dc
->
gdiFont
=
WineEngCreateFontInstance
(
dc
,
handle
);
if
(
dc
->
funcs
->
pSelectFont
)
ret
=
dc
->
funcs
->
pSelectFont
(
dc
->
physDev
,
handle
,
dc
->
gdiFont
);
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectFont
);
ret
=
physdev
->
funcs
->
pSelectFont
(
physdev
,
handle
,
dc
->
gdiFont
);
if
(
ret
&&
dc
->
gdiFont
)
dc
->
gdiFont
=
0
;
...
...
dlls/gdi32/gdiobj.c
View file @
adc63287
...
...
@@ -845,12 +845,10 @@ BOOL WINAPI DeleteObject( HGDIOBJ obj )
if
(
dc
)
{
if
(
dc
->
funcs
->
pDeleteObject
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pDeleteObject
);
GDI_ReleaseObj
(
obj
);
/* release the GDI lock */
dc
->
funcs
->
pDeleteObject
(
dc
->
physD
ev
,
obj
);
physdev
->
funcs
->
pDeleteObject
(
physd
ev
,
obj
);
header
=
GDI_GetObjPtr
(
obj
,
0
);
/* and grab it again */
}
release_dc_ptr
(
dc
);
}
HeapFree
(
GetProcessHeap
(),
0
,
hdcs_head
);
...
...
dlls/gdi32/palette.c
View file @
adc63287
...
...
@@ -689,7 +689,7 @@ static BOOL PALETTE_DeleteObject( HGDIOBJ handle )
*/
HPALETTE
WINAPI
GDISelectPalette
(
HDC
hdc
,
HPALETTE
hpal
,
WORD
wBkg
)
{
HPALETTE
ret
;
HPALETTE
ret
=
0
;
DC
*
dc
;
TRACE
(
"%p %p
\n
"
,
hdc
,
hpal
);
...
...
@@ -699,16 +699,18 @@ HPALETTE WINAPI GDISelectPalette( HDC hdc, HPALETTE hpal, WORD wBkg)
WARN
(
"invalid selected palette %p
\n
"
,
hpal
);
return
0
;
}
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
return
0
;
if
((
dc
=
get_dc_ptr
(
hdc
)))
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectPalette
);
ret
=
dc
->
hPalette
;
if
(
dc
->
funcs
->
pSelectPalette
)
hpal
=
dc
->
funcs
->
pSelectPalette
(
dc
->
physDev
,
hpal
,
FALSE
);
if
(
hpal
)
if
(
physdev
->
funcs
->
pSelectPalette
(
physdev
,
hpal
,
FALSE
))
{
dc
->
hPalette
=
hpal
;
if
(
!
wBkg
)
hPrimaryPalette
=
hpal
;
}
else
ret
=
0
;
release_dc_ptr
(
dc
);
}
return
ret
;
}
...
...
dlls/gdi32/pen.c
View file @
adc63287
...
...
@@ -219,6 +219,7 @@ HPEN WINAPI ExtCreatePen( DWORD style, DWORD width,
*/
static
HGDIOBJ
PEN_SelectObject
(
HGDIOBJ
handle
,
HDC
hdc
)
{
PHYSDEV
physdev
;
HGDIOBJ
ret
=
0
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
...
...
@@ -234,7 +235,8 @@ static HGDIOBJ PEN_SelectObject( HGDIOBJ handle, HDC hdc )
return
0
;
}
if
(
dc
->
funcs
->
pSelectPen
&&
!
dc
->
funcs
->
pSelectPen
(
dc
->
physDev
,
handle
))
physdev
=
GET_DC_PHYSDEV
(
dc
,
pSelectPen
);
if
(
!
physdev
->
funcs
->
pSelectPen
(
physdev
,
handle
))
{
GDI_dec_ref_count
(
handle
);
}
...
...
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