Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4c4eb112
Commit
4c4eb112
authored
Nov 27, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Use CRT allocation functions.
parent
99476374
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
18 deletions
+15
-18
buffer.c
dlls/uxtheme/buffer.c
+2
-3
msstyles.c
dlls/uxtheme/msstyles.c
+11
-12
uxini.c
dlls/uxtheme/uxini.c
+2
-3
No files found.
dlls/uxtheme/buffer.c
View file @
4c4eb112
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
#include "uxtheme.h"
#include "uxtheme.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
@@ -47,7 +46,7 @@ static void free_paintbuffer(struct paintbuffer *buffer)
...
@@ -47,7 +46,7 @@ static void free_paintbuffer(struct paintbuffer *buffer)
{
{
DeleteObject
(
buffer
->
bitmap
);
DeleteObject
(
buffer
->
bitmap
);
DeleteDC
(
buffer
->
memorydc
);
DeleteDC
(
buffer
->
memorydc
);
heap_
free
(
buffer
);
free
(
buffer
);
}
}
static
struct
paintbuffer
*
get_buffer_obj
(
HPAINTBUFFER
handle
)
static
struct
paintbuffer
*
get_buffer_obj
(
HPAINTBUFFER
handle
)
...
@@ -95,7 +94,7 @@ HPAINTBUFFER WINAPI BeginBufferedPaint(HDC targetdc, const RECT *rect,
...
@@ -95,7 +94,7 @@ HPAINTBUFFER WINAPI BeginBufferedPaint(HDC targetdc, const RECT *rect,
if
(
params
)
if
(
params
)
FIXME
(
"painting parameters are ignored
\n
"
);
FIXME
(
"painting parameters are ignored
\n
"
);
buffer
=
heap_
alloc
(
sizeof
(
*
buffer
));
buffer
=
m
alloc
(
sizeof
(
*
buffer
));
buffer
->
targetdc
=
targetdc
;
buffer
->
targetdc
=
targetdc
;
buffer
->
rect
=
*
rect
;
buffer
->
rect
=
*
rect
;
buffer
->
memorydc
=
CreateCompatibleDC
(
targetdc
);
buffer
->
memorydc
=
CreateCompatibleDC
(
targetdc
);
...
...
dlls/uxtheme/msstyles.c
View file @
4c4eb112
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include "wine/exception.h"
#include "wine/exception.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
@@ -162,7 +161,7 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST
...
@@ -162,7 +161,7 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST
goto
invalid_theme
;
goto
invalid_theme
;
}
}
*
tf
=
heap_alloc_zero
(
sizeof
(
THEME_FILE
));
*
tf
=
calloc
(
1
,
sizeof
(
THEME_FILE
));
(
*
tf
)
->
hTheme
=
hTheme
;
(
*
tf
)
->
hTheme
=
hTheme
;
GetFullPathNameW
(
lpThemeFile
,
MAX_PATH
,
(
*
tf
)
->
szThemeFile
,
NULL
);
GetFullPathNameW
(
lpThemeFile
,
MAX_PATH
,
(
*
tf
)
->
szThemeFile
,
NULL
);
...
@@ -204,14 +203,14 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
...
@@ -204,14 +203,14 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
while
(
ps
->
properties
)
{
while
(
ps
->
properties
)
{
PTHEME_PROPERTY
prop
=
ps
->
properties
;
PTHEME_PROPERTY
prop
=
ps
->
properties
;
ps
->
properties
=
prop
->
next
;
ps
->
properties
=
prop
->
next
;
heap_
free
(
prop
);
free
(
prop
);
}
}
pcls
->
partstate
=
ps
->
next
;
pcls
->
partstate
=
ps
->
next
;
heap_
free
(
ps
);
free
(
ps
);
}
}
pcls
->
signature
=
0
;
pcls
->
signature
=
0
;
heap_
free
(
pcls
);
free
(
pcls
);
}
}
}
}
while
(
tf
->
images
)
while
(
tf
->
images
)
...
@@ -219,9 +218,9 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
...
@@ -219,9 +218,9 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
PTHEME_IMAGE
img
=
tf
->
images
;
PTHEME_IMAGE
img
=
tf
->
images
;
tf
->
images
=
img
->
next
;
tf
->
images
=
img
->
next
;
DeleteObject
(
img
->
image
);
DeleteObject
(
img
->
image
);
heap_
free
(
img
);
free
(
img
);
}
}
heap_
free
(
tf
);
free
(
tf
);
}
}
}
}
}
}
...
@@ -448,7 +447,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
...
@@ -448,7 +447,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
PTHEME_CLASS
cur
=
MSSTYLES_FindClass
(
tf
,
pszAppName
,
pszClassName
);
PTHEME_CLASS
cur
=
MSSTYLES_FindClass
(
tf
,
pszAppName
,
pszClassName
);
if
(
cur
)
return
cur
;
if
(
cur
)
return
cur
;
cur
=
heap_
alloc
(
sizeof
(
*
cur
));
cur
=
m
alloc
(
sizeof
(
*
cur
));
cur
->
signature
=
THEME_CLASS_SIGNATURE
;
cur
->
signature
=
THEME_CLASS_SIGNATURE
;
cur
->
refcount
=
0
;
cur
->
refcount
=
0
;
cur
->
hTheme
=
tf
->
hTheme
;
cur
->
hTheme
=
tf
->
hTheme
;
...
@@ -537,7 +536,7 @@ static PTHEME_PARTSTATE MSSTYLES_AddPartState(PTHEME_CLASS tc, int iPartId, int
...
@@ -537,7 +536,7 @@ static PTHEME_PARTSTATE MSSTYLES_AddPartState(PTHEME_CLASS tc, int iPartId, int
PTHEME_PARTSTATE
cur
=
MSSTYLES_FindPartState
(
tc
,
iPartId
,
iStateId
,
NULL
);
PTHEME_PARTSTATE
cur
=
MSSTYLES_FindPartState
(
tc
,
iPartId
,
iStateId
,
NULL
);
if
(
cur
)
return
cur
;
if
(
cur
)
return
cur
;
cur
=
heap_
alloc
(
sizeof
(
*
cur
));
cur
=
m
alloc
(
sizeof
(
*
cur
));
cur
->
iPartId
=
iPartId
;
cur
->
iPartId
=
iPartId
;
cur
->
iStateId
=
iStateId
;
cur
->
iStateId
=
iStateId
;
cur
->
properties
=
NULL
;
cur
->
properties
=
NULL
;
...
@@ -654,7 +653,7 @@ static PTHEME_PROPERTY MSSTYLES_AddProperty(PTHEME_PARTSTATE ps, int iPropertyPr
...
@@ -654,7 +653,7 @@ static PTHEME_PROPERTY MSSTYLES_AddProperty(PTHEME_PARTSTATE ps, int iPropertyPr
/* Should duplicate properties overwrite the original, or be ignored? */
/* Should duplicate properties overwrite the original, or be ignored? */
if
(
cur
)
return
cur
;
if
(
cur
)
return
cur
;
cur
=
heap_
alloc
(
sizeof
(
*
cur
));
cur
=
m
alloc
(
sizeof
(
*
cur
));
cur
->
iPrimitiveType
=
iPropertyPrimitive
;
cur
->
iPrimitiveType
=
iPropertyPrimitive
;
cur
->
iPropertyId
=
iPropertyId
;
cur
->
iPropertyId
=
iPropertyId
;
cur
->
lpValue
=
lpValue
;
cur
->
lpValue
=
lpValue
;
...
@@ -695,7 +694,7 @@ static PTHEME_PROPERTY MSSTYLES_AddMetric(PTHEME_FILE tf, int iPropertyPrimitive
...
@@ -695,7 +694,7 @@ static PTHEME_PROPERTY MSSTYLES_AddMetric(PTHEME_FILE tf, int iPropertyPrimitive
/* Should duplicate properties overwrite the original, or be ignored? */
/* Should duplicate properties overwrite the original, or be ignored? */
if
(
cur
)
return
cur
;
if
(
cur
)
return
cur
;
cur
=
heap_
alloc
(
sizeof
(
*
cur
));
cur
=
m
alloc
(
sizeof
(
*
cur
));
cur
->
iPrimitiveType
=
iPropertyPrimitive
;
cur
->
iPrimitiveType
=
iPropertyPrimitive
;
cur
->
iPropertyId
=
iPropertyId
;
cur
->
iPropertyId
=
iPropertyId
;
cur
->
lpValue
=
lpValue
;
cur
->
lpValue
=
lpValue
;
...
@@ -1246,7 +1245,7 @@ HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha
...
@@ -1246,7 +1245,7 @@ HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha
img
=
img
->
next
;
img
=
img
->
next
;
}
}
/* Not found? Load from resources */
/* Not found? Load from resources */
img
=
heap_
alloc
(
sizeof
(
*
img
));
img
=
m
alloc
(
sizeof
(
*
img
));
img
->
image
=
LoadImageW
(
tc
->
hTheme
,
szFile
,
IMAGE_BITMAP
,
0
,
0
,
LR_CREATEDIBSECTION
);
img
->
image
=
LoadImageW
(
tc
->
hTheme
,
szFile
,
IMAGE_BITMAP
,
0
,
0
,
LR_CREATEDIBSECTION
);
prepare_alpha
(
img
->
image
,
hasAlpha
);
prepare_alpha
(
img
->
image
,
hasAlpha
);
img
->
hasAlpha
=
*
hasAlpha
;
img
->
hasAlpha
=
*
hasAlpha
;
...
...
dlls/uxtheme/uxini.c
View file @
4c4eb112
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
#include "winnls.h"
#include "winnls.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
@@ -70,7 +69,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) {
...
@@ -70,7 +69,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) {
}
}
dwIniSize
=
SizeofResource
(
hTheme
,
hrsc
)
/
sizeof
(
WCHAR
);
dwIniSize
=
SizeofResource
(
hTheme
,
hrsc
)
/
sizeof
(
WCHAR
);
uf
=
heap_
alloc
(
sizeof
(
*
uf
));
uf
=
m
alloc
(
sizeof
(
*
uf
));
uf
->
lpIni
=
lpThemesIni
;
uf
->
lpIni
=
lpThemesIni
;
uf
->
lpCurLoc
=
lpThemesIni
;
uf
->
lpCurLoc
=
lpThemesIni
;
uf
->
lpEnd
=
lpThemesIni
+
dwIniSize
;
uf
->
lpEnd
=
lpThemesIni
+
dwIniSize
;
...
@@ -87,7 +86,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) {
...
@@ -87,7 +86,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) {
*/
*/
void
UXINI_CloseINI
(
PUXINI_FILE
uf
)
void
UXINI_CloseINI
(
PUXINI_FILE
uf
)
{
{
heap_
free
(
uf
);
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