Personal tools

WxHaskell

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(News: Moved news older than a year to the page "WxHaskell/Old wxHaskell news")
(News: wxHaskell 0.91.0 is released)
 
(18 intermediate revisions by 3 users not shown)
Line 3: Line 3:
   
 
[[Image:Wxhaskell-black-small.png|center]]
 
[[Image:Wxhaskell-black-small.png|center]]
+
<br>
 
== What is it? ==
 
== What is it? ==
   
Line 9: Line 9:
 
maintaining) one ourselves.
 
maintaining) one ourselves.
   
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.
   
 
We maintain two branches of wxHaskell.
 
We maintain two branches of wxHaskell.
Line 19: Line 19:
 
== Status ==
 
== Status ==
   
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.
+
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.
   
 
There are four key components of wxHaskell from version 0.90 onwards (three in earlier branches).
 
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.
+
* 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.
 
* 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).
 
* 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).
+
* 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.
   
 
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.
 
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.
Line 33: Line 33:
 
== News ==
 
== News ==
   
  +
; 12 August 2014: wxHaskell 0.91.0 is released. This version accepts wxWidgets 2.9 and 3.0.
  +
; 21 March 2014: wxHaskell 0.90.1 is released.
  +
; 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
 
; 26 January 2013: Maintenance is now done on the repository at: https://github.com/atzedijkstra/wxHaskell
: This repository will be merged back at some point with the repository mentioned below.
 
 
; 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.
Line 51: Line 53:
 
** [[/Short guide/]]
 
** [[/Short guide/]]
 
** [[/Tips and tricks/]]
 
** [[/Tips and tricks/]]
  +
** [http://www.geocities.jp/nahcooo10/wx/doc-index.html Index] of the wx API documentation
  +
** [http://www.geocities.jp/nahcooo10/wxcore/doc-index.html Index] of the wxcore API documentation
 
* [[/Download/]]
 
* [[/Download/]]
 
* Building and installing. Please refer to your platform.
 
* Building and installing. Please refer to your platform.
Line 60: Line 64:
 
*** [[/0.13/|wxHaskell 0.13 for wxWidgets 2.8.x]]
 
*** [[/0.13/|wxHaskell 0.13 for wxWidgets 2.8.x]]
 
*** [[/0.90/|wxHaskell 0.90 for wxWidgets 2.9.x]]
 
*** [[/0.90/|wxHaskell 0.90 for wxWidgets 2.9.x]]
  +
*** [[WxHaskell/Building]]
 
*[[/Development/]]
 
*[[/Development/]]
 
** [[/Development/Environment |Working on wxHaskell]]
 
** [[/Development/Environment |Working on wxHaskell]]
Line 65: Line 70:
   
 
== Resources ==
 
== Resources ==
* [http://sourceforge.net/tracker/?group_id=73133 Bugtracker]
+
* [http://sourceforge.net/p/wxhaskell/_list/tickets Tickets for bugs and feature requests]
 
* [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
+
* [https://github.com/wxHaskell/wxHaskell wxHaskell repository], as of 2 Aug 2013 replacing the old repo [https://github.com/jodonoghue/wxHaskell] and temporary maintenance repo [https://github.com/atzedijkstra/wxHaskell] on github
   
 
== External links ==
 
== External links ==
Line 74: Line 79:
 
* Daan Leijen: [http://legacy.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)
* [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://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.cse.chalmers.se/~koen/ Koen Lindström Claessen] and [http://www.cse.chalmers.se/alumni/bringert/ Björn Bringert], a portal like page (html)
 
* [http://en.wordpress.com/tag/wxhaskell/ Blog articles about wxHaskell]
 
* [http://en.wordpress.com/tag/wxhaskell/ Blog articles about wxHaskell]
 
* [http://stackoverflow.com/questions/tagged/wxhaskell Questions about wxHaskell] on stackoverflow
 
* [http://stackoverflow.com/questions/tagged/wxhaskell Questions about wxHaskell] on stackoverflow
 
* 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)
 
* 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)
 
* [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)
  +
* [http://wewantarock.wordpress.com/2010/01/31/building-a-text-editor-part-1/ Learning by Example Beginners]: a Text Editor
  +
* [http://wewantarock.wordpress.com/2010/01/07/custom-controls-in-wxhaskell-part-1/ Learning by Example Intermediate]: Custom controls
   
 
== See also ==
 
== See also ==
Line 89: Line 96:
 
* [http://lindstroem.wordpress.com/2008/05/21/using-wxgeneric/ WxGeneric]
 
* [http://lindstroem.wordpress.com/2008/05/21/using-wxgeneric/ WxGeneric]
 
* [[wxFruit]]
 
* [[wxFruit]]
* [http://www.haskell.org/jcp/hw05.pdf Can GUI Programming Be Liberated From The IO Monad]
+
* [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.167.3926&rep=rep1&type=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.
 
* [[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.
 
* [[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]]
+
* [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]]
 
* [[Reactive-banana|reactive-banana]] - FRP library with bindings to wxHaskell.
 
* [[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.
 
* [http://uu-computerscience.github.com/js-asteroids/ wxHaskell for the web]: a port of a subset of wxHaskell to the web browser.
  +
* [http://stackoverflow.com/questions/15867654/wx-haskell-drag-and-drop-example wxHaskell Drag and Drop example] (Stackoverflow)
  +
* The package [http://hackage.haskell.org/package/binding-wx binding-wx]; binds mutable data and lists to WxHaskell widgets.
   
   

Latest revision as of 16:39, 12 August 2014


Wxhaskell-black-small.png


Contents

[edit] 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.

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

[edit] 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.

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.

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.

[edit] 3 News

12 August 2014
wxHaskell 0.91.0 is released. This version accepts wxWidgets 2.9 and 3.0.
21 March 2014
wxHaskell 0.90.1 is released.
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
13 April 2012
wxHaskell 0.90 is released. This version supports wxWidgets >= 2.9.x, and includes many new features.

See also Old wxHaskell news

[edit] 4 Documentation

[edit] 5 Resources

[edit] 6 External links

[edit] 7 See also