Giter VIP home page Giter VIP logo

dwt's Introduction

DWT - D Widget Toolkit

DWT is a library for creating cross-platform GUI applications. It's a port of the SWT Java library from Eclipse. Current supported platforms are Windows, using Win32 and Linux, using GTK.

Usage

  1. Install all the requirements

  2. Enter the following code in a file called main.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();
    }
  3. 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 which contains a bunch of the official SWT snippets ported to D.

Requirements

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

dwt's People

Contributors

boriscarvajal avatar jacob-carlborg avatar john-colvin avatar kntroh avatar libram avatar summer-alice avatar trikko avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.