Merge aicom-network-branch (without NDIS changes for now)
[reactos.git] / reactos / dll / cpl / desk / monslctl.h
1 #ifndef __MONSLCTL__H
2 #define __MONSLCTL__H
3
4 /* Control extended styles */
5 #define MSLM_EX_ALLOWSELECTNONE 0x1
6 #define MSLM_EX_ALLOWSELECTDISABLED 0x2
7 #define MSLM_EX_HIDENUMBERONSINGLE 0x4
8 #define MSLM_EX_HIDENUMBERS 0x8
9 #define MSLM_EX_SELECTONRIGHTCLICK 0x10
10 #define MSLM_EX_SELECTBYNUMKEY 0x20
11 #define MSLM_EX_SELECTBYARROWKEY 0x40
12
13 /* MONSL_MONINFO Flags */
14 #define MSL_MIF_DISABLED 0x1
15
16 typedef struct _MONSL_MONINFO
17 {
18 POINT Position;
19 SIZE Size;
20 DWORD Flags; /* MSL_MIF_* */
21 LPARAM lParam;
22 } MONSL_MONINFO, *PMONSL_MONINFO;
23
24 typedef struct _MONSL_MONNMHDR
25 {
26 NMHDR hdr;
27 INT Index;
28 /* NOTE: MonitorInfo is only valid if Index >= 0 */
29 MONSL_MONINFO MonitorInfo;
30 } MONSL_MONNMHDR, *PMONSL_MONNMHDR;
31
32 typedef struct _MONSL_MONNMBUTTONCLICKED
33 {
34 /* Used with MSLN_MONITORCHANGING */
35 MONSL_MONNMHDR hdr;
36 POINT pt;
37 } MONSL_MONNMBUTTONCLICKED, *PMONSL_MONNMBUTTONCLICKED;
38
39 typedef struct _MONSL_MONNMMONITORCHANGING
40 {
41 /* Used with MSLN_MONITORCHANGING */
42 MONSL_MONNMHDR hdr;
43 INT PreviousSelected;
44 BOOL AllowChanging;
45 } MONSL_MONNMMONITORCHANGING, *PMONSL_MONNMMONITORCHANGING;
46
47 /*
48 * MSLN_MONITORCHANGING
49 * This notification code is sent through WM_NOTIFY before another monitor
50 * can be selected. This notification is not sent in response to a
51 * MSLM_SETCURSEL message.
52 *
53 * lParam: PMONSL_MONNMMONITORCHANGING
54 * Change AllowChanging to FALSE to prevent the new monitor to
55 * be selected.
56 */
57 #define MSLN_MONITORCHANGING 101
58
59 /*
60 * MSLN_MONITORCHANGED
61 * This notification code is sent through WM_NOTIFY after a new monitor
62 * was selected. This notification is not sent in response to a
63 * MSLM_SETCURSEL message.
64 *
65 * lParam: PMONSL_MONNMHDR
66 */
67 #define MSLN_MONITORCHANGED 102
68
69 /*
70 * MSLN_RBUTTONUP
71 * This notification code is sent through WM_NOTIFY after the user did a
72 * right click on the control. If the control's extended style
73 * MSLM_EX_SELECTONRIGHTCLICK is set and the user clicked on a monitor,
74 * that monitor is selected and relevant notifications are sent before
75 * this notification is sent.
76 *
77 * lParam: PMONSL_MONNMBUTTONCLICKED
78 */
79 #define MSLN_RBUTTONUP 103
80
81 /*
82 * MSLM_SETMONITORSINFO
83 * wParam: DWORD
84 * Count of MONSL_MONINFO structures provided as lParam.
85 * lParam: PMONSL_MONINFO
86 * Array of wParam MONSL_MONINFO structures.
87 *
88 * Returns non-zero value if successful.
89 */
90 #define MSLM_SETMONITORSINFO (WM_USER + 0x10)
91
92 /*
93 * MSLM_GETMONITORSINFO
94 * wParam: DWORD
95 * Length of MONSL_MONINFO array buffer provided in lParam.
96 * lParam: PMONSL_MONINFO
97 * Array of wParam MONSL_MONINFO structures
98 *
99 * Returns number of structures copied.
100 */
101 #define MSLM_GETMONITORSINFO (WM_USER + 0x11)
102
103 /*
104 * MSLM_GETMONITORINFOCOUNT
105 * wParam: Ignored.
106 * lParam: Ignored.
107 *
108 * Returns number of monitors.
109 */
110 #define MSLM_GETMONITORINFOCOUNT (WM_USER + 0x12)
111
112 /*
113 * MSLM_HITTEST
114 * wParam: PPOINT
115 * Pointer to a POINT structure specifying the coordinates
116 * relative to the client area of the control.
117 * lParam: Ignored.
118 *
119 * Returns the index of the monitor at this point, or -1.
120 */
121 #define MSLM_HITTEST (WM_USER + 0x13)
122
123 /*
124 * MSLM_SETCURSEL
125 * wParam: INT
126 * Selects the monitor with this index. Pass -1 to clear the selection.
127 * lParam: Ignored.
128 *
129 * Returns a non-zero value if successful.
130 */
131 #define MSLM_SETCURSEL (WM_USER + 0x14)
132
133 /*
134 * MSLM_GETCURSEL
135 * wParam: Ignored.
136 * lParam: Ignored.
137 *
138 * Returns the index of the selected monitor, or -1 if none is currently selected.
139 */
140 #define MSLM_GETCURSEL (WM_USER + 0x15)
141
142 /*
143 * MSLM_SETMONITORINFO
144 * wParam: INT
145 * Index of the monitor information that is queried.
146 * lParam: PMONSL_MONINFO
147 * Pointer to a MONSL_MONINFO structures.
148 *
149 * Returns non-zero value if successful.
150 */
151 #define MSLM_SETMONITORINFO (WM_USER + 0x16)
152
153 /*
154 * MSLM_GETMONITORINFO
155 * wParam: INT
156 * Index of the monitor information to be changed.
157 * lParam: PMONSL_MONINFO
158 * Pointer to a MONSL_MONINFO structures.
159 *
160 * Returns non-zero value if successful.
161 */
162 #define MSLM_GETMONITORINFO (WM_USER + 0x17)
163
164 /*
165 * MSLM_SETEXSTYLE
166 * wParam: Ignored.
167 * lParam: DWORD
168 * Can be a combination of the following flags:
169 * * MSLM_EX_ALLOWSELECTNONE
170 * Allow deselecting a monitor by clicking into
171 * unused areas of the control.
172 * * MSLM_EX_ALLOWSELECTDISABLED
173 * Allow selecting disabled monitors.
174 * * MSLM_EX_HIDENUMBERONSINGLE
175 * Hides the monitor number if the control only
176 * displays one monitor.
177 * * MSLM_EX_HIDENUMBERS
178 * Does not show monitor numbers.
179 * * MSLM_EX_SELECTONRIGHTCLICK
180 * Selects a monitor when the user right clicks
181 * on it.
182 * * MSLM_EX_SELECTBYNUMKEY
183 * Allows selecting a monitor by using the keys
184 * '1' to '9'.
185 * * MSLM_EX_SELECTBYARROWKEY
186 * Allows selecting a monitor using the arrow keys.
187 *
188 * Returns non-zero value if successful.
189 */
190 #define MSLM_SETEXSTYLE (WM_USER + 0x18)
191
192 /*
193 * MSLM_GETEXSTYLE
194 * wParam: Ignored.
195 * lParam: Ignored
196 *
197 * Returns the control's extended style flags.
198 */
199 #define MSLM_GETEXSTYLE (WM_USER + 0x19)
200
201 /*
202 * MSLM_GETMONITORRECT
203 * wParam: INT
204 * Index of the monitor whose display rectangle is queried.
205 * lParam: PRECT
206 * Pointer to a RECT structure that receives the rectangle
207 * in coordinates relative to the control's client area.
208 *
209 * Returns a positive value if the rectangle is visible.
210 * Returns zero if the rectangle is invisible.
211 * Returns a negative value if the index is not valid.
212 */
213 #define MSLM_GETMONITORRECT (WM_USER + 0x20)
214
215 BOOL RegisterMonitorSelectionControl(IN HINSTANCE hInstance);
216 VOID UnregisterMonitorSelectionControl(IN HINSTANCE hInstance);
217
218 #endif /* __MONSLCTL__H */