view dwtexamples/helloworld/HelloWorld1.d @ 0:052c3aebd1d3

initial import
author Frank Benoit <benoit@tionex.de>
date Fri, 01 Feb 2008 21:46:26 +0100
parents
children b61e7baf0574
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2000, 2003 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
 *******************************************************************************/
module dwtexamples.helloworld.HelloWorld1;


import dwt.widgets.Display;
import dwt.widgets.Shell;

/*
 * This example demonstrates the minimum amount of code required
 * to open an DWT Shell and process the events.
 */
void main(){
    Display display = new Display ();
    Shell shell = new Shell (display);
    shell.open ();
    while (!shell.isDisposed ()) {
        if (!display.readAndDispatch ()) display.sleep ();
    }
    display.dispose ();
}

// for unknown reason, there are linker errors. These imports are the workaround
import tango.io.Stdout;
import tango.math.Math;
import tango.text.convert.Format;
import tango.util.Convert;
import tango.util.PathUtil;