New test.
[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         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                                 // note: we MUST return a clone of the Font instance as anyone
205                                 // can dispose it. However we shouldn't expect the theme to do
206                                 // the cloning for performance reason
207                                 return (Font) ThemeEngine.Current.MenuFont.Clone ();
208                         }
209                 }
210
211                 public static int MenuHeight {
212                         get {
213                                 return ThemeEngine.Current.MenuHeight;
214                         }
215                 }
216
217                 public static bool MidEastEnabled {
218                         get {
219                                 return false; // ??? how do we decide?
220                         }
221                 }
222
223                 public static Size MinimizedWindowSize {
224                         get {
225                                 return XplatUI.MinimizedWindowSize;
226                         }
227                 }
228
229                 public static Size MinimizedWindowSpacingSize {
230                         get {
231                                 return XplatUI.MinimizedWindowSpacingSize;
232                         }
233                 }
234
235                 public static Size MinimumWindowSize {
236                         get {
237                                 return XplatUI.MinimumWindowSize;
238                         }
239                 }
240
241                 public static Size MinWindowTrackSize {
242                         get {
243                                 return XplatUI.MinWindowTrackSize;
244                         }
245                 }
246
247                 public static int MonitorCount {
248                         get {
249                                 return 1;               // Why bother...
250                         }
251                 }
252
253                 public static bool MonitorsSameDisplayFormat {
254                         get {
255                                 return true;
256                         }
257                 }
258
259                 public static int MouseButtons {
260                         get {
261                                 return XplatUI.MouseButtonCount;
262                         }
263                 }
264
265                 public static bool MouseButtonsSwapped {
266                         get {
267                                 return XplatUI.MouseButtonsSwapped;
268                         }
269                 }
270
271 #if NET_2_0
272                 public static Size MouseHoverSize {
273                         get {
274                                 return XplatUI.MouseHoverSize;
275                         }
276                 }
277
278                 public static int MouseHoverTime {
279                         get {
280                                 return XplatUI.MouseHoverTime;
281                         }
282                 }
283 #endif
284
285                 public static bool MousePresent {
286                         get {
287                                 return true;
288                         }
289                 }
290
291                 public static bool MouseWheelPresent {
292                         get {
293                                 return XplatUI.MouseWheelPresent;
294                         }
295                 }
296
297                 public static int MouseWheelScrollLines {
298                         get {
299                                 return ThemeEngine.Current.MouseWheelScrollLines;
300                         }
301                 }
302
303                 public static bool NativeMouseWheelSupport {
304                         get {
305                                 return MouseWheelPresent;
306                         }
307                 }
308
309                 public static bool Network {
310                         get {
311                                 return true;
312                         }
313                 }
314
315                 public static bool PenWindows {
316                         get {
317                                 return false;
318                         }
319                 }
320
321                 public static Size PrimaryMonitorMaximizedWindowSize {
322                         get {
323                                 return new Size(WorkingArea.Width, WorkingArea.Height);
324                         }
325                 }
326
327                 public static Size PrimaryMonitorSize {
328                         get {
329                                 return new Size(WorkingArea.Width, WorkingArea.Height);
330                         }
331                 }
332
333                 public static bool RightAlignedMenus {
334                         get {
335                                 return ThemeEngine.Current.RightAlignedMenus;
336                         }
337                 }
338
339                 public static bool Secure {
340                         get {
341                                 return true;            // FIXME - figure out if we're running 98/Me and return false
342                         }
343                 }
344
345                 public static bool ShowSounds {
346                         get {
347                                 return false;
348                         }
349                 }
350
351                 public static Size SmallIconSize {
352                         get {
353                                 return XplatUI.SmallIconSize;
354                         }
355                 }
356
357                 public static Size ToolWindowCaptionButtonSize {
358                         get {
359                                 return ThemeEngine.Current.ToolWindowCaptionButtonSize;
360                         }
361                 }
362
363                 public static int ToolWindowCaptionHeight {
364                         get {
365                                 return ThemeEngine.Current.ToolWindowCaptionHeight;
366                         }
367                 }
368
369                 public static string UserDomainName {
370                         get {
371                                 return Environment.UserDomainName;
372                         }
373                 }
374
375                 public static bool UserInteractive {
376                         get {
377                                 return Environment.UserInteractive;
378                         }
379                 }
380
381                 public static string UserName {
382                         get {
383                                 return Environment.UserName;
384                         }
385                 }
386
387                 public static int VerticalScrollBarArrowHeight {
388                         get {
389                                 return ThemeEngine.Current.VerticalScrollBarArrowHeight;
390                         }
391                 }
392
393                 public static int VerticalScrollBarThumbHeight {
394                         get {
395                                 return ThemeEngine.Current.VerticalScrollBarThumbHeight;
396                         }
397                 }
398
399                 public static int VerticalScrollBarWidth {
400                         get {
401                                 return ThemeEngine.Current.VerticalScrollBarWidth;
402                         }
403                 }
404
405                 public static Rectangle VirtualScreen {
406                         get {
407                                 return XplatUI.VirtualScreen;
408                         }
409                 }
410
411                 public static Rectangle WorkingArea {
412                         get {
413                                 return XplatUI.WorkingArea;
414                         }
415                 }
416                 #endregion      // Public Static Properties
417
418                 #region Internal Static Properties
419                 internal static int KeyboardSpeed {
420                         get {
421                                 return XplatUI.KeyboardSpeed;
422                         }
423                 }
424         
425                 internal static int KeyboardDelay {
426                         get {
427                                 return XplatUI.KeyboardDelay;
428                         }
429                 }
430                 #endregion      // Internal Static Properties
431         }
432 }