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
d4cc71c5
Commit
d4cc71c5
authored
Feb 25, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Use global memory allocation helpers.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4f358198
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
buffer.c
dlls/uxtheme/buffer.c
+3
-2
msstyles.c
dlls/uxtheme/msstyles.c
+12
-11
uxini.c
dlls/uxtheme/uxini.c
+3
-2
No files found.
dlls/uxtheme/buffer.c
View file @
d4cc71c5
...
...
@@ -32,6 +32,7 @@
#include "uxtheme.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
...
@@ -48,7 +49,7 @@ static void free_paintbuffer(struct paintbuffer *buffer)
{
DeleteObject
(
buffer
->
bitmap
);
DeleteDC
(
buffer
->
memorydc
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
heap_free
(
buffer
);
}
static
struct
paintbuffer
*
get_buffer_obj
(
HPAINTBUFFER
handle
)
...
...
@@ -98,7 +99,7 @@ HPAINTBUFFER WINAPI BeginBufferedPaint(HDC targetdc, const RECT *rect,
if
(
params
)
FIXME
(
"painting parameters are ignored
\n
"
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
buffer
));
buffer
=
heap_alloc
(
sizeof
(
*
buffer
));
buffer
->
targetdc
=
targetdc
;
buffer
->
rect
=
*
rect
;
buffer
->
memorydc
=
CreateCompatibleDC
(
targetdc
);
...
...
dlls/uxtheme/msstyles.c
View file @
d4cc71c5
...
...
@@ -36,6 +36,7 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
...
@@ -175,7 +176,7 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST
goto
invalid_theme
;
}
*
tf
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
THEME_FILE
));
*
tf
=
heap_alloc_zero
(
sizeof
(
THEME_FILE
));
(
*
tf
)
->
hTheme
=
hTheme
;
GetFullPathNameW
(
lpThemeFile
,
MAX_PATH
,
(
*
tf
)
->
szThemeFile
,
NULL
);
...
...
@@ -214,13 +215,13 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
while
(
ps
->
properties
)
{
PTHEME_PROPERTY
prop
=
ps
->
properties
;
ps
->
properties
=
prop
->
next
;
HeapFree
(
GetProcessHeap
(),
0
,
prop
);
heap_free
(
prop
);
}
pcls
->
partstate
=
ps
->
next
;
HeapFree
(
GetProcessHeap
(),
0
,
ps
);
heap_free
(
ps
);
}
HeapFree
(
GetProcessHeap
(),
0
,
pcls
);
heap_free
(
pcls
);
}
}
while
(
tf
->
images
)
...
...
@@ -228,9 +229,9 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
PTHEME_IMAGE
img
=
tf
->
images
;
tf
->
images
=
img
->
next
;
DeleteObject
(
img
->
image
);
HeapFree
(
GetProcessHeap
(),
0
,
img
);
heap_free
(
img
);
}
HeapFree
(
GetProcessHeap
(),
0
,
tf
);
heap_free
(
tf
);
}
}
}
...
...
@@ -450,7 +451,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
PTHEME_CLASS
cur
=
MSSTYLES_FindClass
(
tf
,
pszAppName
,
pszClassName
);
if
(
cur
)
return
cur
;
cur
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
THEME_CLASS
));
cur
=
heap_alloc
(
sizeof
(
*
cur
));
cur
->
hTheme
=
tf
->
hTheme
;
lstrcpyW
(
cur
->
szAppName
,
pszAppName
);
lstrcpyW
(
cur
->
szClassName
,
pszClassName
);
...
...
@@ -507,7 +508,7 @@ static PTHEME_PARTSTATE MSSTYLES_AddPartState(PTHEME_CLASS tc, int iPartId, int
PTHEME_PARTSTATE
cur
=
MSSTYLES_FindPartState
(
tc
,
iPartId
,
iStateId
,
NULL
);
if
(
cur
)
return
cur
;
cur
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
THEME_PARTSTATE
));
cur
=
heap_alloc
(
sizeof
(
*
cur
));
cur
->
iPartId
=
iPartId
;
cur
->
iStateId
=
iStateId
;
cur
->
properties
=
NULL
;
...
...
@@ -624,7 +625,7 @@ static PTHEME_PROPERTY MSSTYLES_AddProperty(PTHEME_PARTSTATE ps, int iPropertyPr
/* Should duplicate properties overwrite the original, or be ignored? */
if
(
cur
)
return
cur
;
cur
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
THEME_PROPERTY
));
cur
=
heap_alloc
(
sizeof
(
*
cur
));
cur
->
iPrimitiveType
=
iPropertyPrimitive
;
cur
->
iPropertyId
=
iPropertyId
;
cur
->
lpValue
=
lpValue
;
...
...
@@ -665,7 +666,7 @@ static PTHEME_PROPERTY MSSTYLES_AddMetric(PTHEME_FILE tf, int iPropertyPrimitive
/* Should duplicate properties overwrite the original, or be ignored? */
if
(
cur
)
return
cur
;
cur
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
THEME_PROPERTY
));
cur
=
heap_alloc
(
sizeof
(
*
cur
));
cur
->
iPrimitiveType
=
iPropertyPrimitive
;
cur
->
iPropertyId
=
iPropertyId
;
cur
->
lpValue
=
lpValue
;
...
...
@@ -1140,7 +1141,7 @@ HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha
img
=
img
->
next
;
}
/* Not found? Load from resources */
img
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
THEME_IMAGE
));
img
=
heap_alloc
(
sizeof
(
*
img
));
img
->
image
=
LoadImageW
(
tc
->
hTheme
,
szFile
,
IMAGE_BITMAP
,
0
,
0
,
LR_CREATEDIBSECTION
);
prepare_alpha
(
img
->
image
,
hasAlpha
);
img
->
hasAlpha
=
*
hasAlpha
;
...
...
dlls/uxtheme/uxini.c
View file @
d4cc71c5
...
...
@@ -27,6 +27,7 @@
#include "winnls.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
...
@@ -75,7 +76,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) {
}
dwIniSize
=
SizeofResource
(
hTheme
,
hrsc
)
/
sizeof
(
WCHAR
);
uf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
UXINI_FILE
));
uf
=
heap_alloc
(
sizeof
(
*
uf
));
uf
->
lpIni
=
lpThemesIni
;
uf
->
lpCurLoc
=
lpThemesIni
;
uf
->
lpEnd
=
lpThemesIni
+
dwIniSize
;
...
...
@@ -92,7 +93,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) {
*/
void
UXINI_CloseINI
(
PUXINI_FILE
uf
)
{
HeapFree
(
GetProcessHeap
(),
0
,
uf
);
heap_free
(
uf
);
}
/**********************************************************************
...
...
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