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
c31cae0f
Commit
c31cae0f
authored
Jan 23, 2004
by
Kevin Koltzau
Committed by
Alexandre Julliard
Jan 23, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load properties from the theme ini.
Implemented most of the GetTheme* functions.
parent
0c7f4493
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
379 additions
and
58 deletions
+379
-58
draw.c
dlls/uxtheme/draw.c
+20
-2
metric.c
dlls/uxtheme/metric.c
+1
-0
msstyles.c
dlls/uxtheme/msstyles.c
+158
-11
msstyles.h
dlls/uxtheme/msstyles.h
+20
-10
property.c
dlls/uxtheme/property.c
+162
-20
stylemap.c
dlls/uxtheme/stylemap.c
+3
-3
system.c
dlls/uxtheme/system.c
+4
-4
uxini.c
dlls/uxtheme/uxini.c
+11
-8
No files found.
dlls/uxtheme/draw.c
View file @
c31cae0f
...
...
@@ -27,7 +27,9 @@
#include "winuser.h"
#include "wingdi.h"
#include "uxtheme.h"
#include "tmschema.h"
#include "msstyles.h"
#include "uxthemedll.h"
#include "wine/debug.h"
...
...
@@ -133,10 +135,26 @@ HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME hTheme, HDC hdc, int iPartId
const
RECT
*
pBoundingRect
,
RECT
*
pContentRect
)
{
FIXME
(
"%d %d: stub
\n
"
,
iPartId
,
iStateId
);
MARGINS
margin
;
HRESULT
hr
;
TRACE
(
"(%d,%d)
\n
"
,
iPartId
,
iStateId
);
if
(
!
hTheme
)
return
E_HANDLE
;
return
ERROR_CALL_NOT_IMPLEMENTED
;
hr
=
GetThemeMargins
(
hTheme
,
hdc
,
iPartId
,
iStateId
,
TMT_CONTENTMARGINS
,
NULL
,
&
margin
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Margins not found
\n
"
);
return
hr
;
}
pContentRect
->
left
=
pBoundingRect
->
left
+
margin
.
cxLeftWidth
;
pContentRect
->
top
=
pBoundingRect
->
top
+
margin
.
cyTopHeight
;
pContentRect
->
right
=
pBoundingRect
->
right
-
margin
.
cxRightWidth
;
pContentRect
->
bottom
=
pBoundingRect
->
bottom
-
margin
.
cyBottomHeight
;
TRACE
(
"left:%ld,top:%ld,right:%ld,bottom:%ld
\n
"
,
pContentRect
->
left
,
pContentRect
->
top
,
pContentRect
->
right
,
pContentRect
->
bottom
);
return
S_OK
;
}
/***********************************************************************
...
...
dlls/uxtheme/metric.c
View file @
c31cae0f
...
...
@@ -28,6 +28,7 @@
#include "wingdi.h"
#include "uxtheme.h"
#include "msstyles.h"
#include "uxthemedll.h"
#include "wine/debug.h"
...
...
dlls/uxtheme/msstyles.c
View file @
c31cae0f
This diff is collapsed.
Click to expand it.
dlls/uxtheme/msstyles.h
View file @
c31cae0f
...
...
@@ -25,16 +25,29 @@
#define MAX_THEME_APP_NAME 60
#define MAX_THEME_CLASS_NAME 60
#define MAX_THEME_VALUE_NAME 60
typedef
struct
_THEME_PROPERTY
{
int
iPrimitiveType
;
int
iPropertyId
;
PROPERTYORIGIN
origin
;
LPCWSTR
lpValue
;
DWORD
dwValueLen
;
struct
_THEME_PROPERTY
*
next
;
}
THEME_PROPERTY
,
*
PTHEME_PROPERTY
;
typedef
struct
_THEME_PARTSTATE
{
int
iPartId
;
int
iStateId
;
/* TODO: define part/state properties */
PTHEME_PROPERTY
properties
;
struct
_THEME_PARTSTATE
*
next
;
}
THEME_PARTSTATE
,
*
PTHEME_PARTSTATE
;
typedef
struct
_THEME_CLASS
{
HMODULE
hTheme
;
WCHAR
szAppName
[
MAX_THEME_APP_NAME
];
WCHAR
szClassName
[
MAX_THEME_CLASS_NAME
];
PTHEME_PARTSTATE
partstate
;
...
...
@@ -55,25 +68,22 @@ typedef struct _THEME_FILE {
PTHEME_CLASS
classes
;
}
THEME_FILE
,
*
PTHEME_FILE
;
typedef
struct
_UXINI_FILE
{
LPCWSTR
lpIni
;
LPCWSTR
lpCurLoc
;
LPCWSTR
lpEnd
;
}
UXINI_FILE
,
*
PUXINI_FILE
;
typedef
void
*
PUXINI_FILE
;
HRESULT
MSSTYLES_OpenThemeFile
(
LPCWSTR
lpThemeFile
,
LPCWSTR
pszColorName
,
LPCWSTR
pszSizeName
,
PTHEME_FILE
*
tf
);
void
MSSTYLES_CloseThemeFile
(
PTHEME_FILE
tf
);
HRESULT
MSSTYLES_SetActiveTheme
(
PTHEME_FILE
tf
);
PTHEME_CLASS
MSSTYLES_OpenThemeClass
(
LPCWSTR
pszAppName
,
LPCWSTR
pszClassList
);
HRESULT
MSSTYLES_CloseThemeClass
(
PTHEME_CLASS
tc
);
BOOL
MSSTYLES_LookupProperty
(
LPCWSTR
pszPropertyName
,
DWORD
*
dwPrimitive
,
DWORD
*
dwId
);
BOOL
MSSTYLES_LookupEnum
(
LPCWSTR
pszValueName
,
DWORD
dwEnum
,
DWORD
*
dwValue
);
BOOL
MSSTYLES_LookupProperty
(
LPCWSTR
pszPropertyName
,
int
*
dwPrimitive
,
int
*
dwId
);
BOOL
MSSTYLES_LookupEnum
(
LPCWSTR
pszValueName
,
int
dwEnum
,
int
*
dwValue
);
BOOL
MSSTYLES_LookupPartState
(
LPCWSTR
pszClass
,
LPCWSTR
pszPart
,
LPCWSTR
pszState
,
int
*
iPartId
,
int
*
iStateId
);
PUXINI_FILE
MSSTYLES_GetThemeIni
(
PTHEME_FILE
tf
);
PTHEME_PARTSTATE
MSSTYLES_FindPartState
(
PTHEME_CLASS
tc
,
int
iPartId
,
int
iStateId
);
PTHEME_PARTSTATE
MSSTYLES_FindPartState
(
PTHEME_CLASS
tc
,
int
iPartId
,
int
iStateId
,
PTHEME_CLASS
*
tcNext
);
PTHEME_CLASS
MSSTYLES_FindClass
(
PTHEME_FILE
tf
,
LPCWSTR
pszAppName
,
LPCWSTR
pszClassName
);
PTHEME_PROPERTY
MSSTYLES_FindProperty
(
PTHEME_CLASS
tc
,
int
iPartId
,
int
iStateId
,
int
iPropertyPrimitive
,
int
iPropertyId
);
PUXINI_FILE
UXINI_LoadINI
(
PTHEME_FILE
tf
,
LPCWSTR
lpName
);
PUXINI_FILE
UXINI_LoadINI
(
HMODULE
hTheme
,
LPCWSTR
lpName
);
void
UXINI_CloseINI
(
PUXINI_FILE
uf
);
void
UXINI_ResetINI
(
PUXINI_FILE
uf
);
LPCWSTR
UXINI_GetNextSection
(
PUXINI_FILE
uf
,
DWORD
*
dwLen
);
...
...
dlls/uxtheme/property.c
View file @
c31cae0f
This diff is collapsed.
Click to expand it.
dlls/uxtheme/stylemap.c
View file @
c31cae0f
...
...
@@ -27,7 +27,7 @@
#include "winuser.h"
#include "tmschema.h"
#
include "msstyles.h"
#
define TMT_ENUM 200
#include "wine/debug.h"
...
...
@@ -1111,7 +1111,7 @@ BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszStat
* RETURNS
* FALSE if value is not found, TRUE otherwise
*/
BOOL
MSSTYLES_LookupProperty
(
LPCWSTR
pszPropertyName
,
DWORD
*
dwPrimitive
,
DWORD
*
dwId
)
BOOL
MSSTYLES_LookupProperty
(
LPCWSTR
pszPropertyName
,
int
*
dwPrimitive
,
int
*
dwId
)
{
DWORD
item
=
0
;
do
{
...
...
@@ -1137,7 +1137,7 @@ BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, DWORD *dwPrimitive, DWORD
* RETURNS
* FALSE if value is not found, TRUE otherwise
*/
BOOL
MSSTYLES_LookupEnum
(
LPCWSTR
pszValueName
,
DWORD
dwEnum
,
DWORD
*
dwValue
)
BOOL
MSSTYLES_LookupEnum
(
LPCWSTR
pszValueName
,
int
dwEnum
,
int
*
dwValue
)
{
DWORD
item
=
0
;
/* Locate the enum block */
...
...
dlls/uxtheme/system.c
View file @
c31cae0f
...
...
@@ -398,7 +398,7 @@ HRESULT WINAPI HitTestThemeBackground(HTHEME hTheme, HDC hdc, int iPartId,
BOOL
WINAPI
IsThemePartDefined
(
HTHEME
hTheme
,
int
iPartId
,
int
iStateId
)
{
TRACE
(
"(%p,%d,%d)
\n
"
,
hTheme
,
iPartId
,
iStateId
);
if
(
MSSTYLES_FindPartState
(
hTheme
,
iPartId
,
iStateId
))
if
(
MSSTYLES_FindPartState
(
hTheme
,
iPartId
,
iStateId
,
NULL
))
return
TRUE
;
return
FALSE
;
}
...
...
@@ -428,7 +428,7 @@ HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR pszThemeName,
PTHEME_FILE
pt
;
HRESULT
hr
;
int
i
;
DWORD
dw
DocId
;
int
i
DocId
;
TRACE
(
"(%s,%s,%p,%d)
\n
"
,
debugstr_w
(
pszThemeName
),
debugstr_w
(
pszPropertyName
),
pszValueBuff
,
cchMaxValChars
);
...
...
@@ -437,9 +437,9 @@ HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR pszThemeName,
/* Try to load from string resources */
hr
=
E_PROP_ID_UNSUPPORTED
;
if
(
MSSTYLES_LookupProperty
(
pszPropertyName
,
NULL
,
&
dw
DocId
))
{
if
(
MSSTYLES_LookupProperty
(
pszPropertyName
,
NULL
,
&
i
DocId
))
{
for
(
i
=
0
;
i
<
sizeof
(
wDocToRes
)
/
sizeof
(
wDocToRes
[
0
]);
i
+=
2
)
{
if
(
wDocToRes
[
i
]
==
dw
DocId
)
{
if
(
wDocToRes
[
i
]
==
i
DocId
)
{
if
(
LoadStringW
(
pt
->
hTheme
,
wDocToRes
[
i
+
1
],
pszValueBuff
,
cchMaxValChars
))
{
hr
=
S_OK
;
break
;
...
...
dlls/uxtheme/uxini.c
View file @
c31cae0f
...
...
@@ -26,8 +26,6 @@
#include "winbase.h"
#include "winnls.h"
#include "msstyles.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uxtheme
);
...
...
@@ -40,6 +38,12 @@ static const WCHAR szTextFileResource[] = {
'T'
,
'E'
,
'X'
,
'T'
,
'F'
,
'I'
,
'L'
,
'E'
,
'\0'
};
typedef
struct
_UXINI_FILE
{
LPCWSTR
lpIni
;
LPCWSTR
lpCurLoc
;
LPCWSTR
lpEnd
;
}
UXINI_FILE
,
*
PUXINI_FILE
;
/***********************************************************************/
/**********************************************************************
...
...
@@ -55,7 +59,7 @@ static const WCHAR szTextFileResource[] = {
* RETURNS
* INI file, or NULL if not found
*/
PUXINI_FILE
UXINI_LoadINI
(
PTHEME_FILE
tf
,
LPCWSTR
lpName
)
{
PUXINI_FILE
UXINI_LoadINI
(
HMODULE
hTheme
,
LPCWSTR
lpName
)
{
HRSRC
hrsc
;
LPCWSTR
lpThemesIni
=
NULL
;
PUXINI_FILE
uf
;
...
...
@@ -63,14 +67,14 @@ PUXINI_FILE UXINI_LoadINI(PTHEME_FILE tf, LPCWSTR lpName) {
TRACE
(
"Loading resource INI %s
\n
"
,
debugstr_w
(
lpName
));
if
((
hrsc
=
FindResourceW
(
tf
->
hTheme
,
lpName
,
szTextFileResource
)))
{
if
(
!
(
lpThemesIni
=
(
LPCWSTR
)
LoadResource
(
tf
->
hTheme
,
hrsc
)))
{
if
((
hrsc
=
FindResourceW
(
hTheme
,
lpName
,
szTextFileResource
)))
{
if
(
!
(
lpThemesIni
=
(
LPCWSTR
)
LoadResource
(
hTheme
,
hrsc
)))
{
TRACE
(
"%s resource not found
\n
"
,
debugstr_w
(
lpName
));
return
NULL
;
}
}
dwIniSize
=
SizeofResource
(
tf
->
hTheme
,
hrsc
)
/
sizeof
(
WCHAR
);
dwIniSize
=
SizeofResource
(
hTheme
,
hrsc
)
/
sizeof
(
WCHAR
);
uf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
UXINI_FILE
));
uf
->
lpIni
=
lpThemesIni
;
uf
->
lpCurLoc
=
lpThemesIni
;
...
...
@@ -156,8 +160,7 @@ LPCWSTR UXINI_GetNextLine(PUXINI_FILE uf, DWORD *dwLen)
while
(
!
UXINI_eof
(
uf
)
&&
(
UXINI_isspace
(
*
uf
->
lpCurLoc
)
||
*
uf
->
lpCurLoc
==
'\n'
))
uf
->
lpCurLoc
++
;
lpLineStart
=
uf
->
lpCurLoc
;
lpLineEnd
=
uf
->
lpCurLoc
;
while
(
!
UXINI_eof
(
uf
)
&&
*
uf
->
lpCurLoc
!=
'\n'
&&
*
uf
->
lpCurLoc
!=
';'
)
lpLineEnd
=
uf
->
lpCurLoc
++
;
if
(
*
uf
->
lpCurLoc
==
';'
)
lpLineEnd
=
uf
->
lpCurLoc
++
;
while
(
!
UXINI_eof
(
uf
)
&&
*
uf
->
lpCurLoc
!=
'\n'
&&
*
uf
->
lpCurLoc
!=
';'
)
lpLineEnd
=
++
uf
->
lpCurLoc
;
/* If comment was found, skip the rest of the line */
if
(
*
uf
->
lpCurLoc
==
';'
)
while
(
!
UXINI_eof
(
uf
)
&&
*
uf
->
lpCurLoc
!=
'\n'
)
uf
->
lpCurLoc
++
;
...
...
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