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
ae0891eb
Commit
ae0891eb
authored
Dec 09, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Use bsearch and CompareStringOrdinal in MSSTYLES_LookupProperty.
parent
2e37a51b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
227 additions
and
213 deletions
+227
-213
stylemap.c
dlls/uxtheme/stylemap.c
+227
-213
No files found.
dlls/uxtheme/stylemap.c
View file @
ae0891eb
...
...
@@ -20,9 +20,11 @@
*/
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winuser.h"
#include "vssym32.h"
...
...
@@ -30,9 +32,9 @@
#define TMT_STOCKIMAGEFILE 3007
typedef
struct
_MSSTYLES_PROPERTY_MAP
{
WCHAR
szPropertyName
[
24
];
WORD
dwPrimitiveType
;
WORD
dwPropertyID
;
WCHAR
szPropertyName
[
24
];
}
MSSTYLES_PROPERTY_MAP
,
*
PMSSTYLES_PROPERTY_MAP
;
typedef
struct
_MSSTYLES_ENUM_MAP
{
...
...
@@ -55,211 +57,212 @@ typedef struct _MSSTYLES_CLASS_NAME {
/***********************************************************************
* Map property names to IDs & primitive types
* PrimitiveType,PropertyID,PropertyName
*
* NOTE: Keep this sorted, we use bsearch to lookup properties.
*/
static
const
MSSTYLES_PROPERTY_MAP
mapProperty
[]
=
{
{
TMT_STRING
,
TMT_STRING
,
L"STRING"
},
{
TMT_INT
,
TMT_INT
,
L"INT"
},
{
TMT_BOOL
,
TMT_BOOL
,
L"BOOL"
},
{
TMT_COLOR
,
TMT_COLOR
,
L"COLOR"
},
{
TMT_MARGINS
,
TMT_MARGINS
,
L"MARGINS"
},
{
TMT_FILENAME
,
TMT_FILENAME
,
L"FILENAME"
},
{
TMT_SIZE
,
TMT_SIZE
,
L"SIZE"
},
{
TMT_POSITION
,
TMT_POSITION
,
L"POSITION"
},
{
TMT_RECT
,
TMT_RECT
,
L"RECT"
},
{
TMT_FONT
,
TMT_FONT
,
L"FONT"
},
{
TMT_INTLIST
,
TMT_INTLIST
,
L"INTLIST"
},
{
TMT_STRING
,
TMT_COLORSCHEMES
,
L"COLORSCHEMES"
},
{
TMT_STRING
,
TMT_SIZES
,
L"SIZES"
},
{
TMT_INT
,
TMT_CHARSET
,
L"CHARSET"
},
{
TMT_STRING
,
TMT_DISPLAYNAME
,
L"DISPLAYNAME"
},
{
TMT_STRING
,
TMT_TOOLTIP
,
L"TOOLTIP"
},
{
TMT_STRING
,
TMT_COMPANY
,
L"COMPANY"
},
{
TMT_STRING
,
TMT_AUTHOR
,
L"AUTHOR"
},
{
TMT_STRING
,
TMT_COPYRIGHT
,
L"COPYRIGHT"
},
{
TMT_STRING
,
TMT_URL
,
L"URL"
},
{
TMT_STRING
,
TMT_VERSION
,
L"VERSION"
},
{
TMT_STRING
,
TMT_DESCRIPTION
,
L"DESCRIPTION"
},
{
TMT_FONT
,
TMT_CAPTIONFONT
,
L"CAPTIONFONT"
},
{
TMT_FONT
,
TMT_SMALLCAPTIONFONT
,
L"SMALLCAPTIONFONT"
},
{
TMT_FONT
,
TMT_MENUFONT
,
L"MENUFONT"
},
{
TMT_FONT
,
TMT_STATUSFONT
,
L"STATUSFONT"
},
{
TMT_FONT
,
TMT_MSGBOXFONT
,
L"MSGBOXFONT"
},
{
TMT_FONT
,
TMT_ICONTITLEFONT
,
L"ICONTITLEFONT"
},
{
TMT_FONT
,
TMT_HEADING1FONT
,
L"HEADING1FONT"
},
{
TMT_FONT
,
TMT_HEADING2FONT
,
L"HEADING2FONT"
},
{
TMT_FONT
,
TMT_BODYFONT
,
L"BODYFONT"
},
{
TMT_BOOL
,
TMT_FLATMENUS
,
L"FLATMENUS"
},
{
TMT_SIZE
,
TMT_SIZINGBORDERWIDTH
,
L"SIZINGBORDERWIDTH"
},
{
TMT_SIZE
,
TMT_SCROLLBARWIDTH
,
L"SCROLLBARWIDTH"
},
{
TMT_SIZE
,
TMT_SCROLLBARHEIGHT
,
L"SCROLLBARHEIGHT"
},
{
TMT_SIZE
,
TMT_CAPTIONBARWIDTH
,
L"CAPTIONBARWIDTH"
},
{
TMT_SIZE
,
TMT_CAPTIONBARHEIGHT
,
L"CAPTIONBARHEIGHT"
},
{
TMT_SIZE
,
TMT_SMCAPTIONBARWIDTH
,
L"SMCAPTIONBARWIDTH"
},
{
TMT_SIZE
,
TMT_SMCAPTIONBARHEIGHT
,
L"SMCAPTIONBARHEIGHT"
},
{
TMT_SIZE
,
TMT_MENUBARWIDTH
,
L"MENUBARWIDTH"
},
{
TMT_SIZE
,
TMT_MENUBARHEIGHT
,
L"MENUBARHEIGHT"
},
{
TMT_INT
,
TMT_MINCOLORDEPTH
,
L"MINCOLORDEPTH"
},
{
TMT_STRING
,
TMT_CSSNAME
,
L"CSSNAME"
},
{
TMT_STRING
,
TMT_XMLNAME
,
L"XMLNAME"
},
{
TMT_COLOR
,
TMT_SCROLLBAR
,
L"SCROLLBAR"
},
{
TMT_COLOR
,
TMT_BACKGROUND
,
L"BACKGROUND"
},
{
TMT_COLOR
,
TMT_ACTIVECAPTION
,
L"ACTIVECAPTION"
},
{
TMT_COLOR
,
TMT_INACTIVECAPTION
,
L"INACTIVECAPTION"
},
{
TMT_COLOR
,
TMT_MENU
,
L"MENU"
},
{
TMT_COLOR
,
TMT_WINDOW
,
L"WINDOW"
},
{
TMT_COLOR
,
TMT_WINDOWFRAME
,
L"WINDOWFRAME"
},
{
TMT_COLOR
,
TMT_MENUTEXT
,
L"MENUTEXT"
},
{
TMT_COLOR
,
TMT_WINDOWTEXT
,
L"WINDOWTEXT"
},
{
TMT_COLOR
,
TMT_CAPTIONTEXT
,
L"CAPTIONTEXT"
},
{
TMT_COLOR
,
TMT_ACTIVEBORDER
,
L"ACTIVEBORDER"
},
{
TMT_COLOR
,
TMT_INACTIVEBORDER
,
L"INACTIVEBORDER"
},
{
TMT_COLOR
,
TMT_APPWORKSPACE
,
L"APPWORKSPACE"
},
{
TMT_COLOR
,
TMT_HIGHLIGHT
,
L"HIGHLIGHT"
},
{
TMT_COLOR
,
TMT_HIGHLIGHTTEXT
,
L"HIGHLIGHTTEXT"
},
{
TMT_COLOR
,
TMT_BTNFACE
,
L"BTNFACE"
},
{
TMT_COLOR
,
TMT_BTNSHADOW
,
L"BTNSHADOW"
},
{
TMT_COLOR
,
TMT_GRAYTEXT
,
L"GRAYTEXT"
},
{
TMT_COLOR
,
TMT_BTNTEXT
,
L"BTNTEXT"
},
{
TMT_COLOR
,
TMT_INACTIVECAPTIONTEXT
,
L"INACTIVECAPTIONTEXT"
},
{
TMT_COLOR
,
TMT_BTNHIGHLIGHT
,
L"BTNHIGHLIGHT"
},
{
TMT_COLOR
,
TMT_DKSHADOW3D
,
L"DKSHADOW3D"
},
{
TMT_COLOR
,
TMT_LIGHT3D
,
L"LIGHT3D"
},
{
TMT_COLOR
,
TMT_INFOTEXT
,
L"INFOTEXT"
},
{
TMT_COLOR
,
TMT_INFOBK
,
L"INFOBK"
},
{
TMT_COLOR
,
TMT_BUTTONALTERNATEFACE
,
L"BUTTONALTERNATEFACE"
},
{
TMT_COLOR
,
TMT_HOTTRACKING
,
L"HOTTRACKING"
},
{
TMT_COLOR
,
TMT_GRADIENTACTIVECAPTION
,
L"GRADIENTACTIVECAPTION"
},
{
TMT_COLOR
,
TMT_GRADIENTINACTIVECAPTION
,
L"GRADIENTINACTIVECAPTION"
},
{
TMT_COLOR
,
TMT_MENUHILIGHT
,
L"MENUHILIGHT"
},
{
TMT_COLOR
,
TMT_MENUBAR
,
L"MENUBAR"
},
{
TMT_INT
,
TMT_FROMHUE1
,
L"FROMHUE1"
},
{
TMT_INT
,
TMT_FROMHUE2
,
L"FROMHUE2"
},
{
TMT_INT
,
TMT_FROMHUE3
,
L"FROMHUE3"
},
{
TMT_INT
,
TMT_FROMHUE4
,
L"FROMHUE4"
},
{
TMT_INT
,
TMT_FROMHUE5
,
L"FROMHUE5"
},
{
TMT_INT
,
TMT_TOHUE1
,
L"TOHUE1"
},
{
TMT_INT
,
TMT_TOHUE2
,
L"TOHUE2"
},
{
TMT_INT
,
TMT_TOHUE3
,
L"TOHUE3"
},
{
TMT_INT
,
TMT_TOHUE4
,
L"TOHUE4"
},
{
TMT_INT
,
TMT_TOHUE5
,
L"TOHUE5"
},
{
TMT_COLOR
,
TMT_FROMCOLOR1
,
L"FROMCOLOR1"
},
{
TMT_COLOR
,
TMT_FROMCOLOR2
,
L"FROMCOLOR2"
},
{
TMT_COLOR
,
TMT_FROMCOLOR3
,
L"FROMCOLOR3"
},
{
TMT_COLOR
,
TMT_FROMCOLOR4
,
L"FROMCOLOR4"
},
{
TMT_COLOR
,
TMT_FROMCOLOR5
,
L"FROMCOLOR5"
},
{
TMT_COLOR
,
TMT_TOCOLOR1
,
L"TOCOLOR1"
},
{
TMT_COLOR
,
TMT_TOCOLOR2
,
L"TOCOLOR2"
},
{
TMT_COLOR
,
TMT_TOCOLOR3
,
L"TOCOLOR3"
},
{
TMT_COLOR
,
TMT_TOCOLOR4
,
L"TOCOLOR4"
},
{
TMT_COLOR
,
TMT_TOCOLOR5
,
L"TOCOLOR5"
},
{
TMT_BOOL
,
TMT_TRANSPARENT
,
L"TRANSPARENT"
},
{
TMT_BOOL
,
TMT_AUTOSIZE
,
L"AUTOSIZE"
},
{
TMT_BOOL
,
TMT_BORDERONLY
,
L"BORDERONLY"
},
{
TMT_BOOL
,
TMT_COMPOSITED
,
L"COMPOSITED"
},
{
TMT_BOOL
,
TMT_BGFILL
,
L"BGFILL"
},
{
TMT_BOOL
,
TMT_GLYPHTRANSPARENT
,
L"GLYPHTRANSPARENT"
},
{
TMT_BOOL
,
TMT_GLYPHONLY
,
L"GLYPHONLY"
},
{
TMT_BOOL
,
TMT_ALWAYSSHOWSIZINGBAR
,
L"ALWAYSSHOWSIZINGBAR"
},
{
TMT_BOOL
,
TMT_MIRRORIMAGE
,
L"MIRRORIMAGE"
},
{
TMT_BOOL
,
TMT_UNIFORMSIZING
,
L"UNIFORMSIZING"
},
{
TMT_BOOL
,
TMT_INTEGRALSIZING
,
L"INTEGRALSIZING"
},
{
TMT_BOOL
,
TMT_SOURCEGROW
,
L"SOURCEGROW"
},
{
TMT_BOOL
,
TMT_SOURCESHRINK
,
L"SOURCESHRINK"
},
{
TMT_INT
,
TMT_IMAGECOUNT
,
L"IMAGECOUNT"
},
{
TMT_INT
,
TMT_ALPHALEVEL
,
L"ALPHALEVEL"
},
{
TMT_INT
,
TMT_BORDERSIZE
,
L"BORDERSIZE"
},
{
TMT_INT
,
TMT_ROUNDCORNERWIDTH
,
L"ROUNDCORNERWIDTH"
},
{
TMT_INT
,
TMT_ROUNDCORNERHEIGHT
,
L"ROUNDCORNERHEIGHT"
},
{
TMT_INT
,
TMT_GRADIENTRATIO1
,
L"GRADIENTRATIO1"
},
{
TMT_INT
,
TMT_GRADIENTRATIO2
,
L"GRADIENTRATIO2"
},
{
TMT_INT
,
TMT_GRADIENTRATIO3
,
L"GRADIENTRATIO3"
},
{
TMT_INT
,
TMT_GRADIENTRATIO4
,
L"GRADIENTRATIO4"
},
{
TMT_INT
,
TMT_GRADIENTRATIO5
,
L"GRADIENTRATIO5"
},
{
TMT_INT
,
TMT_PROGRESSCHUNKSIZE
,
L"PROGRESSCHUNKSIZE"
},
{
TMT_INT
,
TMT_PROGRESSSPACESIZE
,
L"PROGRESSSPACESIZE"
},
{
TMT_INT
,
TMT_SATURATION
,
L"SATURATION"
},
{
TMT_INT
,
TMT_TEXTBORDERSIZE
,
L"TEXTBORDERSIZE"
},
{
TMT_INT
,
TMT_ALPHATHRESHOLD
,
L"ALPHATHRESHOLD"
},
{
TMT_SIZE
,
TMT_WIDTH
,
L"WIDTH"
},
{
TMT_SIZE
,
TMT_HEIGHT
,
L"HEIGHT"
},
{
TMT_INT
,
TMT_GLYPHINDEX
,
L"GLYPHINDEX"
},
{
TMT_INT
,
TMT_TRUESIZESTRETCHMARK
,
L"TRUESIZESTRETCHMARK"
},
{
TMT_INT
,
TMT_MINDPI1
,
L"MINDPI1"
},
{
TMT_INT
,
TMT_MINDPI2
,
L"MINDPI2"
},
{
TMT_INT
,
TMT_MINDPI3
,
L"MINDPI3"
},
{
TMT_INT
,
TMT_MINDPI4
,
L"MINDPI4"
},
{
TMT_INT
,
TMT_MINDPI5
,
L"MINDPI5"
},
{
TMT_INT
,
TMT_MINDPI6
,
L"MINDPI6"
},
{
TMT_INT
,
TMT_MINDPI7
,
L"MINDPI7"
},
{
TMT_FONT
,
TMT_GLYPHFONT
,
L"GLYPHFONT"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE
,
L"IMAGEFILE"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE1
,
L"IMAGEFILE1"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE2
,
L"IMAGEFILE2"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE3
,
L"IMAGEFILE3"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE4
,
L"IMAGEFILE4"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE5
,
L"IMAGEFILE5"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE6
,
L"IMAGEFILE6"
},
{
TMT_FILENAME
,
TMT_IMAGEFILE7
,
L"IMAGEFILE7"
},
{
TMT_FILENAME
,
TMT_STOCKIMAGEFILE
,
L"STOCKIMAGEFILE"
},
{
TMT_FILENAME
,
TMT_GLYPHIMAGEFILE
,
L"GLYPHIMAGEFILE"
},
{
TMT_STRING
,
TMT_TEXT
,
L"TEXT"
},
{
TMT_POSITION
,
TMT_OFFSET
,
L"OFFSET"
},
{
TMT_POSITION
,
TMT_TEXTSHADOWOFFSET
,
L"TEXTSHADOWOFFSET"
},
{
TMT_POSITION
,
TMT_MINSIZE
,
L"MINSIZE"
},
{
TMT_POSITION
,
TMT_MINSIZE1
,
L"MINSIZE1"
},
{
TMT_POSITION
,
TMT_MINSIZE2
,
L"MINSIZE2"
},
{
TMT_POSITION
,
TMT_MINSIZE3
,
L"MINSIZE3"
},
{
TMT_POSITION
,
TMT_MINSIZE4
,
L"MINSIZE4"
},
{
TMT_POSITION
,
TMT_MINSIZE5
,
L"MINSIZE5"
},
{
TMT_POSITION
,
TMT_NORMALSIZE
,
L"NORMALSIZE"
},
{
TMT_POSITION
,
TMT_MINSIZE6
,
L"MINSIZE6"
},
{
TMT_POSITION
,
TMT_MINSIZE7
,
L"MINSIZE7"
},
{
TMT_MARGINS
,
TMT_SIZINGMARGINS
,
L"SIZINGMARGINS"
},
{
TMT_MARGINS
,
TMT_CONTENTMARGINS
,
L"CONTENTMARGINS"
},
{
TMT_MARGINS
,
TMT_CAPTIONMARGINS
,
L"CAPTIONMARGINS"
},
{
TMT_COLOR
,
TMT_BORDERCOLOR
,
L"BORDERCOLOR"
},
{
TMT_COLOR
,
TMT_FILLCOLOR
,
L"FILLCOLOR"
},
{
TMT_COLOR
,
TMT_TEXTCOLOR
,
L"TEXTCOLOR"
},
{
TMT_COLOR
,
TMT_EDGELIGHTCOLOR
,
L"EDGELIGHTCOLOR"
},
{
TMT_COLOR
,
TMT_EDGEHIGHLIGHTCOLOR
,
L"EDGEHIGHLIGHTCOLOR"
},
{
TMT_COLOR
,
TMT_EDGESHADOWCOLOR
,
L"EDGESHADOWCOLOR"
},
{
TMT_COLOR
,
TMT_EDGEDKSHADOWCOLOR
,
L"EDGEDKSHADOWCOLOR"
},
{
TMT_COLOR
,
TMT_EDGEFILLCOLOR
,
L"EDGEFILLCOLOR"
},
{
TMT_COLOR
,
TMT_TRANSPARENTCOLOR
,
L"TRANSPARENTCOLOR"
},
{
TMT_COLOR
,
TMT_GRADIENTCOLOR1
,
L"GRADIENTCOLOR1"
},
{
TMT_COLOR
,
TMT_GRADIENTCOLOR2
,
L"GRADIENTCOLOR2"
},
{
TMT_COLOR
,
TMT_GRADIENTCOLOR3
,
L"GRADIENTCOLOR3"
},
{
TMT_COLOR
,
TMT_GRADIENTCOLOR4
,
L"GRADIENTCOLOR4"
},
{
TMT_COLOR
,
TMT_GRADIENTCOLOR5
,
L"GRADIENTCOLOR5"
},
{
TMT_COLOR
,
TMT_SHADOWCOLOR
,
L"SHADOWCOLOR"
},
{
TMT_COLOR
,
TMT_GLOWCOLOR
,
L"GLOWCOLOR"
},
{
TMT_COLOR
,
TMT_TEXTBORDERCOLOR
,
L"TEXTBORDERCOLOR"
},
{
TMT_COLOR
,
TMT_TEXTSHADOWCOLOR
,
L"TEXTSHADOWCOLOR"
},
{
TMT_COLOR
,
TMT_GLYPHTEXTCOLOR
,
L"GLYPHTEXTCOLOR"
},
{
TMT_COLOR
,
TMT_GLYPHTRANSPARENTCOLOR
,
L"GLYPHTRANSPARENTCOLOR"
},
{
TMT_COLOR
,
TMT_FILLCOLORHINT
,
L"FILLCOLORHINT"
},
{
TMT_COLOR
,
TMT_BORDERCOLORHINT
,
L"BORDERCOLORHINT"
},
{
TMT_COLOR
,
TMT_ACCENTCOLORHINT
,
L"ACCENTCOLORHINT"
},
{
TMT_ENUM
,
TMT_BGTYPE
,
L"BGTYPE"
},
{
TMT_ENUM
,
TMT_BORDERTYPE
,
L"BORDERTYPE"
},
{
TMT_ENUM
,
TMT_FILLTYPE
,
L"FILLTYPE"
},
{
TMT_ENUM
,
TMT_SIZINGTYPE
,
L"SIZINGTYPE"
},
{
TMT_ENUM
,
TMT_HALIGN
,
L"HALIGN"
},
{
TMT_ENUM
,
TMT_CONTENTALIGNMENT
,
L"CONTENTALIGNMENT"
},
{
TMT_ENUM
,
TMT_VALIGN
,
L"VALIGN"
},
{
TMT_ENUM
,
TMT_OFFSETTYPE
,
L"OFFSETTYPE"
},
{
TMT_ENUM
,
TMT_ICONEFFECT
,
L"ICONEFFECT"
},
{
TMT_ENUM
,
TMT_TEXTSHADOWTYPE
,
L"TEXTSHADOWTYPE"
},
{
TMT_ENUM
,
TMT_IMAGELAYOUT
,
L"IMAGELAYOUT"
},
{
TMT_ENUM
,
TMT_GLYPHTYPE
,
L"GLYPHTYPE"
},
{
TMT_ENUM
,
TMT_IMAGESELECTTYPE
,
L"IMAGESELECTTYPE"
},
{
TMT_ENUM
,
TMT_GLYPHFONTSIZINGTYPE
,
L"GLYPHFONTSIZINGTYPE"
},
{
TMT_ENUM
,
TMT_TRUESIZESCALINGTYPE
,
L"TRUESIZESCALINGTYPE"
},
{
TMT_BOOL
,
TMT_USERPICTURE
,
L"USERPICTURE"
},
{
TMT_RECT
,
TMT_DEFAULTPANESIZE
,
L"DEFAULTPANESIZE"
},
{
TMT_COLOR
,
TMT_BLENDCOLOR
,
L"BLENDCOLOR"
},
{
TMT_INTLIST
,
TMT_TRANSITIONDURATIONS
,
L"TRANSITIONDURATIONS"
},
{
0
,
0
,
L""
}
{
L"ACCENTCOLORHINT"
,
TMT_COLOR
,
TMT_ACCENTCOLORHINT
},
{
L"ACTIVEBORDER"
,
TMT_COLOR
,
TMT_ACTIVEBORDER
},
{
L"ACTIVECAPTION"
,
TMT_COLOR
,
TMT_ACTIVECAPTION
},
{
L"ALPHALEVEL"
,
TMT_INT
,
TMT_ALPHALEVEL
},
{
L"ALPHATHRESHOLD"
,
TMT_INT
,
TMT_ALPHATHRESHOLD
},
{
L"ALWAYSSHOWSIZINGBAR"
,
TMT_BOOL
,
TMT_ALWAYSSHOWSIZINGBAR
},
{
L"APPWORKSPACE"
,
TMT_COLOR
,
TMT_APPWORKSPACE
},
{
L"AUTHOR"
,
TMT_STRING
,
TMT_AUTHOR
},
{
L"AUTOSIZE"
,
TMT_BOOL
,
TMT_AUTOSIZE
},
{
L"BACKGROUND"
,
TMT_COLOR
,
TMT_BACKGROUND
},
{
L"BGFILL"
,
TMT_BOOL
,
TMT_BGFILL
},
{
L"BGTYPE"
,
TMT_ENUM
,
TMT_BGTYPE
},
{
L"BLENDCOLOR"
,
TMT_COLOR
,
TMT_BLENDCOLOR
},
{
L"BODYFONT"
,
TMT_FONT
,
TMT_BODYFONT
},
{
L"BOOL"
,
TMT_BOOL
,
TMT_BOOL
},
{
L"BORDERCOLOR"
,
TMT_COLOR
,
TMT_BORDERCOLOR
},
{
L"BORDERCOLORHINT"
,
TMT_COLOR
,
TMT_BORDERCOLORHINT
},
{
L"BORDERONLY"
,
TMT_BOOL
,
TMT_BORDERONLY
},
{
L"BORDERSIZE"
,
TMT_INT
,
TMT_BORDERSIZE
},
{
L"BORDERTYPE"
,
TMT_ENUM
,
TMT_BORDERTYPE
},
{
L"BTNFACE"
,
TMT_COLOR
,
TMT_BTNFACE
},
{
L"BTNHIGHLIGHT"
,
TMT_COLOR
,
TMT_BTNHIGHLIGHT
},
{
L"BTNSHADOW"
,
TMT_COLOR
,
TMT_BTNSHADOW
},
{
L"BTNTEXT"
,
TMT_COLOR
,
TMT_BTNTEXT
},
{
L"BUTTONALTERNATEFACE"
,
TMT_COLOR
,
TMT_BUTTONALTERNATEFACE
},
{
L"CAPTIONBARHEIGHT"
,
TMT_SIZE
,
TMT_CAPTIONBARHEIGHT
},
{
L"CAPTIONBARWIDTH"
,
TMT_SIZE
,
TMT_CAPTIONBARWIDTH
},
{
L"CAPTIONFONT"
,
TMT_FONT
,
TMT_CAPTIONFONT
},
{
L"CAPTIONMARGINS"
,
TMT_MARGINS
,
TMT_CAPTIONMARGINS
},
{
L"CAPTIONTEXT"
,
TMT_COLOR
,
TMT_CAPTIONTEXT
},
{
L"CHARSET"
,
TMT_INT
,
TMT_CHARSET
},
{
L"COLOR"
,
TMT_COLOR
,
TMT_COLOR
},
{
L"COLORSCHEMES"
,
TMT_STRING
,
TMT_COLORSCHEMES
},
{
L"COMPANY"
,
TMT_STRING
,
TMT_COMPANY
},
{
L"COMPOSITED"
,
TMT_BOOL
,
TMT_COMPOSITED
},
{
L"CONTENTALIGNMENT"
,
TMT_ENUM
,
TMT_CONTENTALIGNMENT
},
{
L"CONTENTMARGINS"
,
TMT_MARGINS
,
TMT_CONTENTMARGINS
},
{
L"COPYRIGHT"
,
TMT_STRING
,
TMT_COPYRIGHT
},
{
L"CSSNAME"
,
TMT_STRING
,
TMT_CSSNAME
},
{
L"DEFAULTPANESIZE"
,
TMT_RECT
,
TMT_DEFAULTPANESIZE
},
{
L"DESCRIPTION"
,
TMT_STRING
,
TMT_DESCRIPTION
},
{
L"DISPLAYNAME"
,
TMT_STRING
,
TMT_DISPLAYNAME
},
{
L"DKSHADOW3D"
,
TMT_COLOR
,
TMT_DKSHADOW3D
},
{
L"EDGEDKSHADOWCOLOR"
,
TMT_COLOR
,
TMT_EDGEDKSHADOWCOLOR
},
{
L"EDGEFILLCOLOR"
,
TMT_COLOR
,
TMT_EDGEFILLCOLOR
},
{
L"EDGEHIGHLIGHTCOLOR"
,
TMT_COLOR
,
TMT_EDGEHIGHLIGHTCOLOR
},
{
L"EDGELIGHTCOLOR"
,
TMT_COLOR
,
TMT_EDGELIGHTCOLOR
},
{
L"EDGESHADOWCOLOR"
,
TMT_COLOR
,
TMT_EDGESHADOWCOLOR
},
{
L"FILENAME"
,
TMT_FILENAME
,
TMT_FILENAME
},
{
L"FILLCOLOR"
,
TMT_COLOR
,
TMT_FILLCOLOR
},
{
L"FILLCOLORHINT"
,
TMT_COLOR
,
TMT_FILLCOLORHINT
},
{
L"FILLTYPE"
,
TMT_ENUM
,
TMT_FILLTYPE
},
{
L"FLATMENUS"
,
TMT_BOOL
,
TMT_FLATMENUS
},
{
L"FONT"
,
TMT_FONT
,
TMT_FONT
},
{
L"FROMCOLOR1"
,
TMT_COLOR
,
TMT_FROMCOLOR1
},
{
L"FROMCOLOR2"
,
TMT_COLOR
,
TMT_FROMCOLOR2
},
{
L"FROMCOLOR3"
,
TMT_COLOR
,
TMT_FROMCOLOR3
},
{
L"FROMCOLOR4"
,
TMT_COLOR
,
TMT_FROMCOLOR4
},
{
L"FROMCOLOR5"
,
TMT_COLOR
,
TMT_FROMCOLOR5
},
{
L"FROMHUE1"
,
TMT_INT
,
TMT_FROMHUE1
},
{
L"FROMHUE2"
,
TMT_INT
,
TMT_FROMHUE2
},
{
L"FROMHUE3"
,
TMT_INT
,
TMT_FROMHUE3
},
{
L"FROMHUE4"
,
TMT_INT
,
TMT_FROMHUE4
},
{
L"FROMHUE5"
,
TMT_INT
,
TMT_FROMHUE5
},
{
L"GLOWCOLOR"
,
TMT_COLOR
,
TMT_GLOWCOLOR
},
{
L"GLYPHFONT"
,
TMT_FONT
,
TMT_GLYPHFONT
},
{
L"GLYPHFONTSIZINGTYPE"
,
TMT_ENUM
,
TMT_GLYPHFONTSIZINGTYPE
},
{
L"GLYPHIMAGEFILE"
,
TMT_FILENAME
,
TMT_GLYPHIMAGEFILE
},
{
L"GLYPHINDEX"
,
TMT_INT
,
TMT_GLYPHINDEX
},
{
L"GLYPHONLY"
,
TMT_BOOL
,
TMT_GLYPHONLY
},
{
L"GLYPHTEXTCOLOR"
,
TMT_COLOR
,
TMT_GLYPHTEXTCOLOR
},
{
L"GLYPHTRANSPARENT"
,
TMT_BOOL
,
TMT_GLYPHTRANSPARENT
},
{
L"GLYPHTRANSPARENTCOLOR"
,
TMT_COLOR
,
TMT_GLYPHTRANSPARENTCOLOR
},
{
L"GLYPHTYPE"
,
TMT_ENUM
,
TMT_GLYPHTYPE
},
{
L"GRADIENTACTIVECAPTION"
,
TMT_COLOR
,
TMT_GRADIENTACTIVECAPTION
},
{
L"GRADIENTCOLOR1"
,
TMT_COLOR
,
TMT_GRADIENTCOLOR1
},
{
L"GRADIENTCOLOR2"
,
TMT_COLOR
,
TMT_GRADIENTCOLOR2
},
{
L"GRADIENTCOLOR3"
,
TMT_COLOR
,
TMT_GRADIENTCOLOR3
},
{
L"GRADIENTCOLOR4"
,
TMT_COLOR
,
TMT_GRADIENTCOLOR4
},
{
L"GRADIENTCOLOR5"
,
TMT_COLOR
,
TMT_GRADIENTCOLOR5
},
{
L"GRADIENTINACTIVECAPTION"
,
TMT_COLOR
,
TMT_GRADIENTINACTIVECAPTION
},
{
L"GRADIENTRATIO1"
,
TMT_INT
,
TMT_GRADIENTRATIO1
},
{
L"GRADIENTRATIO2"
,
TMT_INT
,
TMT_GRADIENTRATIO2
},
{
L"GRADIENTRATIO3"
,
TMT_INT
,
TMT_GRADIENTRATIO3
},
{
L"GRADIENTRATIO4"
,
TMT_INT
,
TMT_GRADIENTRATIO4
},
{
L"GRADIENTRATIO5"
,
TMT_INT
,
TMT_GRADIENTRATIO5
},
{
L"GRAYTEXT"
,
TMT_COLOR
,
TMT_GRAYTEXT
},
{
L"HALIGN"
,
TMT_ENUM
,
TMT_HALIGN
},
{
L"HEADING1FONT"
,
TMT_FONT
,
TMT_HEADING1FONT
},
{
L"HEADING2FONT"
,
TMT_FONT
,
TMT_HEADING2FONT
},
{
L"HEIGHT"
,
TMT_SIZE
,
TMT_HEIGHT
},
{
L"HIGHLIGHT"
,
TMT_COLOR
,
TMT_HIGHLIGHT
},
{
L"HIGHLIGHTTEXT"
,
TMT_COLOR
,
TMT_HIGHLIGHTTEXT
},
{
L"HOTTRACKING"
,
TMT_COLOR
,
TMT_HOTTRACKING
},
{
L"ICONEFFECT"
,
TMT_ENUM
,
TMT_ICONEFFECT
},
{
L"ICONTITLEFONT"
,
TMT_FONT
,
TMT_ICONTITLEFONT
},
{
L"IMAGECOUNT"
,
TMT_INT
,
TMT_IMAGECOUNT
},
{
L"IMAGEFILE"
,
TMT_FILENAME
,
TMT_IMAGEFILE
},
{
L"IMAGEFILE1"
,
TMT_FILENAME
,
TMT_IMAGEFILE1
},
{
L"IMAGEFILE2"
,
TMT_FILENAME
,
TMT_IMAGEFILE2
},
{
L"IMAGEFILE3"
,
TMT_FILENAME
,
TMT_IMAGEFILE3
},
{
L"IMAGEFILE4"
,
TMT_FILENAME
,
TMT_IMAGEFILE4
},
{
L"IMAGEFILE5"
,
TMT_FILENAME
,
TMT_IMAGEFILE5
},
{
L"IMAGEFILE6"
,
TMT_FILENAME
,
TMT_IMAGEFILE6
},
{
L"IMAGEFILE7"
,
TMT_FILENAME
,
TMT_IMAGEFILE7
},
{
L"IMAGELAYOUT"
,
TMT_ENUM
,
TMT_IMAGELAYOUT
},
{
L"IMAGESELECTTYPE"
,
TMT_ENUM
,
TMT_IMAGESELECTTYPE
},
{
L"INACTIVEBORDER"
,
TMT_COLOR
,
TMT_INACTIVEBORDER
},
{
L"INACTIVECAPTION"
,
TMT_COLOR
,
TMT_INACTIVECAPTION
},
{
L"INACTIVECAPTIONTEXT"
,
TMT_COLOR
,
TMT_INACTIVECAPTIONTEXT
},
{
L"INFOBK"
,
TMT_COLOR
,
TMT_INFOBK
},
{
L"INFOTEXT"
,
TMT_COLOR
,
TMT_INFOTEXT
},
{
L"INT"
,
TMT_INT
,
TMT_INT
},
{
L"INTEGRALSIZING"
,
TMT_BOOL
,
TMT_INTEGRALSIZING
},
{
L"INTLIST"
,
TMT_INTLIST
,
TMT_INTLIST
},
{
L"LIGHT3D"
,
TMT_COLOR
,
TMT_LIGHT3D
},
{
L"MARGINS"
,
TMT_MARGINS
,
TMT_MARGINS
},
{
L"MENU"
,
TMT_COLOR
,
TMT_MENU
},
{
L"MENUBAR"
,
TMT_COLOR
,
TMT_MENUBAR
},
{
L"MENUBARHEIGHT"
,
TMT_SIZE
,
TMT_MENUBARHEIGHT
},
{
L"MENUBARWIDTH"
,
TMT_SIZE
,
TMT_MENUBARWIDTH
},
{
L"MENUFONT"
,
TMT_FONT
,
TMT_MENUFONT
},
{
L"MENUHILIGHT"
,
TMT_COLOR
,
TMT_MENUHILIGHT
},
{
L"MENUTEXT"
,
TMT_COLOR
,
TMT_MENUTEXT
},
{
L"MINCOLORDEPTH"
,
TMT_INT
,
TMT_MINCOLORDEPTH
},
{
L"MINDPI1"
,
TMT_INT
,
TMT_MINDPI1
},
{
L"MINDPI2"
,
TMT_INT
,
TMT_MINDPI2
},
{
L"MINDPI3"
,
TMT_INT
,
TMT_MINDPI3
},
{
L"MINDPI4"
,
TMT_INT
,
TMT_MINDPI4
},
{
L"MINDPI5"
,
TMT_INT
,
TMT_MINDPI5
},
{
L"MINDPI6"
,
TMT_INT
,
TMT_MINDPI6
},
{
L"MINDPI7"
,
TMT_INT
,
TMT_MINDPI7
},
{
L"MINSIZE"
,
TMT_POSITION
,
TMT_MINSIZE
},
{
L"MINSIZE1"
,
TMT_POSITION
,
TMT_MINSIZE1
},
{
L"MINSIZE2"
,
TMT_POSITION
,
TMT_MINSIZE2
},
{
L"MINSIZE3"
,
TMT_POSITION
,
TMT_MINSIZE3
},
{
L"MINSIZE4"
,
TMT_POSITION
,
TMT_MINSIZE4
},
{
L"MINSIZE5"
,
TMT_POSITION
,
TMT_MINSIZE5
},
{
L"MINSIZE6"
,
TMT_POSITION
,
TMT_MINSIZE6
},
{
L"MINSIZE7"
,
TMT_POSITION
,
TMT_MINSIZE7
},
{
L"MIRRORIMAGE"
,
TMT_BOOL
,
TMT_MIRRORIMAGE
},
{
L"MSGBOXFONT"
,
TMT_FONT
,
TMT_MSGBOXFONT
},
{
L"NORMALSIZE"
,
TMT_POSITION
,
TMT_NORMALSIZE
},
{
L"OFFSET"
,
TMT_POSITION
,
TMT_OFFSET
},
{
L"OFFSETTYPE"
,
TMT_ENUM
,
TMT_OFFSETTYPE
},
{
L"POSITION"
,
TMT_POSITION
,
TMT_POSITION
},
{
L"PROGRESSCHUNKSIZE"
,
TMT_INT
,
TMT_PROGRESSCHUNKSIZE
},
{
L"PROGRESSSPACESIZE"
,
TMT_INT
,
TMT_PROGRESSSPACESIZE
},
{
L"RECT"
,
TMT_RECT
,
TMT_RECT
},
{
L"ROUNDCORNERHEIGHT"
,
TMT_INT
,
TMT_ROUNDCORNERHEIGHT
},
{
L"ROUNDCORNERWIDTH"
,
TMT_INT
,
TMT_ROUNDCORNERWIDTH
},
{
L"SATURATION"
,
TMT_INT
,
TMT_SATURATION
},
{
L"SCROLLBAR"
,
TMT_COLOR
,
TMT_SCROLLBAR
},
{
L"SCROLLBARHEIGHT"
,
TMT_SIZE
,
TMT_SCROLLBARHEIGHT
},
{
L"SCROLLBARWIDTH"
,
TMT_SIZE
,
TMT_SCROLLBARWIDTH
},
{
L"SHADOWCOLOR"
,
TMT_COLOR
,
TMT_SHADOWCOLOR
},
{
L"SIZE"
,
TMT_SIZE
,
TMT_SIZE
},
{
L"SIZES"
,
TMT_STRING
,
TMT_SIZES
},
{
L"SIZINGBORDERWIDTH"
,
TMT_SIZE
,
TMT_SIZINGBORDERWIDTH
},
{
L"SIZINGMARGINS"
,
TMT_MARGINS
,
TMT_SIZINGMARGINS
},
{
L"SIZINGTYPE"
,
TMT_ENUM
,
TMT_SIZINGTYPE
},
{
L"SMALLCAPTIONFONT"
,
TMT_FONT
,
TMT_SMALLCAPTIONFONT
},
{
L"SMCAPTIONBARHEIGHT"
,
TMT_SIZE
,
TMT_SMCAPTIONBARHEIGHT
},
{
L"SMCAPTIONBARWIDTH"
,
TMT_SIZE
,
TMT_SMCAPTIONBARWIDTH
},
{
L"SOURCEGROW"
,
TMT_BOOL
,
TMT_SOURCEGROW
},
{
L"SOURCESHRINK"
,
TMT_BOOL
,
TMT_SOURCESHRINK
},
{
L"STATUSFONT"
,
TMT_FONT
,
TMT_STATUSFONT
},
{
L"STOCKIMAGEFILE"
,
TMT_FILENAME
,
TMT_STOCKIMAGEFILE
},
{
L"STRING"
,
TMT_STRING
,
TMT_STRING
},
{
L"TEXT"
,
TMT_STRING
,
TMT_TEXT
},
{
L"TEXTBORDERCOLOR"
,
TMT_COLOR
,
TMT_TEXTBORDERCOLOR
},
{
L"TEXTBORDERSIZE"
,
TMT_INT
,
TMT_TEXTBORDERSIZE
},
{
L"TEXTCOLOR"
,
TMT_COLOR
,
TMT_TEXTCOLOR
},
{
L"TEXTSHADOWCOLOR"
,
TMT_COLOR
,
TMT_TEXTSHADOWCOLOR
},
{
L"TEXTSHADOWOFFSET"
,
TMT_POSITION
,
TMT_TEXTSHADOWOFFSET
},
{
L"TEXTSHADOWTYPE"
,
TMT_ENUM
,
TMT_TEXTSHADOWTYPE
},
{
L"TOCOLOR1"
,
TMT_COLOR
,
TMT_TOCOLOR1
},
{
L"TOCOLOR2"
,
TMT_COLOR
,
TMT_TOCOLOR2
},
{
L"TOCOLOR3"
,
TMT_COLOR
,
TMT_TOCOLOR3
},
{
L"TOCOLOR4"
,
TMT_COLOR
,
TMT_TOCOLOR4
},
{
L"TOCOLOR5"
,
TMT_COLOR
,
TMT_TOCOLOR5
},
{
L"TOHUE1"
,
TMT_INT
,
TMT_TOHUE1
},
{
L"TOHUE2"
,
TMT_INT
,
TMT_TOHUE2
},
{
L"TOHUE3"
,
TMT_INT
,
TMT_TOHUE3
},
{
L"TOHUE4"
,
TMT_INT
,
TMT_TOHUE4
},
{
L"TOHUE5"
,
TMT_INT
,
TMT_TOHUE5
},
{
L"TOOLTIP"
,
TMT_STRING
,
TMT_TOOLTIP
},
{
L"TRANSITIONDURATIONS"
,
TMT_INTLIST
,
TMT_TRANSITIONDURATIONS
},
{
L"TRANSPARENT"
,
TMT_BOOL
,
TMT_TRANSPARENT
},
{
L"TRANSPARENTCOLOR"
,
TMT_COLOR
,
TMT_TRANSPARENTCOLOR
},
{
L"TRUESIZESCALINGTYPE"
,
TMT_ENUM
,
TMT_TRUESIZESCALINGTYPE
},
{
L"TRUESIZESTRETCHMARK"
,
TMT_INT
,
TMT_TRUESIZESTRETCHMARK
},
{
L"UNIFORMSIZING"
,
TMT_BOOL
,
TMT_UNIFORMSIZING
},
{
L"URL"
,
TMT_STRING
,
TMT_URL
},
{
L"USERPICTURE"
,
TMT_BOOL
,
TMT_USERPICTURE
},
{
L"VALIGN"
,
TMT_ENUM
,
TMT_VALIGN
},
{
L"VERSION"
,
TMT_STRING
,
TMT_VERSION
},
{
L"WIDTH"
,
TMT_SIZE
,
TMT_WIDTH
},
{
L"WINDOW"
,
TMT_COLOR
,
TMT_WINDOW
},
{
L"WINDOWFRAME"
,
TMT_COLOR
,
TMT_WINDOWFRAME
},
{
L"WINDOWTEXT"
,
TMT_COLOR
,
TMT_WINDOWTEXT
},
{
L"XMLNAME"
,
TMT_STRING
,
TMT_XMLNAME
},
};
/***********************************************************************
...
...
@@ -1485,6 +1488,13 @@ BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszStat
return
TRUE
;
}
static
int
__cdecl
msstyles_property_map_compare
(
const
void
*
a
,
const
void
*
b
)
{
const
MSSTYLES_PROPERTY_MAP
*
a_prop
=
a
,
*
b_prop
=
b
;
INT
size
=
ARRAY_SIZE
(
a_prop
->
szPropertyName
);
return
CompareStringOrdinal
(
a_prop
->
szPropertyName
,
size
,
b_prop
->
szPropertyName
,
size
,
TRUE
)
-
CSTR_EQUAL
;
}
/**********************************************************************
* MSSTYLES_LookupProperty
*
...
...
@@ -1500,15 +1510,19 @@ BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszStat
*/
BOOL
MSSTYLES_LookupProperty
(
LPCWSTR
pszPropertyName
,
int
*
dwPrimitive
,
int
*
dwId
)
{
DWORD
item
=
0
;
do
{
if
(
!
lstrcmpiW
(
mapProperty
[
item
].
szPropertyName
,
pszPropertyName
))
{
if
(
dwPrimitive
)
*
dwPrimitive
=
mapProperty
[
item
].
dwPrimitiveType
;
if
(
dwId
)
*
dwId
=
mapProperty
[
item
].
dwPropertyID
;
return
TRUE
;
}
}
while
(
*
mapProperty
[
++
item
].
szPropertyName
);
return
FALSE
;
MSSTYLES_PROPERTY_MAP
key
=
{{
0
}},
*
found
;
SIZE_T
len
;
if
((
len
=
wcslen
(
pszPropertyName
))
>=
ARRAY_SIZE
(
key
.
szPropertyName
))
return
FALSE
;
memcpy
(
key
.
szPropertyName
,
pszPropertyName
,
len
*
sizeof
(
WCHAR
));
if
(
!
(
found
=
bsearch
(
&
key
,
mapProperty
,
ARRAY_SIZE
(
mapProperty
),
sizeof
(
*
mapProperty
),
msstyles_property_map_compare
)))
return
FALSE
;
if
(
dwPrimitive
)
*
dwPrimitive
=
found
->
dwPrimitiveType
;
if
(
dwId
)
*
dwId
=
found
->
dwPropertyID
;
return
TRUE
;
}
/**********************************************************************
...
...
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