Questions tagged [gtk2hs]

Gtk2Hs is a GUI library for Haskell based on Gtk+. Gtk+ is an extensive and mature multi-platform toolkit for creating graphical user interfaces.

Gtk2Hs is a GUI library for Haskell based on Gtk+. Gtk+ is an extensive and mature multi-platform toolkit for creating graphical user interfaces.

Gtk2Hs features:

  • Automatic memory management.
  • Nearly complete coverage of the Gtk+ API.
  • Unicode support.
  • Extensive reference documentation.
  • Support for Linux, Windows, MacOS X and Unix platforms.
  • Support for several related GtK+ and Gnome modules:
    • the Glade visual user interface builder.
    • the cairo vector graphics library.
    • rendering of SVG images using cairo (via librsvg)
    • the Gtk+ OpenGL extension.
    • GConf for storing application preferences.
    • SourceView, an editor widget with syntax highlighting.
    • the Mozilla browser rendering engine in a Gtk+ widget
  • An implementation of the Graphics.SOE API.

Gtk+ and Gtk2Hs are Free software liscenced under the GNU LGPL.

154 questions
20
votes
4 answers

What are the relative merits of wxHaskell and Gtk2HS?

Which is better for developing GUI applications with Haskell, wxWidgets (via wxHaskell) or GTK (via Gtk2HS)? What are the pros and cons of each? Does it vary depending on which platform you are targeting (I would primarily be working on OS X but…
Dan Dyer
  • 51,823
  • 16
  • 125
  • 165
16
votes
1 answer

How to upgrade gtk2hsC2hs?

I am trying cabal install glib-0.12.3 under my Ubuntu 11.10 using cabal-install 0.10.2. However, it shows the following error messages: setup: The program gtk2hsC2hs version >=0.13.5 is required but the version found at /usr/bin/gtk2hsC2hs is…
zw324
  • 25,032
  • 15
  • 79
  • 112
11
votes
1 answer

How to package a haskell gtk2hs glade application on windows?

I made a little GUI app with gtk2hs, Glade and Haskell. It runs fine on Windows XP, but users need to install GTK+, gtk2hs (it asks for libglade-2.0.0.dll) and GHC (as it's a gtk2hs dependency) in order to run it. I'm a Windows n00b myself, but how…
user639556
  • 171
  • 4
11
votes
1 answer

How to deal with application state in Gtk2Hs

Trying to learn to write applications with Gtk2Hs I'm getting difficulties bridging the gap between the event driven Gtk2HS and the persistent state of my model. So to simplify, lets say that I have this simple application module Main where import…
tonicebrian
  • 4,555
  • 5
  • 37
  • 59
10
votes
1 answer

What is the right way to render Cairo updates in Gtk2hs?

I'm writing a Haskell program with click-and-drag functionality, so with each mouse movement event an update gets painted to the window. At the moment I'm using renderWithDrawable myCanvas update However this is flickering a lot. My understanding…
Paul Johnson
  • 16,435
  • 3
  • 38
  • 54
10
votes
2 answers

GTK2HS fails to install with recent cabal versions

I'm starting a new project that will hopefully use gtk2hs. However, I can not get this package to install on my fairly typical Linux box. Here is the failure : [1 of 2] Compiling SetupWrapper (…
Paul R
  • 737
  • 4
  • 13
8
votes
1 answer

How to pass state between event handlers in gtk2hs

I'm trying to make a toy application, just to get my head around how to write event driven programs in Haskell. What I'm trying to do is draw a line to a canvas which moves forward every time a key is pressed (so it's sort of a primordial cursor in…
Gareth Charnock
  • 1,106
  • 7
  • 16
7
votes
2 answers

Gtk Terminal Widget

Simple question: Is there a linux-style terminal widget for GTK? Preferably for Haskell, too, as I want to use gtk2hs
Lanbo
  • 13,437
  • 14
  • 67
  • 141
7
votes
2 answers

How can I make a graphical command line in haskell/gtk2hs?

I'm trying to create my first "real program" in haskell (something that solves integrals if polynomials) but I'm completely stumped with this part of it: I want to make something very simple a bit like GHCi: > user input program output > user…
quanta
  • 403
  • 1
  • 3
  • 10
7
votes
1 answer

Can't use a glade xml file with haskell

I'm not sure if I should say hi or not, being this my first post here. Anyway, I am following the glade tutorial from the gtk2hs website. The code compiled properly but when I try to execute it I get this error. (hellogtk2hs:8670): libglade-WARNING…
tokoro
  • 361
  • 1
  • 9
6
votes
1 answer

Custom implementation for Widget class in gtkhs

Gtk2hs has various widget datatypes that implements Widget class. Is it possible to write custom datatype which does the same? Say I want to have widget for displaying and running Lua code like this. data LuaWidget = LuaWidget { text :: TextView,…
Tener
  • 5,191
  • 4
  • 23
  • 42
6
votes
1 answer

gtk window stops updating, even though application appears to be running otherwise

I maintain a gtk3 (though a mixture of gtk2hs and gi-gtk) application that serves as a standalone status bar for tiling window managers called taffybar. Taffybar has a long standing bug where something happens that causes one of its windows (it can…
imalison
  • 195
  • 1
  • 8
6
votes
1 answer

Running a function when user stops entering text

I am writing a small GUI application using Haskell's gtk2hs library and am currently working with the multiline text boxes within it. I have a function which I want to run when the user makes changes to the text within the text box, but don't want…
Craig Innes
  • 1,503
  • 11
  • 20
5
votes
1 answer

Installing gtk2hs

I've installed gtk2hs-buildtools with no problem, but here's the output when I try to install gtk using 'cabal install gtk': [gautam@gautam ~]$ cabal install gtk Resolving dependencies... [1 of 2] Compiling SetupWrapper (…
Gautam
  • 1,508
  • 4
  • 17
  • 26
5
votes
1 answer

Structuring Haskell (gtk2hs) GUI's

I'm trying to build medium sized GUI with Gtk2Hs and I'm not all that sure what would be the best way to structure the system. I'm looking for a way to develop subcomponents in isolation and in general to end up with a structure that doesn't leave…
aleator
  • 4,346
  • 18
  • 31
1
2 3
10 11