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.

157 questions
0
votes
2 answers

Need another eventhandler (button pressed) Gtk2Hs

I want to add a function to my buttonNewWithLabel, so it reacts to the enter key is pressed and just not only the onClicked event. I cant find how but should there not be as easy as the onClicked? My code peice looks like this: grt <- labelNew…
user1501127
  • 865
  • 1
  • 18
  • 32
0
votes
1 answer

How can I use Haskell and GIO to read a file?

For example, here's a small piece of a program I'm writing using Haskell and gtk2hs: import System.GIO foreign import ccall safe "g_type_init" g_type_init :: IO () main :: IO () main = do g_type_init let file = fileFromParseName…
damien
  • 902
  • 1
  • 7
  • 12
0
votes
1 answer

GUI in haskell using gtk2hs and glade

I have created a GUI using gtk2hs and glade and then passed it to haskell code in the main::IO(). Then I have some coding for the windows say for labels, buttons and entry text. e.g., entry <- xmlGetWidget xml castToEntry…
0
votes
1 answer

How does EventM work in Gtk2Hs?

I have a little Haskell program that uses the Gtk2Hs bindings. One can draw points (small squares) on the program's window by clicking on a DrawingArea: [...] image <- builderGetObject gui castToDrawingArea "drawingarea" p <-…
Alfonso Villén
  • 373
  • 1
  • 9
-1
votes
1 answer

Error using affiche

Concerning the writing of a function in Haskell, using Gtk (via the package Gtk2Hs); here are my requirements: The function should have the signature: affiche :: ((Double,Double), (Double,Double)) -> IO Bool The parameters are noted (a0, a), (b0,…
lolveley
  • 1,659
  • 2
  • 18
  • 34
-1
votes
1 answer

Color change does not work

I try to change the color of the widget using the following code: widgetModifyBg w StateNormal (Color 0xffff 0xffff 0) It works on ubuntu, but not under Windows.
-2
votes
1 answer

gtk2hs: Couldn't match expected type ‘IO [Int]’ with actual type ‘[Int]’

everyone I want to get a list of numbers from GUI to do some changes by using gtk2hs, and return the result to GUI. However, it got lots of error. I'm a rookie of Haskell, could someone tell me how to fix it. Thanks!! import Graphics.UI.Gtk import…
user3470406
  • 35
  • 1
  • 2
  • 6
1 2 3
10
11