comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d @ 22:4642ab680468

some work on dwt-win for tango/phobos
author Frank Benoit <benoit@tionex.de>
date Fri, 20 Mar 2009 12:52:28 +0100
parents 735224fcc45f
children d46287db17ed
comparison
equal deleted inserted replaced
21:9b96950f2c3c 22:4642ab680468
17 17
18 import org.eclipse.swt.internal.C; 18 import org.eclipse.swt.internal.C;
19 import org.eclipse.swt.internal.Library; 19 import org.eclipse.swt.internal.Library;
20 import java.lang.all; 20 import java.lang.all;
21 21
22 version(Tango){
22 static import tango.sys.win32.UserGdi; 23 static import tango.sys.win32.UserGdi;
23 static import tango.sys.SharedLib; 24 static import tango.sys.SharedLib;
24 static import tango.sys.Common; 25 static import tango.sys.Common;
25 26
26 static import tango.stdc.stdlib; 27 static import tango.stdc.stdlib;
27 static import tango.stdc.string; 28 static import tango.stdc.string;
28 29
29 alias tango.sys.win32.UserGdi WINAPI; 30 alias tango.sys.win32.UserGdi WINAPI;
31 } else { // Phobos
32 }
33
30 alias org.eclipse.swt.internal.win32.WINAPI DWTWINAPI; 34 alias org.eclipse.swt.internal.win32.WINAPI DWTWINAPI;
31 35
32 void trace(int line ){ 36 void trace(int line ){
33 getDwtLogger.trace( __FILE__, __LINE__, "OS {}", line ); 37 getDwtLogger.trace( __FILE__, __LINE__, "OS {}", line );
34 } 38 }
264 if(!OS.GetVersionEx(&info)){ 268 if(!OS.GetVersionEx(&info)){
265 MessageBoxA(null, 269 MessageBoxA(null,
266 _PCHAR!("SWT Unicode version applications can't run in a non-Unicode platform !"), 270 _PCHAR!("SWT Unicode version applications can't run in a non-Unicode platform !"),
267 _PCHAR!("Error"), 271 _PCHAR!("Error"),
268 MB_OK|MB_ICONERROR); 272 MB_OK|MB_ICONERROR);
269 tango.stdc.stdlib.exit(-1); 273 version(Tango){
274 tango.stdc.stdlib.exit(-1);
275 } else { // Phobos
276 std.c.stdlib.exit(-1);
277 }
270 } 278 }
271 //OSVERSIONINFO info = new OSVERSIONINFOW (); 279 //OSVERSIONINFO info = new OSVERSIONINFOW ();
272 //info.dwOSVersionInfoSize = OSVERSIONINFOW.sizeof; 280 //info.dwOSVersionInfoSize = OSVERSIONINFOW.sizeof;
273 //if (!OS.GetVersionExW ((OSVERSIONINFOW)info)) { 281 //if (!OS.GetVersionExW ((OSVERSIONINFOW)info)) {
274 // info = new OSVERSIONINFOA (); 282 // info = new OSVERSIONINFOA ();