ReactOS 0.4.15-dev-8235-gcd88a97
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
35typedef struct _APPLET
36{
37 int idIcon;
38 int idName;
42
43typedef struct _DIBITMAP
44{
50
51extern HINSTANCE hApplet;
52
55 IN LPCTSTR lpMenuName);
56
57PDIBITMAP DibLoadImage(LPTSTR lpFilename);
59
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
87typedef struct
88{
89 BOOL bHideClassic; /* Hide icon in Classic mode */
90 BOOL bHideNewStart; /* Hide icon in Modern Start menu mode */
91} HIDE_ICON;
92
93typedef struct _ICON_PATH
94{
97
98typedef struct _ICON_DATA
99{
103
104typedef 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 */
125typedef struct _RESOLUTION_INFO
126{
130
131typedef struct _SETTINGS_ENTRY
132{
133 struct _SETTINGS_ENTRY *Blink;
134 struct _SETTINGS_ENTRY *Flink;
140
141typedef struct _DISPLAY_DEVICE_ENTRY
142{
149 PSETTINGS_ENTRY Settings; /* Sorted by increasing dmPelsHeight, BPP */
153 PSETTINGS_ENTRY CurrentSettings; /* Points into Settings list */
156
157typedef struct _GLOBAL_DATA
158{
166
168extern HWND hCPLWindow;
169
170BOOL
172
175
177
180
181BOOL
183
186
187VOID
189
190BOOL
192
193VOID
195
196LONG
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 */
#define __cdecl
Definition: accygwin.h:79
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
LONG(APIENTRY * APPLET_PROC)(HWND, UINT, LPARAM, LPARAM)
Definition: cpl.h:23
struct _DIBITMAP DIBITMAP
struct _DISPLAY_DEVICE_ENTRY DISPLAY_DEVICE_ENTRY
struct _GLOBAL_DATA GLOBAL_DATA
VOID InitDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:63
struct _SETTINGS_ENTRY SETTINGS_ENTRY
BOOL SaveDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:127
struct _ICON_DATA ICON_DATA
#define NUM_DESKTOP_ICONS
Definition: desk.h:84
struct _DIBITMAP * PDIBITMAP
struct _RESOLUTION_INFO * PRESOLUTION_INFO
INT_PTR CALLBACK DesktopPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
struct _DESKTOP_DATA DESKTOP_DATA
struct _APPLET * PAPPLET
BOOL DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice)
Definition: advmon.c:78
struct _DESKTOP_DATA * PDESKTOP_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
struct _DISPLAY_DEVICE_ENTRY * PDISPLAY_DEVICE_ENTRY
HMENU LoadPopupMenu(IN HINSTANCE hInstance, IN LPCTSTR lpMenuName)
Definition: desk.c:52
struct _SETTINGS_ENTRY * PSETTINGS_ENTRY
struct _GLOBAL_DATA * PGLOBAL_DATA
struct _APPLET APPLET
VOID SetDesktopSettings(PDESKTOP_DATA pData)
Definition: desktop.c:181
INT_PTR CALLBACK AdvGeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: general.c:115
#define NUM_CHANGE_ICONS
Definition: desk.h:85
HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY, LPCWSTR, UINT, IDataObject *)
INT AllocAndLoadString(LPTSTR *lpTarget, HINSTANCE hInst, UINT uID)
GLOBAL_DATA g_GlobalData
Definition: background.c:70
VOID DibFreeImage(PDIBITMAP lpBitmap)
Definition: dibitmap.c:90
IDataObject * CreateDevSettings(PDISPLAY_DEVICE_ENTRY DisplayDeviceInfo)
Definition: devsett.c:1045
PDIBITMAP DibLoadImage(LPTSTR lpFilename)
Definition: dibitmap.c:13
BOOL SwitchDisplayMode(HWND hwndDlg, PWSTR DeviceName, PSETTINGS_ENTRY seInit, PSETTINGS_ENTRY seNew, OUT PLONG rc)
Definition: settings.c:771
HWND hCPLWindow
Definition: desk.c:38
struct _ICON_PATH ICON_PATH
struct _RESOLUTION_INFO RESOLUTION_INFO
HINSTANCE hApplet
Definition: access.c:17
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
HINSTANCE hInst
Definition: dxdiag.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
#define DbgPrint
Definition: hal.h:12
static HBITMAP
Definition: button.c:44
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
CONST CHAR * PCCH
Definition: ntbasedef.h:392
long LONG
Definition: pedump.c:60
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: desk.h:88
BOOL bHideNewStart
Definition: desk.h:90
BOOL bHideClassic
Definition: desk.h:89
Definition: globals.h:96
Definition: access.h:18
int idDescription
Definition: desk.h:39
int idIcon
Definition: desk.h:37
APPLET_PROC AppletProc
Definition: access.h:22
int idName
Definition: desk.h:38
ICON_PATH DefIcon[NUM_CHANGE_ICONS]
Definition: desk.h:111
BOOL bSettingsChanged
Definition: desk.h:106
HIDE_ICON optIcons[NUM_DESKTOP_ICONS]
Definition: desk.h:107
HIMAGELIST hLocalImageList
Definition: desk.h:118
BOOL bLocalHideChanged[NUM_DESKTOP_ICONS]
Definition: desk.h:115
BOOL bLocalHideIcon[NUM_DESKTOP_ICONS]
Definition: desk.h:114
BOOL bLocalSettingsChanged
Definition: desk.h:113
ICON_DATA LocalIcon[NUM_CHANGE_ICONS]
Definition: desk.h:117
BOOL bLocalIconChanged[NUM_CHANGE_ICONS]
Definition: desk.h:116
BOOL bHideChanged[NUM_DESKTOP_ICONS]
Definition: desk.h:108
INT iLocalCurIcon
Definition: desk.h:119
BOOL bIconChanged[NUM_CHANGE_ICONS]
Definition: desk.h:109
Definition: desk.h:44
BYTE * bits
Definition: desk.h:46
UINT height
Definition: desk.h:48
UINT width
Definition: desk.h:47
BITMAPINFO * info
Definition: desk.h:45
Definition: precomp.h:68
PRESOLUTION_INFO Resolutions
Definition: precomp.h:77
struct _DISPLAY_DEVICE_ENTRY * Flink
Definition: precomp.h:69
DWORD SettingsCount
Definition: precomp.h:76
SETTINGS_ENTRY InitialSettings
Definition: precomp.h:80
LPTSTR DeviceKey
Definition: desk.h:146
PSETTINGS_ENTRY CurrentSettings
Definition: precomp.h:79
DWORD ResolutionsCount
Definition: precomp.h:78
DWORD DeviceStateFlags
Definition: precomp.h:74
LPTSTR DeviceName
Definition: desk.h:145
LPTSTR DeviceID
Definition: desk.h:147
PSETTINGS_ENTRY Settings
Definition: precomp.h:75
LPTSTR DeviceDescription
Definition: desk.h:144
LONG bmMonHeight
Definition: desk.h:164
LONG bmMonWidth
Definition: desk.h:163
LPCWSTR pwszFile
Definition: desk.h:160
COLORREF desktop_color
Definition: desk.h:159
LPCWSTR pwszAction
Definition: desk.h:161
HBITMAP hMonitorBitmap
Definition: desk.h:162
TCHAR szPath[MAX_PATH]
Definition: desk.h:100
TCHAR szTitle[40]
Definition: desk.h:101
TCHAR szPath[MAX_PATH]
Definition: desk.h:95
DWORD dmPelsWidth
Definition: precomp.h:54
DWORD dmPelsHeight
Definition: precomp.h:55
Definition: precomp.h:59
DWORD dmPelsHeight
Definition: precomp.h:64
DWORD dmDisplayFrequency
Definition: desk.h:138
struct _SETTINGS_ENTRY * Flink
Definition: precomp.h:61
struct _SETTINGS_ENTRY * Blink
Definition: precomp.h:60
DWORD dmBitsPerPel
Definition: precomp.h:62
DWORD dmPelsWidth
Definition: precomp.h:63
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
int32_t * PLONG
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3275
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
Definition: wincrypt.h:4950
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
#define WINAPI
Definition: msvc.h:6
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
char TCHAR
Definition: xmlstorage.h:189
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
CHAR * LPTSTR
Definition: xmlstorage.h:192
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193