packages feed

pango 0.11.0 → 0.11.1

raw patch · 16 files changed

+821/−25 lines, 16 filesdep +mtldep ~cairodep ~glib

Dependencies added: mtl

Dependency ranges changed: cairo, glib

Files

+ Graphics/Rendering/Pango.chs view
@@ -0,0 +1,84 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  Pango - a library for typesetting Unicode text+--+--  Author : Axel Simon+--+--  Copyright (C) 2001-2010 Axel Simon+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- Pango is a library for laying out and rendering of text, with an emphasis+-- on internationalization. Pango can be used anywhere that text layout is+-- needed, though most of the work on Pango so far has been done in the+-- context of the GTK+ widget toolkit. Pango forms the core of text and font+-- handling for GTK+-2.x.+--  +-- Pango is designed to be modular; the core Pango layout engine can be used+-- with different font backends. There are three basic backends:+--  +-- * Client side fonts using the FreeType and fontconfig libraries.+--+-- * Native fonts on Microsoft Windows using Uniscribe for complex-text handling.+--+-- * Native fonts on MacOS X using ATSUI for complex-text handling.+--+-- The integration of Pango+-- with < http://cairographics.org > provides a complete solution with+-- high quality text handling and graphics rendering.+--  +-- Dynamically loaded modules then handle text layout for particular+-- combinations of script and font backend. Pango ships with a wide selection+-- of modules, including modules for Hebrew, Arabic, Hangul, Thai, and a+-- number of Indic scripts. Virtually all of the world's major scripts are+-- supported.+--  +-- As well as the low level layout rendering routines, Pango includes+-- 'PangoLayout', a high level driver for laying out entire blocks of text, and+-- routines to assist in editing internationalized text.+--  +-- Pango depends on 2.x series of the GLib library.+--+-- This module only re-exports the parts of the Pango library that are relevant for+-- text rendering (as opposed to integration with other libraries).+--+module Graphics.Rendering.Pango (+  module Graphics.Rendering.Pango.Context,+  module Graphics.Rendering.Pango.Layout,+  module Graphics.Rendering.Pango.Rendering,+  module Graphics.Rendering.Pango.Markup,+  module Graphics.Rendering.Pango.Font,+  module Graphics.Rendering.Pango.Enums,+  module Graphics.Rendering.Pango.Cairo,+  ) where++import Graphics.Rendering.Pango.Font+import Graphics.Rendering.Pango.Enums hiding (+  Markup,+  Language,+  emptyLanguage,+  languageFromString,+  )+import Graphics.Rendering.Pango.Context+import Graphics.Rendering.Pango.Layout hiding (+  PangoRectangle(..),+#if PANGO_VERSION_CHECK(1,6,0)+  EllipsizeMode(..),+#endif+  )+import Graphics.Rendering.Pango.Rendering+import Graphics.Rendering.Pango.Markup+import Graphics.Rendering.Pango.Cairo
Graphics/Rendering/Pango/Attributes.chs view
@@ -146,7 +146,7 @@   {#call unsafe attr_gravity_hint_new#} (fromIntegral (fromEnum g)) #endif --- | Parse the marked-up text (see 'Graphics.UI.Gtk.Pango.Markup.Markup'+-- | Parse the marked-up text (see 'Graphics.Rendering.Pango.Markup.Markup' -- format) to create a plain-text string and an attribute list. -- -- * The attribute list is a list of lists of attribute. Each list describes
Graphics/Rendering/Pango/BasicTypes.chs view
@@ -127,12 +127,17 @@ {#enum Weight {underscoreToCase} deriving (Eq)#}  instance Show Weight where+  showsPrec _ WeightThin	= shows "thin"   showsPrec _ WeightUltralight	= shows "ultralight"   showsPrec _ WeightLight	= shows "light"+  showsPrec _ WeightBook	= shows "book"   showsPrec _ WeightNormal	= shows "normal"+  showsPrec _ WeightMedium	= shows "medium"+  showsPrec _ WeightSemibold	= shows "semibold"   showsPrec _ WeightBold	= shows "bold"   showsPrec _ WeightUltrabold 	= shows "ultrabold"   showsPrec _ WeightHeavy	= shows "heavy"+  showsPrec _ WeightUltraheavy	= shows "ultraheavy"  -- | The variant of a font. --
+ Graphics/Rendering/Pango/Cairo.chs view
@@ -0,0 +1,289 @@+{-# LANGUAGE CPP #-}+-- -*-haskell-*-+--  GIMP Toolkit (GTK) Cair Pango integration+--+--  Author : Duncan Coutts, Axel Simon+--+--  Created: 17 August 2005+--+--  Copyright (C) 2005 Duncan Coutts+--+--  This library is free software; you can redistribute it and/or+--  modify it under the terms of the GNU Lesser General Public+--  License as published by the Free Software Foundation; either+--  version 2.1 of the License, or (at your option) any later version.+--+--  This library is distributed in the hope that it will be useful,+--  but WITHOUT ANY WARRANTY; without even the implied warranty of+--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+--  Lesser General Public License for more details.+--+-- |+-- Maintainer  : gtk2hs-users@lists.sourceforge.net+-- Stability   : provisional+-- Portability : portable (depends on GHC)+--+-- +-- Pango specific functions to for redering with Cairo.+--+-- Cairo is a graphics library that supports vector graphics and image+-- compositing that can be used with Pango. The functions in this module provide+-- ways of rendering text in Cairo using Pango.+--+module Graphics.Rendering.Pango.Cairo (+  -- * Global Cairo settings.+  cairoFontMapGetDefault,+  cairoFontMapSetResolution,+  cairoFontMapGetResolution,+  cairoCreateContext,+  cairoContextSetResolution,+  cairoContextGetResolution,+  cairoContextSetFontOptions,+  cairoContextGetFontOptions,+  -- * Functions for the 'Render' monad.+  setSourceColor,+  updateContext,+  createLayout,+  updateLayout,+  showGlyphString,+  showLayoutLine,+  showLayout,+  glyphStringPath,+  layoutLinePath,+  layoutPath+  ) where++import Control.Exception    (bracket)++import System.Glib.FFI+import System.Glib.GObject		(constructNewGObject, makeNewGObject,+  objectRef, objectUnref)+{#import Graphics.Rendering.Pango.Types#}+{#import Graphics.Rendering.Pango.BasicTypes#}+import Graphics.Rendering.Pango.Structs ( pangoItemGetFont, Color(..) )+{#import Graphics.Rendering.Pango.Layout#} ( layoutSetText )+import Data.IORef++{#import Graphics.Rendering.Cairo.Types#} as Cairo+import qualified Graphics.Rendering.Cairo.Internal as Cairo.Internal+import qualified Graphics.Rendering.Cairo as Cairo+import Graphics.Rendering.Cairo.Internal (Render(Render))+import Control.Monad.Reader++{# context lib="gdk" prefix="gdk" #}++--------------------+-- Methods++-- | Sets the specified 'Color' as the source color of the 'Render' context.+--+setSourceColor :: Color -> Render ()+setSourceColor (Color red green blue) =+  Cairo.setSourceRGB+    (realToFrac red   / 65535.0)+    (realToFrac green / 65535.0)+    (realToFrac blue  / 65535.0)++-- cairo_font_map_new cannot be bound due to incorrect memory management+-- in functions like font_map_list_families that create new structures+-- that store the font map without referencing them++-- | Retrieve the default 'Graphics.Rendering.Pango.FontMap' that contains a+--   list of available fonts.+--+-- * One purpose of creating an explicit+--  'Graphics.Rendering.Pango.Font.FontMap' is to set+--   a different scaling factor between font sizes (in points, pt) and+--   Cairo units (in pixels). The default is 96dpi (dots per inch) which+--   corresponds to an average screen as output medium. A 10pt font will+--   therefore scale to+--   @10pt * (1\/72 pt\/inch) * (96 pixel\/inch) = 13.3 pixel@.+--+cairoFontMapGetDefault :: IO FontMap+cairoFontMapGetDefault = +  makeNewGObject mkFontMap $ {#call unsafe pango_cairo_font_map_get_default#}++-- | Set the scaling factor between font size and Cairo units.+--+-- * Value is in dots per inch (dpi). See 'cairoFontMapGetDefault'.+--+cairoFontMapSetResolution :: FontMap -> Double -> IO ()+cairoFontMapSetResolution (FontMap fm) dpi =+  withForeignPtr fm $ \fmPtr ->+  {#call unsafe pango_cairo_font_map_set_resolution#}+    (castPtr fmPtr) (realToFrac dpi)++-- | Ask for the scaling factor between font size and Cairo units.+--+-- * Value is in dots per inch (dpi). See 'cairoFontMapGetDefault'.+--+cairoFontMapGetResolution :: FontMap -> IO Double+cairoFontMapGetResolution (FontMap fm) = liftM realToFrac $+  withForeignPtr fm $ \fmPtr ->+  {#call unsafe pango_cairo_font_map_get_resolution#} (castPtr fmPtr)++-- | Create a 'PangoContext'.+--+-- * If no 'FontMap' is specified, it uses the default 'FontMap' that+--   has a scaling factor of 96 dpi. See 'cairoFontMapGetDefault'.+--+cairoCreateContext :: Maybe FontMap -> IO PangoContext+cairoCreateContext (Just (FontMap fm)) = constructNewGObject mkPangoContext $+  withForeignPtr fm $ \fmPtr -> -- PangoCairoFontMap /= PangoFontMap+  {#call unsafe pango_cairo_font_map_create_context#} (castPtr fmPtr)+cairoCreateContext Nothing = do+  fmPtr <- {#call unsafe pango_cairo_font_map_get_default#}+  constructNewGObject mkPangoContext $+    {#call unsafe pango_cairo_font_map_create_context#} (castPtr fmPtr)++-- | Set the scaling factor of the 'PangoContext'.+--+-- * Supplying zero or a negative value will result in the resolution value+--   of the underlying 'FontMap' to be used. See also 'cairoFontMapGetDefault'.+--+cairoContextSetResolution :: PangoContext -> Double -> IO ()+cairoContextSetResolution pc dpi =+  {#call unsafe pango_cairo_context_set_resolution#} pc (realToFrac dpi)++-- | Ask for the scaling factor of the 'PangoContext'.+--+-- * A negative value will be returned if no resolution has been set.+--   See 'cairoContextSetResolution'.+--+cairoContextGetResolution :: PangoContext -> IO Double+cairoContextGetResolution pc = liftM realToFrac $+  {#call unsafe pango_cairo_context_get_resolution#} pc++-- | Set Cairo font options.+--+-- * Apply the given font options to the context. Values set through this+--   functions override those that are set by 'updateContext'.+--+cairoContextSetFontOptions :: PangoContext -> FontOptions -> IO ()+cairoContextSetFontOptions pc fo =+  {#call unsafe pango_cairo_context_set_font_options#} pc fo++-- | Reset Cairo font options.+--+cairoContextResetFontOptions :: PangoContext -> IO ()+cairoContextResetFontOptions pc =+  {#call unsafe pango_cairo_context_set_font_options#} pc+    (Cairo.Internal.FontOptions nullForeignPtr)++-- | Retrieve Cairo font options.+--+cairoContextGetFontOptions :: PangoContext -> IO FontOptions+cairoContextGetFontOptions pc = do+  foPtr <- {#call unsafe pango_cairo_context_get_font_options#} pc+  Cairo.Internal.mkFontOptions foPtr++-- | Update a 'PangoContext' with respect to changes in a 'Render'+--   environment.+--+--  * The 'PangoContext' must have been created with+--    'cairoCreateContext'. Any 'PangoLayout's that have been+--    previously created with this context have to be update using+--    'Graphics.Rendering.Pango.Layout.layoutContextChanged'.+--+updateContext :: PangoContext -> Render ()+updateContext pc =  Render $ do+  cr <- ask+  liftIO $ {# call unsafe pango_cairo_update_context #} cr pc++-- | Create a 'PangoLayout' within a 'Render' context.+--+-- * This is a convenience function that creates a new 'PangoContext'+--   within this 'Render' context and creates a new 'PangoLayout'.+--   If the transformation or target surface of the 'Render' context+--   change, 'updateLayout' has to be called on this layout.+--+createLayout :: String -> Render PangoLayout+createLayout text = Render $ do+  cr <- ask+  liftIO $ do+    layRaw <- constructNewGObject mkPangoLayoutRaw $+	      {#call unsafe pango_cairo_create_layout#} cr+    textRef <- newIORef undefined+    let pl = (PangoLayout textRef layRaw)+    layoutSetText pl text+    return pl++-- | Propagate changed to the 'Render' context to a 'PangoLayout'.+--+-- * This is a convenience function that calls 'updateContext' on the+--   (private) 'PangoContext' of the given layout to propagate changes+--   from the 'Render' context to the 'PangoContext' and then calls+--   'Graphics.Rendering.Pango.Layout.layoutContextChanged' on the layout.+--   This function is necessary for+--   'createLayout' since a private 'PangoContext' is created that is+--   not visible to the user.+--+updateLayout :: PangoLayout -> Render ()+updateLayout (PangoLayout _ lay) = Render $ do+  cr <- ask+  liftIO $ {#call unsafe pango_cairo_update_layout#} cr lay++-- | Draw a glyph string.+--+-- * The origin of the glyphs (the left edge of the baseline) will be drawn+--   at the current point of the cairo context.+--+showGlyphString :: GlyphItem -> Render ()+showGlyphString (GlyphItem pi gs) = Render $ do+  cr <- ask+  font <- liftIO $ pangoItemGetFont pi+  liftIO $ {#call unsafe pango_cairo_show_glyph_string#} cr font gs++-- | Draw a 'LayoutLine'.+--+-- * The origin of the glyphs (the left edge of the baseline) will be drawn+--   at the current point of the cairo context.+--+showLayoutLine :: LayoutLine -> Render ()+showLayoutLine (LayoutLine _ ll) = Render $ do+  cr <- ask+  liftIO $ {#call unsafe pango_cairo_show_layout_line#} cr ll++-- | Draw a 'PangoLayout'.+--+-- * The top-left corner of the 'PangoLayout' will be drawn at the current+--   point of the cairo context.+--+showLayout :: PangoLayout -> Render ()+showLayout (PangoLayout _ lay) = Render $ do+  cr <- ask+  liftIO $ {#call unsafe pango_cairo_show_layout#} cr lay+++-- | Add the extent of a glyph string to the current path.+--+-- * The origin of the glyphs (the left edge of the line) will be at the+--   current point of the cairo context.+--+glyphStringPath :: GlyphItem -> Render ()+glyphStringPath (GlyphItem pi gs) = Render $ do+  cr <- ask+  font <- liftIO $ pangoItemGetFont pi+  liftIO $ {#call unsafe pango_cairo_glyph_string_path#} cr font gs++-- | Add the extent of a layout line to the current path.+--+-- * The origin of the glyphs (the left edge of the line) will be at the+--   current point of the cairo context.+--+layoutLinePath :: LayoutLine -> Render ()+layoutLinePath (LayoutLine _ ll) = Render $ do+  cr <- ask+  liftIO $ {#call unsafe pango_cairo_layout_line_path#} cr ll++-- | Add the layout to the current path.+--+-- * Adds the top-left corner of the text to the current path. Afterwards,+--   the path position is at the bottom-right corner of the 'PangoLayout'.+--+layoutPath :: PangoLayout -> Render ()+layoutPath (PangoLayout _ lay) = Render $ do+  cr <- ask+  liftIO $ {#call unsafe pango_cairo_layout_path#} cr lay++
Graphics/Rendering/Pango/Context.chs view
@@ -28,8 +28,8 @@ -- an environment that provides information on available fonts, -- internationalization and output capabilities of the medium. Given -- such a context, text can be rendered into strings of glyphs (see --- 'Graphics.UI.Gtk.Pango.Rendering') or, at a more abstract level, using--- layouts (see 'Graphics.UI.Gtk.Pango.Layout').+-- 'Graphics.Rendering.Pango.Rendering') or, at a more abstract level, using+-- layouts (see 'Graphics.Rendering.Pango.Layout.Layout'). -- -- * A 'PangoContext' is a prerequisite for all text rendering functions. --   A context can be created from scratch or, more conveniently, by using@@ -37,15 +37,16 @@ --   is rendered through Gdk, use --   'Graphics.UI.Gtk.Abstract.Widget.widgetCreatePangoContext', if you use --   the Cairo rendering engine, a new context can be acquired using---   'Graphics.UI.Gtk.Cairo.cairoCreateContext'.+--   'Graphics.Rendering.Cairo.cairoCreateContext'. -- -- * The properties of a 'PangoContext' can be changed which, in turn, has --   an effect on how text is rendered. To reflect such a change in the---   rendered text, call 'Graphics.UI.Gtk.Pango.Layout.layoutContextChanged'.+--   rendered text, call 'Graphics.Rendering.Pango.Layout.layoutContextChanged'. -- module Graphics.Rendering.Pango.Context ( -- * Types and Methods for 'PangoContext's   PangoContext,+  PangoContextClass,   contextListFamilies, --  contextLoadFont, --  contextLoadFontSet,
Graphics/Rendering/Pango/Enums.chs view
@@ -26,16 +26,11 @@ -- Enumerations for describing font characteristics. -- module Graphics.Rendering.Pango.Enums (-  Markup,   PangoUnit,   pangoScale,   Color(..),   Rectangle(..),   PangoRectangle(..),-  Language,-  emptyLanguage,-  languageFromString,-   FontMetrics(..),   Size(..),   FontStyle(..),@@ -52,6 +47,12 @@   PangoGravity(..),   PangoGravityHint(..), #endif++  -- these will not be exported from this module in the future+  Markup,+  Language,+  emptyLanguage,+  languageFromString,   ) where  {#import Graphics.Rendering.Pango.Types#}
Graphics/Rendering/Pango/Font.chs view
@@ -55,18 +55,22 @@   module Graphics.Rendering.Pango.Description,   -- Font metrics.   FontMap,+  FontMapClass,   pangoFontMapListFamilies,   FontFamily,+  FontFamilyClass, #if PANGO_VERSION_CHECK(1,4,0)   pangoFontFamilyIsMonospace, #endif   pangoFontFamilyListFaces,   FontFace,+  FontFaceClass, #if PANGO_VERSION_CHECK(1,4,0)   pangoFontFaceListSizes, #endif   pangoFontFaceDescribe,   Font,+  FontClass,   ) where  import Control.Monad    (liftM)@@ -86,7 +90,7 @@ -- | Ask for the different font families that a particular back-end supports. -- -- * The 'FontMap' can be acquired by calling---   'Graphics.UI.Gtk.Cairo.cairoFontMapGetDefault'. +--   'Graphics.Rendering.Pango.Cairo.cairoFontMapGetDefault'.  -- pangoFontMapListFamilies :: FontMap -> IO [FontFamily] pangoFontMapListFamilies fm = alloca $ \arrPtrPtr -> alloca $ \sizePtr -> do
Graphics/Rendering/Pango/Layout.chs view
@@ -465,7 +465,7 @@ -- -- * When @False@, the choice between left-to-right and right-to-left --   layout is done by according to the base direction of the layout's---   'PangoContext'. (See 'Graphics.UI.Gtk.Pango.Context.contextSetTextDir').+--   'PangoContext'. (See 'Graphics.Rendering.Pango.Context.contextSetTextDir'). -- -- * When the auto-computed direction or a paragraph differs from the base --   direction of the context, then the interpretation of@@ -755,7 +755,7 @@       pl (fromIntegral idx)   if llPtr==nullPtr then       throwIO (ArrayException (IndexOutOfBounds-      ("Graphics.UI.Gtk.Pango.Layout.layoutGetLine: "+++      ("Graphics.Rendering.Pango.Layout.layoutGetLine: "++        "no line at index "++show idx))) else do   ll <- makeNewLayoutLineRaw llPtr   {#call unsafe layout_line_ref#} ll
Graphics/Rendering/Pango/Rendering.chs view
@@ -37,7 +37,7 @@ --   where several characters might be turned into legatures or clusters, --   e.g. an \"e\" and an accent modifier are turned into a single glyph. These --   'GlyphItem's can then be rendered onto the output device with functions---   such as 'Graphics.UI.Gtk.Cairo.cairoShowGlyphString'.+--   such as 'Graphics.Rendering.Cairo.cairoShowGlyphString'. -- module Graphics.Rendering.Pango.Rendering (   -- * 'PangoItem': Partition text into units with similar attributes.
Graphics/Rendering/Pango/Structs.hsc view
@@ -137,7 +137,7 @@ --   only if there is no character with a strong direction in a paragraph. --   An example is a sequence of special, graphical characters which are --   neutral with respect to their rendering direction. A fresh---   'Graphics.UI.Gtk.Pango.Rendering.PangoContext' is by default weakly+--   'Graphics.Rendering.Pango.Rendering.PangoContext' is by default weakly --   left-to-right. -- -- * Not every value in this enumeration makes sense for every usage
Gtk2HsSetup.hs view
@@ -455,7 +455,7 @@ -- existance of a .chs module may not depend on some CPP condition.   extractDeps :: ModDep -> IO ModDep extractDeps md@ModDep { mdLocation = Nothing } = return md-extractDeps md@ModDep { mdLocation = Just f } = withFileContents f $ \con -> do+extractDeps md@ModDep { mdLocation = Just f } = withUTF8FileContents f $ \con -> do   let findImports acc (('{':'#':xs):xxs) = case (dropWhile ((==) ' ') xs) of         ('i':'m':'p':'o':'r':'t':' ':ys) ->           case simpleParse (takeWhile ((/=) '#') ys) of
+ demo/Layout.hs view
@@ -0,0 +1,51 @@+-- Example of using a PangoLayout+import Graphics.UI.Gtk+import Graphics.UI.Gtk.Gdk.EventM+import Graphics.Rendering.Cairo++loremIpsum = "Lorem ipsum dolor sit amet, consectetur adipisicing elit,\+        \ sed do eiusmod tempor incididunt ut labore et dolore magna\+        \ aliqua. Ut enim ad minim veniam, quis nostrud exercitation\+        \ ullamco laboris nisi ut aliquip ex ea commodo consequat.\+        \ Duis aute irure dolor in reprehenderit in voluptate\+        \ velit esse cillum dolore eu fugiat nulla pariatur.\+        \ Excepteur sint occaecat cupidatat non proident, sunt in culpa\+        \ qui officia deserunt mollit anim id est laborum."++main = do+  initGUI+  -- Create the main window.+  win <- windowNew+  on win objectDestroy mainQuit+  -- Create a drawing area in which we can render text.+  area <- drawingAreaNew+  containerAdd win area+  on area sizeRequest $ return (Requisition 100 100)+  +  -- Create a Cairo Context that contains information about the current font,+  -- etc.+  ctxt <- cairoCreateContext Nothing+  lay <- layoutText ctxt loremIpsum+  layoutSetWrap lay WrapWholeWords+  +  -- Wrap the layout to a different width each time the window is resized.+  on area sizeAllocate $ \(Rectangle _ _ w _) -> do+    layoutSetWidth lay (Just (fromIntegral w))++  -- Setup the handler to draw the layout.+  on area exposeEvent $ updateArea area lay+  +  -- Run the whole thing.+  widgetShowAll win+  mainGUI++updateArea :: DrawingArea -> PangoLayout -> EventM EExpose Bool+updateArea area lay = do+  win <- eventWindow+  liftIO $ do+  renderWithDrawable win $ do+    moveTo 0 0+    showLayout lay++  return True+ 
+ demo/Makefile view
@@ -0,0 +1,11 @@++PROG  = layout +SOURCES = Layout.hs++$(PROG) : $(SOURCES)+	$(HC) --make $< -o $@ $(HCFLAGS)++clean:+	rm -f $(SOURCES:.hs=.hi) $(SOURCES:.hs=.o) $(PROG)++HC=ghc
+ hierarchy.list view
@@ -0,0 +1,341 @@+# This list is the result of a copy-and-paste from the GtkObject hierarchy+# html documentation. Deprecated widgets are uncommented. Some additional+# object have been defined at the end of the copied list.++# The Gtk prefix of every object is removed, the other prefixes are+# kept.  The indentation implies the object hierarchy. In case the+# type query function cannot be derived from the name or the type name+# is different, an alternative name and type query function can be+# specified by appending 'as typename, <query_func>'.  In case this+# function is not specified, the <name> is converted to+# gtk_<name'>_get_type where <name'> is <name> where each upperscore+# letter is converted to an underscore and lowerletter. The underscore+# is omitted if an upperscore letter preceeded: GtkHButtonBox ->+# gtk_hbutton_box_get_type. The generation of a type can be+# conditional by appending 'if <tag>'. Such types are only produces if+# --tag=<tag> is given on the command line of TypeGenerator.+++    GObject +        GdkDrawable +            GdkWindow		as DrawWindow, gdk_window_object_get_type+#            GdkDrawableImplX11+#                GdkWindowImplX11+            GdkPixmap+            GdkGLPixmap		if gtkglext+            GdkGLWindow		if gtkglext+        GdkColormap+	GdkScreen		if gtk-2.2+	GdkDisplay		if gtk-2.2+	GdkVisual+	GdkDevice+        GtkSettings+        GtkTextBuffer+            GtkSourceBuffer	if sourceview+            GtkSourceBuffer	if gtksourceview2+        GtkTextTag+            GtkSourceTag	if sourceview+        GtkTextTagTable+            GtkSourceTagTable	if sourceview+        GtkStyle+	GtkRcStyle+        GdkDragContext+        GdkPixbuf+	GdkPixbufAnimation+	    GdkPixbufSimpleAnim+	GdkPixbufAnimationIter+        GtkTextChildAnchor+        GtkTextMark+	    GtkSourceMarker	if sourceview+            GtkSourceMark       if gtksourceview2+        GtkObject+            GtkWidget+                GtkMisc+                    GtkLabel+                        GtkAccelLabel+                        GtkTipsQuery	if deprecated+                    GtkArrow+                    GtkImage+                GtkContainer+                    WebKitWebView as WebView, webkit_web_view_get_type            if webkit +                    GtkBin+                        GtkAlignment+                        GtkFrame+                            GtkAspectFrame+                        GtkButton+                            GtkToggleButton+                                GtkCheckButton+                                    GtkRadioButton+                            GtkColorButton		if gtk-2.4+                            GtkFontButton		if gtk-2.4+                            GtkOptionMenu		if deprecated+                        GtkItem+                            GtkMenuItem+                                GtkCheckMenuItem+                                    GtkRadioMenuItem+                                GtkTearoffMenuItem+                                GtkImageMenuItem+                                GtkSeparatorMenuItem+                            GtkListItem			if deprecated+#			    GtkTreeItem+                        GtkWindow+                            GtkDialog+			    	GtkAboutDialog		if gtk-2.6+                                GtkColorSelectionDialog+                                GtkFileSelection+				GtkFileChooserDialog	if gtk-2.4+                                GtkFontSelectionDialog+                                GtkInputDialog+                                GtkMessageDialog+                            GtkPlug	if plugNsocket+                        GtkEventBox+                        GtkHandleBox+                        GtkScrolledWindow+                        GtkViewport+			GtkExpander			if gtk-2.4+			GtkComboBox			if gtk-2.4+			    GtkComboBoxEntry		if gtk-2.4+			GtkToolItem			if gtk-2.4+			    GtkToolButton		if gtk-2.4+				GtkMenuToolButton	if gtk-2.6+				GtkToggleToolButton	if gtk-2.4+				    GtkRadioToolButton	if gtk-2.4+			    GtkSeparatorToolItem	if gtk-2.4+			GtkMozEmbed		if mozembed+			VteTerminal as Terminal if vte+                    GtkBox+                        GtkButtonBox+                            GtkHButtonBox+                            GtkVButtonBox+                        GtkVBox+                            GtkColorSelection+                            GtkFontSelection+			    GtkFileChooserWidget	if gtk-2.4+                        GtkHBox+                            GtkCombo	if deprecated+                            GtkFileChooserButton	if gtk-2.6+                            GtkStatusbar+                    GtkCList		if deprecated+                        GtkCTree	if deprecated+                    GtkFixed+                    GtkPaned+                        GtkHPaned+                        GtkVPaned+                    GtkIconView		if gtk-2.6+                    GtkLayout+                    GtkList		if deprecated+                    GtkMenuShell+                        GtkMenu+                        GtkMenuBar+                    GtkNotebook+#                    GtkPacker+                    GtkSocket		if plugNsocket+                    GtkTable+                    GtkTextView+                        GtkSourceView	if sourceview+                        GtkSourceView	if gtksourceview2+                    GtkToolbar+                    GtkTreeView+                GtkCalendar+                GtkCellView		if gtk-2.6+		GtkDrawingArea+                GtkEntry+                    GtkSpinButton+                GtkRuler+                    GtkHRuler+                    GtkVRuler+                GtkRange+                    GtkScale+                        GtkHScale+                        GtkVScale+                    GtkScrollbar+                        GtkHScrollbar+                        GtkVScrollbar+                GtkSeparator+                    GtkHSeparator+                    GtkVSeparator+                GtkInvisible+#                GtkOldEditable+#                    GtkText+                GtkPreview		if deprecated+# Progress is deprecated, ProgressBar contains everything necessary+#                GtkProgress+                GtkProgressBar+            GtkAdjustment+            GtkIMContext+                GtkIMMulticontext+            GtkItemFactory		if deprecated+            GtkTooltips+			+# These object were added by hand because they do not show up in the hierarchy+# chart.+# These are derived from GtkObject:+	    GtkTreeViewColumn+	    GtkCellRenderer+		GtkCellRendererPixbuf+		GtkCellRendererText+		    GtkCellRendererCombo	if gtk-2.6+		GtkCellRendererToggle+		GtkCellRendererProgress	if gtk-2.6+	    GtkFileFilter		if gtk-2.4+            GtkBuilder if gtk-2.12+# These are actually interfaces, but all objects that implement it are at+# least GObjects.+	GtkCellLayout			if gtk-2.4+	GtkTreeSortable			if gtk-2.4+	GtkTooltip				if gtk-2.12+# These are derived from GObject:+  	GtkStatusIcon                   if gtk-2.10+        GtkTreeSelection+        GtkTreeModel+            GtkTreeStore+            GtkListStore+	GtkTreeModelSort+	GtkTreeModelFilter		if gtk-2.4+	GtkIconFactory+	GtkIconTheme+	GtkSizeGroup+	GtkClipboard			if gtk-2.2+	GtkAccelGroup+	GtkAccelMap			if gtk-2.4+	GtkEntryCompletion		if gtk-2.4+	GtkAction			if gtk-2.4+	    GtkToggleAction		if gtk-2.4+		GtkRadioAction		if gtk-2.4+	GtkActionGroup			if gtk-2.4+	GtkUIManager			if gtk-2.4+	GtkWindowGroup+        GtkSourceLanguage		if sourceview+        GtkSourceLanguage		if gtksourceview2+        GtkSourceLanguagesManager	if sourceview+        GtkSourceLanguageManager	if gtksourceview2+	GladeXML			as GladeXML, glade_xml_get_type if libglade+	GConfClient			as GConf if gconf+# These ones are actualy interfaces, but interface implementations are GObjects+	GtkEditable+	GtkSourceStyle			as SourceStyleObject if gtksourceview2+	GtkSourceStyleScheme		if sourceview+	GtkSourceStyleScheme		if gtksourceview2+	GtkSourceStyleSchemeManager	if gtksourceview2+	GtkFileChooser			if gtk-2.4+## This now became a GObject in version 2:+	GdkGC				as GC, gdk_gc_get_type+## These are Pango structures+	PangoContext		as PangoContext, pango_context_get_type if pango+	PangoLayout		as PangoLayoutRaw, pango_layout_get_type if pango+	PangoFont		as Font, pango_font_get_type if pango+	PangoFontFamily		as FontFamily, pango_font_family_get_type if pango+	PangoFontFace		as FontFace, pango_font_face_get_type if pango+	PangoFontMap		as FontMap, pango_font_face_get_type if pango+	PangoFontset		as FontSet, pango_fontset_get_type if pango+## This type is only available for PANGO_ENABLE_BACKEND compiled source+##	    PangoFontsetSimple	as FontSetSimple, pango_fontset_simple_get_type++## GtkGlExt classes+	GdkGLContext		if gtkglext+	GdkGLConfig		if gtkglext+	GdkGLDrawable		if gtkglext++## GnomeVFS classes+	GnomeVFSVolume		as Volume, gnome_vfs_volume_get_type if gnomevfs+	GnomeVFSDrive		as Drive, gnome_vfs_drive_get_type if gnomevfs+	GnomeVFSVolumeMonitor	as VolumeMonitor, gnome_vfs_volume_monitor_get_type if gnomevfs++## GIO classes+# Note on all the "as" clauses: the prefix G is unfortunate since it leads+# to two consecutive upper case letters which are not translated with an+# underscore each (e.g. GConf -> gconf, GtkHButtonBox -> gtk_hbutton_box).+#        GUnixMountMonitor		as UnixMountMonitor, g_unix_mount_monitor_get_type if gio+        GOutputStream			as OutputStream, g_output_stream_get_type if gio+            GFilterOutputStream		as FilterOutputStream, g_filter_output_stream_get_type if gio+                GDataOutputStream	as DataOutputStream, g_data_output_stream_get_type if gio+                GBufferedOutputStream   as BufferedOutputStream, g_buffered_output_stream_get_type if gio+#            GUnixOutputStream		as UnixOutputStream, g_unix_output_stream_get_type if gio+            GFileOutputStream           as FileOutputStream, g_file_output_stream_get_type if gio+            GMemoryOutputStream		as MemoryOutputStream, g_memory_output_stream_get_type if gio+        GInputStream			as InputStream, g_input_stream_get_type if gio+#            GUnixInputStream		as UnixInputStream, g_unix_input_stream_get_type if gio+            GMemoryInputStream		as MemoryInputStream, g_memory_input_stream_get_type if gio+            GFilterInputStream		as FilterInputStream, g_filter_input_stream_get_type if gio+                GBufferedInputStream	as BufferedInputStream, g_buffered_input_stream_get_type if gio+                    GDataInputStream	as DataInputStream, g_data_input_stream_get_type if gio+            GFileInputStream		as FileInputStream, g_file_input_stream_get_type if gio+#        GDesktopAppInfo			as DesktopAppInfo, g_desktop_app_info_get_type if gio+        GFileMonitor			as FileMonitor, g_file_monitor_get_type if gio+        GVfs				as Vfs, g_vfs_get_type if gio+        GMountOperation			as MountOperation, g_mount_operation_get_type if gio+        GThemedIcon			as ThemedIcon, g_themed_icon_get_type if gio+        GEmblem			as Emblem, g_emblem_get_type if gio+        GEmblemedIcon			as EmblemedIcon, g_emblemed_icon_get_type if gio+        GFileEnumerator			as FileEnumerator, g_file_enumerator_get_type if gio+        GFilenameCompleter		as FilenameCompleter, g_filename_completer_get_type if gio+        GFileIcon			as FileIcon, g_file_icon_get_type if gio+        GVolumeMonitor			as VolumeMonitor, g_volume_monitor_get_type if gio+        GCancellable			as Cancellable, g_cancellable_get_type if gio+        GSimpleAsyncResult		as SimpleAsyncResult, g_async_result_get_type if gio+        GFileInfo			as FileInfo, g_file_info_get_type if gio+		GAppLaunchContext   as AppLaunchContext, g_app_launch_context_get_type if gio+## these are actually GInterfaces+        GIcon				as Icon, g_icon_get_type if gio+        GSeekable			as Seekable, g_seekable_get_type if gio+        GAppInfo			as AppInfo, g_app_info_get_type if gio+        GVolume				as Volume, g_volume_get_type if gio+        GAsyncResult			as AsyncResult, g_async_result_get_type if gio+        GLoadableIcon			as LoadableIcon, g_loadable_icon_get_type if gio+        GDrive				as Drive, g_drive_get_type if gio+        GFile				noEq as File, g_file_get_type if gio+        GMount				as Mount, g_mount_get_type if gio++## GStreamer classes+	GstObject			as Object,		gst_object_get_type			if gstreamer+	    GstPad			as Pad,			gst_pad_get_type			if gstreamer+	        GstGhostPad		as GhostPad,		gst_ghost_pad_get_type			if gstreamer+	    GstPluginFeature		as PluginFeature,	gst_plugin_feature_get_type		if gstreamer+	        GstElementFactory	as ElementFactory,	gst_element_factory_get_type		if gstreamer+	        GstTypeFindFactory	as TypeFindFactory,	gst_type_find_factory_get_type		if gstreamer+	        GstIndexFactory		as IndexFactory,	gst_index_factory_get_type		if gstreamer+	    GstElement			as Element,		gst_element_get_type			if gstreamer+	        GstBin			as Bin,			gst_bin_get_type			if gstreamer+	            GstPipeline		as Pipeline,		gst_pipeline_get_type			if gstreamer+	        GstImplementsInterface  as ImplementsInterface, gst_implements_interface_get_type	if gstreamer+	        GstTagSetter            as TagSetter,           gst_tag_setter_get_type			if gstreamer+                GstBaseSrc              as BaseSrc,             gst_base_src_get_type			if gstreamer+                    GstPushSrc          as PushSrc,             gst_push_src_get_type                   if gstreamer+                GstBaseSink             as BaseSink,            gst_base_sink_get_type                  if gstreamer+                GstBaseTransform        as BaseTransform,       gst_base_transform_get_type             if gstreamer+	    GstPlugin			as Plugin,		gst_plugin_get_type			if gstreamer+	    GstRegistry			as Registry,		gst_registry_get_type			if gstreamer+	    GstBus			as Bus,			gst_bus_get_type			if gstreamer+	    GstClock			as Clock,		gst_clock_get_type			if gstreamer+	        GstAudioClock		as AudioClock,		gst_audio_clock_get_type		if gstreamer+	        GstSystemClock		as SystemClock,		gst_system_clock_get_type		if gstreamer+                GstNetClientClock       as NetClientClock,      gst_net_client_clock_get_type           if gstreamer+	    GstIndex			as Index,		gst_index_get_type			if gstreamer+	    GstPadTemplate		as PadTemplate,		gst_pad_template_get_type		if gstreamer+	    GstTask			as Task,		gst_task_get_type			if gstreamer+	    GstXML			as XML,			gst_xml_get_type			if gstreamer+	    GstChildProxy               as ChildProxy,          gst_child_proxy_get_type		if gstreamer+            GstCollectPads              as CollectPads,         gst_collect_pads_get_type               if gstreamer+## these are actually GInterfaces+	GstURIHandler                   as URIHandler,          gst_uri_handler_get_type		if gstreamer+        GstAdapter                      as Adapter,             gst_adapter_get_type                    if gstreamer+        GstController                   as Controller,          gst_controller_get_type                 if gstreamer++        WebKitWebFrame as WebFrame, webkit_web_frame_get_type          if webkit +        WebKitWebSettings as WebSettings, webkit_web_settings_get_type    if webkit+        WebKitNetworkRequest as NetworkRequest, webkit_network_request_get_type  if webkit+        WebKitNetworkResponse as NetworkResponse, webkit_network_response_get_type    if webkit+        WebKitDownload as Download, webkit_download_get_type  if webkit+        WebKitWebBackForwardList as WebBackForwardList, webkit_web_back_forward_list_get_type if webkit+        WebKitWebHistoryItem as WebHistoryItem, webkit_web_history_item_get_type if webkit+        WebKitWebInspector as WebInspector, webkit_web_inspector_get_type if webkit+        WebKitHitTestResult as HitTestResult, webkit_hit_test_result_get_type if webkit+        WebKitSecurityOrigin as SecurityOrigin, webkit_security_origin_get_type if webkit+        WebKitSoupAuthDialog as SoupAuthDialog, webkit_soup_auth_dialog_get_type if webkit+        WebKitWebDatabase as WebDatabase, webkit_web_database_get_type if webkit+        WebKitWebDataSource as WebDataSource, webkit_web_data_source_get_type if webkit+        WebKitWebNavigationAction as WebNavigationAction, webkit_web_navigation_action_get_type if webkit+        WebKitWebPolicyDecision as WebPolicyDecision, webkit_web_policy_decision_get_type if webkit+        WebKitWebResource as WebResource, webkit_web_resource_get_type if webkit+        WebKitWebWindowFeatures as WebWindowFeatures, webkit_web_window_features_get_type if webkit+
hspango.h view
@@ -7,6 +7,7 @@ */  #include<pango/pango.h>+#include<pango/pangocairo.h>  #ifndef PANGO_VERSION_MINOR #include "hspangoversion.h"
pango.cabal view
@@ -1,5 +1,5 @@ Name:           pango-Version:        0.11.0+Version:        0.11.1 License:        LGPL-2.1 License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team@@ -20,11 +20,17 @@ extra-source-files: template-hsc-gtk2hs.h                     hspango.h                     Gtk2HsSetup.hs+					hierarchy.list -x-Types-File:   Graphics/Rendering/Pango/Types.chs-x-Types-ModName: Graphics.Rendering.Pango.Types-x-Types-Forward:  *System.Glib.GObject+x-Types-File:      Graphics/Rendering/Pango/Types.chs+x-Types-ModName:   Graphics.Rendering.Pango.Types+x-Types-Forward:   *System.Glib.GObject+x-Types-Hierarchy: hierarchy.list +Data-Dir:		demo+Data-Files:		Layout.hs+                Makefile+				 Source-Repository head   type:         darcs   location:     http://code.haskell.org/gtk2hs/@@ -35,9 +41,9 @@  Library         build-depends:  base >= 3 && < 5,-                        process, directory, array, containers, pretty, haskell98,-                        glib  >= 0.11 && < 0.12,-                        cairo >= 0.11 && < 0.12+                        process, directory, array, containers, pretty, mtl, haskell98,+                        glib  >= 0.11.1 && < 0.12,+                        cairo >= 0.11.1 && < 0.12          if flag(new-exception)           build-depends:  base >= 4@@ -47,12 +53,14 @@          build-tools:    gtk2hsC2hs, gtk2hsTypeGen -        exposed-modules: Graphics.Rendering.Pango.Font+        exposed-modules: Graphics.Rendering.Pango+                         Graphics.Rendering.Pango.Font                          Graphics.Rendering.Pango.Enums                          Graphics.Rendering.Pango.Context                          Graphics.Rendering.Pango.Layout                          Graphics.Rendering.Pango.Rendering                          Graphics.Rendering.Pango.Markup+                         Graphics.Rendering.Pango.Cairo                          -- these four modules are only used in code that creates                          -- Pango data structures themselves                          Graphics.Rendering.Pango.Types@@ -72,5 +80,5 @@           pkgconfig-depends: pango < 1.26.0 || > 1.26.2         else           pkgconfig-depends: pango >= 1.0-+        pkgconfig-depends:  cairo >= 1.2.0, pangocairo >= 1.10