GtkD
Encyclopedia
In computer programming
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...

, GtkD is a language binding
Language binding
In computing, a binding from a programming language to a library or OS service is an API providing that service in the language.Many software libraries are written in systems programming languages such as C or C++...

 of the GTK+
GTK+
GTK+ is a cross-platform widget toolkit for creating graphical user interfaces. It is licensed under the terms of the GNU LGPL, allowing both free and proprietary software to use it. It is one of the most popular toolkits for the X Window System, along with Qt.The name GTK+ originates from GTK;...

 widget toolkit for the D programming language. As of 2011, the latest version is 1.4.1 which wraps GTK+ 2.20. It is compatible with both D 1.0 and D 2.0, either with the Phobos or the Tango system library.

Example

Hello world in D with GtkD:


import gtk.MainWindow;
import gtk.Label;
import gtk.Main;

void main(string[] args) {
Main.init(args);
MainWindow win = new MainWindow("Hello world!");
win.setDefaultSize(250, 150);
win.add(new Label("Hello world!"));
win.showAll;

Main.run;
}

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK