comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/win32/OS.d @ 36:d46287db17ed

rakefile reorg, swt win phobosification
author Frank Benoit <benoit@tionex.de>
date Tue, 24 Mar 2009 08:48:41 +0100
parents 4642ab680468
children 2e09b0e6857a
comparison
equal deleted inserted replaced
35:634e4380db78 36:d46287db17ed
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 version(Tango){
23 static import tango.sys.win32.UserGdi;
24 static import tango.sys.SharedLib; 23 static import tango.sys.SharedLib;
25 static import tango.sys.Common; 24 static import tango.sys.Common;
26 25
27 static import tango.stdc.stdlib; 26 static import tango.stdc.stdlib;
28 static import tango.stdc.string; 27 static import tango.stdc.string;
29 28 import tango.sys.win32.CodePage : CodePage;
30 alias tango.sys.win32.UserGdi WINAPI; 29 private import tango.stdc.stringz;
30
31
31 } else { // Phobos 32 } else { // Phobos
32 } 33 }
33 34
34 alias org.eclipse.swt.internal.win32.WINAPI DWTWINAPI; 35 alias org.eclipse.swt.internal.win32.WINAPI DWTWINAPI;
35 36
3606 } 3607 }
3607 3608
3608 alias DWTWINAPI.GetScrollBarInfo GetScrollBarInfo; 3609 alias DWTWINAPI.GetScrollBarInfo GetScrollBarInfo;
3609 } // END of OS 3610 } // END of OS
3610 //----------------------------------------------------------------------------- 3611 //-----------------------------------------------------------------------------
3611 import tango.sys.win32.CodePage : CodePage;
3612 private import tango.stdc.stringz;
3613
3614 // convert UTF-8 to MBCS 3612 // convert UTF-8 to MBCS
3615 alias StrToMBCS StrToMBCSs; 3613 alias StrToMBCS StrToMBCSs;
3616 public CHAR[] StrToMBCS(char[] sc, uint codepage = 0) { 3614 public CHAR[] StrToMBCS(char[] sc, uint codepage = 0) {
3617 CHAR[] ret = cast(CHAR[]) sc; 3615 CHAR[] ret = cast(CHAR[]) sc;
3618 try{ 3616 try{
3663 }catch(Exception e){ 3661 }catch(Exception e){
3664 // do nothing 3662 // do nothing
3665 ret = ""; 3663 ret = "";
3666 } 3664 }
3667 if( terminated ){ 3665 if( terminated ){
3668 ret ~= \0; 3666 ret ~= "\0";
3669 } 3667 }
3670 return ret; 3668 return ret;
3671 } 3669 }
3672 3670
3673 public wchar* StrToWCHARz( uint codepage, char[] sc, uint* length = null ) { 3671 public wchar* StrToWCHARz( uint codepage, char[] sc, uint* length = null ) {