    {-# LINE 2 "./Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) CellRendererPixbuf
    --
    -- Author : Axel Simon
    --
    -- Created: 23 May 2001
    --
    -- Copyright (C) 1999-2005 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)
    --
    -- Renders a pixbuf in a cell
    --
    module Graphics.UI.Gtk.ModelView.CellRendererPixbuf (
    -- * Detail
    --
    -- | A 'CellRendererPixbuf' can be used to render an image in a cell. It
    -- allows to render either a given 'Pixbuf' (set via the 'cellPixbuf'
    -- property) or a stock icon (set via the 'cellPixbufStockId' property).
    --
    -- To support the tree view, 'CellRendererPixbuf' also supports rendering two
    -- alternative pixbufs, when the
    -- 'Graphics.UI.Gtk.ModelView.CellRenderer.cellIsExpander' property is @True@.
    -- If the this property is @True@ and the 'cellPixbufExpanderOpen' property is
    -- set to a pixbuf, it renders that pixbuf, if the
    -- 'Graphics.UI.Gtk.ModelView.CellRenderer.cellIsExpanded' property is @False@
    -- and the 'cellPixbufExpanderClosed' property is set to a pixbuf, it renders
    -- that one.

    -- * Class Hierarchy
    -- |
    -- @
    -- | 'GObject'
    -- | +----'Object'
    -- | +----'CellRenderer'
    -- | +----CellRendererPixbuf
    -- @

    -- * Types
      CellRendererPixbuf,
      CellRendererPixbufClass,
      castToCellRendererPixbuf, gTypeCellRendererPixbuf,
      toCellRendererPixbuf,

    -- * Constructors
      cellRendererPixbufNew,

    -- * Attributes
      cellPixbuf,
      cellPixbufExpanderOpen,
      cellPixbufExpanderClosed,
      cellPixbufStockId,
      cellPixbufStockSize,
      cellPixbufStockDetail,

      cellPixbufIconName,
      cellPixbufFollowState,

      ) where

    import Control.Monad (liftM)

    import System.Glib.FFI
    import System.Glib.UTFString
    import System.Glib.Attributes (Attr)
    import System.Glib.Properties
    import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
    import Graphics.UI.Gtk.Types
    {-# LINE 83 "./Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs" #-}

    {-# LINE 85 "./Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs" #-}

    --------------------
    -- Constructors

    -- | Create a new CellRendererPixbuf object.
    --
    cellRendererPixbufNew :: IO CellRendererPixbuf
    cellRendererPixbufNew :: IO CellRendererPixbuf
    cellRendererPixbufNew =
      (ForeignPtr CellRendererPixbuf -> CellRendererPixbuf,
     FinalizerPtr CellRendererPixbuf)
    -> IO (Ptr CellRendererPixbuf) -> IO CellRendererPixbuf
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewObject (ForeignPtr CellRendererPixbuf -> CellRendererPixbuf,
     FinalizerPtr CellRendererPixbuf)
    forall {a}.
    (ForeignPtr CellRendererPixbuf -> CellRendererPixbuf,
     FinalizerPtr a)
    mkCellRendererPixbuf (IO (Ptr CellRendererPixbuf) -> IO CellRendererPixbuf)
    -> IO (Ptr CellRendererPixbuf) -> IO CellRendererPixbuf
    forall a b. (a -> b) -> a -> b
    $
      (Ptr CellRenderer -> Ptr CellRendererPixbuf)
    -> IO (Ptr CellRenderer) -> IO (Ptr CellRendererPixbuf)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Ptr CellRenderer -> Ptr CellRendererPixbuf
    forall a b. Ptr a -> Ptr b
    castPtr :: Ptr CellRenderer -> Ptr CellRendererPixbuf) (IO (Ptr CellRenderer) -> IO (Ptr CellRendererPixbuf))
    -> IO (Ptr CellRenderer) -> IO (Ptr CellRendererPixbuf)
    forall a b. (a -> b) -> a -> b
    $
      IO (Ptr CellRenderer)
    gtk_cell_renderer_pixbuf_new
    {-# LINE 96 "./Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs" #-}

    --------------------
    -- Attributes

    -- | The pixbuf to render.
    --
    cellPixbuf :: CellRendererPixbufClass self => Attr self Pixbuf
    cellPixbuf :: forall self. CellRendererPixbufClass self => Attr self Pixbuf
    cellPixbuf = String -> GType -> ReadWriteAttr self Pixbuf Pixbuf
    forall gobj gobj' gobj''.
    (GObjectClass gobj, GObjectClass gobj', GObjectClass gobj'') =>
    String -> GType -> ReadWriteAttr gobj gobj' gobj''
    newAttrFromObjectProperty String
    "pixbuf"
      GType
    gdk_pixbuf_get_type
    {-# LINE 105 "./Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs" #-}

    -- | Pixbuf for open expander.
    --
    cellPixbufExpanderOpen :: CellRendererPixbufClass self => Attr self Pixbuf
    cellPixbufExpanderOpen :: forall self. CellRendererPixbufClass self => Attr self Pixbuf
    cellPixbufExpanderOpen = String -> GType -> ReadWriteAttr self Pixbuf Pixbuf
    forall gobj gobj' gobj''.
    (GObjectClass gobj, GObjectClass gobj', GObjectClass gobj'') =>
    String -> GType -> ReadWriteAttr gobj gobj' gobj''
    newAttrFromObjectProperty String
    "pixbuf-expander-open"
      GType
    gdk_pixbuf_get_type
    {-# LINE 111 "./Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs" #-}

    -- | Pixbuf for closed expander.
    --
    cellPixbufExpanderClosed :: CellRendererPixbufClass self => Attr self Pixbuf
    cellPixbufExpanderClosed :: forall self. CellRendererPixbufClass self => Attr self Pixbuf
    cellPixbufExpanderClosed = String -> GType -> ReadWriteAttr self Pixbuf Pixbuf
    forall gobj gobj' gobj''.
    (GObjectClass gobj, GObjectClass gobj', GObjectClass gobj'') =>
    String -> GType -> ReadWriteAttr gobj gobj' gobj''
    newAttrFromObjectProperty String
    "pixbuf-expander-closed"
      GType
    gdk_pixbuf_get_type
    {-# LINE 117 "./Graphics/UI/Gtk/ModelView/CellRendererPixbuf.chs" #-}

    -- | The stock ID of the stock icon to render.
    --
    -- Default value: @\"\"@
    --
    cellPixbufStockId :: (CellRendererPixbufClass self, GlibString string) => Attr self string
    cellPixbufStockId :: forall self string.
    (CellRendererPixbufClass self, GlibString string) =>
    Attr self string
    cellPixbufStockId = String -> Attr self string
    forall gobj string.
    (GObjectClass gobj, GlibString string) =>
    String -> Attr gobj string
    newAttrFromStringProperty String
    "stock-id"

    -- | The 'IconSize' value that specifies the size of the rendered icon.
    --
    -- Default value: 1
    --
    cellPixbufStockSize :: CellRendererPixbufClass self => Attr self Int
    cellPixbufStockSize :: forall self. CellRendererPixbufClass self => Attr self Int
    cellPixbufStockSize = String -> Attr self Int
    forall gobj. GObjectClass gobj => String -> Attr gobj Int
    newAttrFromUIntProperty String
    "stock-size"

    -- | Render detail to pass to the theme engine.
    --
    -- Default value: @\"\"@
    --
    cellPixbufStockDetail :: (CellRendererPixbufClass self, GlibString string) => Attr self string
    cellPixbufStockDetail :: forall self string.
    (CellRendererPixbufClass self, GlibString string) =>
    Attr self string
    cellPixbufStockDetail = String -> Attr self string
    forall gobj string.
    (GObjectClass gobj, GlibString string) =>
    String -> Attr gobj string
    newAttrFromStringProperty String
    "stock-detail"

    -- | The name of the themed icon to display. This property only has an effect
    -- if not overridden by 'cellPixbufStockId' or 'cellPixbuf' attributes.
    --
    -- Default value: @\"\"@
    --
    cellPixbufIconName :: (CellRendererPixbufClass self, GlibString string) => Attr self string
    cellPixbufIconName :: forall self string.
    (CellRendererPixbufClass self, GlibString string) =>
    Attr self string
    cellPixbufIconName = String -> Attr self string
    forall gobj string.
    (GObjectClass gobj, GlibString string) =>
    String -> Attr gobj string
    newAttrFromStringProperty String
    "icon-name"

    -- | Specifies whether the rendered pixbuf should be colorized according to
    -- the 'CellRendererState'.
    --
    -- Default value: @False@
    --
    cellPixbufFollowState :: CellRendererPixbufClass self => Attr self Bool
    cellPixbufFollowState :: forall self. CellRendererPixbufClass self => Attr self Bool
    cellPixbufFollowState = String -> Attr self Bool
    forall gobj. GObjectClass gobj => String -> Attr gobj Bool
    newAttrFromBoolProperty String
    "follow-state"

    foreign import ccall unsafe "gtk_cell_renderer_pixbuf_new"
      gtk_cell_renderer_pixbuf_new :: (IO (Ptr CellRenderer))

    foreign import ccall unsafe "gdk_pixbuf_get_type"
      gdk_pixbuf_get_type :: CULong