Mercurial > projects > dwt-mac
diff dwt/internal/C.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 8b48be5454ce |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/C.d Sat Aug 09 17:00:02 2008 +0200 @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2000, 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * + * Port to the D Programming language: + * Jacob Carlborg <jacob.carlborg@gmail.com> + *******************************************************************************/ +module dwt.internal.C; + +public import tango.stdc.stdlib : free, malloc, getenv; +public import tango.stdc.string : memmove, memset, strlen; + +import dwt.dwthelper.utils; +import dwt.internal.Library; +import dwt.internal.Platform; + +public class C : Platform +{ + + /*static this () + { + if ("Linux".opEquals(System.getProperty("os.name")) && "motif".opEquals( + Platform.PLATFORM)) + { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + try + { + Library.loadLibrary("libXm.so.2", false); //$NON-NLS-1$ + } + catch (Exception ex) + { + } + } + + Library.loadLibrary("swt"); //$NON-NLS-1$ + }*/ + + alias tango.stdc.string.memmove MoveMemory; + + //public static final int PTR_SIZEOF = PTR_sizeof(); + + //public static final native int PTR_sizeof (); +}