Difference between revisions of "WxHaskell"

From HaskellWiki
Jump to navigation Jump to search
(Chaged the link for the wxFruit homepage, to point to the backup in the Wayback Machine)
(→‎News: Added move to GitHub)
(44 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
   
[[Category:User interfaces]]
 
   
 
[[Image:Wxhaskell-black-small.png|center]]
 
[[Image:Wxhaskell-black-small.png|center]]
Line 11: Line 10:
   
 
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 (ranked among the top 25 most active projects on sourceforge).
  +
  +
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 [http://wxpack.sourceforge.net 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)''.
   
 
== Status ==
 
== Status ==
   
Since the core interface is generated automatically from the [http://elj.sourceforge.net/projects/gui/ewxw/ wxEiffel] binding, about 90% of the wxWidgets functionality is already supported, excluding more "exotic" widgets like dockable windows. Most work is currently directed into writing a Haskellized version of the wxWidgets API. The library currently supports Windows, GTK (Linux) and MacOS X.
+
The core interface of wxHaskell was originally derived from the [http://elj.sourceforge.net/projects/gui/ewxw/ 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).
  +
* wxDirect parses specially written C headers and generates low level Haskell FFI bindings for the exported functions.
  +
* 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.
   
 
== News ==
 
== News ==
   
  +
; 10 June 2012: Repository now on GitHub: https://github.com/jodonoghue/wxHaskell
<dl>
 
  +
; 13 April 2012: wxHaskell 0.90 is released. This version supports wxWidgets >= 2.9.x, and includes many new features.
<dt>4 January 2009</dt>
 
  +
; 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.
<dd>wxHaskell 0.11.0 is [http://sourceforge.net/project/showfiles.php?group_id=73133 released]. See the [http://www.nabble.com/ANN:-wxHaskell-0.11.1-td21277376.html announcement] (indicates rev. 0.11.1, SourceForge has rev. 0.11.0)</dd>
 
  +
; 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
<dt>8 August 2008</dt>
 
 
; 4 January 2009 : wxHaskell 0.11.0 is [http://sourceforge.net/project/showfiles.php?group_id=73133 released]. See the [http://www.nabble.com/ANN:-wxHaskell-0.11.1-td21277376.html announcement] (indicates rev. 0.11.1, SourceForge has rev. 0.11.0)
<dd>Switched officail darcs repository to code.haskell.org (darcs get --partial http://code.haskell.org/wxhaskell). You can use previous darcs.haskell.org's darcs repository, too (darcs get http://darcs.haskell.org/wxhaskell).</dd>
+
; 8 August 2008 : Switched official darcs repository to code.haskell.org (<code>darcs get --partial http://code.haskell.org/wxhaskell</code>). You can use previous darcs.haskell.org's Darcs repository, too.
<dt>5 August 2008</dt>
 
<dd>Homepage (except for screenshots) now moved to Haskell wiki</dd>
+
; 5 August 2008 : Homepage (except for screenshots) now moved to Haskell wiki
 
; 23 March 2008 : wxHaskell 0.10.3 is [http://sourceforge.net/project/showfiles.php?group_id=73133&package_id=73173 released].
<dt>23 March 2008</dt>
 
 
; 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>).
<dd>wxHaskell 0.10.3 is [http://sourceforge.net/project/showfiles.php?group_id=73133&package_id=73173 released].</dd>
 
<dt>20 January 2007</dt><dd>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 (darcs get http://darcs.haskell.org/wxhaskell).</dd></dl>
 
   
 
== Documentation ==
 
== Documentation ==
   
 
* [http://wxhaskell.sourceforge.net/screenshots.html Screenshots]
 
* [http://wxhaskell.sourceforge.net/screenshots.html Screenshots]
** [http://wxhaskell.sourceforge.net/samples.html Samples]
+
** [http://wxhaskell.sourceforge.net/samples.html Samples] ( the links to the source code on that page are broken, but you can see the sources [http://code.haskell.org/wxhaskell/samples/ here] )
 
** [http://wxhaskell.sourceforge.net/applications.html Applications]
 
** [http://wxhaskell.sourceforge.net/applications.html Applications]
 
* [[/Documentation/|Using wxHaskell]]
 
* [[/Documentation/|Using wxHaskell]]
Line 41: Line 55:
 
** [[/Tips and tricks/]]
 
** [[/Tips and tricks/]]
 
* [[/Download/]]
 
* [[/Download/]]
*[[/Building/|Building and installing]]
+
* Building and installing. Please refer to your platform.
 
** [[/Linux/]]
 
** [[/Linux/]]
** [[/Cygwin/|Windows (cygwin)]]
+
** [[/Mac/]]
** [[/Windows/|Windows]]
+
** [[/Windows/]]
  +
** Additional information here. Please help migrating these parts to their appropriate platform.
** [[/MacOS X/]]
 
** [[/Troubleshooting/]]
+
*** [[/2.8/|wxWidgets 2.8.x]]
  +
*** [[/0.13/|wxHaskell 0.13 for wxWidgets 2.8.x]]
  +
*** [[/0.90/|wxHaskell 0.90 for wxWidgets 2.9.x]]
 
*[[/Development/]]
 
*[[/Development/]]
  +
** [[/Development/Environment |Working on wxHaskell]]
 
*[[/Contribute/]]
 
*[[/Contribute/]]
   
== Mailing lists ==
+
== Resources ==
  +
* [http://sourceforge.net/tracker/?group_id=73133 Bugtracker]
 
* [https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel The developer mailing list (wxhaskell-devel)] [http://sourceforge.net/mailarchive/forum.php?forum_name=wxhaskell-devel (archive)]
 
* [https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel The developer mailing list (wxhaskell-devel)] [http://sourceforge.net/mailarchive/forum.php?forum_name=wxhaskell-devel (archive)]
 
* [https://lists.sourceforge.net/lists/listinfo/wxhaskell-users The wxHaskell users mailing list (wxhaskell-users)] [http://sourceforge.net/mailarchive/forum.php?forum_name=wxhaskell-users (archive)]
 
* [https://lists.sourceforge.net/lists/listinfo/wxhaskell-users The wxHaskell users mailing list (wxhaskell-users)] [http://sourceforge.net/mailarchive/forum.php?forum_name=wxhaskell-users (archive)]
  +
* [https://github.com/jodonoghue/wxHaskell wxHaskell repository] on github
   
 
== External links ==
 
== External links ==
   
* Daan Leijen: [http://www.cs.uu.nl/~daan/download/papers/wxhaskell.pdf wxHaskell / A Portable and Concise GUI Library for Haskell] (pdf)
+
* Daan Leijen: [http://legacy.cs.uu.nl/daan/download/papers/wxhaskell.pdf wxHaskell / A Portable and Concise GUI Library for Haskell] (pdf)
 
* Wei Tan: [http://www.cse.unsw.edu.au/~cs4132/lecture/wlta543.pdf GUI programming with wxHaskell] (pdf)
 
* Wei Tan: [http://www.cse.unsw.edu.au/~cs4132/lecture/wlta543.pdf GUI programming with wxHaskell] (pdf)
* Koen Lindström Claessen: Graphical User Interfaces in Haskell], slides ([http://www.cs.chalmers.se/Cs/Grundutb/Kurser/afp/slides-GUI.pdf pdf], [http://www.cs.chalmers.se/Cs/Grundutb/Kurser/funht/lec-6a-GUI.ppt ppt])
+
* [http://www.cse.chalmers.se/edu/course/afp/lab1.html Assignment 1] part of the course [http://www.cse.chalmers.se/edu/course/afp/index.html Advanced Functional Programming], by [http://www.cs.chalmers.se/~koen/ Koen Lindström Claessen] and [http://www.cs.chalmers.se/~bringert/ Björn Bringert], a portal like page (html)
  +
* [http://en.wordpress.com/tag/wxhaskell/ Blog articles about wxHaskell]
* [http://www.cs.chalmers.se/Cs/Grundutb/Kurser/afp/2006/wxhaskell.html WxHaskell] part of the course [http://www.cs.chalmers.se/Cs/Grundutb/Kurser/afp/ Advanced Functional Programming], by [http://www.cs.chalmers.se/~koen/ Koen Lindström Claessen] and [http://www.cs.chalmers.se/~bringert/ Björn Bringert], a portal like page (html)
 
  +
* Sander Evers, Peter Achten, and Jan Kuper: [http://www.st.cs.ru.nl/papers/2005/eves2005-FFormsIFL04.pdf A Functional Programming Technique for Forms in GUI] (PDF)
  +
* [http://www.sandr.dds.nl/FunctionalForms/ FunctionalForms], a combinator library/domain specific language for wxHaskell which enables a very concise programming style for forms (not maintained since 2005)
   
 
== See also ==
 
== See also ==
   
  +
* [http://hackage.haskell.org/package/wxhnotepad An example of how to implement a basic notepad with wxHaskell]
  +
* [http://www.mail-archive.com/wxhaskell-users@lists.sourceforge.net/msg01178.html Reducing linking and startup times]
 
* [http://en.wikibooks.org/wiki/Haskell/GUI The Haskell wikibook GUI chapter]
 
* [http://en.wikibooks.org/wiki/Haskell/GUI The Haskell wikibook GUI chapter]
 
* [http://lindstroem.wordpress.com/2008/05/21/using-wxgeneric/ WxGeneric]
 
* [http://lindstroem.wordpress.com/2008/05/21/using-wxgeneric/ WxGeneric]
  +
* [[wxFruit]]
* [http://web.archive.org/web/20071224143245/http://zoo.cs.yale.edu/classes/cs490/03-04b/bartholomew.robinson/ WxFruit] (in the Web Archive)
 
 
* [http://www.haskell.org/jcp/hw05.pdf Can GUI Programming Be Liberated From The IO Monad]
 
* [http://www.haskell.org/jcp/hw05.pdf Can GUI Programming Be Liberated From The IO Monad]
* [[Phooey]]: a purely functional layer on top of WxHaskell
+
* [[Phooey]]: a purely functional layer on top of wxHaskell
* [[GuiTV]]: GUI-based tangible values & composable interfaces, on [[TV]], [[Phooey]] and WxHaskell.
+
* [[GuiTV]]: GUI-based tangible values & composable interfaces, on [[TV]], [[Phooey]] and wxHaskell.
  +
* [[wxAsteroids]]: a game demonstrating wxHaskell.
  +
* [[GeBoP]]: the General Boardgames Player, offers a set of board games: Ataxx, Bamp, Halma, Hez, Kram, Nim, Reversi, TicTacToe, and Zenix.
  +
* [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]]
  +
* [[Reactive-banana|reactive-banana]] - FRP library with bindings to wxHaskell.
  +
* [http://uu-computerscience.github.com/js-asteroids/ wxHaskell for the web]: a port of a subset of wxHaskell to the web browser.
   
  +
[[Category:Applications]]
 
 
[[Category:User interfaces]]
 
[[Category:Libraries]]
 
[[Category:wxHaskell]]
 
[[Category:wxHaskell]]
  +
[[Category:Packages]]

Revision as of 18:54, 24 December 2012


Wxhaskell-black-small.png

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 (ranked among the top 25 most active projects on sourceforge).

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).

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).

  • wxDirect parses specially written C headers and generates low level Haskell FFI bindings for the exported functions.
  • 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.

News

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.
5 January 2012
wxHaskell 0.13.2 is 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
4 January 2009
wxHaskell 0.11.0 is released. See the announcement (indicates rev. 0.11.1, SourceForge has rev. 0.11.0)
8 August 2008
Switched official darcs repository to code.haskell.org (darcs get --partial http://code.haskell.org/wxhaskell). You can use previous darcs.haskell.org's Darcs repository, too.
5 August 2008
Homepage (except for screenshots) now moved to Haskell wiki
23 March 2008
wxHaskell 0.10.3 is released.
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 (darcs get http://darcs.haskell.org/wxhaskell/).

Documentation

Resources

External links

See also