2006-03-21 Peter Dennis Bartok <pbartok@novell.com>
[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 #if NET_2_0
269                 public static Size MouseHoverSize {
270                         get {
271                                 return XplatUI.MouseHoverSize;
272                         }
273                 }
274
275                 public static int MouseHoverTime {
276                         get {
277                                 return XplatUI.MouseHoverTime;
278                         }
279                 }
280 #endif
281
282                 public static bool MousePresent {
283                         get {
284                                 return true;
285                         }
286                 }
287
288                 public static bool MouseWheelPresent {
289                         get {
290                                 return XplatUI.MouseWheelPresent;
291                         }
292                 }
293
294                 public static int MouseWheelScrollLines {
295                         get {
296                                 return ThemeEngine.Current.MouseWheelScrollLines;
297                         }
298                 }
299
300                 public static bool NativeMouseWheelSupport {
301                         get {
302                                 return MouseWheelPresent;
303                         }
304                 }
305
306                 public static bool Network {
307                         get {
308                                 return true;
309                         }
310                 }
311
312                 public static bool PenWindows {
313                         get {
314                                 return false;
315                         }
316                 }
317
318                 public static Size PrimaryMonitorMaximizedWindowSize {
319                         get {
320                                 return new Size(WorkingArea.Width, WorkingArea.Height);
321                         }
322                 }
323
324                 public static Size PrimaryMonitorSize {
325                         get {
326                                 return new Size(WorkingArea.Width, WorkingArea.Height);
327                         }
328                 }
329
330                 public static bool RightAlignedMenus {
331                         get {
332                                 return ThemeEngine.Current.RightAlignedMenus;
333                         }
334                 }
335
336                 public static bool Secure {
337                         get {
338                                 return true;            // FIXME - figure out if we're running 98/Me and return false
339                         }
340                 }
341
342                 public static bool ShowSounds {
343                         get {
344                                 return false;
345                         }
346                 }
347
348                 public static Size SmallIconSize {
349                         get {
350                                 return XplatUI.SmallIconSize;
351                         }
352                 }
353
354                 public static Size ToolWindowCaptionButtonSize {
355                         get {
356                                 return ThemeEngine.Current.ToolWindowCaptionButtonSize;
357                         }
358                 }
359
360                 public static int ToolWindowCaptionHeight {
361                         get {
362                                 return ThemeEngine.Current.ToolWindowCaptionHeight;
363                         }
364                 }
365
366                 public static string UserDomainName {
367                         get {
368                                 return Environment.UserDomainName;
369                         }
370                 }
371
372                 public static bool UserInteractive {
373                         get {
374                                 return Environment.UserInteractive;
375                         }
376                 }
377
378                 public static string UserName {
379                         get {
380                                 return Environment.UserName;
381                         }
382                 }
383
384                 public static int VerticalScrollBarArrowHeight {
385                         get {
386                                 return ThemeEngine.Current.VerticalScrollBarArrowHeight;
387                         }
388                 }
389
390                 public static int VerticalScrollBarThumbHeight {
391                         get {
392                                 return ThemeEngine.Current.VerticalScrollBarThumbHeight;
393                         }
394                 }
395
396                 public static int VerticalScrollBarWidth {
397                         get {
398                                 return ThemeEngine.Current.VerticalScrollBarWidth;
399                         }
400                 }
401
402                 public static Rectangle VirtualScreen {
403                         get {
404                                 return XplatUI.VirtualScreen;
405                         }
406                 }
407
408                 public static Rectangle WorkingArea {
409                         get {
410                                 return XplatUI.WorkingArea;
411                         }
412                 }
413                 #endregion      // Public Static Properties
414
415                 #region Internal Static Properties
416                 internal static int KeyboardSpeed {
417                         get {
418                                 return XplatUI.KeyboardSpeed;
419                         }
420                 }
421         
422                 internal static int KeyboardDelay {
423                         get {
424                                 return XplatUI.KeyboardDelay;
425                         }
426                 }
427                 #endregion      // Internal Static Properties
428         }
429 }