Mercurial > projects > dwt-mac
diff dwt/internal/Callback.d @ 11:a329f9c3d66d
Ported dwt.internal.cocoa.SWT* again
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Fri, 22 Aug 2008 15:39:51 +0200 |
parents | 8b48be5454ce |
children | f565d3a95c0a |
line wrap: on
line diff
--- a/dwt/internal/Callback.d Tue Aug 19 17:40:11 2008 +0200 +++ b/dwt/internal/Callback.d Fri Aug 22 15:39:51 2008 +0200 @@ -15,6 +15,7 @@ import dwt.dwthelper.utils; import dwt.internal.C; +import c = dwt.internal.c.callback; /** * Instances of this class represent entry points into Java @@ -138,7 +139,7 @@ */ static synchronized int /*long*/ bind (Callback callback, Object object, String method, String signature, int argCount, boolean isStatic, boolean isArrayBased, int /*long*/ errorResult) { - + return c.bind(callback, object, method, signature, argCount, isStatic, isArrayBased, errorResult); } /** @@ -148,7 +149,7 @@ * from accidentally holding onto extraneous garbage. */ public void dispose () { - if (object == null) return; + if (object is null) return; unbind (this); object = method = signature = null; address = 0; @@ -182,12 +183,15 @@ * * @since 2.1 */ -public static int getEntryCount (); +public static int getEntryCount () +{ + return c.getEntryCount; +} static String getSignature(int argCount) { String signature = "("; //$NON-NLS-1$ - for (int i = 0; i < argCount; i++) signature += PTR_SIGNATURE; - signature += ")" + PTR_SIGNATURE; //$NON-NLS-1$ + for (int i = 0; i < argCount; i++) signature = PTR_SIGNATURE; + signature += ")" ~ PTR_SIGNATURE; //$NON-NLS-1$ return signature; } @@ -203,7 +207,10 @@ * * @param enable true if callbacks should be invoked */ -public static final synchronized void setEnabled (boolean enable); +public static final synchronized void setEnabled (boolean enable) +{ + return c.setEnabled(enable); +} /** * Returns whether or not callbacks which are triggered at the @@ -217,7 +224,10 @@ * * @return true if callbacks should not be invoked */ -public static final synchronized boolean getEnabled (); +public static final synchronized boolean getEnabled () +{ + return c.getEnabled; +} /** * This might be called directly from native code in environments @@ -246,6 +256,9 @@ * * @see #dispose */ -static final synchronized void unbind (Callback callback); +static final synchronized void unbind (Callback callback) +{ + c.unbind(callback); +} }