ReactOS  0.4.15-dev-5615-gc3644fd
desk.h
Go to the documentation of this file.
1 #ifndef _DESK_H
2 #define _DESK_H
3 
4 #include <stdarg.h>
5 
6 #define WIN32_NO_STATUS
7 #define _INC_WINDOWS
8 #define COM_NO_WINDOWS_H
9 
10 #define COBJMACROS
11 
12 #include <windef.h>
13 #include <winbase.h>
14 #include <winreg.h>
15 #include <wingdi.h>
16 #include <winuser.h>
17 #include <wincon.h>
18 #include <commdlg.h>
19 #include <cpl.h>
20 #include <tchar.h>
21 #include <setupapi.h>
22 #include <shlobj.h>
23 #include <regstr.h>
24 #include <dll/desk/deskcplx.h>
25 #include <strsafe.h>
26 #include <gdiplus.h>
27 
28 #include "appearance.h"
29 #include "preview.h"
30 #include "draw.h"
31 #include "monslctl.h"
32 
33 #include "resource.h"
34 
35 typedef struct _APPLET
36 {
37  int idIcon;
38  int idName;
41 } APPLET, *PAPPLET;
42 
43 typedef struct _DIBITMAP
44 {
50 
51 extern HINSTANCE hApplet;
52 
53 HMENU
55  IN LPCTSTR lpMenuName);
56 
57 PDIBITMAP DibLoadImage(LPTSTR lpFilename);
58 VOID DibFreeImage(PDIBITMAP lpBitmap);
59 
60 INT AllocAndLoadString(LPTSTR *lpTarget,
62  UINT uID);
63 
65 
66 /*
67  * The values in these macros are dependent on the
68  * layout of the monitor image and they must be adjusted
69  * if that image is changed.
70  */
71 #define MONITOR_LEFT 20
72 #define MONITOR_TOP 8
73 #define MONITOR_RIGHT 140
74 #define MONITOR_BOTTOM 92
75 
76 #define MONITOR_WIDTH (MONITOR_RIGHT-MONITOR_LEFT)
77 #define MONITOR_HEIGHT (MONITOR_BOTTOM-MONITOR_TOP)
78 
79 #define MONITOR_ALPHA 0xFF00FF
80 
81 #define MAX_DESK_PAGES 32
82 #define NUM_SPECTRUM_BITMAPS 3
83 
84 #define NUM_DESKTOP_ICONS 4 /* DesktopIcons array size */
85 #define NUM_CHANGE_ICONS 5 /* IconChange array size */
86 
87 typedef struct
88 {
89  BOOL bHideClassic; /* Hide icon in Classic mode */
90  BOOL bHideNewStart; /* Hide icon in Modern Start menu mode */
91 } HIDE_ICON;
92 
93 typedef struct _ICON_PATH
94 {
96 } ICON_PATH;
97 
98 typedef struct _ICON_DATA
99 {
102 } ICON_DATA;
103 
104 typedef struct _DESKTOP_DATA
105 {
112 
121 
122 /* As slider control can't contain user data, we have to keep an
123  * array of RESOLUTION_INFO to have our own associated data.
124  */
125 typedef struct _RESOLUTION_INFO
126 {
130 
131 typedef struct _SETTINGS_ENTRY
132 {
133  struct _SETTINGS_ENTRY *Blink;
134  struct _SETTINGS_ENTRY *Flink;
140 
141 typedef struct _DISPLAY_DEVICE_ENTRY
142 {
149  PSETTINGS_ENTRY Settings; /* Sorted by increasing dmPelsHeight, BPP */
153  PSETTINGS_ENTRY CurrentSettings; /* Points into Settings list */
156 
157 typedef struct _GLOBAL_DATA
158 {
166 
168 extern HWND hCPLWindow;
169 
170 BOOL
172 
173 IDataObject *
174 CreateDevSettings(PDISPLAY_DEVICE_ENTRY DisplayDeviceInfo);
175 
177 
180 
181 BOOL
183 
186 
187 VOID
189 
190 BOOL
192 
193 VOID
195 
196 LONG
198  IN LPCWSTR pszValue OPTIONAL,
199  OUT LPWSTR pszOutBuf,
200  IN DWORD cbOutBuf,
202  IN DWORD Flags,
203  IN LPCWSTR pszDirectory OPTIONAL);
204 
205 #endif /* _DESK_H */
VOID SetDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:181
struct _APPLET APPLET
PSETTINGS_ENTRY CurrentSettings
Definition: precomp.h:79
#define IN
Definition: typedefs.h:39
HINSTANCE hApplet
Definition: access.c:17
GLOBAL_DATA g_GlobalData
Definition: background.c:70
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
struct _SETTINGS_ENTRY * Blink
Definition: precomp.h:60
DWORD dmDisplayFrequency
Definition: desk.h:138
VOID DibFreeImage(PDIBITMAP lpBitmap)
Definition: dibitmap.c:90
HIMAGELIST hLocalImageList
Definition: desk.h:118
SETTINGS_ENTRY InitialSettings
Definition: precomp.h:80
struct _DESKTOP_DATA * PDESKTOP_DATA
#define __cdecl
Definition: accygwin.h:79
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
UINT height
Definition: desk.h:48
struct _DISPLAY_DEVICE_ENTRY * Flink
Definition: precomp.h:69
uint16_t * PWSTR
Definition: typedefs.h:56
HWND hCPLWindow
Definition: desk.c:27
COLORREF desktop_color
Definition: desk.h:159
LONG(APIENTRY * APPLET_PROC)(HWND, UINT, LPARAM, LPARAM)
Definition: cpl.h:23
DWORD dmPelsWidth
Definition: precomp.h:63
BOOL bLocalIconChanged[NUM_CHANGE_ICONS]
Definition: desk.h:116
#define CALLBACK
Definition: compat.h:35
struct _DISPLAY_DEVICE_ENTRY DISPLAY_DEVICE_ENTRY
#define NUM_DESKTOP_ICONS
Definition: desk.h:84
struct _GLOBAL_DATA * PGLOBAL_DATA
Definition: precomp.h:67
LPCWSTR pwszAction
Definition: desk.h:161
BOOL bIconChanged[NUM_CHANGE_ICONS]
Definition: desk.h:109
BOOL bLocalHideIcon[NUM_DESKTOP_ICONS]
Definition: desk.h:114
LONG bmMonHeight
Definition: desk.h:164
UINT_PTR WPARAM
Definition: windef.h:207
DWORD dmBitsPerPel
Definition: precomp.h:62
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
WPARAM wParam
Definition: combotst.c:138
CHAR * LPTSTR
Definition: xmlstorage.h:192
APPLET_PROC AppletProc
Definition: access.h:22
struct _DIBITMAP * PDIBITMAP
HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY, LPCWSTR, UINT, IDataObject *)
HINSTANCE hInstance
Definition: charmap.c:19
BYTE * bits
Definition: desk.h:46
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3272
HMENU LoadPopupMenu(IN HINSTANCE hInstance, IN LPCTSTR lpMenuName)
Definition: desk.c:41
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
Definition: access.h:17
LPTSTR DeviceKey
Definition: desk.h:146
BOOL SwitchDisplayMode(HWND hwndDlg, PWSTR DeviceName, PSETTINGS_ENTRY seInit, PSETTINGS_ENTRY seNew, OUT PLONG rc)
Definition: settings.c:771
UINT width
Definition: desk.h:47
PSETTINGS_ENTRY Settings
Definition: precomp.h:75
BOOL bHideChanged[NUM_DESKTOP_ICONS]
Definition: desk.h:108
HBITMAP hMonitorBitmap
Definition: desk.h:162
LONG_PTR LPARAM
Definition: windef.h:208
LPCWSTR pwszFile
Definition: desk.h:160
#define NUM_CHANGE_ICONS
Definition: desk.h:85
struct _SETTINGS_ENTRY * PSETTINGS_ENTRY
LPTSTR DeviceDescription
Definition: desk.h:144
INT iLocalCurIcon
Definition: desk.h:119
INT_PTR CALLBACK DesktopPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
char TCHAR
Definition: xmlstorage.h:189
BOOL SaveDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:127
CONST CHAR * PCCH
Definition: ntbasedef.h:392
BOOL bHideNewStart
Definition: desk.h:90
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
struct _GLOBAL_DATA GLOBAL_DATA
LONG RegLoadMUIStringW(IN HKEY hKey, IN LPCWSTR pszValue OPTIONAL, OUT LPWSTR pszOutBuf, IN DWORD cbOutBuf, OUT LPDWORD pcbData OPTIONAL, IN DWORD Flags, IN LPCWSTR pszDirectory OPTIONAL)
Definition: muireg.c:53
int idIcon
Definition: desk.h:37
PDIBITMAP DibLoadImage(LPTSTR lpFilename)
Definition: dibitmap.c:13
BITMAPINFO * info
Definition: desk.h:45
LPTSTR DeviceID
Definition: desk.h:147
DWORD COLORREF
Definition: windef.h:300
#define MAX_PATH
Definition: compat.h:34
#define WINAPI
Definition: msvc.h:6
BOOL bLocalHideChanged[NUM_DESKTOP_ICONS]
Definition: desk.h:115
ICON_PATH DefIcon[NUM_CHANGE_ICONS]
Definition: desk.h:111
BOOL DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice)
Definition: advmon.c:81
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG bmMonWidth
Definition: desk.h:163
INT AllocAndLoadString(LPTSTR *lpTarget, HINSTANCE hInst, UINT uID)
struct _ICON_DATA ICON_DATA
struct _DESKTOP_DATA DESKTOP_DATA
struct _SETTINGS_ENTRY SETTINGS_ENTRY
ICON_DATA LocalIcon[NUM_CHANGE_ICONS]
Definition: desk.h:117
DWORD DeviceStateFlags
Definition: precomp.h:74
TCHAR szPath[MAX_PATH]
Definition: desk.h:95
DWORD dmPelsWidth
Definition: precomp.h:54
PRESOLUTION_INFO Resolutions
Definition: precomp.h:77
unsigned char BYTE
Definition: xxhash.c:193
BOOL bHideClassic
Definition: desk.h:89
TCHAR szPath[MAX_PATH]
Definition: desk.h:100
DWORD dmPelsHeight
Definition: precomp.h:55
struct _RESOLUTION_INFO * PRESOLUTION_INFO
HINSTANCE hInst
Definition: dxdiag.c:13
Definition: desk.h:43
FxAutoRegKey hKey
DWORD SettingsCount
Definition: precomp.h:76
unsigned int UINT
Definition: ndis.h:50
LPTSTR DeviceName
Definition: desk.h:145
struct _ICON_PATH ICON_PATH
DWORD ResolutionsCount
Definition: precomp.h:78
Definition: globals.h:96
DWORD dmPelsHeight
Definition: precomp.h:64
#define OUT
Definition: typedefs.h:40
struct _DISPLAY_DEVICE_ENTRY * PDISPLAY_DEVICE_ENTRY
VOID InitDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:63
struct _APPLET * PAPPLET
uint32_t * LPDWORD
Definition: typedefs.h:59
ULONG __cdecl DbgPrint(PCCH Format,...)
Definition: debug.c:427
unsigned int ULONG
Definition: retypes.h:1
IDataObject * CreateDevSettings(PDISPLAY_DEVICE_ENTRY DisplayDeviceInfo)
Definition: devsett.c:1045
int idDescription
Definition: desk.h:39
int idName
Definition: desk.h:38
struct _DIBITMAP DIBITMAP
static HBITMAP
Definition: button.c:44
BOOL bLocalSettingsChanged
Definition: desk.h:113
struct _RESOLUTION_INFO RESOLUTION_INFO
INT_PTR CALLBACK AdvGeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: general.c:115
WCHAR * LPWSTR
Definition: xmlstorage.h:184
HIDE_ICON optIcons[NUM_DESKTOP_ICONS]
Definition: desk.h:107
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
signed int * PLONG
Definition: retypes.h:5
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
TCHAR szTitle[40]
Definition: desk.h:101
Definition: precomp.h:58
LPARAM lParam
Definition: combotst.c:139
BOOL bSettingsChanged
Definition: desk.h:106
struct _SETTINGS_ENTRY * Flink
Definition: precomp.h:61
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
Definition: wincrypt.h:4949
Definition: desk.h:87
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68