57f3aa98bdd13d5c21e0500779efca7f034dac12
[reactos.git] / reactos / dll / cpl / desk / desk.h
1 #include <stdarg.h>
2
3 #define WIN32_NO_STATUS
4 #define _INC_WINDOWS
5 #define COM_NO_WINDOWS_H
6
7 #define COBJMACROS
8
9 #include <windef.h>
10 #include <winbase.h>
11 #include <winreg.h>
12 #include <wingdi.h>
13 #include <winuser.h>
14 #include <wincon.h>
15 #include <commdlg.h>
16 #include <cpl.h>
17 #include <tchar.h>
18 #include <setupapi.h>
19 #include <shlobj.h>
20 #include <regstr.h>
21 #include <dll/desk/deskcplx.h>
22 #include <strsafe.h>
23
24 #include "appearance.h"
25 #include "preview.h"
26 #include "draw.h"
27 #include "monslctl.h"
28
29 #include "resource.h"
30
31 typedef struct _APPLET
32 {
33 int idIcon;
34 int idName;
35 int idDescription;
36 APPLET_PROC AppletProc;
37 } APPLET, *PAPPLET;
38
39 typedef struct _DIBITMAP
40 {
41 BITMAPFILEHEADER *header;
42 BITMAPINFO *info;
43 BYTE *bits;
44 int width;
45 int height;
46 } DIBITMAP, *PDIBITMAP;
47
48 extern HINSTANCE hApplet;
49
50 HMENU
51 LoadPopupMenu(IN HINSTANCE hInstance,
52 IN LPCTSTR lpMenuName);
53
54 PDIBITMAP DibLoadImage(LPTSTR lpFilename);
55 VOID DibFreeImage(PDIBITMAP lpBitmap);
56
57 INT AllocAndLoadString(LPTSTR *lpTarget,
58 HINSTANCE hInst,
59 UINT uID);
60
61 ULONG __cdecl DbgPrint(PCCH Format,...);
62
63 #define MAX_DESK_PAGES 32
64 #define NUM_SPECTRUM_BITMAPS 3
65
66 /* As slider control can't contain user data, we have to keep an
67 * array of RESOLUTION_INFO to have our own associated data.
68 */
69 typedef struct _RESOLUTION_INFO
70 {
71 DWORD dmPelsWidth;
72 DWORD dmPelsHeight;
73 } RESOLUTION_INFO, *PRESOLUTION_INFO;
74
75 typedef struct _SETTINGS_ENTRY
76 {
77 struct _SETTINGS_ENTRY *Blink;
78 struct _SETTINGS_ENTRY *Flink;
79 DWORD dmBitsPerPel;
80 DWORD dmPelsWidth;
81 DWORD dmPelsHeight;
82 DWORD dmDisplayFrequency;
83 } SETTINGS_ENTRY, *PSETTINGS_ENTRY;
84
85 typedef struct _DISPLAY_DEVICE_ENTRY
86 {
87 struct _DISPLAY_DEVICE_ENTRY *Flink;
88 LPTSTR DeviceDescription;
89 LPTSTR DeviceName;
90 LPTSTR DeviceKey;
91 LPTSTR DeviceID;
92 DWORD DeviceStateFlags;
93 PSETTINGS_ENTRY Settings; /* Sorted by increasing dmPelsHeight, BPP */
94 DWORD SettingsCount;
95 PRESOLUTION_INFO Resolutions;
96 DWORD ResolutionsCount;
97 PSETTINGS_ENTRY CurrentSettings; /* Points into Settings list */
98 SETTINGS_ENTRY InitialSettings;
99 } DISPLAY_DEVICE_ENTRY, *PDISPLAY_DEVICE_ENTRY;
100
101 typedef struct _GLOBAL_DATA
102 {
103 COLORREF desktop_color;
104 } GLOBAL_DATA, *PGLOBAL_DATA;
105
106 extern GLOBAL_DATA g_GlobalData;
107 extern HWND hCPLWindow;
108
109 BOOL
110 DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY DisplayDevice);
111
112 IDataObject *
113 CreateDevSettings(PDISPLAY_DEVICE_ENTRY DisplayDeviceInfo);
114
115 HPSXA WINAPI SHCreatePropSheetExtArrayEx(HKEY,LPCWSTR,UINT,IDataObject*);
116
117 INT_PTR CALLBACK
118 AdvGeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
119
120 LONG
121 RegLoadMUIStringW(IN HKEY hKey,
122 IN LPCWSTR pszValue OPTIONAL,
123 OUT LPWSTR pszOutBuf,
124 IN DWORD cbOutBuf,
125 OUT LPDWORD pcbData OPTIONAL,
126 IN DWORD Flags,
127 IN LPCWSTR pszDirectory OPTIONAL);
128