{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

The 'GI.Gtk.Objects.CellArea.CellArea' is an abstract class for 'GI.Gtk.Interfaces.CellLayout.CellLayout' widgets
(also referred to as \"layouting widgets\") to interface with an
arbitrary number of @/GtkCellRenderers/@ and interact with the user
for a given 'GI.Gtk.Interfaces.TreeModel.TreeModel' row.

The cell area handles events, focus navigation, drawing and
size requests and allocations for a given row of data.

Usually users dont have to interact with the 'GI.Gtk.Objects.CellArea.CellArea' directly
unless they are implementing a cell-layouting widget themselves.

= Requesting area sizes

As outlined in
[GtkWidget’s geometry management section][geometry-management],
GTK+ uses a height-for-width
geometry management system to compute the sizes of widgets and user
interfaces. 'GI.Gtk.Objects.CellArea.CellArea' uses the same semantics to calculate the
size of an area for an arbitrary number of 'GI.Gtk.Interfaces.TreeModel.TreeModel' rows.

When requesting the size of a cell area one needs to calculate
the size for a handful of rows, and this will be done differently by
different layouting widgets. For instance a 'GI.Gtk.Objects.TreeViewColumn.TreeViewColumn'
always lines up the areas from top to bottom while a 'GI.Gtk.Objects.IconView.IconView'
on the other hand might enforce that all areas received the same
width and wrap the areas around, requesting height for more cell
areas when allocated less width.

It’s also important for areas to maintain some cell
alignments with areas rendered for adjacent rows (cells can
appear “columnized” inside an area even when the size of
cells are different in each row). For this reason the 'GI.Gtk.Objects.CellArea.CellArea'
uses a 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' object to store the alignments
and sizes along the way (as well as the overall largest minimum
and natural size for all the rows which have been calculated
with the said context).

The 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' is an opaque object specific to the
'GI.Gtk.Objects.CellArea.CellArea' which created it (see 'GI.Gtk.Objects.CellArea.cellAreaCreateContext').
The owning cell-layouting widget can create as many contexts as
it wishes to calculate sizes of rows which should receive the
same size in at least one orientation (horizontally or vertically),
However, it’s important that the same 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' which
was used to request the sizes for a given 'GI.Gtk.Interfaces.TreeModel.TreeModel' row be
used when rendering or processing events for that row.

In order to request the width of all the rows at the root level
of a 'GI.Gtk.Interfaces.TreeModel.TreeModel' one would do the following:


=== /C code/
>
>GtkTreeIter iter;
>gint        minimum_width;
>gint        natural_width;
>
>valid = gtk_tree_model_get_iter_first (model, &iter);
>while (valid)
>  {
>    gtk_cell_area_apply_attributes (area, model, &iter, FALSE, FALSE);
>    gtk_cell_area_get_preferred_width (area, context, widget, NULL, NULL);
>
>    valid = gtk_tree_model_iter_next (model, &iter);
>  }
>gtk_cell_area_context_get_preferred_width (context, &minimum_width, &natural_width);


Note that in this example it’s not important to observe the
returned minimum and natural width of the area for each row
unless the cell-layouting object is actually interested in the
widths of individual rows. The overall width is however stored
in the accompanying 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' object and can be consulted
at any time.

This can be useful since 'GI.Gtk.Interfaces.CellLayout.CellLayout' widgets usually have to
support requesting and rendering rows in treemodels with an
exceedingly large amount of rows. The 'GI.Gtk.Interfaces.CellLayout.CellLayout' widget in
that case would calculate the required width of the rows in an
idle or timeout source (see @/g_timeout_add()/@) and when the widget
is requested its actual width in 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_width/@()
it can simply consult the width accumulated so far in the
'GI.Gtk.Objects.CellAreaContext.CellAreaContext' object.

A simple example where rows are rendered from top to bottom and
take up the full width of the layouting widget would look like:


=== /C code/
>
>static void
>foo_get_preferred_width (GtkWidget       *widget,
>                         gint            *minimum_size,
>                         gint            *natural_size)
>{
>  Foo        *foo  = FOO (widget);
>  FooPrivate *priv = foo->priv;
>
>  foo_ensure_at_least_one_handfull_of_rows_have_been_requested (foo);
>
>  gtk_cell_area_context_get_preferred_width (priv->context, minimum_size, natural_size);
>}


In the above example the Foo widget has to make sure that some
row sizes have been calculated (the amount of rows that Foo judged
was appropriate to request space for in a single timeout iteration)
before simply returning the amount of space required by the area via
the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext'.

Requesting the height for width (or width for height) of an area is
a similar task except in this case the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' does not
store the data (actually, it does not know how much space the layouting
widget plans to allocate it for every row. It’s up to the layouting
widget to render each row of data with the appropriate height and
width which was requested by the 'GI.Gtk.Objects.CellArea.CellArea').

In order to request the height for width of all the rows at the
root level of a 'GI.Gtk.Interfaces.TreeModel.TreeModel' one would do the following:


=== /C code/
>
>GtkTreeIter iter;
>gint        minimum_height;
>gint        natural_height;
>gint        full_minimum_height = 0;
>gint        full_natural_height = 0;
>
>valid = gtk_tree_model_get_iter_first (model, &iter);
>while (valid)
>  {
>    gtk_cell_area_apply_attributes (area, model, &iter, FALSE, FALSE);
>    gtk_cell_area_get_preferred_height_for_width (area, context, widget,
>                                                  width, &minimum_height, &natural_height);
>
>    if (width_is_for_allocation)
>       cache_row_height (&iter, minimum_height, natural_height);
>
>    full_minimum_height += minimum_height;
>    full_natural_height += natural_height;
>
>    valid = gtk_tree_model_iter_next (model, &iter);
>  }


Note that in the above example we would need to cache the heights
returned for each row so that we would know what sizes to render the
areas for each row. However we would only want to really cache the
heights if the request is intended for the layouting widgets real
allocation.

In some cases the layouting widget is requested the height for an
arbitrary for_width, this is a special case for layouting widgets
who need to request size for tens of thousands  of rows. For this
case it’s only important that the layouting widget calculate
one reasonably sized chunk of rows and return that height
synchronously. The reasoning here is that any layouting widget is
at least capable of synchronously calculating enough height to fill
the screen height (or scrolled window height) in response to a single
call to 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_for_width/@(). Returning
a perfect height for width that is larger than the screen area is
inconsequential since after the layouting receives an allocation
from a scrolled window it simply continues to drive the scrollbar
values while more and more height is required for the row heights
that are calculated in the background.

= Rendering Areas

Once area sizes have been aquired at least for the rows in the
visible area of the layouting widget they can be rendered at
'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/draw/@() time.

A crude example of how to render all the rows at the root level
runs as follows:


=== /C code/
>
>GtkAllocation allocation;
>GdkRectangle  cell_area = { 0, };
>GtkTreeIter   iter;
>gint          minimum_width;
>gint          natural_width;
>
>gtk_widget_get_allocation (widget, &allocation);
>cell_area.width = allocation.width;
>
>valid = gtk_tree_model_get_iter_first (model, &iter);
>while (valid)
>  {
>    cell_area.height = get_cached_height_for_row (&iter);
>
>    gtk_cell_area_apply_attributes (area, model, &iter, FALSE, FALSE);
>    gtk_cell_area_render (area, context, widget, cr,
>                          &cell_area, &cell_area, state_flags, FALSE);
>
>    cell_area.y += cell_area.height;
>
>    valid = gtk_tree_model_iter_next (model, &iter);
>  }


Note that the cached height in this example really depends on how
the layouting widget works. The layouting widget might decide to
give every row its minimum or natural height or, if the model content
is expected to fit inside the layouting widget without scrolling, it
would make sense to calculate the allocation for each row at
'GI.Gtk.Objects.Widget.Widget'::@/size-allocate/@ time using 'GI.Gtk.Functions.distributeNaturalAllocation'.

= Handling Events and Driving Keyboard Focus

Passing events to the area is as simple as handling events on any
normal widget and then passing them to the 'GI.Gtk.Objects.CellArea.cellAreaEvent'
API as they come in. Usually 'GI.Gtk.Objects.CellArea.CellArea' is only interested in
button events, however some customized derived areas can be implemented
who are interested in handling other events. Handling an event can
trigger the 'GI.Gtk.Objects.CellArea.CellArea'::@/focus-changed/@ signal to fire; as well as
'GI.Gtk.Objects.CellArea.CellArea'::@/add-editable/@ in the case that an editable cell was
clicked and needs to start editing. You can call
'GI.Gtk.Objects.CellArea.cellAreaStopEditing' at any time to cancel any cell editing
that is currently in progress.

The 'GI.Gtk.Objects.CellArea.CellArea' drives keyboard focus from cell to cell in a way
similar to 'GI.Gtk.Objects.Widget.Widget'. For layouting widgets that support giving
focus to cells it’s important to remember to pass 'GI.Gtk.Flags.CellRendererStateFocused'
to the area functions for the row that has focus and to tell the
area to paint the focus at render time.

Layouting widgets that accept focus on cells should implement the
'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/focus/@() virtual method. The layouting widget is always
responsible for knowing where 'GI.Gtk.Interfaces.TreeModel.TreeModel' rows are rendered inside
the widget, so at 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/focus/@() time the layouting widget
should use the 'GI.Gtk.Objects.CellArea.CellArea' methods to navigate focus inside the area
and then observe the GtkDirectionType to pass the focus to adjacent
rows and areas.

A basic example of how the 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/focus/@() virtual method
should be implemented:


=== /C code/
>
>static gboolean
>foo_focus (GtkWidget       *widget,
>           GtkDirectionType direction)
>{
>  Foo        *foo  = FOO (widget);
>  FooPrivate *priv = foo->priv;
>  gint        focus_row;
>  gboolean    have_focus = FALSE;
>
>  focus_row = priv->focus_row;
>
>  if (!gtk_widget_has_focus (widget))
>    gtk_widget_grab_focus (widget);
>
>  valid = gtk_tree_model_iter_nth_child (priv->model, &iter, NULL, priv->focus_row);
>  while (valid)
>    {
>      gtk_cell_area_apply_attributes (priv->area, priv->model, &iter, FALSE, FALSE);
>
>      if (gtk_cell_area_focus (priv->area, direction))
>        {
>           priv->focus_row = focus_row;
>           have_focus = TRUE;
>           break;
>        }
>      else
>        {
>          if (direction == GTK_DIR_RIGHT ||
>              direction == GTK_DIR_LEFT)
>            break;
>          else if (direction == GTK_DIR_UP ||
>                   direction == GTK_DIR_TAB_BACKWARD)
>           {
>              if (focus_row == 0)
>                break;
>              else
>               {
>                  focus_row--;
>                  valid = gtk_tree_model_iter_nth_child (priv->model, &iter, NULL, focus_row);
>               }
>            }
>          else
>            {
>              if (focus_row == last_row)
>                break;
>              else
>                {
>                  focus_row++;
>                  valid = gtk_tree_model_iter_next (priv->model, &iter);
>                }
>            }
>        }
>    }
>    return have_focus;
>}


Note that the layouting widget is responsible for matching the
GtkDirectionType values to the way it lays out its cells.

= Cell Properties

The 'GI.Gtk.Objects.CellArea.CellArea' introduces cell properties for @/GtkCellRenderers/@
in very much the same way that 'GI.Gtk.Objects.Container.Container' introduces
[child properties][child-properties]
for @/GtkWidgets/@. This provides some general interfaces for defining
the relationship cell areas have with their cells. For instance in a
'GI.Gtk.Objects.CellAreaBox.CellAreaBox' a cell might “expand” and receive extra space when
the area is allocated more than its full natural request, or a cell
might be configured to “align” with adjacent rows which were requested
and rendered with the same 'GI.Gtk.Objects.CellAreaContext.CellAreaContext'.

Use 'GI.Gtk.Structs.CellAreaClass.cellAreaClassInstallCellProperty' to install cell
properties for a cell area class and 'GI.Gtk.Structs.CellAreaClass.cellAreaClassFindCellProperty'
or 'GI.Gtk.Structs.CellAreaClass.cellAreaClassListCellProperties' to get information about
existing cell properties.

To set the value of a cell property, use 'GI.Gtk.Objects.CellArea.cellAreaCellSetProperty',
@/gtk_cell_area_cell_set()/@ or @/gtk_cell_area_cell_set_valist()/@. To obtain
the value of a cell property, use 'GI.Gtk.Objects.CellArea.cellAreaCellGetProperty',
@/gtk_cell_area_cell_get()/@ or @/gtk_cell_area_cell_get_valist()/@.
-}

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.Gtk.Objects.CellArea
    (

-- * Exported types
    CellArea(..)                            ,
    IsCellArea                              ,
    toCellArea                              ,
    noCellArea                              ,


 -- * Methods
-- ** activate #method:activate#

#if ENABLE_OVERLOADING
    CellAreaActivateMethodInfo              ,
#endif
    cellAreaActivate                        ,


-- ** activateCell #method:activateCell#

#if ENABLE_OVERLOADING
    CellAreaActivateCellMethodInfo          ,
#endif
    cellAreaActivateCell                    ,


-- ** add #method:add#

#if ENABLE_OVERLOADING
    CellAreaAddMethodInfo                   ,
#endif
    cellAreaAdd                             ,


-- ** addFocusSibling #method:addFocusSibling#

#if ENABLE_OVERLOADING
    CellAreaAddFocusSiblingMethodInfo       ,
#endif
    cellAreaAddFocusSibling                 ,


-- ** applyAttributes #method:applyAttributes#

#if ENABLE_OVERLOADING
    CellAreaApplyAttributesMethodInfo       ,
#endif
    cellAreaApplyAttributes                 ,


-- ** attributeConnect #method:attributeConnect#

#if ENABLE_OVERLOADING
    CellAreaAttributeConnectMethodInfo      ,
#endif
    cellAreaAttributeConnect                ,


-- ** attributeDisconnect #method:attributeDisconnect#

#if ENABLE_OVERLOADING
    CellAreaAttributeDisconnectMethodInfo   ,
#endif
    cellAreaAttributeDisconnect             ,


-- ** attributeGetColumn #method:attributeGetColumn#

#if ENABLE_OVERLOADING
    CellAreaAttributeGetColumnMethodInfo    ,
#endif
    cellAreaAttributeGetColumn              ,


-- ** cellGetProperty #method:cellGetProperty#

#if ENABLE_OVERLOADING
    CellAreaCellGetPropertyMethodInfo       ,
#endif
    cellAreaCellGetProperty                 ,


-- ** cellSetProperty #method:cellSetProperty#

#if ENABLE_OVERLOADING
    CellAreaCellSetPropertyMethodInfo       ,
#endif
    cellAreaCellSetProperty                 ,


-- ** copyContext #method:copyContext#

#if ENABLE_OVERLOADING
    CellAreaCopyContextMethodInfo           ,
#endif
    cellAreaCopyContext                     ,


-- ** createContext #method:createContext#

#if ENABLE_OVERLOADING
    CellAreaCreateContextMethodInfo         ,
#endif
    cellAreaCreateContext                   ,


-- ** event #method:event#

#if ENABLE_OVERLOADING
    CellAreaEventMethodInfo                 ,
#endif
    cellAreaEvent                           ,


-- ** focus #method:focus#

#if ENABLE_OVERLOADING
    CellAreaFocusMethodInfo                 ,
#endif
    cellAreaFocus                           ,


-- ** foreach #method:foreach#

#if ENABLE_OVERLOADING
    CellAreaForeachMethodInfo               ,
#endif
    cellAreaForeach                         ,


-- ** foreachAlloc #method:foreachAlloc#

#if ENABLE_OVERLOADING
    CellAreaForeachAllocMethodInfo          ,
#endif
    cellAreaForeachAlloc                    ,


-- ** getCellAllocation #method:getCellAllocation#

#if ENABLE_OVERLOADING
    CellAreaGetCellAllocationMethodInfo     ,
#endif
    cellAreaGetCellAllocation               ,


-- ** getCellAtPosition #method:getCellAtPosition#

#if ENABLE_OVERLOADING
    CellAreaGetCellAtPositionMethodInfo     ,
#endif
    cellAreaGetCellAtPosition               ,


-- ** getCurrentPathString #method:getCurrentPathString#

#if ENABLE_OVERLOADING
    CellAreaGetCurrentPathStringMethodInfo  ,
#endif
    cellAreaGetCurrentPathString            ,


-- ** getEditWidget #method:getEditWidget#

#if ENABLE_OVERLOADING
    CellAreaGetEditWidgetMethodInfo         ,
#endif
    cellAreaGetEditWidget                   ,


-- ** getEditedCell #method:getEditedCell#

#if ENABLE_OVERLOADING
    CellAreaGetEditedCellMethodInfo         ,
#endif
    cellAreaGetEditedCell                   ,


-- ** getFocusCell #method:getFocusCell#

#if ENABLE_OVERLOADING
    CellAreaGetFocusCellMethodInfo          ,
#endif
    cellAreaGetFocusCell                    ,


-- ** getFocusFromSibling #method:getFocusFromSibling#

#if ENABLE_OVERLOADING
    CellAreaGetFocusFromSiblingMethodInfo   ,
#endif
    cellAreaGetFocusFromSibling             ,


-- ** getFocusSiblings #method:getFocusSiblings#

#if ENABLE_OVERLOADING
    CellAreaGetFocusSiblingsMethodInfo      ,
#endif
    cellAreaGetFocusSiblings                ,


-- ** getPreferredHeight #method:getPreferredHeight#

#if ENABLE_OVERLOADING
    CellAreaGetPreferredHeightMethodInfo    ,
#endif
    cellAreaGetPreferredHeight              ,


-- ** getPreferredHeightForWidth #method:getPreferredHeightForWidth#

#if ENABLE_OVERLOADING
    CellAreaGetPreferredHeightForWidthMethodInfo,
#endif
    cellAreaGetPreferredHeightForWidth      ,


-- ** getPreferredWidth #method:getPreferredWidth#

#if ENABLE_OVERLOADING
    CellAreaGetPreferredWidthMethodInfo     ,
#endif
    cellAreaGetPreferredWidth               ,


-- ** getPreferredWidthForHeight #method:getPreferredWidthForHeight#

#if ENABLE_OVERLOADING
    CellAreaGetPreferredWidthForHeightMethodInfo,
#endif
    cellAreaGetPreferredWidthForHeight      ,


-- ** getRequestMode #method:getRequestMode#

#if ENABLE_OVERLOADING
    CellAreaGetRequestModeMethodInfo        ,
#endif
    cellAreaGetRequestMode                  ,


-- ** hasRenderer #method:hasRenderer#

#if ENABLE_OVERLOADING
    CellAreaHasRendererMethodInfo           ,
#endif
    cellAreaHasRenderer                     ,


-- ** innerCellArea #method:innerCellArea#

#if ENABLE_OVERLOADING
    CellAreaInnerCellAreaMethodInfo         ,
#endif
    cellAreaInnerCellArea                   ,


-- ** isActivatable #method:isActivatable#

#if ENABLE_OVERLOADING
    CellAreaIsActivatableMethodInfo         ,
#endif
    cellAreaIsActivatable                   ,


-- ** isFocusSibling #method:isFocusSibling#

#if ENABLE_OVERLOADING
    CellAreaIsFocusSiblingMethodInfo        ,
#endif
    cellAreaIsFocusSibling                  ,


-- ** remove #method:remove#

#if ENABLE_OVERLOADING
    CellAreaRemoveMethodInfo                ,
#endif
    cellAreaRemove                          ,


-- ** removeFocusSibling #method:removeFocusSibling#

#if ENABLE_OVERLOADING
    CellAreaRemoveFocusSiblingMethodInfo    ,
#endif
    cellAreaRemoveFocusSibling              ,


-- ** render #method:render#

#if ENABLE_OVERLOADING
    CellAreaRenderMethodInfo                ,
#endif
    cellAreaRender                          ,


-- ** requestRenderer #method:requestRenderer#

#if ENABLE_OVERLOADING
    CellAreaRequestRendererMethodInfo       ,
#endif
    cellAreaRequestRenderer                 ,


-- ** setFocusCell #method:setFocusCell#

#if ENABLE_OVERLOADING
    CellAreaSetFocusCellMethodInfo          ,
#endif
    cellAreaSetFocusCell                    ,


-- ** stopEditing #method:stopEditing#

#if ENABLE_OVERLOADING
    CellAreaStopEditingMethodInfo           ,
#endif
    cellAreaStopEditing                     ,




 -- * Properties
-- ** editWidget #attr:editWidget#
{- | The widget currently editing the edited cell

This property is read-only and only changes as
a result of a call 'GI.Gtk.Objects.CellArea.cellAreaActivateCell'.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    CellAreaEditWidgetPropertyInfo          ,
#endif
#if ENABLE_OVERLOADING
    cellAreaEditWidget                      ,
#endif
    getCellAreaEditWidget                   ,


-- ** editedCell #attr:editedCell#
{- | The cell in the area that is currently edited

This property is read-only and only changes as
a result of a call 'GI.Gtk.Objects.CellArea.cellAreaActivateCell'.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    CellAreaEditedCellPropertyInfo          ,
#endif
#if ENABLE_OVERLOADING
    cellAreaEditedCell                      ,
#endif
    getCellAreaEditedCell                   ,


-- ** focusCell #attr:focusCell#
{- | The cell in the area that currently has focus

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    CellAreaFocusCellPropertyInfo           ,
#endif
#if ENABLE_OVERLOADING
    cellAreaFocusCell                       ,
#endif
    constructCellAreaFocusCell              ,
    getCellAreaFocusCell                    ,
    setCellAreaFocusCell                    ,




 -- * Signals
-- ** addEditable #signal:addEditable#

    C_CellAreaAddEditableCallback           ,
    CellAreaAddEditableCallback             ,
#if ENABLE_OVERLOADING
    CellAreaAddEditableSignalInfo           ,
#endif
    afterCellAreaAddEditable                ,
    genClosure_CellAreaAddEditable          ,
    mk_CellAreaAddEditableCallback          ,
    noCellAreaAddEditableCallback           ,
    onCellAreaAddEditable                   ,
    wrap_CellAreaAddEditableCallback        ,


-- ** applyAttributes #signal:applyAttributes#

    C_CellAreaApplyAttributesCallback       ,
    CellAreaApplyAttributesCallback         ,
#if ENABLE_OVERLOADING
    CellAreaApplyAttributesSignalInfo       ,
#endif
    afterCellAreaApplyAttributes            ,
    genClosure_CellAreaApplyAttributes      ,
    mk_CellAreaApplyAttributesCallback      ,
    noCellAreaApplyAttributesCallback       ,
    onCellAreaApplyAttributes               ,
    wrap_CellAreaApplyAttributesCallback    ,


-- ** focusChanged #signal:focusChanged#

    C_CellAreaFocusChangedCallback          ,
    CellAreaFocusChangedCallback            ,
#if ENABLE_OVERLOADING
    CellAreaFocusChangedSignalInfo          ,
#endif
    afterCellAreaFocusChanged               ,
    genClosure_CellAreaFocusChanged         ,
    mk_CellAreaFocusChangedCallback         ,
    noCellAreaFocusChangedCallback          ,
    onCellAreaFocusChanged                  ,
    wrap_CellAreaFocusChangedCallback       ,


-- ** removeEditable #signal:removeEditable#

    C_CellAreaRemoveEditableCallback        ,
    CellAreaRemoveEditableCallback          ,
#if ENABLE_OVERLOADING
    CellAreaRemoveEditableSignalInfo        ,
#endif
    afterCellAreaRemoveEditable             ,
    genClosure_CellAreaRemoveEditable       ,
    mk_CellAreaRemoveEditableCallback       ,
    noCellAreaRemoveEditableCallback        ,
    onCellAreaRemoveEditable                ,
    wrap_CellAreaRemoveEditableCallback     ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gdk.Unions.Event as Gdk.Event
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.CellEditable as Gtk.CellEditable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.CellLayout as Gtk.CellLayout
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.TreeModel as Gtk.TreeModel
import {-# SOURCE #-} qualified GI.Gtk.Objects.CellAreaContext as Gtk.CellAreaContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.CellRenderer as Gtk.CellRenderer
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Structs.TreeIter as Gtk.TreeIter

-- | Memory-managed wrapper type.
newtype CellArea = CellArea (ManagedPtr CellArea)
foreign import ccall "gtk_cell_area_get_type"
    c_gtk_cell_area_get_type :: IO GType

instance GObject CellArea where
    gobjectType _ = c_gtk_cell_area_get_type


-- | Type class for types which can be safely cast to `CellArea`, for instance with `toCellArea`.
class GObject o => IsCellArea o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError CellArea a) =>
    IsCellArea a
#endif
instance IsCellArea CellArea
instance GObject.Object.IsObject CellArea
instance Gtk.Buildable.IsBuildable CellArea
instance Gtk.CellLayout.IsCellLayout CellArea

-- | Cast to `CellArea`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toCellArea :: (MonadIO m, IsCellArea o) => o -> m CellArea
toCellArea = liftIO . unsafeCastTo CellArea

-- | A convenience alias for `Nothing` :: `Maybe` `CellArea`.
noCellArea :: Maybe CellArea
noCellArea = Nothing

#if ENABLE_OVERLOADING
type family ResolveCellAreaMethod (t :: Symbol) (o :: *) :: * where
    ResolveCellAreaMethod "activate" o = CellAreaActivateMethodInfo
    ResolveCellAreaMethod "activateCell" o = CellAreaActivateCellMethodInfo
    ResolveCellAreaMethod "add" o = CellAreaAddMethodInfo
    ResolveCellAreaMethod "addAttribute" o = Gtk.CellLayout.CellLayoutAddAttributeMethodInfo
    ResolveCellAreaMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveCellAreaMethod "addFocusSibling" o = CellAreaAddFocusSiblingMethodInfo
    ResolveCellAreaMethod "applyAttributes" o = CellAreaApplyAttributesMethodInfo
    ResolveCellAreaMethod "attributeConnect" o = CellAreaAttributeConnectMethodInfo
    ResolveCellAreaMethod "attributeDisconnect" o = CellAreaAttributeDisconnectMethodInfo
    ResolveCellAreaMethod "attributeGetColumn" o = CellAreaAttributeGetColumnMethodInfo
    ResolveCellAreaMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveCellAreaMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveCellAreaMethod "cellGetProperty" o = CellAreaCellGetPropertyMethodInfo
    ResolveCellAreaMethod "cellSetProperty" o = CellAreaCellSetPropertyMethodInfo
    ResolveCellAreaMethod "clear" o = Gtk.CellLayout.CellLayoutClearMethodInfo
    ResolveCellAreaMethod "clearAttributes" o = Gtk.CellLayout.CellLayoutClearAttributesMethodInfo
    ResolveCellAreaMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveCellAreaMethod "copyContext" o = CellAreaCopyContextMethodInfo
    ResolveCellAreaMethod "createContext" o = CellAreaCreateContextMethodInfo
    ResolveCellAreaMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
    ResolveCellAreaMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
    ResolveCellAreaMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
    ResolveCellAreaMethod "event" o = CellAreaEventMethodInfo
    ResolveCellAreaMethod "focus" o = CellAreaFocusMethodInfo
    ResolveCellAreaMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveCellAreaMethod "foreach" o = CellAreaForeachMethodInfo
    ResolveCellAreaMethod "foreachAlloc" o = CellAreaForeachAllocMethodInfo
    ResolveCellAreaMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveCellAreaMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveCellAreaMethod "hasRenderer" o = CellAreaHasRendererMethodInfo
    ResolveCellAreaMethod "innerCellArea" o = CellAreaInnerCellAreaMethodInfo
    ResolveCellAreaMethod "isActivatable" o = CellAreaIsActivatableMethodInfo
    ResolveCellAreaMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveCellAreaMethod "isFocusSibling" o = CellAreaIsFocusSiblingMethodInfo
    ResolveCellAreaMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveCellAreaMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveCellAreaMethod "packEnd" o = Gtk.CellLayout.CellLayoutPackEndMethodInfo
    ResolveCellAreaMethod "packStart" o = Gtk.CellLayout.CellLayoutPackStartMethodInfo
    ResolveCellAreaMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveCellAreaMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveCellAreaMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveCellAreaMethod "remove" o = CellAreaRemoveMethodInfo
    ResolveCellAreaMethod "removeFocusSibling" o = CellAreaRemoveFocusSiblingMethodInfo
    ResolveCellAreaMethod "render" o = CellAreaRenderMethodInfo
    ResolveCellAreaMethod "reorder" o = Gtk.CellLayout.CellLayoutReorderMethodInfo
    ResolveCellAreaMethod "requestRenderer" o = CellAreaRequestRendererMethodInfo
    ResolveCellAreaMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveCellAreaMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveCellAreaMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveCellAreaMethod "stopEditing" o = CellAreaStopEditingMethodInfo
    ResolveCellAreaMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveCellAreaMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveCellAreaMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveCellAreaMethod "getArea" o = Gtk.CellLayout.CellLayoutGetAreaMethodInfo
    ResolveCellAreaMethod "getCellAllocation" o = CellAreaGetCellAllocationMethodInfo
    ResolveCellAreaMethod "getCellAtPosition" o = CellAreaGetCellAtPositionMethodInfo
    ResolveCellAreaMethod "getCells" o = Gtk.CellLayout.CellLayoutGetCellsMethodInfo
    ResolveCellAreaMethod "getCurrentPathString" o = CellAreaGetCurrentPathStringMethodInfo
    ResolveCellAreaMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveCellAreaMethod "getEditWidget" o = CellAreaGetEditWidgetMethodInfo
    ResolveCellAreaMethod "getEditedCell" o = CellAreaGetEditedCellMethodInfo
    ResolveCellAreaMethod "getFocusCell" o = CellAreaGetFocusCellMethodInfo
    ResolveCellAreaMethod "getFocusFromSibling" o = CellAreaGetFocusFromSiblingMethodInfo
    ResolveCellAreaMethod "getFocusSiblings" o = CellAreaGetFocusSiblingsMethodInfo
    ResolveCellAreaMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    ResolveCellAreaMethod "getName" o = Gtk.Buildable.BuildableGetNameMethodInfo
    ResolveCellAreaMethod "getPreferredHeight" o = CellAreaGetPreferredHeightMethodInfo
    ResolveCellAreaMethod "getPreferredHeightForWidth" o = CellAreaGetPreferredHeightForWidthMethodInfo
    ResolveCellAreaMethod "getPreferredWidth" o = CellAreaGetPreferredWidthMethodInfo
    ResolveCellAreaMethod "getPreferredWidthForHeight" o = CellAreaGetPreferredWidthForHeightMethodInfo
    ResolveCellAreaMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveCellAreaMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveCellAreaMethod "getRequestMode" o = CellAreaGetRequestModeMethodInfo
    ResolveCellAreaMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveCellAreaMethod "setCellDataFunc" o = Gtk.CellLayout.CellLayoutSetCellDataFuncMethodInfo
    ResolveCellAreaMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveCellAreaMethod "setFocusCell" o = CellAreaSetFocusCellMethodInfo
    ResolveCellAreaMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
    ResolveCellAreaMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveCellAreaMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveCellAreaMethod t CellArea, O.MethodInfo info CellArea p) => O.IsLabelProxy t (CellArea -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveCellAreaMethod t CellArea, O.MethodInfo info CellArea p) => O.IsLabel t (CellArea -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif

#endif

-- signal CellArea::add-editable
{- |
Indicates that editing has started on /@renderer@/ and that /@editable@/
should be added to the owning cell-layouting widget at /@cellArea@/.

/Since: 3.0/
-}
type CellAreaAddEditableCallback =
    Gtk.CellRenderer.CellRenderer
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' that started the edited -}
    -> Gtk.CellEditable.CellEditable
    {- ^ /@editable@/: the 'GI.Gtk.Interfaces.CellEditable.CellEditable' widget to add -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the 'GI.Gtk.Objects.Widget.Widget' relative 'GI.Gdk.Structs.Rectangle.Rectangle' coordinates
            where /@editable@/ should be added -}
    -> T.Text
    {- ^ /@path@/: the 'GI.Gtk.Structs.TreePath.TreePath' string this edit was initiated for -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellAreaAddEditableCallback`@.
noCellAreaAddEditableCallback :: Maybe CellAreaAddEditableCallback
noCellAreaAddEditableCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CellAreaAddEditableCallback =
    Ptr () ->                               -- object
    Ptr Gtk.CellRenderer.CellRenderer ->
    Ptr Gtk.CellEditable.CellEditable ->
    Ptr Gdk.Rectangle.Rectangle ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CellAreaAddEditableCallback`.
foreign import ccall "wrapper"
    mk_CellAreaAddEditableCallback :: C_CellAreaAddEditableCallback -> IO (FunPtr C_CellAreaAddEditableCallback)

-- | Wrap the callback into a `Closure`.
genClosure_CellAreaAddEditable :: CellAreaAddEditableCallback -> IO Closure
genClosure_CellAreaAddEditable cb = do
    let cb' = wrap_CellAreaAddEditableCallback cb
    mk_CellAreaAddEditableCallback cb' >>= newCClosure


-- | Wrap a `CellAreaAddEditableCallback` into a `C_CellAreaAddEditableCallback`.
wrap_CellAreaAddEditableCallback ::
    CellAreaAddEditableCallback ->
    C_CellAreaAddEditableCallback
wrap_CellAreaAddEditableCallback _cb _ renderer editable cellArea path _ = do
    renderer' <- (newObject Gtk.CellRenderer.CellRenderer) renderer
    editable' <- (newObject Gtk.CellEditable.CellEditable) editable
    B.ManagedPtr.withTransient Gdk.Rectangle.Rectangle cellArea $ \cellArea' -> do
        path' <- cstringToText path
        _cb  renderer' editable' cellArea' path'


{- |
Connect a signal handler for the “@add-editable@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' cellArea #addEditable callback
@
-}
onCellAreaAddEditable :: (IsCellArea a, MonadIO m) => a -> CellAreaAddEditableCallback -> m SignalHandlerId
onCellAreaAddEditable obj cb = liftIO $ do
    let cb' = wrap_CellAreaAddEditableCallback cb
    cb'' <- mk_CellAreaAddEditableCallback cb'
    connectSignalFunPtr obj "add-editable" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@add-editable@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' cellArea #addEditable callback
@
-}
afterCellAreaAddEditable :: (IsCellArea a, MonadIO m) => a -> CellAreaAddEditableCallback -> m SignalHandlerId
afterCellAreaAddEditable obj cb = liftIO $ do
    let cb' = wrap_CellAreaAddEditableCallback cb
    cb'' <- mk_CellAreaAddEditableCallback cb'
    connectSignalFunPtr obj "add-editable" cb'' SignalConnectAfter


-- signal CellArea::apply-attributes
{- |
This signal is emitted whenever applying attributes to /@area@/ from /@model@/

/Since: 3.0/
-}
type CellAreaApplyAttributesCallback =
    Gtk.TreeModel.TreeModel
    {- ^ /@model@/: the 'GI.Gtk.Interfaces.TreeModel.TreeModel' to apply the attributes from -}
    -> Gtk.TreeIter.TreeIter
    {- ^ /@iter@/: the 'GI.Gtk.Structs.TreeIter.TreeIter' indicating which row to apply the attributes of -}
    -> Bool
    {- ^ /@isExpander@/: whether the view shows children for this row -}
    -> Bool
    {- ^ /@isExpanded@/: whether the view is currently showing the children of this row -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellAreaApplyAttributesCallback`@.
noCellAreaApplyAttributesCallback :: Maybe CellAreaApplyAttributesCallback
noCellAreaApplyAttributesCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CellAreaApplyAttributesCallback =
    Ptr () ->                               -- object
    Ptr Gtk.TreeModel.TreeModel ->
    Ptr Gtk.TreeIter.TreeIter ->
    CInt ->
    CInt ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CellAreaApplyAttributesCallback`.
foreign import ccall "wrapper"
    mk_CellAreaApplyAttributesCallback :: C_CellAreaApplyAttributesCallback -> IO (FunPtr C_CellAreaApplyAttributesCallback)

-- | Wrap the callback into a `Closure`.
genClosure_CellAreaApplyAttributes :: CellAreaApplyAttributesCallback -> IO Closure
genClosure_CellAreaApplyAttributes cb = do
    let cb' = wrap_CellAreaApplyAttributesCallback cb
    mk_CellAreaApplyAttributesCallback cb' >>= newCClosure


-- | Wrap a `CellAreaApplyAttributesCallback` into a `C_CellAreaApplyAttributesCallback`.
wrap_CellAreaApplyAttributesCallback ::
    CellAreaApplyAttributesCallback ->
    C_CellAreaApplyAttributesCallback
wrap_CellAreaApplyAttributesCallback _cb _ model iter isExpander isExpanded _ = do
    model' <- (newObject Gtk.TreeModel.TreeModel) model
    B.ManagedPtr.withTransient Gtk.TreeIter.TreeIter iter $ \iter' -> do
        let isExpander' = (/= 0) isExpander
        let isExpanded' = (/= 0) isExpanded
        _cb  model' iter' isExpander' isExpanded'


{- |
Connect a signal handler for the “@apply-attributes@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' cellArea #applyAttributes callback
@
-}
onCellAreaApplyAttributes :: (IsCellArea a, MonadIO m) => a -> CellAreaApplyAttributesCallback -> m SignalHandlerId
onCellAreaApplyAttributes obj cb = liftIO $ do
    let cb' = wrap_CellAreaApplyAttributesCallback cb
    cb'' <- mk_CellAreaApplyAttributesCallback cb'
    connectSignalFunPtr obj "apply-attributes" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@apply-attributes@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' cellArea #applyAttributes callback
@
-}
afterCellAreaApplyAttributes :: (IsCellArea a, MonadIO m) => a -> CellAreaApplyAttributesCallback -> m SignalHandlerId
afterCellAreaApplyAttributes obj cb = liftIO $ do
    let cb' = wrap_CellAreaApplyAttributesCallback cb
    cb'' <- mk_CellAreaApplyAttributesCallback cb'
    connectSignalFunPtr obj "apply-attributes" cb'' SignalConnectAfter


-- signal CellArea::focus-changed
{- |
Indicates that focus changed on this /@area@/. This signal
is emitted either as a result of focus handling or event
handling.

It\'s possible that the signal is emitted even if the
currently focused renderer did not change, this is
because focus may change to the same renderer in the
same cell area for a different row of data.

/Since: 3.0/
-}
type CellAreaFocusChangedCallback =
    Gtk.CellRenderer.CellRenderer
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' that has focus -}
    -> T.Text
    {- ^ /@path@/: the current 'GI.Gtk.Structs.TreePath.TreePath' string set for /@area@/ -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellAreaFocusChangedCallback`@.
noCellAreaFocusChangedCallback :: Maybe CellAreaFocusChangedCallback
noCellAreaFocusChangedCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CellAreaFocusChangedCallback =
    Ptr () ->                               -- object
    Ptr Gtk.CellRenderer.CellRenderer ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CellAreaFocusChangedCallback`.
foreign import ccall "wrapper"
    mk_CellAreaFocusChangedCallback :: C_CellAreaFocusChangedCallback -> IO (FunPtr C_CellAreaFocusChangedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_CellAreaFocusChanged :: CellAreaFocusChangedCallback -> IO Closure
genClosure_CellAreaFocusChanged cb = do
    let cb' = wrap_CellAreaFocusChangedCallback cb
    mk_CellAreaFocusChangedCallback cb' >>= newCClosure


-- | Wrap a `CellAreaFocusChangedCallback` into a `C_CellAreaFocusChangedCallback`.
wrap_CellAreaFocusChangedCallback ::
    CellAreaFocusChangedCallback ->
    C_CellAreaFocusChangedCallback
wrap_CellAreaFocusChangedCallback _cb _ renderer path _ = do
    renderer' <- (newObject Gtk.CellRenderer.CellRenderer) renderer
    path' <- cstringToText path
    _cb  renderer' path'


{- |
Connect a signal handler for the “@focus-changed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' cellArea #focusChanged callback
@
-}
onCellAreaFocusChanged :: (IsCellArea a, MonadIO m) => a -> CellAreaFocusChangedCallback -> m SignalHandlerId
onCellAreaFocusChanged obj cb = liftIO $ do
    let cb' = wrap_CellAreaFocusChangedCallback cb
    cb'' <- mk_CellAreaFocusChangedCallback cb'
    connectSignalFunPtr obj "focus-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@focus-changed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' cellArea #focusChanged callback
@
-}
afterCellAreaFocusChanged :: (IsCellArea a, MonadIO m) => a -> CellAreaFocusChangedCallback -> m SignalHandlerId
afterCellAreaFocusChanged obj cb = liftIO $ do
    let cb' = wrap_CellAreaFocusChangedCallback cb
    cb'' <- mk_CellAreaFocusChangedCallback cb'
    connectSignalFunPtr obj "focus-changed" cb'' SignalConnectAfter


-- signal CellArea::remove-editable
{- |
Indicates that editing finished on /@renderer@/ and that /@editable@/
should be removed from the owning cell-layouting widget.

/Since: 3.0/
-}
type CellAreaRemoveEditableCallback =
    Gtk.CellRenderer.CellRenderer
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' that finished editeding -}
    -> Gtk.CellEditable.CellEditable
    {- ^ /@editable@/: the 'GI.Gtk.Interfaces.CellEditable.CellEditable' widget to remove -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CellAreaRemoveEditableCallback`@.
noCellAreaRemoveEditableCallback :: Maybe CellAreaRemoveEditableCallback
noCellAreaRemoveEditableCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CellAreaRemoveEditableCallback =
    Ptr () ->                               -- object
    Ptr Gtk.CellRenderer.CellRenderer ->
    Ptr Gtk.CellEditable.CellEditable ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CellAreaRemoveEditableCallback`.
foreign import ccall "wrapper"
    mk_CellAreaRemoveEditableCallback :: C_CellAreaRemoveEditableCallback -> IO (FunPtr C_CellAreaRemoveEditableCallback)

-- | Wrap the callback into a `Closure`.
genClosure_CellAreaRemoveEditable :: CellAreaRemoveEditableCallback -> IO Closure
genClosure_CellAreaRemoveEditable cb = do
    let cb' = wrap_CellAreaRemoveEditableCallback cb
    mk_CellAreaRemoveEditableCallback cb' >>= newCClosure


-- | Wrap a `CellAreaRemoveEditableCallback` into a `C_CellAreaRemoveEditableCallback`.
wrap_CellAreaRemoveEditableCallback ::
    CellAreaRemoveEditableCallback ->
    C_CellAreaRemoveEditableCallback
wrap_CellAreaRemoveEditableCallback _cb _ renderer editable _ = do
    renderer' <- (newObject Gtk.CellRenderer.CellRenderer) renderer
    editable' <- (newObject Gtk.CellEditable.CellEditable) editable
    _cb  renderer' editable'


{- |
Connect a signal handler for the “@remove-editable@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' cellArea #removeEditable callback
@
-}
onCellAreaRemoveEditable :: (IsCellArea a, MonadIO m) => a -> CellAreaRemoveEditableCallback -> m SignalHandlerId
onCellAreaRemoveEditable obj cb = liftIO $ do
    let cb' = wrap_CellAreaRemoveEditableCallback cb
    cb'' <- mk_CellAreaRemoveEditableCallback cb'
    connectSignalFunPtr obj "remove-editable" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@remove-editable@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' cellArea #removeEditable callback
@
-}
afterCellAreaRemoveEditable :: (IsCellArea a, MonadIO m) => a -> CellAreaRemoveEditableCallback -> m SignalHandlerId
afterCellAreaRemoveEditable obj cb = liftIO $ do
    let cb' = wrap_CellAreaRemoveEditableCallback cb
    cb'' <- mk_CellAreaRemoveEditableCallback cb'
    connectSignalFunPtr obj "remove-editable" cb'' SignalConnectAfter


-- VVV Prop "edit-widget"
   -- Type: TInterface (Name {namespace = "Gtk", name = "CellEditable"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

{- |
Get the value of the “@edit-widget@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' cellArea #editWidget
@
-}
getCellAreaEditWidget :: (MonadIO m, IsCellArea o) => o -> m Gtk.CellEditable.CellEditable
getCellAreaEditWidget obj = liftIO $ checkUnexpectedNothing "getCellAreaEditWidget" $ getObjectPropertyObject obj "edit-widget" Gtk.CellEditable.CellEditable

#if ENABLE_OVERLOADING
data CellAreaEditWidgetPropertyInfo
instance AttrInfo CellAreaEditWidgetPropertyInfo where
    type AttrAllowedOps CellAreaEditWidgetPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint CellAreaEditWidgetPropertyInfo = (~) ()
    type AttrBaseTypeConstraint CellAreaEditWidgetPropertyInfo = IsCellArea
    type AttrGetType CellAreaEditWidgetPropertyInfo = Gtk.CellEditable.CellEditable
    type AttrLabel CellAreaEditWidgetPropertyInfo = "edit-widget"
    type AttrOrigin CellAreaEditWidgetPropertyInfo = CellArea
    attrGet _ = getCellAreaEditWidget
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

-- VVV Prop "edited-cell"
   -- Type: TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

{- |
Get the value of the “@edited-cell@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' cellArea #editedCell
@
-}
getCellAreaEditedCell :: (MonadIO m, IsCellArea o) => o -> m Gtk.CellRenderer.CellRenderer
getCellAreaEditedCell obj = liftIO $ checkUnexpectedNothing "getCellAreaEditedCell" $ getObjectPropertyObject obj "edited-cell" Gtk.CellRenderer.CellRenderer

#if ENABLE_OVERLOADING
data CellAreaEditedCellPropertyInfo
instance AttrInfo CellAreaEditedCellPropertyInfo where
    type AttrAllowedOps CellAreaEditedCellPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint CellAreaEditedCellPropertyInfo = (~) ()
    type AttrBaseTypeConstraint CellAreaEditedCellPropertyInfo = IsCellArea
    type AttrGetType CellAreaEditedCellPropertyInfo = Gtk.CellRenderer.CellRenderer
    type AttrLabel CellAreaEditedCellPropertyInfo = "edited-cell"
    type AttrOrigin CellAreaEditedCellPropertyInfo = CellArea
    attrGet _ = getCellAreaEditedCell
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

-- VVV Prop "focus-cell"
   -- Type: TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

{- |
Get the value of the “@focus-cell@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' cellArea #focusCell
@
-}
getCellAreaFocusCell :: (MonadIO m, IsCellArea o) => o -> m Gtk.CellRenderer.CellRenderer
getCellAreaFocusCell obj = liftIO $ checkUnexpectedNothing "getCellAreaFocusCell" $ getObjectPropertyObject obj "focus-cell" Gtk.CellRenderer.CellRenderer

{- |
Set the value of the “@focus-cell@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' cellArea [ #focusCell 'Data.GI.Base.Attributes.:=' value ]
@
-}
setCellAreaFocusCell :: (MonadIO m, IsCellArea o, Gtk.CellRenderer.IsCellRenderer a) => o -> a -> m ()
setCellAreaFocusCell obj val = liftIO $ setObjectPropertyObject obj "focus-cell" (Just val)

{- |
Construct a `GValueConstruct` with valid value for the “@focus-cell@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructCellAreaFocusCell :: (IsCellArea o, Gtk.CellRenderer.IsCellRenderer a) => a -> IO (GValueConstruct o)
constructCellAreaFocusCell val = constructObjectPropertyObject "focus-cell" (Just val)

#if ENABLE_OVERLOADING
data CellAreaFocusCellPropertyInfo
instance AttrInfo CellAreaFocusCellPropertyInfo where
    type AttrAllowedOps CellAreaFocusCellPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint CellAreaFocusCellPropertyInfo = Gtk.CellRenderer.IsCellRenderer
    type AttrBaseTypeConstraint CellAreaFocusCellPropertyInfo = IsCellArea
    type AttrGetType CellAreaFocusCellPropertyInfo = Gtk.CellRenderer.CellRenderer
    type AttrLabel CellAreaFocusCellPropertyInfo = "focus-cell"
    type AttrOrigin CellAreaFocusCellPropertyInfo = CellArea
    attrGet _ = getCellAreaFocusCell
    attrSet _ = setCellAreaFocusCell
    attrConstruct _ = constructCellAreaFocusCell
    attrClear _ = undefined
#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList CellArea
type instance O.AttributeList CellArea = CellAreaAttributeList
type CellAreaAttributeList = ('[ '("editWidget", CellAreaEditWidgetPropertyInfo), '("editedCell", CellAreaEditedCellPropertyInfo), '("focusCell", CellAreaFocusCellPropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
cellAreaEditWidget :: AttrLabelProxy "editWidget"
cellAreaEditWidget = AttrLabelProxy

cellAreaEditedCell :: AttrLabelProxy "editedCell"
cellAreaEditedCell = AttrLabelProxy

cellAreaFocusCell :: AttrLabelProxy "focusCell"
cellAreaFocusCell = AttrLabelProxy

#endif

#if ENABLE_OVERLOADING
data CellAreaAddEditableSignalInfo
instance SignalInfo CellAreaAddEditableSignalInfo where
    type HaskellCallbackType CellAreaAddEditableSignalInfo = CellAreaAddEditableCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_CellAreaAddEditableCallback cb
        cb'' <- mk_CellAreaAddEditableCallback cb'
        connectSignalFunPtr obj "add-editable" cb'' connectMode

data CellAreaApplyAttributesSignalInfo
instance SignalInfo CellAreaApplyAttributesSignalInfo where
    type HaskellCallbackType CellAreaApplyAttributesSignalInfo = CellAreaApplyAttributesCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_CellAreaApplyAttributesCallback cb
        cb'' <- mk_CellAreaApplyAttributesCallback cb'
        connectSignalFunPtr obj "apply-attributes" cb'' connectMode

data CellAreaFocusChangedSignalInfo
instance SignalInfo CellAreaFocusChangedSignalInfo where
    type HaskellCallbackType CellAreaFocusChangedSignalInfo = CellAreaFocusChangedCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_CellAreaFocusChangedCallback cb
        cb'' <- mk_CellAreaFocusChangedCallback cb'
        connectSignalFunPtr obj "focus-changed" cb'' connectMode

data CellAreaRemoveEditableSignalInfo
instance SignalInfo CellAreaRemoveEditableSignalInfo where
    type HaskellCallbackType CellAreaRemoveEditableSignalInfo = CellAreaRemoveEditableCallback
    connectSignal _ obj cb connectMode = do
        let cb' = wrap_CellAreaRemoveEditableCallback cb
        cb'' <- mk_CellAreaRemoveEditableCallback cb'
        connectSignalFunPtr obj "remove-editable" cb'' connectMode

type instance O.SignalList CellArea = CellAreaSignalList
type CellAreaSignalList = ('[ '("addEditable", CellAreaAddEditableSignalInfo), '("applyAttributes", CellAreaApplyAttributesSignalInfo), '("focusChanged", CellAreaFocusChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("removeEditable", CellAreaRemoveEditableSignalInfo)] :: [(Symbol, *)])

#endif

-- method CellArea::activate
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext in context with the current row data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the size and location of @area relative to @widget\8217s allocation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Gtk", name = "CellRendererState"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRendererState flags for @area for this row of data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "edit_only", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "if %TRUE then only cell renderers that are %GTK_CELL_RENDERER_MODE_EDITABLE\n            will be activated.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_activate" gtk_cell_area_activate ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "CellRendererState"})
    CInt ->                                 -- edit_only : TBasicType TBoolean
    IO CInt

{- |
Activates /@area@/, usually by activating the currently focused
cell, however some subclasses which embed widgets in the area
can also activate a widget if it currently has the focus.

/Since: 3.0/
-}
cellAreaActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' in context with the current row data -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering on -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the size and location of /@area@/ relative to /@widget@/’s allocation -}
    -> [Gtk.Flags.CellRendererState]
    {- ^ /@flags@/: the 'GI.Gtk.Flags.CellRendererState' flags for /@area@/ for this row of data. -}
    -> Bool
    {- ^ /@editOnly@/: if 'True' then only cell renderers that are 'GI.Gtk.Enums.CellRendererModeEditable'
            will be activated. -}
    -> m Bool
    {- ^ __Returns:__ Whether /@area@/ was successfully activated. -}
cellAreaActivate area context widget cellArea flags editOnly = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    let flags' = gflagsToWord flags
    let editOnly' = (fromIntegral . fromEnum) editOnly
    result <- gtk_cell_area_activate area' context' widget' cellArea' flags' editOnly'
    let result' = (/= 0) result
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cellArea
    return result'

#if ENABLE_OVERLOADING
data CellAreaActivateMethodInfo
instance (signature ~ (b -> c -> Gdk.Rectangle.Rectangle -> [Gtk.Flags.CellRendererState] -> Bool -> m Bool), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaActivateMethodInfo a signature where
    overloadedMethod _ = cellAreaActivate

#endif

-- method CellArea::activate_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering onto", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer in @area to activate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "event", argType = TInterface (Name {namespace = "Gdk", name = "Event"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GdkEvent for which cell activation should occur", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GdkRectangle in @widget relative coordinates\n            of @renderer for the current row.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Gtk", name = "CellRendererState"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRendererState for @renderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_activate_cell" gtk_cell_area_activate_cell ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "CellRendererState"})
    IO CInt

{- |
This is used by 'GI.Gtk.Objects.CellArea.CellArea' subclasses when handling events
to activate cells, the base 'GI.Gtk.Objects.CellArea.CellArea' class activates cells
for keyboard events for free in its own GtkCellArea->@/activate()/@
implementation.

/Since: 3.0/
-}
cellAreaActivateCell ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.Widget.IsWidget b, Gtk.CellRenderer.IsCellRenderer c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering onto -}
    -> c
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' in /@area@/ to activate -}
    -> Gdk.Event.Event
    {- ^ /@event@/: the 'GI.Gdk.Unions.Event.Event' for which cell activation should occur -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the 'GI.Gdk.Structs.Rectangle.Rectangle' in /@widget@/ relative coordinates
            of /@renderer@/ for the current row. -}
    -> [Gtk.Flags.CellRendererState]
    {- ^ /@flags@/: the 'GI.Gtk.Flags.CellRendererState' for /@renderer@/ -}
    -> m Bool
    {- ^ __Returns:__ whether cell activation was successful -}
cellAreaActivateCell area widget renderer event cellArea flags = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    widget' <- unsafeManagedPtrCastPtr widget
    renderer' <- unsafeManagedPtrCastPtr renderer
    event' <- unsafeManagedPtrGetPtr event
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    let flags' = gflagsToWord flags
    result <- gtk_cell_area_activate_cell area' widget' renderer' event' cellArea' flags'
    let result' = (/= 0) result
    touchManagedPtr area
    touchManagedPtr widget
    touchManagedPtr renderer
    touchManagedPtr event
    touchManagedPtr cellArea
    return result'

#if ENABLE_OVERLOADING
data CellAreaActivateCellMethodInfo
instance (signature ~ (b -> c -> Gdk.Event.Event -> Gdk.Rectangle.Rectangle -> [Gtk.Flags.CellRendererState] -> m Bool), MonadIO m, IsCellArea a, Gtk.Widget.IsWidget b, Gtk.CellRenderer.IsCellRenderer c) => O.MethodInfo CellAreaActivateCellMethodInfo a signature where
    overloadedMethod _ = cellAreaActivateCell

#endif

-- method CellArea::add
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to add to @area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_add" gtk_cell_area_add ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO ()

{- |
Adds /@renderer@/ to /@area@/ with the default child cell properties.

/Since: 3.0/
-}
cellAreaAdd ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to add to /@area@/ -}
    -> m ()
cellAreaAdd area renderer = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    gtk_cell_area_add area' renderer'
    touchManagedPtr area
    touchManagedPtr renderer
    return ()

#if ENABLE_OVERLOADING
data CellAreaAddMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaAddMethodInfo a signature where
    overloadedMethod _ = cellAreaAdd

#endif

-- method CellArea::add_focus_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer expected to have focus", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sibling", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to add to @renderer\8217s focus area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_add_focus_sibling" gtk_cell_area_add_focus_sibling ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- sibling : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO ()

{- |
Adds /@sibling@/ to /@renderer@/’s focusable area, focus will be drawn
around /@renderer@/ and all of its siblings if /@renderer@/ can
focus for a given row.

Events handled by focus siblings can also activate the given
focusable /@renderer@/.

/Since: 3.0/
-}
cellAreaAddFocusSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.CellRenderer.IsCellRenderer c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' expected to have focus -}
    -> c
    {- ^ /@sibling@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to add to /@renderer@/’s focus area -}
    -> m ()
cellAreaAddFocusSibling area renderer sibling = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    sibling' <- unsafeManagedPtrCastPtr sibling
    gtk_cell_area_add_focus_sibling area' renderer' sibling'
    touchManagedPtr area
    touchManagedPtr renderer
    touchManagedPtr sibling
    return ()

#if ENABLE_OVERLOADING
data CellAreaAddFocusSiblingMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.CellRenderer.IsCellRenderer c) => O.MethodInfo CellAreaAddFocusSiblingMethodInfo a signature where
    overloadedMethod _ = cellAreaAddFocusSibling

#endif

-- method CellArea::apply_attributes
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tree_model", argType = TInterface (Name {namespace = "Gtk", name = "TreeModel"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTreeModel to pull values from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "iter", argType = TInterface (Name {namespace = "Gtk", name = "TreeIter"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTreeIter in @tree_model to apply values for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_expander", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether @iter has children", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "is_expanded", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether @iter is expanded in the view and\n              children are visible", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_apply_attributes" gtk_cell_area_apply_attributes ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.TreeModel.TreeModel ->          -- tree_model : TInterface (Name {namespace = "Gtk", name = "TreeModel"})
    Ptr Gtk.TreeIter.TreeIter ->            -- iter : TInterface (Name {namespace = "Gtk", name = "TreeIter"})
    CInt ->                                 -- is_expander : TBasicType TBoolean
    CInt ->                                 -- is_expanded : TBasicType TBoolean
    IO ()

{- |
Applies any connected attributes to the renderers in
/@area@/ by pulling the values from /@treeModel@/.

/Since: 3.0/
-}
cellAreaApplyAttributes ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.TreeModel.IsTreeModel b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@treeModel@/: the 'GI.Gtk.Interfaces.TreeModel.TreeModel' to pull values from -}
    -> Gtk.TreeIter.TreeIter
    {- ^ /@iter@/: the 'GI.Gtk.Structs.TreeIter.TreeIter' in /@treeModel@/ to apply values for -}
    -> Bool
    {- ^ /@isExpander@/: whether /@iter@/ has children -}
    -> Bool
    {- ^ /@isExpanded@/: whether /@iter@/ is expanded in the view and
              children are visible -}
    -> m ()
cellAreaApplyAttributes area treeModel iter isExpander isExpanded = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    treeModel' <- unsafeManagedPtrCastPtr treeModel
    iter' <- unsafeManagedPtrGetPtr iter
    let isExpander' = (fromIntegral . fromEnum) isExpander
    let isExpanded' = (fromIntegral . fromEnum) isExpanded
    gtk_cell_area_apply_attributes area' treeModel' iter' isExpander' isExpanded'
    touchManagedPtr area
    touchManagedPtr treeModel
    touchManagedPtr iter
    return ()

#if ENABLE_OVERLOADING
data CellAreaApplyAttributesMethodInfo
instance (signature ~ (b -> Gtk.TreeIter.TreeIter -> Bool -> Bool -> m ()), MonadIO m, IsCellArea a, Gtk.TreeModel.IsTreeModel b) => O.MethodInfo CellAreaApplyAttributesMethodInfo a signature where
    overloadedMethod _ = cellAreaApplyAttributes

#endif

-- method CellArea::attribute_connect
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to connect an attribute for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute name", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "column", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkTreeModel column to fetch attribute values from", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_attribute_connect" gtk_cell_area_attribute_connect ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    CString ->                              -- attribute : TBasicType TUTF8
    Int32 ->                                -- column : TBasicType TInt
    IO ()

{- |
Connects an /@attribute@/ to apply values from /@column@/ for the
'GI.Gtk.Interfaces.TreeModel.TreeModel' in use.

/Since: 3.0/
-}
cellAreaAttributeConnect ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to connect an attribute for -}
    -> T.Text
    {- ^ /@attribute@/: the attribute name -}
    -> Int32
    {- ^ /@column@/: the 'GI.Gtk.Interfaces.TreeModel.TreeModel' column to fetch attribute values from -}
    -> m ()
cellAreaAttributeConnect area renderer attribute column = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    attribute' <- textToCString attribute
    gtk_cell_area_attribute_connect area' renderer' attribute' column
    touchManagedPtr area
    touchManagedPtr renderer
    freeMem attribute'
    return ()

#if ENABLE_OVERLOADING
data CellAreaAttributeConnectMethodInfo
instance (signature ~ (b -> T.Text -> Int32 -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaAttributeConnectMethodInfo a signature where
    overloadedMethod _ = cellAreaAttributeConnect

#endif

-- method CellArea::attribute_disconnect
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to disconnect an attribute for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the attribute name", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_attribute_disconnect" gtk_cell_area_attribute_disconnect ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    CString ->                              -- attribute : TBasicType TUTF8
    IO ()

{- |
Disconnects /@attribute@/ for the /@renderer@/ in /@area@/ so that
attribute will no longer be updated with values from the
model.

/Since: 3.0/
-}
cellAreaAttributeDisconnect ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to disconnect an attribute for -}
    -> T.Text
    {- ^ /@attribute@/: the attribute name -}
    -> m ()
cellAreaAttributeDisconnect area renderer attribute = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    attribute' <- textToCString attribute
    gtk_cell_area_attribute_disconnect area' renderer' attribute'
    touchManagedPtr area
    touchManagedPtr renderer
    freeMem attribute'
    return ()

#if ENABLE_OVERLOADING
data CellAreaAttributeDisconnectMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaAttributeDisconnectMethodInfo a signature where
    overloadedMethod _ = cellAreaAttributeDisconnect

#endif

-- method CellArea::attribute_get_column
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "attribute", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an attribute on the renderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_attribute_get_column" gtk_cell_area_attribute_get_column ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    CString ->                              -- attribute : TBasicType TUTF8
    IO Int32

{- |
Returns the model column that an attribute has been mapped to,
or -1 if the attribute is not mapped.

/Since: 3.14/
-}
cellAreaAttributeGetColumn ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: a 'GI.Gtk.Objects.CellRenderer.CellRenderer' -}
    -> T.Text
    {- ^ /@attribute@/: an attribute on the renderer -}
    -> m Int32
    {- ^ __Returns:__ the model column, or -1 -}
cellAreaAttributeGetColumn area renderer attribute = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    attribute' <- textToCString attribute
    result <- gtk_cell_area_attribute_get_column area' renderer' attribute'
    touchManagedPtr area
    touchManagedPtr renderer
    freeMem attribute'
    return result

#if ENABLE_OVERLOADING
data CellAreaAttributeGetColumnMethodInfo
instance (signature ~ (b -> T.Text -> m Int32), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaAttributeGetColumnMethodInfo a signature where
    overloadedMethod _ = cellAreaAttributeGetColumn

#endif

-- method CellArea::cell_get_property
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellRenderer inside @area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the property to get", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a location to return the value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_cell_get_property" gtk_cell_area_cell_get_property ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface (Name {namespace = "GObject", name = "Value"})
    IO ()

{- |
Gets the value of a cell property for /@renderer@/ in /@area@/.

/Since: 3.0/
-}
cellAreaCellGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: a 'GI.Gtk.Objects.CellRenderer.CellRenderer' inside /@area@/ -}
    -> T.Text
    {- ^ /@propertyName@/: the name of the property to get -}
    -> GValue
    {- ^ /@value@/: a location to return the value -}
    -> m ()
cellAreaCellGetProperty area renderer propertyName value = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    propertyName' <- textToCString propertyName
    value' <- unsafeManagedPtrGetPtr value
    gtk_cell_area_cell_get_property area' renderer' propertyName' value'
    touchManagedPtr area
    touchManagedPtr renderer
    touchManagedPtr value
    freeMem propertyName'
    return ()

#if ENABLE_OVERLOADING
data CellAreaCellGetPropertyMethodInfo
instance (signature ~ (b -> T.Text -> GValue -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaCellGetPropertyMethodInfo a signature where
    overloadedMethod _ = cellAreaCellGetProperty

#endif

-- method CellArea::cell_set_property
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellRenderer inside @area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "property_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the cell property to set", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the value to set the cell property to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_cell_set_property" gtk_cell_area_cell_set_property ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TInterface (Name {namespace = "GObject", name = "Value"})
    IO ()

{- |
Sets a cell property for /@renderer@/ in /@area@/.

/Since: 3.0/
-}
cellAreaCellSetProperty ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: a 'GI.Gtk.Objects.CellRenderer.CellRenderer' inside /@area@/ -}
    -> T.Text
    {- ^ /@propertyName@/: the name of the cell property to set -}
    -> GValue
    {- ^ /@value@/: the value to set the cell property to -}
    -> m ()
cellAreaCellSetProperty area renderer propertyName value = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    propertyName' <- textToCString propertyName
    value' <- unsafeManagedPtrGetPtr value
    gtk_cell_area_cell_set_property area' renderer' propertyName' value'
    touchManagedPtr area
    touchManagedPtr renderer
    touchManagedPtr value
    freeMem propertyName'
    return ()

#if ENABLE_OVERLOADING
data CellAreaCellSetPropertyMethodInfo
instance (signature ~ (b -> T.Text -> GValue -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaCellSetPropertyMethodInfo a signature where
    overloadedMethod _ = cellAreaCellSetProperty

#endif

-- method CellArea::copy_context
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext to copy", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_copy_context" gtk_cell_area_copy_context ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    IO (Ptr Gtk.CellAreaContext.CellAreaContext)

{- |
This is sometimes needed for cases where rows need to share
alignments in one orientation but may be separately grouped
in the opposing orientation.

For instance, 'GI.Gtk.Objects.IconView.IconView' creates all icons (rows) to have
the same width and the cells theirin to have the same
horizontal alignments. However each row of icons may have
a separate collective height. 'GI.Gtk.Objects.IconView.IconView' uses this to
request the heights of each row based on a context which
was already used to request all the row widths that are
to be displayed.

/Since: 3.0/
-}
cellAreaCopyContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' to copy -}
    -> m Gtk.CellAreaContext.CellAreaContext
    {- ^ __Returns:__ a newly created 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' copy of /@context@/. -}
cellAreaCopyContext area context = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    result <- gtk_cell_area_copy_context area' context'
    checkUnexpectedReturnNULL "cellAreaCopyContext" result
    result' <- (wrapObject Gtk.CellAreaContext.CellAreaContext) result
    touchManagedPtr area
    touchManagedPtr context
    return result'

#if ENABLE_OVERLOADING
data CellAreaCopyContextMethodInfo
instance (signature ~ (b -> m Gtk.CellAreaContext.CellAreaContext), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b) => O.MethodInfo CellAreaCopyContextMethodInfo a signature where
    overloadedMethod _ = cellAreaCopyContext

#endif

-- method CellArea::create_context
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_create_context" gtk_cell_area_create_context ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    IO (Ptr Gtk.CellAreaContext.CellAreaContext)

{- |
Creates a 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' to be used with /@area@/ for
all purposes. 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' stores geometry information
for rows for which it was operated on, it is important to use
the same context for the same row of data at all times (i.e.
one should render and handle events with the same 'GI.Gtk.Objects.CellAreaContext.CellAreaContext'
which was used to request the size of those rows of data).

/Since: 3.0/
-}
cellAreaCreateContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> m Gtk.CellAreaContext.CellAreaContext
    {- ^ __Returns:__ a newly created 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' which can be used with /@area@/. -}
cellAreaCreateContext area = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    result <- gtk_cell_area_create_context area'
    checkUnexpectedReturnNULL "cellAreaCreateContext" result
    result' <- (wrapObject Gtk.CellAreaContext.CellAreaContext) result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaCreateContextMethodInfo
instance (signature ~ (m Gtk.CellAreaContext.CellAreaContext), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaCreateContextMethodInfo a signature where
    overloadedMethod _ = cellAreaCreateContext

#endif

-- method CellArea::event
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext for this row of data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "event", argType = TInterface (Name {namespace = "Gdk", name = "Event"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GdkEvent to handle", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the @widget relative coordinates for @area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Gtk", name = "CellRendererState"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRendererState for @area in this row.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_event" gtk_cell_area_event ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "CellRendererState"})
    IO Int32

{- |
Delegates event handling to a 'GI.Gtk.Objects.CellArea.CellArea'.

/Since: 3.0/
-}
cellAreaEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' for this row of data. -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering to -}
    -> Gdk.Event.Event
    {- ^ /@event@/: the 'GI.Gdk.Unions.Event.Event' to handle -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the /@widget@/ relative coordinates for /@area@/ -}
    -> [Gtk.Flags.CellRendererState]
    {- ^ /@flags@/: the 'GI.Gtk.Flags.CellRendererState' for /@area@/ in this row. -}
    -> m Int32
    {- ^ __Returns:__ 'True' if the event was handled by /@area@/. -}
cellAreaEvent area context widget event cellArea flags = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    event' <- unsafeManagedPtrGetPtr event
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    let flags' = gflagsToWord flags
    result <- gtk_cell_area_event area' context' widget' event' cellArea' flags'
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr event
    touchManagedPtr cellArea
    return result

#if ENABLE_OVERLOADING
data CellAreaEventMethodInfo
instance (signature ~ (b -> c -> Gdk.Event.Event -> Gdk.Rectangle.Rectangle -> [Gtk.Flags.CellRendererState] -> m Int32), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaEventMethodInfo a signature where
    overloadedMethod _ = cellAreaEvent

#endif

-- method CellArea::focus
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "direction", argType = TInterface (Name {namespace = "Gtk", name = "DirectionType"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkDirectionType", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_focus" gtk_cell_area_focus ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "Gtk", name = "DirectionType"})
    IO CInt

{- |
This should be called by the /@area@/’s owning layout widget
when focus is to be passed to /@area@/, or moved within /@area@/
for a given /@direction@/ and row data.

Implementing 'GI.Gtk.Objects.CellArea.CellArea' classes should implement this
method to receive and navigate focus in its own way particular
to how it lays out cells.

/Since: 3.0/
-}
cellAreaFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> Gtk.Enums.DirectionType
    {- ^ /@direction@/: the 'GI.Gtk.Enums.DirectionType' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if focus remains inside /@area@/ as a result of this call. -}
cellAreaFocus area direction = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    let direction' = (fromIntegral . fromEnum) direction
    result <- gtk_cell_area_focus area' direction'
    let result' = (/= 0) result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaFocusMethodInfo
instance (signature ~ (Gtk.Enums.DirectionType -> m Bool), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaFocusMethodInfo a signature where
    overloadedMethod _ = cellAreaFocus

#endif

-- method CellArea::foreach
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gtk", name = "CellCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellCallback to call", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 2, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user provided data pointer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_foreach" gtk_cell_area_foreach ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    FunPtr Gtk.Callbacks.C_CellCallback ->  -- callback : TInterface (Name {namespace = "Gtk", name = "CellCallback"})
    Ptr () ->                               -- callback_data : TBasicType TPtr
    IO ()

{- |
Calls /@callback@/ for every 'GI.Gtk.Objects.CellRenderer.CellRenderer' in /@area@/.

/Since: 3.0/
-}
cellAreaForeach ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> Gtk.Callbacks.CellCallback
    {- ^ /@callback@/: the 'GI.Gtk.Callbacks.CellCallback' to call -}
    -> m ()
cellAreaForeach area callback = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    callback' <- Gtk.Callbacks.mk_CellCallback (Gtk.Callbacks.wrap_CellCallback Nothing (Gtk.Callbacks.drop_closures_CellCallback callback))
    let callbackData = nullPtr
    gtk_cell_area_foreach area' callback' callbackData
    safeFreeFunPtr $ castFunPtrToPtr callback'
    touchManagedPtr area
    return ()

#if ENABLE_OVERLOADING
data CellAreaForeachMethodInfo
instance (signature ~ (Gtk.Callbacks.CellCallback -> m ()), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaForeachMethodInfo a signature where
    overloadedMethod _ = cellAreaForeach

#endif

-- method CellArea::foreach_alloc
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext for this row of data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the @widget relative coordinates and size for @area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "background_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the @widget relative coordinates of the background area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback", argType = TInterface (Name {namespace = "Gtk", name = "CellAllocCallback"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAllocCallback to call", sinceVersion = Nothing}, argScope = ScopeTypeCall, argClosure = 6, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "callback_data", argType = TBasicType TPtr, direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "user provided data pointer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_foreach_alloc" gtk_cell_area_foreach_alloc ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Ptr Gdk.Rectangle.Rectangle ->          -- background_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    FunPtr Gtk.Callbacks.C_CellAllocCallback -> -- callback : TInterface (Name {namespace = "Gtk", name = "CellAllocCallback"})
    Ptr () ->                               -- callback_data : TBasicType TPtr
    IO ()

{- |
Calls /@callback@/ for every 'GI.Gtk.Objects.CellRenderer.CellRenderer' in /@area@/ with the
allocated rectangle inside /@cellArea@/.

/Since: 3.0/
-}
cellAreaForeachAlloc ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' for this row of data. -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering to -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the /@widget@/ relative coordinates and size for /@area@/ -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@backgroundArea@/: the /@widget@/ relative coordinates of the background area -}
    -> Gtk.Callbacks.CellAllocCallback
    {- ^ /@callback@/: the 'GI.Gtk.Callbacks.CellAllocCallback' to call -}
    -> m ()
cellAreaForeachAlloc area context widget cellArea backgroundArea callback = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    backgroundArea' <- unsafeManagedPtrGetPtr backgroundArea
    callback' <- Gtk.Callbacks.mk_CellAllocCallback (Gtk.Callbacks.wrap_CellAllocCallback Nothing (Gtk.Callbacks.drop_closures_CellAllocCallback callback))
    let callbackData = nullPtr
    gtk_cell_area_foreach_alloc area' context' widget' cellArea' backgroundArea' callback' callbackData
    safeFreeFunPtr $ castFunPtrToPtr callback'
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cellArea
    touchManagedPtr backgroundArea
    return ()

#if ENABLE_OVERLOADING
data CellAreaForeachAllocMethodInfo
instance (signature ~ (b -> c -> Gdk.Rectangle.Rectangle -> Gdk.Rectangle.Rectangle -> Gtk.Callbacks.CellAllocCallback -> m ()), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaForeachAllocMethodInfo a signature where
    overloadedMethod _ = cellAreaForeachAlloc

#endif

-- method CellArea::get_cell_allocation
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext used to hold sizes for @area.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to get the allocation for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the whole allocated area for @area in @widget\n            for this row", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "allocation", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "where to store the allocation for @renderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_cell_allocation" gtk_cell_area_get_cell_allocation ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Ptr Gdk.Rectangle.Rectangle ->          -- allocation : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO ()

{- |
Derives the allocation of /@renderer@/ inside /@area@/ if /@area@/
were to be renderered in /@cellArea@/.

/Since: 3.0/
-}
cellAreaGetCellAllocation ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c, Gtk.CellRenderer.IsCellRenderer d) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' used to hold sizes for /@area@/. -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering on -}
    -> d
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to get the allocation for -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the whole allocated area for /@area@/ in /@widget@/
            for this row -}
    -> m (Gdk.Rectangle.Rectangle)
cellAreaGetCellAllocation area context widget renderer cellArea = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    renderer' <- unsafeManagedPtrCastPtr renderer
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    allocation <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    gtk_cell_area_get_cell_allocation area' context' widget' renderer' cellArea' allocation
    allocation' <- (wrapBoxed Gdk.Rectangle.Rectangle) allocation
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr renderer
    touchManagedPtr cellArea
    return allocation'

#if ENABLE_OVERLOADING
data CellAreaGetCellAllocationMethodInfo
instance (signature ~ (b -> c -> d -> Gdk.Rectangle.Rectangle -> m (Gdk.Rectangle.Rectangle)), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c, Gtk.CellRenderer.IsCellRenderer d) => O.MethodInfo CellAreaGetCellAllocationMethodInfo a signature where
    overloadedMethod _ = cellAreaGetCellAllocation

#endif

-- method CellArea::get_cell_at_position
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext used to hold sizes for @area.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering on", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the whole allocated area for @area in @widget\n            for this row", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the x position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the y position", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alloc_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "where to store the inner allocated area of the\n                                 returned cell renderer, or %NULL.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "CellRenderer"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_cell_at_position" gtk_cell_area_get_cell_at_position ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Ptr Gdk.Rectangle.Rectangle ->          -- alloc_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO (Ptr Gtk.CellRenderer.CellRenderer)

{- |
Gets the 'GI.Gtk.Objects.CellRenderer.CellRenderer' at /@x@/ and /@y@/ coordinates inside /@area@/ and optionally
returns the full cell allocation for it inside /@cellArea@/.

/Since: 3.0/
-}
cellAreaGetCellAtPosition ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' used to hold sizes for /@area@/. -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering on -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the whole allocated area for /@area@/ in /@widget@/
            for this row -}
    -> Int32
    {- ^ /@x@/: the x position -}
    -> Int32
    {- ^ /@y@/: the y position -}
    -> m ((Gtk.CellRenderer.CellRenderer, Gdk.Rectangle.Rectangle))
    {- ^ __Returns:__ the 'GI.Gtk.Objects.CellRenderer.CellRenderer' at /@x@/ and /@y@/. -}
cellAreaGetCellAtPosition area context widget cellArea x y = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    allocArea <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    result <- gtk_cell_area_get_cell_at_position area' context' widget' cellArea' x y allocArea
    checkUnexpectedReturnNULL "cellAreaGetCellAtPosition" result
    result' <- (newObject Gtk.CellRenderer.CellRenderer) result
    allocArea' <- (wrapBoxed Gdk.Rectangle.Rectangle) allocArea
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cellArea
    return (result', allocArea')

#if ENABLE_OVERLOADING
data CellAreaGetCellAtPositionMethodInfo
instance (signature ~ (b -> c -> Gdk.Rectangle.Rectangle -> Int32 -> Int32 -> m ((Gtk.CellRenderer.CellRenderer, Gdk.Rectangle.Rectangle))), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaGetCellAtPositionMethodInfo a signature where
    overloadedMethod _ = cellAreaGetCellAtPosition

#endif

-- method CellArea::get_current_path_string
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_current_path_string" gtk_cell_area_get_current_path_string ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    IO CString

{- |
Gets the current 'GI.Gtk.Structs.TreePath.TreePath' string for the currently
applied 'GI.Gtk.Structs.TreeIter.TreeIter', this is implicitly updated when
'GI.Gtk.Objects.CellArea.cellAreaApplyAttributes' is called and can be
used to interact with renderers from 'GI.Gtk.Objects.CellArea.CellArea'
subclasses.

/Since: 3.0/
-}
cellAreaGetCurrentPathString ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> m T.Text
    {- ^ __Returns:__ The current 'GI.Gtk.Structs.TreePath.TreePath' string for the current
attributes applied to /@area@/. This string belongs to the area and
should not be freed. -}
cellAreaGetCurrentPathString area = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    result <- gtk_cell_area_get_current_path_string area'
    checkUnexpectedReturnNULL "cellAreaGetCurrentPathString" result
    result' <- cstringToText result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaGetCurrentPathStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaGetCurrentPathStringMethodInfo a signature where
    overloadedMethod _ = cellAreaGetCurrentPathString

#endif

-- method CellArea::get_edit_widget
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "CellEditable"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_edit_widget" gtk_cell_area_get_edit_widget ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    IO (Ptr Gtk.CellEditable.CellEditable)

{- |
Gets the 'GI.Gtk.Interfaces.CellEditable.CellEditable' widget currently used
to edit the currently edited cell.

/Since: 3.0/
-}
cellAreaGetEditWidget ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> m Gtk.CellEditable.CellEditable
    {- ^ __Returns:__ The currently active 'GI.Gtk.Interfaces.CellEditable.CellEditable' widget -}
cellAreaGetEditWidget area = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    result <- gtk_cell_area_get_edit_widget area'
    checkUnexpectedReturnNULL "cellAreaGetEditWidget" result
    result' <- (newObject Gtk.CellEditable.CellEditable) result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaGetEditWidgetMethodInfo
instance (signature ~ (m Gtk.CellEditable.CellEditable), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaGetEditWidgetMethodInfo a signature where
    overloadedMethod _ = cellAreaGetEditWidget

#endif

-- method CellArea::get_edited_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "CellRenderer"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_edited_cell" gtk_cell_area_get_edited_cell ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    IO (Ptr Gtk.CellRenderer.CellRenderer)

{- |
Gets the 'GI.Gtk.Objects.CellRenderer.CellRenderer' in /@area@/ that is currently
being edited.

/Since: 3.0/
-}
cellAreaGetEditedCell ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> m Gtk.CellRenderer.CellRenderer
    {- ^ __Returns:__ The currently edited 'GI.Gtk.Objects.CellRenderer.CellRenderer' -}
cellAreaGetEditedCell area = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    result <- gtk_cell_area_get_edited_cell area'
    checkUnexpectedReturnNULL "cellAreaGetEditedCell" result
    result' <- (newObject Gtk.CellRenderer.CellRenderer) result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaGetEditedCellMethodInfo
instance (signature ~ (m Gtk.CellRenderer.CellRenderer), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaGetEditedCellMethodInfo a signature where
    overloadedMethod _ = cellAreaGetEditedCell

#endif

-- method CellArea::get_focus_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "CellRenderer"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_focus_cell" gtk_cell_area_get_focus_cell ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    IO (Ptr Gtk.CellRenderer.CellRenderer)

{- |
Retrieves the currently focused cell for /@area@/

/Since: 3.0/
-}
cellAreaGetFocusCell ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> m Gtk.CellRenderer.CellRenderer
    {- ^ __Returns:__ the currently focused cell in /@area@/. -}
cellAreaGetFocusCell area = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    result <- gtk_cell_area_get_focus_cell area'
    checkUnexpectedReturnNULL "cellAreaGetFocusCell" result
    result' <- (newObject Gtk.CellRenderer.CellRenderer) result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaGetFocusCellMethodInfo
instance (signature ~ (m Gtk.CellRenderer.CellRenderer), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaGetFocusCellMethodInfo a signature where
    overloadedMethod _ = cellAreaGetFocusCell

#endif

-- method CellArea::get_focus_from_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "CellRenderer"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_focus_from_sibling" gtk_cell_area_get_focus_from_sibling ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO (Ptr Gtk.CellRenderer.CellRenderer)

{- |
Gets the 'GI.Gtk.Objects.CellRenderer.CellRenderer' which is expected to be focusable
for which /@renderer@/ is, or may be a sibling.

This is handy for 'GI.Gtk.Objects.CellArea.CellArea' subclasses when handling events,
after determining the renderer at the event location it can
then chose to activate the focus cell for which the event
cell may have been a sibling.

/Since: 3.0/
-}
cellAreaGetFocusFromSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' -}
    -> m (Maybe Gtk.CellRenderer.CellRenderer)
    {- ^ __Returns:__ the 'GI.Gtk.Objects.CellRenderer.CellRenderer' for which /@renderer@/
   is a sibling, or 'Nothing'. -}
cellAreaGetFocusFromSibling area renderer = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    result <- gtk_cell_area_get_focus_from_sibling area' renderer'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (newObject Gtk.CellRenderer.CellRenderer) result'
        return result''
    touchManagedPtr area
    touchManagedPtr renderer
    return maybeResult

#if ENABLE_OVERLOADING
data CellAreaGetFocusFromSiblingMethodInfo
instance (signature ~ (b -> m (Maybe Gtk.CellRenderer.CellRenderer)), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaGetFocusFromSiblingMethodInfo a signature where
    overloadedMethod _ = cellAreaGetFocusFromSibling

#endif

-- method CellArea::get_focus_siblings
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer expected to have focus", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TGList (TInterface (Name {namespace = "Gtk", name = "CellRenderer"})))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_focus_siblings" gtk_cell_area_get_focus_siblings ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO (Ptr (GList (Ptr Gtk.CellRenderer.CellRenderer)))

{- |
Gets the focus sibling cell renderers for /@renderer@/.

/Since: 3.0/
-}
cellAreaGetFocusSiblings ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' expected to have focus -}
    -> m [Gtk.CellRenderer.CellRenderer]
    {- ^ __Returns:__ A 'GI.GLib.Structs.List.List' of @/GtkCellRenderers/@.
      The returned list is internal and should not be freed. -}
cellAreaGetFocusSiblings area renderer = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    result <- gtk_cell_area_get_focus_siblings area' renderer'
    result' <- unpackGList result
    result'' <- mapM (newObject Gtk.CellRenderer.CellRenderer) result'
    touchManagedPtr area
    touchManagedPtr renderer
    return result''

#if ENABLE_OVERLOADING
data CellAreaGetFocusSiblingsMethodInfo
instance (signature ~ (b -> m [Gtk.CellRenderer.CellRenderer]), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaGetFocusSiblingsMethodInfo a signature where
    overloadedMethod _ = cellAreaGetFocusSiblings

#endif

-- method CellArea::get_preferred_height
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext to perform this request with", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget where @area will be rendering", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minimum_height", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the minimum height, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural_height", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the natural height, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_preferred_height" gtk_cell_area_get_preferred_height ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt
    Ptr Int32 ->                            -- natural_height : TBasicType TInt
    IO ()

{- |
Retrieves a cell area’s initial minimum and natural height.

/@area@/ will store some geometrical information in /@context@/ along the way;
when requesting sizes over an arbitrary number of rows, it’s not important
to check the /@minimumHeight@/ and /@naturalHeight@/ of this call but rather to
consult 'GI.Gtk.Objects.CellAreaContext.cellAreaContextGetPreferredHeight' after a series of
requests.

/Since: 3.0/
-}
cellAreaGetPreferredHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' to perform this request with -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' where /@area@/ will be rendering -}
    -> m ((Int32, Int32))
cellAreaGetPreferredHeight area context widget = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    minimumHeight <- allocMem :: IO (Ptr Int32)
    naturalHeight <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_height area' context' widget' minimumHeight naturalHeight
    minimumHeight' <- peek minimumHeight
    naturalHeight' <- peek naturalHeight
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimumHeight
    freeMem naturalHeight
    return (minimumHeight', naturalHeight')

#if ENABLE_OVERLOADING
data CellAreaGetPreferredHeightMethodInfo
instance (signature ~ (b -> c -> m ((Int32, Int32))), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaGetPreferredHeightMethodInfo a signature where
    overloadedMethod _ = cellAreaGetPreferredHeight

#endif

-- method CellArea::get_preferred_height_for_width
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext which has already been requested for widths.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget where @area will be rendering", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "width", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the width for which to check the height of this area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minimum_height", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the minimum height, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural_height", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the natural height, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_preferred_height_for_width" gtk_cell_area_get_preferred_height_for_width ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- width : TBasicType TInt
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt
    Ptr Int32 ->                            -- natural_height : TBasicType TInt
    IO ()

{- |
Retrieves a cell area’s minimum and natural height if it would be given
the specified /@width@/.

/@area@/ stores some geometrical information in /@context@/ along the way
while calling 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredWidth'. It’s important to
perform a series of 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredWidth' requests with
/@context@/ first and then call 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredHeightForWidth'
on each cell area individually to get the height for width of each
fully requested row.

If at some point, the width of a single row changes, it should be
requested with 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredWidth' again and then
the full width of the requested rows checked again with
'GI.Gtk.Objects.CellAreaContext.cellAreaContextGetPreferredWidth'.

/Since: 3.0/
-}
cellAreaGetPreferredHeightForWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' which has already been requested for widths. -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' where /@area@/ will be rendering -}
    -> Int32
    {- ^ /@width@/: the width for which to check the height of this area -}
    -> m ((Int32, Int32))
cellAreaGetPreferredHeightForWidth area context widget width = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    minimumHeight <- allocMem :: IO (Ptr Int32)
    naturalHeight <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_height_for_width area' context' widget' width minimumHeight naturalHeight
    minimumHeight' <- peek minimumHeight
    naturalHeight' <- peek naturalHeight
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimumHeight
    freeMem naturalHeight
    return (minimumHeight', naturalHeight')

#if ENABLE_OVERLOADING
data CellAreaGetPreferredHeightForWidthMethodInfo
instance (signature ~ (b -> c -> Int32 -> m ((Int32, Int32))), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaGetPreferredHeightForWidthMethodInfo a signature where
    overloadedMethod _ = cellAreaGetPreferredHeightForWidth

#endif

-- method CellArea::get_preferred_width
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext to perform this request with", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget where @area will be rendering", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minimum_width", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the minimum width, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural_width", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the natural width, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_preferred_width" gtk_cell_area_get_preferred_width ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt
    Ptr Int32 ->                            -- natural_width : TBasicType TInt
    IO ()

{- |
Retrieves a cell area’s initial minimum and natural width.

/@area@/ will store some geometrical information in /@context@/ along the way;
when requesting sizes over an arbitrary number of rows, it’s not important
to check the /@minimumWidth@/ and /@naturalWidth@/ of this call but rather to
consult 'GI.Gtk.Objects.CellAreaContext.cellAreaContextGetPreferredWidth' after a series of
requests.

/Since: 3.0/
-}
cellAreaGetPreferredWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' to perform this request with -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' where /@area@/ will be rendering -}
    -> m ((Int32, Int32))
cellAreaGetPreferredWidth area context widget = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    minimumWidth <- allocMem :: IO (Ptr Int32)
    naturalWidth <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_width area' context' widget' minimumWidth naturalWidth
    minimumWidth' <- peek minimumWidth
    naturalWidth' <- peek naturalWidth
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimumWidth
    freeMem naturalWidth
    return (minimumWidth', naturalWidth')

#if ENABLE_OVERLOADING
data CellAreaGetPreferredWidthMethodInfo
instance (signature ~ (b -> c -> m ((Int32, Int32))), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaGetPreferredWidthMethodInfo a signature where
    overloadedMethod _ = cellAreaGetPreferredWidth

#endif

-- method CellArea::get_preferred_width_for_height
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext which has already been requested for widths.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget where @area will be rendering", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "height", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the height for which to check the width of this area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minimum_width", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the minimum width, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural_width", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the natural width, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_preferred_width_for_height" gtk_cell_area_get_preferred_width_for_height ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- height : TBasicType TInt
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt
    Ptr Int32 ->                            -- natural_width : TBasicType TInt
    IO ()

{- |
Retrieves a cell area’s minimum and natural width if it would be given
the specified /@height@/.

/@area@/ stores some geometrical information in /@context@/ along the way
while calling 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredHeight'. It’s important to
perform a series of 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredHeight' requests with
/@context@/ first and then call 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredWidthForHeight'
on each cell area individually to get the height for width of each
fully requested row.

If at some point, the height of a single row changes, it should be
requested with 'GI.Gtk.Objects.CellArea.cellAreaGetPreferredHeight' again and then
the full height of the requested rows checked again with
'GI.Gtk.Objects.CellAreaContext.cellAreaContextGetPreferredHeight'.

/Since: 3.0/
-}
cellAreaGetPreferredWidthForHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' which has already been requested for widths. -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' where /@area@/ will be rendering -}
    -> Int32
    {- ^ /@height@/: the height for which to check the width of this area -}
    -> m ((Int32, Int32))
cellAreaGetPreferredWidthForHeight area context widget height = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    minimumWidth <- allocMem :: IO (Ptr Int32)
    naturalWidth <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_get_preferred_width_for_height area' context' widget' height minimumWidth naturalWidth
    minimumWidth' <- peek minimumWidth
    naturalWidth' <- peek naturalWidth
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    freeMem minimumWidth
    freeMem naturalWidth
    return (minimumWidth', naturalWidth')

#if ENABLE_OVERLOADING
data CellAreaGetPreferredWidthForHeightMethodInfo
instance (signature ~ (b -> c -> Int32 -> m ((Int32, Int32))), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaGetPreferredWidthForHeightMethodInfo a signature where
    overloadedMethod _ = cellAreaGetPreferredWidthForHeight

#endif

-- method CellArea::get_request_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "SizeRequestMode"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_get_request_mode" gtk_cell_area_get_request_mode ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    IO CUInt

{- |
Gets whether the area prefers a height-for-width layout
or a width-for-height layout.

/Since: 3.0/
-}
cellAreaGetRequestMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> m Gtk.Enums.SizeRequestMode
    {- ^ __Returns:__ The 'GI.Gtk.Enums.SizeRequestMode' preferred by /@area@/. -}
cellAreaGetRequestMode area = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    result <- gtk_cell_area_get_request_mode area'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaGetRequestModeMethodInfo
instance (signature ~ (m Gtk.Enums.SizeRequestMode), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaGetRequestModeMethodInfo a signature where
    overloadedMethod _ = cellAreaGetRequestMode

#endif

-- method CellArea::has_renderer
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to check", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_has_renderer" gtk_cell_area_has_renderer ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO CInt

{- |
Checks if /@area@/ contains /@renderer@/.

/Since: 3.0/
-}
cellAreaHasRenderer ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to check -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@renderer@/ is in the /@area@/. -}
cellAreaHasRenderer area renderer = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    result <- gtk_cell_area_has_renderer area' renderer'
    let result' = (/= 0) result
    touchManagedPtr area
    touchManagedPtr renderer
    return result'

#if ENABLE_OVERLOADING
data CellAreaHasRendererMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaHasRendererMethodInfo a signature where
    overloadedMethod _ = cellAreaHasRenderer

#endif

-- method CellArea::inner_cell_area
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering onto", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the @widget relative coordinates where one of @area\8217s cells\n            is to be placed", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "inner_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the return location for the inner cell area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_inner_cell_area" gtk_cell_area_inner_cell_area ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Ptr Gdk.Rectangle.Rectangle ->          -- inner_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO ()

{- |
This is a convenience function for 'GI.Gtk.Objects.CellArea.CellArea' implementations
to get the inner area where a given 'GI.Gtk.Objects.CellRenderer.CellRenderer' will be
rendered. It removes any padding previously added by 'GI.Gtk.Objects.CellArea.cellAreaRequestRenderer'.

/Since: 3.0/
-}
cellAreaInnerCellArea ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.Widget.IsWidget b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering onto -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the /@widget@/ relative coordinates where one of /@area@/’s cells
            is to be placed -}
    -> m (Gdk.Rectangle.Rectangle)
cellAreaInnerCellArea area widget cellArea = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    widget' <- unsafeManagedPtrCastPtr widget
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    innerArea <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    gtk_cell_area_inner_cell_area area' widget' cellArea' innerArea
    innerArea' <- (wrapBoxed Gdk.Rectangle.Rectangle) innerArea
    touchManagedPtr area
    touchManagedPtr widget
    touchManagedPtr cellArea
    return innerArea'

#if ENABLE_OVERLOADING
data CellAreaInnerCellAreaMethodInfo
instance (signature ~ (b -> Gdk.Rectangle.Rectangle -> m (Gdk.Rectangle.Rectangle)), MonadIO m, IsCellArea a, Gtk.Widget.IsWidget b) => O.MethodInfo CellAreaInnerCellAreaMethodInfo a signature where
    overloadedMethod _ = cellAreaInnerCellArea

#endif

-- method CellArea::is_activatable
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_is_activatable" gtk_cell_area_is_activatable ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    IO CInt

{- |
Returns whether the area can do anything when activated,
after applying new attributes to /@area@/.

/Since: 3.0/
-}
cellAreaIsActivatable ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> m Bool
    {- ^ __Returns:__ whether /@area@/ can do anything when activated. -}
cellAreaIsActivatable area = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    result <- gtk_cell_area_is_activatable area'
    let result' = (/= 0) result
    touchManagedPtr area
    return result'

#if ENABLE_OVERLOADING
data CellAreaIsActivatableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaIsActivatableMethodInfo a signature where
    overloadedMethod _ = cellAreaIsActivatable

#endif

-- method CellArea::is_focus_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer expected to have focus", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sibling", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to check against @renderer\8217s sibling list", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_is_focus_sibling" gtk_cell_area_is_focus_sibling ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- sibling : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO CInt

{- |
Returns whether /@sibling@/ is one of /@renderer@/’s focus siblings
(see 'GI.Gtk.Objects.CellArea.cellAreaAddFocusSibling').

/Since: 3.0/
-}
cellAreaIsFocusSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.CellRenderer.IsCellRenderer c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' expected to have focus -}
    -> c
    {- ^ /@sibling@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to check against /@renderer@/’s sibling list -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@sibling@/ is a focus sibling of /@renderer@/ -}
cellAreaIsFocusSibling area renderer sibling = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    sibling' <- unsafeManagedPtrCastPtr sibling
    result <- gtk_cell_area_is_focus_sibling area' renderer' sibling'
    let result' = (/= 0) result
    touchManagedPtr area
    touchManagedPtr renderer
    touchManagedPtr sibling
    return result'

#if ENABLE_OVERLOADING
data CellAreaIsFocusSiblingMethodInfo
instance (signature ~ (b -> c -> m Bool), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.CellRenderer.IsCellRenderer c) => O.MethodInfo CellAreaIsFocusSiblingMethodInfo a signature where
    overloadedMethod _ = cellAreaIsFocusSibling

#endif

-- method CellArea::remove
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to remove from @area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_remove" gtk_cell_area_remove ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO ()

{- |
Removes /@renderer@/ from /@area@/.

/Since: 3.0/
-}
cellAreaRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to remove from /@area@/ -}
    -> m ()
cellAreaRemove area renderer = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    gtk_cell_area_remove area' renderer'
    touchManagedPtr area
    touchManagedPtr renderer
    return ()

#if ENABLE_OVERLOADING
data CellAreaRemoveMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaRemoveMethodInfo a signature where
    overloadedMethod _ = cellAreaRemove

#endif

-- method CellArea::remove_focus_sibling
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer expected to have focus", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "sibling", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to remove from @renderer\8217s focus area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_remove_focus_sibling" gtk_cell_area_remove_focus_sibling ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- sibling : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO ()

{- |
Removes /@sibling@/ from /@renderer@/’s focus sibling list
(see 'GI.Gtk.Objects.CellArea.cellAreaAddFocusSibling').

/Since: 3.0/
-}
cellAreaRemoveFocusSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.CellRenderer.IsCellRenderer c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' expected to have focus -}
    -> c
    {- ^ /@sibling@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to remove from /@renderer@/’s focus area -}
    -> m ()
cellAreaRemoveFocusSibling area renderer sibling = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    sibling' <- unsafeManagedPtrCastPtr sibling
    gtk_cell_area_remove_focus_sibling area' renderer' sibling'
    touchManagedPtr area
    touchManagedPtr renderer
    touchManagedPtr sibling
    return ()

#if ENABLE_OVERLOADING
data CellAreaRemoveFocusSiblingMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.CellRenderer.IsCellRenderer c) => O.MethodInfo CellAreaRemoveFocusSiblingMethodInfo a signature where
    overloadedMethod _ = cellAreaRemoveFocusSibling

#endif

-- method CellArea::render
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "context", argType = TInterface (Name {namespace = "Gtk", name = "CellAreaContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellAreaContext for this row of data.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cr", argType = TInterface (Name {namespace = "cairo", name = "Context"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #cairo_t to render with", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "background_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the @widget relative coordinates for @area\8217s background", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "cell_area", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the @widget relative coordinates for @area", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "Gtk", name = "CellRendererState"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRendererState for @area in this row.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "paint_focus", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether @area should paint focus on focused cells for focused rows or not.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_render" gtk_cell_area_render ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellAreaContext.CellAreaContext -> -- context : TInterface (Name {namespace = "Gtk", name = "CellAreaContext"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Cairo.Context.Context ->            -- cr : TInterface (Name {namespace = "cairo", name = "Context"})
    Ptr Gdk.Rectangle.Rectangle ->          -- background_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Ptr Gdk.Rectangle.Rectangle ->          -- cell_area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "CellRendererState"})
    CInt ->                                 -- paint_focus : TBasicType TBoolean
    IO ()

{- |
Renders /@area@/’s cells according to /@area@/’s layout onto /@widget@/ at
the given coordinates.

/Since: 3.0/
-}
cellAreaRender ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@context@/: the 'GI.Gtk.Objects.CellAreaContext.CellAreaContext' for this row of data. -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering to -}
    -> Cairo.Context.Context
    {- ^ /@cr@/: the 'GI.Cairo.Structs.Context.Context' to render with -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@backgroundArea@/: the /@widget@/ relative coordinates for /@area@/’s background -}
    -> Gdk.Rectangle.Rectangle
    {- ^ /@cellArea@/: the /@widget@/ relative coordinates for /@area@/ -}
    -> [Gtk.Flags.CellRendererState]
    {- ^ /@flags@/: the 'GI.Gtk.Flags.CellRendererState' for /@area@/ in this row. -}
    -> Bool
    {- ^ /@paintFocus@/: whether /@area@/ should paint focus on focused cells for focused rows or not. -}
    -> m ()
cellAreaRender area context widget cr backgroundArea cellArea flags paintFocus = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    context' <- unsafeManagedPtrCastPtr context
    widget' <- unsafeManagedPtrCastPtr widget
    cr' <- unsafeManagedPtrGetPtr cr
    backgroundArea' <- unsafeManagedPtrGetPtr backgroundArea
    cellArea' <- unsafeManagedPtrGetPtr cellArea
    let flags' = gflagsToWord flags
    let paintFocus' = (fromIntegral . fromEnum) paintFocus
    gtk_cell_area_render area' context' widget' cr' backgroundArea' cellArea' flags' paintFocus'
    touchManagedPtr area
    touchManagedPtr context
    touchManagedPtr widget
    touchManagedPtr cr
    touchManagedPtr backgroundArea
    touchManagedPtr cellArea
    return ()

#if ENABLE_OVERLOADING
data CellAreaRenderMethodInfo
instance (signature ~ (b -> c -> Cairo.Context.Context -> Gdk.Rectangle.Rectangle -> Gdk.Rectangle.Rectangle -> [Gtk.Flags.CellRendererState] -> Bool -> m ()), MonadIO m, IsCellArea a, Gtk.CellAreaContext.IsCellAreaContext b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaRenderMethodInfo a signature where
    overloadedMethod _ = cellAreaRender

#endif

-- method CellArea::request_renderer
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to request size for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "orientation", argType = TInterface (Name {namespace = "Gtk", name = "Orientation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkOrientation in which to request size", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "widget", argType = TInterface (Name {namespace = "Gtk", name = "Widget"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkWidget that @area is rendering onto", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "for_size", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the allocation contextual size to request for, or -1 if\nthe base request for the orientation is to be returned.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minimum_size", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the minimum size, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything},Arg {argCName = "natural_size", argType = TBasicType TInt, direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the natural size, or %NULL", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferEverything}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_request_renderer" gtk_cell_area_request_renderer ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    CUInt ->                                -- orientation : TInterface (Name {namespace = "Gtk", name = "Orientation"})
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- for_size : TBasicType TInt
    Ptr Int32 ->                            -- minimum_size : TBasicType TInt
    Ptr Int32 ->                            -- natural_size : TBasicType TInt
    IO ()

{- |
This is a convenience function for 'GI.Gtk.Objects.CellArea.CellArea' implementations
to request size for cell renderers. It’s important to use this
function to request size and then use 'GI.Gtk.Objects.CellArea.cellAreaInnerCellArea'
at render and event time since this function will add padding
around the cell for focus painting.

/Since: 3.0/
-}
cellAreaRequestRenderer ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.Widget.IsWidget c) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to request size for -}
    -> Gtk.Enums.Orientation
    {- ^ /@orientation@/: the 'GI.Gtk.Enums.Orientation' in which to request size -}
    -> c
    {- ^ /@widget@/: the 'GI.Gtk.Objects.Widget.Widget' that /@area@/ is rendering onto -}
    -> Int32
    {- ^ /@forSize@/: the allocation contextual size to request for, or -1 if
the base request for the orientation is to be returned. -}
    -> m ((Int32, Int32))
cellAreaRequestRenderer area renderer orientation widget forSize = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    let orientation' = (fromIntegral . fromEnum) orientation
    widget' <- unsafeManagedPtrCastPtr widget
    minimumSize <- allocMem :: IO (Ptr Int32)
    naturalSize <- allocMem :: IO (Ptr Int32)
    gtk_cell_area_request_renderer area' renderer' orientation' widget' forSize minimumSize naturalSize
    minimumSize' <- peek minimumSize
    naturalSize' <- peek naturalSize
    touchManagedPtr area
    touchManagedPtr renderer
    touchManagedPtr widget
    freeMem minimumSize
    freeMem naturalSize
    return (minimumSize', naturalSize')

#if ENABLE_OVERLOADING
data CellAreaRequestRendererMethodInfo
instance (signature ~ (b -> Gtk.Enums.Orientation -> c -> Int32 -> m ((Int32, Int32))), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b, Gtk.Widget.IsWidget c) => O.MethodInfo CellAreaRequestRendererMethodInfo a signature where
    overloadedMethod _ = cellAreaRequestRenderer

#endif

-- method CellArea::set_focus_cell
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "renderer", argType = TInterface (Name {namespace = "Gtk", name = "CellRenderer"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GtkCellRenderer to give focus to", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_set_focus_cell" gtk_cell_area_set_focus_cell ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    Ptr Gtk.CellRenderer.CellRenderer ->    -- renderer : TInterface (Name {namespace = "Gtk", name = "CellRenderer"})
    IO ()

{- |
Explicitly sets the currently focused cell to /@renderer@/.

This is generally called by implementations of
'GI.Gtk.Structs.CellAreaClass.CellAreaClass'.@/focus/@() or 'GI.Gtk.Structs.CellAreaClass.CellAreaClass'.@/event/@(),
however it can also be used to implement functions such
as 'GI.Gtk.Objects.TreeView.treeViewSetCursorOnCell'.

/Since: 3.0/
-}
cellAreaSetFocusCell ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> b
    {- ^ /@renderer@/: the 'GI.Gtk.Objects.CellRenderer.CellRenderer' to give focus to -}
    -> m ()
cellAreaSetFocusCell area renderer = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    renderer' <- unsafeManagedPtrCastPtr renderer
    gtk_cell_area_set_focus_cell area' renderer'
    touchManagedPtr area
    touchManagedPtr renderer
    return ()

#if ENABLE_OVERLOADING
data CellAreaSetFocusCellMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsCellArea a, Gtk.CellRenderer.IsCellRenderer b) => O.MethodInfo CellAreaSetFocusCellMethodInfo a signature where
    overloadedMethod _ = cellAreaSetFocusCell

#endif

-- method CellArea::stop_editing
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "area", argType = TInterface (Name {namespace = "Gtk", name = "CellArea"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkCellArea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "canceled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "whether editing was canceled.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_cell_area_stop_editing" gtk_cell_area_stop_editing ::
    Ptr CellArea ->                         -- area : TInterface (Name {namespace = "Gtk", name = "CellArea"})
    CInt ->                                 -- canceled : TBasicType TBoolean
    IO ()

{- |
Explicitly stops the editing of the currently edited cell.

If /@canceled@/ is 'True', the currently edited cell renderer
will emit the ::editing-canceled signal, otherwise the
the ::editing-done signal will be emitted on the current
edit widget.

See 'GI.Gtk.Objects.CellArea.cellAreaGetEditedCell' and 'GI.Gtk.Objects.CellArea.cellAreaGetEditWidget'.

/Since: 3.0/
-}
cellAreaStopEditing ::
    (B.CallStack.HasCallStack, MonadIO m, IsCellArea a) =>
    a
    {- ^ /@area@/: a 'GI.Gtk.Objects.CellArea.CellArea' -}
    -> Bool
    {- ^ /@canceled@/: whether editing was canceled. -}
    -> m ()
cellAreaStopEditing area canceled = liftIO $ do
    area' <- unsafeManagedPtrCastPtr area
    let canceled' = (fromIntegral . fromEnum) canceled
    gtk_cell_area_stop_editing area' canceled'
    touchManagedPtr area
    return ()

#if ENABLE_OVERLOADING
data CellAreaStopEditingMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsCellArea a) => O.MethodInfo CellAreaStopEditingMethodInfo a signature where
    overloadedMethod _ = cellAreaStopEditing

#endif