From: Axel S. <as...@us...> - 2004-12-12 12:45:29
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/pango In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1863/gtk/pango Modified Files: Description.chs PangoTypes.chs.pp Rendering.chs Log Message: Make the newly added bits on font handling compile. Index: Description.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/Description.chs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Description.chs 12 Dec 2004 11:18:41 -0000 1.1 +++ Description.chs 12 Dec 2004 12:45:19 -0000 1.2 @@ -1,3 +1,4 @@ +-- -*-haskell-*- -- GIMP Toolkit (GTK) - text layout functions: Font Descriptions -- -- Author : Axel Simon @@ -106,12 +107,12 @@ -- * Most fonts will have either a 'StyleItalic' or 'StyleQblique' -- but rarely both. -- -fontDescriptionSetStyle :: FontDescription -> Style -> IO () +fontDescriptionSetStyle :: FontDescription -> FontStyle -> IO () fontDescriptionSetStyle fd p = {#call unsafe set_style#} fd (fromIntegral (fromEnum p)) -- | Get the style field. -fontDescriptionGetStyle :: FontDescription -> IO (Maybe Style) +fontDescriptionGetStyle :: FontDescription -> IO (Maybe FontStyle) fontDescriptionGetStyle fd = do fields <- {#call unsafe get_set_fields#} fd if (fromEnum PangoFontMaskStyle) .&. (fromIntegral fields) /=0 @@ -243,7 +244,7 @@ strPtr <- {#call unsafe to_string#} fd str <- peekUTFString strPtr {#call unsafe g_free#} (castPtr strPtr) - return strPtr + return str Index: PangoTypes.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/PangoTypes.chs.pp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- PangoTypes.chs.pp 12 Dec 2004 11:18:41 -0000 1.2 +++ PangoTypes.chs.pp 12 Dec 2004 12:45:19 -0000 1.3 @@ -1,3 +1,4 @@ +-- -*-haskell-*- -- GIMP Toolkit (GTK) - pango non-GObject types PangoTypes -- -- Author : Axel Simon @@ -151,5 +152,5 @@ emptyLanguage = Language nullPtr languageFromString :: String -> IO Language -languageFromString language = +languageFromString language = liftM Language $ withUTFString language {#call language_from_string#} Index: Rendering.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/pango/Rendering.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Rendering.chs 12 Dec 2004 11:18:41 -0000 1.4 +++ Rendering.chs 12 Dec 2004 12:45:19 -0000 1.5 @@ -1,3 +1,4 @@ +-- -*-haskell-*- -- GIMP Toolkit (GTK) - text layout functions Rendering -- -- Author : Axel Simon @@ -156,7 +157,7 @@ -- | Set the default 'Language' of this context. -- contextSetLanguage :: PangoContext -> Language -> IO () -contextSetLanguage pc (Language l) = {#call unsafe context_set_language#} pc l +contextSetLanguage = {#call unsafe context_set_language#} -- | Get the current 'Language' of this context. -- |