wxHaskell is therefore built on top of [http://www.wxwidgets.org wxWidgets] – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel, and it has a very active community (ranked among the top 25 most active projects on sourceforge).

+

wxHaskell is therefore built on top of [http://www.wxwidgets.org wxWidgets] – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel, and it has a very active community.

We maintain two branches of wxHaskell.

We maintain two branches of wxHaskell.

Line 33:

Line 33:

== News ==

== News ==

+

; 2 August 2013: A github organisation 'wxHaskell' has been created, the maintenance repo (https://github.com/atzedijkstra/wxHaskell) has moved to https://github.com/wxHaskell/wxHaskell. It is the intent to soon release a maintenance update working with wxWidgets 2.9.5 and GHC 7.6.x

+

; 26 January 2013: Maintenance is now done on the repository at: https://github.com/atzedijkstra/wxHaskell

; 10 June 2012: Repository now on GitHub: https://github.com/jodonoghue/wxHaskell

; 10 June 2012: Repository now on GitHub: https://github.com/jodonoghue/wxHaskell

; 13 April 2012: wxHaskell 0.90 is released. This version supports wxWidgets >= 2.9.x, and includes many new features.

; 13 April 2012: wxHaskell 0.90 is released. This version supports wxWidgets >= 2.9.x, and includes many new features.

−

; 5 January 2012: wxHaskell 0.13.2 is [http://comments.gmane.org/gmane.comp.lang.haskell.wxhaskell.general/1123 released]. Mainly bugfixes. This is the last version to support wxWidgets 2.8.x.

+

−

; 13 October 2009 : wxHaskell 0.12.1.2 is released. Since the previous new we have added support for XRC files (XML GUI design) and installation by Cabal

; 20 January 2007 : wxHaskell has a new set of maintainers, led by Jeremy O'Donoghue. We are working on a release for version 0.10, with Unicode support, a Cabalized build process and more. All recent development is taking place under a new Darcs repository (<code><nowiki>darcs get http://darcs.haskell.org/wxhaskell/</nowiki></code>).

* [https://github.com/HeinrichApfelmus/Haskell-BlackBoard/blob/master/README.md Haskell-BlackBoard:] a drawing application for making slideshows and videos, based on wxHaskell and [[Functional Reactive Programming]]

+

* [https://github.com/JohnLato/Haskell-BlackBoard/blob/master/README.md Haskell-BlackBoard:] a drawing application for making slideshows and videos, based on wxHaskell and [[Functional Reactive Programming]]

Revision as of 18:51, 17 September 2013

Contents

1 What is it?

wxHaskell is a portable and native GUI library for Haskell. The goal of the project is to provide an industrial strength GUI library for Haskell, but without the burden of developing (and
maintaining) one ourselves.

wxHaskell is therefore built on top of wxWidgets – a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with the native look-and-feel, and it has a very active community.

We maintain two branches of wxHaskell.

The 0.13 branch supports wxWidgets 2.8.x, and is the easiest to get working. Many Linux distributions come with packaged wxWidgets 2.8.x, and Windows users can download the pre-built wxPack distribution. This branch is in a maintenance mode, and will not receive significant new development.

The 0.90 branch supports wxWidgets 2.9.x. The downside of choosing this version is that you will likely need to build wxWidgets for yourself, which is slightly time consuming and requires you to have g++ installed on your system. The benefit is that it supports quite a number of new and more modern GUI elements. wxHaskell 0.90 is essential if you want to build for 64bit MacOS X targets (e.g. Lion).

2 Status

The core interface of wxHaskell was originally derived from the wxEiffel binding. Work on this has been dormant for several years, but the wxHaskell maintainers now support updates to the wxWidgets API themselves - we generally respond to new releases of wxWidgets within a few weeks at most.

There are four key components of wxHaskell from version 0.90 onwards (three in earlier branches).

wxc is a C language binding for wxWidgets. It is needed because the Haskell FFI can only bind to C as it does not understand C++ name mangling. Because it is a C language wrapper over wxWidgets, and is generated as a standard dynamic library on all supported platforms, wxc could be used as the basis for a wxWidgets wrapper for any language which supports linking to C (so that would be all of them then). In older versions of wxHaskell, the wxc components were built as a monolithic static library with wxcore.

wxcore is a set of low-level Haskell bindings to wxc. A large part is generated automatically by wxdirect, with some key abstractions being hand-coded in Haskell. You can program directly to the wxcore interface if you wish (it is sometimes the only way, in fact).

wx is a set of higher-level wrappers over wxcore. It is intended to make it easier to write reasonably idiomatic Haskell. Most wxHaskell software is about 80% wx and 20% wxcore (at least in my experience).

The C wrapper is, unfortunately, generated by hand, so there is some (mainly tedious boilerplate) work involved in porting a new set of widgets to wxHaskell. Some work has been done into automating this aspect, but we are far from being able to replicate the approach reliably over then entire API as yet.

From the perspective of the user (rather than the developer) about 90% of the core wxWidgets functionality is already supported, excluding more "exotic" widgets like dockable windows. The library supports Windows, GTK (Linux) and MacOS X.