comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/gdip/native.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 2e09b0e6857a
comparison
equal deleted inserted replaced
21:9b96950f2c3c 22:4642ab680468
11 ******************************************************************************/ 11 ******************************************************************************/
12 12
13 module org.eclipse.swt.internal.gdip.native; 13 module org.eclipse.swt.internal.gdip.native;
14 14
15 import org.eclipse.swt.internal.win32.WINTYPES; 15 import org.eclipse.swt.internal.win32.WINTYPES;
16 import tango.sys.SharedLib : SharedLib;
17 import java.lang.all; 16 import java.lang.all;
17
18 version(Tango){
19 static import tango.sys.SharedLib;
20 } else { // Phobos
21 }
18 22
19 extern(Windows): 23 extern(Windows):
20 24
21 /****************************************************************************** 25 /******************************************************************************
22 26
1675 { "GdipSetStringFormatTabStops", cast(void**)& GdipSetStringFormatTabStops }, 1679 { "GdipSetStringFormatTabStops", cast(void**)& GdipSetStringFormatTabStops },
1676 ]; 1680 ];
1677 1681
1678 1682
1679 void loadLib_Gdip(){ 1683 void loadLib_Gdip(){
1680 if (auto lib = SharedLib.load(`gdiplus.dll`)) { 1684 if (auto lib = tango.sys.SharedLib.SharedLib.load(`gdiplus.dll`)) {
1681 foreach( inout s; symbols ){ 1685 foreach( inout s; symbols ){
1682 *s.symbol = lib.getSymbol( s.name.ptr ); 1686 *s.symbol = lib.getSymbol( s.name.ptr );
1683 if( s.symbol is null ){ 1687 if( s.symbol is null ){
1684 getDwtLogger.error( __FILE__, __LINE__, "gdiplus.dll: Symbol '{}' not found", s.name ); 1688 getDwtLogger.error( __FILE__, __LINE__, "gdiplus.dll: Symbol '{}' not found", s.name );
1685 } 1689 }