ReactOS 0.4.16-dev-1142-g8029339
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
64UINT
67
69
70/*
71 * The values in these macros are dependent on the
72 * layout of the monitor image and they must be adjusted
73 * if that image is changed.
74 */
75#define MONITOR_LEFT 20
76#define MONITOR_TOP 8
77#define MONITOR_RIGHT 140
78#define MONITOR_BOTTOM 92
79
80#define MONITOR_WIDTH (MONITOR_RIGHT-MONITOR_LEFT)
81#define MONITOR_HEIGHT (MONITOR_BOTTOM-MONITOR_TOP)
82
83#define MONITOR_ALPHA 0xFF00FF
84
85#define MAX_DESK_PAGES 32
86#define NUM_SPECTRUM_BITMAPS 3
87
88#define NUM_DESKTOP_ICONS 4 /* DesktopIcons array size */
89#define NUM_CHANGE_ICONS 5 /* IconChange array size */
90
91typedef struct
92{
93 BOOL bHideClassic; /* Hide icon in Classic mode */
94 BOOL bHideNewStart; /* Hide icon in Modern Start menu mode */
95} HIDE_ICON;
96
97typedef struct _ICON_PATH
98{
101
102typedef struct _ICON_DATA
103{
107
108typedef struct _DESKTOP_DATA
109{
116
125
126/* As slider control can't contain user data, we have to keep an
127 * array of RESOLUTION_INFO to have our own associated data.
128 */
129typedef struct _RESOLUTION_INFO
130{
134
135typedef struct _SETTINGS_ENTRY
136{
137 struct _SETTINGS_ENTRY *Blink;
138 struct _SETTINGS_ENTRY *Flink;
144
145typedef struct _DISPLAY_DEVICE_ENTRY
146{
153 PSETTINGS_ENTRY Settings; /* Sorted by increasing dmPelsHeight, BPP */
157 PSETTINGS_ENTRY CurrentSettings; /* Points into Settings list */
160
161typedef struct _GLOBAL_DATA
162{
170
172extern HWND hCPLWindow;
173
174BOOL
176
179
181
184
185BOOL
187
190
191VOID
193
194BOOL
196
197VOID
199
200LONG
202 IN LPCWSTR pszValue OPTIONAL,
203 OUT LPWSTR pszOutBuf,
204 IN DWORD cbOutBuf,
206 IN DWORD Flags,
207 IN LPCWSTR pszDirectory OPTIONAL);
208
209#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:88
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:77
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:89
HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY, LPCWSTR, UINT, IDataObject *)
UINT ClrBtn_CustomDraw(NMCUSTOMDRAW *pCD, COLORREF Color)
Definition: misc.c:83
INT AllocAndLoadString(LPTSTR *lpTarget, HINSTANCE hInst, UINT uID)
GLOBAL_DATA g_GlobalData
Definition: background.c:71
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:769
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:400
long LONG
Definition: pedump.c:60
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: desk.h:92
BOOL bHideNewStart
Definition: desk.h:94
BOOL bHideClassic
Definition: desk.h:93
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:115
BOOL bSettingsChanged
Definition: desk.h:110
HIDE_ICON optIcons[NUM_DESKTOP_ICONS]
Definition: desk.h:111
HIMAGELIST hLocalImageList
Definition: desk.h:122
BOOL bLocalHideChanged[NUM_DESKTOP_ICONS]
Definition: desk.h:119
BOOL bLocalHideIcon[NUM_DESKTOP_ICONS]
Definition: desk.h:118
BOOL bLocalSettingsChanged
Definition: desk.h:117
ICON_DATA LocalIcon[NUM_CHANGE_ICONS]
Definition: desk.h:121
BOOL bLocalIconChanged[NUM_CHANGE_ICONS]
Definition: desk.h:120
BOOL bHideChanged[NUM_DESKTOP_ICONS]
Definition: desk.h:112
INT iLocalCurIcon
Definition: desk.h:123
BOOL bIconChanged[NUM_CHANGE_ICONS]
Definition: desk.h:113
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:150
PSETTINGS_ENTRY CurrentSettings
Definition: precomp.h:79
DWORD ResolutionsCount
Definition: precomp.h:78
DWORD DeviceStateFlags
Definition: precomp.h:74
LPTSTR DeviceName
Definition: desk.h:149
LPTSTR DeviceID
Definition: desk.h:151
PSETTINGS_ENTRY Settings
Definition: precomp.h:75
LPTSTR DeviceDescription
Definition: desk.h:148
LONG bmMonHeight
Definition: desk.h:168
LONG bmMonWidth
Definition: desk.h:167
LPCWSTR pwszFile
Definition: desk.h:164
COLORREF desktop_color
Definition: desk.h:163
LPCWSTR pwszAction
Definition: desk.h:165
HBITMAP hMonitorBitmap
Definition: desk.h:166
TCHAR szPath[MAX_PATH]
Definition: desk.h:104
TCHAR szTitle[40]
Definition: desk.h:105
TCHAR szPath[MAX_PATH]
Definition: desk.h:99
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:142
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