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