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
3e20458a
Commit
3e20458a
authored
Nov 15, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/imagelist: Get rid of magic field, use vtable pointer instead. Keep original layout.
parent
1b966267
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
imagelist.c
dlls/comctl32/imagelist.c
+6
-6
imagelist.h
dlls/comctl32/imagelist.h
+15
-15
No files found.
dlls/comctl32/imagelist.c
View file @
3e20458a
...
@@ -81,11 +81,7 @@ static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0 };
...
@@ -81,11 +81,7 @@ static INTERNALDRAG InternalDrag = { 0, 0, 0, 0, 0, 0, FALSE, 0 };
static
HBITMAP
ImageList_CreateImage
(
HDC
hdc
,
HIMAGELIST
himl
,
UINT
count
,
UINT
width
);
static
HBITMAP
ImageList_CreateImage
(
HDC
hdc
,
HIMAGELIST
himl
,
UINT
count
,
UINT
width
);
static
HRESULT
ImageListImpl_CreateInstance
(
const
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
);
static
HRESULT
ImageListImpl_CreateInstance
(
const
IUnknown
*
pUnkOuter
,
REFIID
iid
,
void
**
ppv
);
static
inline
BOOL
is_valid
(
HIMAGELIST
himl
);
static
inline
BOOL
is_valid
(
HIMAGELIST
himl
)
{
return
himl
&&
himl
->
magic
==
IMAGELIST_MAGIC
;
}
/*
/*
* An imagelist with N images is tiled like this:
* An imagelist with N images is tiled like this:
...
@@ -607,7 +603,6 @@ ImageList_Create (INT cx, INT cy, UINT flags,
...
@@ -607,7 +603,6 @@ ImageList_Create (INT cx, INT cy, UINT flags,
cGrow
=
(
cGrow
<
4
)
?
4
:
(
cGrow
+
3
)
&
~
3
;
cGrow
=
(
cGrow
<
4
)
?
4
:
(
cGrow
+
3
)
&
~
3
;
himl
->
magic
=
IMAGELIST_MAGIC
;
himl
->
cx
=
cx
;
himl
->
cx
=
cx
;
himl
->
cy
=
cy
;
himl
->
cy
=
cy
;
himl
->
flags
=
flags
;
himl
->
flags
=
flags
;
...
@@ -3320,6 +3315,11 @@ static const IImageListVtbl ImageListImpl_Vtbl = {
...
@@ -3320,6 +3315,11 @@ static const IImageListVtbl ImageListImpl_Vtbl = {
ImageListImpl_GetOverlayImage
ImageListImpl_GetOverlayImage
};
};
static
inline
BOOL
is_valid
(
HIMAGELIST
himl
)
{
return
himl
&&
himl
->
lpVtbl
==
&
ImageListImpl_Vtbl
;
}
/*************************************************************************
/*************************************************************************
* HIMAGELIST_QueryInterface [COMCTL32.@]
* HIMAGELIST_QueryInterface [COMCTL32.@]
*
*
...
...
dlls/comctl32/imagelist.h
View file @
3e20458a
...
@@ -30,31 +30,31 @@
...
@@ -30,31 +30,31 @@
struct
_IMAGELIST
struct
_IMAGELIST
{
{
const
struct
IImageListVtbl
*
lpVtbl
;
/* 00: IImageList vtable */
const
struct
IImageListVtbl
*
lpVtbl
;
/* 00: IImageList vtable */
LONG
ref
;
/* 04: reference count */
DWORD
magic
;
/* 08: 'SAMX' */
INT
cCurImage
;
/* 04: ImageCount */
INT
cCurImage
;
/* 0C: ImageCount */
INT
cMaxImage
;
/* 08: maximages */
INT
cMaxImage
;
/* 10: maximages */
INT
cGrow
;
/* 0C: cGrow */
INT
cGrow
;
/* 14: cGrow */
INT
cx
;
/* 10: cx */
INT
cx
;
/* 18: cx */
INT
cy
;
/* 14: cy */
INT
cy
;
/* 1C: cy */
DWORD
x4
;
DWORD
x4
;
UINT
flags
;
/*
24
: flags */
UINT
flags
;
/*
1C
: flags */
COLORREF
clrFg
;
/* 2
8
: foreground color */
COLORREF
clrFg
;
/* 2
0
: foreground color */
COLORREF
clrBk
;
/* 2
C
: background color */
COLORREF
clrBk
;
/* 2
4
: background color */
HBITMAP
hbmImage
;
/*
30
: images Bitmap */
HBITMAP
hbmImage
;
/*
28
: images Bitmap */
HBITMAP
hbmMask
;
/*
34
: masks Bitmap */
HBITMAP
hbmMask
;
/*
2C
: masks Bitmap */
HDC
hdcImage
;
/* 3
8
: images MemDC */
HDC
hdcImage
;
/* 3
0
: images MemDC */
HDC
hdcMask
;
/* 3
C
: masks MemDC */
HDC
hdcMask
;
/* 3
4
: masks MemDC */
INT
nOvlIdx
[
15
];
/*
40
: overlay images index */
INT
nOvlIdx
[
15
];
/*
38
: overlay images index */
/* not yet found out */
/* not yet found out */
HBRUSH
hbrBlend25
;
HBRUSH
hbrBlend25
;
HBRUSH
hbrBlend50
;
HBRUSH
hbrBlend50
;
INT
cInitial
;
INT
cInitial
;
UINT
uBitsPixel
;
UINT
uBitsPixel
;
LONG
ref
;
/* reference count */
};
};
#define IMAGELIST_MAGIC 0x53414D58
#define IMAGELIST_MAGIC 0x53414D58
...
...
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