[Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Martin DeMello
Could someone give me an example of calling setWMHints from
Graphics.X11.Xlib.Extras? The signature is

setWMHints :: Display - Window - WMHints - IO Status

and WMHints is defined as

data WMHints = WMHints {
wmh_flags :: CLong
wmh_input :: Bool
wmh_initial_state :: CInt
wmh_icon_pixmap :: Pixmap
wmh_icon_window :: Window
wmh_icon_x :: CInt
wmh_icon_y :: CInt
wmh_icon_mask :: Pixmap
wmh_window_group :: XID
}

I can't figure out how to convert an Int to a CInt to construct the WMHints

martin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Neil Mitchell
Hi Martin,

  I can't figure out how to convert an Int to a CInt to construct the WMHints

Ask Hoogle:

http://haskell.org/hoogle/?q=Int+-%3E+CInt

And Hoogle says:

toEnum, fromIntegral

Thanks

Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Martin DeMello
On Wed, Jul 2, 2008 at 2:16 PM, Neil Mitchell [EMAIL PROTECTED] wrote:
 Hi Martin,

  I can't figure out how to convert an Int to a CInt to construct the WMHints

 Ask Hoogle:

 http://haskell.org/hoogle/?q=Int+-%3E+CInt

Nice

 And Hoogle says:

 toEnum, fromIntegral

thanks a lot :)

martin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe