2 * Internal msstyles related defines & declarations
4 * Copyright (C) 2003 Kevin Koltzau
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_MSSTYLES_H
22 #define __WINE_MSSTYLES_H
26 #define MAX_THEME_APP_NAME 60
27 #define MAX_THEME_CLASS_NAME 60
28 #define MAX_THEME_VALUE_NAME 60
30 typedef struct _THEME_PROPERTY {
33 PROPERTYORIGIN origin;
38 struct _THEME_PROPERTY *next;
39 } THEME_PROPERTY, *PTHEME_PROPERTY;
41 typedef struct _THEME_PARTSTATE {
44 PTHEME_PROPERTY properties;
46 struct _THEME_PARTSTATE *next;
47 } THEME_PARTSTATE, *PTHEME_PARTSTATE;
49 typedef struct _THEME_CLASS {
51 WCHAR szAppName[MAX_THEME_APP_NAME];
52 WCHAR szClassName[MAX_THEME_CLASS_NAME];
53 PTHEME_PARTSTATE partstate;
54 struct _THEME_CLASS *overrides;
56 struct _THEME_CLASS *next;
57 } THEME_CLASS, *PTHEME_CLASS;
59 typedef struct _THEME_FILE {
62 WCHAR szThemeFile[MAX_PATH];
63 LPWSTR pszAvailColors;
66 LPWSTR pszSelectedColor;
67 LPWSTR pszSelectedSize;
70 PTHEME_PROPERTY metrics;
71 } THEME_FILE, *PTHEME_FILE;
73 typedef void* PUXINI_FILE;
75 HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWSTR pszSizeName, PTHEME_FILE *tf);
76 void MSSTYLES_CloseThemeFile(PTHEME_FILE tf);
77 HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf);
78 PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList);
79 HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc);
80 BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId);
81 BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue);
82 BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszState, int *iPartId, int *iStateId);
83 PUXINI_FILE MSSTYLES_GetThemeIni(PTHEME_FILE tf);
84 PTHEME_PARTSTATE MSSTYLES_FindPartState(PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext);
85 PTHEME_CLASS MSSTYLES_FindClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassName);
86 PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId);
87 PTHEME_PROPERTY MSSTYLES_FindMetric(int iPropertyPrimitive, int iPropertyId);
88 HBITMAP MSSTYLES_LoadBitmap(HDC hdc, PTHEME_CLASS tc, LPCWSTR lpFilename);
90 HRESULT MSSTYLES_GetPropertyBool(PTHEME_PROPERTY tp, BOOL *pfVal);
91 HRESULT MSSTYLES_GetPropertyColor(PTHEME_PROPERTY tp, COLORREF *pColor);
92 HRESULT MSSTYLES_GetPropertyFont(PTHEME_PROPERTY tp, HDC hdc, LOGFONTW *pFont);
93 HRESULT MSSTYLES_GetPropertyInt(PTHEME_PROPERTY tp, int *piVal);
94 HRESULT MSSTYLES_GetPropertyIntList(PTHEME_PROPERTY tp, INTLIST *pIntList);
95 HRESULT MSSTYLES_GetPropertyPosition(PTHEME_PROPERTY tp, POINT *pPoint);
96 HRESULT MSSTYLES_GetPropertyString(PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars);
97 HRESULT MSSTYLES_GetPropertyRect(PTHEME_PROPERTY tp, RECT *pRect);
98 HRESULT MSSTYLES_GetPropertyMargins(PTHEME_PROPERTY tp, RECT *prc, MARGINS *pMargins);
100 PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName);
101 void UXINI_CloseINI(PUXINI_FILE uf);
102 void UXINI_ResetINI(PUXINI_FILE uf);
103 LPCWSTR UXINI_GetNextSection(PUXINI_FILE uf, DWORD *dwLen);
104 BOOL UXINI_FindSection(PUXINI_FILE uf, LPCWSTR lpName);
105 LPCWSTR UXINI_GetNextValue(PUXINI_FILE uf, DWORD *dwNameLen, LPCWSTR *lpValue, DWORD *dwValueLen);
106 BOOL UXINI_FindValue(PUXINI_FILE uf, LPCWSTR lpName, LPCWSTR *lpValue, DWORD *dwValueLen);