1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef SCHEMA_STRINGS 7 8 #ifndef SCHEMADEF_H 9 #define SCHEMADEF_H 10 11 #define SCHEMADEF_VERSION 1 12 13 struct TMPROPINFO { 14 LPCWSTR pszName; 15 SHORT sEnumVal; 16 BYTE bPrimVal; 17 }; 18 19 struct TMSCHEMAINFO { 20 DWORD dwSize; 21 int iSchemaDefVersion; 22 int iThemeMgrVersion; 23 int iPropCount; 24 const struct TMPROPINFO *pPropTable; 25 }; 26 27 #define BEGIN_TM_SCHEMA(name) 28 #define BEGIN_TM_PROPS() enum PropValues { DummyProp = 49, 29 #define BEGIN_TM_ENUM(name) enum name { 30 #define BEGIN_TM_CLASS_PARTS(name) enum name##PARTS { name##PartFiller0, 31 #define BEGIN_TM_PART_STATES(name) enum name##STATES { name##StateFiller0, 32 33 #define TM_PROP(val,prefix,name,primval) prefix##_##name = val, 34 #define TM_ENUM(val,prefix,name) prefix##_##name = val, 35 #define TM_PART(val,prefix,name) prefix##_##name = val, 36 #define TM_STATE(val,prefix,name) prefix##_##name = val, 37 38 #define END_TM_CLASS_PARTS() }; 39 #define END_TM_PART_STATES() }; 40 #define END_TM_PROPS() }; 41 #define END_TM_ENUM() }; 42 #define END_TM_SCHEMA(name) 43 #endif 44 #else 45 46 #undef BEGIN_TM_SCHEMA 47 #undef BEGIN_TM_PROPS 48 #undef BEGIN_TM_ENUM 49 #undef BEGIN_TM_CLASS_PARTS 50 #undef BEGIN_TM_PART_STATES 51 #undef TM_PROP 52 #undef TM_PART 53 #undef TM_STATE 54 #undef TM_ENUM 55 #undef END_TM_CLASS_PARTS 56 #undef END_TM_PART_STATES 57 #undef END_TM_PROPS 58 #undef END_TM_ENUM 59 #undef END_TM_SCHEMA 60 61 #define BEGIN_TM_SCHEMA(name) static const TMPROPINFO name[] = { 62 #define BEGIN_TM_PROPS() 63 #define BEGIN_TM_ENUM(name) {L#name,TMT_ENUMDEF,TMT_ENUMDEF}, 64 #define BEGIN_TM_CLASS_PARTS(name) {L#name L"PARTS",TMT_ENUMDEF,TMT_ENUMDEF}, 65 #define BEGIN_TM_PART_STATES(name) {L#name L"STATES",TMT_ENUMDEF,TMT_ENUMDEF}, 66 67 #define TM_PROP(val,prefix,name,primval) {L#name,prefix##_##name,TMT_##primval}, 68 #define TM_PART(val,prefix,name) {L#name,prefix##_##name,TMT_ENUMVAL}, 69 #define TM_STATE(val,prefix,name) {L#name,prefix##_##name,TMT_ENUMVAL}, 70 #define TM_ENUM(val,prefix,name) {L#name,prefix##_##name,TMT_ENUMVAL}, 71 72 #define END_TM_CLASS_PARTS() 73 #define END_TM_PART_STATES() 74 #define END_TM_PROPS() 75 #define END_TM_ENUM() 76 #define END_TM_SCHEMA(name) }; static const TMSCHEMAINFO *GetSchemaInfo() { static TMSCHEMAINFO si = {sizeof(si)}; si.iSchemaDefVersion = SCHEMADEF_VERSION; si.iThemeMgrVersion = THEMEMGR_VERSION; si.iPropCount = sizeof(name)/sizeof(name[0]); si.pPropTable = name; return &si; } 77 #endif 78