updating to the latest module.
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / SystemInformation.cs
1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
8 // 
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
11 // 
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 //
20 // Copyright (c) 2004 Novell, Inc.
21 //
22 // Authors:
23 //      Miguel de Icaza (miguel@novell.com).
24 //      Peter Bartok    (pbartok@novell.com)
25 //
26
27 // NOT COMPLETE
28
29 using System;
30 using System.Drawing;
31
32 namespace System.Windows.Forms {
33         public class SystemInformation {
34                 #region Constructor
35                 internal SystemInformation() {
36                 }
37                 #endregion
38
39                 #region Public Static Properties
40                 public static ArrangeDirection ArrangeDirection {
41                         get {
42                                 return ThemeEngine.Current.ArrangeDirection;
43                         }
44                 }
45
46                 public static ArrangeStartingPosition ArrangeStartingPosition {
47                         get {
48                                 return ThemeEngine.Current.ArrangeStartingPosition;
49                         }
50                 }
51
52                 public static BootMode BootMode {
53                         get {
54                                 return BootMode.Normal;
55                         }
56                 }
57
58                 public static Size Border3DSize {
59                         get {
60                                 return ThemeEngine.Current.Border3DSize;
61                         }
62                 }
63
64                 public static Size BorderSize {
65                         get {
66                                 return ThemeEngine.Current.Border3DSize;
67                         }
68                 }
69
70                 public static Size CaptionButtonSize {
71                         get {
72                                 return ThemeEngine.Current.CaptionButtonSize;
73                         }
74                 }
75
76                 public static int CaptionHeight {
77                         get {
78                                 return ThemeEngine.Current.CaptionHeight;
79                         }
80                 }
81
82                 public static string ComputerName {
83                         get {
84                                 return Environment.MachineName;
85                         }
86                 }
87
88                 public static Size CursorSize {
89                         get {
90                                 return XplatUI.CursorSize;
91                         }
92                 }
93
94                 public static bool DbcsEnabled {
95                         get {
96                                 return false;
97                         }
98                 }
99
100                 public static bool DebugOS {
101                         get {
102                                 return false;
103                         }
104                 }
105
106                 public static Size DoubleClickSize {
107                         get {
108                                 return ThemeEngine.Current.DoubleClickSize;
109                         }
110                 }
111
112                 public static int DoubleClickTime {
113                         get {
114                                 return ThemeEngine.Current.DoubleClickTime;
115                         }
116                 }
117
118                 public static bool DragFullWindows {
119                         get {
120                                 return XplatUI.DragFullWindows;
121                         }
122                 }
123
124                 public static Size DragSize {
125                         get {
126                                 return XplatUI.DragSize;
127                         }
128                 }
129
130                 public static Size FixedFrameBorderSize {
131                         get {
132                                 return ThemeEngine.Current.FixedFrameBorderSize;
133                         }
134                 }
135
136                 public static Size FrameBorderSize {
137                         get {
138                                 return ThemeEngine.Current.FrameBorderSize;
139                         }
140                 }
141
142                 public static bool HighContrast {
143                         get {
144                                 return false;
145                         }
146                 }
147
148                 public static int HorizontalScrollBarArrowWidth {
149                         get {
150                                 return ThemeEngine.Current.HorizontalScrollBarArrowWidth;
151                         }
152                 }
153
154                 public static int HorizontalScrollBarHeight {
155                         get {
156                                 return ThemeEngine.Current.HorizontalScrollBarHeight;
157                         }
158                 }
159
160                 public static int HorizontalScrollBarThumbWidth {
161                         get {
162                                 return ThemeEngine.Current.HorizontalScrollBarThumbWidth;
163                         }
164                 }
165
166                 public static Size IconSize {
167                         get {
168                                 return XplatUI.IconSize;
169                         }
170                 }
171
172                 public static Size IconSpacingSize {
173                         get {
174                                 return ThemeEngine.Current.IconSpacingSize;
175                         }
176                 }
177
178                 public static int KanjiWindowHeight {
179                         get {
180                                 return 0;
181                         }
182                 }
183
184                 public static Size MaxWindowTrackSize {
185                         get {
186                                 return XplatUI.MaxWindowTrackSize;
187                         }
188                 }
189
190                 public static Size MenuButtonSize {
191                         get {
192                                 return ThemeEngine.Current.MenuButtonSize;
193                         }
194                 }
195
196                 public static Size MenuCheckSize {
197                         get {
198                                 return ThemeEngine.Current.MenuCheckSize;
199                         }
200                 }
201
202                 public static Font MenuFont {
203                         get {
204                                 return ThemeEngine.Current.MenuFont;
205                         }
206                 }
207
208                 public static int MenuHeight {
209                         get {
210                                 return ThemeEngine.Current.MenuHeight;
211                         }
212                 }
213
214                 public static bool MidEastEnabled {
215                         get {
216                                 return false; // ??? how do we decide?
217                         }
218                 }
219
220                 public static Size MinimizedWindowSize {
221                         get {
222                                 return XplatUI.MinimizedWindowSize;
223                         }
224                 }
225
226                 public static Size MinimizedWindowSpacingSize {
227                         get {
228                                 return XplatUI.MinimizedWindowSpacingSize;
229                         }
230                 }
231
232                 public static Size MinimumWindowSize {
233                         get {
234                                 return XplatUI.MinimumWindowSize;
235                         }
236                 }
237
238                 public static Size MinWindowTrackSize {
239                         get {
240                                 return XplatUI.MinWindowTrackSize;
241                         }
242                 }
243
244                 public static int MonitorCount {
245                         get {
246                                 return 1;               // Why bother...
247                         }
248                 }
249
250                 public static bool MonitorsSameDisplayFormat {
251                         get {
252                                 return true;
253                         }
254                 }
255
256                 public static int MouseButtons {
257                         get {
258                                 return XplatUI.MouseButtonCount;
259                         }
260                 }
261
262                 public static bool MouseButtonsSwapped {
263                         get {
264                                 return XplatUI.MouseButtonsSwapped;
265                         }
266                 }
267
268                 public static bool MousePresent {
269                         get {
270                                 return true;
271                         }
272                 }
273
274                 public static bool MouseWheelPresent {
275                         get {
276                                 return XplatUI.MouseWheelPresent;
277                         }
278                 }
279
280                 public static int MouseWheelScrollLines {
281                         get {
282                                 return ThemeEngine.Current.MouseWheelScrollLines;
283                         }
284                 }
285
286                 public static bool NativeMouseWheelSupport {
287                         get {
288                                 return MouseWheelPresent;
289                         }
290                 }
291
292                 public static bool Network {
293                         get {
294                                 return true;
295                         }
296                 }
297
298                 public static bool PenWindows {
299                         get {
300                                 return false;
301                         }
302                 }
303
304                 public static Size PrimaryMonitorMaximizedWindowSize {
305                         get {
306                                 return new Size(WorkingArea.Width, WorkingArea.Height);
307                         }
308                 }
309
310                 public static Size PrimaryMonitorSize {
311                         get {
312                                 return new Size(WorkingArea.Width, WorkingArea.Height);
313                         }
314                 }
315
316                 public static bool RightAlignedMenus {
317                         get {
318                                 return ThemeEngine.Current.RightAlignedMenus;
319                         }
320                 }
321
322                 public static bool Secure {
323                         get {
324                                 return true;            // FIXME - figure out if we're running 98/Me and return false
325                         }
326                 }
327
328                 public static bool ShowSounds {
329                         get {
330                                 return false;
331                         }
332                 }
333
334                 public static Size SmallIconSize {
335                         get {
336                                 return XplatUI.SmallIconSize;
337                         }
338                 }
339
340                 public static Size ToolWindowCaptionButtonSize {
341                         get {
342                                 return ThemeEngine.Current.ToolWindowCaptionButtonSize;
343                         }
344                 }
345
346                 public static int ToolWindowCaptionHeight {
347                         get {
348                                 return ThemeEngine.Current.ToolWindowCaptionHeight;
349                         }
350                 }
351
352                 public static string UserDomainName {
353                         get {
354                                 return Environment.UserDomainName;
355                         }
356                 }
357
358                 public static bool UserInteractive {
359                         get {
360                                 return Environment.UserInteractive;
361                         }
362                 }
363
364                 public static string UserName {
365                         get {
366                                 return Environment.UserName;
367                         }
368                 }
369
370                 public static int VerticalScrollBarArrowHeight {
371                         get {
372                                 return ThemeEngine.Current.VerticalScrollBarArrowHeight;
373                         }
374                 }
375
376                 public static int VerticalScrollBarThumbHeight {
377                         get {
378                                 return ThemeEngine.Current.VerticalScrollBarThumbHeight;
379                         }
380                 }
381
382                 public static int VerticalScrollBarWidth {
383                         get {
384                                 return ThemeEngine.Current.VerticalScrollBarWidth;
385                         }
386                 }
387
388                 public static Rectangle VirtualScreen {
389                         get {
390                                 return XplatUI.VirtualScreen;
391                         }
392                 }
393
394                 public static Rectangle WorkingArea {
395                         get {
396                                 return XplatUI.WorkingArea;
397                         }
398                 }
399                 #endregion      // Public Static Properties
400
401                 #region Internal Static Properties
402                 internal static int KeyboardSpeed {
403                         get {
404                                 return XplatUI.KeyboardSpeed;
405                         }
406                 }
407         
408                 internal static int KeyboardDelay {
409                         get {
410                                 return XplatUI.KeyboardDelay;
411                         }
412                 }
413                 #endregion      // Internal Static Properties
414         }
415 }