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
df357093
Commit
df357093
authored
Oct 17, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Get rid of the GDIOBJHDR type.
parent
3964aa4a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
22 deletions
+11
-22
bitmap.c
dlls/gdi32/bitmap.c
+1
-1
brush.c
dlls/gdi32/brush.c
+1
-2
dc.c
dlls/gdi32/dc.c
+1
-1
dib.c
dlls/gdi32/dib.c
+1
-1
enhmetafile.c
dlls/gdi32/enhmetafile.c
+1
-2
font.c
dlls/gdi32/font.c
+1
-2
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-6
gdiobj.c
dlls/gdi32/gdiobj.c
+2
-2
palette.c
dlls/gdi32/palette.c
+1
-2
pen.c
dlls/gdi32/pen.c
+2
-3
No files found.
dlls/gdi32/bitmap.c
View file @
df357093
...
@@ -211,7 +211,7 @@ HBITMAP WINAPI CreateBitmapIndirect( const BITMAP *bmp )
...
@@ -211,7 +211,7 @@ HBITMAP WINAPI CreateBitmapIndirect( const BITMAP *bmp )
bmpobj
->
dib
.
dsBm
=
bm
;
bmpobj
->
dib
.
dsBm
=
bm
;
bmpobj
->
dib
.
dsBm
.
bmBits
=
NULL
;
bmpobj
->
dib
.
dsBm
.
bmBits
=
NULL
;
if
(
!
(
hbitmap
=
alloc_gdi_handle
(
&
bmpobj
->
header
,
OBJ_BITMAP
,
&
bitmap_funcs
)))
if
(
!
(
hbitmap
=
alloc_gdi_handle
(
bmpobj
,
OBJ_BITMAP
,
&
bitmap_funcs
)))
{
{
HeapFree
(
GetProcessHeap
(),
0
,
bmpobj
);
HeapFree
(
GetProcessHeap
(),
0
,
bmpobj
);
return
0
;
return
0
;
...
...
dlls/gdi32/brush.c
View file @
df357093
...
@@ -34,7 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
...
@@ -34,7 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
/* GDI logical brush object */
/* GDI logical brush object */
typedef
struct
typedef
struct
{
{
GDIOBJHDR
header
;
LOGBRUSH
logbrush
;
LOGBRUSH
logbrush
;
struct
brush_pattern
pattern
;
struct
brush_pattern
pattern
;
}
BRUSHOBJ
;
}
BRUSHOBJ
;
...
@@ -201,7 +200,7 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
...
@@ -201,7 +200,7 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
ptr
->
logbrush
=
*
brush
;
ptr
->
logbrush
=
*
brush
;
if
(
store_brush_pattern
(
&
ptr
->
logbrush
,
&
ptr
->
pattern
)
&&
if
(
store_brush_pattern
(
&
ptr
->
logbrush
,
&
ptr
->
pattern
)
&&
(
hbrush
=
alloc_gdi_handle
(
&
ptr
->
heade
r
,
OBJ_BRUSH
,
&
brush_funcs
)))
(
hbrush
=
alloc_gdi_handle
(
pt
r
,
OBJ_BRUSH
,
&
brush_funcs
)))
{
{
TRACE
(
"%p
\n
"
,
hbrush
);
TRACE
(
"%p
\n
"
,
hbrush
);
return
hbrush
;
return
hbrush
;
...
...
dlls/gdi32/dc.c
View file @
df357093
...
@@ -118,7 +118,7 @@ DC *alloc_dc_ptr( WORD magic )
...
@@ -118,7 +118,7 @@ DC *alloc_dc_ptr( WORD magic )
reset_bounds
(
&
dc
->
bounds
);
reset_bounds
(
&
dc
->
bounds
);
if
(
!
(
dc
->
hSelf
=
alloc_gdi_handle
(
&
dc
->
header
,
magic
,
&
dc_funcs
)))
if
(
!
(
dc
->
hSelf
=
alloc_gdi_handle
(
dc
,
magic
,
&
dc_funcs
)))
{
{
HeapFree
(
GetProcessHeap
(),
0
,
dc
);
HeapFree
(
GetProcessHeap
(),
0
,
dc
);
return
NULL
;
return
NULL
;
...
...
dlls/gdi32/dib.c
View file @
df357093
...
@@ -1549,7 +1549,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
...
@@ -1549,7 +1549,7 @@ HBITMAP WINAPI CreateDIBSection(HDC hdc, CONST BITMAPINFO *bmi, UINT usage,
if
(
!
bmp
->
dib
.
dsBm
.
bmBits
)
goto
error
;
if
(
!
bmp
->
dib
.
dsBm
.
bmBits
)
goto
error
;
if
(
!
(
ret
=
alloc_gdi_handle
(
&
bmp
->
header
,
OBJ_BITMAP
,
&
dib_funcs
)))
goto
error
;
if
(
!
(
ret
=
alloc_gdi_handle
(
bmp
,
OBJ_BITMAP
,
&
dib_funcs
)))
goto
error
;
if
(
bits
)
*
bits
=
bmp
->
dib
.
dsBm
.
bmBits
;
if
(
bits
)
*
bits
=
bmp
->
dib
.
dsBm
.
bmBits
;
return
ret
;
return
ret
;
...
...
dlls/gdi32/enhmetafile.c
View file @
df357093
...
@@ -50,7 +50,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile);
...
@@ -50,7 +50,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(enhmetafile);
typedef
struct
typedef
struct
{
{
GDIOBJHDR
header
;
ENHMETAHEADER
*
emh
;
ENHMETAHEADER
*
emh
;
BOOL
on_disk
;
/* true if metafile is on disk */
BOOL
on_disk
;
/* true if metafile is on disk */
}
ENHMETAFILEOBJ
;
}
ENHMETAFILEOBJ
;
...
@@ -270,7 +269,7 @@ HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk )
...
@@ -270,7 +269,7 @@ HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk )
metaObj
->
emh
=
emh
;
metaObj
->
emh
=
emh
;
metaObj
->
on_disk
=
on_disk
;
metaObj
->
on_disk
=
on_disk
;
if
(
!
(
hmf
=
alloc_gdi_handle
(
&
metaObj
->
header
,
OBJ_ENHMETAFILE
,
NULL
)))
if
(
!
(
hmf
=
alloc_gdi_handle
(
metaObj
,
OBJ_ENHMETAFILE
,
NULL
)))
HeapFree
(
GetProcessHeap
(),
0
,
metaObj
);
HeapFree
(
GetProcessHeap
(),
0
,
metaObj
);
return
hmf
;
return
hmf
;
}
}
...
...
dlls/gdi32/font.c
View file @
df357093
...
@@ -110,7 +110,6 @@ static const struct gdi_obj_funcs font_funcs =
...
@@ -110,7 +110,6 @@ static const struct gdi_obj_funcs font_funcs =
typedef
struct
typedef
struct
{
{
GDIOBJHDR
header
;
LOGFONTW
logfont
;
LOGFONTW
logfont
;
}
FONTOBJ
;
}
FONTOBJ
;
...
@@ -447,7 +446,7 @@ HFONT WINAPI CreateFontIndirectExW( const ENUMLOGFONTEXDVW *penumex )
...
@@ -447,7 +446,7 @@ HFONT WINAPI CreateFontIndirectExW( const ENUMLOGFONTEXDVW *penumex )
plf
->
lfOrientation
/
10
.,
plf
->
lfEscapement
/
10
.,
fontPtr
);
plf
->
lfOrientation
/
10
.,
plf
->
lfEscapement
/
10
.,
fontPtr
);
}
}
if
(
!
(
hFont
=
alloc_gdi_handle
(
&
fontPtr
->
heade
r
,
OBJ_FONT
,
&
font_funcs
)))
if
(
!
(
hFont
=
alloc_gdi_handle
(
fontPt
r
,
OBJ_FONT
,
&
font_funcs
)))
{
{
HeapFree
(
GetProcessHeap
(),
0
,
fontPtr
);
HeapFree
(
GetProcessHeap
(),
0
,
fontPtr
);
return
0
;
return
0
;
...
...
dlls/gdi32/gdi_private.h
View file @
df357093
...
@@ -57,15 +57,10 @@ struct gdi_obj_funcs
...
@@ -57,15 +57,10 @@ struct gdi_obj_funcs
BOOL
(
*
pDeleteObject
)(
HGDIOBJ
handle
);
BOOL
(
*
pDeleteObject
)(
HGDIOBJ
handle
);
};
};
typedef
struct
tagGDIOBJHDR
{
}
GDIOBJHDR
;
typedef
struct
tagGdiFont
GdiFont
;
typedef
struct
tagGdiFont
GdiFont
;
typedef
struct
tagDC
typedef
struct
tagDC
{
{
GDIOBJHDR
header
;
HDC
hSelf
;
/* Handle to this DC */
HDC
hSelf
;
/* Handle to this DC */
struct
gdi_physdev
nulldrv
;
/* physdev for the null driver */
struct
gdi_physdev
nulldrv
;
/* physdev for the null driver */
PHYSDEV
physDev
;
/* current top of the physdev stack */
PHYSDEV
physDev
;
/* current top of the physdev stack */
...
@@ -180,7 +175,6 @@ static inline PHYSDEV find_dc_driver( DC *dc, const struct gdi_dc_funcs *funcs )
...
@@ -180,7 +175,6 @@ static inline PHYSDEV find_dc_driver( DC *dc, const struct gdi_dc_funcs *funcs )
typedef
struct
tagBITMAPOBJ
typedef
struct
tagBITMAPOBJ
{
{
GDIOBJHDR
header
;
DIBSECTION
dib
;
DIBSECTION
dib
;
SIZE
size
;
/* For SetBitmapDimension() */
SIZE
size
;
/* For SetBitmapDimension() */
RGBQUAD
*
color_table
;
/* DIB color table if <= 8bpp (always 1 << bpp in size) */
RGBQUAD
*
color_table
;
/* DIB color table if <= 8bpp (always 1 << bpp in size) */
...
...
dlls/gdi32/gdiobj.c
View file @
df357093
...
@@ -744,7 +744,7 @@ HGDIOBJ alloc_gdi_handle( void *obj, WORD type, const struct gdi_obj_funcs *func
...
@@ -744,7 +744,7 @@ HGDIOBJ alloc_gdi_handle( void *obj, WORD type, const struct gdi_obj_funcs *func
*/
*/
void
*
free_gdi_handle
(
HGDIOBJ
handle
)
void
*
free_gdi_handle
(
HGDIOBJ
handle
)
{
{
GDIOBJHDR
*
object
=
NULL
;
void
*
object
=
NULL
;
struct
gdi_handle_entry
*
entry
;
struct
gdi_handle_entry
*
entry
;
EnterCriticalSection
(
&
gdi_section
);
EnterCriticalSection
(
&
gdi_section
);
...
@@ -769,7 +769,7 @@ void *free_gdi_handle( HGDIOBJ handle )
...
@@ -769,7 +769,7 @@ void *free_gdi_handle( HGDIOBJ handle )
*/
*/
void
*
GDI_GetObjPtr
(
HGDIOBJ
handle
,
WORD
type
)
void
*
GDI_GetObjPtr
(
HGDIOBJ
handle
,
WORD
type
)
{
{
GDIOBJHDR
*
ptr
=
NULL
;
void
*
ptr
=
NULL
;
struct
gdi_handle_entry
*
entry
;
struct
gdi_handle_entry
*
entry
;
EnterCriticalSection
(
&
gdi_section
);
EnterCriticalSection
(
&
gdi_section
);
...
...
dlls/gdi32/palette.c
View file @
df357093
...
@@ -42,7 +42,6 @@ typedef BOOL (*unrealize_function)(HPALETTE);
...
@@ -42,7 +42,6 @@ typedef BOOL (*unrealize_function)(HPALETTE);
typedef
struct
tagPALETTEOBJ
typedef
struct
tagPALETTEOBJ
{
{
GDIOBJHDR
header
;
unrealize_function
unrealize
;
unrealize_function
unrealize
;
WORD
version
;
/* palette version */
WORD
version
;
/* palette version */
WORD
count
;
/* count of palette entries */
WORD
count
;
/* count of palette entries */
...
@@ -130,7 +129,7 @@ HPALETTE WINAPI CreatePalette(
...
@@ -130,7 +129,7 @@ HPALETTE WINAPI CreatePalette(
return
0
;
return
0
;
}
}
memcpy
(
palettePtr
->
entries
,
palette
->
palPalEntry
,
size
);
memcpy
(
palettePtr
->
entries
,
palette
->
palPalEntry
,
size
);
if
(
!
(
hpalette
=
alloc_gdi_handle
(
&
palettePtr
->
heade
r
,
OBJ_PAL
,
&
palette_funcs
)))
if
(
!
(
hpalette
=
alloc_gdi_handle
(
palettePt
r
,
OBJ_PAL
,
&
palette_funcs
)))
{
{
HeapFree
(
GetProcessHeap
(),
0
,
palettePtr
->
entries
);
HeapFree
(
GetProcessHeap
(),
0
,
palettePtr
->
entries
);
HeapFree
(
GetProcessHeap
(),
0
,
palettePtr
);
HeapFree
(
GetProcessHeap
(),
0
,
palettePtr
);
...
...
dlls/gdi32/pen.c
View file @
df357093
...
@@ -36,7 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
...
@@ -36,7 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi);
/* GDI logical pen object */
/* GDI logical pen object */
typedef
struct
typedef
struct
{
{
GDIOBJHDR
header
;
struct
brush_pattern
pattern
;
struct
brush_pattern
pattern
;
EXTLOGPEN
logpen
;
EXTLOGPEN
logpen
;
}
PENOBJ
;
}
PENOBJ
;
...
@@ -113,7 +112,7 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
...
@@ -113,7 +112,7 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
break
;
break
;
}
}
if
(
!
(
hpen
=
alloc_gdi_handle
(
&
penPtr
->
heade
r
,
OBJ_PEN
,
&
pen_funcs
)))
if
(
!
(
hpen
=
alloc_gdi_handle
(
penPt
r
,
OBJ_PEN
,
&
pen_funcs
)))
HeapFree
(
GetProcessHeap
(),
0
,
penPtr
);
HeapFree
(
GetProcessHeap
(),
0
,
penPtr
);
return
hpen
;
return
hpen
;
}
}
...
@@ -203,7 +202,7 @@ HPEN WINAPI ExtCreatePen( DWORD style, DWORD width,
...
@@ -203,7 +202,7 @@ HPEN WINAPI ExtCreatePen( DWORD style, DWORD width,
penPtr
->
logpen
.
elpNumEntries
=
style_count
;
penPtr
->
logpen
.
elpNumEntries
=
style_count
;
memcpy
(
penPtr
->
logpen
.
elpStyleEntry
,
style_bits
,
style_count
*
sizeof
(
DWORD
));
memcpy
(
penPtr
->
logpen
.
elpStyleEntry
,
style_bits
,
style_count
*
sizeof
(
DWORD
));
if
(
!
(
hpen
=
alloc_gdi_handle
(
&
penPtr
->
heade
r
,
OBJ_EXTPEN
,
&
pen_funcs
)))
if
(
!
(
hpen
=
alloc_gdi_handle
(
penPt
r
,
OBJ_EXTPEN
,
&
pen_funcs
)))
{
{
free_brush_pattern
(
&
penPtr
->
pattern
);
free_brush_pattern
(
&
penPtr
->
pattern
);
HeapFree
(
GetProcessHeap
(),
0
,
penPtr
);
HeapFree
(
GetProcessHeap
(),
0
,
penPtr
);
...
...
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