1 #!/usr/bin/env dub
2 /+
3 dub.sdl:
4     name "snippet1"
5     dependency "dwt" path="../../../../../../" version="*"
6     libs \
7       "atk-1.0" \
8       "cairo" \
9       "dl" \
10       "fontconfig" \
11       "gdk-x11-2.0" \
12       "gdk_pixbuf-2.0" \
13       "gio-2.0" \
14       "glib-2.0" \
15       "gmodule-2.0" \
16       "gobject-2.0" \
17       "gthread-2.0" \
18       "gtk-x11-2.0" \
19       "pango-1.0" \
20       "pangocairo-1.0" \
21       "X11" \
22       "Xcomposite" \
23       "Xcursor" \
24       "Xdamage" \
25       "Xext" \
26       "Xfixes" \
27       "Xi" \
28       "Xinerama" \
29       "Xrandr" \
30       "Xrender" \
31       "Xtst" \
32       platform="linux"
33 +/
34 /*******************************************************************************
35  * Copyright (c) 2000, 2012 IBM Corporation and others.
36  * All rights reserved. This program and the accompanying materials
37  * are made available under the terms of the Eclipse Public License v1.0
38  * which accompanies this distribution, and is available at
39  * http://www.eclipse.org/legal/epl-v10.html
40  *
41  * Contributors:
42  *     IBM Corporation - initial API and implementation
43  * D Port:
44  *     alice <stigma@disroot.org>
45  *******************************************************************************/
46 module org.eclipse.swt.snippets.Snippet1;
47 
48 /*
49  * example snippet: Hello World
50  *
51  * For a list of all SWT example snippets see
52  * http://www.eclipse.org/swt/snippets/
53  */
54 import org.eclipse.swt.widgets.Display;
55 import org.eclipse.swt.widgets.Shell;
56 
57 void main(string[] args) {
58     Display display = new Display;
59     Shell shell = new Shell(display);
60     shell.open();
61     while (!shell.isDisposed()) {
62         if (!display.readAndDispatch()) display.sleep();
63     }
64     display.dispose();
65 }