2007-03-08 George Giolfan <georgegiolfan@yahoo.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,2006 Novell, Inc. (http://www.novell.com)
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 {
34         public class SystemInformation
35         {
36                 private SystemInformation ()
37                 {
38                 }
39
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 #if NET_2_0
185                 public
186 #else
187                 internal
188 #endif
189                 static int KeyboardDelay {
190                         get {
191                                 return XplatUI.KeyboardDelay;
192                         }
193                 }
194
195 #if NET_2_0
196                 public
197 #else
198                 internal
199 #endif
200                 static int KeyboardSpeed {
201                         get {
202                                 return XplatUI.KeyboardSpeed;
203                         }
204                 }
205
206                 public static Size MaxWindowTrackSize {
207                         get {
208                                 return XplatUI.MaxWindowTrackSize;
209                         }
210                 }
211
212 #if NET_2_0
213                 public
214 #else
215                 internal
216 #endif
217                 static bool MenuAccessKeysUnderlined {
218                         get {
219                                 return ThemeEngine.Current.MenuAccessKeysUnderlined;
220                         }
221                 }
222
223                 public static Size MenuButtonSize {
224                         get {
225                                 return ThemeEngine.Current.MenuButtonSize;
226                         }
227                 }
228
229                 public static Size MenuCheckSize {
230                         get {
231                                 return ThemeEngine.Current.MenuCheckSize;
232                         }
233                 }
234
235                 public static Font MenuFont {
236                         get {
237                                 // note: we MUST return a clone of the Font instance as anyone
238                                 // can dispose it. However we shouldn't expect the theme to do
239                                 // the cloning for performance reason
240                                 return (Font) ThemeEngine.Current.MenuFont.Clone ();
241                         }
242                 }
243
244                 public static int MenuHeight {
245                         get {
246                                 return ThemeEngine.Current.MenuHeight;
247                         }
248                 }
249
250                 public static bool MidEastEnabled {
251                         get {
252                                 return false; // ??? how do we decide?
253                         }
254                 }
255
256                 public static Size MinimizedWindowSize {
257                         get {
258                                 return XplatUI.MinimizedWindowSize;
259                         }
260                 }
261
262                 public static Size MinimizedWindowSpacingSize {
263                         get {
264                                 return XplatUI.MinimizedWindowSpacingSize;
265                         }
266                 }
267
268                 public static Size MinimumWindowSize {
269                         get {
270                                 return XplatUI.MinimumWindowSize;
271                         }
272                 }
273
274                 public static Size MinWindowTrackSize {
275                         get {
276                                 return XplatUI.MinWindowTrackSize;
277                         }
278                 }
279
280                 public static int MonitorCount {
281                         get {
282                                 return 1;               // Why bother...
283                         }
284                 }
285
286                 public static bool MonitorsSameDisplayFormat {
287                         get {
288                                 return true;
289                         }
290                 }
291
292                 public static int MouseButtons {
293                         get {
294                                 return XplatUI.MouseButtonCount;
295                         }
296                 }
297
298                 public static bool MouseButtonsSwapped {
299                         get {
300                                 return XplatUI.MouseButtonsSwapped;
301                         }
302                 }
303
304 #if NET_2_0
305                 public static Size MouseHoverSize {
306                         get {
307                                 return XplatUI.MouseHoverSize;
308                         }
309                 }
310
311                 public static int MouseHoverTime {
312                         get {
313                                 return XplatUI.MouseHoverTime;
314                         }
315                 }
316 #endif
317
318                 public static bool MousePresent {
319                         get {
320                                 return true;
321                         }
322                 }
323
324                 public static bool MouseWheelPresent {
325                         get {
326                                 return XplatUI.MouseWheelPresent;
327                         }
328                 }
329
330                 public static int MouseWheelScrollLines {
331                         get {
332                                 return ThemeEngine.Current.MouseWheelScrollLines;
333                         }
334                 }
335
336                 public static bool NativeMouseWheelSupport {
337                         get {
338                                 return MouseWheelPresent;
339                         }
340                 }
341
342                 public static bool Network {
343                         get {
344                                 return true;
345                         }
346                 }
347
348                 public static bool PenWindows {
349                         get {
350                                 return false;
351                         }
352                 }
353
354                 public static Size PrimaryMonitorMaximizedWindowSize {
355                         get {
356                                 return new Size(WorkingArea.Width, WorkingArea.Height);
357                         }
358                 }
359
360                 public static Size PrimaryMonitorSize {
361                         get {
362                                 return new Size(WorkingArea.Width, WorkingArea.Height);
363                         }
364                 }
365
366                 public static bool RightAlignedMenus {
367                         get {
368                                 return ThemeEngine.Current.RightAlignedMenus;
369                         }
370                 }
371
372                 public static bool Secure {
373                         get {
374                                 return true;
375                         }
376                 }
377
378                 public static bool ShowSounds {
379                         get {
380                                 return false;
381                         }
382                 }
383
384                 public static Size SmallIconSize {
385                         get {
386                                 return XplatUI.SmallIconSize;
387                         }
388                 }
389
390 #if NET_2_0
391                 public static bool TerminalServerSession {
392                         get {
393                                 return false;
394                         }
395                 }
396 #endif
397
398                 public static Size ToolWindowCaptionButtonSize {
399                         get {
400                                 return ThemeEngine.Current.ToolWindowCaptionButtonSize;
401                         }
402                 }
403
404                 public static int ToolWindowCaptionHeight {
405                         get {
406                                 return ThemeEngine.Current.ToolWindowCaptionHeight;
407                         }
408                 }
409
410                 public static string UserDomainName {
411                         get {
412                                 return Environment.UserDomainName;
413                         }
414                 }
415
416                 public static bool UserInteractive {
417                         get {
418                                 return Environment.UserInteractive;
419                         }
420                 }
421
422                 public static string UserName {
423                         get {
424                                 return Environment.UserName;
425                         }
426                 }
427
428                 public static int VerticalScrollBarArrowHeight {
429                         get {
430                                 return ThemeEngine.Current.VerticalScrollBarArrowHeight;
431                         }
432                 }
433
434                 public static int VerticalScrollBarThumbHeight {
435                         get {
436                                 return ThemeEngine.Current.VerticalScrollBarThumbHeight;
437                         }
438                 }
439
440                 public static int VerticalScrollBarWidth {
441                         get {
442                                 return ThemeEngine.Current.VerticalScrollBarWidth;
443                         }
444                 }
445
446                 public static Rectangle VirtualScreen {
447                         get {
448                                 return XplatUI.VirtualScreen;
449                         }
450                 }
451
452                 public static Rectangle WorkingArea {
453                         get {
454                                 return XplatUI.WorkingArea;
455                         }
456                 }
457         }
458 }