Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-widget-toolkit/dwt
A library for creating cross-platform GUI applications.
https://github.com/d-widget-toolkit/dwt
Last synced: about 1 hour ago
JSON representation
A library for creating cross-platform GUI applications.
- Host: GitHub
- URL: https://github.com/d-widget-toolkit/dwt
- Owner: d-widget-toolkit
- Created: 2011-10-16T15:19:18.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2023-09-19T11:28:36.000Z (about 1 year ago)
- Last Synced: 2024-08-05T01:11:15.678Z (4 months ago)
- Language: D
- Homepage:
- Size: 3.41 MB
- Stars: 141
- Watchers: 20
- Forks: 33
- Open Issues: 15
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
- awesome-d - DWT - A library for creating cross-platform GUI applications. GWT is a port of the Java SWT library to D. DWT was promoted as a semi-standard GUI library for D, but unfortunately didn't catch up popularity yet. (GUI Libs / XML)
README
## DWT - D Widget Toolkit
DWT is a library for creating cross-platform GUI applications.
It's a port of the [SWT](http://www.eclipse.org/swt) Java library from Eclipse.
Current supported platforms are Windows, using Win32 and Linux, using GTK.## Usage
1. Install all the [requirements](#requirements)
1. Enter the following code in a file called `main.d`:```d
/+
dub.sdl:
name "main"
dependency "dwt" version="~>1.0.0"
libs \
"atk-1.0" \
"cairo" \
"dl" \
"fontconfig" \
"gdk-x11-2.0" \
"gdk_pixbuf-2.0" \
"glib-2.0" \
"gmodule-2.0" \
"gnomeui-2" \
"gnomevfs-2" \
"gobject-2.0" \
"gthread-2.0" \
"gtk-x11-2.0" \
"pango-1.0" \
"pangocairo-1.0" \
"X11" \
"Xcomposite" \
"Xcursor" \
"Xdamage" \
"Xext" \
"Xfixes" \
"Xi" \
"Xinerama" \
"Xrandr" \
"Xrender" \
"Xtst" \
platform="linux"
+/
module main;import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;void main ()
{
auto display = new Display;
auto shell = new Shell;
shell.open();while (!shell.isDisposed)
if (!display.readAndDispatch())
display.sleep();display.dispose();
}
```1. Build and run by running: `dub --single main.d`
## Build all the Snippets
```
$ dub --single tools/build_snippets.d
```## Documentation
For documentation, see any existing documentation or examples for SWT. See also
the [snippets](org.eclipse.swt.snippets/src/org/eclipse/swt/snippets) which
contains a bunch of the official SWT snippets ported to D.### Windows
All required files are included in the repository.
### Linux
For Ubuntu, use the packages below. For other systems use the corresponding
packages available in the system package manager.* libcairo2-dev
* libglib2.0-dev
* libgnomeui-dev
* libgtk2.0-dev
* libpango1.0-dev
* libxcomposite-dev
* libxcursor-dev
* libxdamage-dev
* libxfixes-dev
* libxi-dev
* libxinerama-dev
* libxrandr-dev
* libxtst-dev