changeset 54:8f049b136add

first example working
author Frank Benoit <benoit@tionex.de>
date Fri, 11 Jan 2008 14:31:37 +0100
parents 3da31bec7de0
children 93981635e709
files dsss.conf dwt/SWT.d dwt/accessibility/AccessibleFactory.d dwt/accessibility/AccessibleObject.d dwt/graphics/Device.d dwt/graphics/ImageData.d dwt/internal/Library.d dwt/internal/Lock.d dwt/internal/Platform.d dwt/internal/accessibility/gtk/ATK.d dwt/internal/gtk/OS.d dwt/internal/image/JPEGFileFormat.d dwt/internal/image/PngChunk.d dwt/widgets/Control.d dwt/widgets/Display.d dwt/widgets/EventTable.d dwt/widgets/Shell.d helloworld.d
diffstat 18 files changed, 287 insertions(+), 230 deletions(-) [+]
line wrap: on
line diff
--- a/dsss.conf	Fri Jan 11 11:21:52 2008 +0100
+++ b/dsss.conf	Fri Jan 11 14:31:37 2008 +0100
@@ -6,9 +6,11 @@
 buildflags+=-L-lgdk-x11-2.0
 buildflags+=-L-latk-1.0
 buildflags+=-L-lgdk_pixbuf-2.0
+buildflags+=-L-lgthread-2.0
 buildflags+=-L-lm
 buildflags+=-L-lpangocairo-1.0
 buildflags+=-L-lfontconfig
+buildflags+=-L-lXtst
 buildflags+=-L-lXext
 buildflags+=-L-lXrender
 buildflags+=-L-lXinerama
@@ -25,3 +27,7 @@
 buildflags+=-L-ldl
 buildflags+=-L-lglib-2.0
 buildflags+=-L-lcairo
+buildflags+=-I/home/frank/jive
+#buildflags+=-g -gc
+
+
--- a/dwt/SWT.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/SWT.d	Fri Jan 11 14:31:37 2008 +0100
@@ -1746,7 +1746,7 @@
 	 *
 	 * @since 2.1
 	 */
-	public static const int MODIFIER_MASK;
+	public static /*const*/ int MODIFIER_MASK;
 
 	/**
 	 * Keyboard and/or mouse event mask indicating that mouse button one
@@ -1796,7 +1796,7 @@
 	 *
 	 * @since 2.1
 	 */
-	public static const int BUTTON_MASK;
+	public static /*const*/ int BUTTON_MASK;
 
 	/**
 	 * Keyboard and/or mouse event mask indicating that the MOD1 key
@@ -1806,7 +1806,7 @@
 	 *
 	 * @since 2.1
 	 */
-	public static const int MOD1;
+	public static /*const*/ int MOD1;
 
 	/**
 	 * Keyboard and/or mouse event mask indicating that the MOD2 key
@@ -1816,7 +1816,7 @@
 	 *
 	 * @since 2.1
 	 */
-	public static const int MOD2;
+	public static /*const*/ int MOD2;
 
 	/**
 	 * Keyboard and/or mouse event mask indicating that the MOD3 key
@@ -1824,7 +1824,7 @@
 	 *
 	 * @since 2.1
 	 */
-	public static const int MOD3;
+	public static /*const*/ int MOD3;
 
 	/**
 	 * Keyboard and/or mouse event mask indicating that the MOD4 key
@@ -1832,7 +1832,7 @@
 	 *
 	 * @since 2.1
 	 */
-	public static const int MOD4;
+	public static /*const*/ int MOD4;
 
 	/**
 	 * Constants to indicate line scrolling (value is 1).
@@ -3609,7 +3609,7 @@
 	throw error;
 }
 
-static this(){
+public static void static_this() {
 	/*
 	* These values represent bit masks that may need to
 	* expand in the future.  Therefore they are not initialized
--- a/dwt/accessibility/AccessibleFactory.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/accessibility/AccessibleFactory.d	Fri Jan 11 14:31:37 2008 +0100
@@ -36,7 +36,7 @@
 	static long[char[]] Types;
 	static AccessibleFactory[long] Factories;
 
-    static const uint DefaultParentType; //$NON-NLS-1$
+    static uint DefaultParentType; //$NON-NLS-1$
 	static const char[] FACTORY_PARENTTYPENAME = "AtkObjectFactory";
 	static const char[] SWT_TYPE_PREFIX = "SWT";
 	static const char[] CHILD_TYPENAME = "Child";
@@ -56,30 +56,30 @@
 	/* AT callbacks*/
 	/* interface definitions */
 	static GTypeInfo* ObjectIfaceDefinition;
-	static const GInterfaceInfo* ActionIfaceDefinition;
-	static const GInterfaceInfo* ComponentIfaceDefinition;
-	static const GInterfaceInfo* HypertextIfaceDefinition;
-	static const GInterfaceInfo* SelectionIfaceDefinition;
-	static const GInterfaceInfo* TextIfaceDefinition;
+	static GInterfaceInfo* ActionIfaceDefinition;
+	static GInterfaceInfo* ComponentIfaceDefinition;
+	static GInterfaceInfo* HypertextIfaceDefinition;
+	static GInterfaceInfo* SelectionIfaceDefinition;
+	static GInterfaceInfo* TextIfaceDefinition;
 
-    static this(){
-        DefaultParentType = OS.g_type_from_name ("GtkAccessible"); //$NON-NLS-1$
-		/* Action interface */
-		ActionIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
-        ActionIfaceDefinition.interface_init = &AccessibleFactory.initActionIfaceCB;
-		/* Component interface */
-		ComponentIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
-        ComponentIfaceDefinition.interface_init = &AccessibleFactory.initComponentIfaceCB;
-		/* Hypertext interface */
-		HypertextIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
-        HypertextIfaceDefinition.interface_init = &AccessibleFactory.initHypertextIfaceCB;
-		/* Selection interface */
-		SelectionIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
-        SelectionIfaceDefinition.interface_init = &AccessibleFactory.initSelectionIfaceCB;
-		/* Text interface */
-		TextIfaceDefinition =cast(GInterfaceInfo*) OS.g_malloc (GInterfaceInfo.sizeof);
-        TextIfaceDefinition.interface_init = &AccessibleFactory.initTextIfaceCB;
-	}
+    static synchronized void static_this(){
+            DefaultParentType = OS.g_type_from_name ("GtkAccessible"); //$NON-NLS-1$
+            /* Action interface */
+            ActionIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
+            ActionIfaceDefinition.interface_init = &AccessibleFactory.initActionIfaceCB;
+            /* Component interface */
+            ComponentIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
+            ComponentIfaceDefinition.interface_init = &AccessibleFactory.initComponentIfaceCB;
+            /* Hypertext interface */
+            HypertextIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
+            HypertextIfaceDefinition.interface_init = &AccessibleFactory.initHypertextIfaceCB;
+            /* Selection interface */
+            SelectionIfaceDefinition = cast(GInterfaceInfo*)OS.g_malloc (GInterfaceInfo.sizeof);
+            SelectionIfaceDefinition.interface_init = &AccessibleFactory.initSelectionIfaceCB;
+            /* Text interface */
+            TextIfaceDefinition =cast(GInterfaceInfo*) OS.g_malloc (GInterfaceInfo.sizeof);
+            TextIfaceDefinition.interface_init = &AccessibleFactory.initTextIfaceCB;
+    }
 
 	private this (int /*long*/ widgetType) {
 		widgetTypeName = OS.g_type_name (widgetType);
--- a/dwt/accessibility/AccessibleObject.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/accessibility/AccessibleObject.d	Fri Jan 11 14:31:37 2008 +0100
@@ -46,14 +46,14 @@
 	static char[] keybindingPtr;
 	static char[] namePtr;
     static AccessibleObject[AtkObject*] AccessibleObjects;
-	static const uint ATK_ACTION_TYPE;
-	static const uint ATK_COMPONENT_TYPE;
-	static const uint ATK_HYPERTEXT_TYPE;
-	static const uint ATK_SELECTION_TYPE;
-	static const uint ATK_TEXT_TYPE;
-	static const bool DEBUG;
+	static /*const*/ uint ATK_ACTION_TYPE;
+	static /*const*/ uint ATK_COMPONENT_TYPE;
+	static /*const*/ uint ATK_HYPERTEXT_TYPE;
+	static /*const*/ uint ATK_SELECTION_TYPE;
+	static /*const*/ uint ATK_TEXT_TYPE;
+	static /*const*/ bool DEBUG;
 
-    static this(){
+    public static void static_this() {
         DEBUG = Display.DEBUG;
         ATK_ACTION_TYPE = ATK.g_type_from_name ("AtkAction");
         ATK_COMPONENT_TYPE = ATK.g_type_from_name ("AtkComponent");
--- a/dwt/graphics/Device.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/graphics/Device.d	Fri Jan 11 14:31:37 2008 +0100
@@ -28,35 +28,6 @@
 import tango.stdc.stringz;
 import tango.io.Stdout;
 
-/+
-class Device{
-    static Device getDevice(){
-        return null;
-    }
-    void new_Object (Object object) {
-    }
-    void dispose_Object (Object object) {
-    }
-    bool tracking;
-    bool useXRender;
-    bool isDisposed(){
-        return false;
-    }
-    int[] colorRefCount;
-    GdkColor*[] gdkColors;
-    public Color getSystemColor (int id) {
-        return null;
-    }
-    Font systemFont;
-    Color COLOR_BLACK, COLOR_DARK_RED, COLOR_DARK_GREEN, COLOR_DARK_YELLOW, COLOR_DARK_BLUE;
-    Color COLOR_DARK_MAGENTA, COLOR_DARK_CYAN, COLOR_GRAY, COLOR_DARK_GRAY, COLOR_RED;
-    Color COLOR_GREEN, COLOR_YELLOW, COLOR_BLUE, COLOR_MAGENTA, COLOR_CYAN, COLOR_WHITE;
-}
-
-+/
-
-
-
 /**
  * This class is the abstract superclass of all device objects,
  * such as the Display device and the Printer device. Devices
@@ -125,7 +96,7 @@
 
 	static bool CAIRO_LOADED;
 
-	static const Object CREATE_LOCK;
+	static Object CREATE_LOCK;
 
 	/*
 	* TEMPORARY CODE. When a graphics object is
@@ -142,7 +113,7 @@
 	protected static Device CurrentDevice;
 	protected static Runnable DeviceFinder;
 
-static this(){
+synchronized static void static_this(){
     CREATE_LOCK = new Object();
     Devices = new Device[4];
 }
@@ -189,7 +160,7 @@
     tracking = DEBUG;
 
 	synchronized (CREATE_LOCK) {
-		if (data != null) {
+		if (data !is null) {
 			debugging = data.debugging;
 			tracking = data.tracking;
 		}
@@ -352,13 +323,13 @@
 	int count = 0, length = 0;
 	if (tracking) length = objects.length;
 	for (int i=0; i<length; i++) {
-		if (objects [i] != null) count++;
+		if (objects [i] !is null) count++;
 	}
 	int index = 0;
 	data.objects = new Object [count];
 	data.errors = new TracedException [count];
 	for (int i=0; i<length; i++) {
-		if (objects [i] != null) {
+		if (objects [i] !is null) {
 			data.objects [index] = objects [i];
 			data.errors [index] = errors [i];
 			index++;
@@ -442,11 +413,11 @@
 	auto context = OS.gdk_pango_context_get();
 	OS.pango_context_list_families(context, &families, &n_families);
 	int nFds = 0;
-	FontData[] fds = new FontData[faceName != null ? 4 : n_families];
+	FontData[] fds = new FontData[faceName !is null ? 4 : n_families];
 	for (int i=0; i<n_families; i++) {
 		family = families[i];
 		bool match = true;
-		if (faceName != null) {
+		if (faceName !is null) {
 			auto familyName = OS.pango_font_family_get_name(family);
 			match = Compatibility.equalsIgnoreCase(faceName, fromUtf8z( familyName ));
 		}
@@ -457,7 +428,7 @@
 		        auto fontDesc = OS.pango_font_face_describe(face);
 		        Font font = Font.gtk_new(this, fontDesc);
 		        FontData data = font.getFontData()[0];
-				if (nFds == fds.length) {
+				if (nFds is fds.length) {
                     FontData[] newFds = new FontData[fds.length + n_families];
                     System.arraycopy(fds, 0, newFds, 0, nFds);
                     fds = newFds;
@@ -471,7 +442,7 @@
 	}
 	OS.g_free(families);
 	OS.g_object_unref(context);
-	if (nFds == fds.length) return fds;
+	if (nFds is fds.length) return fds;
     FontData[] result = new FontData[nFds];
     System.arraycopy(fds, 0, result, 0, nFds);
     return result;
@@ -556,7 +527,7 @@
  */
 public bool getWarnings () {
 	checkDevice ();
-	return warningLevel == 0;
+	return warningLevel is 0;
 }
 
 /**
@@ -577,7 +548,7 @@
 		if (OS.XRenderQueryExtension (xDisplay, &event_basep, &error_basep)) {
 			int major_version, minor_version;
 			OS.XRenderQueryVersion (xDisplay, &major_version, &minor_version);
-			useXRender = major_version > 0 || (major_version == 0 && minor_version >= 8);
+			useXRender = major_version > 0 || (major_version is 0 && minor_version >= 8);
 		}
 	}
 
@@ -587,10 +558,10 @@
 			synchronized (CREATE_LOCK) {
 				int index = 0;
 				while (index < Devices.length) {
-					if (Devices [index] != null) break;
+					if (Devices [index] !is null) break;
 					index++;
 				}
-				if (index == Devices.length) {
+				if (index is Devices.length) {
 					OS.XSetErrorHandler ( & XErrorProcFunc );
 					OS.XSetIOErrorHandler ( & XIOErrorProcFunc );
 				}
@@ -699,13 +670,13 @@
  */
 public bool loadFont (char[] path) {
 	checkDevice();
-	if (path == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+	if (path is null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 	return cast(bool) OS.FcConfigAppFontAddFile (null, toStringz(path));
 }
 
 private static extern(C) void logFunction (char* log_domain, int log_level, char* message, void* user_data) {
     Device dev = cast(Device)user_data;
-	if (dev.warningLevel == 0) {
+	if (dev.warningLevel is 0) {
 		if (DEBUG || dev.debugging) {
             foreach( msg; new TracedException ("") ){
                 Stderr.formatln( "trc {}", msg );
@@ -824,17 +795,17 @@
 public void setWarnings (bool warnings) {
 	checkDevice ();
 	if (warnings) {
-		if (--warningLevel == 0) {
+		if (--warningLevel is 0) {
 			if (debugging) return;
             for (int i=0; i<handler_ids.length; i++) {
-                if (handler_ids [i] != 0) {
+                if (handler_ids [i] !is 0) {
                     OS.g_log_remove_handler (toStringz(log_domains [i]), handler_ids [i]);
                     handler_ids [i] = 0;
                 }
             }
 		}
 	} else {
-		if (warningLevel++ == 0) {
+		if (warningLevel++ is 0) {
 			if (debugging) return;
             int flags = OS.G_LOG_LEVEL_MASK | OS.G_LOG_FLAG_FATAL | OS.G_LOG_FLAG_RECURSION;
             for (int i=0; i<log_domains.length; i++) {
@@ -846,8 +817,8 @@
 
 private static extern(C) int /*long*/ XErrorProcFunc (void* xDisplay, dwt.internal.gtk.OS.XErrorEvent* xErrorEvent) {
 	Device device = findDevice (xDisplay);
-	if (device != null) {
-		if (device.warningLevel == 0) {
+	if (device !is null) {
+		if (device.warningLevel is 0) {
 			if (DEBUG || device.debugging) {
                 foreach( msg; new TracedException ("") ){
                     Stderr.formatln( "trc {}", msg );
@@ -866,7 +837,7 @@
 
 private static extern(C)  int /*long*/ XIOErrorProcFunc (void* xDisplay) {
 	Device device = findDevice (xDisplay);
-	if (device != null) {
+	if (device !is null) {
 		if (DEBUG || device.debugging) {
             foreach( msg; new TracedException ("") ){
                 Stderr.formatln( "trc {}", msg );
--- a/dwt/graphics/ImageData.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/graphics/ImageData.d	Fri Jan 11 14:31:37 2008 +0100
@@ -215,19 +215,20 @@
 	/**
 	 * Arbitrary channel width data to 8-bit conversion table.
 	 */
-	static const byte[][] ANY_TO_EIGHT;
-	static this() {
-        ANY_TO_EIGHT = new byte[][](9);
-		for (int b = 0; b < 9; ++b) {
-			byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];
-			if (b == 0) continue;
-			int inc = 0;
-			for (int bit = 0x10000; (bit >>= b) != 0;) inc |= bit;
-			for (int v = 0, p = 0; v < 0x10000; v+= inc) data[p++] = cast(byte)(v >> 8);
-		}
-        ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];
+	static byte[][] ANY_TO_EIGHT;
+
+	synchronized static void static_this() {
+            ANY_TO_EIGHT = new byte[][](9);
+            for (int b = 0; b < 9; ++b) {
+                byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];
+                if (b == 0) continue;
+                int inc = 0;
+                for (int bit = 0x10000; (bit >>= b) != 0;) inc |= bit;
+                for (int v = 0, p = 0; v < 0x10000; v+= inc) data[p++] = cast(byte)(v >> 8);
+            }
+            ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];
 	}
-	static const byte[] ONE_TO_ONE_MAPPING;
+	static byte[] ONE_TO_ONE_MAPPING;
 
 	/**
 	 * Scaled 8x8 Bayer dither matrix.
@@ -422,7 +423,6 @@
 	byte[] alphaData, int alpha, int transparentPixel, int type,
 	int x, int y, int disposalMethod, int delayTime)
 {
-
 	if (palette == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
 	if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8
 		|| depth == 16 || depth == 24 || depth == 32)) {
--- a/dwt/internal/Library.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/internal/Library.d	Fri Jan 11 14:31:37 2008 +0100
@@ -35,7 +35,7 @@
 	 * The JAVA and SWT versions
 	 */
 	//public static const int JAVA_VERSION;
-    public static const int SWT_VERSION;
+    public static /*const*/ int SWT_VERSION;
 
     version( linux ){
         static const char[] SEPARATOR = "\n";
@@ -45,7 +45,7 @@
     }
 
 
-static this(){
+public static void static_this() {
 	//SEPARATOR = System.getProperty("file.separator");
 	//JAVA_VERSION = parseVersion(System.getProperty("java.version"));
 	SWT_VERSION = buildSWT_VERSION(MAJOR_VERSION, MINOR_VERSION);
--- a/dwt/internal/Lock.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/internal/Lock.d	Fri Jan 11 14:31:37 2008 +0100
@@ -23,7 +23,7 @@
     Mutex mutex;
     Condition cond;
 
-    public this(){
+    public this() {
         mutex = new Mutex;
         cond = new Condition(mutex);
     }
@@ -37,7 +37,7 @@
 public int lock() {
 	synchronized (mutex) {
 		Thread current = Thread.getThis();
-		if (owner != current) {
+		if (owner !is current) {
 			waitCount++;
 			while (count > 0) {
 				try {
@@ -60,8 +60,8 @@
 public void unlock() {
 	synchronized (mutex) {
 		Thread current = Thread.getThis();
-		if (owner == current) {
-			if (--count == 0) {
+		if (owner is current) {
+			if (--count is 0) {
 				owner = null;
 				if (waitCount > 0) cond.notifyAll();
 			}
--- a/dwt/internal/Platform.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/internal/Platform.d	Fri Jan 11 14:31:37 2008 +0100
@@ -18,8 +18,8 @@
 
 public class Platform {
 	public static const char[] PLATFORM = "gtk"; //$NON-NLS-1$
-	public static const Lock lock;
-    static this(){
+	public static /*const*/ Lock lock;
+    public static void static_this() {
         lock = new Lock();
     }
 }
--- a/dwt/internal/accessibility/gtk/ATK.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/internal/accessibility/gtk/ATK.d	Fri Jan 11 14:31:37 2008 +0100
@@ -36,12 +36,24 @@
 
 alias dwt.internal.c.gtk.GtkAccessible GtkAccessible;
 
-private AtkActionIface* ATK_ACTION_GET_IFACE( AtkObject* );
-private AtkComponentIface* ATK_COMPONENT_GET_IFACE( AtkObject* );
-private AtkObjectFactoryClass* ATK_OBJECT_FACTORY_CLASS( void* );
-private AtkSelectionIface* ATK_SELECTION_GET_IFACE( AtkObject* );
-private AtkTextIface* ATK_TEXT_GET_IFACE(AtkObject*);
-private GtkAccessible* GTK_ACCESSIBLE(AtkObject*);
+private AtkActionIface* ATK_ACTION_GET_IFACE( AtkObject* ){
+    return null;
+}
+private AtkComponentIface* ATK_COMPONENT_GET_IFACE( AtkObject* ){
+    return null;
+}
+private AtkObjectFactoryClass* ATK_OBJECT_FACTORY_CLASS( void* ){
+    return null;
+}
+private AtkSelectionIface* ATK_SELECTION_GET_IFACE( AtkObject* ){
+    return null;
+}
+private AtkTextIface* ATK_TEXT_GET_IFACE(AtkObject*){
+    return null;
+}
+private GtkAccessible* GTK_ACCESSIBLE(AtkObject*){
+    return null;
+}
 
 
 
--- a/dwt/internal/gtk/OS.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/internal/gtk/OS.d	Fri Jan 11 14:31:37 2008 +0100
@@ -144,6 +144,7 @@
 public alias dwt.internal.c.gtk.GtkImageMenuItem GtkImageMenuItem;
 public alias dwt.internal.c.gtk.GtkMenuItem GtkMenuItem;
 public alias dwt.internal.c.gtk.GtkIMMulticontext GtkIMMulticontext;
+public alias dwt.internal.c.gtk.GtkTooltipsData GtkTooltipsData;
 
 public alias dwt.internal.c.Xlib.XErrorEvent XErrorEvent;
 public alias dwt.internal.c.Xlib.XExposeEvent XExposeEvent;
@@ -244,8 +245,8 @@
 public class OS : Platform {
 
     /** OS Constants */
-	public static const bool IsAIX, IsSunOS, IsLinux, IsHPUX;
-	static this() {
+	public static /*const*/ bool IsAIX, IsSunOS, IsLinux, IsHPUX;
+	public static void static_this() {
 		/* Initialize the OS flags and locale constants */
 		char[] osName = "Linux";//System.getProperty ("os.name");
 		bool isAIX = false, isSunOS = false, isLinux = false, isHPUX = false;
@@ -256,7 +257,7 @@
 		if (osName == "HP-UX") isHPUX = true;
 		IsAIX = isAIX;  IsSunOS = isSunOS;  IsLinux = isLinux;  IsHPUX = isHPUX;
         //PORTING_LEFT
-        GTK_VERSION = 0; //buildVERSION(gtk_major_version(), gtk_minor_version(), gtk_micro_version());
+        GTK_VERSION = buildVERSION(gtk_major_version(), gtk_minor_version(), gtk_micro_version());
 	}
 
 	/** Constants */
@@ -703,7 +704,7 @@
 	public static const char[] ypad = "ypad";
 	public static const char[] GTK_PRINT_SETTINGS_OUTPUT_URI = "output-uri";
 
-	public static const int GTK_VERSION;// see static ctor = buildVERSION(gtk_major_version(), gtk_minor_version(), gtk_micro_version());
+	public static /*const*/ int GTK_VERSION;// see static ctor = buildVERSION(gtk_major_version(), gtk_minor_version(), gtk_micro_version());
 
 
 public static int buildVERSION(int major, int minor, int micro) {
--- a/dwt/internal/image/JPEGFileFormat.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/internal/image/JPEGFileFormat.d	Fri Jan 11 14:31:37 2008 +0100
@@ -124,7 +124,7 @@
 	public static const int ID_Y		= 1 - 1;
 	public static const int ID_CB	= 2 - 1;
 	public static const int ID_CR	= 3 - 1;
-	public static const RGB[] RGB16;
+	public static /*const*/ RGB[] RGB16;
 	public static const int[] ExtendTest = [
 		0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048,
 		4096, 8192, 16384, 32768, 65536, 131072, 262144
@@ -147,7 +147,7 @@
 	public static int[] CrRTable, CbBTable, CrGTable, CbGTable;
 	public static int[] RYTable, GYTable, BYTable,
 		RCbTable, GCbTable, BCbTable, RCrTable, GCrTable, BCrTable, NBitsTable;
-	static this(){
+    public static void static_this() {
 		initialize();
         RGB16 = [
             new RGB(0,0,0),
--- a/dwt/internal/image/PngChunk.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/internal/image/PngChunk.d	Fri Jan 11 14:31:37 2008 +0100
@@ -49,8 +49,8 @@
 	static const byte[] TYPE_IEND = cast(byte[])"IEND";//{(byte) 'I', (byte) 'E', (byte) 'N', (byte) 'D'};
 	static const byte[] TYPE_tRNS = cast(byte[])"tRNS";//{(byte) 't', (byte) 'R', (byte) 'N', (byte) 'S'};
 
-	static const int[] CRC_TABLE;
-	static this() {
+	static /*const*/ int[] CRC_TABLE;
+    public static void static_this() {
 		CRC_TABLE = new int[256];
 		for (int i = 0; i < 256; i++) {
 			CRC_TABLE[i] = i;
--- a/dwt/widgets/Control.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/widgets/Control.d	Fri Jan 11 14:31:37 2008 +0100
@@ -43,40 +43,19 @@
 import dwt.widgets.Decorations;
 import dwt.widgets.Display;
 import dwt.widgets.Event;
-import dwt.widgets.EventTable;
 import dwt.widgets.Listener;
 import dwt.widgets.Menu;
 import dwt.widgets.Monitor;
 import dwt.widgets.Shell;
 import dwt.widgets.TypedListener;
 import dwt.widgets.Widget;
+import dwt.accessibility.Accessible;
 
 import Math = tango.math.Math;
 import tango.stdc.string;
 import tango.stdc.stringz;
 import tango.core.Thread;
 
-/+
-class Control : Widget {
-    GdkWindow* paintWindow () { return null; };
-    public Shell getShell();
-    bool isEnabled();
-    bool isDisposed();
-    GdkWindow* eventWindow ();
-    GtkIMContext * imHandle();
-    Control findBackgroundControl ();
-    GdkColor* getBackgroundColor () ;
-    GdkColor* getForegroundColor () ;
-    PangoFontDescription* getFontDescription ();
-    public Point toDisplay (int x, int y);
-    public Point toDisplay (Point point) ;
-    Point getIMCaretPos () ;
-}
-+/
-
-class Accessible{
-    static Accessible internal_new_Accessible(Control);
-}
 
 /**
  * Control is the abstract superclass of all windowed user interface classes.
@@ -2430,6 +2409,7 @@
 	switch (button) {
 		case -6: button = 4; break;
 		case -7: button = 5; break;
+        default:
 	}
 	return sendMouseEvent (SWT.MouseUp, button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 }
@@ -2509,6 +2489,7 @@
 
 			sendFocusEvent (gdkEventFocus.in_ !is 0 ? SWT.FocusIn : SWT.FocusOut);
 			break;
+        default:
 		}
 	}
 	return 0;
@@ -2693,6 +2674,7 @@
 			return sendMouseEvent (SWT.MouseDown, 4, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 		case OS.GDK_SCROLL_RIGHT:
 			return sendMouseEvent (SWT.MouseDown, 5, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
+        default:
 	}
 	return 0;
 }
@@ -3121,6 +3103,7 @@
 					shell.setActiveControl (null);
 				}
 				break;
+            default:
 		}
 	}
 }
@@ -4148,6 +4131,7 @@
 		case SWT.TRAVERSE_MNEMONIC:		return traverseMnemonic (event.character);
 		case SWT.TRAVERSE_PAGE_NEXT:		return traversePage (true);
 		case SWT.TRAVERSE_PAGE_PREVIOUS:	return traversePage (false);
+        default:
 	}
 	return false;
 }
@@ -4290,6 +4274,7 @@
 				}
 			}
 			break;
+        default:
 		}
 	}
 	return super.windowProc (handle, arg0, user_data);
--- a/dwt/widgets/Display.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/widgets/Display.d	Fri Jan 11 14:31:37 2008 +0100
@@ -40,13 +40,13 @@
 import dwt.widgets.Tray;
 import dwt.widgets.Widget;
 
-import tango.io.Stdout;
 import tango.stdc.string;
 import tango.stdc.stringz;
 import dwt.dwthelper.utils;
 import dwt.dwthelper.Runnable;
 
 import tango.core.Thread;
+import tango.io.Stdout;
 
 /**
  * Instances of this class are responsible for managing the
@@ -154,9 +154,9 @@
 	Widget lastWidget;
 	Widget [] widgetTable;
 	const static int GROW_SIZE = 1024;
-	static const int SWT_OBJECT_INDEX;
-	static const int SWT_OBJECT_INDEX1;
-	static const int SWT_OBJECT_INDEX2;
+	static int SWT_OBJECT_INDEX;
+	static int SWT_OBJECT_INDEX1;
+	static int SWT_OBJECT_INDEX2;
 
 	/* Focus */
 	int focusEvent;
@@ -209,9 +209,10 @@
 	/* Idle proc callback */
     CallbackData idleProcCallbackData;
 	int idleHandle;
-	static const char[] ADD_IDLE_PROC_KEY;
-	static const char[] REMOVE_IDLE_PROC_KEY;
-	Object idleLock;
+	static const char[] ADD_IDLE_PROC_KEY = "dwt.internal.gtk2.addIdleProc";
+	static const char[] REMOVE_IDLE_PROC_KEY = "dwt.internal.gtk2.removeIdleProc";
+
+    Object idleLock;
 	bool idleNeeded;
 
 	/* GtkTreeView callbacks */
@@ -390,15 +391,13 @@
 	* it does not compile on some Java compilers when they are
 	* targeted for CLDC.  Use Class.forName() instead.
 	*/
-	static this(){
-        Displays = new Display [4];
-        initDeviceFinder();
-        SWT_OBJECT_INDEX = OS.g_quark_from_string ("SWT_OBJECT_INDEX");
-        SWT_OBJECT_INDEX1 = OS.g_quark_from_string ("SWT_OBJECT_INDEX1");
-        SWT_OBJECT_INDEX2 = OS.g_quark_from_string ("SWT_OBJECT_INDEX2");
-        ADD_IDLE_PROC_KEY = "dwt.internal.gtk2.addIdleProc";
-        REMOVE_IDLE_PROC_KEY = "dwt.internal.gtk2.removeIdleProc";
-	}
+    synchronized static void static_this() {
+            Displays = new Display [4];
+            initDeviceFinder();
+            SWT_OBJECT_INDEX = OS.g_quark_from_string ("SWT_OBJECT_INDEX");
+            SWT_OBJECT_INDEX1 = OS.g_quark_from_string ("SWT_OBJECT_INDEX1");
+            SWT_OBJECT_INDEX2 = OS.g_quark_from_string ("SWT_OBJECT_INDEX2");
+    }
 
 	/* GTK Version */
 	static const int MAJOR = 2;
@@ -790,6 +789,7 @@
 				}
 			}
 			break;
+        default:
 		}
 	}
 	return 0;
@@ -913,9 +913,10 @@
 
 	/* Initialize the filter and event callback */
 	OS.gdk_event_handler_set (&eventProcFunc, cast(void*)this, null);
-    filterProcCallbackData.display = this;
-    filterProcCallbackData.data = null;
-	OS.gdk_window_add_filter  (null, &filterProcFunc, cast(void*)&filterProcCallbackData );
+    //filterProcCallbackData.display = this;
+    //filterProcCallbackData.data = null;
+	//OS.gdk_window_add_filter  (null, &filterProcFunc, cast(void*)&filterProcCallbackData );
+    doWindowAddFilter( &filterProcCallbackData, null, null );
 }
 
 /*
@@ -924,13 +925,13 @@
 package void doWindowAddFilter( CallbackData* cbdata, GdkWindow* window, GtkWidget* widget ){
     cbdata.display = this;
     cbdata.data = widget;
-    OS.gdk_window_add_filter (window, &filterProcFunc, cast(void*)&cbdata );
+    OS.gdk_window_add_filter (window, &filterProcFunc, cbdata );
 }
 
 package void doWindowRemoveFilter( CallbackData* cbdata, GdkWindow* window, GtkWidget* widget ){
     cbdata.display = this;
     cbdata.data = widget;
-    OS.gdk_window_remove_filter(window, &filterProcFunc, cast(void*)&cbdata );
+    OS.gdk_window_remove_filter(window, &filterProcFunc, cbdata );
 }
 
 Image createImage (char[] name) {
@@ -1133,6 +1134,7 @@
 		case OS.GDK_BUTTON_PRESS:
 		case OS.GDK_KEY_PRESS:
 			lastUserEventTime = time;
+        default:
 	}
 	bool dispatch = true;
 	if (dispatchEvents !is null) {
@@ -1186,6 +1188,7 @@
 						}
 					}
 				} while ((window = OS.gdk_window_get_parent (window)) !is null);
+            default:
 			}
 		}
 		if (control !is null) {
@@ -1427,7 +1430,8 @@
     auto callbackdata = cast(CallbackData*)data;
     auto disp = callbackdata.display;
     if( disp is null ) return 0;
-    return disp.filterProcMeth(xEvent,gdkEvent,callbackdata);
+    auto res =  disp.filterProcMeth(xEvent,gdkEvent,callbackdata);
+    return res;
 }
 
 int filterProcMeth (GdkXEvent* xEvent, GdkEvent* gdkEvent, CallbackData* callbackData) {
@@ -1447,6 +1451,7 @@
                 case 7:
                     mouseEvent.button = -mouseEvent.button;
                     break;
+                default:
             }
         }
     }
@@ -1604,9 +1609,9 @@
 }
 
 // /+static bool isValidClass (Class clazz) {
-// //PROTING_TODO	char[] name = clazz.getName ();
-// //PROTING_TODO	int index = name.lastIndexOf ('.');
-// //PROTING_TODO	return name.substring (0, index + 1)==/*eq*/ PACKAGE_PREFIX;
+// //PORTING_TODO	char[] name = clazz.getName ();
+// //PORTING_TODO	int index = name.lastIndexOf ('.');
+// //PORTING_TODO	return name.substring (0, index + 1)==/*eq*/ PACKAGE_PREFIX;
 //     return true;
 // }+/
 
@@ -2072,6 +2077,7 @@
 				warningImage = createImage ("gtk-dialog-warning");
 			}
 			return warningImage;
+        default:
 	}
 	return null;
 }
@@ -2840,6 +2846,7 @@
 				OS.XTestFakeButtonEvent (xDisplay, button, type is SWT.MouseDown, 0);
 			}
 			return true;
+        default:
 		}
 		/*
 		* This code is intentionally commented. After posting a
@@ -3719,13 +3726,36 @@
 	return 0;
 }
 
-int /*long*/ sizeAllocateProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) {
+
+package int doSizeAllocateConnect( CallbackData* cbdata, GtkWidget* window, GtkWidget* widget ){
+    cbdata.display = this;
+    cbdata.data = cast(void*)widget;
+    return OS.g_signal_connect (cast(void*)window, OS.size_allocate.ptr, cast(GCallback)&sizeAllocateProcFunc, cast(void*)&cbdata);
+}
+
+private static extern(C) void sizeAllocateProcFunc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) {
+    auto cbdata = cast(CallbackData*)user_data;
+    cbdata.display.sizeAllocateProc( cast(GtkWidget*)handle, arg0, cast(int)cbdata.data );
+}
+
+void sizeAllocateProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) {
 	Widget widget = getWidget ( cast(GtkWidget*)user_data);
 	if (widget is null) return 0;
-	return widget.sizeAllocateProc (handle, arg0, user_data);
+	widget.sizeAllocateProc (handle, arg0, user_data);
 }
 
 
+package int doSizeRequestConnect( CallbackData* cbdata, GtkWidget* window, GtkWidget* widget ){
+    cbdata.display = this;
+    cbdata.data = cast(void*)widget;
+    return OS.g_signal_connect (cast(void*)window, OS.size_request.ptr, cast(GCallback)&sizeRequestProcFunc, cast(void*)&cbdata );
+}
+
+private static extern(C) void  sizeRequestProcFunc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) {
+    auto cbdata = cast(CallbackData*)user_data;
+    cbdata.display.sizeRequestProcMeth( cast(GtkWidget*)handle, arg0, cast(int)cbdata.data );
+}
+
 int /*long*/ sizeRequestProcMeth (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) {
 	Widget widget = getWidget (cast(GtkWidget*)user_data);
 	if (widget is null) return 0;
@@ -3954,9 +3984,9 @@
 }
 
 package int doWindowTimerAdd( CallbackData* cbdata, int delay, GtkWidget* widget ){
-    timerProcCallbackData.display = this;
-    timerProcCallbackData.data = cast(void*)widget;
-    return OS.gtk_timeout_add (delay, &windowTimerProcFunc, &timerProcCallbackData);
+    cbdata.display = this;
+    cbdata.data = cast(void*)widget;
+    return OS.gtk_timeout_add (delay, &windowTimerProcFunc, &cbdata);
 }
 
 private static extern(C) int /*long*/ windowTimerProcFunc (void* user_data) {
--- a/dwt/widgets/EventTable.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/widgets/EventTable.d	Fri Jan 11 14:31:37 2008 +0100
@@ -12,20 +12,25 @@
 
 import dwt.widgets.Listener;
 import dwt.widgets.Event;
+import dwt.widgets.Listener;
+import dwt.widgets.TypedListener;
+import dwt.internal.SWTEventListener;
+import dwt.dwthelper.System;
+import dwt.SWT;
 import dwt.internal.SWTEventListener;
 
+/+
 class EventTable{
-    public void hook (int eventType, Listener listener) {}
-    public void sendEvent (Event event) ;
-    public bool hooks (int eventType) ;
-    public void unhook (int eventType, Listener listener) ;
-    public void unhook (int eventType, SWTEventListener listener) ;
-    public int size () ;
+    public void hook (int eventType, Listener listener) {
+    }
+    public void sendEvent (Event event) {}
+    public bool hooks (int eventType) { return false; }
+    public void unhook (int eventType, Listener listener) {}
+    public void unhook (int eventType, SWTEventListener listener) {}
+    public int size () { return 0;}
 }
++/
 
-/+++
-import dwt.*;
-import dwt.internal.SWTEventListener;
 
 /**
  * Instances of this class implement a simple
@@ -40,52 +45,52 @@
 	int level;
 
 public void hook (int eventType, Listener listener) {
-	if (types == null) types = new int [4];
-	if (listeners == null) listeners = new Listener [4];
+	if (types is null) types = new int [4];
+	if (listeners is null) listeners = new Listener [4];
 	int length = types.length, index = length - 1;
 	while (index >= 0) {
-		if (types [index] != 0) break;
+		if (types [index] !is 0) break;
 		--index;
 	}
 	index++;
-	if (index == length) {
+	if (index is length) {
 		int [] newTypes = new int [length + 4];
 		System.arraycopy (types, 0, newTypes, 0, length);
 		types = newTypes;
 		Listener [] newListeners = new Listener [length + 4];
-		System.arraycopy (listeners, 0, newListeners, 0, length);
+		SimpleType!(Listener).arraycopy (listeners, 0, newListeners, 0, length);
 		listeners = newListeners;
 	}
 	types [index] = eventType;
 	listeners [index] = listener;
 }
 
-public boolean hooks (int eventType) {
-	if (types == null) return false;
+public bool hooks (int eventType) {
+	if (types is null) return false;
 	for (int i=0; i<types.length; i++) {
-		if (types [i] == eventType) return true;
+		if (types [i] is eventType) return true;
 	}
 	return false;
 }
 
 public void sendEvent (Event event) {
-	if (types == null) return;
+	if (types is null) return;
 	level += level >= 0 ? 1 : -1;
 	try {
 		for (int i=0; i<types.length; i++) {
-			if (event.type == SWT.None) return;
-			if (types [i] == event.type) {
+			if (event.type is SWT.None) return;
+			if (types [i] is event.type) {
 				Listener listener = listeners [i];
-				if (listener != null) listener.handleEvent (event);
+				if (listener !is null) listener.handleEvent (event);
 			}
 		}
 	} finally {
-		boolean compact = level < 0;
+		bool compact = level < 0;
 		level -= level >= 0 ? 1 : -1;
-		if (compact && level == 0) {
+		if (compact && level is 0) {
 			int index = 0;
 			for (int i=0; i<types.length; i++) {
-				if (types [i] != 0) {
+				if (types [i] !is 0) {
 					types [index] = types [i];
 					listeners [index] = listeners [i];
 					index++;
@@ -100,19 +105,19 @@
 }
 
 public int size () {
-	if (types == null) return 0;
+	if (types is null) return 0;
 	int count = 0;
 	for (int i=0; i<types.length; i++) {
-		if (types [i] != 0) count++;
+		if (types [i] !is 0) count++;
 	}
 	return count;
 }
 
 void remove (int index) {
-	if (level == 0) {
+	if (level is 0) {
 		int end = types.length - 1;
 		System.arraycopy (types, index + 1, types, index, end - index);
-		System.arraycopy (listeners, index + 1, listeners, index, end - index);
+		SimpleType!(Listener).arraycopy (listeners, index + 1, listeners, index, end - index);
 		index = end;
 	} else {
 		if (level > 0) level = -level;
@@ -122,9 +127,9 @@
 }
 
 public void unhook (int eventType, Listener listener) {
-	if (types == null) return;
+	if (types is null) return;
 	for (int i=0; i<types.length; i++) {
-		if (types [i] == eventType && listeners [i] == listener) {
+		if (types [i] is eventType && listeners [i] is listener) {
 			remove (i);
 			return;
 		}
@@ -132,12 +137,11 @@
 }
 
 public void unhook (int eventType, SWTEventListener listener) {
-	if (types == null) return;
+	if (types is null) return;
 	for (int i=0; i<types.length; i++) {
-		if (types [i] == eventType) {
-			if (listeners [i] instanceof TypedListener) {
-				TypedListener typedListener = (TypedListener) listeners [i];
-				if (typedListener.getEventListener () == listener) {
+		if (types [i] is eventType) {
+			if ( auto typedListener = cast(TypedListener) listeners [i] ) {
+				if (typedListener.getEventListener () is listener) {
 					remove (i);
 					return;
 				}
@@ -147,4 +151,3 @@
 }
 
 }
-+++/
\ No newline at end of file
--- a/dwt/widgets/Shell.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/dwt/widgets/Shell.d	Fri Jan 11 14:31:37 2008 +0100
@@ -144,6 +144,8 @@
 	Control lastActive;
 	Region region;
     CallbackData filterProcCallbackData;
+    CallbackData sizeAllocateProcCallbackData;
+    CallbackData sizeRequestProcCallbackData;
 
 	static final int MAXIMUM_TRIM = 128;
 
@@ -677,6 +679,7 @@
 						display.activePending = false;
 						sendEvent (SWT.Activate);
 						break;
+                    default:
 				}
 			}
 			break;
@@ -695,9 +698,11 @@
 							display.activePending = false;
 						}
 						break;
+                    default:
 				}
 			}
 			break;
+        default:
 	}
 	return 0;
 }
@@ -970,6 +975,7 @@
 				}
 			}
 			break;
+        default:
 	}
 	return super.gtk_focus (widget, directionType);
 }
@@ -1742,8 +1748,6 @@
 }
 
 void setToolTipText (GtkWidget* widget, char[] string) {
-//PORTING_LEFT
-/+
 	char* buffer = toStringz( string );
 	if (tooltipsHandle is null) {
 		tooltipsHandle = cast(GtkWidget*)OS.gtk_tooltips_new ();
@@ -1766,7 +1770,7 @@
 	}
 	auto tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (cast(GtkTooltips*)tooltipsHandle);
 	if (tipWindow !is null && tipWindow !is tooltipWindow) {
-		OS.g_signal_connect (tipWindow, OS.size_allocate, display.sizeAllocateProc, shellHandle);
+        display.doSizeAllocateConnect( &sizeAllocateProcCallbackData, tipWindow, shellHandle );
 		tooltipWindow = tipWindow;
 	}
 
@@ -1779,11 +1783,11 @@
 	bool set = true;
 	if (tipWindow !is null) {
 		if ((OS.GTK_WIDGET_FLAGS (widget) & (OS.GTK_REALIZED | OS.GTK_VISIBLE)) !is 0) {
-			int [] x = new int [1], y = new int [1];
-			auto window = OS.gdk_window_at_pointer (x, y);
+			int  x, y;
+			auto window = OS.gdk_window_at_pointer (&x, &y);
 			if (window !is null) {
 				GtkWidget* user_data;
-				OS.gdk_window_get_user_data (window, &user_data);
+				OS.gdk_window_get_user_data (window, cast(void**)&user_data);
 				if (widget is user_data) {
 					/*
 					* Feature in GTK.  Calling gtk_tooltips_set_tip() positions and
@@ -1793,11 +1797,11 @@
 					* and before the new tooltip is forced to be active.
 					*/
 					set = false;
-					int handler_id = OS.g_signal_connect (tipWindow, OS.size_request, display.sizeRequestProc, shellHandle);
+                    int handler_id = display.doSizeRequestConnect( &sizeRequestProcCallbackData, tipWindow, shellHandle );
 					OS.gtk_tooltips_set_tip (cast(GtkTooltips*)tooltipsHandle, widget, buffer, null);
 					OS.gtk_widget_hide (tipWindow);
-					auto data = OS.gtk_tooltips_data_get (cast(GtkTooltips*)widget);
-					OS.GTK_TOOLTIPS_SET_ACTIVE (tooltipsHandle, data);
+					auto data = OS.gtk_tooltips_data_get (widget);
+					OS.GTK_TOOLTIPS_SET_ACTIVE (cast(GtkTooltips*)tooltipsHandle, cast(GtkTooltipsData*)data);
 					OS.gtk_tooltips_set_tip (cast(GtkTooltips*)tooltipsHandle, widget, buffer, null);
 					if (handler_id !is 0) OS.g_signal_handler_disconnect (tipWindow, handler_id);
 				}
@@ -1805,6 +1809,5 @@
 		}
 	}
 	if (set) OS.gtk_tooltips_set_tip (cast(GtkTooltips*)tooltipsHandle, widget, buffer, null);
- +/
 }
 }
--- a/helloworld.d	Fri Jan 11 11:21:52 2008 +0100
+++ b/helloworld.d	Fri Jan 11 14:31:37 2008 +0100
@@ -4,18 +4,64 @@
 import dwt.widgets.Display;
 import dwt.widgets.Shell;
 
+import tango.io.Stdout;
+import tango.math.Math;
+import tango.text.convert.Format;
+import tango.util.Convert;
+import tango.util.PathUtil;
+import dwt.graphics.Device;
+import dwt.graphics.ImageData;
+
+
+import dwt.accessibility.AccessibleObject;
+import dwt.accessibility.AccessibleFactory;
+import dwt.SWT;
+import dwt.dwthelper.File;
+import dwt.widgets.Display;
+import dwt.internal.Library;
+import dwt.internal.Platform;
+import dwt.internal.image.PngChunk;
+import dwt.internal.image.JPEGFileFormat;
+import dwt.internal.gtk.OS;
+
+import jive.stacktrace;
+
 void main(){
-    Display display;
-    Shell shell;
+
+    TraceConfig.throwOnAll = true;
+    try{
+        Display display;
+        Shell shell;
 
-    display = new Display();
-    shell = new Shell(display);
-    shell.setText("Simple SWT Sample");
-    shell.open();
-    while (!shell.isDisposed()) {
-        if (!display.readAndDispatch()) {
-            display.sleep();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); File.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); Library.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); Platform.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); OS.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); SWT.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); AccessibleObject.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); AccessibleFactory.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); ImageData.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); Device.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); Display.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); PngChunk.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); JPEGFileFormat.static_this();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ );
+
+        Stdout.formatln( "main entered" );
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); display = new Display();
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); shell = new Shell(display);
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); shell.setText("Simple SWT Sample");
+        Stdout.formatln( "trc {}:{}", __LINE__, __FILE__ ); shell.open();
+        Stdout.formatln( "loop entered" );
+        while (!shell.isDisposed()) {
+            if (!display.readAndDispatch()) {
+                display.sleep();
+            }
         }
     }
+    catch (Exception e)
+    {
+        Stdout.formatln (e.toString);
+    }
 }