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