1 #pragma once 2 3 // Create one struct 4 // Make usable for different users (multiple structs!) 5 6 #define SPI_TABLE1_MIN 1 7 #define SPI_TABLE1_MAX 119 8 #define SPI_TABLE2_MIN 4096 9 #define SPI_TABLE2_MAX 4171 10 #define SPI_TABLE3_MIN 8192 11 #define SPI_TABLE3_MAX 8215 12 13 #define SPIF_PROTECT 0x80000 14 15 typedef enum _USERPREFMASKS 16 { 17 UPM_ACTIVEWINDOWTRACKING = 0x01, 18 UPM_MENUANIMATION = 0x02, 19 UPM_COMBOBOXANIMATION = 0x04, 20 UPM_LISTBOXSMOOTHSCROLLING = 0x08, 21 UPM_GRADIENTCAPTIONS = 0x10, 22 UPM_KEYBOARDCUES = 0x20, 23 UPM_ACTIVEWNDTRKZORDER = 0x40, 24 UPM_HOTTRACKING = 0x80, 25 UPM_RESERVED = 0x100, 26 UPM_MENUFADE = 0x200, 27 UPM_SELECTIONFADE = 0x400, 28 UPM_TOOLTIPANIMATION = 0x800, 29 UPM_TOOLTIPFADE = 0x1000, 30 UPM_CURSORSHADOW = 0x2000, 31 UPM_CLICKLOCK = 0x8000, 32 UPM_FLATMENU = 0x20000, 33 UPM_DROPSHADOW = 0x40000, 34 // room for more 35 UPM_UIEFFECTS = 0x80000000, 36 UPM_DEFAULT = 0x80003E9E 37 } USERPREFMASKS; 38 39 typedef enum 40 { 41 wmCenter = 0, 42 wmTile, 43 wmStretch, 44 wmFit, 45 wmFill 46 } WALLPAPER_MODE; 47 48 typedef struct _SPIVALUES 49 { 50 /* Metrics */ 51 NONCLIENTMETRICSW ncm; 52 MINIMIZEDMETRICS mm; 53 ICONMETRICSW im; 54 UINT uiFocusBorderWidth; 55 UINT uiFocusBorderHeight; 56 57 /* Accessability */ 58 ACCESSTIMEOUT accesstimeout; 59 HIGHCONTRASTW highcontrast; 60 BOOL bScreenReader; 61 #if(WINVER >= 0x0600) 62 AUDIODESCRIPTION audiodescription; 63 BOOL bClientAreaAnimation; 64 BOOL bDisableOverlappedContent; 65 ULONG ulMsgDuration; 66 BOOL bSpeechRecognition; 67 #endif 68 69 /* Sound */ 70 SOUNDSENTRYW soundsentry; 71 BOOL bShowSounds; 72 BOOL bBeep; 73 74 /* Mouse */ 75 CURSORACCELERATION_INFO caiMouse; 76 MOUSEKEYS mousekeys; 77 BOOL bMouseClickLock; 78 BOOL bMouseCursorShadow; 79 DWORD dwMouseClickLockTime; 80 BOOL bMouseSonar; 81 BOOL bMouseVanish; 82 BOOL bMouseBtnSwap; 83 BOOL bSmoothScrolling; 84 INT iMouseSpeed; 85 INT iMouseHoverWidth; 86 INT iMouseHoverHeight; 87 INT iMouseHoverTime; 88 INT iDblClickWidth; 89 INT iDblClickHeight; 90 INT iDblClickTime; 91 INT iDragWidth; 92 INT iDragHeight; 93 INT iMouseTrails; 94 INT iWheelScrollLines; 95 #if (_WIN32_WINNT >= 0x0600) 96 UINT uiWheelScrollChars; 97 #endif 98 99 /* Keyboard */ 100 FILTERKEYS filterkeys; 101 SERIALKEYS serialkeys; 102 STICKYKEYS stickykeys; 103 TOGGLEKEYS togglekeys; 104 DWORD dwKbdSpeed; 105 BOOL bKbdPref; 106 HKL hklDefInputLang; 107 INT iKbdDelay; 108 109 /* Screen saver */ 110 INT iScrSaverTimeout; 111 BOOL bScrSaverActive; 112 BOOL bScrSaverRunning; 113 #if(WINVER >= 0x0600) 114 BOOL bScrSaverSecure; 115 #endif 116 117 /* Power */ 118 INT iLowPwrTimeout; 119 INT iPwrOffTimeout; 120 BOOL bLowPwrActive; 121 BOOL bPwrOffActive; 122 123 /* UI Effects */ 124 DWORD dwUserPrefMask; 125 BOOL bFontSmoothing; 126 UINT uiFontSmoothingType; 127 UINT uiFontSmoothingContrast; 128 UINT uiFontSmoothingOrientation; 129 BOOL bDragFullWindows; 130 BOOL bMenuDropAlign; 131 DWORD dwMenuShowDelay; 132 BOOL bBlockSendInputResets; 133 #if(_WIN32_WINNT >= 0x0600) 134 BOOL bClearType; 135 #endif 136 137 /* Text metrics */ 138 TEXTMETRICW tmMenuFont; 139 TEXTMETRICW tmCaptionFont; 140 141 /* Wallpaper */ 142 HANDLE hbmWallpaper; 143 ULONG cxWallpaper, cyWallpaper; 144 WALLPAPER_MODE WallpaperMode; 145 UNICODE_STRING ustrWallpaper; 146 WCHAR awcWallpaper[MAX_PATH + 1]; 147 148 BOOL bHandHeld; 149 BOOL bFastTaskSwitch; 150 UINT uiGridGranularity; 151 152 ANIMATIONINFO animationinfo; 153 BOOL bSnapToDefBtn; 154 BOOL bShowImeUi; 155 DWORD dwForegroundLockTimeout; 156 DWORD dwActiveTrackingTimeout; 157 DWORD dwForegroundFlashCount; 158 DWORD dwCaretWidth; 159 160 // SPI_LANGDRIVER 161 // SPI_SETDESKPATTERN 162 // SPI_SETPENWINDOWS 163 // SPI_SETCURSORS 164 // SPI_SETICONS 165 // SPI_SETLANGTOGGLE 166 // SPI_GETWINDOWSEXTENSION 167 168 } SPIVALUES, *PSPIVALUES; 169 170 typedef union _SPIBUFFER 171 { 172 char ach[1]; 173 WCHAR awcWallpaper[MAX_PATH+1]; 174 FILTERKEYS fiterkeys; 175 TOGGLEKEYS togglekeys; 176 MOUSEKEYS mousekeys; 177 STICKYKEYS stickykeys; 178 ACCESSTIMEOUT accesstimeout; 179 SERIALKEYS serialkeys; 180 SOUNDSENTRYW soundsentry; 181 NONCLIENTMETRICSW ncmetrics; 182 MINIMIZEDMETRICS mmmetrics; 183 ICONMETRICSW iconmetrics; 184 HIGHCONTRASTW highcontrast; 185 ANIMATIONINFO animationinfo; 186 #if(WINVER >= 0x0600) 187 AUDIODESCRIPTION audiodescription; 188 #endif 189 } SPIBUFFER; 190 191 extern SPIVALUES gspv; 192 extern BOOL g_PaintDesktopVersion; 193 194 BOOL InitSysParams(); 195 #define SPITESTPREF(x) (gspv.dwUserPrefMask & x ? 1 : 0) 196